diff --git a/Makefile b/Makefile index 6f841f32..e3bab3a2 100644 --- a/Makefile +++ b/Makefile @@ -45,3 +45,6 @@ format license-check lint test: ci doc: cd lib && npm ci && npm run doc + +generate-platform: + ./scripts/platform.sh \ No newline at end of file diff --git a/README.md b/README.md index 2f3ae38b..b34b9d85 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ const clientId = "applicationNameFromIdP"; const refreshToken = "refreshTokenValueFromIdP"; // AuthProviders are middlewares that add `Authorization` or other bearer tokens to requests. -// These include The `refresh` provider can be handed a refresh and optional access token. +// These include The `refresh` provider can be handed a refresh and optional access token. const authProvider = await AuthProviders.refreshAuthProvider({ clientId, exchange: 'refresh', @@ -79,6 +79,61 @@ A more complete example of using an OIDC compatible provider with support for authorization code flow with PKCE and DPoP is available in the [sample `web-app` folder](./web-app/src/session.ts) +## Platform Client + +The Platform Client provides an interface to interact with the OpenTDF platform's RPC services. + +### Usage Example + +Below is an example of how to use the `PlatformClient` to interact with the platform's RPC services. + +```typescript +import { AuthProvider, OpenTDF } from '@opentdf/sdk'; +import { PlatformClient } from '@opentdf/sdk/platform'; + +const authProvider: AuthProvider = {/* configure your auth provider */}; +const platform = new PlatformClient({ + authProvider, + platformUrl: '/api', +}); + +async function exampleUsage() { + // Fetch well-known configuration + const wellKnownResponse = await platform.v1.wellknown.getWellKnownConfiguration({}); + console.log('Well-known configuration:', wellKnownResponse.configuration); + + // List policy attributes + const attributesResponse = await platform.v1.attributes.listAttributes({}); + console.log('Policy Attributes:', attributesResponse.attributes); +} + +exampleUsage(); +``` + +### Using Interceptor + +The `PlatformClient` client supports the use of interceptors for customizing RPC calls. Interceptors allow you to modify requests or responses, such as adding custom headers or handling authentication, before or after the RPC call is executed. + +Below is an example of using an interceptor to add an `Authorization` header to all outgoing requests: + +```typescript +import { platformConnect, PlatformClient } from '@opentdf/sdk/platform'; + +const authInterceptor: platformConnect.Interceptor = (next) => async (req) => { + req.header.set('Authorization', `Bearer ${accessToken}`); + return await next(req); // Pass the modified request to the next handler in the chain +}; + +const platform = new PlatformClient({ + interceptors: [authInterceptor], // Attach the interceptor + platformUrl: '/api', +}); +``` + +### Key Notes +Interceptors are particularly useful for scenarios where you need to dynamically modify requests, such as adding authentication tokens or logging request/response data. + + ## Build and Test ```shell @@ -105,59 +160,4 @@ To check out, build, and validate your installation, and test the sample web app nvm use make test make start -``` - -## Use the platform - -Version 2 of this library adds support for ABAC management tasks. -This is provided with the [opentdf Platform](https://github.com/opentdf/platform). - -### Generate Typescript code from platform protobufs - -```sh -scripts/platform.sh -``` - -This will clone the platform repo and generate Typescript code in `lib/src/platform`. - -### Import Typescript code - -```ts -import { GetAttributeRequest } from './lib/src/platform/policy/attributes/attributes_pb'; -import { Attribute, AttributeRuleTypeEnum } from './lib/src/platform/policy/objects_pb'; -import { - createConnectTransport, -} from '@connectrpc/connect-web' -import { - createPromiseClient, -} from '@connectrpc/connect' - -const attrData = { - name: "my-attr", - rule: AttributeRuleTypeEnum.ALL_OF, - namespace: {name: 'my-namespace'}, - values: [{value: 'my-value'}], - active: true, - extraField: 'this will be ignored' // only proto defined fields and value types are respected -} -const attr = new Attribute(attrData); -console.log(attr.toJson()); - -// { -// namespace: { name: 'my-namespace' }, -// name: 'my-attr', -// rule: 'ATTRIBUTE_RULE_TYPE_ENUM_ALL_OF', -// values: [ { value: 'my-value' } ], -// active: true -// } - -const req = new GetAttributeRequest({id: 'uuid-here'}); -const client = createPromiseClient( - AttributesService, - createConnectTransport({ - baseUrl: 'localhost:8080', - }) -) -``` - -This is an example to instantiate an `Attribute` and create a `GetAttributeRequest`. +``` \ No newline at end of file diff --git a/buf.gen.yaml b/buf.gen.yaml deleted file mode 100644 index 055212e8..00000000 --- a/buf.gen.yaml +++ /dev/null @@ -1,13 +0,0 @@ -# Learn more: https://docs.buf.build/configuration/v1/buf-gen-yaml -version: v1 -plugins: - - plugin: es - out: lib/src/platform - opt: - - target=js+dts - - import_extension=none - - plugin: connect-es - out: lib/src/platform - opt: - - target=js+dts - - import_extension=none diff --git a/cli/package-lock.json b/cli/package-lock.json index f9619b15..c542dc1d 100644 --- a/cli/package-lock.json +++ b/cli/package-lock.json @@ -38,6 +38,29 @@ "typescript-eslint": "^8.26.0" } }, + "node_modules/@bufbuild/protobuf": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-2.3.0.tgz", + "integrity": "sha512-WK6zH4MtBp/uesX8KGCnwDDRVnEVHUvwjsigKXcSR57Oo8Oyv1vRS9qyUlSP+6KWRl5z8tNAU5qpf3QodeVYxA==", + "peer": true + }, + "node_modules/@connectrpc/connect": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@connectrpc/connect/-/connect-2.0.2.tgz", + "integrity": "sha512-xZuylIUNvNlH52e/4eQsZvY4QZyDJRtEFEDnn/yBrv5Xi5ZZI/p8X+GAHH35ucVaBvv9u7OzHZo8+tEh1EFTxA==", + "peerDependencies": { + "@bufbuild/protobuf": "^2.2.0" + } + }, + "node_modules/@connectrpc/connect-web": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@connectrpc/connect-web/-/connect-web-2.0.2.tgz", + "integrity": "sha512-QANMFPiL2o66BdBEctg4TsQLe5ozsBLqcle3dCBp7BwGlNGTY6NnNnqmt+YRnpeMW88GgomJwWNMGCrRD9pRKA==", + "peerDependencies": { + "@bufbuild/protobuf": "^2.2.0", + "@connectrpc/connect": "2.0.2" + } + }, "node_modules/@cspotcode/source-map-support": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", @@ -524,9 +547,10 @@ "node_modules/@opentdf/sdk": { "version": "0.3.2", "resolved": "file:../lib/opentdf-sdk-0.3.2.tgz", - "integrity": "sha512-mKAJgtQYsB9+EagrdUp9SW5N24GHiui/cae9iCsQ/rPwfZjNeHTPPTXAU3zVUI5JnvFXbr13KA+AhSLzA6gZdQ==", - "license": "BSD-3-Clause-Clear", + "integrity": "sha512-doAuM1uwX2NXXoE0423IddyiOylk1sqQ5Sdn/TuGeOJ4hhRYXMOAxRPd1KPlyBFcsfloNhPt7q6qXaw2kpjHCg==", "dependencies": { + "@connectrpc/connect": "^2.0.2", + "@connectrpc/connect-web": "^2.0.2", "buffer-crc32": "^1.0.0", "dpop": "^1.4.1", "jose": "^6.0.8", @@ -1086,7 +1110,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-1.0.0.tgz", "integrity": "sha512-Db1SbgBS/fg/392AblrMJk97KggmvYhr4pB5ZIMTWtaivCPMWLkmb7m21cJvpvgK+J3nsU2CmmixNBZx4vFj/w==", - "license": "MIT", "engines": { "node": ">=8.0.0" } @@ -1315,7 +1338,6 @@ "version": "1.4.1", "resolved": "https://registry.npmjs.org/dpop/-/dpop-1.4.1.tgz", "integrity": "sha512-+Cus+OlLk9uFWbPZX/RsLpMviYAmyJpJpooto2NDQ0lnk0/S2TblPunC4nVtETOxCIsXvu4YILIOPC7LIHHXIg==", - "license": "MIT", "funding": { "url": "https://github.com/sponsors/panva" } @@ -2046,10 +2068,9 @@ } }, "node_modules/jose": { - "version": "6.0.10", - "resolved": "https://registry.npmjs.org/jose/-/jose-6.0.10.tgz", - "integrity": "sha512-skIAxZqcMkOrSwjJvplIPYrlXGpxTPnro2/QWTDCxAdWQrSTV5/KqspMWmi5WAx5+ULswASJiZ0a+1B/Lxt9cw==", - "license": "MIT", + "version": "6.0.11", + "resolved": "https://registry.npmjs.org/jose/-/jose-6.0.11.tgz", + "integrity": "sha512-QxG7EaliDARm1O1S8BGakqncGT9s25bKL1WSf6/oa17Tkqwi8D2ZNglqCF+DsYF88/rV66Q/Q2mFAy697E1DUg==", "funding": { "url": "https://github.com/sponsors/panva" } @@ -2077,8 +2098,7 @@ "node_modules/json-canonicalize": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/json-canonicalize/-/json-canonicalize-1.0.6.tgz", - "integrity": "sha512-kP2iYpOS5SZHYhIaR1t9oG80d4uTY3jPoaBj+nimy3njtJk8+sRsVatN8pyJRDRtk9Su3+6XqA2U8k0dByJBUQ==", - "license": "MIT" + "integrity": "sha512-kP2iYpOS5SZHYhIaR1t9oG80d4uTY3jPoaBj+nimy3njtJk8+sRsVatN8pyJRDRtk9Su3+6XqA2U8k0dByJBUQ==" }, "node_modules/json-parse-even-better-errors": { "version": "3.0.2", @@ -3201,7 +3221,6 @@ "https://github.com/sponsors/broofa", "https://github.com/sponsors/ctavan" ], - "license": "MIT", "bin": { "uuid": "dist/esm/bin/uuid" } diff --git a/lib/buf.gen.yaml b/lib/buf.gen.yaml new file mode 100644 index 00000000..2b8aaa13 --- /dev/null +++ b/lib/buf.gen.yaml @@ -0,0 +1,8 @@ +version: v2 + +clean: true +plugins: + - local: protoc-gen-es + out: src/platform + include_imports: true + opt: target=ts,import_extension=.js \ No newline at end of file diff --git a/lib/package-lock.json b/lib/package-lock.json index d74d64ca..1eca2f78 100644 --- a/lib/package-lock.json +++ b/lib/package-lock.json @@ -9,6 +9,8 @@ "version": "0.3.2", "license": "BSD-3-Clause-Clear", "dependencies": { + "@connectrpc/connect": "^2.0.2", + "@connectrpc/connect-web": "^2.0.2", "buffer-crc32": "^1.0.0", "dpop": "^1.4.1", "jose": "^6.0.8", @@ -16,6 +18,8 @@ "uuid": "~11.1.0" }, "devDependencies": { + "@bufbuild/buf": "^1.52.1", + "@bufbuild/protoc-gen-es": "^2.2.5", "@eslint/js": "^9.21.0", "@esm-bundle/chai": "~4.3.4-fix.0", "@types/buffer-crc32": "^0.2.4", @@ -350,6 +354,201 @@ "node": ">=18" } }, + "node_modules/@bufbuild/buf": { + "version": "1.52.1", + "resolved": "https://registry.npmjs.org/@bufbuild/buf/-/buf-1.52.1.tgz", + "integrity": "sha512-Sflcgagb/9gu3ShUF7jjJmYgMxut+YRNajPtTk20cUq5MIG8cCZeVfA6s6kDj2TG5QuAf49u5akTHPa5ZENr0A==", + "dev": true, + "hasInstallScript": true, + "bin": { + "buf": "bin/buf", + "protoc-gen-buf-breaking": "bin/protoc-gen-buf-breaking", + "protoc-gen-buf-lint": "bin/protoc-gen-buf-lint" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@bufbuild/buf-darwin-arm64": "1.52.1", + "@bufbuild/buf-darwin-x64": "1.52.1", + "@bufbuild/buf-linux-aarch64": "1.52.1", + "@bufbuild/buf-linux-armv7": "1.52.1", + "@bufbuild/buf-linux-x64": "1.52.1", + "@bufbuild/buf-win32-arm64": "1.52.1", + "@bufbuild/buf-win32-x64": "1.52.1" + } + }, + "node_modules/@bufbuild/buf-darwin-arm64": { + "version": "1.52.1", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-darwin-arm64/-/buf-darwin-arm64-1.52.1.tgz", + "integrity": "sha512-c2iCRSvhrQVCe91xQNKhwy4ES3AN0kWP1oXnCe+bzReOrBsLef9gVoxKbDv5Ywkv+epfqhuAVbltpN37P4s9mQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@bufbuild/buf-darwin-x64": { + "version": "1.52.1", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-darwin-x64/-/buf-darwin-x64-1.52.1.tgz", + "integrity": "sha512-2v742rgJBCe8E1H/u8ObUH4oeev5jCMP9TKPRy3iQZBFB2lXXgvKQCmSP2Du6Sc7bC3L4QxSbLfhJRobdjUR3Q==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@bufbuild/buf-linux-aarch64": { + "version": "1.52.1", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-linux-aarch64/-/buf-linux-aarch64-1.52.1.tgz", + "integrity": "sha512-bnfDsmsnPlgNBueTzIemBuL4WxcASR7T+RIeTjur+VILN7kN6Pd8gUiNIQbZSvKwRdKGDRJXCfn404w+5Djo5A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@bufbuild/buf-linux-armv7": { + "version": "1.52.1", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-linux-armv7/-/buf-linux-armv7-1.52.1.tgz", + "integrity": "sha512-+BvlP9FZu83dOoy2+fIw9/CuTq3TwDUXqfMU14b0CRDlx6eJsTbFMsYyNCQYdp9yJsLy3keEHKlBQkYdfd1wpQ==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@bufbuild/buf-linux-x64": { + "version": "1.52.1", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-linux-x64/-/buf-linux-x64-1.52.1.tgz", + "integrity": "sha512-MIf62fmcV1FbBzojPfQAuE1BRspkgc6w5SDYdgimd85a9FYOrpUTkt31ZPjEz/swOuneGcDecayYtt6jWEcMGA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@bufbuild/buf-win32-arm64": { + "version": "1.52.1", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-win32-arm64/-/buf-win32-arm64-1.52.1.tgz", + "integrity": "sha512-QCKsJlgiEeY8bUipVO2WDQHHrSkmWUU7DAqZrw/ndHNCwg+//jhuwLYEbpbRiA1qG4Va6WzosR5/3VgOetyLuw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@bufbuild/buf-win32-x64": { + "version": "1.52.1", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-win32-x64/-/buf-win32-x64-1.52.1.tgz", + "integrity": "sha512-VzoN16/MbZ/ozLjFp5JKhSAhs9iOEPrp0hbCpO56o/0HXFQ96KNgNEP9vYD/E90DNHWW5sgoFk74zdJLXG8wXw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@bufbuild/protobuf": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-2.3.0.tgz", + "integrity": "sha512-WK6zH4MtBp/uesX8KGCnwDDRVnEVHUvwjsigKXcSR57Oo8Oyv1vRS9qyUlSP+6KWRl5z8tNAU5qpf3QodeVYxA==" + }, + "node_modules/@bufbuild/protoc-gen-es": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/@bufbuild/protoc-gen-es/-/protoc-gen-es-2.2.5.tgz", + "integrity": "sha512-81dI1PLMQXUkvCUH1fKJEZsx+G69LvU/0BOFeqxotFpCFEC/jTu1Ka1ViIEGT5U1r51udRs20kHZTlkR9zwfAA==", + "dev": true, + "dependencies": { + "@bufbuild/protobuf": "^2.2.5", + "@bufbuild/protoplugin": "2.2.5" + }, + "bin": { + "protoc-gen-es": "bin/protoc-gen-es" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@bufbuild/protobuf": "2.2.5" + }, + "peerDependenciesMeta": { + "@bufbuild/protobuf": { + "optional": true + } + } + }, + "node_modules/@bufbuild/protoplugin": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/@bufbuild/protoplugin/-/protoplugin-2.2.5.tgz", + "integrity": "sha512-Z68KTDLiidUYoJ8kjs6YfhK8r58W93pOFIfGqlnK1RZQTQRtbH6WRWjSqtuiy4WjJpJZ5qE0lKtFGR+bHU8Vaw==", + "dev": true, + "dependencies": { + "@bufbuild/protobuf": "2.2.5", + "@typescript/vfs": "^1.5.2", + "typescript": "5.4.5" + } + }, + "node_modules/@bufbuild/protoplugin/node_modules/@bufbuild/protobuf": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-2.2.5.tgz", + "integrity": "sha512-/g5EzJifw5GF8aren8wZ/G5oMuPoGeS6MQD3ca8ddcvdXR5UELUfdTZITCGNhNXynY/AYl3Z4plmxdj/tRl/hQ==", + "dev": true + }, + "node_modules/@bufbuild/protoplugin/node_modules/typescript": { + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, "node_modules/@colors/colors": { "version": "1.5.0", "dev": true, @@ -358,6 +557,23 @@ "node": ">=0.1.90" } }, + "node_modules/@connectrpc/connect": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@connectrpc/connect/-/connect-2.0.2.tgz", + "integrity": "sha512-xZuylIUNvNlH52e/4eQsZvY4QZyDJRtEFEDnn/yBrv5Xi5ZZI/p8X+GAHH35ucVaBvv9u7OzHZo8+tEh1EFTxA==", + "peerDependencies": { + "@bufbuild/protobuf": "^2.2.0" + } + }, + "node_modules/@connectrpc/connect-web": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@connectrpc/connect-web/-/connect-web-2.0.2.tgz", + "integrity": "sha512-QANMFPiL2o66BdBEctg4TsQLe5ozsBLqcle3dCBp7BwGlNGTY6NnNnqmt+YRnpeMW88GgomJwWNMGCrRD9pRKA==", + "peerDependencies": { + "@bufbuild/protobuf": "^2.2.0", + "@connectrpc/connect": "2.0.2" + } + }, "node_modules/@csstools/color-helpers": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/@csstools/color-helpers/-/color-helpers-5.0.1.tgz", @@ -1843,6 +2059,18 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/@typescript/vfs": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@typescript/vfs/-/vfs-1.6.1.tgz", + "integrity": "sha512-JwoxboBh7Oz1v38tPbkrZ62ZXNHAk9bJ7c9x0eI5zBfBnBYGhURdbnh7Z4smN/MV48Y5OCcZb58n972UtbazsA==", + "dev": true, + "dependencies": { + "debug": "^4.1.1" + }, + "peerDependencies": { + "typescript": "*" + } + }, "node_modules/@ungap/structured-clone": { "version": "1.3.0", "dev": true, diff --git a/lib/package.json b/lib/package.json index 929a0973..8a67a6d0 100644 --- a/lib/package.json +++ b/lib/package.json @@ -52,6 +52,11 @@ "types": "./dist/types/src/nanoindex.d.ts", "require": "./dist/cjs/src/nanoindex.js", "import": "./dist/web/src/nanoindex.js" + }, + "./platform": { + "types": "./dist/types/src/platform.d.ts", + "require": "./dist/cjs/src/platform.js", + "import": "./dist/web/src/platform.js" } }, "scripts": { @@ -69,9 +74,12 @@ "test:browser": "npx webpack --config webpack.test.config.cjs && npx karma start karma.conf.cjs", "test:mocha": "c8 --exclude=\"dist/web/tests/**/*\" --report-dir=./coverage/mocha mocha 'dist/web/tests/mocha/**/*.spec.js' && npx c8 report --reporter=json --report-dir=./coverage/mocha", "test:wtr": "web-test-runner", + "test:wtr-manual": "web-test-runner --manual", "watch": "(trap 'kill 0' SIGINT; npm run build && (npm run build:watch & npm run test -- --watch))" }, "dependencies": { + "@connectrpc/connect": "^2.0.2", + "@connectrpc/connect-web": "^2.0.2", "buffer-crc32": "^1.0.0", "dpop": "^1.4.1", "jose": "^6.0.8", @@ -79,6 +87,8 @@ "uuid": "~11.1.0" }, "devDependencies": { + "@bufbuild/buf": "^1.52.1", + "@bufbuild/protoc-gen-es": "^2.2.5", "@eslint/js": "^9.21.0", "@esm-bundle/chai": "~4.3.4-fix.0", "@types/buffer-crc32": "^0.2.4", diff --git a/lib/src/platform.ts b/lib/src/platform.ts new file mode 100644 index 00000000..966ef8dd --- /dev/null +++ b/lib/src/platform.ts @@ -0,0 +1,136 @@ +// export client service definitions +export * as authorization from './platform/authorization/authorization_pb.js'; +export * as common from './platform/common/common_pb.js'; +export * as entityResolution from './platform/entityresolution/entity_resolution_pb.js'; +export * as kas from './platform/kas/kas_pb.js'; +export * as policyActions from './platform/policy/actions/actions_pb.js'; +export * as policyAttributes from './platform/policy/attributes/attributes_pb.js'; +export * as policyKasRegistry from './platform/policy/kasregistry/key_access_server_registry_pb.js'; +export * as policyNamespaces from './platform/policy/namespaces/namespaces_pb.js'; +export * as policyObjects from './platform/policy/objects_pb.js'; +export * as policyRegisteredResources from './platform/policy/registeredresources/registered_resources_pb.js'; +export * as policyResourceMapping from './platform/policy/resourcemapping/resource_mapping_pb.js'; +export * as policySelectors from './platform/policy/selectors_pb.js'; +export * as policySubjectMapping from './platform/policy/subjectmapping/subject_mapping_pb.js'; +export * as policyUnsafe from './platform/policy/unsafe/unsafe_pb.js'; +export * as wellknown from './platform/wellknownconfiguration/wellknown_configuration_pb.js'; + +// export Connect RPC framework +export * as platformConnectWeb from '@connectrpc/connect-web'; +export * as platformConnect from '@connectrpc/connect'; + +import { createConnectTransport } from '@connectrpc/connect-web'; +import { AuthProvider } from '../tdf3/index.js'; + +import { Client, createClient, Interceptor } from '@connectrpc/connect'; +import { WellKnownService } from './platform/wellknownconfiguration/wellknown_configuration_pb.js'; +import { AuthorizationService } from './platform/authorization/authorization_pb.js'; +import { EntityResolutionService } from './platform/entityresolution/entity_resolution_pb.js'; +import { AccessService } from './platform/kas/kas_pb.js'; +import { ActionService } from './platform/policy/actions/actions_pb.js'; +import { AttributesService } from './platform/policy/attributes/attributes_pb.js'; +import { KeyAccessServerRegistryService } from './platform/policy/kasregistry/key_access_server_registry_pb.js'; +import { NamespaceService } from './platform/policy/namespaces/namespaces_pb.js'; +import { ResourceMappingService } from './platform/policy/resourcemapping/resource_mapping_pb.js'; +import { SubjectMappingService } from './platform/policy/subjectmapping/subject_mapping_pb.js'; +import { UnsafeService } from './platform/policy/unsafe/unsafe_pb.js'; + +export interface PlatformServices { + authorization: Client; + entityResolution: Client; + access: Client; + action: Client; + attributes: Client; + keyAccessServerRegistry: Client; + namespace: Client; + resourceMapping: Client; + subjectMapping: Client; + unsafe: Client; + wellknown: Client; +} + +export interface PlatformClientOptions { + // Optional authentication provider for generating auth interceptor. + authProvider?: AuthProvider; + // Array of custom interceptors to apply to rpc requests. + interceptors?: Interceptor[]; + // Base URL of the platform API. + platformUrl: string; +} + +/** + * A client for interacting with the Platform using the Connect RPC framework. + * + * This client provides access to various services offered by the Platform, such as + * authorization, entity resolution, key access, policy management, and more. It uses + * the Connect RPC framework to communicate with the platform's API endpoints. + * + * This client supports authentication via an `AuthProvider` or custom interceptors, which can + * be used to add authentication headers or other custom logic to outgoing requests. + * + */ +export class PlatformClient { + readonly v1: PlatformServices; + + constructor(options: PlatformClientOptions) { + const interceptors: Interceptor[] = []; + + if (options.authProvider) { + const authInterceptor = createAuthInterceptor(options.authProvider); + interceptors.push(authInterceptor); + } + + if (options.interceptors?.length) { + interceptors.push(...options.interceptors); + } + + const transport = createConnectTransport({ + baseUrl: options.platformUrl, + interceptors, + }); + + this.v1 = { + authorization: createClient(AuthorizationService, transport), + entityResolution: createClient(EntityResolutionService, transport), + access: createClient(AccessService, transport), + action: createClient(ActionService, transport), + attributes: createClient(AttributesService, transport), + keyAccessServerRegistry: createClient(KeyAccessServerRegistryService, transport), + namespace: createClient(NamespaceService, transport), + resourceMapping: createClient(ResourceMappingService, transport), + subjectMapping: createClient(SubjectMappingService, transport), + unsafe: createClient(UnsafeService, transport), + wellknown: createClient(WellKnownService, transport), + }; + } +} + +/** + * Creates an interceptor that adds authentication headers to outgoing requests. + * + * This function uses the provided `AuthProvider` to generate authentication credentials + * for each request. The `AuthProvider` is expected to implement a `withCreds` method + * that returns an object containing authentication headers. These headers are then + * added to the request before it is sent to the server. + * + * @param authProvider - An instance of `AuthProvider` used to generate authentication credentials. + * @returns An `Interceptor` function that modifies requests to include authentication headers. + */ +function createAuthInterceptor(authProvider: AuthProvider): Interceptor { + const authInterceptor: Interceptor = (next) => async (req) => { + const token = await authProvider.withCreds({ + url: req.url, + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + }); + + Object.entries(token.headers).forEach(([key, value]) => { + req.header.set(key, value); + }); + + return await next(req); + }; + return authInterceptor; +} diff --git a/lib/src/platform/authorization/authorization_connect.d.ts b/lib/src/platform/authorization/authorization_connect.d.ts deleted file mode 100644 index a0697e77..00000000 --- a/lib/src/platform/authorization/authorization_connect.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=js+dts,import_extension=none" -// @generated from file authorization/authorization.proto (package authorization, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { GetDecisionsByTokenRequest, GetDecisionsByTokenResponse, GetDecisionsRequest, GetDecisionsResponse, GetEntitlementsRequest, GetEntitlementsResponse } from "./authorization_pb"; -import { MethodKind } from "@bufbuild/protobuf"; - -/** - * @generated from service authorization.AuthorizationService - */ -export declare const AuthorizationService: { - readonly typeName: "authorization.AuthorizationService", - readonly methods: { - /** - * @generated from rpc authorization.AuthorizationService.GetDecisions - */ - readonly getDecisions: { - readonly name: "GetDecisions", - readonly I: typeof GetDecisionsRequest, - readonly O: typeof GetDecisionsResponse, - readonly kind: MethodKind.Unary, - }, - /** - * @generated from rpc authorization.AuthorizationService.GetDecisionsByToken - */ - readonly getDecisionsByToken: { - readonly name: "GetDecisionsByToken", - readonly I: typeof GetDecisionsByTokenRequest, - readonly O: typeof GetDecisionsByTokenResponse, - readonly kind: MethodKind.Unary, - }, - /** - * @generated from rpc authorization.AuthorizationService.GetEntitlements - */ - readonly getEntitlements: { - readonly name: "GetEntitlements", - readonly I: typeof GetEntitlementsRequest, - readonly O: typeof GetEntitlementsResponse, - readonly kind: MethodKind.Unary, - }, - } -}; - diff --git a/lib/src/platform/authorization/authorization_connect.js b/lib/src/platform/authorization/authorization_connect.js deleted file mode 100644 index 6aadbe94..00000000 --- a/lib/src/platform/authorization/authorization_connect.js +++ /dev/null @@ -1,44 +0,0 @@ -// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=js+dts,import_extension=none" -// @generated from file authorization/authorization.proto (package authorization, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { GetDecisionsByTokenRequest, GetDecisionsByTokenResponse, GetDecisionsRequest, GetDecisionsResponse, GetEntitlementsRequest, GetEntitlementsResponse } from "./authorization_pb"; -import { MethodKind } from "@bufbuild/protobuf"; - -/** - * @generated from service authorization.AuthorizationService - */ -export const AuthorizationService = { - typeName: "authorization.AuthorizationService", - methods: { - /** - * @generated from rpc authorization.AuthorizationService.GetDecisions - */ - getDecisions: { - name: "GetDecisions", - I: GetDecisionsRequest, - O: GetDecisionsResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc authorization.AuthorizationService.GetDecisionsByToken - */ - getDecisionsByToken: { - name: "GetDecisionsByToken", - I: GetDecisionsByTokenRequest, - O: GetDecisionsByTokenResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc authorization.AuthorizationService.GetEntitlements - */ - getEntitlements: { - name: "GetEntitlements", - I: GetEntitlementsRequest, - O: GetEntitlementsResponse, - kind: MethodKind.Unary, - }, - } -}; - diff --git a/lib/src/platform/authorization/authorization_pb.d.ts b/lib/src/platform/authorization/authorization_pb.d.ts deleted file mode 100644 index 7cecbdb2..00000000 --- a/lib/src/platform/authorization/authorization_pb.d.ts +++ /dev/null @@ -1,707 +0,0 @@ -// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" -// @generated from file authorization/authorization.proto (package authorization, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { Any, BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3 } from "@bufbuild/protobuf"; -import type { Action } from "../policy/objects_pb"; - -/** - * @generated from message authorization.Token - */ -export declare class Token extends Message { - /** - * ephemeral id for tracking between request and response - * - * @generated from field: string id = 1; - */ - id: string; - - /** - * the token - * - * @generated from field: string jwt = 2; - */ - jwt: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "authorization.Token"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): Token; - - static fromJson(jsonValue: JsonValue, options?: Partial): Token; - - static fromJsonString(jsonString: string, options?: Partial): Token; - - static equals(a: Token | PlainMessage | undefined, b: Token | PlainMessage | undefined): boolean; -} - -/** - * PE (Person Entity) or NPE (Non-Person Entity) - * - * @generated from message authorization.Entity - */ -export declare class Entity extends Message { - /** - * ephemeral id for tracking between request and response - * - * @generated from field: string id = 1; - */ - id: string; - - /** - * Standard entity types supported by the platform - * - * @generated from oneof authorization.Entity.entity_type - */ - entityType: { - /** - * @generated from field: string email_address = 2; - */ - value: string; - case: "emailAddress"; - } | { - /** - * @generated from field: string user_name = 3; - */ - value: string; - case: "userName"; - } | { - /** - * @generated from field: string remote_claims_url = 4; - */ - value: string; - case: "remoteClaimsUrl"; - } | { - /** - * @generated from field: string uuid = 5; - */ - value: string; - case: "uuid"; - } | { - /** - * @generated from field: google.protobuf.Any claims = 6; - */ - value: Any; - case: "claims"; - } | { - /** - * @generated from field: authorization.EntityCustom custom = 7; - */ - value: EntityCustom; - case: "custom"; - } | { - /** - * @generated from field: string client_id = 8; - */ - value: string; - case: "clientId"; - } | { case: undefined; value?: undefined }; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "authorization.Entity"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): Entity; - - static fromJson(jsonValue: JsonValue, options?: Partial): Entity; - - static fromJsonString(jsonString: string, options?: Partial): Entity; - - static equals(a: Entity | PlainMessage | undefined, b: Entity | PlainMessage | undefined): boolean; -} - -/** - * Entity type for custom entities beyond the standard types - * - * @generated from message authorization.EntityCustom - */ -export declare class EntityCustom extends Message { - /** - * @generated from field: google.protobuf.Any extension = 1; - */ - extension?: Any; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "authorization.EntityCustom"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): EntityCustom; - - static fromJson(jsonValue: JsonValue, options?: Partial): EntityCustom; - - static fromJsonString(jsonString: string, options?: Partial): EntityCustom; - - static equals(a: EntityCustom | PlainMessage | undefined, b: EntityCustom | PlainMessage | undefined): boolean; -} - -/** - * A set of related PE and NPE - * - * @generated from message authorization.EntityChain - */ -export declare class EntityChain extends Message { - /** - * ephemeral id for tracking between request and response - * - * @generated from field: string id = 1; - */ - id: string; - - /** - * @generated from field: repeated authorization.Entity entities = 2; - */ - entities: Entity[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "authorization.EntityChain"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): EntityChain; - - static fromJson(jsonValue: JsonValue, options?: Partial): EntityChain; - - static fromJsonString(jsonString: string, options?: Partial): EntityChain; - - static equals(a: EntityChain | PlainMessage | undefined, b: EntityChain | PlainMessage | undefined): boolean; -} - -/** - * - * Example Request Get Decisions to answer the question - Do Bob (represented by entity chain ec1) - * and Alice (represented by entity chain ec2) have TRANSMIT authorization for - * 2 resources; resource1 (attr-set-1) defined by attributes foo:bar resource2 (attr-set-2) defined by attribute foo:bar, color:red ? - * - * { - * "actions": [ - * { - * "standard": "STANDARD_ACTION_TRANSMIT" - * } - * ], - * "entityChains": [ - * { - * "id": "ec1", - * "entities": [ - * { - * "emailAddress": "bob@example.org" - * } - * ] - * }, - * { - * "id": "ec2", - * "entities": [ - * { - * "userName": "alice@example.org" - * } - * ] - * } - * ], - * "resourceAttributes": [ - * { - * "resourceAttributeId": "attr-set-1", - * "attributeFqns": [ - * "https://www.example.org/attr/foo/value/value1" - * ] - * }, - * { - * "resourceAttributeId": "attr-set-2", - * "attributeFqns": [ - * "https://example.net/attr/attr1/value/value1", - * "https://example.net/attr/attr1/value/value2" - * ] - * } - * ] - * } - * - * - * @generated from message authorization.DecisionRequest - */ -export declare class DecisionRequest extends Message { - /** - * @generated from field: repeated policy.Action actions = 1; - */ - actions: Action[]; - - /** - * @generated from field: repeated authorization.EntityChain entity_chains = 2; - */ - entityChains: EntityChain[]; - - /** - * @generated from field: repeated authorization.ResourceAttribute resource_attributes = 3; - */ - resourceAttributes: ResourceAttribute[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "authorization.DecisionRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): DecisionRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): DecisionRequest; - - static fromJsonString(jsonString: string, options?: Partial): DecisionRequest; - - static equals(a: DecisionRequest | PlainMessage | undefined, b: DecisionRequest | PlainMessage | undefined): boolean; -} - -/** - * - * - * Example response for a Decision Request - Do Bob (represented by entity chain ec1) - * and Alice (represented by entity chain ec2) have TRANSMIT authorization for - * 2 resources; resource1 (attr-set-1) defined by attributes foo:bar resource2 (attr-set-2) defined by attribute foo:bar, color:red ? - * - * Results: - * - bob has permitted authorization to transmit for a resource defined by attr-set-1 attributes and has a watermark obligation - * - bob has denied authorization to transmit a for a resource defined by attr-set-2 attributes - * - alice has permitted authorization to transmit for a resource defined by attr-set-1 attributes - * - alice has denied authorization to transmit a for a resource defined by attr-set-2 attributes - * - * { - * "entityChainId": "ec1", - * "resourceAttributesId": "attr-set-1", - * "decision": "DECISION_PERMIT", - * "obligations": [ - * "http://www.example.org/obligation/watermark" - * ] - * }, - * { - * "entityChainId": "ec1", - * "resourceAttributesId": "attr-set-2", - * "decision": "DECISION_PERMIT" - * }, - * { - * "entityChainId": "ec2", - * "resourceAttributesId": "attr-set-1", - * "decision": "DECISION_PERMIT" - * }, - * { - * "entityChainId": "ec2", - * "resourceAttributesId": "attr-set-2", - * "decision": "DECISION_DENY" - * } - * - * - * - * @generated from message authorization.DecisionResponse - */ -export declare class DecisionResponse extends Message { - /** - * ephemeral entity chain id from the request - * - * @generated from field: string entity_chain_id = 1; - */ - entityChainId: string; - - /** - * ephemeral resource attributes id from the request - * - * @generated from field: string resource_attributes_id = 2; - */ - resourceAttributesId: string; - - /** - * Action of the decision response - * - * @generated from field: policy.Action action = 3; - */ - action?: Action; - - /** - * The decision response - * - * @generated from field: authorization.DecisionResponse.Decision decision = 4; - */ - decision: DecisionResponse_Decision; - - /** - * optional list of obligations represented in URI format - * - * @generated from field: repeated string obligations = 5; - */ - obligations: string[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "authorization.DecisionResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): DecisionResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): DecisionResponse; - - static fromJsonString(jsonString: string, options?: Partial): DecisionResponse; - - static equals(a: DecisionResponse | PlainMessage | undefined, b: DecisionResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from enum authorization.DecisionResponse.Decision - */ -export declare enum DecisionResponse_Decision { - /** - * @generated from enum value: DECISION_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, - - /** - * @generated from enum value: DECISION_DENY = 1; - */ - DENY = 1, - - /** - * @generated from enum value: DECISION_PERMIT = 2; - */ - PERMIT = 2, -} - -/** - * @generated from message authorization.GetDecisionsRequest - */ -export declare class GetDecisionsRequest extends Message { - /** - * @generated from field: repeated authorization.DecisionRequest decision_requests = 1; - */ - decisionRequests: DecisionRequest[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "authorization.GetDecisionsRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetDecisionsRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetDecisionsRequest; - - static fromJsonString(jsonString: string, options?: Partial): GetDecisionsRequest; - - static equals(a: GetDecisionsRequest | PlainMessage | undefined, b: GetDecisionsRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message authorization.GetDecisionsResponse - */ -export declare class GetDecisionsResponse extends Message { - /** - * @generated from field: repeated authorization.DecisionResponse decision_responses = 1; - */ - decisionResponses: DecisionResponse[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "authorization.GetDecisionsResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetDecisionsResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetDecisionsResponse; - - static fromJsonString(jsonString: string, options?: Partial): GetDecisionsResponse; - - static equals(a: GetDecisionsResponse | PlainMessage | undefined, b: GetDecisionsResponse | PlainMessage | undefined): boolean; -} - -/** - * - * Request to get entitlements for one or more entities for an optional attribute scope - * - * Example: Get entitlements for bob and alice (both represented using an email address - * - * { - * "entities": [ - * { - * "id": "e1", - * "emailAddress": "bob@example.org" - * }, - * { - * "id": "e2", - * "emailAddress": "alice@example.org" - * } - * ], - * "scope": { - * "attributeFqns": [ - * "https://example.net/attr/attr1/value/value1", - * "https://example.net/attr/attr1/value/value2" - * ] - * } - * } - * - * - * @generated from message authorization.GetEntitlementsRequest - */ -export declare class GetEntitlementsRequest extends Message { - /** - * list of requested entities - * - * @generated from field: repeated authorization.Entity entities = 1; - */ - entities: Entity[]; - - /** - * optional attribute fqn as a scope - * - * @generated from field: optional authorization.ResourceAttribute scope = 2; - */ - scope?: ResourceAttribute; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "authorization.GetEntitlementsRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetEntitlementsRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetEntitlementsRequest; - - static fromJsonString(jsonString: string, options?: Partial): GetEntitlementsRequest; - - static equals(a: GetEntitlementsRequest | PlainMessage | undefined, b: GetEntitlementsRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message authorization.EntityEntitlements - */ -export declare class EntityEntitlements extends Message { - /** - * @generated from field: string entity_id = 1; - */ - entityId: string; - - /** - * @generated from field: repeated string attribute_value_fqns = 2; - */ - attributeValueFqns: string[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "authorization.EntityEntitlements"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): EntityEntitlements; - - static fromJson(jsonValue: JsonValue, options?: Partial): EntityEntitlements; - - static fromJsonString(jsonString: string, options?: Partial): EntityEntitlements; - - static equals(a: EntityEntitlements | PlainMessage | undefined, b: EntityEntitlements | PlainMessage | undefined): boolean; -} - -/** - * A logical bucket of attributes belonging to a "Resource" - * - * @generated from message authorization.ResourceAttribute - */ -export declare class ResourceAttribute extends Message { - /** - * @generated from field: string resource_attributes_id = 1; - */ - resourceAttributesId: string; - - /** - * @generated from field: repeated string attribute_value_fqns = 2; - */ - attributeValueFqns: string[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "authorization.ResourceAttribute"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): ResourceAttribute; - - static fromJson(jsonValue: JsonValue, options?: Partial): ResourceAttribute; - - static fromJsonString(jsonString: string, options?: Partial): ResourceAttribute; - - static equals(a: ResourceAttribute | PlainMessage | undefined, b: ResourceAttribute | PlainMessage | undefined): boolean; -} - -/** - * - * - * Example Response for a request of : Get entitlements for bob and alice (both represented using an email address - * - * { - * "entitlements": [ - * { - * "entityId": "e1", - * "attributeValueReferences": [ - * { - * "attributeFqn": "http://www.example.org/attr/foo/value/bar" - * } - * ] - * }, - * { - * "entityId": "e2", - * "attributeValueReferences": [ - * { - * "attributeFqn": "http://www.example.org/attr/color/value/red" - * } - * ] - * } - * ] - * } - * - * - * - * @generated from message authorization.GetEntitlementsResponse - */ -export declare class GetEntitlementsResponse extends Message { - /** - * @generated from field: repeated authorization.EntityEntitlements entitlements = 1; - */ - entitlements: EntityEntitlements[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "authorization.GetEntitlementsResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetEntitlementsResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetEntitlementsResponse; - - static fromJsonString(jsonString: string, options?: Partial): GetEntitlementsResponse; - - static equals(a: GetEntitlementsResponse | PlainMessage | undefined, b: GetEntitlementsResponse | PlainMessage | undefined): boolean; -} - -/** - * - * Example Request Get Decisions by Token to answer the question - Do Bob and client1 (represented by token tok1) - * and Alice and client2 (represented by token tok2) have TRANSMIT authorization for - * 2 resources; resource1 (attr-set-1) defined by attributes foo:bar resource2 (attr-set-2) defined by attribute foo:bar, color:red ? - * - * { - * "actions": [ - * { - * "standard": "STANDARD_ACTION_TRANSMIT" - * } - * ], - * "tokens": [ - * { - * "id": "tok1", - * "jwt": .... - * }, - * { - * "id": "tok2", - * "jwt": ..... - * } - * ], - * "resourceAttributes": [ - * { - * "attributeFqns": [ - * "https://www.example.org/attr/foo/value/value1" - * ] - * }, - * { - * "attributeFqns": [ - * "https://example.net/attr/attr1/value/value1", - * "https://example.net/attr/attr1/value/value2" - * ] - * } - * ] - * } - * - * - * @generated from message authorization.TokenDecisionRequest - */ -export declare class TokenDecisionRequest extends Message { - /** - * @generated from field: repeated policy.Action actions = 1; - */ - actions: Action[]; - - /** - * @generated from field: repeated authorization.Token tokens = 2; - */ - tokens: Token[]; - - /** - * @generated from field: repeated authorization.ResourceAttribute resource_attributes = 3; - */ - resourceAttributes: ResourceAttribute[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "authorization.TokenDecisionRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): TokenDecisionRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): TokenDecisionRequest; - - static fromJsonString(jsonString: string, options?: Partial): TokenDecisionRequest; - - static equals(a: TokenDecisionRequest | PlainMessage | undefined, b: TokenDecisionRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message authorization.GetDecisionsByTokenRequest - */ -export declare class GetDecisionsByTokenRequest extends Message { - /** - * @generated from field: repeated authorization.TokenDecisionRequest decision_requests = 1; - */ - decisionRequests: TokenDecisionRequest[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "authorization.GetDecisionsByTokenRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetDecisionsByTokenRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetDecisionsByTokenRequest; - - static fromJsonString(jsonString: string, options?: Partial): GetDecisionsByTokenRequest; - - static equals(a: GetDecisionsByTokenRequest | PlainMessage | undefined, b: GetDecisionsByTokenRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message authorization.GetDecisionsByTokenResponse - */ -export declare class GetDecisionsByTokenResponse extends Message { - /** - * @generated from field: repeated authorization.DecisionResponse decision_responses = 1; - */ - decisionResponses: DecisionResponse[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "authorization.GetDecisionsByTokenResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetDecisionsByTokenResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetDecisionsByTokenResponse; - - static fromJsonString(jsonString: string, options?: Partial): GetDecisionsByTokenResponse; - - static equals(a: GetDecisionsByTokenResponse | PlainMessage | undefined, b: GetDecisionsByTokenResponse | PlainMessage | undefined): boolean; -} - diff --git a/lib/src/platform/authorization/authorization_pb.js b/lib/src/platform/authorization/authorization_pb.js deleted file mode 100644 index a4514d80..00000000 --- a/lib/src/platform/authorization/authorization_pb.js +++ /dev/null @@ -1,372 +0,0 @@ -// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" -// @generated from file authorization/authorization.proto (package authorization, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { Any, proto3 } from "@bufbuild/protobuf"; -import { Action } from "../policy/objects_pb"; - -/** - * @generated from message authorization.Token - */ -export const Token = /*@__PURE__*/ proto3.makeMessageType( - "authorization.Token", - () => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "jwt", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * PE (Person Entity) or NPE (Non-Person Entity) - * - * @generated from message authorization.Entity - */ -export const Entity = /*@__PURE__*/ proto3.makeMessageType( - "authorization.Entity", - () => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "email_address", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "entity_type" }, - { no: 3, name: "user_name", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "entity_type" }, - { no: 4, name: "remote_claims_url", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "entity_type" }, - { no: 5, name: "uuid", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "entity_type" }, - { no: 6, name: "claims", kind: "message", T: Any, oneof: "entity_type" }, - { no: 7, name: "custom", kind: "message", T: EntityCustom, oneof: "entity_type" }, - { no: 8, name: "client_id", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "entity_type" }, - ], -); - -/** - * Entity type for custom entities beyond the standard types - * - * @generated from message authorization.EntityCustom - */ -export const EntityCustom = /*@__PURE__*/ proto3.makeMessageType( - "authorization.EntityCustom", - () => [ - { no: 1, name: "extension", kind: "message", T: Any }, - ], -); - -/** - * A set of related PE and NPE - * - * @generated from message authorization.EntityChain - */ -export const EntityChain = /*@__PURE__*/ proto3.makeMessageType( - "authorization.EntityChain", - () => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "entities", kind: "message", T: Entity, repeated: true }, - ], -); - -/** - * - * Example Request Get Decisions to answer the question - Do Bob (represented by entity chain ec1) - * and Alice (represented by entity chain ec2) have TRANSMIT authorization for - * 2 resources; resource1 (attr-set-1) defined by attributes foo:bar resource2 (attr-set-2) defined by attribute foo:bar, color:red ? - * - * { - * "actions": [ - * { - * "standard": "STANDARD_ACTION_TRANSMIT" - * } - * ], - * "entityChains": [ - * { - * "id": "ec1", - * "entities": [ - * { - * "emailAddress": "bob@example.org" - * } - * ] - * }, - * { - * "id": "ec2", - * "entities": [ - * { - * "userName": "alice@example.org" - * } - * ] - * } - * ], - * "resourceAttributes": [ - * { - * "resourceAttributeId": "attr-set-1", - * "attributeFqns": [ - * "https://www.example.org/attr/foo/value/value1" - * ] - * }, - * { - * "resourceAttributeId": "attr-set-2", - * "attributeFqns": [ - * "https://example.net/attr/attr1/value/value1", - * "https://example.net/attr/attr1/value/value2" - * ] - * } - * ] - * } - * - * - * @generated from message authorization.DecisionRequest - */ -export const DecisionRequest = /*@__PURE__*/ proto3.makeMessageType( - "authorization.DecisionRequest", - () => [ - { no: 1, name: "actions", kind: "message", T: Action, repeated: true }, - { no: 2, name: "entity_chains", kind: "message", T: EntityChain, repeated: true }, - { no: 3, name: "resource_attributes", kind: "message", T: ResourceAttribute, repeated: true }, - ], -); - -/** - * - * - * Example response for a Decision Request - Do Bob (represented by entity chain ec1) - * and Alice (represented by entity chain ec2) have TRANSMIT authorization for - * 2 resources; resource1 (attr-set-1) defined by attributes foo:bar resource2 (attr-set-2) defined by attribute foo:bar, color:red ? - * - * Results: - * - bob has permitted authorization to transmit for a resource defined by attr-set-1 attributes and has a watermark obligation - * - bob has denied authorization to transmit a for a resource defined by attr-set-2 attributes - * - alice has permitted authorization to transmit for a resource defined by attr-set-1 attributes - * - alice has denied authorization to transmit a for a resource defined by attr-set-2 attributes - * - * { - * "entityChainId": "ec1", - * "resourceAttributesId": "attr-set-1", - * "decision": "DECISION_PERMIT", - * "obligations": [ - * "http://www.example.org/obligation/watermark" - * ] - * }, - * { - * "entityChainId": "ec1", - * "resourceAttributesId": "attr-set-2", - * "decision": "DECISION_PERMIT" - * }, - * { - * "entityChainId": "ec2", - * "resourceAttributesId": "attr-set-1", - * "decision": "DECISION_PERMIT" - * }, - * { - * "entityChainId": "ec2", - * "resourceAttributesId": "attr-set-2", - * "decision": "DECISION_DENY" - * } - * - * - * - * @generated from message authorization.DecisionResponse - */ -export const DecisionResponse = /*@__PURE__*/ proto3.makeMessageType( - "authorization.DecisionResponse", - () => [ - { no: 1, name: "entity_chain_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "resource_attributes_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "action", kind: "message", T: Action }, - { no: 4, name: "decision", kind: "enum", T: proto3.getEnumType(DecisionResponse_Decision) }, - { no: 5, name: "obligations", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - ], -); - -/** - * @generated from enum authorization.DecisionResponse.Decision - */ -export const DecisionResponse_Decision = /*@__PURE__*/ proto3.makeEnum( - "authorization.DecisionResponse.Decision", - [ - {no: 0, name: "DECISION_UNSPECIFIED", localName: "UNSPECIFIED"}, - {no: 1, name: "DECISION_DENY", localName: "DENY"}, - {no: 2, name: "DECISION_PERMIT", localName: "PERMIT"}, - ], -); - -/** - * @generated from message authorization.GetDecisionsRequest - */ -export const GetDecisionsRequest = /*@__PURE__*/ proto3.makeMessageType( - "authorization.GetDecisionsRequest", - () => [ - { no: 1, name: "decision_requests", kind: "message", T: DecisionRequest, repeated: true }, - ], -); - -/** - * @generated from message authorization.GetDecisionsResponse - */ -export const GetDecisionsResponse = /*@__PURE__*/ proto3.makeMessageType( - "authorization.GetDecisionsResponse", - () => [ - { no: 1, name: "decision_responses", kind: "message", T: DecisionResponse, repeated: true }, - ], -); - -/** - * - * Request to get entitlements for one or more entities for an optional attribute scope - * - * Example: Get entitlements for bob and alice (both represented using an email address - * - * { - * "entities": [ - * { - * "id": "e1", - * "emailAddress": "bob@example.org" - * }, - * { - * "id": "e2", - * "emailAddress": "alice@example.org" - * } - * ], - * "scope": { - * "attributeFqns": [ - * "https://example.net/attr/attr1/value/value1", - * "https://example.net/attr/attr1/value/value2" - * ] - * } - * } - * - * - * @generated from message authorization.GetEntitlementsRequest - */ -export const GetEntitlementsRequest = /*@__PURE__*/ proto3.makeMessageType( - "authorization.GetEntitlementsRequest", - () => [ - { no: 1, name: "entities", kind: "message", T: Entity, repeated: true }, - { no: 2, name: "scope", kind: "message", T: ResourceAttribute, opt: true }, - ], -); - -/** - * @generated from message authorization.EntityEntitlements - */ -export const EntityEntitlements = /*@__PURE__*/ proto3.makeMessageType( - "authorization.EntityEntitlements", - () => [ - { no: 1, name: "entity_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "attribute_value_fqns", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - ], -); - -/** - * A logical bucket of attributes belonging to a "Resource" - * - * @generated from message authorization.ResourceAttribute - */ -export const ResourceAttribute = /*@__PURE__*/ proto3.makeMessageType( - "authorization.ResourceAttribute", - () => [ - { no: 1, name: "resource_attributes_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "attribute_value_fqns", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - ], -); - -/** - * - * - * Example Response for a request of : Get entitlements for bob and alice (both represented using an email address - * - * { - * "entitlements": [ - * { - * "entityId": "e1", - * "attributeValueReferences": [ - * { - * "attributeFqn": "http://www.example.org/attr/foo/value/bar" - * } - * ] - * }, - * { - * "entityId": "e2", - * "attributeValueReferences": [ - * { - * "attributeFqn": "http://www.example.org/attr/color/value/red" - * } - * ] - * } - * ] - * } - * - * - * - * @generated from message authorization.GetEntitlementsResponse - */ -export const GetEntitlementsResponse = /*@__PURE__*/ proto3.makeMessageType( - "authorization.GetEntitlementsResponse", - () => [ - { no: 1, name: "entitlements", kind: "message", T: EntityEntitlements, repeated: true }, - ], -); - -/** - * - * Example Request Get Decisions by Token to answer the question - Do Bob and client1 (represented by token tok1) - * and Alice and client2 (represented by token tok2) have TRANSMIT authorization for - * 2 resources; resource1 (attr-set-1) defined by attributes foo:bar resource2 (attr-set-2) defined by attribute foo:bar, color:red ? - * - * { - * "actions": [ - * { - * "standard": "STANDARD_ACTION_TRANSMIT" - * } - * ], - * "tokens": [ - * { - * "id": "tok1", - * "jwt": .... - * }, - * { - * "id": "tok2", - * "jwt": ..... - * } - * ], - * "resourceAttributes": [ - * { - * "attributeFqns": [ - * "https://www.example.org/attr/foo/value/value1" - * ] - * }, - * { - * "attributeFqns": [ - * "https://example.net/attr/attr1/value/value1", - * "https://example.net/attr/attr1/value/value2" - * ] - * } - * ] - * } - * - * - * @generated from message authorization.TokenDecisionRequest - */ -export const TokenDecisionRequest = /*@__PURE__*/ proto3.makeMessageType( - "authorization.TokenDecisionRequest", - () => [ - { no: 1, name: "actions", kind: "message", T: Action, repeated: true }, - { no: 2, name: "tokens", kind: "message", T: Token, repeated: true }, - { no: 3, name: "resource_attributes", kind: "message", T: ResourceAttribute, repeated: true }, - ], -); - -/** - * @generated from message authorization.GetDecisionsByTokenRequest - */ -export const GetDecisionsByTokenRequest = /*@__PURE__*/ proto3.makeMessageType( - "authorization.GetDecisionsByTokenRequest", - () => [ - { no: 1, name: "decision_requests", kind: "message", T: TokenDecisionRequest, repeated: true }, - ], -); - -/** - * @generated from message authorization.GetDecisionsByTokenResponse - */ -export const GetDecisionsByTokenResponse = /*@__PURE__*/ proto3.makeMessageType( - "authorization.GetDecisionsByTokenResponse", - () => [ - { no: 1, name: "decision_responses", kind: "message", T: DecisionResponse, repeated: true }, - ], -); - diff --git a/lib/src/platform/authorization/authorization_pb.ts b/lib/src/platform/authorization/authorization_pb.ts new file mode 100644 index 00000000..b8e8f79c --- /dev/null +++ b/lib/src/platform/authorization/authorization_pb.ts @@ -0,0 +1,689 @@ +// @generated by protoc-gen-es v2.2.5 with parameter "target=ts,import_extension=.js" +// @generated from file authorization/authorization.proto (package authorization, syntax proto3) +/* eslint-disable */ + +import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1"; +import { enumDesc, fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1"; +import { file_google_api_annotations } from "../google/api/annotations_pb.js"; +import type { Any } from "@bufbuild/protobuf/wkt"; +import { file_google_protobuf_any } from "@bufbuild/protobuf/wkt"; +import type { Action } from "../policy/objects_pb.js"; +import { file_policy_objects } from "../policy/objects_pb.js"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file authorization/authorization.proto. + */ +export const file_authorization_authorization: GenFile = /*@__P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bi5FbnRpdHlFbnRpdGxlbWVudHMinAEKFFRva2VuRGVjaXNpb25SZXF1ZXN0Eh8KB2FjdGlvbnMYASADKAsyDi5wb2xpY3kuQWN0aW9uEiQKBnRva2VucxgCIAMoCzIULmF1dGhvcml6YXRpb24uVG9rZW4SPQoTcmVzb3VyY2VfYXR0cmlidXRlcxgDIAMoCzIgLmF1dGhvcml6YXRpb24uUmVzb3VyY2VBdHRyaWJ1dGUiXAoaR2V0RGVjaXNpb25zQnlUb2tlblJlcXVlc3QSPgoRZGVjaXNpb25fcmVxdWVzdHMYASADKAsyIy5hdXRob3JpemF0aW9uLlRva2VuRGVjaXNpb25SZXF1ZXN0IloKG0dldERlY2lzaW9uc0J5VG9rZW5SZXNwb25zZRI7ChJkZWNpc2lvbl9yZXNwb25zZXMYASADKAsyHy5hdXRob3JpemF0aW9uLkRlY2lzaW9uUmVzcG9uc2UynAMKFEF1dGhvcml6YXRpb25TZXJ2aWNlEnUKDEdldERlY2lzaW9ucxIiLmF1dGhvcml6YXRpb24uR2V0RGVjaXNpb25zUmVxdWVzdBojLmF1dGhvcml6YXRpb24uR2V0RGVjaXNpb25zUmVzcG9uc2UiHILT5JMCFjoBKiIRL3YxL2F1dGhvcml6YXRpb24SjQEKE0dldERlY2lzaW9uc0J5VG9rZW4SKS5hdXRob3JpemF0aW9uLkdldERlY2lzaW9uc0J5VG9rZW5SZXF1ZXN0GiouYXV0aG9yaXphdGlvbi5HZXREZWNpc2lvbnNCeVRva2VuUmVzcG9uc2UiH4LT5JMCGSIXL3YxL3Rva2VuL2F1dGhvcml6YXRpb24SfQoPR2V0RW50aXRsZW1lbnRzEiUuYXV0aG9yaXphdGlvbi5HZXRFbnRpdGxlbWVudHNSZXF1ZXN0GiYuYXV0aG9yaXphdGlvbi5HZXRFbnRpdGxlbWVudHNSZXNwb25zZSIbgtPkkwIVOgEqIhAvdjEvZW50aXRsZW1lbnRzYgZwcm90bzM", [file_google_api_annotations, file_google_protobuf_any, file_policy_objects]); + +/** + * @generated from message authorization.Token + */ +export type Token = Message<"authorization.Token"> & { + /** + * ephemeral id for tracking between request and response + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * the token + * + * @generated from field: string jwt = 2; + */ + jwt: string; +}; + +/** + * Describes the message authorization.Token. + * Use `create(TokenSchema)` to create a new message. + */ +export const TokenSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_authorization_authorization, 0); + +/** + * PE (Person Entity) or NPE (Non-Person Entity) + * + * @generated from message authorization.Entity + */ +export type Entity = Message<"authorization.Entity"> & { + /** + * ephemeral id for tracking between request and response + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Standard entity types supported by the platform + * + * @generated from oneof authorization.Entity.entity_type + */ + entityType: { + /** + * one of the entity options must be set + * + * @generated from field: string email_address = 2; + */ + value: string; + case: "emailAddress"; + } | { + /** + * @generated from field: string user_name = 3; + */ + value: string; + case: "userName"; + } | { + /** + * @generated from field: string remote_claims_url = 4; + */ + value: string; + case: "remoteClaimsUrl"; + } | { + /** + * @generated from field: string uuid = 5; + */ + value: string; + case: "uuid"; + } | { + /** + * @generated from field: google.protobuf.Any claims = 6; + */ + value: Any; + case: "claims"; + } | { + /** + * @generated from field: authorization.EntityCustom custom = 7; + */ + value: EntityCustom; + case: "custom"; + } | { + /** + * @generated from field: string client_id = 8; + */ + value: string; + case: "clientId"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from field: authorization.Entity.Category category = 9; + */ + category: Entity_Category; +}; + +/** + * Describes the message authorization.Entity. + * Use `create(EntitySchema)` to create a new message. + */ +export const EntitySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_authorization_authorization, 1); + +/** + * @generated from enum authorization.Entity.Category + */ +export enum Entity_Category { + /** + * @generated from enum value: CATEGORY_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: CATEGORY_SUBJECT = 1; + */ + SUBJECT = 1, + + /** + * @generated from enum value: CATEGORY_ENVIRONMENT = 2; + */ + ENVIRONMENT = 2, +} + +/** + * Describes the enum authorization.Entity.Category. + */ +export const Entity_CategorySchema: GenEnum = /*@__PURE__*/ + enumDesc(file_authorization_authorization, 1, 0); + +/** + * Entity type for custom entities beyond the standard types + * + * @generated from message authorization.EntityCustom + */ +export type EntityCustom = Message<"authorization.EntityCustom"> & { + /** + * @generated from field: google.protobuf.Any extension = 1; + */ + extension?: Any; +}; + +/** + * Describes the message authorization.EntityCustom. + * Use `create(EntityCustomSchema)` to create a new message. + */ +export const EntityCustomSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_authorization_authorization, 2); + +/** + * A set of related PE and NPE + * + * @generated from message authorization.EntityChain + */ +export type EntityChain = Message<"authorization.EntityChain"> & { + /** + * ephemeral id for tracking between request and response + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * @generated from field: repeated authorization.Entity entities = 2; + */ + entities: Entity[]; +}; + +/** + * Describes the message authorization.EntityChain. + * Use `create(EntityChainSchema)` to create a new message. + */ +export const EntityChainSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_authorization_authorization, 3); + +/** + * + * Example Request Get Decisions to answer the question - Do Bob (represented by entity chain ec1) + * and Alice (represented by entity chain ec2) have TRANSMIT authorization for + * 2 resources; resource1 (attr-set-1) defined by attributes foo:bar resource2 (attr-set-2) defined by attribute foo:bar, color:red ? + * + * { + * "actions": [ + * { + * "standard": "STANDARD_ACTION_TRANSMIT" + * } + * ], + * "entityChains": [ + * { + * "id": "ec1", + * "entities": [ + * { + * "emailAddress": "bob@example.org" + * } + * ] + * }, + * { + * "id": "ec2", + * "entities": [ + * { + * "userName": "alice@example.org" + * } + * ] + * } + * ], + * "resourceAttributes": [ + * { + * "resourceAttributeId": "attr-set-1", + * "attributeFqns": [ + * "https://www.example.org/attr/foo/value/value1" + * ] + * }, + * { + * "resourceAttributeId": "attr-set-2", + * "attributeFqns": [ + * "https://example.net/attr/attr1/value/value1", + * "https://example.net/attr/attr1/value/value2" + * ] + * } + * ] + * } + * + * + * @generated from message authorization.DecisionRequest + */ +export type DecisionRequest = Message<"authorization.DecisionRequest"> & { + /** + * @generated from field: repeated policy.Action actions = 1; + */ + actions: Action[]; + + /** + * @generated from field: repeated authorization.EntityChain entity_chains = 2; + */ + entityChains: EntityChain[]; + + /** + * @generated from field: repeated authorization.ResourceAttribute resource_attributes = 3; + */ + resourceAttributes: ResourceAttribute[]; +}; + +/** + * Describes the message authorization.DecisionRequest. + * Use `create(DecisionRequestSchema)` to create a new message. + */ +export const DecisionRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_authorization_authorization, 4); + +/** + * + * + * Example response for a Decision Request - Do Bob (represented by entity chain ec1) + * and Alice (represented by entity chain ec2) have TRANSMIT authorization for + * 2 resources; resource1 (attr-set-1) defined by attributes foo:bar resource2 (attr-set-2) defined by attribute foo:bar, color:red ? + * + * Results: + * - bob has permitted authorization to transmit for a resource defined by attr-set-1 attributes and has a watermark obligation + * - bob has denied authorization to transmit a for a resource defined by attr-set-2 attributes + * - alice has permitted authorization to transmit for a resource defined by attr-set-1 attributes + * - alice has denied authorization to transmit a for a resource defined by attr-set-2 attributes + * + * { + * "entityChainId": "ec1", + * "resourceAttributesId": "attr-set-1", + * "decision": "DECISION_PERMIT", + * "obligations": [ + * "http://www.example.org/obligation/watermark" + * ] + * }, + * { + * "entityChainId": "ec1", + * "resourceAttributesId": "attr-set-2", + * "decision": "DECISION_PERMIT" + * }, + * { + * "entityChainId": "ec2", + * "resourceAttributesId": "attr-set-1", + * "decision": "DECISION_PERMIT" + * }, + * { + * "entityChainId": "ec2", + * "resourceAttributesId": "attr-set-2", + * "decision": "DECISION_DENY" + * } + * + * + * + * @generated from message authorization.DecisionResponse + */ +export type DecisionResponse = Message<"authorization.DecisionResponse"> & { + /** + * ephemeral entity chain id from the request + * + * @generated from field: string entity_chain_id = 1; + */ + entityChainId: string; + + /** + * ephemeral resource attributes id from the request + * + * @generated from field: string resource_attributes_id = 2; + */ + resourceAttributesId: string; + + /** + * Action of the decision response + * + * @generated from field: policy.Action action = 3; + */ + action?: Action; + + /** + * The decision response + * + * @generated from field: authorization.DecisionResponse.Decision decision = 4; + */ + decision: DecisionResponse_Decision; + + /** + * optional list of obligations represented in URI format + * + * @generated from field: repeated string obligations = 5; + */ + obligations: string[]; +}; + +/** + * Describes the message authorization.DecisionResponse. + * Use `create(DecisionResponseSchema)` to create a new message. + */ +export const DecisionResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_authorization_authorization, 5); + +/** + * @generated from enum authorization.DecisionResponse.Decision + */ +export enum DecisionResponse_Decision { + /** + * @generated from enum value: DECISION_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: DECISION_DENY = 1; + */ + DENY = 1, + + /** + * @generated from enum value: DECISION_PERMIT = 2; + */ + PERMIT = 2, +} + +/** + * Describes the enum authorization.DecisionResponse.Decision. + */ +export const DecisionResponse_DecisionSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_authorization_authorization, 5, 0); + +/** + * @generated from message authorization.GetDecisionsRequest + */ +export type GetDecisionsRequest = Message<"authorization.GetDecisionsRequest"> & { + /** + * @generated from field: repeated authorization.DecisionRequest decision_requests = 1; + */ + decisionRequests: DecisionRequest[]; +}; + +/** + * Describes the message authorization.GetDecisionsRequest. + * Use `create(GetDecisionsRequestSchema)` to create a new message. + */ +export const GetDecisionsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_authorization_authorization, 6); + +/** + * @generated from message authorization.GetDecisionsResponse + */ +export type GetDecisionsResponse = Message<"authorization.GetDecisionsResponse"> & { + /** + * @generated from field: repeated authorization.DecisionResponse decision_responses = 1; + */ + decisionResponses: DecisionResponse[]; +}; + +/** + * Describes the message authorization.GetDecisionsResponse. + * Use `create(GetDecisionsResponseSchema)` to create a new message. + */ +export const GetDecisionsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_authorization_authorization, 7); + +/** + * + * Request to get entitlements for one or more entities for an optional attribute scope + * + * Example: Get entitlements for bob and alice (both represented using an email address + * + * { + * "entities": [ + * { + * "id": "e1", + * "emailAddress": "bob@example.org" + * }, + * { + * "id": "e2", + * "emailAddress": "alice@example.org" + * } + * ], + * "scope": { + * "attributeFqns": [ + * "https://example.net/attr/attr1/value/value1", + * "https://example.net/attr/attr1/value/value2" + * ] + * } + * } + * + * + * @generated from message authorization.GetEntitlementsRequest + */ +export type GetEntitlementsRequest = Message<"authorization.GetEntitlementsRequest"> & { + /** + * list of requested entities + * + * @generated from field: repeated authorization.Entity entities = 1; + */ + entities: Entity[]; + + /** + * optional attribute fqn as a scope + * + * @generated from field: optional authorization.ResourceAttribute scope = 2; + */ + scope?: ResourceAttribute; + + /** + * optional parameter to return a full list of entitlements - returns lower hierarchy attributes + * + * @generated from field: optional bool with_comprehensive_hierarchy = 3; + */ + withComprehensiveHierarchy?: boolean; +}; + +/** + * Describes the message authorization.GetEntitlementsRequest. + * Use `create(GetEntitlementsRequestSchema)` to create a new message. + */ +export const GetEntitlementsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_authorization_authorization, 8); + +/** + * @generated from message authorization.EntityEntitlements + */ +export type EntityEntitlements = Message<"authorization.EntityEntitlements"> & { + /** + * @generated from field: string entity_id = 1; + */ + entityId: string; + + /** + * @generated from field: repeated string attribute_value_fqns = 2; + */ + attributeValueFqns: string[]; +}; + +/** + * Describes the message authorization.EntityEntitlements. + * Use `create(EntityEntitlementsSchema)` to create a new message. + */ +export const EntityEntitlementsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_authorization_authorization, 9); + +/** + * A logical bucket of attributes belonging to a "Resource" + * + * @generated from message authorization.ResourceAttribute + */ +export type ResourceAttribute = Message<"authorization.ResourceAttribute"> & { + /** + * @generated from field: string resource_attributes_id = 1; + */ + resourceAttributesId: string; + + /** + * @generated from field: repeated string attribute_value_fqns = 2; + */ + attributeValueFqns: string[]; +}; + +/** + * Describes the message authorization.ResourceAttribute. + * Use `create(ResourceAttributeSchema)` to create a new message. + */ +export const ResourceAttributeSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_authorization_authorization, 10); + +/** + * + * + * Example Response for a request of : Get entitlements for bob and alice (both represented using an email address + * + * { + * "entitlements": [ + * { + * "entityId": "e1", + * "attributeValueReferences": [ + * { + * "attributeFqn": "http://www.example.org/attr/foo/value/bar" + * } + * ] + * }, + * { + * "entityId": "e2", + * "attributeValueReferences": [ + * { + * "attributeFqn": "http://www.example.org/attr/color/value/red" + * } + * ] + * } + * ] + * } + * + * + * + * @generated from message authorization.GetEntitlementsResponse + */ +export type GetEntitlementsResponse = Message<"authorization.GetEntitlementsResponse"> & { + /** + * @generated from field: repeated authorization.EntityEntitlements entitlements = 1; + */ + entitlements: EntityEntitlements[]; +}; + +/** + * Describes the message authorization.GetEntitlementsResponse. + * Use `create(GetEntitlementsResponseSchema)` to create a new message. + */ +export const GetEntitlementsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_authorization_authorization, 11); + +/** + * + * Example Request Get Decisions by Token to answer the question - Do Bob and client1 (represented by token tok1) + * and Alice and client2 (represented by token tok2) have TRANSMIT authorization for + * 2 resources; resource1 (attr-set-1) defined by attributes foo:bar resource2 (attr-set-2) defined by attribute foo:bar, color:red ? + * + * { + * "actions": [ + * { + * "standard": "STANDARD_ACTION_TRANSMIT" + * } + * ], + * "tokens": [ + * { + * "id": "tok1", + * "jwt": .... + * }, + * { + * "id": "tok2", + * "jwt": ..... + * } + * ], + * "resourceAttributes": [ + * { + * "attributeFqns": [ + * "https://www.example.org/attr/foo/value/value1" + * ] + * }, + * { + * "attributeFqns": [ + * "https://example.net/attr/attr1/value/value1", + * "https://example.net/attr/attr1/value/value2" + * ] + * } + * ] + * } + * + * + * @generated from message authorization.TokenDecisionRequest + */ +export type TokenDecisionRequest = Message<"authorization.TokenDecisionRequest"> & { + /** + * @generated from field: repeated policy.Action actions = 1; + */ + actions: Action[]; + + /** + * @generated from field: repeated authorization.Token tokens = 2; + */ + tokens: Token[]; + + /** + * @generated from field: repeated authorization.ResourceAttribute resource_attributes = 3; + */ + resourceAttributes: ResourceAttribute[]; +}; + +/** + * Describes the message authorization.TokenDecisionRequest. + * Use `create(TokenDecisionRequestSchema)` to create a new message. + */ +export const TokenDecisionRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_authorization_authorization, 12); + +/** + * @generated from message authorization.GetDecisionsByTokenRequest + */ +export type GetDecisionsByTokenRequest = Message<"authorization.GetDecisionsByTokenRequest"> & { + /** + * @generated from field: repeated authorization.TokenDecisionRequest decision_requests = 1; + */ + decisionRequests: TokenDecisionRequest[]; +}; + +/** + * Describes the message authorization.GetDecisionsByTokenRequest. + * Use `create(GetDecisionsByTokenRequestSchema)` to create a new message. + */ +export const GetDecisionsByTokenRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_authorization_authorization, 13); + +/** + * @generated from message authorization.GetDecisionsByTokenResponse + */ +export type GetDecisionsByTokenResponse = Message<"authorization.GetDecisionsByTokenResponse"> & { + /** + * @generated from field: repeated authorization.DecisionResponse decision_responses = 1; + */ + decisionResponses: DecisionResponse[]; +}; + +/** + * Describes the message authorization.GetDecisionsByTokenResponse. + * Use `create(GetDecisionsByTokenResponseSchema)` to create a new message. + */ +export const GetDecisionsByTokenResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_authorization_authorization, 14); + +/** + * @generated from service authorization.AuthorizationService + */ +export const AuthorizationService: GenService<{ + /** + * @generated from rpc authorization.AuthorizationService.GetDecisions + */ + getDecisions: { + methodKind: "unary"; + input: typeof GetDecisionsRequestSchema; + output: typeof GetDecisionsResponseSchema; + }, + /** + * @generated from rpc authorization.AuthorizationService.GetDecisionsByToken + */ + getDecisionsByToken: { + methodKind: "unary"; + input: typeof GetDecisionsByTokenRequestSchema; + output: typeof GetDecisionsByTokenResponseSchema; + }, + /** + * @generated from rpc authorization.AuthorizationService.GetEntitlements + */ + getEntitlements: { + methodKind: "unary"; + input: typeof GetEntitlementsRequestSchema; + output: typeof GetEntitlementsResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_authorization_authorization, 0); + diff --git a/lib/src/platform/buf/validate/validate_pb.ts b/lib/src/platform/buf/validate/validate_pb.ts new file mode 100644 index 00000000..507ae5be --- /dev/null +++ b/lib/src/platform/buf/validate/validate_pb.ts @@ -0,0 +1,4626 @@ +// Copyright 2023 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es v2.2.5 with parameter "target=ts,import_extension=.js" +// @generated from file buf/validate/validate.proto (package buf.validate, syntax proto2) +/* eslint-disable */ + +import type { GenEnum, GenExtension, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1"; +import { enumDesc, extDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1"; +import type { Duration, FieldDescriptorProto_Type, FieldOptions, MessageOptions, OneofOptions, Timestamp } from "@bufbuild/protobuf/wkt"; +import { file_google_protobuf_descriptor, file_google_protobuf_duration, file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file buf/validate/validate.proto. + */ +export const file_buf_validate_validate: GenFile = /*@__PURE__*/ + fileDesc("ChtidWYvdmFsaWRhdGUvdmFsaWRhdGUucHJvdG8SDGJ1Zi52YWxpZGF0ZSI9CgpDb25zdHJhaW50EgoKAmlkGAEgASgJEg8KB21lc3NhZ2UYAiABKAkSEgoKZXhwcmVzc2lvbhgDIAEoCSJNChJNZXNzYWdlQ29uc3RyYWludHMSEAoIZGlzYWJsZWQYASABKAgSJQoDY2VsGAMgAygLMhguYnVmLnZhbGlkYXRlLkNvbnN0cmFpbnQiJAoQT25lb2ZDb25zdHJhaW50cxIQ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_protobuf_duration, file_google_protobuf_timestamp]); + +/** + * `Constraint` represents a validation rule written in the Common Expression + * Language (CEL) syntax. Each Constraint includes a unique identifier, an + * optional error message, and the CEL expression to evaluate. For more + * information on CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md). + * + * ```proto + * message Foo { + * option (buf.validate.message).cel = { + * id: "foo.bar" + * message: "bar must be greater than 0" + * expression: "this.bar > 0" + * }; + * int32 bar = 1; + * } + * ``` + * + * @generated from message buf.validate.Constraint + */ +export type Constraint = Message<"buf.validate.Constraint"> & { + /** + * `id` is a string that serves as a machine-readable name for this Constraint. + * It should be unique within its scope, which could be either a message or a field. + * + * @generated from field: optional string id = 1; + */ + id: string; + + /** + * `message` is an optional field that provides a human-readable error message + * for this Constraint when the CEL expression evaluates to false. If a + * non-empty message is provided, any strings resulting from the CEL + * expression evaluation are ignored. + * + * @generated from field: optional string message = 2; + */ + message: string; + + /** + * `expression` is the actual CEL expression that will be evaluated for + * validation. This string must resolve to either a boolean or a string + * value. If the expression evaluates to false or a non-empty string, the + * validation is considered failed, and the message is rejected. + * + * @generated from field: optional string expression = 3; + */ + expression: string; +}; + +/** + * Describes the message buf.validate.Constraint. + * Use `create(ConstraintSchema)` to create a new message. + */ +export const ConstraintSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 0); + +/** + * MessageConstraints represents validation rules that are applied to the entire message. + * It includes disabling options and a list of Constraint messages representing Common Expression Language (CEL) validation rules. + * + * @generated from message buf.validate.MessageConstraints + */ +export type MessageConstraints = Message<"buf.validate.MessageConstraints"> & { + /** + * `disabled` is a boolean flag that, when set to true, nullifies any validation rules for this message. + * This includes any fields within the message that would otherwise support validation. + * + * ```proto + * message MyMessage { + * // validation will be bypassed for this message + * option (buf.validate.message).disabled = true; + * } + * ``` + * + * @generated from field: optional bool disabled = 1; + */ + disabled: boolean; + + /** + * `cel` is a repeated field of type Constraint. Each Constraint specifies a validation rule to be applied to this message. + * These constraints are written in Common Expression Language (CEL) syntax. For more information on + * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md). + * + * + * ```proto + * message MyMessage { + * // The field `foo` must be greater than 42. + * option (buf.validate.message).cel = { + * id: "my_message.value", + * message: "value must be greater than 42", + * expression: "this.foo > 42", + * }; + * optional int32 foo = 1; + * } + * ``` + * + * @generated from field: repeated buf.validate.Constraint cel = 3; + */ + cel: Constraint[]; +}; + +/** + * Describes the message buf.validate.MessageConstraints. + * Use `create(MessageConstraintsSchema)` to create a new message. + */ +export const MessageConstraintsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 1); + +/** + * The `OneofConstraints` message type enables you to manage constraints for + * oneof fields in your protobuf messages. + * + * @generated from message buf.validate.OneofConstraints + */ +export type OneofConstraints = Message<"buf.validate.OneofConstraints"> & { + /** + * If `required` is true, exactly one field of the oneof must be present. A + * validation error is returned if no fields in the oneof are present. The + * field itself may still be a default value; further constraints + * should be placed on the fields themselves to ensure they are valid values, + * such as `min_len` or `gt`. + * + * ```proto + * message MyMessage { + * oneof value { + * // Either `a` or `b` must be set. If `a` is set, it must also be + * // non-empty; whereas if `b` is set, it can still be an empty string. + * option (buf.validate.oneof).required = true; + * string a = 1 [(buf.validate.field).string.min_len = 1]; + * string b = 2; + * } + * } + * ``` + * + * @generated from field: optional bool required = 1; + */ + required: boolean; +}; + +/** + * Describes the message buf.validate.OneofConstraints. + * Use `create(OneofConstraintsSchema)` to create a new message. + */ +export const OneofConstraintsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 2); + +/** + * FieldConstraints encapsulates the rules for each type of field. Depending on + * the field, the correct set should be used to ensure proper validations. + * + * @generated from message buf.validate.FieldConstraints + */ +export type FieldConstraints = Message<"buf.validate.FieldConstraints"> & { + /** + * `cel` is a repeated field used to represent a textual expression + * in the Common Expression Language (CEL) syntax. For more information on + * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md). + * + * ```proto + * message MyMessage { + * // The field `value` must be greater than 42. + * optional int32 value = 1 [(buf.validate.field).cel = { + * id: "my_message.value", + * message: "value must be greater than 42", + * expression: "this > 42", + * }]; + * } + * ``` + * + * @generated from field: repeated buf.validate.Constraint cel = 23; + */ + cel: Constraint[]; + + /** + * If `required` is true, the field must be populated. A populated field can be + * described as "serialized in the wire format," which includes: + * + * - the following "nullable" fields must be explicitly set to be considered populated: + * - singular message fields (whose fields may be unpopulated/default values) + * - member fields of a oneof (may be their default value) + * - proto3 optional fields (may be their default value) + * - proto2 scalar fields (both optional and required) + * - proto3 scalar fields must be non-zero to be considered populated + * - repeated and map fields must be non-empty to be considered populated + * + * ```proto + * message MyMessage { + * // The field `value` must be set to a non-null value. + * optional MyOtherMessage value = 1 [(buf.validate.field).required = true]; + * } + * ``` + * + * @generated from field: optional bool required = 25; + */ + required: boolean; + + /** + * Skip validation on the field if its value matches the specified criteria. + * See Ignore enum for details. + * + * ```proto + * message UpdateRequest { + * // The uri rule only applies if the field is populated and not an empty + * // string. + * optional string url = 1 [ + * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE, + * (buf.validate.field).string.uri = true, + * ]; + * } + * ``` + * + * @generated from field: optional buf.validate.Ignore ignore = 27; + */ + ignore: Ignore; + + /** + * @generated from oneof buf.validate.FieldConstraints.type + */ + type: { + /** + * Scalar Field Types + * + * @generated from field: buf.validate.FloatRules float = 1; + */ + value: FloatRules; + case: "float"; + } | { + /** + * @generated from field: buf.validate.DoubleRules double = 2; + */ + value: DoubleRules; + case: "double"; + } | { + /** + * @generated from field: buf.validate.Int32Rules int32 = 3; + */ + value: Int32Rules; + case: "int32"; + } | { + /** + * @generated from field: buf.validate.Int64Rules int64 = 4; + */ + value: Int64Rules; + case: "int64"; + } | { + /** + * @generated from field: buf.validate.UInt32Rules uint32 = 5; + */ + value: UInt32Rules; + case: "uint32"; + } | { + /** + * @generated from field: buf.validate.UInt64Rules uint64 = 6; + */ + value: UInt64Rules; + case: "uint64"; + } | { + /** + * @generated from field: buf.validate.SInt32Rules sint32 = 7; + */ + value: SInt32Rules; + case: "sint32"; + } | { + /** + * @generated from field: buf.validate.SInt64Rules sint64 = 8; + */ + value: SInt64Rules; + case: "sint64"; + } | { + /** + * @generated from field: buf.validate.Fixed32Rules fixed32 = 9; + */ + value: Fixed32Rules; + case: "fixed32"; + } | { + /** + * @generated from field: buf.validate.Fixed64Rules fixed64 = 10; + */ + value: Fixed64Rules; + case: "fixed64"; + } | { + /** + * @generated from field: buf.validate.SFixed32Rules sfixed32 = 11; + */ + value: SFixed32Rules; + case: "sfixed32"; + } | { + /** + * @generated from field: buf.validate.SFixed64Rules sfixed64 = 12; + */ + value: SFixed64Rules; + case: "sfixed64"; + } | { + /** + * @generated from field: buf.validate.BoolRules bool = 13; + */ + value: BoolRules; + case: "bool"; + } | { + /** + * @generated from field: buf.validate.StringRules string = 14; + */ + value: StringRules; + case: "string"; + } | { + /** + * @generated from field: buf.validate.BytesRules bytes = 15; + */ + value: BytesRules; + case: "bytes"; + } | { + /** + * Complex Field Types + * + * @generated from field: buf.validate.EnumRules enum = 16; + */ + value: EnumRules; + case: "enum"; + } | { + /** + * @generated from field: buf.validate.RepeatedRules repeated = 18; + */ + value: RepeatedRules; + case: "repeated"; + } | { + /** + * @generated from field: buf.validate.MapRules map = 19; + */ + value: MapRules; + case: "map"; + } | { + /** + * Well-Known Field Types + * + * @generated from field: buf.validate.AnyRules any = 20; + */ + value: AnyRules; + case: "any"; + } | { + /** + * @generated from field: buf.validate.DurationRules duration = 21; + */ + value: DurationRules; + case: "duration"; + } | { + /** + * @generated from field: buf.validate.TimestampRules timestamp = 22; + */ + value: TimestampRules; + case: "timestamp"; + } | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message buf.validate.FieldConstraints. + * Use `create(FieldConstraintsSchema)` to create a new message. + */ +export const FieldConstraintsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 3); + +/** + * PredefinedConstraints are custom constraints that can be re-used with + * multiple fields. + * + * @generated from message buf.validate.PredefinedConstraints + */ +export type PredefinedConstraints = Message<"buf.validate.PredefinedConstraints"> & { + /** + * `cel` is a repeated field used to represent a textual expression + * in the Common Expression Language (CEL) syntax. For more information on + * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md). + * + * ```proto + * message MyMessage { + * // The field `value` must be greater than 42. + * optional int32 value = 1 [(buf.validate.predefined).cel = { + * id: "my_message.value", + * message: "value must be greater than 42", + * expression: "this > 42", + * }]; + * } + * ``` + * + * @generated from field: repeated buf.validate.Constraint cel = 1; + */ + cel: Constraint[]; +}; + +/** + * Describes the message buf.validate.PredefinedConstraints. + * Use `create(PredefinedConstraintsSchema)` to create a new message. + */ +export const PredefinedConstraintsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 4); + +/** + * FloatRules describes the constraints applied to `float` values. These + * rules may also be applied to the `google.protobuf.FloatValue` Well-Known-Type. + * + * @generated from message buf.validate.FloatRules + */ +export type FloatRules = Message<"buf.validate.FloatRules"> & { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MyFloat { + * // value must equal 42.0 + * float value = 1 [(buf.validate.field).float.const = 42.0]; + * } + * ``` + * + * @generated from field: optional float const = 1; + */ + const: number; + + /** + * @generated from oneof buf.validate.FloatRules.less_than + */ + lessThan: { + /** + * `lt` requires the field value to be less than the specified value (field < + * value). If the field value is equal to or greater than the specified value, + * an error message is generated. + * + * ```proto + * message MyFloat { + * // value must be less than 10.0 + * float value = 1 [(buf.validate.field).float.lt = 10.0]; + * } + * ``` + * + * @generated from field: float lt = 2; + */ + value: number; + case: "lt"; + } | { + /** + * `lte` requires the field value to be less than or equal to the specified + * value (field <= value). If the field value is greater than the specified + * value, an error message is generated. + * + * ```proto + * message MyFloat { + * // value must be less than or equal to 10.0 + * float value = 1 [(buf.validate.field).float.lte = 10.0]; + * } + * ``` + * + * @generated from field: float lte = 3; + */ + value: number; + case: "lte"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from oneof buf.validate.FloatRules.greater_than + */ + greaterThan: { + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyFloat { + * // value must be greater than 5.0 [float.gt] + * float value = 1 [(buf.validate.field).float.gt = 5.0]; + * + * // value must be greater than 5 and less than 10.0 [float.gt_lt] + * float other_value = 2 [(buf.validate.field).float = { gt: 5.0, lt: 10.0 }]; + * + * // value must be greater than 10 or less than 5.0 [float.gt_lt_exclusive] + * float another_value = 3 [(buf.validate.field).float = { gt: 10.0, lt: 5.0 }]; + * } + * ``` + * + * @generated from field: float gt = 4; + */ + value: number; + case: "gt"; + } | { + /** + * `gte` requires the field value to be greater than or equal to the specified + * value (exclusive). If the value of `gte` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyFloat { + * // value must be greater than or equal to 5.0 [float.gte] + * float value = 1 [(buf.validate.field).float.gte = 5.0]; + * + * // value must be greater than or equal to 5.0 and less than 10.0 [float.gte_lt] + * float other_value = 2 [(buf.validate.field).float = { gte: 5.0, lt: 10.0 }]; + * + * // value must be greater than or equal to 10.0 or less than 5.0 [float.gte_lt_exclusive] + * float another_value = 3 [(buf.validate.field).float = { gte: 10.0, lt: 5.0 }]; + * } + * ``` + * + * @generated from field: float gte = 5; + */ + value: number; + case: "gte"; + } | { case: undefined; value?: undefined }; + + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message + * is generated. + * + * ```proto + * message MyFloat { + * // value must be in list [1.0, 2.0, 3.0] + * repeated float value = 1 (buf.validate.field).float = { in: [1.0, 2.0, 3.0] }; + * } + * ``` + * + * @generated from field: repeated float in = 6; + */ + in: number[]; + + /** + * `in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error + * message is generated. + * + * ```proto + * message MyFloat { + * // value must not be in list [1.0, 2.0, 3.0] + * repeated float value = 1 (buf.validate.field).float = { not_in: [1.0, 2.0, 3.0] }; + * } + * ``` + * + * @generated from field: repeated float not_in = 7; + */ + notIn: number[]; + + /** + * `finite` requires the field value to be finite. If the field value is + * infinite or NaN, an error message is generated. + * + * @generated from field: optional bool finite = 8; + */ + finite: boolean; + + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other constraints. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MyFloat { + * float value = 1 [ + * (buf.validate.field).float.example = 1.0, + * (buf.validate.field).float.example = "Infinity" + * ]; + * } + * ``` + * + * @generated from field: repeated float example = 9; + */ + example: number[]; +}; + +/** + * Describes the message buf.validate.FloatRules. + * Use `create(FloatRulesSchema)` to create a new message. + */ +export const FloatRulesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 5); + +/** + * DoubleRules describes the constraints applied to `double` values. These + * rules may also be applied to the `google.protobuf.DoubleValue` Well-Known-Type. + * + * @generated from message buf.validate.DoubleRules + */ +export type DoubleRules = Message<"buf.validate.DoubleRules"> & { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MyDouble { + * // value must equal 42.0 + * double value = 1 [(buf.validate.field).double.const = 42.0]; + * } + * ``` + * + * @generated from field: optional double const = 1; + */ + const: number; + + /** + * @generated from oneof buf.validate.DoubleRules.less_than + */ + lessThan: { + /** + * `lt` requires the field value to be less than the specified value (field < + * value). If the field value is equal to or greater than the specified + * value, an error message is generated. + * + * ```proto + * message MyDouble { + * // value must be less than 10.0 + * double value = 1 [(buf.validate.field).double.lt = 10.0]; + * } + * ``` + * + * @generated from field: double lt = 2; + */ + value: number; + case: "lt"; + } | { + /** + * `lte` requires the field value to be less than or equal to the specified value + * (field <= value). If the field value is greater than the specified value, + * an error message is generated. + * + * ```proto + * message MyDouble { + * // value must be less than or equal to 10.0 + * double value = 1 [(buf.validate.field).double.lte = 10.0]; + * } + * ``` + * + * @generated from field: double lte = 3; + */ + value: number; + case: "lte"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from oneof buf.validate.DoubleRules.greater_than + */ + greaterThan: { + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or `lte`, + * the range is reversed, and the field value must be outside the specified + * range. If the field value doesn't meet the required conditions, an error + * message is generated. + * + * ```proto + * message MyDouble { + * // value must be greater than 5.0 [double.gt] + * double value = 1 [(buf.validate.field).double.gt = 5.0]; + * + * // value must be greater than 5 and less than 10.0 [double.gt_lt] + * double other_value = 2 [(buf.validate.field).double = { gt: 5.0, lt: 10.0 }]; + * + * // value must be greater than 10 or less than 5.0 [double.gt_lt_exclusive] + * double another_value = 3 [(buf.validate.field).double = { gt: 10.0, lt: 5.0 }]; + * } + * ``` + * + * @generated from field: double gt = 4; + */ + value: number; + case: "gt"; + } | { + /** + * `gte` requires the field value to be greater than or equal to the specified + * value (exclusive). If the value of `gte` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyDouble { + * // value must be greater than or equal to 5.0 [double.gte] + * double value = 1 [(buf.validate.field).double.gte = 5.0]; + * + * // value must be greater than or equal to 5.0 and less than 10.0 [double.gte_lt] + * double other_value = 2 [(buf.validate.field).double = { gte: 5.0, lt: 10.0 }]; + * + * // value must be greater than or equal to 10.0 or less than 5.0 [double.gte_lt_exclusive] + * double another_value = 3 [(buf.validate.field).double = { gte: 10.0, lt: 5.0 }]; + * } + * ``` + * + * @generated from field: double gte = 5; + */ + value: number; + case: "gte"; + } | { case: undefined; value?: undefined }; + + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message is + * generated. + * + * ```proto + * message MyDouble { + * // value must be in list [1.0, 2.0, 3.0] + * repeated double value = 1 (buf.validate.field).double = { in: [1.0, 2.0, 3.0] }; + * } + * ``` + * + * @generated from field: repeated double in = 6; + */ + in: number[]; + + /** + * `not_in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error + * message is generated. + * + * ```proto + * message MyDouble { + * // value must not be in list [1.0, 2.0, 3.0] + * repeated double value = 1 (buf.validate.field).double = { not_in: [1.0, 2.0, 3.0] }; + * } + * ``` + * + * @generated from field: repeated double not_in = 7; + */ + notIn: number[]; + + /** + * `finite` requires the field value to be finite. If the field value is + * infinite or NaN, an error message is generated. + * + * @generated from field: optional bool finite = 8; + */ + finite: boolean; + + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other constraints. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MyDouble { + * double value = 1 [ + * (buf.validate.field).double.example = 1.0, + * (buf.validate.field).double.example = "Infinity" + * ]; + * } + * ``` + * + * @generated from field: repeated double example = 9; + */ + example: number[]; +}; + +/** + * Describes the message buf.validate.DoubleRules. + * Use `create(DoubleRulesSchema)` to create a new message. + */ +export const DoubleRulesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 6); + +/** + * Int32Rules describes the constraints applied to `int32` values. These + * rules may also be applied to the `google.protobuf.Int32Value` Well-Known-Type. + * + * @generated from message buf.validate.Int32Rules + */ +export type Int32Rules = Message<"buf.validate.Int32Rules"> & { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MyInt32 { + * // value must equal 42 + * int32 value = 1 [(buf.validate.field).int32.const = 42]; + * } + * ``` + * + * @generated from field: optional int32 const = 1; + */ + const: number; + + /** + * @generated from oneof buf.validate.Int32Rules.less_than + */ + lessThan: { + /** + * `lt` requires the field value to be less than the specified value (field + * < value). If the field value is equal to or greater than the specified + * value, an error message is generated. + * + * ```proto + * message MyInt32 { + * // value must be less than 10 + * int32 value = 1 [(buf.validate.field).int32.lt = 10]; + * } + * ``` + * + * @generated from field: int32 lt = 2; + */ + value: number; + case: "lt"; + } | { + /** + * `lte` requires the field value to be less than or equal to the specified + * value (field <= value). If the field value is greater than the specified + * value, an error message is generated. + * + * ```proto + * message MyInt32 { + * // value must be less than or equal to 10 + * int32 value = 1 [(buf.validate.field).int32.lte = 10]; + * } + * ``` + * + * @generated from field: int32 lte = 3; + */ + value: number; + case: "lte"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from oneof buf.validate.Int32Rules.greater_than + */ + greaterThan: { + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyInt32 { + * // value must be greater than 5 [int32.gt] + * int32 value = 1 [(buf.validate.field).int32.gt = 5]; + * + * // value must be greater than 5 and less than 10 [int32.gt_lt] + * int32 other_value = 2 [(buf.validate.field).int32 = { gt: 5, lt: 10 }]; + * + * // value must be greater than 10 or less than 5 [int32.gt_lt_exclusive] + * int32 another_value = 3 [(buf.validate.field).int32 = { gt: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: int32 gt = 4; + */ + value: number; + case: "gt"; + } | { + /** + * `gte` requires the field value to be greater than or equal to the specified value + * (exclusive). If the value of `gte` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyInt32 { + * // value must be greater than or equal to 5 [int32.gte] + * int32 value = 1 [(buf.validate.field).int32.gte = 5]; + * + * // value must be greater than or equal to 5 and less than 10 [int32.gte_lt] + * int32 other_value = 2 [(buf.validate.field).int32 = { gte: 5, lt: 10 }]; + * + * // value must be greater than or equal to 10 or less than 5 [int32.gte_lt_exclusive] + * int32 another_value = 3 [(buf.validate.field).int32 = { gte: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: int32 gte = 5; + */ + value: number; + case: "gte"; + } | { case: undefined; value?: undefined }; + + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message is + * generated. + * + * ```proto + * message MyInt32 { + * // value must be in list [1, 2, 3] + * repeated int32 value = 1 (buf.validate.field).int32 = { in: [1, 2, 3] }; + * } + * ``` + * + * @generated from field: repeated int32 in = 6; + */ + in: number[]; + + /** + * `not_in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error message + * is generated. + * + * ```proto + * message MyInt32 { + * // value must not be in list [1, 2, 3] + * repeated int32 value = 1 (buf.validate.field).int32 = { not_in: [1, 2, 3] }; + * } + * ``` + * + * @generated from field: repeated int32 not_in = 7; + */ + notIn: number[]; + + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other constraints. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MyInt32 { + * int32 value = 1 [ + * (buf.validate.field).int32.example = 1, + * (buf.validate.field).int32.example = -10 + * ]; + * } + * ``` + * + * @generated from field: repeated int32 example = 8; + */ + example: number[]; +}; + +/** + * Describes the message buf.validate.Int32Rules. + * Use `create(Int32RulesSchema)` to create a new message. + */ +export const Int32RulesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 7); + +/** + * Int64Rules describes the constraints applied to `int64` values. These + * rules may also be applied to the `google.protobuf.Int64Value` Well-Known-Type. + * + * @generated from message buf.validate.Int64Rules + */ +export type Int64Rules = Message<"buf.validate.Int64Rules"> & { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MyInt64 { + * // value must equal 42 + * int64 value = 1 [(buf.validate.field).int64.const = 42]; + * } + * ``` + * + * @generated from field: optional int64 const = 1; + */ + const: bigint; + + /** + * @generated from oneof buf.validate.Int64Rules.less_than + */ + lessThan: { + /** + * `lt` requires the field value to be less than the specified value (field < + * value). If the field value is equal to or greater than the specified value, + * an error message is generated. + * + * ```proto + * message MyInt64 { + * // value must be less than 10 + * int64 value = 1 [(buf.validate.field).int64.lt = 10]; + * } + * ``` + * + * @generated from field: int64 lt = 2; + */ + value: bigint; + case: "lt"; + } | { + /** + * `lte` requires the field value to be less than or equal to the specified + * value (field <= value). If the field value is greater than the specified + * value, an error message is generated. + * + * ```proto + * message MyInt64 { + * // value must be less than or equal to 10 + * int64 value = 1 [(buf.validate.field).int64.lte = 10]; + * } + * ``` + * + * @generated from field: int64 lte = 3; + */ + value: bigint; + case: "lte"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from oneof buf.validate.Int64Rules.greater_than + */ + greaterThan: { + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyInt64 { + * // value must be greater than 5 [int64.gt] + * int64 value = 1 [(buf.validate.field).int64.gt = 5]; + * + * // value must be greater than 5 and less than 10 [int64.gt_lt] + * int64 other_value = 2 [(buf.validate.field).int64 = { gt: 5, lt: 10 }]; + * + * // value must be greater than 10 or less than 5 [int64.gt_lt_exclusive] + * int64 another_value = 3 [(buf.validate.field).int64 = { gt: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: int64 gt = 4; + */ + value: bigint; + case: "gt"; + } | { + /** + * `gte` requires the field value to be greater than or equal to the specified + * value (exclusive). If the value of `gte` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyInt64 { + * // value must be greater than or equal to 5 [int64.gte] + * int64 value = 1 [(buf.validate.field).int64.gte = 5]; + * + * // value must be greater than or equal to 5 and less than 10 [int64.gte_lt] + * int64 other_value = 2 [(buf.validate.field).int64 = { gte: 5, lt: 10 }]; + * + * // value must be greater than or equal to 10 or less than 5 [int64.gte_lt_exclusive] + * int64 another_value = 3 [(buf.validate.field).int64 = { gte: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: int64 gte = 5; + */ + value: bigint; + case: "gte"; + } | { case: undefined; value?: undefined }; + + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message is + * generated. + * + * ```proto + * message MyInt64 { + * // value must be in list [1, 2, 3] + * repeated int64 value = 1 (buf.validate.field).int64 = { in: [1, 2, 3] }; + * } + * ``` + * + * @generated from field: repeated int64 in = 6; + */ + in: bigint[]; + + /** + * `not_in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error + * message is generated. + * + * ```proto + * message MyInt64 { + * // value must not be in list [1, 2, 3] + * repeated int64 value = 1 (buf.validate.field).int64 = { not_in: [1, 2, 3] }; + * } + * ``` + * + * @generated from field: repeated int64 not_in = 7; + */ + notIn: bigint[]; + + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other constraints. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MyInt64 { + * int64 value = 1 [ + * (buf.validate.field).int64.example = 1, + * (buf.validate.field).int64.example = -10 + * ]; + * } + * ``` + * + * @generated from field: repeated int64 example = 9; + */ + example: bigint[]; +}; + +/** + * Describes the message buf.validate.Int64Rules. + * Use `create(Int64RulesSchema)` to create a new message. + */ +export const Int64RulesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 8); + +/** + * UInt32Rules describes the constraints applied to `uint32` values. These + * rules may also be applied to the `google.protobuf.UInt32Value` Well-Known-Type. + * + * @generated from message buf.validate.UInt32Rules + */ +export type UInt32Rules = Message<"buf.validate.UInt32Rules"> & { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MyUInt32 { + * // value must equal 42 + * uint32 value = 1 [(buf.validate.field).uint32.const = 42]; + * } + * ``` + * + * @generated from field: optional uint32 const = 1; + */ + const: number; + + /** + * @generated from oneof buf.validate.UInt32Rules.less_than + */ + lessThan: { + /** + * `lt` requires the field value to be less than the specified value (field < + * value). If the field value is equal to or greater than the specified value, + * an error message is generated. + * + * ```proto + * message MyUInt32 { + * // value must be less than 10 + * uint32 value = 1 [(buf.validate.field).uint32.lt = 10]; + * } + * ``` + * + * @generated from field: uint32 lt = 2; + */ + value: number; + case: "lt"; + } | { + /** + * `lte` requires the field value to be less than or equal to the specified + * value (field <= value). If the field value is greater than the specified + * value, an error message is generated. + * + * ```proto + * message MyUInt32 { + * // value must be less than or equal to 10 + * uint32 value = 1 [(buf.validate.field).uint32.lte = 10]; + * } + * ``` + * + * @generated from field: uint32 lte = 3; + */ + value: number; + case: "lte"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from oneof buf.validate.UInt32Rules.greater_than + */ + greaterThan: { + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyUInt32 { + * // value must be greater than 5 [uint32.gt] + * uint32 value = 1 [(buf.validate.field).uint32.gt = 5]; + * + * // value must be greater than 5 and less than 10 [uint32.gt_lt] + * uint32 other_value = 2 [(buf.validate.field).uint32 = { gt: 5, lt: 10 }]; + * + * // value must be greater than 10 or less than 5 [uint32.gt_lt_exclusive] + * uint32 another_value = 3 [(buf.validate.field).uint32 = { gt: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: uint32 gt = 4; + */ + value: number; + case: "gt"; + } | { + /** + * `gte` requires the field value to be greater than or equal to the specified + * value (exclusive). If the value of `gte` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyUInt32 { + * // value must be greater than or equal to 5 [uint32.gte] + * uint32 value = 1 [(buf.validate.field).uint32.gte = 5]; + * + * // value must be greater than or equal to 5 and less than 10 [uint32.gte_lt] + * uint32 other_value = 2 [(buf.validate.field).uint32 = { gte: 5, lt: 10 }]; + * + * // value must be greater than or equal to 10 or less than 5 [uint32.gte_lt_exclusive] + * uint32 another_value = 3 [(buf.validate.field).uint32 = { gte: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: uint32 gte = 5; + */ + value: number; + case: "gte"; + } | { case: undefined; value?: undefined }; + + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message is + * generated. + * + * ```proto + * message MyUInt32 { + * // value must be in list [1, 2, 3] + * repeated uint32 value = 1 (buf.validate.field).uint32 = { in: [1, 2, 3] }; + * } + * ``` + * + * @generated from field: repeated uint32 in = 6; + */ + in: number[]; + + /** + * `not_in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error + * message is generated. + * + * ```proto + * message MyUInt32 { + * // value must not be in list [1, 2, 3] + * repeated uint32 value = 1 (buf.validate.field).uint32 = { not_in: [1, 2, 3] }; + * } + * ``` + * + * @generated from field: repeated uint32 not_in = 7; + */ + notIn: number[]; + + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other constraints. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MyUInt32 { + * uint32 value = 1 [ + * (buf.validate.field).uint32.example = 1, + * (buf.validate.field).uint32.example = 10 + * ]; + * } + * ``` + * + * @generated from field: repeated uint32 example = 8; + */ + example: number[]; +}; + +/** + * Describes the message buf.validate.UInt32Rules. + * Use `create(UInt32RulesSchema)` to create a new message. + */ +export const UInt32RulesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 9); + +/** + * UInt64Rules describes the constraints applied to `uint64` values. These + * rules may also be applied to the `google.protobuf.UInt64Value` Well-Known-Type. + * + * @generated from message buf.validate.UInt64Rules + */ +export type UInt64Rules = Message<"buf.validate.UInt64Rules"> & { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MyUInt64 { + * // value must equal 42 + * uint64 value = 1 [(buf.validate.field).uint64.const = 42]; + * } + * ``` + * + * @generated from field: optional uint64 const = 1; + */ + const: bigint; + + /** + * @generated from oneof buf.validate.UInt64Rules.less_than + */ + lessThan: { + /** + * `lt` requires the field value to be less than the specified value (field < + * value). If the field value is equal to or greater than the specified value, + * an error message is generated. + * + * ```proto + * message MyUInt64 { + * // value must be less than 10 + * uint64 value = 1 [(buf.validate.field).uint64.lt = 10]; + * } + * ``` + * + * @generated from field: uint64 lt = 2; + */ + value: bigint; + case: "lt"; + } | { + /** + * `lte` requires the field value to be less than or equal to the specified + * value (field <= value). If the field value is greater than the specified + * value, an error message is generated. + * + * ```proto + * message MyUInt64 { + * // value must be less than or equal to 10 + * uint64 value = 1 [(buf.validate.field).uint64.lte = 10]; + * } + * ``` + * + * @generated from field: uint64 lte = 3; + */ + value: bigint; + case: "lte"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from oneof buf.validate.UInt64Rules.greater_than + */ + greaterThan: { + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyUInt64 { + * // value must be greater than 5 [uint64.gt] + * uint64 value = 1 [(buf.validate.field).uint64.gt = 5]; + * + * // value must be greater than 5 and less than 10 [uint64.gt_lt] + * uint64 other_value = 2 [(buf.validate.field).uint64 = { gt: 5, lt: 10 }]; + * + * // value must be greater than 10 or less than 5 [uint64.gt_lt_exclusive] + * uint64 another_value = 3 [(buf.validate.field).uint64 = { gt: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: uint64 gt = 4; + */ + value: bigint; + case: "gt"; + } | { + /** + * `gte` requires the field value to be greater than or equal to the specified + * value (exclusive). If the value of `gte` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyUInt64 { + * // value must be greater than or equal to 5 [uint64.gte] + * uint64 value = 1 [(buf.validate.field).uint64.gte = 5]; + * + * // value must be greater than or equal to 5 and less than 10 [uint64.gte_lt] + * uint64 other_value = 2 [(buf.validate.field).uint64 = { gte: 5, lt: 10 }]; + * + * // value must be greater than or equal to 10 or less than 5 [uint64.gte_lt_exclusive] + * uint64 another_value = 3 [(buf.validate.field).uint64 = { gte: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: uint64 gte = 5; + */ + value: bigint; + case: "gte"; + } | { case: undefined; value?: undefined }; + + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message is + * generated. + * + * ```proto + * message MyUInt64 { + * // value must be in list [1, 2, 3] + * repeated uint64 value = 1 (buf.validate.field).uint64 = { in: [1, 2, 3] }; + * } + * ``` + * + * @generated from field: repeated uint64 in = 6; + */ + in: bigint[]; + + /** + * `not_in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error + * message is generated. + * + * ```proto + * message MyUInt64 { + * // value must not be in list [1, 2, 3] + * repeated uint64 value = 1 (buf.validate.field).uint64 = { not_in: [1, 2, 3] }; + * } + * ``` + * + * @generated from field: repeated uint64 not_in = 7; + */ + notIn: bigint[]; + + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other constraints. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MyUInt64 { + * uint64 value = 1 [ + * (buf.validate.field).uint64.example = 1, + * (buf.validate.field).uint64.example = -10 + * ]; + * } + * ``` + * + * @generated from field: repeated uint64 example = 8; + */ + example: bigint[]; +}; + +/** + * Describes the message buf.validate.UInt64Rules. + * Use `create(UInt64RulesSchema)` to create a new message. + */ +export const UInt64RulesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 10); + +/** + * SInt32Rules describes the constraints applied to `sint32` values. + * + * @generated from message buf.validate.SInt32Rules + */ +export type SInt32Rules = Message<"buf.validate.SInt32Rules"> & { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MySInt32 { + * // value must equal 42 + * sint32 value = 1 [(buf.validate.field).sint32.const = 42]; + * } + * ``` + * + * @generated from field: optional sint32 const = 1; + */ + const: number; + + /** + * @generated from oneof buf.validate.SInt32Rules.less_than + */ + lessThan: { + /** + * `lt` requires the field value to be less than the specified value (field + * < value). If the field value is equal to or greater than the specified + * value, an error message is generated. + * + * ```proto + * message MySInt32 { + * // value must be less than 10 + * sint32 value = 1 [(buf.validate.field).sint32.lt = 10]; + * } + * ``` + * + * @generated from field: sint32 lt = 2; + */ + value: number; + case: "lt"; + } | { + /** + * `lte` requires the field value to be less than or equal to the specified + * value (field <= value). If the field value is greater than the specified + * value, an error message is generated. + * + * ```proto + * message MySInt32 { + * // value must be less than or equal to 10 + * sint32 value = 1 [(buf.validate.field).sint32.lte = 10]; + * } + * ``` + * + * @generated from field: sint32 lte = 3; + */ + value: number; + case: "lte"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from oneof buf.validate.SInt32Rules.greater_than + */ + greaterThan: { + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MySInt32 { + * // value must be greater than 5 [sint32.gt] + * sint32 value = 1 [(buf.validate.field).sint32.gt = 5]; + * + * // value must be greater than 5 and less than 10 [sint32.gt_lt] + * sint32 other_value = 2 [(buf.validate.field).sint32 = { gt: 5, lt: 10 }]; + * + * // value must be greater than 10 or less than 5 [sint32.gt_lt_exclusive] + * sint32 another_value = 3 [(buf.validate.field).sint32 = { gt: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: sint32 gt = 4; + */ + value: number; + case: "gt"; + } | { + /** + * `gte` requires the field value to be greater than or equal to the specified + * value (exclusive). If the value of `gte` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MySInt32 { + * // value must be greater than or equal to 5 [sint32.gte] + * sint32 value = 1 [(buf.validate.field).sint32.gte = 5]; + * + * // value must be greater than or equal to 5 and less than 10 [sint32.gte_lt] + * sint32 other_value = 2 [(buf.validate.field).sint32 = { gte: 5, lt: 10 }]; + * + * // value must be greater than or equal to 10 or less than 5 [sint32.gte_lt_exclusive] + * sint32 another_value = 3 [(buf.validate.field).sint32 = { gte: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: sint32 gte = 5; + */ + value: number; + case: "gte"; + } | { case: undefined; value?: undefined }; + + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message is + * generated. + * + * ```proto + * message MySInt32 { + * // value must be in list [1, 2, 3] + * repeated sint32 value = 1 (buf.validate.field).sint32 = { in: [1, 2, 3] }; + * } + * ``` + * + * @generated from field: repeated sint32 in = 6; + */ + in: number[]; + + /** + * `not_in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error + * message is generated. + * + * ```proto + * message MySInt32 { + * // value must not be in list [1, 2, 3] + * repeated sint32 value = 1 (buf.validate.field).sint32 = { not_in: [1, 2, 3] }; + * } + * ``` + * + * @generated from field: repeated sint32 not_in = 7; + */ + notIn: number[]; + + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other constraints. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MySInt32 { + * sint32 value = 1 [ + * (buf.validate.field).sint32.example = 1, + * (buf.validate.field).sint32.example = -10 + * ]; + * } + * ``` + * + * @generated from field: repeated sint32 example = 8; + */ + example: number[]; +}; + +/** + * Describes the message buf.validate.SInt32Rules. + * Use `create(SInt32RulesSchema)` to create a new message. + */ +export const SInt32RulesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 11); + +/** + * SInt64Rules describes the constraints applied to `sint64` values. + * + * @generated from message buf.validate.SInt64Rules + */ +export type SInt64Rules = Message<"buf.validate.SInt64Rules"> & { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MySInt64 { + * // value must equal 42 + * sint64 value = 1 [(buf.validate.field).sint64.const = 42]; + * } + * ``` + * + * @generated from field: optional sint64 const = 1; + */ + const: bigint; + + /** + * @generated from oneof buf.validate.SInt64Rules.less_than + */ + lessThan: { + /** + * `lt` requires the field value to be less than the specified value (field + * < value). If the field value is equal to or greater than the specified + * value, an error message is generated. + * + * ```proto + * message MySInt64 { + * // value must be less than 10 + * sint64 value = 1 [(buf.validate.field).sint64.lt = 10]; + * } + * ``` + * + * @generated from field: sint64 lt = 2; + */ + value: bigint; + case: "lt"; + } | { + /** + * `lte` requires the field value to be less than or equal to the specified + * value (field <= value). If the field value is greater than the specified + * value, an error message is generated. + * + * ```proto + * message MySInt64 { + * // value must be less than or equal to 10 + * sint64 value = 1 [(buf.validate.field).sint64.lte = 10]; + * } + * ``` + * + * @generated from field: sint64 lte = 3; + */ + value: bigint; + case: "lte"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from oneof buf.validate.SInt64Rules.greater_than + */ + greaterThan: { + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MySInt64 { + * // value must be greater than 5 [sint64.gt] + * sint64 value = 1 [(buf.validate.field).sint64.gt = 5]; + * + * // value must be greater than 5 and less than 10 [sint64.gt_lt] + * sint64 other_value = 2 [(buf.validate.field).sint64 = { gt: 5, lt: 10 }]; + * + * // value must be greater than 10 or less than 5 [sint64.gt_lt_exclusive] + * sint64 another_value = 3 [(buf.validate.field).sint64 = { gt: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: sint64 gt = 4; + */ + value: bigint; + case: "gt"; + } | { + /** + * `gte` requires the field value to be greater than or equal to the specified + * value (exclusive). If the value of `gte` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MySInt64 { + * // value must be greater than or equal to 5 [sint64.gte] + * sint64 value = 1 [(buf.validate.field).sint64.gte = 5]; + * + * // value must be greater than or equal to 5 and less than 10 [sint64.gte_lt] + * sint64 other_value = 2 [(buf.validate.field).sint64 = { gte: 5, lt: 10 }]; + * + * // value must be greater than or equal to 10 or less than 5 [sint64.gte_lt_exclusive] + * sint64 another_value = 3 [(buf.validate.field).sint64 = { gte: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: sint64 gte = 5; + */ + value: bigint; + case: "gte"; + } | { case: undefined; value?: undefined }; + + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message + * is generated. + * + * ```proto + * message MySInt64 { + * // value must be in list [1, 2, 3] + * repeated sint64 value = 1 (buf.validate.field).sint64 = { in: [1, 2, 3] }; + * } + * ``` + * + * @generated from field: repeated sint64 in = 6; + */ + in: bigint[]; + + /** + * `not_in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error + * message is generated. + * + * ```proto + * message MySInt64 { + * // value must not be in list [1, 2, 3] + * repeated sint64 value = 1 (buf.validate.field).sint64 = { not_in: [1, 2, 3] }; + * } + * ``` + * + * @generated from field: repeated sint64 not_in = 7; + */ + notIn: bigint[]; + + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other constraints. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MySInt64 { + * sint64 value = 1 [ + * (buf.validate.field).sint64.example = 1, + * (buf.validate.field).sint64.example = -10 + * ]; + * } + * ``` + * + * @generated from field: repeated sint64 example = 8; + */ + example: bigint[]; +}; + +/** + * Describes the message buf.validate.SInt64Rules. + * Use `create(SInt64RulesSchema)` to create a new message. + */ +export const SInt64RulesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 12); + +/** + * Fixed32Rules describes the constraints applied to `fixed32` values. + * + * @generated from message buf.validate.Fixed32Rules + */ +export type Fixed32Rules = Message<"buf.validate.Fixed32Rules"> & { + /** + * `const` requires the field value to exactly match the specified value. + * If the field value doesn't match, an error message is generated. + * + * ```proto + * message MyFixed32 { + * // value must equal 42 + * fixed32 value = 1 [(buf.validate.field).fixed32.const = 42]; + * } + * ``` + * + * @generated from field: optional fixed32 const = 1; + */ + const: number; + + /** + * @generated from oneof buf.validate.Fixed32Rules.less_than + */ + lessThan: { + /** + * `lt` requires the field value to be less than the specified value (field < + * value). If the field value is equal to or greater than the specified value, + * an error message is generated. + * + * ```proto + * message MyFixed32 { + * // value must be less than 10 + * fixed32 value = 1 [(buf.validate.field).fixed32.lt = 10]; + * } + * ``` + * + * @generated from field: fixed32 lt = 2; + */ + value: number; + case: "lt"; + } | { + /** + * `lte` requires the field value to be less than or equal to the specified + * value (field <= value). If the field value is greater than the specified + * value, an error message is generated. + * + * ```proto + * message MyFixed32 { + * // value must be less than or equal to 10 + * fixed32 value = 1 [(buf.validate.field).fixed32.lte = 10]; + * } + * ``` + * + * @generated from field: fixed32 lte = 3; + */ + value: number; + case: "lte"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from oneof buf.validate.Fixed32Rules.greater_than + */ + greaterThan: { + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyFixed32 { + * // value must be greater than 5 [fixed32.gt] + * fixed32 value = 1 [(buf.validate.field).fixed32.gt = 5]; + * + * // value must be greater than 5 and less than 10 [fixed32.gt_lt] + * fixed32 other_value = 2 [(buf.validate.field).fixed32 = { gt: 5, lt: 10 }]; + * + * // value must be greater than 10 or less than 5 [fixed32.gt_lt_exclusive] + * fixed32 another_value = 3 [(buf.validate.field).fixed32 = { gt: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: fixed32 gt = 4; + */ + value: number; + case: "gt"; + } | { + /** + * `gte` requires the field value to be greater than or equal to the specified + * value (exclusive). If the value of `gte` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyFixed32 { + * // value must be greater than or equal to 5 [fixed32.gte] + * fixed32 value = 1 [(buf.validate.field).fixed32.gte = 5]; + * + * // value must be greater than or equal to 5 and less than 10 [fixed32.gte_lt] + * fixed32 other_value = 2 [(buf.validate.field).fixed32 = { gte: 5, lt: 10 }]; + * + * // value must be greater than or equal to 10 or less than 5 [fixed32.gte_lt_exclusive] + * fixed32 another_value = 3 [(buf.validate.field).fixed32 = { gte: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: fixed32 gte = 5; + */ + value: number; + case: "gte"; + } | { case: undefined; value?: undefined }; + + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message + * is generated. + * + * ```proto + * message MyFixed32 { + * // value must be in list [1, 2, 3] + * repeated fixed32 value = 1 (buf.validate.field).fixed32 = { in: [1, 2, 3] }; + * } + * ``` + * + * @generated from field: repeated fixed32 in = 6; + */ + in: number[]; + + /** + * `not_in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error + * message is generated. + * + * ```proto + * message MyFixed32 { + * // value must not be in list [1, 2, 3] + * repeated fixed32 value = 1 (buf.validate.field).fixed32 = { not_in: [1, 2, 3] }; + * } + * ``` + * + * @generated from field: repeated fixed32 not_in = 7; + */ + notIn: number[]; + + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other constraints. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MyFixed32 { + * fixed32 value = 1 [ + * (buf.validate.field).fixed32.example = 1, + * (buf.validate.field).fixed32.example = 2 + * ]; + * } + * ``` + * + * @generated from field: repeated fixed32 example = 8; + */ + example: number[]; +}; + +/** + * Describes the message buf.validate.Fixed32Rules. + * Use `create(Fixed32RulesSchema)` to create a new message. + */ +export const Fixed32RulesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 13); + +/** + * Fixed64Rules describes the constraints applied to `fixed64` values. + * + * @generated from message buf.validate.Fixed64Rules + */ +export type Fixed64Rules = Message<"buf.validate.Fixed64Rules"> & { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MyFixed64 { + * // value must equal 42 + * fixed64 value = 1 [(buf.validate.field).fixed64.const = 42]; + * } + * ``` + * + * @generated from field: optional fixed64 const = 1; + */ + const: bigint; + + /** + * @generated from oneof buf.validate.Fixed64Rules.less_than + */ + lessThan: { + /** + * `lt` requires the field value to be less than the specified value (field < + * value). If the field value is equal to or greater than the specified value, + * an error message is generated. + * + * ```proto + * message MyFixed64 { + * // value must be less than 10 + * fixed64 value = 1 [(buf.validate.field).fixed64.lt = 10]; + * } + * ``` + * + * @generated from field: fixed64 lt = 2; + */ + value: bigint; + case: "lt"; + } | { + /** + * `lte` requires the field value to be less than or equal to the specified + * value (field <= value). If the field value is greater than the specified + * value, an error message is generated. + * + * ```proto + * message MyFixed64 { + * // value must be less than or equal to 10 + * fixed64 value = 1 [(buf.validate.field).fixed64.lte = 10]; + * } + * ``` + * + * @generated from field: fixed64 lte = 3; + */ + value: bigint; + case: "lte"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from oneof buf.validate.Fixed64Rules.greater_than + */ + greaterThan: { + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyFixed64 { + * // value must be greater than 5 [fixed64.gt] + * fixed64 value = 1 [(buf.validate.field).fixed64.gt = 5]; + * + * // value must be greater than 5 and less than 10 [fixed64.gt_lt] + * fixed64 other_value = 2 [(buf.validate.field).fixed64 = { gt: 5, lt: 10 }]; + * + * // value must be greater than 10 or less than 5 [fixed64.gt_lt_exclusive] + * fixed64 another_value = 3 [(buf.validate.field).fixed64 = { gt: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: fixed64 gt = 4; + */ + value: bigint; + case: "gt"; + } | { + /** + * `gte` requires the field value to be greater than or equal to the specified + * value (exclusive). If the value of `gte` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyFixed64 { + * // value must be greater than or equal to 5 [fixed64.gte] + * fixed64 value = 1 [(buf.validate.field).fixed64.gte = 5]; + * + * // value must be greater than or equal to 5 and less than 10 [fixed64.gte_lt] + * fixed64 other_value = 2 [(buf.validate.field).fixed64 = { gte: 5, lt: 10 }]; + * + * // value must be greater than or equal to 10 or less than 5 [fixed64.gte_lt_exclusive] + * fixed64 another_value = 3 [(buf.validate.field).fixed64 = { gte: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: fixed64 gte = 5; + */ + value: bigint; + case: "gte"; + } | { case: undefined; value?: undefined }; + + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message is + * generated. + * + * ```proto + * message MyFixed64 { + * // value must be in list [1, 2, 3] + * repeated fixed64 value = 1 (buf.validate.field).fixed64 = { in: [1, 2, 3] }; + * } + * ``` + * + * @generated from field: repeated fixed64 in = 6; + */ + in: bigint[]; + + /** + * `not_in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error + * message is generated. + * + * ```proto + * message MyFixed64 { + * // value must not be in list [1, 2, 3] + * repeated fixed64 value = 1 (buf.validate.field).fixed64 = { not_in: [1, 2, 3] }; + * } + * ``` + * + * @generated from field: repeated fixed64 not_in = 7; + */ + notIn: bigint[]; + + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other constraints. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MyFixed64 { + * fixed64 value = 1 [ + * (buf.validate.field).fixed64.example = 1, + * (buf.validate.field).fixed64.example = 2 + * ]; + * } + * ``` + * + * @generated from field: repeated fixed64 example = 8; + */ + example: bigint[]; +}; + +/** + * Describes the message buf.validate.Fixed64Rules. + * Use `create(Fixed64RulesSchema)` to create a new message. + */ +export const Fixed64RulesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 14); + +/** + * SFixed32Rules describes the constraints applied to `fixed32` values. + * + * @generated from message buf.validate.SFixed32Rules + */ +export type SFixed32Rules = Message<"buf.validate.SFixed32Rules"> & { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MySFixed32 { + * // value must equal 42 + * sfixed32 value = 1 [(buf.validate.field).sfixed32.const = 42]; + * } + * ``` + * + * @generated from field: optional sfixed32 const = 1; + */ + const: number; + + /** + * @generated from oneof buf.validate.SFixed32Rules.less_than + */ + lessThan: { + /** + * `lt` requires the field value to be less than the specified value (field < + * value). If the field value is equal to or greater than the specified value, + * an error message is generated. + * + * ```proto + * message MySFixed32 { + * // value must be less than 10 + * sfixed32 value = 1 [(buf.validate.field).sfixed32.lt = 10]; + * } + * ``` + * + * @generated from field: sfixed32 lt = 2; + */ + value: number; + case: "lt"; + } | { + /** + * `lte` requires the field value to be less than or equal to the specified + * value (field <= value). If the field value is greater than the specified + * value, an error message is generated. + * + * ```proto + * message MySFixed32 { + * // value must be less than or equal to 10 + * sfixed32 value = 1 [(buf.validate.field).sfixed32.lte = 10]; + * } + * ``` + * + * @generated from field: sfixed32 lte = 3; + */ + value: number; + case: "lte"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from oneof buf.validate.SFixed32Rules.greater_than + */ + greaterThan: { + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MySFixed32 { + * // value must be greater than 5 [sfixed32.gt] + * sfixed32 value = 1 [(buf.validate.field).sfixed32.gt = 5]; + * + * // value must be greater than 5 and less than 10 [sfixed32.gt_lt] + * sfixed32 other_value = 2 [(buf.validate.field).sfixed32 = { gt: 5, lt: 10 }]; + * + * // value must be greater than 10 or less than 5 [sfixed32.gt_lt_exclusive] + * sfixed32 another_value = 3 [(buf.validate.field).sfixed32 = { gt: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: sfixed32 gt = 4; + */ + value: number; + case: "gt"; + } | { + /** + * `gte` requires the field value to be greater than or equal to the specified + * value (exclusive). If the value of `gte` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MySFixed32 { + * // value must be greater than or equal to 5 [sfixed32.gte] + * sfixed32 value = 1 [(buf.validate.field).sfixed32.gte = 5]; + * + * // value must be greater than or equal to 5 and less than 10 [sfixed32.gte_lt] + * sfixed32 other_value = 2 [(buf.validate.field).sfixed32 = { gte: 5, lt: 10 }]; + * + * // value must be greater than or equal to 10 or less than 5 [sfixed32.gte_lt_exclusive] + * sfixed32 another_value = 3 [(buf.validate.field).sfixed32 = { gte: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: sfixed32 gte = 5; + */ + value: number; + case: "gte"; + } | { case: undefined; value?: undefined }; + + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message is + * generated. + * + * ```proto + * message MySFixed32 { + * // value must be in list [1, 2, 3] + * repeated sfixed32 value = 1 (buf.validate.field).sfixed32 = { in: [1, 2, 3] }; + * } + * ``` + * + * @generated from field: repeated sfixed32 in = 6; + */ + in: number[]; + + /** + * `not_in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error + * message is generated. + * + * ```proto + * message MySFixed32 { + * // value must not be in list [1, 2, 3] + * repeated sfixed32 value = 1 (buf.validate.field).sfixed32 = { not_in: [1, 2, 3] }; + * } + * ``` + * + * @generated from field: repeated sfixed32 not_in = 7; + */ + notIn: number[]; + + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other constraints. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MySFixed32 { + * sfixed32 value = 1 [ + * (buf.validate.field).sfixed32.example = 1, + * (buf.validate.field).sfixed32.example = 2 + * ]; + * } + * ``` + * + * @generated from field: repeated sfixed32 example = 8; + */ + example: number[]; +}; + +/** + * Describes the message buf.validate.SFixed32Rules. + * Use `create(SFixed32RulesSchema)` to create a new message. + */ +export const SFixed32RulesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 15); + +/** + * SFixed64Rules describes the constraints applied to `fixed64` values. + * + * @generated from message buf.validate.SFixed64Rules + */ +export type SFixed64Rules = Message<"buf.validate.SFixed64Rules"> & { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MySFixed64 { + * // value must equal 42 + * sfixed64 value = 1 [(buf.validate.field).sfixed64.const = 42]; + * } + * ``` + * + * @generated from field: optional sfixed64 const = 1; + */ + const: bigint; + + /** + * @generated from oneof buf.validate.SFixed64Rules.less_than + */ + lessThan: { + /** + * `lt` requires the field value to be less than the specified value (field < + * value). If the field value is equal to or greater than the specified value, + * an error message is generated. + * + * ```proto + * message MySFixed64 { + * // value must be less than 10 + * sfixed64 value = 1 [(buf.validate.field).sfixed64.lt = 10]; + * } + * ``` + * + * @generated from field: sfixed64 lt = 2; + */ + value: bigint; + case: "lt"; + } | { + /** + * `lte` requires the field value to be less than or equal to the specified + * value (field <= value). If the field value is greater than the specified + * value, an error message is generated. + * + * ```proto + * message MySFixed64 { + * // value must be less than or equal to 10 + * sfixed64 value = 1 [(buf.validate.field).sfixed64.lte = 10]; + * } + * ``` + * + * @generated from field: sfixed64 lte = 3; + */ + value: bigint; + case: "lte"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from oneof buf.validate.SFixed64Rules.greater_than + */ + greaterThan: { + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MySFixed64 { + * // value must be greater than 5 [sfixed64.gt] + * sfixed64 value = 1 [(buf.validate.field).sfixed64.gt = 5]; + * + * // value must be greater than 5 and less than 10 [sfixed64.gt_lt] + * sfixed64 other_value = 2 [(buf.validate.field).sfixed64 = { gt: 5, lt: 10 }]; + * + * // value must be greater than 10 or less than 5 [sfixed64.gt_lt_exclusive] + * sfixed64 another_value = 3 [(buf.validate.field).sfixed64 = { gt: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: sfixed64 gt = 4; + */ + value: bigint; + case: "gt"; + } | { + /** + * `gte` requires the field value to be greater than or equal to the specified + * value (exclusive). If the value of `gte` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MySFixed64 { + * // value must be greater than or equal to 5 [sfixed64.gte] + * sfixed64 value = 1 [(buf.validate.field).sfixed64.gte = 5]; + * + * // value must be greater than or equal to 5 and less than 10 [sfixed64.gte_lt] + * sfixed64 other_value = 2 [(buf.validate.field).sfixed64 = { gte: 5, lt: 10 }]; + * + * // value must be greater than or equal to 10 or less than 5 [sfixed64.gte_lt_exclusive] + * sfixed64 another_value = 3 [(buf.validate.field).sfixed64 = { gte: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: sfixed64 gte = 5; + */ + value: bigint; + case: "gte"; + } | { case: undefined; value?: undefined }; + + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message is + * generated. + * + * ```proto + * message MySFixed64 { + * // value must be in list [1, 2, 3] + * repeated sfixed64 value = 1 (buf.validate.field).sfixed64 = { in: [1, 2, 3] }; + * } + * ``` + * + * @generated from field: repeated sfixed64 in = 6; + */ + in: bigint[]; + + /** + * `not_in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error + * message is generated. + * + * ```proto + * message MySFixed64 { + * // value must not be in list [1, 2, 3] + * repeated sfixed64 value = 1 (buf.validate.field).sfixed64 = { not_in: [1, 2, 3] }; + * } + * ``` + * + * @generated from field: repeated sfixed64 not_in = 7; + */ + notIn: bigint[]; + + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other constraints. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MySFixed64 { + * sfixed64 value = 1 [ + * (buf.validate.field).sfixed64.example = 1, + * (buf.validate.field).sfixed64.example = 2 + * ]; + * } + * ``` + * + * @generated from field: repeated sfixed64 example = 8; + */ + example: bigint[]; +}; + +/** + * Describes the message buf.validate.SFixed64Rules. + * Use `create(SFixed64RulesSchema)` to create a new message. + */ +export const SFixed64RulesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 16); + +/** + * BoolRules describes the constraints applied to `bool` values. These rules + * may also be applied to the `google.protobuf.BoolValue` Well-Known-Type. + * + * @generated from message buf.validate.BoolRules + */ +export type BoolRules = Message<"buf.validate.BoolRules"> & { + /** + * `const` requires the field value to exactly match the specified boolean value. + * If the field value doesn't match, an error message is generated. + * + * ```proto + * message MyBool { + * // value must equal true + * bool value = 1 [(buf.validate.field).bool.const = true]; + * } + * ``` + * + * @generated from field: optional bool const = 1; + */ + const: boolean; + + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other constraints. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MyBool { + * bool value = 1 [ + * (buf.validate.field).bool.example = 1, + * (buf.validate.field).bool.example = 2 + * ]; + * } + * ``` + * + * @generated from field: repeated bool example = 2; + */ + example: boolean[]; +}; + +/** + * Describes the message buf.validate.BoolRules. + * Use `create(BoolRulesSchema)` to create a new message. + */ +export const BoolRulesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 17); + +/** + * StringRules describes the constraints applied to `string` values These + * rules may also be applied to the `google.protobuf.StringValue` Well-Known-Type. + * + * @generated from message buf.validate.StringRules + */ +export type StringRules = Message<"buf.validate.StringRules"> & { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MyString { + * // value must equal `hello` + * string value = 1 [(buf.validate.field).string.const = "hello"]; + * } + * ``` + * + * @generated from field: optional string const = 1; + */ + const: string; + + /** + * `len` dictates that the field value must have the specified + * number of characters (Unicode code points), which may differ from the number + * of bytes in the string. If the field value does not meet the specified + * length, an error message will be generated. + * + * ```proto + * message MyString { + * // value length must be 5 characters + * string value = 1 [(buf.validate.field).string.len = 5]; + * } + * ``` + * + * @generated from field: optional uint64 len = 19; + */ + len: bigint; + + /** + * `min_len` specifies that the field value must have at least the specified + * number of characters (Unicode code points), which may differ from the number + * of bytes in the string. If the field value contains fewer characters, an error + * message will be generated. + * + * ```proto + * message MyString { + * // value length must be at least 3 characters + * string value = 1 [(buf.validate.field).string.min_len = 3]; + * } + * ``` + * + * @generated from field: optional uint64 min_len = 2; + */ + minLen: bigint; + + /** + * `max_len` specifies that the field value must have no more than the specified + * number of characters (Unicode code points), which may differ from the + * number of bytes in the string. If the field value contains more characters, + * an error message will be generated. + * + * ```proto + * message MyString { + * // value length must be at most 10 characters + * string value = 1 [(buf.validate.field).string.max_len = 10]; + * } + * ``` + * + * @generated from field: optional uint64 max_len = 3; + */ + maxLen: bigint; + + /** + * `len_bytes` dictates that the field value must have the specified number of + * bytes. If the field value does not match the specified length in bytes, + * an error message will be generated. + * + * ```proto + * message MyString { + * // value length must be 6 bytes + * string value = 1 [(buf.validate.field).string.len_bytes = 6]; + * } + * ``` + * + * @generated from field: optional uint64 len_bytes = 20; + */ + lenBytes: bigint; + + /** + * `min_bytes` specifies that the field value must have at least the specified + * number of bytes. If the field value contains fewer bytes, an error message + * will be generated. + * + * ```proto + * message MyString { + * // value length must be at least 4 bytes + * string value = 1 [(buf.validate.field).string.min_bytes = 4]; + * } + * + * ``` + * + * @generated from field: optional uint64 min_bytes = 4; + */ + minBytes: bigint; + + /** + * `max_bytes` specifies that the field value must have no more than the + * specified number of bytes. If the field value contains more bytes, an + * error message will be generated. + * + * ```proto + * message MyString { + * // value length must be at most 8 bytes + * string value = 1 [(buf.validate.field).string.max_bytes = 8]; + * } + * ``` + * + * @generated from field: optional uint64 max_bytes = 5; + */ + maxBytes: bigint; + + /** + * `pattern` specifies that the field value must match the specified + * regular expression (RE2 syntax), with the expression provided without any + * delimiters. If the field value doesn't match the regular expression, an + * error message will be generated. + * + * ```proto + * message MyString { + * // value does not match regex pattern `^[a-zA-Z]//$` + * string value = 1 [(buf.validate.field).string.pattern = "^[a-zA-Z]//$"]; + * } + * ``` + * + * @generated from field: optional string pattern = 6; + */ + pattern: string; + + /** + * `prefix` specifies that the field value must have the + * specified substring at the beginning of the string. If the field value + * doesn't start with the specified prefix, an error message will be + * generated. + * + * ```proto + * message MyString { + * // value does not have prefix `pre` + * string value = 1 [(buf.validate.field).string.prefix = "pre"]; + * } + * ``` + * + * @generated from field: optional string prefix = 7; + */ + prefix: string; + + /** + * `suffix` specifies that the field value must have the + * specified substring at the end of the string. If the field value doesn't + * end with the specified suffix, an error message will be generated. + * + * ```proto + * message MyString { + * // value does not have suffix `post` + * string value = 1 [(buf.validate.field).string.suffix = "post"]; + * } + * ``` + * + * @generated from field: optional string suffix = 8; + */ + suffix: string; + + /** + * `contains` specifies that the field value must have the + * specified substring anywhere in the string. If the field value doesn't + * contain the specified substring, an error message will be generated. + * + * ```proto + * message MyString { + * // value does not contain substring `inside`. + * string value = 1 [(buf.validate.field).string.contains = "inside"]; + * } + * ``` + * + * @generated from field: optional string contains = 9; + */ + contains: string; + + /** + * `not_contains` specifies that the field value must not have the + * specified substring anywhere in the string. If the field value contains + * the specified substring, an error message will be generated. + * + * ```proto + * message MyString { + * // value contains substring `inside`. + * string value = 1 [(buf.validate.field).string.not_contains = "inside"]; + * } + * ``` + * + * @generated from field: optional string not_contains = 23; + */ + notContains: string; + + /** + * `in` specifies that the field value must be equal to one of the specified + * values. If the field value isn't one of the specified values, an error + * message will be generated. + * + * ```proto + * message MyString { + * // value must be in list ["apple", "banana"] + * repeated string value = 1 [(buf.validate.field).string.in = "apple", (buf.validate.field).string.in = "banana"]; + * } + * ``` + * + * @generated from field: repeated string in = 10; + */ + in: string[]; + + /** + * `not_in` specifies that the field value cannot be equal to any + * of the specified values. If the field value is one of the specified values, + * an error message will be generated. + * ```proto + * message MyString { + * // value must not be in list ["orange", "grape"] + * repeated string value = 1 [(buf.validate.field).string.not_in = "orange", (buf.validate.field).string.not_in = "grape"]; + * } + * ``` + * + * @generated from field: repeated string not_in = 11; + */ + notIn: string[]; + + /** + * `WellKnown` rules provide advanced constraints against common string + * patterns + * + * @generated from oneof buf.validate.StringRules.well_known + */ + wellKnown: { + /** + * `email` specifies that the field value must be a valid email address + * (addr-spec only) as defined by [RFC 5322](https://tools.ietf.org/html/rfc5322#section-3.4.1). + * If the field value isn't a valid email address, an error message will be generated. + * + * ```proto + * message MyString { + * // value must be a valid email address + * string value = 1 [(buf.validate.field).string.email = true]; + * } + * ``` + * + * @generated from field: bool email = 12; + */ + value: boolean; + case: "email"; + } | { + /** + * `hostname` specifies that the field value must be a valid + * hostname as defined by [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.5). This constraint doesn't support + * internationalized domain names (IDNs). If the field value isn't a + * valid hostname, an error message will be generated. + * + * ```proto + * message MyString { + * // value must be a valid hostname + * string value = 1 [(buf.validate.field).string.hostname = true]; + * } + * ``` + * + * @generated from field: bool hostname = 13; + */ + value: boolean; + case: "hostname"; + } | { + /** + * `ip` specifies that the field value must be a valid IP + * (v4 or v6) address, without surrounding square brackets for IPv6 addresses. + * If the field value isn't a valid IP address, an error message will be + * generated. + * + * ```proto + * message MyString { + * // value must be a valid IP address + * string value = 1 [(buf.validate.field).string.ip = true]; + * } + * ``` + * + * @generated from field: bool ip = 14; + */ + value: boolean; + case: "ip"; + } | { + /** + * `ipv4` specifies that the field value must be a valid IPv4 + * address. If the field value isn't a valid IPv4 address, an error message + * will be generated. + * + * ```proto + * message MyString { + * // value must be a valid IPv4 address + * string value = 1 [(buf.validate.field).string.ipv4 = true]; + * } + * ``` + * + * @generated from field: bool ipv4 = 15; + */ + value: boolean; + case: "ipv4"; + } | { + /** + * `ipv6` specifies that the field value must be a valid + * IPv6 address, without surrounding square brackets. If the field value is + * not a valid IPv6 address, an error message will be generated. + * + * ```proto + * message MyString { + * // value must be a valid IPv6 address + * string value = 1 [(buf.validate.field).string.ipv6 = true]; + * } + * ``` + * + * @generated from field: bool ipv6 = 16; + */ + value: boolean; + case: "ipv6"; + } | { + /** + * `uri` specifies that the field value must be a valid, + * absolute URI as defined by [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3). If the field value isn't a valid, + * absolute URI, an error message will be generated. + * + * ```proto + * message MyString { + * // value must be a valid URI + * string value = 1 [(buf.validate.field).string.uri = true]; + * } + * ``` + * + * @generated from field: bool uri = 17; + */ + value: boolean; + case: "uri"; + } | { + /** + * `uri_ref` specifies that the field value must be a valid URI + * as defined by [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3) and may be either relative or absolute. If the + * field value isn't a valid URI, an error message will be generated. + * + * ```proto + * message MyString { + * // value must be a valid URI + * string value = 1 [(buf.validate.field).string.uri_ref = true]; + * } + * ``` + * + * @generated from field: bool uri_ref = 18; + */ + value: boolean; + case: "uriRef"; + } | { + /** + * `address` specifies that the field value must be either a valid hostname + * as defined by [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.5) + * (which doesn't support internationalized domain names or IDNs) or a valid + * IP (v4 or v6). If the field value isn't a valid hostname or IP, an error + * message will be generated. + * + * ```proto + * message MyString { + * // value must be a valid hostname, or ip address + * string value = 1 [(buf.validate.field).string.address = true]; + * } + * ``` + * + * @generated from field: bool address = 21; + */ + value: boolean; + case: "address"; + } | { + /** + * `uuid` specifies that the field value must be a valid UUID as defined by + * [RFC 4122](https://tools.ietf.org/html/rfc4122#section-4.1.2). If the + * field value isn't a valid UUID, an error message will be generated. + * + * ```proto + * message MyString { + * // value must be a valid UUID + * string value = 1 [(buf.validate.field).string.uuid = true]; + * } + * ``` + * + * @generated from field: bool uuid = 22; + */ + value: boolean; + case: "uuid"; + } | { + /** + * `tuuid` (trimmed UUID) specifies that the field value must be a valid UUID as + * defined by [RFC 4122](https://tools.ietf.org/html/rfc4122#section-4.1.2) with all dashes + * omitted. If the field value isn't a valid UUID without dashes, an error message + * will be generated. + * + * ```proto + * message MyString { + * // value must be a valid trimmed UUID + * string value = 1 [(buf.validate.field).string.tuuid = true]; + * } + * ``` + * + * @generated from field: bool tuuid = 33; + */ + value: boolean; + case: "tuuid"; + } | { + /** + * `ip_with_prefixlen` specifies that the field value must be a valid IP (v4 or v6) + * address with prefix length. If the field value isn't a valid IP with prefix + * length, an error message will be generated. + * + * + * ```proto + * message MyString { + * // value must be a valid IP with prefix length + * string value = 1 [(buf.validate.field).string.ip_with_prefixlen = true]; + * } + * ``` + * + * @generated from field: bool ip_with_prefixlen = 26; + */ + value: boolean; + case: "ipWithPrefixlen"; + } | { + /** + * `ipv4_with_prefixlen` specifies that the field value must be a valid + * IPv4 address with prefix. + * If the field value isn't a valid IPv4 address with prefix length, + * an error message will be generated. + * + * ```proto + * message MyString { + * // value must be a valid IPv4 address with prefix length + * string value = 1 [(buf.validate.field).string.ipv4_with_prefixlen = true]; + * } + * ``` + * + * @generated from field: bool ipv4_with_prefixlen = 27; + */ + value: boolean; + case: "ipv4WithPrefixlen"; + } | { + /** + * `ipv6_with_prefixlen` specifies that the field value must be a valid + * IPv6 address with prefix length. + * If the field value is not a valid IPv6 address with prefix length, + * an error message will be generated. + * + * ```proto + * message MyString { + * // value must be a valid IPv6 address prefix length + * string value = 1 [(buf.validate.field).string.ipv6_with_prefixlen = true]; + * } + * ``` + * + * @generated from field: bool ipv6_with_prefixlen = 28; + */ + value: boolean; + case: "ipv6WithPrefixlen"; + } | { + /** + * `ip_prefix` specifies that the field value must be a valid IP (v4 or v6) prefix. + * If the field value isn't a valid IP prefix, an error message will be + * generated. The prefix must have all zeros for the masked bits of the prefix (e.g., + * `127.0.0.0/16`, not `127.0.0.1/16`). + * + * ```proto + * message MyString { + * // value must be a valid IP prefix + * string value = 1 [(buf.validate.field).string.ip_prefix = true]; + * } + * ``` + * + * @generated from field: bool ip_prefix = 29; + */ + value: boolean; + case: "ipPrefix"; + } | { + /** + * `ipv4_prefix` specifies that the field value must be a valid IPv4 + * prefix. If the field value isn't a valid IPv4 prefix, an error message + * will be generated. The prefix must have all zeros for the masked bits of + * the prefix (e.g., `127.0.0.0/16`, not `127.0.0.1/16`). + * + * ```proto + * message MyString { + * // value must be a valid IPv4 prefix + * string value = 1 [(buf.validate.field).string.ipv4_prefix = true]; + * } + * ``` + * + * @generated from field: bool ipv4_prefix = 30; + */ + value: boolean; + case: "ipv4Prefix"; + } | { + /** + * `ipv6_prefix` specifies that the field value must be a valid IPv6 prefix. + * If the field value is not a valid IPv6 prefix, an error message will be + * generated. The prefix must have all zeros for the masked bits of the prefix + * (e.g., `2001:db8::/48`, not `2001:db8::1/48`). + * + * ```proto + * message MyString { + * // value must be a valid IPv6 prefix + * string value = 1 [(buf.validate.field).string.ipv6_prefix = true]; + * } + * ``` + * + * @generated from field: bool ipv6_prefix = 31; + */ + value: boolean; + case: "ipv6Prefix"; + } | { + /** + * `host_and_port` specifies the field value must be a valid host and port + * pair. The host must be a valid hostname or IP address while the port + * must be in the range of 0-65535, inclusive. IPv6 addresses must be delimited + * with square brackets (e.g., `[::1]:1234`). + * + * @generated from field: bool host_and_port = 32; + */ + value: boolean; + case: "hostAndPort"; + } | { + /** + * `well_known_regex` specifies a common well-known pattern + * defined as a regex. If the field value doesn't match the well-known + * regex, an error message will be generated. + * + * ```proto + * message MyString { + * // value must be a valid HTTP header value + * string value = 1 [(buf.validate.field).string.well_known_regex = KNOWN_REGEX_HTTP_HEADER_VALUE]; + * } + * ``` + * + * #### KnownRegex + * + * `well_known_regex` contains some well-known patterns. + * + * | Name | Number | Description | + * |-------------------------------|--------|-------------------------------------------| + * | KNOWN_REGEX_UNSPECIFIED | 0 | | + * | KNOWN_REGEX_HTTP_HEADER_NAME | 1 | HTTP header name as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2) | + * | KNOWN_REGEX_HTTP_HEADER_VALUE | 2 | HTTP header value as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2.4) | + * + * @generated from field: buf.validate.KnownRegex well_known_regex = 24; + */ + value: KnownRegex; + case: "wellKnownRegex"; + } | { case: undefined; value?: undefined }; + + /** + * This applies to regexes `HTTP_HEADER_NAME` and `HTTP_HEADER_VALUE` to + * enable strict header validation. By default, this is true, and HTTP header + * validations are [RFC-compliant](https://tools.ietf.org/html/rfc7230#section-3). Setting to false will enable looser + * validations that only disallow `\r\n\0` characters, which can be used to + * bypass header matching rules. + * + * ```proto + * message MyString { + * // The field `value` must have be a valid HTTP headers, but not enforced with strict rules. + * string value = 1 [(buf.validate.field).string.strict = false]; + * } + * ``` + * + * @generated from field: optional bool strict = 25; + */ + strict: boolean; + + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other constraints. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MyString { + * string value = 1 [ + * (buf.validate.field).string.example = "hello", + * (buf.validate.field).string.example = "world" + * ]; + * } + * ``` + * + * @generated from field: repeated string example = 34; + */ + example: string[]; +}; + +/** + * Describes the message buf.validate.StringRules. + * Use `create(StringRulesSchema)` to create a new message. + */ +export const StringRulesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 18); + +/** + * BytesRules describe the constraints applied to `bytes` values. These rules + * may also be applied to the `google.protobuf.BytesValue` Well-Known-Type. + * + * @generated from message buf.validate.BytesRules + */ +export type BytesRules = Message<"buf.validate.BytesRules"> & { + /** + * `const` requires the field value to exactly match the specified bytes + * value. If the field value doesn't match, an error message is generated. + * + * ```proto + * message MyBytes { + * // value must be "\x01\x02\x03\x04" + * bytes value = 1 [(buf.validate.field).bytes.const = "\x01\x02\x03\x04"]; + * } + * ``` + * + * @generated from field: optional bytes const = 1; + */ + const: Uint8Array; + + /** + * `len` requires the field value to have the specified length in bytes. + * If the field value doesn't match, an error message is generated. + * + * ```proto + * message MyBytes { + * // value length must be 4 bytes. + * optional bytes value = 1 [(buf.validate.field).bytes.len = 4]; + * } + * ``` + * + * @generated from field: optional uint64 len = 13; + */ + len: bigint; + + /** + * `min_len` requires the field value to have at least the specified minimum + * length in bytes. + * If the field value doesn't meet the requirement, an error message is generated. + * + * ```proto + * message MyBytes { + * // value length must be at least 2 bytes. + * optional bytes value = 1 [(buf.validate.field).bytes.min_len = 2]; + * } + * ``` + * + * @generated from field: optional uint64 min_len = 2; + */ + minLen: bigint; + + /** + * `max_len` requires the field value to have at most the specified maximum + * length in bytes. + * If the field value exceeds the requirement, an error message is generated. + * + * ```proto + * message MyBytes { + * // value must be at most 6 bytes. + * optional bytes value = 1 [(buf.validate.field).bytes.max_len = 6]; + * } + * ``` + * + * @generated from field: optional uint64 max_len = 3; + */ + maxLen: bigint; + + /** + * `pattern` requires the field value to match the specified regular + * expression ([RE2 syntax](https://github.com/google/re2/wiki/Syntax)). + * The value of the field must be valid UTF-8 or validation will fail with a + * runtime error. + * If the field value doesn't match the pattern, an error message is generated. + * + * ```proto + * message MyBytes { + * // value must match regex pattern "^[a-zA-Z0-9]+$". + * optional bytes value = 1 [(buf.validate.field).bytes.pattern = "^[a-zA-Z0-9]+$"]; + * } + * ``` + * + * @generated from field: optional string pattern = 4; + */ + pattern: string; + + /** + * `prefix` requires the field value to have the specified bytes at the + * beginning of the string. + * If the field value doesn't meet the requirement, an error message is generated. + * + * ```proto + * message MyBytes { + * // value does not have prefix \x01\x02 + * optional bytes value = 1 [(buf.validate.field).bytes.prefix = "\x01\x02"]; + * } + * ``` + * + * @generated from field: optional bytes prefix = 5; + */ + prefix: Uint8Array; + + /** + * `suffix` requires the field value to have the specified bytes at the end + * of the string. + * If the field value doesn't meet the requirement, an error message is generated. + * + * ```proto + * message MyBytes { + * // value does not have suffix \x03\x04 + * optional bytes value = 1 [(buf.validate.field).bytes.suffix = "\x03\x04"]; + * } + * ``` + * + * @generated from field: optional bytes suffix = 6; + */ + suffix: Uint8Array; + + /** + * `contains` requires the field value to have the specified bytes anywhere in + * the string. + * If the field value doesn't meet the requirement, an error message is generated. + * + * ```protobuf + * message MyBytes { + * // value does not contain \x02\x03 + * optional bytes value = 1 [(buf.validate.field).bytes.contains = "\x02\x03"]; + * } + * ``` + * + * @generated from field: optional bytes contains = 7; + */ + contains: Uint8Array; + + /** + * `in` requires the field value to be equal to one of the specified + * values. If the field value doesn't match any of the specified values, an + * error message is generated. + * + * ```protobuf + * message MyBytes { + * // value must in ["\x01\x02", "\x02\x03", "\x03\x04"] + * optional bytes value = 1 [(buf.validate.field).bytes.in = {"\x01\x02", "\x02\x03", "\x03\x04"}]; + * } + * ``` + * + * @generated from field: repeated bytes in = 8; + */ + in: Uint8Array[]; + + /** + * `not_in` requires the field value to be not equal to any of the specified + * values. + * If the field value matches any of the specified values, an error message is + * generated. + * + * ```proto + * message MyBytes { + * // value must not in ["\x01\x02", "\x02\x03", "\x03\x04"] + * optional bytes value = 1 [(buf.validate.field).bytes.not_in = {"\x01\x02", "\x02\x03", "\x03\x04"}]; + * } + * ``` + * + * @generated from field: repeated bytes not_in = 9; + */ + notIn: Uint8Array[]; + + /** + * WellKnown rules provide advanced constraints against common byte + * patterns + * + * @generated from oneof buf.validate.BytesRules.well_known + */ + wellKnown: { + /** + * `ip` ensures that the field `value` is a valid IP address (v4 or v6) in byte format. + * If the field value doesn't meet this constraint, an error message is generated. + * + * ```proto + * message MyBytes { + * // value must be a valid IP address + * optional bytes value = 1 [(buf.validate.field).bytes.ip = true]; + * } + * ``` + * + * @generated from field: bool ip = 10; + */ + value: boolean; + case: "ip"; + } | { + /** + * `ipv4` ensures that the field `value` is a valid IPv4 address in byte format. + * If the field value doesn't meet this constraint, an error message is generated. + * + * ```proto + * message MyBytes { + * // value must be a valid IPv4 address + * optional bytes value = 1 [(buf.validate.field).bytes.ipv4 = true]; + * } + * ``` + * + * @generated from field: bool ipv4 = 11; + */ + value: boolean; + case: "ipv4"; + } | { + /** + * `ipv6` ensures that the field `value` is a valid IPv6 address in byte format. + * If the field value doesn't meet this constraint, an error message is generated. + * ```proto + * message MyBytes { + * // value must be a valid IPv6 address + * optional bytes value = 1 [(buf.validate.field).bytes.ipv6 = true]; + * } + * ``` + * + * @generated from field: bool ipv6 = 12; + */ + value: boolean; + case: "ipv6"; + } | { case: undefined; value?: undefined }; + + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other constraints. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MyBytes { + * bytes value = 1 [ + * (buf.validate.field).bytes.example = "\x01\x02", + * (buf.validate.field).bytes.example = "\x02\x03" + * ]; + * } + * ``` + * + * @generated from field: repeated bytes example = 14; + */ + example: Uint8Array[]; +}; + +/** + * Describes the message buf.validate.BytesRules. + * Use `create(BytesRulesSchema)` to create a new message. + */ +export const BytesRulesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 19); + +/** + * EnumRules describe the constraints applied to `enum` values. + * + * @generated from message buf.validate.EnumRules + */ +export type EnumRules = Message<"buf.validate.EnumRules"> & { + /** + * `const` requires the field value to exactly match the specified enum value. + * If the field value doesn't match, an error message is generated. + * + * ```proto + * enum MyEnum { + * MY_ENUM_UNSPECIFIED = 0; + * MY_ENUM_VALUE1 = 1; + * MY_ENUM_VALUE2 = 2; + * } + * + * message MyMessage { + * // The field `value` must be exactly MY_ENUM_VALUE1. + * MyEnum value = 1 [(buf.validate.field).enum.const = 1]; + * } + * ``` + * + * @generated from field: optional int32 const = 1; + */ + const: number; + + /** + * `defined_only` requires the field value to be one of the defined values for + * this enum, failing on any undefined value. + * + * ```proto + * enum MyEnum { + * MY_ENUM_UNSPECIFIED = 0; + * MY_ENUM_VALUE1 = 1; + * MY_ENUM_VALUE2 = 2; + * } + * + * message MyMessage { + * // The field `value` must be a defined value of MyEnum. + * MyEnum value = 1 [(buf.validate.field).enum.defined_only = true]; + * } + * ``` + * + * @generated from field: optional bool defined_only = 2; + */ + definedOnly: boolean; + + /** + * `in` requires the field value to be equal to one of the + * specified enum values. If the field value doesn't match any of the + * specified values, an error message is generated. + * + * ```proto + * enum MyEnum { + * MY_ENUM_UNSPECIFIED = 0; + * MY_ENUM_VALUE1 = 1; + * MY_ENUM_VALUE2 = 2; + * } + * + * message MyMessage { + * // The field `value` must be equal to one of the specified values. + * MyEnum value = 1 [(buf.validate.field).enum = { in: [1, 2]}]; + * } + * ``` + * + * @generated from field: repeated int32 in = 3; + */ + in: number[]; + + /** + * `not_in` requires the field value to be not equal to any of the + * specified enum values. If the field value matches one of the specified + * values, an error message is generated. + * + * ```proto + * enum MyEnum { + * MY_ENUM_UNSPECIFIED = 0; + * MY_ENUM_VALUE1 = 1; + * MY_ENUM_VALUE2 = 2; + * } + * + * message MyMessage { + * // The field `value` must not be equal to any of the specified values. + * MyEnum value = 1 [(buf.validate.field).enum = { not_in: [1, 2]}]; + * } + * ``` + * + * @generated from field: repeated int32 not_in = 4; + */ + notIn: number[]; + + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other constraints. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * enum MyEnum { + * MY_ENUM_UNSPECIFIED = 0; + * MY_ENUM_VALUE1 = 1; + * MY_ENUM_VALUE2 = 2; + * } + * + * message MyMessage { + * (buf.validate.field).enum.example = 1, + * (buf.validate.field).enum.example = 2 + * } + * ``` + * + * @generated from field: repeated int32 example = 5; + */ + example: number[]; +}; + +/** + * Describes the message buf.validate.EnumRules. + * Use `create(EnumRulesSchema)` to create a new message. + */ +export const EnumRulesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 20); + +/** + * RepeatedRules describe the constraints applied to `repeated` values. + * + * @generated from message buf.validate.RepeatedRules + */ +export type RepeatedRules = Message<"buf.validate.RepeatedRules"> & { + /** + * `min_items` requires that this field must contain at least the specified + * minimum number of items. + * + * Note that `min_items = 1` is equivalent to setting a field as `required`. + * + * ```proto + * message MyRepeated { + * // value must contain at least 2 items + * repeated string value = 1 [(buf.validate.field).repeated.min_items = 2]; + * } + * ``` + * + * @generated from field: optional uint64 min_items = 1; + */ + minItems: bigint; + + /** + * `max_items` denotes that this field must not exceed a + * certain number of items as the upper limit. If the field contains more + * items than specified, an error message will be generated, requiring the + * field to maintain no more than the specified number of items. + * + * ```proto + * message MyRepeated { + * // value must contain no more than 3 item(s) + * repeated string value = 1 [(buf.validate.field).repeated.max_items = 3]; + * } + * ``` + * + * @generated from field: optional uint64 max_items = 2; + */ + maxItems: bigint; + + /** + * `unique` indicates that all elements in this field must + * be unique. This constraint is strictly applicable to scalar and enum + * types, with message types not being supported. + * + * ```proto + * message MyRepeated { + * // repeated value must contain unique items + * repeated string value = 1 [(buf.validate.field).repeated.unique = true]; + * } + * ``` + * + * @generated from field: optional bool unique = 3; + */ + unique: boolean; + + /** + * `items` details the constraints to be applied to each item + * in the field. Even for repeated message fields, validation is executed + * against each item unless skip is explicitly specified. + * + * ```proto + * message MyRepeated { + * // The items in the field `value` must follow the specified constraints. + * repeated string value = 1 [(buf.validate.field).repeated.items = { + * string: { + * min_len: 3 + * max_len: 10 + * } + * }]; + * } + * ``` + * + * @generated from field: optional buf.validate.FieldConstraints items = 4; + */ + items?: FieldConstraints; +}; + +/** + * Describes the message buf.validate.RepeatedRules. + * Use `create(RepeatedRulesSchema)` to create a new message. + */ +export const RepeatedRulesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 21); + +/** + * MapRules describe the constraints applied to `map` values. + * + * @generated from message buf.validate.MapRules + */ +export type MapRules = Message<"buf.validate.MapRules"> & { + /** + * Specifies the minimum number of key-value pairs allowed. If the field has + * fewer key-value pairs than specified, an error message is generated. + * + * ```proto + * message MyMap { + * // The field `value` must have at least 2 key-value pairs. + * map value = 1 [(buf.validate.field).map.min_pairs = 2]; + * } + * ``` + * + * @generated from field: optional uint64 min_pairs = 1; + */ + minPairs: bigint; + + /** + * Specifies the maximum number of key-value pairs allowed. If the field has + * more key-value pairs than specified, an error message is generated. + * + * ```proto + * message MyMap { + * // The field `value` must have at most 3 key-value pairs. + * map value = 1 [(buf.validate.field).map.max_pairs = 3]; + * } + * ``` + * + * @generated from field: optional uint64 max_pairs = 2; + */ + maxPairs: bigint; + + /** + * Specifies the constraints to be applied to each key in the field. + * + * ```proto + * message MyMap { + * // The keys in the field `value` must follow the specified constraints. + * map value = 1 [(buf.validate.field).map.keys = { + * string: { + * min_len: 3 + * max_len: 10 + * } + * }]; + * } + * ``` + * + * @generated from field: optional buf.validate.FieldConstraints keys = 4; + */ + keys?: FieldConstraints; + + /** + * Specifies the constraints to be applied to the value of each key in the + * field. Message values will still have their validations evaluated unless + * skip is specified here. + * + * ```proto + * message MyMap { + * // The values in the field `value` must follow the specified constraints. + * map value = 1 [(buf.validate.field).map.values = { + * string: { + * min_len: 5 + * max_len: 20 + * } + * }]; + * } + * ``` + * + * @generated from field: optional buf.validate.FieldConstraints values = 5; + */ + values?: FieldConstraints; +}; + +/** + * Describes the message buf.validate.MapRules. + * Use `create(MapRulesSchema)` to create a new message. + */ +export const MapRulesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 22); + +/** + * AnyRules describe constraints applied exclusively to the `google.protobuf.Any` well-known type. + * + * @generated from message buf.validate.AnyRules + */ +export type AnyRules = Message<"buf.validate.AnyRules"> & { + /** + * `in` requires the field's `type_url` to be equal to one of the + * specified values. If it doesn't match any of the specified values, an error + * message is generated. + * + * ```proto + * message MyAny { + * // The `value` field must have a `type_url` equal to one of the specified values. + * google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]]; + * } + * ``` + * + * @generated from field: repeated string in = 2; + */ + in: string[]; + + /** + * requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated. + * + * ```proto + * message MyAny { + * // The field `value` must not have a `type_url` equal to any of the specified values. + * google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]]; + * } + * ``` + * + * @generated from field: repeated string not_in = 3; + */ + notIn: string[]; +}; + +/** + * Describes the message buf.validate.AnyRules. + * Use `create(AnyRulesSchema)` to create a new message. + */ +export const AnyRulesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 23); + +/** + * DurationRules describe the constraints applied exclusively to the `google.protobuf.Duration` well-known type. + * + * @generated from message buf.validate.DurationRules + */ +export type DurationRules = Message<"buf.validate.DurationRules"> & { + /** + * `const` dictates that the field must match the specified value of the `google.protobuf.Duration` type exactly. + * If the field's value deviates from the specified value, an error message + * will be generated. + * + * ```proto + * message MyDuration { + * // value must equal 5s + * google.protobuf.Duration value = 1 [(buf.validate.field).duration.const = "5s"]; + * } + * ``` + * + * @generated from field: optional google.protobuf.Duration const = 2; + */ + const?: Duration; + + /** + * @generated from oneof buf.validate.DurationRules.less_than + */ + lessThan: { + /** + * `lt` stipulates that the field must be less than the specified value of the `google.protobuf.Duration` type, + * exclusive. If the field's value is greater than or equal to the specified + * value, an error message will be generated. + * + * ```proto + * message MyDuration { + * // value must be less than 5s + * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = "5s"]; + * } + * ``` + * + * @generated from field: google.protobuf.Duration lt = 3; + */ + value: Duration; + case: "lt"; + } | { + /** + * `lte` indicates that the field must be less than or equal to the specified + * value of the `google.protobuf.Duration` type, inclusive. If the field's value is greater than the specified value, + * an error message will be generated. + * + * ```proto + * message MyDuration { + * // value must be less than or equal to 10s + * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lte = "10s"]; + * } + * ``` + * + * @generated from field: google.protobuf.Duration lte = 4; + */ + value: Duration; + case: "lte"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from oneof buf.validate.DurationRules.greater_than + */ + greaterThan: { + /** + * `gt` requires the duration field value to be greater than the specified + * value (exclusive). If the value of `gt` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyDuration { + * // duration must be greater than 5s [duration.gt] + * google.protobuf.Duration value = 1 [(buf.validate.field).duration.gt = { seconds: 5 }]; + * + * // duration must be greater than 5s and less than 10s [duration.gt_lt] + * google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gt: { seconds: 5 }, lt: { seconds: 10 } }]; + * + * // duration must be greater than 10s or less than 5s [duration.gt_lt_exclusive] + * google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gt: { seconds: 10 }, lt: { seconds: 5 } }]; + * } + * ``` + * + * @generated from field: google.protobuf.Duration gt = 5; + */ + value: Duration; + case: "gt"; + } | { + /** + * `gte` requires the duration field value to be greater than or equal to the + * specified value (exclusive). If the value of `gte` is larger than a + * specified `lt` or `lte`, the range is reversed, and the field value must + * be outside the specified range. If the field value doesn't meet the + * required conditions, an error message is generated. + * + * ```proto + * message MyDuration { + * // duration must be greater than or equal to 5s [duration.gte] + * google.protobuf.Duration value = 1 [(buf.validate.field).duration.gte = { seconds: 5 }]; + * + * // duration must be greater than or equal to 5s and less than 10s [duration.gte_lt] + * google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gte: { seconds: 5 }, lt: { seconds: 10 } }]; + * + * // duration must be greater than or equal to 10s or less than 5s [duration.gte_lt_exclusive] + * google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gte: { seconds: 10 }, lt: { seconds: 5 } }]; + * } + * ``` + * + * @generated from field: google.protobuf.Duration gte = 6; + */ + value: Duration; + case: "gte"; + } | { case: undefined; value?: undefined }; + + /** + * `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type. + * If the field's value doesn't correspond to any of the specified values, + * an error message will be generated. + * + * ```proto + * message MyDuration { + * // value must be in list [1s, 2s, 3s] + * google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]]; + * } + * ``` + * + * @generated from field: repeated google.protobuf.Duration in = 7; + */ + in: Duration[]; + + /** + * `not_in` denotes that the field must not be equal to + * any of the specified values of the `google.protobuf.Duration` type. + * If the field's value matches any of these values, an error message will be + * generated. + * + * ```proto + * message MyDuration { + * // value must not be in list [1s, 2s, 3s] + * google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]]; + * } + * ``` + * + * @generated from field: repeated google.protobuf.Duration not_in = 8; + */ + notIn: Duration[]; + + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other constraints. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MyDuration { + * google.protobuf.Duration value = 1 [ + * (buf.validate.field).duration.example = { seconds: 1 }, + * (buf.validate.field).duration.example = { seconds: 2 }, + * ]; + * } + * ``` + * + * @generated from field: repeated google.protobuf.Duration example = 9; + */ + example: Duration[]; +}; + +/** + * Describes the message buf.validate.DurationRules. + * Use `create(DurationRulesSchema)` to create a new message. + */ +export const DurationRulesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 24); + +/** + * TimestampRules describe the constraints applied exclusively to the `google.protobuf.Timestamp` well-known type. + * + * @generated from message buf.validate.TimestampRules + */ +export type TimestampRules = Message<"buf.validate.TimestampRules"> & { + /** + * `const` dictates that this field, of the `google.protobuf.Timestamp` type, must exactly match the specified value. If the field value doesn't correspond to the specified timestamp, an error message will be generated. + * + * ```proto + * message MyTimestamp { + * // value must equal 2023-05-03T10:00:00Z + * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.const = {seconds: 1727998800}]; + * } + * ``` + * + * @generated from field: optional google.protobuf.Timestamp const = 2; + */ + const?: Timestamp; + + /** + * @generated from oneof buf.validate.TimestampRules.less_than + */ + lessThan: { + /** + * requires the duration field value to be less than the specified value (field < value). If the field value doesn't meet the required conditions, an error message is generated. + * + * ```proto + * message MyDuration { + * // duration must be less than 'P3D' [duration.lt] + * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = { seconds: 259200 }]; + * } + * ``` + * + * @generated from field: google.protobuf.Timestamp lt = 3; + */ + value: Timestamp; + case: "lt"; + } | { + /** + * requires the timestamp field value to be less than or equal to the specified value (field <= value). If the field value doesn't meet the required conditions, an error message is generated. + * + * ```proto + * message MyTimestamp { + * // timestamp must be less than or equal to '2023-05-14T00:00:00Z' [timestamp.lte] + * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.lte = { seconds: 1678867200 }]; + * } + * ``` + * + * @generated from field: google.protobuf.Timestamp lte = 4; + */ + value: Timestamp; + case: "lte"; + } | { + /** + * `lt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be less than the current time. `lt_now` can only be used with the `within` rule. + * + * ```proto + * message MyTimestamp { + * // value must be less than now + * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.lt_now = true]; + * } + * ``` + * + * @generated from field: bool lt_now = 7; + */ + value: boolean; + case: "ltNow"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from oneof buf.validate.TimestampRules.greater_than + */ + greaterThan: { + /** + * `gt` requires the timestamp field value to be greater than the specified + * value (exclusive). If the value of `gt` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyTimestamp { + * // timestamp must be greater than '2023-01-01T00:00:00Z' [timestamp.gt] + * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gt = { seconds: 1672444800 }]; + * + * // timestamp must be greater than '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gt_lt] + * google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gt: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }]; + * + * // timestamp must be greater than '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gt_lt_exclusive] + * google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gt: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }]; + * } + * ``` + * + * @generated from field: google.protobuf.Timestamp gt = 5; + */ + value: Timestamp; + case: "gt"; + } | { + /** + * `gte` requires the timestamp field value to be greater than or equal to the + * specified value (exclusive). If the value of `gte` is larger than a + * specified `lt` or `lte`, the range is reversed, and the field value + * must be outside the specified range. If the field value doesn't meet + * the required conditions, an error message is generated. + * + * ```proto + * message MyTimestamp { + * // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' [timestamp.gte] + * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gte = { seconds: 1672444800 }]; + * + * // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gte_lt] + * google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gte: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }]; + * + * // timestamp must be greater than or equal to '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gte_lt_exclusive] + * google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gte: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }]; + * } + * ``` + * + * @generated from field: google.protobuf.Timestamp gte = 6; + */ + value: Timestamp; + case: "gte"; + } | { + /** + * `gt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be greater than the current time. `gt_now` can only be used with the `within` rule. + * + * ```proto + * message MyTimestamp { + * // value must be greater than now + * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.gt_now = true]; + * } + * ``` + * + * @generated from field: bool gt_now = 8; + */ + value: boolean; + case: "gtNow"; + } | { case: undefined; value?: undefined }; + + /** + * `within` specifies that this field, of the `google.protobuf.Timestamp` type, must be within the specified duration of the current time. If the field value isn't within the duration, an error message is generated. + * + * ```proto + * message MyTimestamp { + * // value must be within 1 hour of now + * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.within = {seconds: 3600}]; + * } + * ``` + * + * @generated from field: optional google.protobuf.Duration within = 9; + */ + within?: Duration; + + /** + * @generated from field: repeated google.protobuf.Timestamp example = 10; + */ + example: Timestamp[]; +}; + +/** + * Describes the message buf.validate.TimestampRules. + * Use `create(TimestampRulesSchema)` to create a new message. + */ +export const TimestampRulesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 25); + +/** + * `Violations` is a collection of `Violation` messages. This message type is returned by + * protovalidate when a proto message fails to meet the requirements set by the `Constraint` validation rules. + * Each individual violation is represented by a `Violation` message. + * + * @generated from message buf.validate.Violations + */ +export type Violations = Message<"buf.validate.Violations"> & { + /** + * `violations` is a repeated field that contains all the `Violation` messages corresponding to the violations detected. + * + * @generated from field: repeated buf.validate.Violation violations = 1; + */ + violations: Violation[]; +}; + +/** + * Describes the message buf.validate.Violations. + * Use `create(ViolationsSchema)` to create a new message. + */ +export const ViolationsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 26); + +/** + * `Violation` represents a single instance where a validation rule, expressed + * as a `Constraint`, was not met. It provides information about the field that + * caused the violation, the specific constraint that wasn't fulfilled, and a + * human-readable error message. + * + * ```json + * { + * "fieldPath": "bar", + * "constraintId": "foo.bar", + * "message": "bar must be greater than 0" + * } + * ``` + * + * @generated from message buf.validate.Violation + */ +export type Violation = Message<"buf.validate.Violation"> & { + /** + * `field` is a machine-readable path to the field that failed validation. + * This could be a nested field, in which case the path will include all the parent fields leading to the actual field that caused the violation. + * + * For example, consider the following message: + * + * ```proto + * message Message { + * bool a = 1 [(buf.validate.field).required = true]; + * } + * ``` + * + * It could produce the following violation: + * + * ```textproto + * violation { + * field { element { field_number: 1, field_name: "a", field_type: 8 } } + * ... + * } + * ``` + * + * @generated from field: optional buf.validate.FieldPath field = 5; + */ + field?: FieldPath; + + /** + * `rule` is a machine-readable path that points to the specific constraint rule that failed validation. + * This will be a nested field starting from the FieldConstraints of the field that failed validation. + * For custom constraints, this will provide the path of the constraint, e.g. `cel[0]`. + * + * For example, consider the following message: + * + * ```proto + * message Message { + * bool a = 1 [(buf.validate.field).required = true]; + * bool b = 2 [(buf.validate.field).cel = { + * id: "custom_constraint", + * expression: "!this ? 'b must be true': ''" + * }] + * } + * ``` + * + * It could produce the following violations: + * + * ```textproto + * violation { + * rule { element { field_number: 25, field_name: "required", field_type: 8 } } + * ... + * } + * violation { + * rule { element { field_number: 23, field_name: "cel", field_type: 11, index: 0 } } + * ... + * } + * ``` + * + * @generated from field: optional buf.validate.FieldPath rule = 6; + */ + rule?: FieldPath; + + /** + * `constraint_id` is the unique identifier of the `Constraint` that was not fulfilled. + * This is the same `id` that was specified in the `Constraint` message, allowing easy tracing of which rule was violated. + * + * @generated from field: optional string constraint_id = 2; + */ + constraintId: string; + + /** + * `message` is a human-readable error message that describes the nature of the violation. + * This can be the default error message from the violated `Constraint`, or it can be a custom message that gives more context about the violation. + * + * @generated from field: optional string message = 3; + */ + message: string; + + /** + * `for_key` indicates whether the violation was caused by a map key, rather than a value. + * + * @generated from field: optional bool for_key = 4; + */ + forKey: boolean; +}; + +/** + * Describes the message buf.validate.Violation. + * Use `create(ViolationSchema)` to create a new message. + */ +export const ViolationSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 27); + +/** + * `FieldPath` provides a path to a nested protobuf field. + * + * This message provides enough information to render a dotted field path even without protobuf descriptors. + * It also provides enough information to resolve a nested field through unknown wire data. + * + * @generated from message buf.validate.FieldPath + */ +export type FieldPath = Message<"buf.validate.FieldPath"> & { + /** + * `elements` contains each element of the path, starting from the root and recursing downward. + * + * @generated from field: repeated buf.validate.FieldPathElement elements = 1; + */ + elements: FieldPathElement[]; +}; + +/** + * Describes the message buf.validate.FieldPath. + * Use `create(FieldPathSchema)` to create a new message. + */ +export const FieldPathSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 28); + +/** + * `FieldPathElement` provides enough information to nest through a single protobuf field. + * + * If the selected field is a map or repeated field, the `subscript` value selects a specific element from it. + * A path that refers to a value nested under a map key or repeated field index will have a `subscript` value. + * The `field_type` field allows unambiguous resolution of a field even if descriptors are not available. + * + * @generated from message buf.validate.FieldPathElement + */ +export type FieldPathElement = Message<"buf.validate.FieldPathElement"> & { + /** + * `field_number` is the field number this path element refers to. + * + * @generated from field: optional int32 field_number = 1; + */ + fieldNumber: number; + + /** + * `field_name` contains the field name this path element refers to. + * This can be used to display a human-readable path even if the field number is unknown. + * + * @generated from field: optional string field_name = 2; + */ + fieldName: string; + + /** + * `field_type` specifies the type of this field. When using reflection, this value is not needed. + * + * This value is provided to make it possible to traverse unknown fields through wire data. + * When traversing wire data, be mindful of both packed[1] and delimited[2] encoding schemes. + * + * [1]: https://protobuf.dev/programming-guides/encoding/#packed + * [2]: https://protobuf.dev/programming-guides/encoding/#groups + * + * N.B.: Although groups are deprecated, the corresponding delimited encoding scheme is not, and + * can be explicitly used in Protocol Buffers 2023 Edition. + * + * @generated from field: optional google.protobuf.FieldDescriptorProto.Type field_type = 3; + */ + fieldType: FieldDescriptorProto_Type; + + /** + * `key_type` specifies the map key type of this field. This value is useful when traversing + * unknown fields through wire data: specifically, it allows handling the differences between + * different integer encodings. + * + * @generated from field: optional google.protobuf.FieldDescriptorProto.Type key_type = 4; + */ + keyType: FieldDescriptorProto_Type; + + /** + * `value_type` specifies map value type of this field. This is useful if you want to display a + * value inside unknown fields through wire data. + * + * @generated from field: optional google.protobuf.FieldDescriptorProto.Type value_type = 5; + */ + valueType: FieldDescriptorProto_Type; + + /** + * `subscript` contains a repeated index or map key, if this path element nests into a repeated or map field. + * + * @generated from oneof buf.validate.FieldPathElement.subscript + */ + subscript: { + /** + * `index` specifies a 0-based index into a repeated field. + * + * @generated from field: uint64 index = 6; + */ + value: bigint; + case: "index"; + } | { + /** + * `bool_key` specifies a map key of type bool. + * + * @generated from field: bool bool_key = 7; + */ + value: boolean; + case: "boolKey"; + } | { + /** + * `int_key` specifies a map key of type int32, int64, sint32, sint64, sfixed32 or sfixed64. + * + * @generated from field: int64 int_key = 8; + */ + value: bigint; + case: "intKey"; + } | { + /** + * `uint_key` specifies a map key of type uint32, uint64, fixed32 or fixed64. + * + * @generated from field: uint64 uint_key = 9; + */ + value: bigint; + case: "uintKey"; + } | { + /** + * `string_key` specifies a map key of type string. + * + * @generated from field: string string_key = 10; + */ + value: string; + case: "stringKey"; + } | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message buf.validate.FieldPathElement. + * Use `create(FieldPathElementSchema)` to create a new message. + */ +export const FieldPathElementSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 29); + +/** + * Specifies how FieldConstraints.ignore behaves. See the documentation for + * FieldConstraints.required for definitions of "populated" and "nullable". + * + * @generated from enum buf.validate.Ignore + */ +export enum Ignore { + /** + * Validation is only skipped if it's an unpopulated nullable fields. + * + * ```proto + * syntax="proto3"; + * + * message Request { + * // The uri rule applies to any value, including the empty string. + * string foo = 1 [ + * (buf.validate.field).string.uri = true + * ]; + * + * // The uri rule only applies if the field is set, including if it's + * // set to the empty string. + * optional string bar = 2 [ + * (buf.validate.field).string.uri = true + * ]; + * + * // The min_items rule always applies, even if the list is empty. + * repeated string baz = 3 [ + * (buf.validate.field).repeated.min_items = 3 + * ]; + * + * // The custom CEL rule applies only if the field is set, including if + * // it's the "zero" value of that message. + * SomeMessage quux = 4 [ + * (buf.validate.field).cel = {/* ... *\/} + * ]; + * } + * ``` + * + * @generated from enum value: IGNORE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * Validation is skipped if the field is unpopulated. This rule is redundant + * if the field is already nullable. + * + * ```proto + * syntax="proto3 + * + * message Request { + * // The uri rule applies only if the value is not the empty string. + * string foo = 1 [ + * (buf.validate.field).string.uri = true, + * (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED + * ]; + * + * // IGNORE_IF_UNPOPULATED is equivalent to IGNORE_UNSPECIFIED in this + * // case: the uri rule only applies if the field is set, including if + * // it's set to the empty string. + * optional string bar = 2 [ + * (buf.validate.field).string.uri = true, + * (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED + * ]; + * + * // The min_items rule only applies if the list has at least one item. + * repeated string baz = 3 [ + * (buf.validate.field).repeated.min_items = 3, + * (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED + * ]; + * + * // IGNORE_IF_UNPOPULATED is equivalent to IGNORE_UNSPECIFIED in this + * // case: the custom CEL rule applies only if the field is set, including + * // if it's the "zero" value of that message. + * SomeMessage quux = 4 [ + * (buf.validate.field).cel = {/* ... *\/}, + * (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED + * ]; + * } + * ``` + * + * @generated from enum value: IGNORE_IF_UNPOPULATED = 1; + */ + IF_UNPOPULATED = 1, + + /** + * Validation is skipped if the field is unpopulated or if it is a nullable + * field populated with its default value. This is typically the zero or + * empty value, but proto2 scalars support custom defaults. For messages, the + * default is a non-null message with all its fields unpopulated. + * + * ```proto + * syntax="proto3 + * + * message Request { + * // IGNORE_IF_DEFAULT_VALUE is equivalent to IGNORE_IF_UNPOPULATED in + * // this case; the uri rule applies only if the value is not the empty + * // string. + * string foo = 1 [ + * (buf.validate.field).string.uri = true, + * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE + * ]; + * + * // The uri rule only applies if the field is set to a value other than + * // the empty string. + * optional string bar = 2 [ + * (buf.validate.field).string.uri = true, + * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE + * ]; + * + * // IGNORE_IF_DEFAULT_VALUE is equivalent to IGNORE_IF_UNPOPULATED in + * // this case; the min_items rule only applies if the list has at least + * // one item. + * repeated string baz = 3 [ + * (buf.validate.field).repeated.min_items = 3, + * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE + * ]; + * + * // The custom CEL rule only applies if the field is set to a value other + * // than an empty message (i.e., fields are unpopulated). + * SomeMessage quux = 4 [ + * (buf.validate.field).cel = {/* ... *\/}, + * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE + * ]; + * } + * ``` + * + * This rule is affected by proto2 custom default values: + * + * ```proto + * syntax="proto2"; + * + * message Request { + * // The gt rule only applies if the field is set and it's value is not + * the default (i.e., not -42). The rule even applies if the field is set + * to zero since the default value differs. + * optional int32 value = 1 [ + * default = -42, + * (buf.validate.field).int32.gt = 0, + * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE + * ]; + * } + * + * @generated from enum value: IGNORE_IF_DEFAULT_VALUE = 2; + */ + IF_DEFAULT_VALUE = 2, + + /** + * The validation rules of this field will be skipped and not evaluated. This + * is useful for situations that necessitate turning off the rules of a field + * containing a message that may not make sense in the current context, or to + * temporarily disable constraints during development. + * + * ```proto + * message MyMessage { + * // The field's rules will always be ignored, including any validation's + * // on value's fields. + * MyOtherMessage value = 1 [ + * (buf.validate.field).ignore = IGNORE_ALWAYS]; + * } + * ``` + * + * @generated from enum value: IGNORE_ALWAYS = 3; + */ + ALWAYS = 3, +} + +/** + * Describes the enum buf.validate.Ignore. + */ +export const IgnoreSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_buf_validate_validate, 0); + +/** + * WellKnownRegex contain some well-known patterns. + * + * @generated from enum buf.validate.KnownRegex + */ +export enum KnownRegex { + /** + * @generated from enum value: KNOWN_REGEX_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * HTTP header name as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2). + * + * @generated from enum value: KNOWN_REGEX_HTTP_HEADER_NAME = 1; + */ + HTTP_HEADER_NAME = 1, + + /** + * HTTP header value as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2.4). + * + * @generated from enum value: KNOWN_REGEX_HTTP_HEADER_VALUE = 2; + */ + HTTP_HEADER_VALUE = 2, +} + +/** + * Describes the enum buf.validate.KnownRegex. + */ +export const KnownRegexSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_buf_validate_validate, 1); + +/** + * Rules specify the validations to be performed on this message. By default, + * no validation is performed against a message. + * + * @generated from extension: optional buf.validate.MessageConstraints message = 1159; + */ +export const message: GenExtension = /*@__PURE__*/ + extDesc(file_buf_validate_validate, 0); + +/** + * Rules specify the validations to be performed on this oneof. By default, + * no validation is performed against a oneof. + * + * @generated from extension: optional buf.validate.OneofConstraints oneof = 1159; + */ +export const oneof: GenExtension = /*@__PURE__*/ + extDesc(file_buf_validate_validate, 1); + +/** + * Rules specify the validations to be performed on this field. By default, + * no validation is performed against a field. + * + * @generated from extension: optional buf.validate.FieldConstraints field = 1159; + */ +export const field: GenExtension = /*@__PURE__*/ + extDesc(file_buf_validate_validate, 2); + +/** + * Specifies predefined rules. When extending a standard constraint message, + * this adds additional CEL expressions that apply when the extension is used. + * + * ```proto + * extend buf.validate.Int32Rules { + * bool is_zero [(buf.validate.predefined).cel = { + * id: "int32.is_zero", + * message: "value must be zero", + * expression: "!rule || this == 0", + * }]; + * } + * + * message Foo { + * int32 reserved = 1 [(buf.validate.field).int32.(is_zero) = true]; + * } + * ``` + * + * @generated from extension: optional buf.validate.PredefinedConstraints predefined = 1160; + */ +export const predefined: GenExtension = /*@__PURE__*/ + extDesc(file_buf_validate_validate, 3); + diff --git a/lib/src/platform/common/common_pb.d.ts b/lib/src/platform/common/common_pb.d.ts deleted file mode 100644 index 369dde74..00000000 --- a/lib/src/platform/common/common_pb.d.ts +++ /dev/null @@ -1,129 +0,0 @@ -// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" -// @generated from file common/common.proto (package common, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage, Timestamp } from "@bufbuild/protobuf"; -import { Message, proto3 } from "@bufbuild/protobuf"; - -/** - * @generated from enum common.MetadataUpdateEnum - */ -export declare enum MetadataUpdateEnum { - /** - * unspecified update type - * - * @generated from enum value: METADATA_UPDATE_ENUM_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, - - /** - * only update the fields that are provided - * - * @generated from enum value: METADATA_UPDATE_ENUM_EXTEND = 1; - */ - EXTEND = 1, - - /** - * replace the entire metadata with the provided metadata - * - * @generated from enum value: METADATA_UPDATE_ENUM_REPLACE = 2; - */ - REPLACE = 2, -} - -/** - * buflint ENUM_VALUE_PREFIX: to make sure that C++ scoping rules aren't violated when users add new enum values to an enum in a given package - * - * @generated from enum common.ActiveStateEnum - */ -export declare enum ActiveStateEnum { - /** - * @generated from enum value: ACTIVE_STATE_ENUM_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, - - /** - * @generated from enum value: ACTIVE_STATE_ENUM_ACTIVE = 1; - */ - ACTIVE = 1, - - /** - * @generated from enum value: ACTIVE_STATE_ENUM_INACTIVE = 2; - */ - INACTIVE = 2, - - /** - * @generated from enum value: ACTIVE_STATE_ENUM_ANY = 3; - */ - ANY = 3, -} - -/** - * Struct to uniquely identify a resource with optional additional metadata - * - * @generated from message common.Metadata - */ -export declare class Metadata extends Message { - /** - * created_at set by server (entity who created will recorded in an audit event) - * - * @generated from field: google.protobuf.Timestamp created_at = 1; - */ - createdAt?: Timestamp; - - /** - * updated_at set by server (entity who updated will recorded in an audit event) - * - * @generated from field: google.protobuf.Timestamp updated_at = 2; - */ - updatedAt?: Timestamp; - - /** - * optional short description - * - * @generated from field: map labels = 3; - */ - labels: { [key: string]: string }; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "common.Metadata"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): Metadata; - - static fromJson(jsonValue: JsonValue, options?: Partial): Metadata; - - static fromJsonString(jsonString: string, options?: Partial): Metadata; - - static equals(a: Metadata | PlainMessage | undefined, b: Metadata | PlainMessage | undefined): boolean; -} - -/** - * @generated from message common.MetadataMutable - */ -export declare class MetadataMutable extends Message { - /** - * optional labels - * - * @generated from field: map labels = 3; - */ - labels: { [key: string]: string }; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "common.MetadataMutable"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): MetadataMutable; - - static fromJson(jsonValue: JsonValue, options?: Partial): MetadataMutable; - - static fromJsonString(jsonString: string, options?: Partial): MetadataMutable; - - static equals(a: MetadataMutable | PlainMessage | undefined, b: MetadataMutable | PlainMessage | undefined): boolean; -} - diff --git a/lib/src/platform/common/common_pb.js b/lib/src/platform/common/common_pb.js deleted file mode 100644 index 2876f261..00000000 --- a/lib/src/platform/common/common_pb.js +++ /dev/null @@ -1,58 +0,0 @@ -// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" -// @generated from file common/common.proto (package common, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { proto3, Timestamp } from "@bufbuild/protobuf"; - -/** - * @generated from enum common.MetadataUpdateEnum - */ -export const MetadataUpdateEnum = /*@__PURE__*/ proto3.makeEnum( - "common.MetadataUpdateEnum", - [ - {no: 0, name: "METADATA_UPDATE_ENUM_UNSPECIFIED", localName: "UNSPECIFIED"}, - {no: 1, name: "METADATA_UPDATE_ENUM_EXTEND", localName: "EXTEND"}, - {no: 2, name: "METADATA_UPDATE_ENUM_REPLACE", localName: "REPLACE"}, - ], -); - -/** - * buflint ENUM_VALUE_PREFIX: to make sure that C++ scoping rules aren't violated when users add new enum values to an enum in a given package - * - * @generated from enum common.ActiveStateEnum - */ -export const ActiveStateEnum = /*@__PURE__*/ proto3.makeEnum( - "common.ActiveStateEnum", - [ - {no: 0, name: "ACTIVE_STATE_ENUM_UNSPECIFIED", localName: "UNSPECIFIED"}, - {no: 1, name: "ACTIVE_STATE_ENUM_ACTIVE", localName: "ACTIVE"}, - {no: 2, name: "ACTIVE_STATE_ENUM_INACTIVE", localName: "INACTIVE"}, - {no: 3, name: "ACTIVE_STATE_ENUM_ANY", localName: "ANY"}, - ], -); - -/** - * Struct to uniquely identify a resource with optional additional metadata - * - * @generated from message common.Metadata - */ -export const Metadata = /*@__PURE__*/ proto3.makeMessageType( - "common.Metadata", - () => [ - { no: 1, name: "created_at", kind: "message", T: Timestamp }, - { no: 2, name: "updated_at", kind: "message", T: Timestamp }, - { no: 3, name: "labels", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, - ], -); - -/** - * @generated from message common.MetadataMutable - */ -export const MetadataMutable = /*@__PURE__*/ proto3.makeMessageType( - "common.MetadataMutable", - () => [ - { no: 3, name: "labels", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, - ], -); - diff --git a/lib/src/platform/common/common_pb.ts b/lib/src/platform/common/common_pb.ts new file mode 100644 index 00000000..305d4ab7 --- /dev/null +++ b/lib/src/platform/common/common_pb.ts @@ -0,0 +1,135 @@ +// @generated by protoc-gen-es v2.2.5 with parameter "target=ts,import_extension=.js" +// @generated from file common/common.proto (package common, syntax proto3) +/* eslint-disable */ + +import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1"; +import { enumDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1"; +import type { Timestamp } from "@bufbuild/protobuf/wkt"; +import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file common/common.proto. + */ +export const file_common_common: GenFile = /*@__PURE__*/ + fileDesc("ChNjb21tb24vY29tbW9uLnByb3RvEgZjb21tb24ixwEKCE1ldGFkYXRhEi4KCmNyZWF0ZWRfYXQYASABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEi4KCnVwZGF0ZWRfYXQYAiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEiwKBmxhYmVscxgDIAMoCzIcLmNvbW1vbi5NZXRhZGF0YS5MYWJlbHNFbnRyeRotCgtMYWJlbHNFbnRyeRILCgNrZXkYASABKAkSDQoFdmFsdWUYAiABKAk6AjgBInUKD01ldGFkYXRhTXV0YWJsZRIzCgZsYWJlbHMYAyADKAsyIy5jb21tb24uTWV0YWRhdGFNdXRhYmxlLkxhYmVsc0VudHJ5Gi0KC0xhYmVsc0VudHJ5EgsKA2tleRgBIAEoCRINCgV2YWx1ZRgCIAEoCToCOAEqfQoSTWV0YWRhdGFVcGRhdGVFbnVtEiQKIE1FVEFEQVRBX1VQREFURV9FTlVNX1VOU1BFQ0lGSUVEEAASHwobTUVUQURBVEFfVVBEQVRFX0VOVU1fRVhURU5EEAESIAocTUVUQURBVEFfVVBEQVRFX0VOVU1fUkVQTEFDRRACKo0BCg9BY3RpdmVTdGF0ZUVudW0SIQodQUNUSVZFX1NUQVRFX0VOVU1fVU5TUEVDSUZJRUQQABIcChhBQ1RJVkVfU1RBVEVfRU5VTV9BQ1RJVkUQARIeChpBQ1RJVkVfU1RBVEVfRU5VTV9JTkFDVElWRRACEhkKFUFDVElWRV9TVEFURV9FTlVNX0FOWRADYgZwcm90bzM", [file_google_protobuf_timestamp]); + +/** + * Struct to uniquely identify a resource with optional additional metadata + * + * @generated from message common.Metadata + */ +export type Metadata = Message<"common.Metadata"> & { + /** + * created_at set by server (entity who created will recorded in an audit event) + * + * @generated from field: google.protobuf.Timestamp created_at = 1; + */ + createdAt?: Timestamp; + + /** + * updated_at set by server (entity who updated will recorded in an audit event) + * + * @generated from field: google.protobuf.Timestamp updated_at = 2; + */ + updatedAt?: Timestamp; + + /** + * optional short description + * + * @generated from field: map labels = 3; + */ + labels: { [key: string]: string }; +}; + +/** + * Describes the message common.Metadata. + * Use `create(MetadataSchema)` to create a new message. + */ +export const MetadataSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_common_common, 0); + +/** + * @generated from message common.MetadataMutable + */ +export type MetadataMutable = Message<"common.MetadataMutable"> & { + /** + * optional labels + * + * @generated from field: map labels = 3; + */ + labels: { [key: string]: string }; +}; + +/** + * Describes the message common.MetadataMutable. + * Use `create(MetadataMutableSchema)` to create a new message. + */ +export const MetadataMutableSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_common_common, 1); + +/** + * @generated from enum common.MetadataUpdateEnum + */ +export enum MetadataUpdateEnum { + /** + * unspecified update type + * + * @generated from enum value: METADATA_UPDATE_ENUM_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * only update the fields that are provided + * + * @generated from enum value: METADATA_UPDATE_ENUM_EXTEND = 1; + */ + EXTEND = 1, + + /** + * replace the entire metadata with the provided metadata + * + * @generated from enum value: METADATA_UPDATE_ENUM_REPLACE = 2; + */ + REPLACE = 2, +} + +/** + * Describes the enum common.MetadataUpdateEnum. + */ +export const MetadataUpdateEnumSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_common_common, 0); + +/** + * buflint ENUM_VALUE_PREFIX: to make sure that C++ scoping rules aren't violated when users add new enum values to an enum in a given package + * + * @generated from enum common.ActiveStateEnum + */ +export enum ActiveStateEnum { + /** + * @generated from enum value: ACTIVE_STATE_ENUM_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: ACTIVE_STATE_ENUM_ACTIVE = 1; + */ + ACTIVE = 1, + + /** + * @generated from enum value: ACTIVE_STATE_ENUM_INACTIVE = 2; + */ + INACTIVE = 2, + + /** + * @generated from enum value: ACTIVE_STATE_ENUM_ANY = 3; + */ + ANY = 3, +} + +/** + * Describes the enum common.ActiveStateEnum. + */ +export const ActiveStateEnumSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_common_common, 1); + diff --git a/lib/src/platform/entityresolution/entity_resolution_connect.d.ts b/lib/src/platform/entityresolution/entity_resolution_connect.d.ts deleted file mode 100644 index 7cba8026..00000000 --- a/lib/src/platform/entityresolution/entity_resolution_connect.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=js+dts,import_extension=none" -// @generated from file entityresolution/entity_resolution.proto (package entityresolution, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { CreateEntityChainFromJwtRequest, CreateEntityChainFromJwtResponse, ResolveEntitiesRequest, ResolveEntitiesResponse } from "./entity_resolution_pb"; -import { MethodKind } from "@bufbuild/protobuf"; - -/** - * @generated from service entityresolution.EntityResolutionService - */ -export declare const EntityResolutionService: { - readonly typeName: "entityresolution.EntityResolutionService", - readonly methods: { - /** - * @generated from rpc entityresolution.EntityResolutionService.ResolveEntities - */ - readonly resolveEntities: { - readonly name: "ResolveEntities", - readonly I: typeof ResolveEntitiesRequest, - readonly O: typeof ResolveEntitiesResponse, - readonly kind: MethodKind.Unary, - }, - /** - * @generated from rpc entityresolution.EntityResolutionService.CreateEntityChainFromJwt - */ - readonly createEntityChainFromJwt: { - readonly name: "CreateEntityChainFromJwt", - readonly I: typeof CreateEntityChainFromJwtRequest, - readonly O: typeof CreateEntityChainFromJwtResponse, - readonly kind: MethodKind.Unary, - }, - } -}; - diff --git a/lib/src/platform/entityresolution/entity_resolution_connect.js b/lib/src/platform/entityresolution/entity_resolution_connect.js deleted file mode 100644 index 33c93871..00000000 --- a/lib/src/platform/entityresolution/entity_resolution_connect.js +++ /dev/null @@ -1,35 +0,0 @@ -// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=js+dts,import_extension=none" -// @generated from file entityresolution/entity_resolution.proto (package entityresolution, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { CreateEntityChainFromJwtRequest, CreateEntityChainFromJwtResponse, ResolveEntitiesRequest, ResolveEntitiesResponse } from "./entity_resolution_pb"; -import { MethodKind } from "@bufbuild/protobuf"; - -/** - * @generated from service entityresolution.EntityResolutionService - */ -export const EntityResolutionService = { - typeName: "entityresolution.EntityResolutionService", - methods: { - /** - * @generated from rpc entityresolution.EntityResolutionService.ResolveEntities - */ - resolveEntities: { - name: "ResolveEntities", - I: ResolveEntitiesRequest, - O: ResolveEntitiesResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc entityresolution.EntityResolutionService.CreateEntityChainFromJwt - */ - createEntityChainFromJwt: { - name: "CreateEntityChainFromJwt", - I: CreateEntityChainFromJwtRequest, - O: CreateEntityChainFromJwtResponse, - kind: MethodKind.Unary, - }, - } -}; - diff --git a/lib/src/platform/entityresolution/entity_resolution_pb.d.ts b/lib/src/platform/entityresolution/entity_resolution_pb.d.ts deleted file mode 100644 index a83ee9d9..00000000 --- a/lib/src/platform/entityresolution/entity_resolution_pb.d.ts +++ /dev/null @@ -1,242 +0,0 @@ -// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" -// @generated from file entityresolution/entity_resolution.proto (package entityresolution, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { Any, BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage, Struct } from "@bufbuild/protobuf"; -import { Message, proto3 } from "@bufbuild/protobuf"; -import type { Entity, EntityChain, Token } from "../authorization/authorization_pb"; - -/** - * - * Example: Get idp attributes for bob and alice (both represented using an email address - * { - * "entities": [ - * { - * "id": "e1", - * "emailAddress": "bob@example.org" - * }, - * { - * "id": "e2", - * "emailAddress": "alice@example.org" - * } - * ] - * } - * - * - * @generated from message entityresolution.ResolveEntitiesRequest - */ -export declare class ResolveEntitiesRequest extends Message { - /** - * @generated from field: repeated authorization.Entity entities = 1; - */ - entities: Entity[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "entityresolution.ResolveEntitiesRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): ResolveEntitiesRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): ResolveEntitiesRequest; - - static fromJsonString(jsonString: string, options?: Partial): ResolveEntitiesRequest; - - static equals(a: ResolveEntitiesRequest | PlainMessage | undefined, b: ResolveEntitiesRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message entityresolution.EntityRepresentation - */ -export declare class EntityRepresentation extends Message { - /** - * @generated from field: repeated google.protobuf.Struct additional_props = 1; - */ - additionalProps: Struct[]; - - /** - * ephemeral entity id from the request - * - * @generated from field: string original_id = 2; - */ - originalId: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "entityresolution.EntityRepresentation"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): EntityRepresentation; - - static fromJson(jsonValue: JsonValue, options?: Partial): EntityRepresentation; - - static fromJsonString(jsonString: string, options?: Partial): EntityRepresentation; - - static equals(a: EntityRepresentation | PlainMessage | undefined, b: EntityRepresentation | PlainMessage | undefined): boolean; -} - -/** - * - * Example: Get idp attributes for bob and alice - * { - * "entity_representations": [ - * { - * "idp_entity_id": "e1", - * "additional_props": {"someAttr1":"someValue1"} - * }, - * { - * "idp_entity_id": "e2", - * "additional_props": {"someAttr2":"someValue2"} - * } - * ] - * } - * - * - * @generated from message entityresolution.ResolveEntitiesResponse - */ -export declare class ResolveEntitiesResponse extends Message { - /** - * @generated from field: repeated entityresolution.EntityRepresentation entity_representations = 1; - */ - entityRepresentations: EntityRepresentation[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "entityresolution.ResolveEntitiesResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): ResolveEntitiesResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): ResolveEntitiesResponse; - - static fromJsonString(jsonString: string, options?: Partial): ResolveEntitiesResponse; - - static equals(a: ResolveEntitiesResponse | PlainMessage | undefined, b: ResolveEntitiesResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message entityresolution.EntityNotFoundError - */ -export declare class EntityNotFoundError extends Message { - /** - * @generated from field: int32 code = 1; - */ - code: number; - - /** - * @generated from field: string message = 2; - */ - message: string; - - /** - * @generated from field: repeated google.protobuf.Any details = 3; - */ - details: Any[]; - - /** - * @generated from field: string entity = 4; - */ - entity: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "entityresolution.EntityNotFoundError"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): EntityNotFoundError; - - static fromJson(jsonValue: JsonValue, options?: Partial): EntityNotFoundError; - - static fromJsonString(jsonString: string, options?: Partial): EntityNotFoundError; - - static equals(a: EntityNotFoundError | PlainMessage | undefined, b: EntityNotFoundError | PlainMessage | undefined): boolean; -} - -/** - * - * Example: Get Entity chains for tokens aaaaaa and bbbbbb - * { - * "tokens": [ - * "aaaaaaa", - * "bbbbbbbb" - * ] - * } - * - * - * @generated from message entityresolution.CreateEntityChainFromJwtRequest - */ -export declare class CreateEntityChainFromJwtRequest extends Message { - /** - * @generated from field: repeated authorization.Token tokens = 1; - */ - tokens: Token[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "entityresolution.CreateEntityChainFromJwtRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateEntityChainFromJwtRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateEntityChainFromJwtRequest; - - static fromJsonString(jsonString: string, options?: Partial): CreateEntityChainFromJwtRequest; - - static equals(a: CreateEntityChainFromJwtRequest | PlainMessage | undefined, b: CreateEntityChainFromJwtRequest | PlainMessage | undefined): boolean; -} - -/** - * - * Example: Return the entity chains from the provided tokens - * { - * "entity_chains": [ - * { - * "id": "tok1", - * "entities": [ - * { - * "clientId": "client1" - * } - * ] - * }, - * { - * "id": "tok2", - * "entities": [ - * { - * "userName": "alice", - * "clientId": "client2" - * } - * ] - * } - * ] - * } - * - * - * @generated from message entityresolution.CreateEntityChainFromJwtResponse - */ -export declare class CreateEntityChainFromJwtResponse extends Message { - /** - * @generated from field: repeated authorization.EntityChain entity_chains = 1; - */ - entityChains: EntityChain[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "entityresolution.CreateEntityChainFromJwtResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateEntityChainFromJwtResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateEntityChainFromJwtResponse; - - static fromJsonString(jsonString: string, options?: Partial): CreateEntityChainFromJwtResponse; - - static equals(a: CreateEntityChainFromJwtResponse | PlainMessage | undefined, b: CreateEntityChainFromJwtResponse | PlainMessage | undefined): boolean; -} - diff --git a/lib/src/platform/entityresolution/entity_resolution_pb.js b/lib/src/platform/entityresolution/entity_resolution_pb.js deleted file mode 100644 index d43dca42..00000000 --- a/lib/src/platform/entityresolution/entity_resolution_pb.js +++ /dev/null @@ -1,139 +0,0 @@ -// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" -// @generated from file entityresolution/entity_resolution.proto (package entityresolution, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { Any, proto3, Struct } from "@bufbuild/protobuf"; -import { Entity, EntityChain, Token } from "../authorization/authorization_pb"; - -/** - * - * Example: Get idp attributes for bob and alice (both represented using an email address - * { - * "entities": [ - * { - * "id": "e1", - * "emailAddress": "bob@example.org" - * }, - * { - * "id": "e2", - * "emailAddress": "alice@example.org" - * } - * ] - * } - * - * - * @generated from message entityresolution.ResolveEntitiesRequest - */ -export const ResolveEntitiesRequest = /*@__PURE__*/ proto3.makeMessageType( - "entityresolution.ResolveEntitiesRequest", - () => [ - { no: 1, name: "entities", kind: "message", T: Entity, repeated: true }, - ], -); - -/** - * @generated from message entityresolution.EntityRepresentation - */ -export const EntityRepresentation = /*@__PURE__*/ proto3.makeMessageType( - "entityresolution.EntityRepresentation", - () => [ - { no: 1, name: "additional_props", kind: "message", T: Struct, repeated: true }, - { no: 2, name: "original_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * - * Example: Get idp attributes for bob and alice - * { - * "entity_representations": [ - * { - * "idp_entity_id": "e1", - * "additional_props": {"someAttr1":"someValue1"} - * }, - * { - * "idp_entity_id": "e2", - * "additional_props": {"someAttr2":"someValue2"} - * } - * ] - * } - * - * - * @generated from message entityresolution.ResolveEntitiesResponse - */ -export const ResolveEntitiesResponse = /*@__PURE__*/ proto3.makeMessageType( - "entityresolution.ResolveEntitiesResponse", - () => [ - { no: 1, name: "entity_representations", kind: "message", T: EntityRepresentation, repeated: true }, - ], -); - -/** - * @generated from message entityresolution.EntityNotFoundError - */ -export const EntityNotFoundError = /*@__PURE__*/ proto3.makeMessageType( - "entityresolution.EntityNotFoundError", - () => [ - { no: 1, name: "code", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - { no: 2, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "details", kind: "message", T: Any, repeated: true }, - { no: 4, name: "entity", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * - * Example: Get Entity chains for tokens aaaaaa and bbbbbb - * { - * "tokens": [ - * "aaaaaaa", - * "bbbbbbbb" - * ] - * } - * - * - * @generated from message entityresolution.CreateEntityChainFromJwtRequest - */ -export const CreateEntityChainFromJwtRequest = /*@__PURE__*/ proto3.makeMessageType( - "entityresolution.CreateEntityChainFromJwtRequest", - () => [ - { no: 1, name: "tokens", kind: "message", T: Token, repeated: true }, - ], -); - -/** - * - * Example: Return the entity chains from the provided tokens - * { - * "entity_chains": [ - * { - * "id": "tok1", - * "entities": [ - * { - * "clientId": "client1" - * } - * ] - * }, - * { - * "id": "tok2", - * "entities": [ - * { - * "userName": "alice", - * "clientId": "client2" - * } - * ] - * } - * ] - * } - * - * - * @generated from message entityresolution.CreateEntityChainFromJwtResponse - */ -export const CreateEntityChainFromJwtResponse = /*@__PURE__*/ proto3.makeMessageType( - "entityresolution.CreateEntityChainFromJwtResponse", - () => [ - { no: 1, name: "entity_chains", kind: "message", T: EntityChain, repeated: true }, - ], -); - diff --git a/lib/src/platform/entityresolution/entity_resolution_pb.ts b/lib/src/platform/entityresolution/entity_resolution_pb.ts new file mode 100644 index 00000000..1d19f238 --- /dev/null +++ b/lib/src/platform/entityresolution/entity_resolution_pb.ts @@ -0,0 +1,233 @@ +// @generated by protoc-gen-es v2.2.5 with parameter "target=ts,import_extension=.js" +// @generated from file entityresolution/entity_resolution.proto (package entityresolution, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1"; +import type { Entity, EntityChain, Token } from "../authorization/authorization_pb.js"; +import { file_authorization_authorization } from "../authorization/authorization_pb.js"; +import type { Any } from "@bufbuild/protobuf/wkt"; +import { file_google_protobuf_any, file_google_protobuf_struct } from "@bufbuild/protobuf/wkt"; +import { file_google_api_annotations } from "../google/api/annotations_pb.js"; +import type { JsonObject, Message } from "@bufbuild/protobuf"; + +/** + * Describes the file entityresolution/entity_resolution.proto. + */ +export const file_entityresolution_entity_resolution: GenFile = /*@__PURE__*/ + fileDesc("CihlbnRpdHlyZXNvbHV0aW9uL2VudGl0eV9yZXNvbHV0aW9uLnByb3RvEhBlbnRpdHlyZXNvbHV0aW9uIkEKFlJlc29sdmVFbnRpdGllc1JlcXVlc3QSJwoIZW50aXRpZXMYASADKAsyFS5hdXRob3JpemF0aW9uLkVudGl0eSJeChRFbnRpdHlSZXByZXNlbnRhdGlvbhIxChBhZGRpdGlvbmFsX3Byb3BzGAEgAygLMhcuZ29vZ2xlLnByb3RvYnVmLlN0cnVjdBITCgtvcmlnaW5hbF9pZBgCIAEoCSJhChdSZXNvbHZlRW50aXRpZXNSZXNwb25zZRJGChZlbnRpdHlfcmVwcmVzZW50YXRpb25zGAEgAygLMiYuZW50aXR5cmVzb2x1dGlvbi5FbnRpdHlSZXByZXNlbnRhdGlvbiJrChNFbnRpdHlOb3RGb3VuZEVycm9yEgwKBGNvZGUYASABKAUSDwoHbWVzc2FnZRgCIAEoCRIlCgdkZXRhaWxzGAMgAygLMhQuZ29vZ2xlLnByb3RvYnVmLkFueRIOCgZlbnRpdHkYBCABKAkiRwofQ3JlYXRlRW50aXR5Q2hhaW5Gcm9tSnd0UmVxdWVzdBIkCgZ0b2tlbnMYASADKAsyFC5hdXRob3JpemF0aW9uLlRva2VuIlUKIENyZWF0ZUVudGl0eUNoYWluRnJvbUp3dFJlc3BvbnNlEjEKDWVudGl0eV9jaGFpbnMYASADKAsyGi5hdXRob3JpemF0aW9uLkVudGl0eUNoYWluMtYCChdFbnRpdHlSZXNvbHV0aW9uU2VydmljZRKMAQoPUmVzb2x2ZUVudGl0aWVzEiguZW50aXR5cmVzb2x1dGlvbi5SZXNvbHZlRW50aXRpZXNSZXF1ZXN0GikuZW50aXR5cmVzb2x1dGlvbi5SZXNvbHZlRW50aXRpZXNSZXNwb25zZSIkgtPkkwIeOgEqIhkvZW50aXR5cmVzb2x1dGlvbi9yZXNvbHZlEqsBChhDcmVhdGVFbnRpdHlDaGFpbkZyb21Kd3QSMS5lbnRpdHlyZXNvbHV0aW9uLkNyZWF0ZUVudGl0eUNoYWluRnJvbUp3dFJlcXVlc3QaMi5lbnRpdHlyZXNvbHV0aW9uLkNyZWF0ZUVudGl0eUNoYWluRnJvbUp3dFJlc3BvbnNlIiiC0+STAiI6ASoiHS9lbnRpdHlyZXNvbHV0aW9uL2VudGl0eWNoYWluYgZwcm90bzM", [file_authorization_authorization, file_google_protobuf_struct, file_google_protobuf_any, file_google_api_annotations]); + +/** + * + * Example: Get idp attributes for bob and alice (both represented using an email address + * { + * "entities": [ + * { + * "id": "e1", + * "emailAddress": "bob@example.org" + * }, + * { + * "id": "e2", + * "emailAddress": "alice@example.org" + * } + * ] + * } + * + * + * @generated from message entityresolution.ResolveEntitiesRequest + */ +export type ResolveEntitiesRequest = Message<"entityresolution.ResolveEntitiesRequest"> & { + /** + * @generated from field: repeated authorization.Entity entities = 1; + */ + entities: Entity[]; +}; + +/** + * Describes the message entityresolution.ResolveEntitiesRequest. + * Use `create(ResolveEntitiesRequestSchema)` to create a new message. + */ +export const ResolveEntitiesRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_entityresolution_entity_resolution, 0); + +/** + * @generated from message entityresolution.EntityRepresentation + */ +export type EntityRepresentation = Message<"entityresolution.EntityRepresentation"> & { + /** + * @generated from field: repeated google.protobuf.Struct additional_props = 1; + */ + additionalProps: JsonObject[]; + + /** + * ephemeral entity id from the request + * + * @generated from field: string original_id = 2; + */ + originalId: string; +}; + +/** + * Describes the message entityresolution.EntityRepresentation. + * Use `create(EntityRepresentationSchema)` to create a new message. + */ +export const EntityRepresentationSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_entityresolution_entity_resolution, 1); + +/** + * + * Example: Get idp attributes for bob and alice + * { + * "entity_representations": [ + * { + * "idp_entity_id": "e1", + * "additional_props": {"someAttr1":"someValue1"} + * }, + * { + * "idp_entity_id": "e2", + * "additional_props": {"someAttr2":"someValue2"} + * } + * ] + * } + * + * + * @generated from message entityresolution.ResolveEntitiesResponse + */ +export type ResolveEntitiesResponse = Message<"entityresolution.ResolveEntitiesResponse"> & { + /** + * @generated from field: repeated entityresolution.EntityRepresentation entity_representations = 1; + */ + entityRepresentations: EntityRepresentation[]; +}; + +/** + * Describes the message entityresolution.ResolveEntitiesResponse. + * Use `create(ResolveEntitiesResponseSchema)` to create a new message. + */ +export const ResolveEntitiesResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_entityresolution_entity_resolution, 2); + +/** + * @generated from message entityresolution.EntityNotFoundError + */ +export type EntityNotFoundError = Message<"entityresolution.EntityNotFoundError"> & { + /** + * @generated from field: int32 code = 1; + */ + code: number; + + /** + * @generated from field: string message = 2; + */ + message: string; + + /** + * @generated from field: repeated google.protobuf.Any details = 3; + */ + details: Any[]; + + /** + * @generated from field: string entity = 4; + */ + entity: string; +}; + +/** + * Describes the message entityresolution.EntityNotFoundError. + * Use `create(EntityNotFoundErrorSchema)` to create a new message. + */ +export const EntityNotFoundErrorSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_entityresolution_entity_resolution, 3); + +/** + * + * Example: Get Entity chains for tokens aaaaaa and bbbbbb + * { + * "tokens": [ + * "aaaaaaa", + * "bbbbbbbb" + * ] + * } + * + * + * @generated from message entityresolution.CreateEntityChainFromJwtRequest + */ +export type CreateEntityChainFromJwtRequest = Message<"entityresolution.CreateEntityChainFromJwtRequest"> & { + /** + * @generated from field: repeated authorization.Token tokens = 1; + */ + tokens: Token[]; +}; + +/** + * Describes the message entityresolution.CreateEntityChainFromJwtRequest. + * Use `create(CreateEntityChainFromJwtRequestSchema)` to create a new message. + */ +export const CreateEntityChainFromJwtRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_entityresolution_entity_resolution, 4); + +/** + * + * Example: Return the entity chains from the provided tokens + * { + * "entity_chains": [ + * { + * "id": "tok1", + * "entities": [ + * { + * "clientId": "client1" + * } + * ] + * }, + * { + * "id": "tok2", + * "entities": [ + * { + * "userName": "alice", + * "clientId": "client2" + * } + * ] + * } + * ] + * } + * + * + * @generated from message entityresolution.CreateEntityChainFromJwtResponse + */ +export type CreateEntityChainFromJwtResponse = Message<"entityresolution.CreateEntityChainFromJwtResponse"> & { + /** + * @generated from field: repeated authorization.EntityChain entity_chains = 1; + */ + entityChains: EntityChain[]; +}; + +/** + * Describes the message entityresolution.CreateEntityChainFromJwtResponse. + * Use `create(CreateEntityChainFromJwtResponseSchema)` to create a new message. + */ +export const CreateEntityChainFromJwtResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_entityresolution_entity_resolution, 5); + +/** + * @generated from service entityresolution.EntityResolutionService + */ +export const EntityResolutionService: GenService<{ + /** + * @generated from rpc entityresolution.EntityResolutionService.ResolveEntities + */ + resolveEntities: { + methodKind: "unary"; + input: typeof ResolveEntitiesRequestSchema; + output: typeof ResolveEntitiesResponseSchema; + }, + /** + * @generated from rpc entityresolution.EntityResolutionService.CreateEntityChainFromJwt + */ + createEntityChainFromJwt: { + methodKind: "unary"; + input: typeof CreateEntityChainFromJwtRequestSchema; + output: typeof CreateEntityChainFromJwtResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_entityresolution_entity_resolution, 0); + diff --git a/lib/src/platform/google/api/annotations_pb.ts b/lib/src/platform/google/api/annotations_pb.ts new file mode 100644 index 00000000..cbe26cb1 --- /dev/null +++ b/lib/src/platform/google/api/annotations_pb.ts @@ -0,0 +1,39 @@ +// Copyright 2024 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 v2.2.5 with parameter "target=ts,import_extension=.js" +// @generated from file google/api/annotations.proto (package google.api, syntax proto3) +/* eslint-disable */ + +import type { GenExtension, GenFile } from "@bufbuild/protobuf/codegenv1"; +import { extDesc, fileDesc } from "@bufbuild/protobuf/codegenv1"; +import type { HttpRule } from "./http_pb.js"; +import { file_google_api_http } from "./http_pb.js"; +import type { MethodOptions } from "@bufbuild/protobuf/wkt"; +import { file_google_protobuf_descriptor } from "@bufbuild/protobuf/wkt"; + +/** + * Describes the file google/api/annotations.proto. + */ +export const file_google_api_annotations: GenFile = /*@__PURE__*/ + fileDesc("Chxnb29nbGUvYXBpL2Fubm90YXRpb25zLnByb3RvEgpnb29nbGUuYXBpOksKBGh0dHASHi5nb29nbGUucHJvdG9idWYuTWV0aG9kT3B0aW9ucxiwyrwiIAEoCzIULmdvb2dsZS5hcGkuSHR0cFJ1bGVSBGh0dHBCbgoOY29tLmdvb2dsZS5hcGlCEEFubm90YXRpb25zUHJvdG9QAVpBZ29vZ2xlLmdvbGFuZy5vcmcvZ2VucHJvdG8vZ29vZ2xlYXBpcy9hcGkvYW5ub3RhdGlvbnM7YW5ub3RhdGlvbnOiAgRHQVBJYgZwcm90bzM", [file_google_api_http, file_google_protobuf_descriptor]); + +/** + * See `HttpRule`. + * + * @generated from extension: google.api.HttpRule http = 72295728; + */ +export const http: GenExtension = /*@__PURE__*/ + extDesc(file_google_api_annotations, 0); + diff --git a/lib/src/platform/google/api/http_pb.ts b/lib/src/platform/google/api/http_pb.ts new file mode 100644 index 00000000..79337751 --- /dev/null +++ b/lib/src/platform/google/api/http_pb.ts @@ -0,0 +1,474 @@ +// Copyright 2024 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 v2.2.5 with parameter "target=ts,import_extension=.js" +// @generated from file google/api/http.proto (package google.api, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file google/api/http.proto. + */ +export const file_google_api_http: GenFile = /*@__PURE__*/ + fileDesc("ChVnb29nbGUvYXBpL2h0dHAucHJvdG8SCmdvb2dsZS5hcGkiVAoESHR0cBIjCgVydWxlcxgBIAMoCzIULmdvb2dsZS5hcGkuSHR0cFJ1bGUSJwofZnVsbHlfZGVjb2RlX3Jlc2VydmVkX2V4cGFuc2lvbhgCIAEoCCKBAgoISHR0cFJ1bGUSEAoIc2VsZWN0b3IYASABKAkSDQoDZ2V0GAIgASgJSAASDQoDcHV0GAMgASgJSAASDgoEcG9zdBgEIAEoCUgAEhAKBmRlbGV0ZRgFIAEoCUgAEg8KBXBhdGNoGAYgASgJSAASLwoGY3VzdG9tGAggASgLMh0uZ29vZ2xlLmFwaS5DdXN0b21IdHRwUGF0dGVybkgAEgwKBGJvZHkYByABKAkSFQoNcmVzcG9uc2VfYm9keRgMIAEoCRIxChNhZGRpdGlvbmFsX2JpbmRpbmdzGAsgAygLMhQuZ29vZ2xlLmFwaS5IdHRwUnVsZUIJCgdwYXR0ZXJuIi8KEUN1c3RvbUh0dHBQYXR0ZXJuEgwKBGtpbmQYASABKAkSDAoEcGF0aBgCIAEoCUJqCg5jb20uZ29vZ2xlLmFwaUIJSHR0cFByb3RvUAFaQWdvb2dsZS5nb2xhbmcub3JnL2dlbnByb3RvL2dvb2dsZWFwaXMvYXBpL2Fubm90YXRpb25zO2Fubm90YXRpb25z+AEBogIER0FQSWIGcHJvdG8z"); + +/** + * 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 type Http = Message<"google.api.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; +}; + +/** + * Describes the message google.api.Http. + * Use `create(HttpSchema)` to create a new message. + */ +export const HttpSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_google_api_http, 0); + +/** + * 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: `GET /v1/messages/123456` + * - gRPC: `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: `GET /v1/messages/123456?revision=2&sub.subfield=foo` + * - gRPC: `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: `PATCH /v1/messages/123456 { "text": "Hi!" }` + * - gRPC: `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: `PATCH /v1/messages/123456 { "text": "Hi!" }` + * - gRPC: `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: `GET /v1/messages/123456` + * - gRPC: `GetMessage(message_id: "123456")` + * + * - HTTP: `GET /v1/users/me/messages/123456` + * - gRPC: `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. + * + * The following example selects a gRPC method and applies an `HttpRule` to it: + * + * http: + * rules: + * - 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 type HttpRule = Message<"google.api.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[]; +}; + +/** + * Describes the message google.api.HttpRule. + * Use `create(HttpRuleSchema)` to create a new message. + */ +export const HttpRuleSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_google_api_http, 1); + +/** + * A custom pattern is used for defining custom HTTP verb. + * + * @generated from message google.api.CustomHttpPattern + */ +export type CustomHttpPattern = Message<"google.api.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; +}; + +/** + * Describes the message google.api.CustomHttpPattern. + * Use `create(CustomHttpPatternSchema)` to create a new message. + */ +export const CustomHttpPatternSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_google_api_http, 2); + diff --git a/lib/src/platform/kas/kas_connect.d.ts b/lib/src/platform/kas/kas_connect.d.ts deleted file mode 100644 index f9f30056..00000000 --- a/lib/src/platform/kas/kas_connect.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=js+dts,import_extension=none" -// @generated from file kas/kas.proto (package kas, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { InfoRequest, InfoResponse, LegacyPublicKeyRequest, PublicKeyRequest, PublicKeyResponse, RewrapRequest, RewrapResponse } from "./kas_pb"; -import { MethodKind, StringValue } from "@bufbuild/protobuf"; - -/** - * Get app info from the root path - * - * @generated from service kas.AccessService - */ -export declare const AccessService: { - readonly typeName: "kas.AccessService", - readonly methods: { - /** - * Get the current version of the service - * - * @generated from rpc kas.AccessService.Info - */ - readonly info: { - readonly name: "Info", - readonly I: typeof InfoRequest, - readonly O: typeof InfoResponse, - readonly kind: MethodKind.Unary, - }, - /** - * @generated from rpc kas.AccessService.PublicKey - */ - readonly publicKey: { - readonly name: "PublicKey", - readonly I: typeof PublicKeyRequest, - readonly O: typeof PublicKeyResponse, - readonly kind: MethodKind.Unary, - }, - /** - * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME - * - * @generated from rpc kas.AccessService.LegacyPublicKey - */ - readonly legacyPublicKey: { - readonly name: "LegacyPublicKey", - readonly I: typeof LegacyPublicKeyRequest, - readonly O: typeof StringValue, - readonly kind: MethodKind.Unary, - }, - /** - * @generated from rpc kas.AccessService.Rewrap - */ - readonly rewrap: { - readonly name: "Rewrap", - readonly I: typeof RewrapRequest, - readonly O: typeof RewrapResponse, - readonly kind: MethodKind.Unary, - }, - } -}; - diff --git a/lib/src/platform/kas/kas_connect.js b/lib/src/platform/kas/kas_connect.js deleted file mode 100644 index c366abf4..00000000 --- a/lib/src/platform/kas/kas_connect.js +++ /dev/null @@ -1,59 +0,0 @@ -// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=js+dts,import_extension=none" -// @generated from file kas/kas.proto (package kas, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { InfoRequest, InfoResponse, LegacyPublicKeyRequest, PublicKeyRequest, PublicKeyResponse, RewrapRequest, RewrapResponse } from "./kas_pb"; -import { MethodKind, StringValue } from "@bufbuild/protobuf"; - -/** - * Get app info from the root path - * - * @generated from service kas.AccessService - */ -export const AccessService = { - typeName: "kas.AccessService", - methods: { - /** - * Get the current version of the service - * - * @generated from rpc kas.AccessService.Info - */ - info: { - name: "Info", - I: InfoRequest, - O: InfoResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc kas.AccessService.PublicKey - */ - publicKey: { - name: "PublicKey", - I: PublicKeyRequest, - O: PublicKeyResponse, - kind: MethodKind.Unary, - }, - /** - * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME - * - * @generated from rpc kas.AccessService.LegacyPublicKey - */ - legacyPublicKey: { - name: "LegacyPublicKey", - I: LegacyPublicKeyRequest, - O: StringValue, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc kas.AccessService.Rewrap - */ - rewrap: { - name: "Rewrap", - I: RewrapRequest, - O: RewrapResponse, - kind: MethodKind.Unary, - }, - } -}; - diff --git a/lib/src/platform/kas/kas_pb.d.ts b/lib/src/platform/kas/kas_pb.d.ts deleted file mode 100644 index d8fa8ced..00000000 --- a/lib/src/platform/kas/kas_pb.d.ts +++ /dev/null @@ -1,200 +0,0 @@ -// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" -// @generated from file kas/kas.proto (package kas, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage, Value } from "@bufbuild/protobuf"; -import { Message, proto3 } from "@bufbuild/protobuf"; - -/** - * Intentionally empty. May include features later. - * - * @generated from message kas.InfoRequest - */ -export declare class InfoRequest extends Message { - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "kas.InfoRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): InfoRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): InfoRequest; - - static fromJsonString(jsonString: string, options?: Partial): InfoRequest; - - static equals(a: InfoRequest | PlainMessage | undefined, b: InfoRequest | PlainMessage | undefined): boolean; -} - -/** - * Service application level metadata - * - * @generated from message kas.InfoResponse - */ -export declare class InfoResponse extends Message { - /** - * @generated from field: string version = 1; - */ - version: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "kas.InfoResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): InfoResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): InfoResponse; - - static fromJsonString(jsonString: string, options?: Partial): InfoResponse; - - static equals(a: InfoResponse | PlainMessage | undefined, b: InfoResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message kas.LegacyPublicKeyRequest - */ -export declare class LegacyPublicKeyRequest extends Message { - /** - * @generated from field: string algorithm = 1; - */ - algorithm: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "kas.LegacyPublicKeyRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): LegacyPublicKeyRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): LegacyPublicKeyRequest; - - static fromJsonString(jsonString: string, options?: Partial): LegacyPublicKeyRequest; - - static equals(a: LegacyPublicKeyRequest | PlainMessage | undefined, b: LegacyPublicKeyRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message kas.PublicKeyRequest - */ -export declare class PublicKeyRequest extends Message { - /** - * @generated from field: string algorithm = 1; - */ - algorithm: string; - - /** - * @generated from field: string fmt = 2; - */ - fmt: string; - - /** - * @generated from field: string v = 3; - */ - v: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "kas.PublicKeyRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): PublicKeyRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): PublicKeyRequest; - - static fromJsonString(jsonString: string, options?: Partial): PublicKeyRequest; - - static equals(a: PublicKeyRequest | PlainMessage | undefined, b: PublicKeyRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message kas.PublicKeyResponse - */ -export declare class PublicKeyResponse extends Message { - /** - * @generated from field: string public_key = 1; - */ - publicKey: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "kas.PublicKeyResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): PublicKeyResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): PublicKeyResponse; - - static fromJsonString(jsonString: string, options?: Partial): PublicKeyResponse; - - static equals(a: PublicKeyResponse | PlainMessage | undefined, b: PublicKeyResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message kas.RewrapRequest - */ -export declare class RewrapRequest extends Message { - /** - * @generated from field: string signed_request_token = 1; - */ - signedRequestToken: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "kas.RewrapRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): RewrapRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): RewrapRequest; - - static fromJsonString(jsonString: string, options?: Partial): RewrapRequest; - - static equals(a: RewrapRequest | PlainMessage | undefined, b: RewrapRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message kas.RewrapResponse - */ -export declare class RewrapResponse extends Message { - /** - * @generated from field: map metadata = 1; - */ - metadata: { [key: string]: Value }; - - /** - * @generated from field: bytes entity_wrapped_key = 2; - */ - entityWrappedKey: Uint8Array; - - /** - * @generated from field: string session_public_key = 3; - */ - sessionPublicKey: string; - - /** - * @generated from field: string schema_version = 4; - */ - schemaVersion: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "kas.RewrapResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): RewrapResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): RewrapResponse; - - static fromJsonString(jsonString: string, options?: Partial): RewrapResponse; - - static equals(a: RewrapResponse | PlainMessage | undefined, b: RewrapResponse | PlainMessage | undefined): boolean; -} - diff --git a/lib/src/platform/kas/kas_pb.js b/lib/src/platform/kas/kas_pb.js deleted file mode 100644 index 73979da4..00000000 --- a/lib/src/platform/kas/kas_pb.js +++ /dev/null @@ -1,84 +0,0 @@ -// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" -// @generated from file kas/kas.proto (package kas, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { proto3, Value } from "@bufbuild/protobuf"; - -/** - * Intentionally empty. May include features later. - * - * @generated from message kas.InfoRequest - */ -export const InfoRequest = /*@__PURE__*/ proto3.makeMessageType( - "kas.InfoRequest", - [], -); - -/** - * Service application level metadata - * - * @generated from message kas.InfoResponse - */ -export const InfoResponse = /*@__PURE__*/ proto3.makeMessageType( - "kas.InfoResponse", - () => [ - { no: 1, name: "version", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message kas.LegacyPublicKeyRequest - */ -export const LegacyPublicKeyRequest = /*@__PURE__*/ proto3.makeMessageType( - "kas.LegacyPublicKeyRequest", - () => [ - { no: 1, name: "algorithm", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message kas.PublicKeyRequest - */ -export const PublicKeyRequest = /*@__PURE__*/ proto3.makeMessageType( - "kas.PublicKeyRequest", - () => [ - { no: 1, name: "algorithm", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "fmt", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "v", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message kas.PublicKeyResponse - */ -export const PublicKeyResponse = /*@__PURE__*/ proto3.makeMessageType( - "kas.PublicKeyResponse", - () => [ - { no: 1, name: "public_key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message kas.RewrapRequest - */ -export const RewrapRequest = /*@__PURE__*/ proto3.makeMessageType( - "kas.RewrapRequest", - () => [ - { no: 1, name: "signed_request_token", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message kas.RewrapResponse - */ -export const RewrapResponse = /*@__PURE__*/ proto3.makeMessageType( - "kas.RewrapResponse", - () => [ - { no: 1, name: "metadata", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: Value} }, - { no: 2, name: "entity_wrapped_key", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 3, name: "session_public_key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "schema_version", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - diff --git a/lib/src/platform/kas/kas_pb.ts b/lib/src/platform/kas/kas_pb.ts new file mode 100644 index 00000000..e4eebf55 --- /dev/null +++ b/lib/src/platform/kas/kas_pb.ts @@ -0,0 +1,484 @@ +// @generated by protoc-gen-es v2.2.5 with parameter "target=ts,import_extension=.js" +// @generated from file kas/kas.proto (package kas, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1"; +import { file_google_api_annotations } from "../google/api/annotations_pb.js"; +import type { StringValueSchema, Value } from "@bufbuild/protobuf/wkt"; +import { file_google_protobuf_struct, file_google_protobuf_wrappers } from "@bufbuild/protobuf/wkt"; +import { file_protoc_gen_openapiv2_options_annotations } from "../protoc-gen-openapiv2/options/annotations_pb.js"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file kas/kas.proto. + */ +export const file_kas_kas: GenFile = /*@__PURE__*/ + fileDesc("Cg1rYXMva2FzLnByb3RvEgNrYXMiDQoLSW5mb1JlcXVlc3QiHwoMSW5mb1Jlc3BvbnNlEg8KB3ZlcnNpb24YASABKAkiKwoWTGVnYWN5UHVibGljS2V5UmVxdWVzdBIRCglhbGdvcml0aG0YASABKAkiNQoNUG9saWN5QmluZGluZxIWCglhbGdvcml0aG0YASABKAlSA2FsZxIMCgRoYXNoGAIgASgJIvoBCglLZX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AEgASgJEiUKBXZhbHVlGAIgASgLMhYuZ29vZ2xlLnByb3RvYnVmLlZhbHVlOgI4ATLOAgoNQWNjZXNzU2VydmljZRJpCglQdWJsaWNLZXkSFS5rYXMuUHVibGljS2V5UmVxdWVzdBoWLmthcy5QdWJsaWNLZXlSZXNwb25zZSItkAIBkkEJSgcKAzIwMBIAgtPkkwIYEhYva2FzL3YyL2thc19wdWJsaWNfa2V5EngKD0xlZ2FjeVB1YmxpY0tleRIbLmthcy5MZWdhY3lQdWJsaWNLZXlSZXF1ZXN0GhwuZ29vZ2xlLnByb3RvYnVmLlN0cmluZ1ZhbHVlIiqQAgGSQQlKBwoDMjAwEgCC0+STAhUSEy9rYXMva2FzX3B1YmxpY19rZXkSWAoGUmV3cmFwEhIua2FzLlJld3JhcFJlcXVlc3QaEy5rYXMuUmV3cmFwUmVzcG9uc2UiJZJBCUoHCgMyMDASAILT5JMCEzoBKiIOL2thcy92Mi9yZXdyYXBCdpJBcxJxChpPcGVuVERGIEtleSBBY2Nlc3MgU2VydmljZSpMChJCU0QgMy1DbGF1c2UgQ2xlYXISNmh0dHBzOi8vZ2l0aHViLmNvbS9vcGVudGRmL2JhY2tlbmQvYmxvYi9tYXN0ZXIvTElDRU5TRTIFMS41LjBiBnByb3RvMw", [file_google_api_annotations, file_google_protobuf_struct, file_google_protobuf_wrappers, file_protoc_gen_openapiv2_options_annotations]); + +/** + * Intentionally empty. May include features later. + * + * @generated from message kas.InfoRequest + */ +export type InfoRequest = Message<"kas.InfoRequest"> & { +}; + +/** + * Describes the message kas.InfoRequest. + * Use `create(InfoRequestSchema)` to create a new message. + */ +export const InfoRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_kas_kas, 0); + +/** + * Service application level metadata + * + * @generated from message kas.InfoResponse + */ +export type InfoResponse = Message<"kas.InfoResponse"> & { + /** + * @generated from field: string version = 1; + */ + version: string; +}; + +/** + * Describes the message kas.InfoResponse. + * Use `create(InfoResponseSchema)` to create a new message. + */ +export const InfoResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_kas_kas, 1); + +/** + * @generated from message kas.LegacyPublicKeyRequest + */ +export type LegacyPublicKeyRequest = Message<"kas.LegacyPublicKeyRequest"> & { + /** + * @generated from field: string algorithm = 1; + */ + algorithm: string; +}; + +/** + * Describes the message kas.LegacyPublicKeyRequest. + * Use `create(LegacyPublicKeyRequestSchema)` to create a new message. + */ +export const LegacyPublicKeyRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_kas_kas, 2); + +/** + * @generated from message kas.PolicyBinding + */ +export type PolicyBinding = Message<"kas.PolicyBinding"> & { + /** + * @generated from field: string algorithm = 1 [json_name = "alg"]; + */ + algorithm: string; + + /** + * @generated from field: string hash = 2; + */ + hash: string; +}; + +/** + * Describes the message kas.PolicyBinding. + * Use `create(PolicyBindingSchema)` to create a new message. + */ +export const PolicyBindingSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_kas_kas, 3); + +/** + * @generated from message kas.KeyAccess + */ +export type KeyAccess = Message<"kas.KeyAccess"> & { + /** + * @generated from field: string encrypted_metadata = 1; + */ + encryptedMetadata: string; + + /** + * @generated from field: kas.PolicyBinding policy_binding = 2; + */ + policyBinding?: PolicyBinding; + + /** + * @generated from field: string protocol = 3; + */ + protocol: string; + + /** + * @generated from field: string key_type = 4 [json_name = "type"]; + */ + keyType: string; + + /** + * @generated from field: string kas_url = 5 [json_name = "url"]; + */ + kasUrl: string; + + /** + * @generated from field: string kid = 6; + */ + kid: string; + + /** + * @generated from field: string split_id = 7 [json_name = "sid"]; + */ + splitId: string; + + /** + * @generated from field: bytes wrapped_key = 8; + */ + wrappedKey: Uint8Array; + + /** + * header is only used for NanoTDFs + * + * @generated from field: bytes header = 9; + */ + header: Uint8Array; + + /** + * For wrapping with an ECDH derived key, when type=ec-wrapped. + * Should be a PEM-encoded PKCS#8 (asn.1) value. + * + * @generated from field: string ephemeral_public_key = 10; + */ + ephemeralPublicKey: string; +}; + +/** + * Describes the message kas.KeyAccess. + * Use `create(KeyAccessSchema)` to create a new message. + */ +export const KeyAccessSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_kas_kas, 4); + +/** + * @generated from message kas.UnsignedRewrapRequest + */ +export type UnsignedRewrapRequest = Message<"kas.UnsignedRewrapRequest"> & { + /** + * @generated from field: string client_public_key = 1; + */ + clientPublicKey: string; + + /** + * @generated from field: repeated kas.UnsignedRewrapRequest.WithPolicyRequest requests = 2; + */ + requests: UnsignedRewrapRequest_WithPolicyRequest[]; + + /** + * Used for legacy non-bulk requests + * + * @generated from field: kas.KeyAccess key_access = 3 [deprecated = true]; + * @deprecated + */ + keyAccess?: KeyAccess; + + /** + * Used for legacy non-bulk requests + * + * @generated from field: string policy = 4 [deprecated = true]; + * @deprecated + */ + policy: string; + + /** + * Used for legacy non-bulk requests + * + * @generated from field: string algorithm = 5 [deprecated = true]; + * @deprecated + */ + algorithm: string; +}; + +/** + * Describes the message kas.UnsignedRewrapRequest. + * Use `create(UnsignedRewrapRequestSchema)` to create a new message. + */ +export const UnsignedRewrapRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_kas_kas, 5); + +/** + * @generated from message kas.UnsignedRewrapRequest.WithPolicy + */ +export type UnsignedRewrapRequest_WithPolicy = Message<"kas.UnsignedRewrapRequest.WithPolicy"> & { + /** + * @generated from field: string id = 1; + */ + id: string; + + /** + * @generated from field: string body = 2; + */ + body: string; +}; + +/** + * Describes the message kas.UnsignedRewrapRequest.WithPolicy. + * Use `create(UnsignedRewrapRequest_WithPolicySchema)` to create a new message. + */ +export const UnsignedRewrapRequest_WithPolicySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_kas_kas, 5, 0); + +/** + * @generated from message kas.UnsignedRewrapRequest.WithKeyAccessObject + */ +export type UnsignedRewrapRequest_WithKeyAccessObject = Message<"kas.UnsignedRewrapRequest.WithKeyAccessObject"> & { + /** + * @generated from field: string key_access_object_id = 1; + */ + keyAccessObjectId: string; + + /** + * @generated from field: kas.KeyAccess key_access_object = 2; + */ + keyAccessObject?: KeyAccess; +}; + +/** + * Describes the message kas.UnsignedRewrapRequest.WithKeyAccessObject. + * Use `create(UnsignedRewrapRequest_WithKeyAccessObjectSchema)` to create a new message. + */ +export const UnsignedRewrapRequest_WithKeyAccessObjectSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_kas_kas, 5, 1); + +/** + * @generated from message kas.UnsignedRewrapRequest.WithPolicyRequest + */ +export type UnsignedRewrapRequest_WithPolicyRequest = Message<"kas.UnsignedRewrapRequest.WithPolicyRequest"> & { + /** + * @generated from field: repeated kas.UnsignedRewrapRequest.WithKeyAccessObject key_access_objects = 1; + */ + keyAccessObjects: UnsignedRewrapRequest_WithKeyAccessObject[]; + + /** + * @generated from field: kas.UnsignedRewrapRequest.WithPolicy policy = 2; + */ + policy?: UnsignedRewrapRequest_WithPolicy; + + /** + * @generated from field: string algorithm = 3; + */ + algorithm: string; +}; + +/** + * Describes the message kas.UnsignedRewrapRequest.WithPolicyRequest. + * Use `create(UnsignedRewrapRequest_WithPolicyRequestSchema)` to create a new message. + */ +export const UnsignedRewrapRequest_WithPolicyRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_kas_kas, 5, 2); + +/** + * @generated from message kas.PublicKeyRequest + */ +export type PublicKeyRequest = Message<"kas.PublicKeyRequest"> & { + /** + * @generated from field: string algorithm = 1; + */ + algorithm: string; + + /** + * @generated from field: string fmt = 2; + */ + fmt: string; + + /** + * @generated from field: string v = 3; + */ + v: string; +}; + +/** + * Describes the message kas.PublicKeyRequest. + * Use `create(PublicKeyRequestSchema)` to create a new message. + */ +export const PublicKeyRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_kas_kas, 6); + +/** + * @generated from message kas.PublicKeyResponse + */ +export type PublicKeyResponse = Message<"kas.PublicKeyResponse"> & { + /** + * @generated from field: string public_key = 1; + */ + publicKey: string; + + /** + * @generated from field: string kid = 2; + */ + kid: string; +}; + +/** + * Describes the message kas.PublicKeyResponse. + * Use `create(PublicKeyResponseSchema)` to create a new message. + */ +export const PublicKeyResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_kas_kas, 7); + +/** + * @generated from message kas.RewrapRequest + */ +export type RewrapRequest = Message<"kas.RewrapRequest"> & { + /** + * @generated from field: string signed_request_token = 1; + */ + signedRequestToken: string; +}; + +/** + * Describes the message kas.RewrapRequest. + * Use `create(RewrapRequestSchema)` to create a new message. + */ +export const RewrapRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_kas_kas, 8); + +/** + * @generated from message kas.KeyAccessRewrapResult + */ +export type KeyAccessRewrapResult = Message<"kas.KeyAccessRewrapResult"> & { + /** + * @generated from field: map metadata = 1; + */ + metadata: { [key: string]: Value }; + + /** + * @generated from field: string key_access_object_id = 2; + */ + keyAccessObjectId: string; + + /** + * @generated from field: string status = 3; + */ + status: string; + + /** + * @generated from oneof kas.KeyAccessRewrapResult.result + */ + result: { + /** + * @generated from field: bytes kas_wrapped_key = 4; + */ + value: Uint8Array; + case: "kasWrappedKey"; + } | { + /** + * @generated from field: string error = 5; + */ + value: string; + case: "error"; + } | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message kas.KeyAccessRewrapResult. + * Use `create(KeyAccessRewrapResultSchema)` to create a new message. + */ +export const KeyAccessRewrapResultSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_kas_kas, 9); + +/** + * @generated from message kas.PolicyRewrapResult + */ +export type PolicyRewrapResult = Message<"kas.PolicyRewrapResult"> & { + /** + * @generated from field: string policy_id = 1; + */ + policyId: string; + + /** + * @generated from field: repeated kas.KeyAccessRewrapResult results = 2; + */ + results: KeyAccessRewrapResult[]; +}; + +/** + * Describes the message kas.PolicyRewrapResult. + * Use `create(PolicyRewrapResultSchema)` to create a new message. + */ +export const PolicyRewrapResultSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_kas_kas, 10); + +/** + * @generated from message kas.RewrapResponse + */ +export type RewrapResponse = Message<"kas.RewrapResponse"> & { + /** + * @generated from field: map metadata = 1 [deprecated = true]; + * @deprecated + */ + metadata: { [key: string]: Value }; + + /** + * @generated from field: bytes entity_wrapped_key = 2 [deprecated = true]; + * @deprecated + */ + entityWrappedKey: Uint8Array; + + /** + * @generated from field: string session_public_key = 3; + */ + sessionPublicKey: string; + + /** + * @generated from field: string schema_version = 4 [deprecated = true]; + * @deprecated + */ + schemaVersion: string; + + /** + * New Rewrap API changes + * + * @generated from field: repeated kas.PolicyRewrapResult responses = 5; + */ + responses: PolicyRewrapResult[]; +}; + +/** + * Describes the message kas.RewrapResponse. + * Use `create(RewrapResponseSchema)` to create a new message. + */ +export const RewrapResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_kas_kas, 11); + +/** + * Get app info from the root path + * + * @generated from service kas.AccessService + */ +export const AccessService: GenService<{ + /** + * @generated from rpc kas.AccessService.PublicKey + */ + publicKey: { + methodKind: "unary"; + input: typeof PublicKeyRequestSchema; + output: typeof PublicKeyResponseSchema; + }, + /** + * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + * + * @generated from rpc kas.AccessService.LegacyPublicKey + */ + legacyPublicKey: { + methodKind: "unary"; + input: typeof LegacyPublicKeyRequestSchema; + output: typeof StringValueSchema; + }, + /** + * @generated from rpc kas.AccessService.Rewrap + */ + rewrap: { + methodKind: "unary"; + input: typeof RewrapRequestSchema; + output: typeof RewrapResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_kas_kas, 0); + diff --git a/lib/src/platform/policy/actions/actions_pb.ts b/lib/src/platform/policy/actions/actions_pb.ts new file mode 100644 index 00000000..1e9621c1 --- /dev/null +++ b/lib/src/platform/policy/actions/actions_pb.ts @@ -0,0 +1,312 @@ +// @generated by protoc-gen-es v2.2.5 with parameter "target=ts,import_extension=.js" +// @generated from file policy/actions/actions.proto (package policy.actions, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1"; +import { file_buf_validate_validate } from "../../buf/validate/validate_pb.js"; +import type { MetadataMutable, MetadataUpdateEnum } from "../../common/common_pb.js"; +import { file_common_common } from "../../common/common_pb.js"; +import type { Action, SubjectMapping } from "../objects_pb.js"; +import { file_policy_objects } from "../objects_pb.js"; +import type { PageRequest, PageResponse } from "../selectors_pb.js"; +import { file_policy_selectors } from "../selectors_pb.js"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file policy/actions/actions.proto. + */ +export const file_policy_actions_actions: GenFile = /*@__PURE__*/ + fileDesc("Chxwb2xpY3kvYWN0aW9ucy9hY3Rpb25zLnByb3RvEg5wb2xpY3kuYWN0aW9ucyLhAgoQR2V0QWN0aW9uUmVxdWVzdBIWCgJpZBgBIAEoCUIIukgFcgOwAQFIABKfAgoEbmFtZRgCIAEoCUKOArpIigK6AYECChJhY3Rpb25fbmFtZV9mb3JtYXQSrQFBY3Rpb24gbmFtZSBtdXN0IGJlIGFuIGFscGhhbnVtZXJpYyBzdHJpbmcsIGFsbG93aW5nIGh5cGhlbnMgYW5kIHVuZGVyc2NvcmVzIGJ1dCBub3QgYXMgdGhlIGZpcnN0IG9yIGxhc3QgY2hhcmFjdGVyLiBUaGUgc3RvcmVkIGFjdGlvbiBuYW1lIHdpbGwgYmUgbm9ybWFsaXplZCB0byBsb3dlciBjYXNlLho7dGhpcy5tYXRjaGVzKCdeW2EtekEtWjAtOV0oPzpbYS16QS1aMC05Xy1dKlthLXpBLVowLTldKT8kJylyAxj9AUgAQhMKCmlkZW50aWZpZXISBbpIAggBImUKEUdldEFjdGlvblJlc3BvbnNlEh4KBmFjdGlvbhgBIAEoCzIOLnBvbGljeS5BY3Rpb24SMAoQc3ViamVjdF9tYXBwaW5ncxgCIAMoCzIWLnBvbGljeS5TdWJqZWN0TWFwcGluZyI9ChJMaXN0QWN0aW9uc1JlcXVlc3QSJwoKcGFnaW5hdGlvbhgKIAEoCzITLnBvbGljeS5QYWdlUmVxdWVzdCKRAQoTTG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dBokLnBvbGljeS5hY3Rpb25zLkRlbGV0ZUFjdGlvblJlc3BvbnNlIgBiBnByb3RvMw", [file_buf_validate_validate, file_common_common, file_policy_objects, file_policy_selectors]); + +/** + * @generated from message policy.actions.GetActionRequest + */ +export type GetActionRequest = Message<"policy.actions.GetActionRequest"> & { + /** + * Required + * + * @generated from oneof policy.actions.GetActionRequest.identifier + */ + identifier: { + /** + * @generated from field: string id = 1; + */ + value: string; + case: "id"; + } | { + /** + * @generated from field: string name = 2; + */ + value: string; + case: "name"; + } | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message policy.actions.GetActionRequest. + * Use `create(GetActionRequestSchema)` to create a new message. + */ +export const GetActionRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_actions_actions, 0); + +/** + * @generated from message policy.actions.GetActionResponse + */ +export type GetActionResponse = Message<"policy.actions.GetActionResponse"> & { + /** + * @generated from field: policy.Action action = 1; + */ + action?: Action; + + /** + * Subject Mappings driving entitlement to the action + * + * @generated from field: repeated policy.SubjectMapping subject_mappings = 2; + */ + subjectMappings: SubjectMapping[]; +}; + +/** + * Describes the message policy.actions.GetActionResponse. + * Use `create(GetActionResponseSchema)` to create a new message. + */ +export const GetActionResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_actions_actions, 1); + +/** + * @generated from message policy.actions.ListActionsRequest + */ +export type ListActionsRequest = Message<"policy.actions.ListActionsRequest"> & { + /** + * Optional + * + * @generated from field: policy.PageRequest pagination = 10; + */ + pagination?: PageRequest; +}; + +/** + * Describes the message policy.actions.ListActionsRequest. + * Use `create(ListActionsRequestSchema)` to create a new message. + */ +export const ListActionsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_actions_actions, 2); + +/** + * @generated from message policy.actions.ListActionsResponse + */ +export type ListActionsResponse = Message<"policy.actions.ListActionsResponse"> & { + /** + * @generated from field: repeated policy.Action actions_standard = 1; + */ + actionsStandard: Action[]; + + /** + * @generated from field: repeated policy.Action actions_custom = 2; + */ + actionsCustom: Action[]; + + /** + * @generated from field: policy.PageResponse pagination = 10; + */ + pagination?: PageResponse; +}; + +/** + * Describes the message policy.actions.ListActionsResponse. + * Use `create(ListActionsResponseSchema)` to create a new message. + */ +export const ListActionsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_actions_actions, 3); + +/** + * Create a new Custom action name with optional metadata. + * Creation of Standard actions is not supported. + * + * @generated from message policy.actions.CreateActionRequest + */ +export type CreateActionRequest = Message<"policy.actions.CreateActionRequest"> & { + /** + * Required + * + * @generated from field: string name = 1; + */ + name: string; + + /** + * Optional + * + * @generated from field: common.MetadataMutable metadata = 100; + */ + metadata?: MetadataMutable; +}; + +/** + * Describes the message policy.actions.CreateActionRequest. + * Use `create(CreateActionRequestSchema)` to create a new message. + */ +export const CreateActionRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_actions_actions, 4); + +/** + * @generated from message policy.actions.CreateActionResponse + */ +export type CreateActionResponse = Message<"policy.actions.CreateActionResponse"> & { + /** + * @generated from field: policy.Action action = 1; + */ + action?: Action; +}; + +/** + * Describes the message policy.actions.CreateActionResponse. + * Use `create(CreateActionResponseSchema)` to create a new message. + */ +export const CreateActionResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_actions_actions, 5); + +/** + * Metadata may be updated for either Custom or Standard actions. + * Names may only be updated for Custom actions. + * + * @generated from message policy.actions.UpdateActionRequest + */ +export type UpdateActionRequest = Message<"policy.actions.UpdateActionRequest"> & { + /** + * Required + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Optional + * Custom actions only: replaces the existing action name + * + * @generated from field: string name = 2; + */ + name: string; + + /** + * Common metadata + * + * @generated from field: common.MetadataMutable metadata = 100; + */ + metadata?: MetadataMutable; + + /** + * @generated from field: common.MetadataUpdateEnum metadata_update_behavior = 101; + */ + metadataUpdateBehavior: MetadataUpdateEnum; +}; + +/** + * Describes the message policy.actions.UpdateActionRequest. + * Use `create(UpdateActionRequestSchema)` to create a new message. + */ +export const UpdateActionRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_actions_actions, 6); + +/** + * @generated from message policy.actions.UpdateActionResponse + */ +export type UpdateActionResponse = Message<"policy.actions.UpdateActionResponse"> & { + /** + * @generated from field: policy.Action action = 1; + */ + action?: Action; +}; + +/** + * Describes the message policy.actions.UpdateActionResponse. + * Use `create(UpdateActionResponseSchema)` to create a new message. + */ +export const UpdateActionResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_actions_actions, 7); + +/** + * Custom only: deletion of Standard actions is not supported. + * + * @generated from message policy.actions.DeleteActionRequest + */ +export type DeleteActionRequest = Message<"policy.actions.DeleteActionRequest"> & { + /** + * Required + * + * @generated from field: string id = 1; + */ + id: string; +}; + +/** + * Describes the message policy.actions.DeleteActionRequest. + * Use `create(DeleteActionRequestSchema)` to create a new message. + */ +export const DeleteActionRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_actions_actions, 8); + +/** + * @generated from message policy.actions.DeleteActionResponse + */ +export type DeleteActionResponse = Message<"policy.actions.DeleteActionResponse"> & { + /** + * @generated from field: policy.Action action = 1; + */ + action?: Action; +}; + +/** + * Describes the message policy.actions.DeleteActionResponse. + * Use `create(DeleteActionResponseSchema)` to create a new message. + */ +export const DeleteActionResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_actions_actions, 9); + +/** + * @generated from service policy.actions.ActionService + */ +export const ActionService: GenService<{ + /** + * @generated from rpc policy.actions.ActionService.GetAction + */ + getAction: { + methodKind: "unary"; + input: typeof GetActionRequestSchema; + output: typeof GetActionResponseSchema; + }, + /** + * @generated from rpc policy.actions.ActionService.ListActions + */ + listActions: { + methodKind: "unary"; + input: typeof ListActionsRequestSchema; + output: typeof ListActionsResponseSchema; + }, + /** + * @generated from rpc policy.actions.ActionService.CreateAction + */ + createAction: { + methodKind: "unary"; + input: typeof CreateActionRequestSchema; + output: typeof CreateActionResponseSchema; + }, + /** + * @generated from rpc policy.actions.ActionService.UpdateAction + */ + updateAction: { + methodKind: "unary"; + input: typeof UpdateActionRequestSchema; + output: typeof UpdateActionResponseSchema; + }, + /** + * @generated from rpc policy.actions.ActionService.DeleteAction + */ + deleteAction: { + methodKind: "unary"; + input: typeof DeleteActionRequestSchema; + output: typeof DeleteActionResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_policy_actions_actions, 0); + diff --git a/lib/src/platform/policy/attributes/attributes_connect.d.ts b/lib/src/platform/policy/attributes/attributes_connect.d.ts deleted file mode 100644 index a6712801..00000000 --- a/lib/src/platform/policy/attributes/attributes_connect.d.ts +++ /dev/null @@ -1,168 +0,0 @@ -// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=js+dts,import_extension=none" -// @generated from file policy/attributes/attributes.proto (package policy.attributes, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { AssignKeyAccessServerToAttributeRequest, AssignKeyAccessServerToAttributeResponse, AssignKeyAccessServerToValueRequest, AssignKeyAccessServerToValueResponse, CreateAttributeRequest, CreateAttributeResponse, CreateAttributeValueRequest, CreateAttributeValueResponse, DeactivateAttributeRequest, DeactivateAttributeResponse, DeactivateAttributeValueRequest, DeactivateAttributeValueResponse, GetAttributeRequest, GetAttributeResponse, GetAttributeValueRequest, GetAttributeValueResponse, GetAttributeValuesByFqnsRequest, GetAttributeValuesByFqnsResponse, ListAttributesRequest, ListAttributesResponse, ListAttributeValuesRequest, ListAttributeValuesResponse, RemoveKeyAccessServerFromAttributeRequest, RemoveKeyAccessServerFromAttributeResponse, RemoveKeyAccessServerFromValueRequest, RemoveKeyAccessServerFromValueResponse, UpdateAttributeRequest, UpdateAttributeResponse, UpdateAttributeValueRequest, UpdateAttributeValueResponse } from "./attributes_pb"; -import { MethodKind } from "@bufbuild/protobuf"; - -/** - * / - * / Attribute Service - * / - * - * @generated from service policy.attributes.AttributesService - */ -export declare const AttributesService: { - readonly typeName: "policy.attributes.AttributesService", - readonly methods: { - /** - * --------------------------------------* - * Attribute RPCs - * --------------------------------------- - * - * @generated from rpc policy.attributes.AttributesService.ListAttributes - */ - readonly listAttributes: { - readonly name: "ListAttributes", - readonly I: typeof ListAttributesRequest, - readonly O: typeof ListAttributesResponse, - readonly kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.attributes.AttributesService.ListAttributeValues - */ - readonly listAttributeValues: { - readonly name: "ListAttributeValues", - readonly I: typeof ListAttributeValuesRequest, - readonly O: typeof ListAttributeValuesResponse, - readonly kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.attributes.AttributesService.GetAttribute - */ - readonly getAttribute: { - readonly name: "GetAttribute", - readonly I: typeof GetAttributeRequest, - readonly O: typeof GetAttributeResponse, - readonly kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.attributes.AttributesService.GetAttributeValuesByFqns - */ - readonly getAttributeValuesByFqns: { - readonly name: "GetAttributeValuesByFqns", - readonly I: typeof GetAttributeValuesByFqnsRequest, - readonly O: typeof GetAttributeValuesByFqnsResponse, - readonly kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.attributes.AttributesService.CreateAttribute - */ - readonly createAttribute: { - readonly name: "CreateAttribute", - readonly I: typeof CreateAttributeRequest, - readonly O: typeof CreateAttributeResponse, - readonly kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.attributes.AttributesService.UpdateAttribute - */ - readonly updateAttribute: { - readonly name: "UpdateAttribute", - readonly I: typeof UpdateAttributeRequest, - readonly O: typeof UpdateAttributeResponse, - readonly kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.attributes.AttributesService.DeactivateAttribute - */ - readonly deactivateAttribute: { - readonly name: "DeactivateAttribute", - readonly I: typeof DeactivateAttributeRequest, - readonly O: typeof DeactivateAttributeResponse, - readonly kind: MethodKind.Unary, - }, - /** - * --------------------------------------* - * Value RPCs - * --------------------------------------- - * - * @generated from rpc policy.attributes.AttributesService.GetAttributeValue - */ - readonly getAttributeValue: { - readonly name: "GetAttributeValue", - readonly I: typeof GetAttributeValueRequest, - readonly O: typeof GetAttributeValueResponse, - readonly kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.attributes.AttributesService.CreateAttributeValue - */ - readonly createAttributeValue: { - readonly name: "CreateAttributeValue", - readonly I: typeof CreateAttributeValueRequest, - readonly O: typeof CreateAttributeValueResponse, - readonly kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.attributes.AttributesService.UpdateAttributeValue - */ - readonly updateAttributeValue: { - readonly name: "UpdateAttributeValue", - readonly I: typeof UpdateAttributeValueRequest, - readonly O: typeof UpdateAttributeValueResponse, - readonly kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.attributes.AttributesService.DeactivateAttributeValue - */ - readonly deactivateAttributeValue: { - readonly name: "DeactivateAttributeValue", - readonly I: typeof DeactivateAttributeValueRequest, - readonly O: typeof DeactivateAttributeValueResponse, - readonly kind: MethodKind.Unary, - }, - /** - * --------------------------------------* - * Attribute <> Key Access Server RPCs - * --------------------------------------- - * - * @generated from rpc policy.attributes.AttributesService.AssignKeyAccessServerToAttribute - */ - readonly assignKeyAccessServerToAttribute: { - readonly name: "AssignKeyAccessServerToAttribute", - readonly I: typeof AssignKeyAccessServerToAttributeRequest, - readonly O: typeof AssignKeyAccessServerToAttributeResponse, - readonly kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.attributes.AttributesService.RemoveKeyAccessServerFromAttribute - */ - readonly removeKeyAccessServerFromAttribute: { - readonly name: "RemoveKeyAccessServerFromAttribute", - readonly I: typeof RemoveKeyAccessServerFromAttributeRequest, - readonly O: typeof RemoveKeyAccessServerFromAttributeResponse, - readonly kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.attributes.AttributesService.AssignKeyAccessServerToValue - */ - readonly assignKeyAccessServerToValue: { - readonly name: "AssignKeyAccessServerToValue", - readonly I: typeof AssignKeyAccessServerToValueRequest, - readonly O: typeof AssignKeyAccessServerToValueResponse, - readonly kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.attributes.AttributesService.RemoveKeyAccessServerFromValue - */ - readonly removeKeyAccessServerFromValue: { - readonly name: "RemoveKeyAccessServerFromValue", - readonly I: typeof RemoveKeyAccessServerFromValueRequest, - readonly O: typeof RemoveKeyAccessServerFromValueResponse, - readonly kind: MethodKind.Unary, - }, - } -}; - diff --git a/lib/src/platform/policy/attributes/attributes_connect.js b/lib/src/platform/policy/attributes/attributes_connect.js deleted file mode 100644 index 7cfe5ad0..00000000 --- a/lib/src/platform/policy/attributes/attributes_connect.js +++ /dev/null @@ -1,168 +0,0 @@ -// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=js+dts,import_extension=none" -// @generated from file policy/attributes/attributes.proto (package policy.attributes, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { AssignKeyAccessServerToAttributeRequest, AssignKeyAccessServerToAttributeResponse, AssignKeyAccessServerToValueRequest, AssignKeyAccessServerToValueResponse, CreateAttributeRequest, CreateAttributeResponse, CreateAttributeValueRequest, CreateAttributeValueResponse, DeactivateAttributeRequest, DeactivateAttributeResponse, DeactivateAttributeValueRequest, DeactivateAttributeValueResponse, GetAttributeRequest, GetAttributeResponse, GetAttributeValueRequest, GetAttributeValueResponse, GetAttributeValuesByFqnsRequest, GetAttributeValuesByFqnsResponse, ListAttributesRequest, ListAttributesResponse, ListAttributeValuesRequest, ListAttributeValuesResponse, RemoveKeyAccessServerFromAttributeRequest, RemoveKeyAccessServerFromAttributeResponse, RemoveKeyAccessServerFromValueRequest, RemoveKeyAccessServerFromValueResponse, UpdateAttributeRequest, UpdateAttributeResponse, UpdateAttributeValueRequest, UpdateAttributeValueResponse } from "./attributes_pb"; -import { MethodKind } from "@bufbuild/protobuf"; - -/** - * / - * / Attribute Service - * / - * - * @generated from service policy.attributes.AttributesService - */ -export const AttributesService = { - typeName: "policy.attributes.AttributesService", - methods: { - /** - * --------------------------------------* - * Attribute RPCs - * --------------------------------------- - * - * @generated from rpc policy.attributes.AttributesService.ListAttributes - */ - listAttributes: { - name: "ListAttributes", - I: ListAttributesRequest, - O: ListAttributesResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.attributes.AttributesService.ListAttributeValues - */ - listAttributeValues: { - name: "ListAttributeValues", - I: ListAttributeValuesRequest, - O: ListAttributeValuesResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.attributes.AttributesService.GetAttribute - */ - getAttribute: { - name: "GetAttribute", - I: GetAttributeRequest, - O: GetAttributeResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.attributes.AttributesService.GetAttributeValuesByFqns - */ - getAttributeValuesByFqns: { - name: "GetAttributeValuesByFqns", - I: GetAttributeValuesByFqnsRequest, - O: GetAttributeValuesByFqnsResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.attributes.AttributesService.CreateAttribute - */ - createAttribute: { - name: "CreateAttribute", - I: CreateAttributeRequest, - O: CreateAttributeResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.attributes.AttributesService.UpdateAttribute - */ - updateAttribute: { - name: "UpdateAttribute", - I: UpdateAttributeRequest, - O: UpdateAttributeResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.attributes.AttributesService.DeactivateAttribute - */ - deactivateAttribute: { - name: "DeactivateAttribute", - I: DeactivateAttributeRequest, - O: DeactivateAttributeResponse, - kind: MethodKind.Unary, - }, - /** - * --------------------------------------* - * Value RPCs - * --------------------------------------- - * - * @generated from rpc policy.attributes.AttributesService.GetAttributeValue - */ - getAttributeValue: { - name: "GetAttributeValue", - I: GetAttributeValueRequest, - O: GetAttributeValueResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.attributes.AttributesService.CreateAttributeValue - */ - createAttributeValue: { - name: "CreateAttributeValue", - I: CreateAttributeValueRequest, - O: CreateAttributeValueResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.attributes.AttributesService.UpdateAttributeValue - */ - updateAttributeValue: { - name: "UpdateAttributeValue", - I: UpdateAttributeValueRequest, - O: UpdateAttributeValueResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.attributes.AttributesService.DeactivateAttributeValue - */ - deactivateAttributeValue: { - name: "DeactivateAttributeValue", - I: DeactivateAttributeValueRequest, - O: DeactivateAttributeValueResponse, - kind: MethodKind.Unary, - }, - /** - * --------------------------------------* - * Attribute <> Key Access Server RPCs - * --------------------------------------- - * - * @generated from rpc policy.attributes.AttributesService.AssignKeyAccessServerToAttribute - */ - assignKeyAccessServerToAttribute: { - name: "AssignKeyAccessServerToAttribute", - I: AssignKeyAccessServerToAttributeRequest, - O: AssignKeyAccessServerToAttributeResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.attributes.AttributesService.RemoveKeyAccessServerFromAttribute - */ - removeKeyAccessServerFromAttribute: { - name: "RemoveKeyAccessServerFromAttribute", - I: RemoveKeyAccessServerFromAttributeRequest, - O: RemoveKeyAccessServerFromAttributeResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.attributes.AttributesService.AssignKeyAccessServerToValue - */ - assignKeyAccessServerToValue: { - name: "AssignKeyAccessServerToValue", - I: AssignKeyAccessServerToValueRequest, - O: AssignKeyAccessServerToValueResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.attributes.AttributesService.RemoveKeyAccessServerFromValue - */ - removeKeyAccessServerFromValue: { - name: "RemoveKeyAccessServerFromValue", - I: RemoveKeyAccessServerFromValueRequest, - O: RemoveKeyAccessServerFromValueResponse, - kind: MethodKind.Unary, - }, - } -}; - diff --git a/lib/src/platform/policy/attributes/attributes_pb.d.ts b/lib/src/platform/policy/attributes/attributes_pb.d.ts deleted file mode 100644 index e4141626..00000000 --- a/lib/src/platform/policy/attributes/attributes_pb.d.ts +++ /dev/null @@ -1,929 +0,0 @@ -// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" -// @generated from file policy/attributes/attributes.proto (package policy.attributes, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3 } from "@bufbuild/protobuf"; -import type { ActiveStateEnum, MetadataMutable, MetadataUpdateEnum } from "../../common/common_pb"; -import type { Attribute, AttributeRuleTypeEnum, Value } from "../objects_pb"; -import type { AttributeValueSelector } from "../selectors_pb"; - -/** - * @generated from message policy.attributes.AttributeKeyAccessServer - */ -export declare class AttributeKeyAccessServer extends Message { - /** - * @generated from field: string attribute_id = 1; - */ - attributeId: string; - - /** - * @generated from field: string key_access_server_id = 2; - */ - keyAccessServerId: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.attributes.AttributeKeyAccessServer"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): AttributeKeyAccessServer; - - static fromJson(jsonValue: JsonValue, options?: Partial): AttributeKeyAccessServer; - - static fromJsonString(jsonString: string, options?: Partial): AttributeKeyAccessServer; - - static equals(a: AttributeKeyAccessServer | PlainMessage | undefined, b: AttributeKeyAccessServer | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.attributes.ValueKeyAccessServer - */ -export declare class ValueKeyAccessServer extends Message { - /** - * @generated from field: string value_id = 1; - */ - valueId: string; - - /** - * @generated from field: string key_access_server_id = 2; - */ - keyAccessServerId: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.attributes.ValueKeyAccessServer"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): ValueKeyAccessServer; - - static fromJson(jsonValue: JsonValue, options?: Partial): ValueKeyAccessServer; - - static fromJsonString(jsonString: string, options?: Partial): ValueKeyAccessServer; - - static equals(a: ValueKeyAccessServer | PlainMessage | undefined, b: ValueKeyAccessServer | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.attributes.ListAttributesRequest - */ -export declare class ListAttributesRequest extends Message { - /** - * ACTIVE by default when not specified - * - * @generated from field: common.ActiveStateEnum state = 1; - */ - state: ActiveStateEnum; - - /** - * can be id or name - * - * @generated from field: string namespace = 2; - */ - namespace: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.attributes.ListAttributesRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): ListAttributesRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): ListAttributesRequest; - - static fromJsonString(jsonString: string, options?: Partial): ListAttributesRequest; - - static equals(a: ListAttributesRequest | PlainMessage | undefined, b: ListAttributesRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.attributes.ListAttributesResponse - */ -export declare class ListAttributesResponse extends Message { - /** - * @generated from field: repeated policy.Attribute attributes = 1; - */ - attributes: Attribute[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.attributes.ListAttributesResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): ListAttributesResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): ListAttributesResponse; - - static fromJsonString(jsonString: string, options?: Partial): ListAttributesResponse; - - static equals(a: ListAttributesResponse | PlainMessage | undefined, b: ListAttributesResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.attributes.GetAttributeRequest - */ -export declare class GetAttributeRequest extends Message { - /** - * @generated from field: string id = 1; - */ - id: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.attributes.GetAttributeRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetAttributeRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetAttributeRequest; - - static fromJsonString(jsonString: string, options?: Partial): GetAttributeRequest; - - static equals(a: GetAttributeRequest | PlainMessage | undefined, b: GetAttributeRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.attributes.GetAttributeResponse - */ -export declare class GetAttributeResponse extends Message { - /** - * @generated from field: policy.Attribute attribute = 1; - */ - attribute?: Attribute; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.attributes.GetAttributeResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetAttributeResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetAttributeResponse; - - static fromJsonString(jsonString: string, options?: Partial): GetAttributeResponse; - - static equals(a: GetAttributeResponse | PlainMessage | undefined, b: GetAttributeResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.attributes.CreateAttributeRequest - */ -export declare class CreateAttributeRequest extends Message { - /** - * Required - * - * @generated from field: string namespace_id = 1; - */ - namespaceId: string; - - /** - * @generated from field: string name = 2; - */ - name: string; - - /** - * @generated from field: policy.AttributeRuleTypeEnum rule = 3; - */ - rule: AttributeRuleTypeEnum; - - /** - * Optional attribute values (when provided) must be alphanumeric strings, allowing hyphens and underscores but not as the first or last character. - * The stored attribute value will be normalized to lower case. - * - * @generated from field: repeated string values = 4; - */ - values: string[]; - - /** - * Optional - * - * @generated from field: common.MetadataMutable metadata = 100; - */ - metadata?: MetadataMutable; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.attributes.CreateAttributeRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateAttributeRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateAttributeRequest; - - static fromJsonString(jsonString: string, options?: Partial): CreateAttributeRequest; - - static equals(a: CreateAttributeRequest | PlainMessage | undefined, b: CreateAttributeRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.attributes.CreateAttributeResponse - */ -export declare class CreateAttributeResponse extends Message { - /** - * @generated from field: policy.Attribute attribute = 1; - */ - attribute?: Attribute; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.attributes.CreateAttributeResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateAttributeResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateAttributeResponse; - - static fromJsonString(jsonString: string, options?: Partial): CreateAttributeResponse; - - static equals(a: CreateAttributeResponse | PlainMessage | undefined, b: CreateAttributeResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.attributes.UpdateAttributeRequest - */ -export declare class UpdateAttributeRequest extends Message { - /** - * Required - * - * @generated from field: string id = 1; - */ - id: string; - - /** - * Optional - * - * @generated from field: common.MetadataMutable metadata = 100; - */ - metadata?: MetadataMutable; - - /** - * @generated from field: common.MetadataUpdateEnum metadata_update_behavior = 101; - */ - metadataUpdateBehavior: MetadataUpdateEnum; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.attributes.UpdateAttributeRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): UpdateAttributeRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): UpdateAttributeRequest; - - static fromJsonString(jsonString: string, options?: Partial): UpdateAttributeRequest; - - static equals(a: UpdateAttributeRequest | PlainMessage | undefined, b: UpdateAttributeRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.attributes.UpdateAttributeResponse - */ -export declare class UpdateAttributeResponse extends Message { - /** - * @generated from field: policy.Attribute attribute = 1; - */ - attribute?: Attribute; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.attributes.UpdateAttributeResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): UpdateAttributeResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): UpdateAttributeResponse; - - static fromJsonString(jsonString: string, options?: Partial): UpdateAttributeResponse; - - static equals(a: UpdateAttributeResponse | PlainMessage | undefined, b: UpdateAttributeResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.attributes.DeactivateAttributeRequest - */ -export declare class DeactivateAttributeRequest extends Message { - /** - * @generated from field: string id = 1; - */ - id: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.attributes.DeactivateAttributeRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): DeactivateAttributeRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): DeactivateAttributeRequest; - - static fromJsonString(jsonString: string, options?: Partial): DeactivateAttributeRequest; - - static equals(a: DeactivateAttributeRequest | PlainMessage | undefined, b: DeactivateAttributeRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.attributes.DeactivateAttributeResponse - */ -export declare class DeactivateAttributeResponse extends Message { - /** - * @generated from field: policy.Attribute attribute = 1; - */ - attribute?: Attribute; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.attributes.DeactivateAttributeResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): DeactivateAttributeResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): DeactivateAttributeResponse; - - static fromJsonString(jsonString: string, options?: Partial): DeactivateAttributeResponse; - - static equals(a: DeactivateAttributeResponse | PlainMessage | undefined, b: DeactivateAttributeResponse | PlainMessage | undefined): boolean; -} - -/** - * / - * / Value RPC messages - * / - * - * @generated from message policy.attributes.GetAttributeValueRequest - */ -export declare class GetAttributeValueRequest extends Message { - /** - * @generated from field: string id = 1; - */ - id: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.attributes.GetAttributeValueRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetAttributeValueRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetAttributeValueRequest; - - static fromJsonString(jsonString: string, options?: Partial): GetAttributeValueRequest; - - static equals(a: GetAttributeValueRequest | PlainMessage | undefined, b: GetAttributeValueRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.attributes.GetAttributeValueResponse - */ -export declare class GetAttributeValueResponse extends Message { - /** - * @generated from field: policy.Value value = 1; - */ - value?: Value; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.attributes.GetAttributeValueResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetAttributeValueResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetAttributeValueResponse; - - static fromJsonString(jsonString: string, options?: Partial): GetAttributeValueResponse; - - static equals(a: GetAttributeValueResponse | PlainMessage | undefined, b: GetAttributeValueResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.attributes.ListAttributeValuesRequest - */ -export declare class ListAttributeValuesRequest extends Message { - /** - * @generated from field: string attribute_id = 1; - */ - attributeId: string; - - /** - * ACTIVE by default when not specified - * - * @generated from field: common.ActiveStateEnum state = 2; - */ - state: ActiveStateEnum; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.attributes.ListAttributeValuesRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): ListAttributeValuesRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): ListAttributeValuesRequest; - - static fromJsonString(jsonString: string, options?: Partial): ListAttributeValuesRequest; - - static equals(a: ListAttributeValuesRequest | PlainMessage | undefined, b: ListAttributeValuesRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.attributes.ListAttributeValuesResponse - */ -export declare class ListAttributeValuesResponse extends Message { - /** - * @generated from field: repeated policy.Value values = 1; - */ - values: Value[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.attributes.ListAttributeValuesResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): ListAttributeValuesResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): ListAttributeValuesResponse; - - static fromJsonString(jsonString: string, options?: Partial): ListAttributeValuesResponse; - - static equals(a: ListAttributeValuesResponse | PlainMessage | undefined, b: ListAttributeValuesResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.attributes.CreateAttributeValueRequest - */ -export declare class CreateAttributeValueRequest extends Message { - /** - * Required - * - * @generated from field: string attribute_id = 1; - */ - attributeId: string; - - /** - * @generated from field: string value = 2; - */ - value: string; - - /** - * Optional - * - * @generated from field: repeated string members = 3; - */ - members: string[]; - - /** - * Common metadata - * - * @generated from field: common.MetadataMutable metadata = 100; - */ - metadata?: MetadataMutable; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.attributes.CreateAttributeValueRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateAttributeValueRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateAttributeValueRequest; - - static fromJsonString(jsonString: string, options?: Partial): CreateAttributeValueRequest; - - static equals(a: CreateAttributeValueRequest | PlainMessage | undefined, b: CreateAttributeValueRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.attributes.CreateAttributeValueResponse - */ -export declare class CreateAttributeValueResponse extends Message { - /** - * @generated from field: policy.Value value = 1; - */ - value?: Value; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.attributes.CreateAttributeValueResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateAttributeValueResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateAttributeValueResponse; - - static fromJsonString(jsonString: string, options?: Partial): CreateAttributeValueResponse; - - static equals(a: CreateAttributeValueResponse | PlainMessage | undefined, b: CreateAttributeValueResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.attributes.UpdateAttributeValueRequest - */ -export declare class UpdateAttributeValueRequest extends Message { - /** - * @generated from field: string id = 1; - */ - id: string; - - /** - * Optional - * - * @generated from field: repeated string members = 4; - */ - members: string[]; - - /** - * Common metadata - * - * @generated from field: common.MetadataMutable metadata = 100; - */ - metadata?: MetadataMutable; - - /** - * @generated from field: common.MetadataUpdateEnum metadata_update_behavior = 101; - */ - metadataUpdateBehavior: MetadataUpdateEnum; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.attributes.UpdateAttributeValueRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): UpdateAttributeValueRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): UpdateAttributeValueRequest; - - static fromJsonString(jsonString: string, options?: Partial): UpdateAttributeValueRequest; - - static equals(a: UpdateAttributeValueRequest | PlainMessage | undefined, b: UpdateAttributeValueRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.attributes.UpdateAttributeValueResponse - */ -export declare class UpdateAttributeValueResponse extends Message { - /** - * @generated from field: policy.Value value = 1; - */ - value?: Value; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.attributes.UpdateAttributeValueResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): UpdateAttributeValueResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): UpdateAttributeValueResponse; - - static fromJsonString(jsonString: string, options?: Partial): UpdateAttributeValueResponse; - - static equals(a: UpdateAttributeValueResponse | PlainMessage | undefined, b: UpdateAttributeValueResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.attributes.DeactivateAttributeValueRequest - */ -export declare class DeactivateAttributeValueRequest extends Message { - /** - * @generated from field: string id = 1; - */ - id: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.attributes.DeactivateAttributeValueRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): DeactivateAttributeValueRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): DeactivateAttributeValueRequest; - - static fromJsonString(jsonString: string, options?: Partial): DeactivateAttributeValueRequest; - - static equals(a: DeactivateAttributeValueRequest | PlainMessage | undefined, b: DeactivateAttributeValueRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.attributes.DeactivateAttributeValueResponse - */ -export declare class DeactivateAttributeValueResponse extends Message { - /** - * @generated from field: policy.Value value = 1; - */ - value?: Value; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.attributes.DeactivateAttributeValueResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): DeactivateAttributeValueResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): DeactivateAttributeValueResponse; - - static fromJsonString(jsonString: string, options?: Partial): DeactivateAttributeValueResponse; - - static equals(a: DeactivateAttributeValueResponse | PlainMessage | undefined, b: DeactivateAttributeValueResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.attributes.GetAttributeValuesByFqnsRequest - */ -export declare class GetAttributeValuesByFqnsRequest extends Message { - /** - * Required - * Fully Qualified Names of attribute values (i.e. https:///attr//value/), normalized to lower case. - * - * @generated from field: repeated string fqns = 1; - */ - fqns: string[]; - - /** - * @generated from field: policy.AttributeValueSelector with_value = 2; - */ - withValue?: AttributeValueSelector; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.attributes.GetAttributeValuesByFqnsRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetAttributeValuesByFqnsRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetAttributeValuesByFqnsRequest; - - static fromJsonString(jsonString: string, options?: Partial): GetAttributeValuesByFqnsRequest; - - static equals(a: GetAttributeValuesByFqnsRequest | PlainMessage | undefined, b: GetAttributeValuesByFqnsRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.attributes.GetAttributeValuesByFqnsResponse - */ -export declare class GetAttributeValuesByFqnsResponse extends Message { - /** - * map of FQNs to complete attributes and the one selected value - * - * @generated from field: map fqn_attribute_values = 1; - */ - fqnAttributeValues: { [key: string]: GetAttributeValuesByFqnsResponse_AttributeAndValue }; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.attributes.GetAttributeValuesByFqnsResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetAttributeValuesByFqnsResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetAttributeValuesByFqnsResponse; - - static fromJsonString(jsonString: string, options?: Partial): GetAttributeValuesByFqnsResponse; - - static equals(a: GetAttributeValuesByFqnsResponse | PlainMessage | undefined, b: GetAttributeValuesByFqnsResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue - */ -export declare class GetAttributeValuesByFqnsResponse_AttributeAndValue extends Message { - /** - * @generated from field: policy.Attribute attribute = 1; - */ - attribute?: Attribute; - - /** - * @generated from field: policy.Value value = 2; - */ - value?: Value; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetAttributeValuesByFqnsResponse_AttributeAndValue; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetAttributeValuesByFqnsResponse_AttributeAndValue; - - static fromJsonString(jsonString: string, options?: Partial): GetAttributeValuesByFqnsResponse_AttributeAndValue; - - static equals(a: GetAttributeValuesByFqnsResponse_AttributeAndValue | PlainMessage | undefined, b: GetAttributeValuesByFqnsResponse_AttributeAndValue | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.attributes.AssignKeyAccessServerToAttributeRequest - */ -export declare class AssignKeyAccessServerToAttributeRequest extends Message { - /** - * @generated from field: policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1; - */ - attributeKeyAccessServer?: AttributeKeyAccessServer; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.attributes.AssignKeyAccessServerToAttributeRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): AssignKeyAccessServerToAttributeRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): AssignKeyAccessServerToAttributeRequest; - - static fromJsonString(jsonString: string, options?: Partial): AssignKeyAccessServerToAttributeRequest; - - static equals(a: AssignKeyAccessServerToAttributeRequest | PlainMessage | undefined, b: AssignKeyAccessServerToAttributeRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.attributes.AssignKeyAccessServerToAttributeResponse - */ -export declare class AssignKeyAccessServerToAttributeResponse extends Message { - /** - * @generated from field: policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1; - */ - attributeKeyAccessServer?: AttributeKeyAccessServer; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.attributes.AssignKeyAccessServerToAttributeResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): AssignKeyAccessServerToAttributeResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): AssignKeyAccessServerToAttributeResponse; - - static fromJsonString(jsonString: string, options?: Partial): AssignKeyAccessServerToAttributeResponse; - - static equals(a: AssignKeyAccessServerToAttributeResponse | PlainMessage | undefined, b: AssignKeyAccessServerToAttributeResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.attributes.RemoveKeyAccessServerFromAttributeRequest - */ -export declare class RemoveKeyAccessServerFromAttributeRequest extends Message { - /** - * @generated from field: policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1; - */ - attributeKeyAccessServer?: AttributeKeyAccessServer; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.attributes.RemoveKeyAccessServerFromAttributeRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): RemoveKeyAccessServerFromAttributeRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): RemoveKeyAccessServerFromAttributeRequest; - - static fromJsonString(jsonString: string, options?: Partial): RemoveKeyAccessServerFromAttributeRequest; - - static equals(a: RemoveKeyAccessServerFromAttributeRequest | PlainMessage | undefined, b: RemoveKeyAccessServerFromAttributeRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.attributes.RemoveKeyAccessServerFromAttributeResponse - */ -export declare class RemoveKeyAccessServerFromAttributeResponse extends Message { - /** - * @generated from field: policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1; - */ - attributeKeyAccessServer?: AttributeKeyAccessServer; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.attributes.RemoveKeyAccessServerFromAttributeResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): RemoveKeyAccessServerFromAttributeResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): RemoveKeyAccessServerFromAttributeResponse; - - static fromJsonString(jsonString: string, options?: Partial): RemoveKeyAccessServerFromAttributeResponse; - - static equals(a: RemoveKeyAccessServerFromAttributeResponse | PlainMessage | undefined, b: RemoveKeyAccessServerFromAttributeResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.attributes.AssignKeyAccessServerToValueRequest - */ -export declare class AssignKeyAccessServerToValueRequest extends Message { - /** - * @generated from field: policy.attributes.ValueKeyAccessServer value_key_access_server = 1; - */ - valueKeyAccessServer?: ValueKeyAccessServer; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.attributes.AssignKeyAccessServerToValueRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): AssignKeyAccessServerToValueRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): AssignKeyAccessServerToValueRequest; - - static fromJsonString(jsonString: string, options?: Partial): AssignKeyAccessServerToValueRequest; - - static equals(a: AssignKeyAccessServerToValueRequest | PlainMessage | undefined, b: AssignKeyAccessServerToValueRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.attributes.AssignKeyAccessServerToValueResponse - */ -export declare class AssignKeyAccessServerToValueResponse extends Message { - /** - * @generated from field: policy.attributes.ValueKeyAccessServer value_key_access_server = 1; - */ - valueKeyAccessServer?: ValueKeyAccessServer; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.attributes.AssignKeyAccessServerToValueResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): AssignKeyAccessServerToValueResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): AssignKeyAccessServerToValueResponse; - - static fromJsonString(jsonString: string, options?: Partial): AssignKeyAccessServerToValueResponse; - - static equals(a: AssignKeyAccessServerToValueResponse | PlainMessage | undefined, b: AssignKeyAccessServerToValueResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.attributes.RemoveKeyAccessServerFromValueRequest - */ -export declare class RemoveKeyAccessServerFromValueRequest extends Message { - /** - * @generated from field: policy.attributes.ValueKeyAccessServer value_key_access_server = 1; - */ - valueKeyAccessServer?: ValueKeyAccessServer; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.attributes.RemoveKeyAccessServerFromValueRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): RemoveKeyAccessServerFromValueRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): RemoveKeyAccessServerFromValueRequest; - - static fromJsonString(jsonString: string, options?: Partial): RemoveKeyAccessServerFromValueRequest; - - static equals(a: RemoveKeyAccessServerFromValueRequest | PlainMessage | undefined, b: RemoveKeyAccessServerFromValueRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.attributes.RemoveKeyAccessServerFromValueResponse - */ -export declare class RemoveKeyAccessServerFromValueResponse extends Message { - /** - * @generated from field: policy.attributes.ValueKeyAccessServer value_key_access_server = 1; - */ - valueKeyAccessServer?: ValueKeyAccessServer; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.attributes.RemoveKeyAccessServerFromValueResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): RemoveKeyAccessServerFromValueResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): RemoveKeyAccessServerFromValueResponse; - - static fromJsonString(jsonString: string, options?: Partial): RemoveKeyAccessServerFromValueResponse; - - static equals(a: RemoveKeyAccessServerFromValueResponse | PlainMessage | undefined, b: RemoveKeyAccessServerFromValueResponse | PlainMessage | undefined): boolean; -} - diff --git a/lib/src/platform/policy/attributes/attributes_pb.js b/lib/src/platform/policy/attributes/attributes_pb.js deleted file mode 100644 index a8eba6fc..00000000 --- a/lib/src/platform/policy/attributes/attributes_pb.js +++ /dev/null @@ -1,363 +0,0 @@ -// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" -// @generated from file policy/attributes/attributes.proto (package policy.attributes, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { proto3 } from "@bufbuild/protobuf"; -import { ActiveStateEnum, MetadataMutable, MetadataUpdateEnum } from "../../common/common_pb"; -import { Attribute, AttributeRuleTypeEnum, Value } from "../objects_pb"; -import { AttributeValueSelector } from "../selectors_pb"; - -/** - * @generated from message policy.attributes.AttributeKeyAccessServer - */ -export const AttributeKeyAccessServer = /*@__PURE__*/ proto3.makeMessageType( - "policy.attributes.AttributeKeyAccessServer", - () => [ - { no: 1, name: "attribute_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "key_access_server_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message policy.attributes.ValueKeyAccessServer - */ -export const ValueKeyAccessServer = /*@__PURE__*/ proto3.makeMessageType( - "policy.attributes.ValueKeyAccessServer", - () => [ - { no: 1, name: "value_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "key_access_server_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message policy.attributes.ListAttributesRequest - */ -export const ListAttributesRequest = /*@__PURE__*/ proto3.makeMessageType( - "policy.attributes.ListAttributesRequest", - () => [ - { no: 1, name: "state", kind: "enum", T: proto3.getEnumType(ActiveStateEnum) }, - { no: 2, name: "namespace", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message policy.attributes.ListAttributesResponse - */ -export const ListAttributesResponse = /*@__PURE__*/ proto3.makeMessageType( - "policy.attributes.ListAttributesResponse", - () => [ - { no: 1, name: "attributes", kind: "message", T: Attribute, repeated: true }, - ], -); - -/** - * @generated from message policy.attributes.GetAttributeRequest - */ -export const GetAttributeRequest = /*@__PURE__*/ proto3.makeMessageType( - "policy.attributes.GetAttributeRequest", - () => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message policy.attributes.GetAttributeResponse - */ -export const GetAttributeResponse = /*@__PURE__*/ proto3.makeMessageType( - "policy.attributes.GetAttributeResponse", - () => [ - { no: 1, name: "attribute", kind: "message", T: Attribute }, - ], -); - -/** - * @generated from message policy.attributes.CreateAttributeRequest - */ -export const CreateAttributeRequest = /*@__PURE__*/ proto3.makeMessageType( - "policy.attributes.CreateAttributeRequest", - () => [ - { no: 1, name: "namespace_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "rule", kind: "enum", T: proto3.getEnumType(AttributeRuleTypeEnum) }, - { no: 4, name: "values", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 100, name: "metadata", kind: "message", T: MetadataMutable }, - ], -); - -/** - * @generated from message policy.attributes.CreateAttributeResponse - */ -export const CreateAttributeResponse = /*@__PURE__*/ proto3.makeMessageType( - "policy.attributes.CreateAttributeResponse", - () => [ - { no: 1, name: "attribute", kind: "message", T: Attribute }, - ], -); - -/** - * @generated from message policy.attributes.UpdateAttributeRequest - */ -export const UpdateAttributeRequest = /*@__PURE__*/ proto3.makeMessageType( - "policy.attributes.UpdateAttributeRequest", - () => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 100, name: "metadata", kind: "message", T: MetadataMutable }, - { no: 101, name: "metadata_update_behavior", kind: "enum", T: proto3.getEnumType(MetadataUpdateEnum) }, - ], -); - -/** - * @generated from message policy.attributes.UpdateAttributeResponse - */ -export const UpdateAttributeResponse = /*@__PURE__*/ proto3.makeMessageType( - "policy.attributes.UpdateAttributeResponse", - () => [ - { no: 1, name: "attribute", kind: "message", T: Attribute }, - ], -); - -/** - * @generated from message policy.attributes.DeactivateAttributeRequest - */ -export const DeactivateAttributeRequest = /*@__PURE__*/ proto3.makeMessageType( - "policy.attributes.DeactivateAttributeRequest", - () => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message policy.attributes.DeactivateAttributeResponse - */ -export const DeactivateAttributeResponse = /*@__PURE__*/ proto3.makeMessageType( - "policy.attributes.DeactivateAttributeResponse", - () => [ - { no: 1, name: "attribute", kind: "message", T: Attribute }, - ], -); - -/** - * / - * / Value RPC messages - * / - * - * @generated from message policy.attributes.GetAttributeValueRequest - */ -export const GetAttributeValueRequest = /*@__PURE__*/ proto3.makeMessageType( - "policy.attributes.GetAttributeValueRequest", - () => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message policy.attributes.GetAttributeValueResponse - */ -export const GetAttributeValueResponse = /*@__PURE__*/ proto3.makeMessageType( - "policy.attributes.GetAttributeValueResponse", - () => [ - { no: 1, name: "value", kind: "message", T: Value }, - ], -); - -/** - * @generated from message policy.attributes.ListAttributeValuesRequest - */ -export const ListAttributeValuesRequest = /*@__PURE__*/ proto3.makeMessageType( - "policy.attributes.ListAttributeValuesRequest", - () => [ - { no: 1, name: "attribute_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "state", kind: "enum", T: proto3.getEnumType(ActiveStateEnum) }, - ], -); - -/** - * @generated from message policy.attributes.ListAttributeValuesResponse - */ -export const ListAttributeValuesResponse = /*@__PURE__*/ proto3.makeMessageType( - "policy.attributes.ListAttributeValuesResponse", - () => [ - { no: 1, name: "values", kind: "message", T: Value, repeated: true }, - ], -); - -/** - * @generated from message policy.attributes.CreateAttributeValueRequest - */ -export const CreateAttributeValueRequest = /*@__PURE__*/ proto3.makeMessageType( - "policy.attributes.CreateAttributeValueRequest", - () => [ - { no: 1, name: "attribute_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "members", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 100, name: "metadata", kind: "message", T: MetadataMutable }, - ], -); - -/** - * @generated from message policy.attributes.CreateAttributeValueResponse - */ -export const CreateAttributeValueResponse = /*@__PURE__*/ proto3.makeMessageType( - "policy.attributes.CreateAttributeValueResponse", - () => [ - { no: 1, name: "value", kind: "message", T: Value }, - ], -); - -/** - * @generated from message policy.attributes.UpdateAttributeValueRequest - */ -export const UpdateAttributeValueRequest = /*@__PURE__*/ proto3.makeMessageType( - "policy.attributes.UpdateAttributeValueRequest", - () => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "members", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 100, name: "metadata", kind: "message", T: MetadataMutable }, - { no: 101, name: "metadata_update_behavior", kind: "enum", T: proto3.getEnumType(MetadataUpdateEnum) }, - ], -); - -/** - * @generated from message policy.attributes.UpdateAttributeValueResponse - */ -export const UpdateAttributeValueResponse = /*@__PURE__*/ proto3.makeMessageType( - "policy.attributes.UpdateAttributeValueResponse", - () => [ - { no: 1, name: "value", kind: "message", T: Value }, - ], -); - -/** - * @generated from message policy.attributes.DeactivateAttributeValueRequest - */ -export const DeactivateAttributeValueRequest = /*@__PURE__*/ proto3.makeMessageType( - "policy.attributes.DeactivateAttributeValueRequest", - () => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message policy.attributes.DeactivateAttributeValueResponse - */ -export const DeactivateAttributeValueResponse = /*@__PURE__*/ proto3.makeMessageType( - "policy.attributes.DeactivateAttributeValueResponse", - () => [ - { no: 1, name: "value", kind: "message", T: Value }, - ], -); - -/** - * @generated from message policy.attributes.GetAttributeValuesByFqnsRequest - */ -export const GetAttributeValuesByFqnsRequest = /*@__PURE__*/ proto3.makeMessageType( - "policy.attributes.GetAttributeValuesByFqnsRequest", - () => [ - { no: 1, name: "fqns", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 2, name: "with_value", kind: "message", T: AttributeValueSelector }, - ], -); - -/** - * @generated from message policy.attributes.GetAttributeValuesByFqnsResponse - */ -export const GetAttributeValuesByFqnsResponse = /*@__PURE__*/ proto3.makeMessageType( - "policy.attributes.GetAttributeValuesByFqnsResponse", - () => [ - { no: 1, name: "fqn_attribute_values", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: GetAttributeValuesByFqnsResponse_AttributeAndValue} }, - ], -); - -/** - * @generated from message policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue - */ -export const GetAttributeValuesByFqnsResponse_AttributeAndValue = /*@__PURE__*/ proto3.makeMessageType( - "policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue", - () => [ - { no: 1, name: "attribute", kind: "message", T: Attribute }, - { no: 2, name: "value", kind: "message", T: Value }, - ], - {localName: "GetAttributeValuesByFqnsResponse_AttributeAndValue"}, -); - -/** - * @generated from message policy.attributes.AssignKeyAccessServerToAttributeRequest - */ -export const AssignKeyAccessServerToAttributeRequest = /*@__PURE__*/ proto3.makeMessageType( - "policy.attributes.AssignKeyAccessServerToAttributeRequest", - () => [ - { no: 1, name: "attribute_key_access_server", kind: "message", T: AttributeKeyAccessServer }, - ], -); - -/** - * @generated from message policy.attributes.AssignKeyAccessServerToAttributeResponse - */ -export const AssignKeyAccessServerToAttributeResponse = /*@__PURE__*/ proto3.makeMessageType( - "policy.attributes.AssignKeyAccessServerToAttributeResponse", - () => [ - { no: 1, name: "attribute_key_access_server", kind: "message", T: AttributeKeyAccessServer }, - ], -); - -/** - * @generated from message policy.attributes.RemoveKeyAccessServerFromAttributeRequest - */ -export const RemoveKeyAccessServerFromAttributeRequest = /*@__PURE__*/ proto3.makeMessageType( - "policy.attributes.RemoveKeyAccessServerFromAttributeRequest", - () => [ - { no: 1, name: "attribute_key_access_server", kind: "message", T: AttributeKeyAccessServer }, - ], -); - -/** - * @generated from message policy.attributes.RemoveKeyAccessServerFromAttributeResponse - */ -export const RemoveKeyAccessServerFromAttributeResponse = /*@__PURE__*/ proto3.makeMessageType( - "policy.attributes.RemoveKeyAccessServerFromAttributeResponse", - () => [ - { no: 1, name: "attribute_key_access_server", kind: "message", T: AttributeKeyAccessServer }, - ], -); - -/** - * @generated from message policy.attributes.AssignKeyAccessServerToValueRequest - */ -export const AssignKeyAccessServerToValueRequest = /*@__PURE__*/ proto3.makeMessageType( - "policy.attributes.AssignKeyAccessServerToValueRequest", - () => [ - { no: 1, name: "value_key_access_server", kind: "message", T: ValueKeyAccessServer }, - ], -); - -/** - * @generated from message policy.attributes.AssignKeyAccessServerToValueResponse - */ -export const AssignKeyAccessServerToValueResponse = /*@__PURE__*/ proto3.makeMessageType( - "policy.attributes.AssignKeyAccessServerToValueResponse", - () => [ - { no: 1, name: "value_key_access_server", kind: "message", T: ValueKeyAccessServer }, - ], -); - -/** - * @generated from message policy.attributes.RemoveKeyAccessServerFromValueRequest - */ -export const RemoveKeyAccessServerFromValueRequest = /*@__PURE__*/ proto3.makeMessageType( - "policy.attributes.RemoveKeyAccessServerFromValueRequest", - () => [ - { no: 1, name: "value_key_access_server", kind: "message", T: ValueKeyAccessServer }, - ], -); - -/** - * @generated from message policy.attributes.RemoveKeyAccessServerFromValueResponse - */ -export const RemoveKeyAccessServerFromValueResponse = /*@__PURE__*/ proto3.makeMessageType( - "policy.attributes.RemoveKeyAccessServerFromValueResponse", - () => [ - { no: 1, name: "value_key_access_server", kind: "message", T: ValueKeyAccessServer }, - ], -); - diff --git a/lib/src/platform/policy/attributes/attributes_pb.ts b/lib/src/platform/policy/attributes/attributes_pb.ts new file mode 100644 index 00000000..11c52ce3 --- /dev/null +++ b/lib/src/platform/policy/attributes/attributes_pb.ts @@ -0,0 +1,1181 @@ +// @generated by protoc-gen-es v2.2.5 with parameter "target=ts,import_extension=.js" +// @generated from file policy/attributes/attributes.proto (package policy.attributes, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1"; +import { file_buf_validate_validate } from "../../buf/validate/validate_pb.js"; +import type { ActiveStateEnum, MetadataMutable, MetadataUpdateEnum } from "../../common/common_pb.js"; +import { file_common_common } from "../../common/common_pb.js"; +import { file_google_api_annotations } from "../../google/api/annotations_pb.js"; +import type { Attribute, AttributeRuleTypeEnum, Value } from "../objects_pb.js"; +import { file_policy_objects } from "../objects_pb.js"; +import type { AttributeValueSelector, PageRequest, PageResponse } from "../selectors_pb.js"; +import { file_policy_selectors } from "../selectors_pb.js"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file policy/attributes/attributes.proto. + */ +export const file_policy_attributes_attributes: GenFile = /*@__PURE__*/ + fileDesc("CiJwb2xpY3kvYXR0cmlidXRlcy9hdHRyaWJ1dGVzLnByb3RvEhFwb2xpY3kuYXR0cmlidXRlcyJiChhBdHRyaWJ1dGVLZXlBY2Nlc3NTZXJ2ZXISHgoMYXR0cmlidXRlX2lkGAEgASgJQgi6SAVyA7ABARImChRrZXlfYWNjZXNzX3NlcnZlcl9pZBgCIAEoCUIIukgFcgOwAQEiWgoUVmFsdWVLZXlBY2Nlc3NTZXJ2ZXISGgoIdmFsdWVfaWQYASABKAlCCLpIBXIDsAEBEiYKFGtleV9hY2Nlc3Nfc2VydmVyX2lkGAIgASgJQgi6SAVyA7ABASJOCgxBdHRyaWJ1dGVLZXkSIQoMYXR0cmlidXRlX2lkGAEgASgJQgu6SAjIAQFyA7ABARIbCgZrZXlf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_selectors]); + +/** + * @generated from message policy.attributes.AttributeKeyAccessServer + */ +export type AttributeKeyAccessServer = Message<"policy.attributes.AttributeKeyAccessServer"> & { + /** + * Required + * + * @generated from field: string attribute_id = 1; + */ + attributeId: string; + + /** + * Required + * + * @generated from field: string key_access_server_id = 2; + */ + keyAccessServerId: string; +}; + +/** + * Describes the message policy.attributes.AttributeKeyAccessServer. + * Use `create(AttributeKeyAccessServerSchema)` to create a new message. + */ +export const AttributeKeyAccessServerSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_attributes_attributes, 0); + +/** + * @generated from message policy.attributes.ValueKeyAccessServer + */ +export type ValueKeyAccessServer = Message<"policy.attributes.ValueKeyAccessServer"> & { + /** + * Required + * + * @generated from field: string value_id = 1; + */ + valueId: string; + + /** + * Required + * + * @generated from field: string key_access_server_id = 2; + */ + keyAccessServerId: string; +}; + +/** + * Describes the message policy.attributes.ValueKeyAccessServer. + * Use `create(ValueKeyAccessServerSchema)` to create a new message. + */ +export const ValueKeyAccessServerSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_attributes_attributes, 1); + +/** + * @generated from message policy.attributes.AttributeKey + */ +export type AttributeKey = Message<"policy.attributes.AttributeKey"> & { + /** + * Required + * + * @generated from field: string attribute_id = 1; + */ + attributeId: string; + + /** + * Required + * + * @generated from field: string key_id = 2; + */ + keyId: string; +}; + +/** + * Describes the message policy.attributes.AttributeKey. + * Use `create(AttributeKeySchema)` to create a new message. + */ +export const AttributeKeySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_attributes_attributes, 2); + +/** + * @generated from message policy.attributes.ValueKey + */ +export type ValueKey = Message<"policy.attributes.ValueKey"> & { + /** + * Required + * + * @generated from field: string value_id = 1; + */ + valueId: string; + + /** + * Required (The id listed in the AsymmetricKeys object) + * + * @generated from field: string key_id = 2; + */ + keyId: string; +}; + +/** + * Describes the message policy.attributes.ValueKey. + * Use `create(ValueKeySchema)` to create a new message. + */ +export const ValueKeySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_attributes_attributes, 3); + +/** + * @generated from message policy.attributes.ListAttributesRequest + */ +export type ListAttributesRequest = Message<"policy.attributes.ListAttributesRequest"> & { + /** + * Optional + * ACTIVE by default when not specified + * + * @generated from field: common.ActiveStateEnum state = 1; + */ + state: ActiveStateEnum; + + /** + * Optional + * Namespace ID or name + * + * @generated from field: string namespace = 2; + */ + namespace: string; + + /** + * Optional + * + * @generated from field: policy.PageRequest pagination = 10; + */ + pagination?: PageRequest; +}; + +/** + * Describes the message policy.attributes.ListAttributesRequest. + * Use `create(ListAttributesRequestSchema)` to create a new message. + */ +export const ListAttributesRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_attributes_attributes, 4); + +/** + * @generated from message policy.attributes.ListAttributesResponse + */ +export type ListAttributesResponse = Message<"policy.attributes.ListAttributesResponse"> & { + /** + * @generated from field: repeated policy.Attribute attributes = 1; + */ + attributes: Attribute[]; + + /** + * @generated from field: policy.PageResponse pagination = 10; + */ + pagination?: PageResponse; +}; + +/** + * Describes the message policy.attributes.ListAttributesResponse. + * Use `create(ListAttributesResponseSchema)` to create a new message. + */ +export const ListAttributesResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_attributes_attributes, 5); + +/** + * @generated from message policy.attributes.GetAttributeRequest + */ +export type GetAttributeRequest = Message<"policy.attributes.GetAttributeRequest"> & { + /** + * Deprecated + * + * @generated from field: string id = 1 [deprecated = true]; + * @deprecated + */ + id: string; + + /** + * @generated from oneof policy.attributes.GetAttributeRequest.identifier + */ + identifier: { + /** + * option (buf.validate.oneof).required = true; // TODO: enable this when we remove the deprecated field + * + * @generated from field: string attribute_id = 2; + */ + value: string; + case: "attributeId"; + } | { + /** + * @generated from field: string fqn = 3; + */ + value: string; + case: "fqn"; + } | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message policy.attributes.GetAttributeRequest. + * Use `create(GetAttributeRequestSchema)` to create a new message. + */ +export const GetAttributeRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_attributes_attributes, 6); + +/** + * @generated from message policy.attributes.GetAttributeResponse + */ +export type GetAttributeResponse = Message<"policy.attributes.GetAttributeResponse"> & { + /** + * @generated from field: policy.Attribute attribute = 1; + */ + attribute?: Attribute; +}; + +/** + * Describes the message policy.attributes.GetAttributeResponse. + * Use `create(GetAttributeResponseSchema)` to create a new message. + */ +export const GetAttributeResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_attributes_attributes, 7); + +/** + * @generated from message policy.attributes.CreateAttributeRequest + */ +export type CreateAttributeRequest = Message<"policy.attributes.CreateAttributeRequest"> & { + /** + * Required + * + * @generated from field: string namespace_id = 1; + */ + namespaceId: string; + + /** + * Required + * + * @generated from field: string name = 2; + */ + name: string; + + /** + * Required + * + * @generated from field: policy.AttributeRuleTypeEnum rule = 3; + */ + rule: AttributeRuleTypeEnum; + + /** + * Optional + * Attribute values (when provided) must be alphanumeric strings, allowing hyphens and underscores but not as the first or last character. + * The stored attribute value will be normalized to lower case. + * + * @generated from field: repeated string values = 4; + */ + values: string[]; + + /** + * Optional + * + * @generated from field: common.MetadataMutable metadata = 100; + */ + metadata?: MetadataMutable; +}; + +/** + * Describes the message policy.attributes.CreateAttributeRequest. + * Use `create(CreateAttributeRequestSchema)` to create a new message. + */ +export const CreateAttributeRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_attributes_attributes, 8); + +/** + * @generated from message policy.attributes.CreateAttributeResponse + */ +export type CreateAttributeResponse = Message<"policy.attributes.CreateAttributeResponse"> & { + /** + * @generated from field: policy.Attribute attribute = 1; + */ + attribute?: Attribute; +}; + +/** + * Describes the message policy.attributes.CreateAttributeResponse. + * Use `create(CreateAttributeResponseSchema)` to create a new message. + */ +export const CreateAttributeResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_attributes_attributes, 9); + +/** + * @generated from message policy.attributes.UpdateAttributeRequest + */ +export type UpdateAttributeRequest = Message<"policy.attributes.UpdateAttributeRequest"> & { + /** + * Required + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Optional + * + * @generated from field: common.MetadataMutable metadata = 100; + */ + metadata?: MetadataMutable; + + /** + * @generated from field: common.MetadataUpdateEnum metadata_update_behavior = 101; + */ + metadataUpdateBehavior: MetadataUpdateEnum; +}; + +/** + * Describes the message policy.attributes.UpdateAttributeRequest. + * Use `create(UpdateAttributeRequestSchema)` to create a new message. + */ +export const UpdateAttributeRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_attributes_attributes, 10); + +/** + * @generated from message policy.attributes.UpdateAttributeResponse + */ +export type UpdateAttributeResponse = Message<"policy.attributes.UpdateAttributeResponse"> & { + /** + * @generated from field: policy.Attribute attribute = 1; + */ + attribute?: Attribute; +}; + +/** + * Describes the message policy.attributes.UpdateAttributeResponse. + * Use `create(UpdateAttributeResponseSchema)` to create a new message. + */ +export const UpdateAttributeResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_attributes_attributes, 11); + +/** + * @generated from message policy.attributes.DeactivateAttributeRequest + */ +export type DeactivateAttributeRequest = Message<"policy.attributes.DeactivateAttributeRequest"> & { + /** + * Required + * + * @generated from field: string id = 1; + */ + id: string; +}; + +/** + * Describes the message policy.attributes.DeactivateAttributeRequest. + * Use `create(DeactivateAttributeRequestSchema)` to create a new message. + */ +export const DeactivateAttributeRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_attributes_attributes, 12); + +/** + * @generated from message policy.attributes.DeactivateAttributeResponse + */ +export type DeactivateAttributeResponse = Message<"policy.attributes.DeactivateAttributeResponse"> & { + /** + * @generated from field: policy.Attribute attribute = 1; + */ + attribute?: Attribute; +}; + +/** + * Describes the message policy.attributes.DeactivateAttributeResponse. + * Use `create(DeactivateAttributeResponseSchema)` to create a new message. + */ +export const DeactivateAttributeResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_attributes_attributes, 13); + +/** + * / + * / Value RPC messages + * / + * + * @generated from message policy.attributes.GetAttributeValueRequest + */ +export type GetAttributeValueRequest = Message<"policy.attributes.GetAttributeValueRequest"> & { + /** + * Deprecated + * + * @generated from field: string id = 1 [deprecated = true]; + * @deprecated + */ + id: string; + + /** + * @generated from oneof policy.attributes.GetAttributeValueRequest.identifier + */ + identifier: { + /** + * option (buf.validate.oneof).required = true; // TODO: enable this when we remove the deprecated field + * + * @generated from field: string value_id = 2; + */ + value: string; + case: "valueId"; + } | { + /** + * @generated from field: string fqn = 3; + */ + value: string; + case: "fqn"; + } | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message policy.attributes.GetAttributeValueRequest. + * Use `create(GetAttributeValueRequestSchema)` to create a new message. + */ +export const GetAttributeValueRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_attributes_attributes, 14); + +/** + * @generated from message policy.attributes.GetAttributeValueResponse + */ +export type GetAttributeValueResponse = Message<"policy.attributes.GetAttributeValueResponse"> & { + /** + * @generated from field: policy.Value value = 1; + */ + value?: Value; +}; + +/** + * Describes the message policy.attributes.GetAttributeValueResponse. + * Use `create(GetAttributeValueResponseSchema)` to create a new message. + */ +export const GetAttributeValueResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_attributes_attributes, 15); + +/** + * @generated from message policy.attributes.ListAttributeValuesRequest + */ +export type ListAttributeValuesRequest = Message<"policy.attributes.ListAttributeValuesRequest"> & { + /** + * Required + * + * @generated from field: string attribute_id = 1; + */ + attributeId: string; + + /** + * Optional + * ACTIVE by default when not specified + * + * @generated from field: common.ActiveStateEnum state = 2; + */ + state: ActiveStateEnum; + + /** + * Optional + * + * @generated from field: policy.PageRequest pagination = 10; + */ + pagination?: PageRequest; +}; + +/** + * Describes the message policy.attributes.ListAttributeValuesRequest. + * Use `create(ListAttributeValuesRequestSchema)` to create a new message. + */ +export const ListAttributeValuesRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_attributes_attributes, 16); + +/** + * @generated from message policy.attributes.ListAttributeValuesResponse + */ +export type ListAttributeValuesResponse = Message<"policy.attributes.ListAttributeValuesResponse"> & { + /** + * @generated from field: repeated policy.Value values = 1; + */ + values: Value[]; + + /** + * @generated from field: policy.PageResponse pagination = 10; + */ + pagination?: PageResponse; +}; + +/** + * Describes the message policy.attributes.ListAttributeValuesResponse. + * Use `create(ListAttributeValuesResponseSchema)` to create a new message. + */ +export const ListAttributeValuesResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_attributes_attributes, 17); + +/** + * @generated from message policy.attributes.CreateAttributeValueRequest + */ +export type CreateAttributeValueRequest = Message<"policy.attributes.CreateAttributeValueRequest"> & { + /** + * Required + * + * @generated from field: string attribute_id = 1; + */ + attributeId: string; + + /** + * Required + * + * @generated from field: string value = 2; + */ + value: string; + + /** + * Optional + * Common metadata + * + * @generated from field: common.MetadataMutable metadata = 100; + */ + metadata?: MetadataMutable; +}; + +/** + * Describes the message policy.attributes.CreateAttributeValueRequest. + * Use `create(CreateAttributeValueRequestSchema)` to create a new message. + */ +export const CreateAttributeValueRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_attributes_attributes, 18); + +/** + * @generated from message policy.attributes.CreateAttributeValueResponse + */ +export type CreateAttributeValueResponse = Message<"policy.attributes.CreateAttributeValueResponse"> & { + /** + * @generated from field: policy.Value value = 1; + */ + value?: Value; +}; + +/** + * Describes the message policy.attributes.CreateAttributeValueResponse. + * Use `create(CreateAttributeValueResponseSchema)` to create a new message. + */ +export const CreateAttributeValueResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_attributes_attributes, 19); + +/** + * @generated from message policy.attributes.UpdateAttributeValueRequest + */ +export type UpdateAttributeValueRequest = Message<"policy.attributes.UpdateAttributeValueRequest"> & { + /** + * Required + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Optional + * Common metadata + * + * @generated from field: common.MetadataMutable metadata = 100; + */ + metadata?: MetadataMutable; + + /** + * @generated from field: common.MetadataUpdateEnum metadata_update_behavior = 101; + */ + metadataUpdateBehavior: MetadataUpdateEnum; +}; + +/** + * Describes the message policy.attributes.UpdateAttributeValueRequest. + * Use `create(UpdateAttributeValueRequestSchema)` to create a new message. + */ +export const UpdateAttributeValueRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_attributes_attributes, 20); + +/** + * @generated from message policy.attributes.UpdateAttributeValueResponse + */ +export type UpdateAttributeValueResponse = Message<"policy.attributes.UpdateAttributeValueResponse"> & { + /** + * @generated from field: policy.Value value = 1; + */ + value?: Value; +}; + +/** + * Describes the message policy.attributes.UpdateAttributeValueResponse. + * Use `create(UpdateAttributeValueResponseSchema)` to create a new message. + */ +export const UpdateAttributeValueResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_attributes_attributes, 21); + +/** + * @generated from message policy.attributes.DeactivateAttributeValueRequest + */ +export type DeactivateAttributeValueRequest = Message<"policy.attributes.DeactivateAttributeValueRequest"> & { + /** + * Required + * + * @generated from field: string id = 1; + */ + id: string; +}; + +/** + * Describes the message policy.attributes.DeactivateAttributeValueRequest. + * Use `create(DeactivateAttributeValueRequestSchema)` to create a new message. + */ +export const DeactivateAttributeValueRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_attributes_attributes, 22); + +/** + * @generated from message policy.attributes.DeactivateAttributeValueResponse + */ +export type DeactivateAttributeValueResponse = Message<"policy.attributes.DeactivateAttributeValueResponse"> & { + /** + * @generated from field: policy.Value value = 1; + */ + value?: Value; +}; + +/** + * Describes the message policy.attributes.DeactivateAttributeValueResponse. + * Use `create(DeactivateAttributeValueResponseSchema)` to create a new message. + */ +export const DeactivateAttributeValueResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_attributes_attributes, 23); + +/** + * @generated from message policy.attributes.GetAttributeValuesByFqnsRequest + */ +export type GetAttributeValuesByFqnsRequest = Message<"policy.attributes.GetAttributeValuesByFqnsRequest"> & { + /** + * Required + * Fully Qualified Names of attribute values (i.e. https:///attr//value/), normalized to lower case. + * + * @generated from field: repeated string fqns = 1; + */ + fqns: string[]; + + /** + * Optional + * This attribute value selector is not used currently, but left here for future use. + * + * @generated from field: policy.AttributeValueSelector with_value = 2; + */ + withValue?: AttributeValueSelector; +}; + +/** + * Describes the message policy.attributes.GetAttributeValuesByFqnsRequest. + * Use `create(GetAttributeValuesByFqnsRequestSchema)` to create a new message. + */ +export const GetAttributeValuesByFqnsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_attributes_attributes, 24); + +/** + * @generated from message policy.attributes.GetAttributeValuesByFqnsResponse + */ +export type GetAttributeValuesByFqnsResponse = Message<"policy.attributes.GetAttributeValuesByFqnsResponse"> & { + /** + * map of FQNs to complete attributes and the one selected value + * + * @generated from field: map fqn_attribute_values = 1; + */ + fqnAttributeValues: { [key: string]: GetAttributeValuesByFqnsResponse_AttributeAndValue }; +}; + +/** + * Describes the message policy.attributes.GetAttributeValuesByFqnsResponse. + * Use `create(GetAttributeValuesByFqnsResponseSchema)` to create a new message. + */ +export const GetAttributeValuesByFqnsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_attributes_attributes, 25); + +/** + * @generated from message policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue + */ +export type GetAttributeValuesByFqnsResponse_AttributeAndValue = Message<"policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue"> & { + /** + * @generated from field: policy.Attribute attribute = 1; + */ + attribute?: Attribute; + + /** + * @generated from field: policy.Value value = 2; + */ + value?: Value; +}; + +/** + * Describes the message policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue. + * Use `create(GetAttributeValuesByFqnsResponse_AttributeAndValueSchema)` to create a new message. + */ +export const GetAttributeValuesByFqnsResponse_AttributeAndValueSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_attributes_attributes, 25, 0); + +/** + * @generated from message policy.attributes.AssignKeyAccessServerToAttributeRequest + */ +export type AssignKeyAccessServerToAttributeRequest = Message<"policy.attributes.AssignKeyAccessServerToAttributeRequest"> & { + /** + * Required + * + * @generated from field: policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1; + */ + attributeKeyAccessServer?: AttributeKeyAccessServer; +}; + +/** + * Describes the message policy.attributes.AssignKeyAccessServerToAttributeRequest. + * Use `create(AssignKeyAccessServerToAttributeRequestSchema)` to create a new message. + */ +export const AssignKeyAccessServerToAttributeRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_attributes_attributes, 26); + +/** + * @generated from message policy.attributes.AssignKeyAccessServerToAttributeResponse + */ +export type AssignKeyAccessServerToAttributeResponse = Message<"policy.attributes.AssignKeyAccessServerToAttributeResponse"> & { + /** + * @generated from field: policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1; + */ + attributeKeyAccessServer?: AttributeKeyAccessServer; +}; + +/** + * Describes the message policy.attributes.AssignKeyAccessServerToAttributeResponse. + * Use `create(AssignKeyAccessServerToAttributeResponseSchema)` to create a new message. + */ +export const AssignKeyAccessServerToAttributeResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_attributes_attributes, 27); + +/** + * @generated from message policy.attributes.RemoveKeyAccessServerFromAttributeRequest + */ +export type RemoveKeyAccessServerFromAttributeRequest = Message<"policy.attributes.RemoveKeyAccessServerFromAttributeRequest"> & { + /** + * Required + * + * @generated from field: policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1; + */ + attributeKeyAccessServer?: AttributeKeyAccessServer; +}; + +/** + * Describes the message policy.attributes.RemoveKeyAccessServerFromAttributeRequest. + * Use `create(RemoveKeyAccessServerFromAttributeRequestSchema)` to create a new message. + */ +export const RemoveKeyAccessServerFromAttributeRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_attributes_attributes, 28); + +/** + * @generated from message policy.attributes.RemoveKeyAccessServerFromAttributeResponse + */ +export type RemoveKeyAccessServerFromAttributeResponse = Message<"policy.attributes.RemoveKeyAccessServerFromAttributeResponse"> & { + /** + * @generated from field: policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1; + */ + attributeKeyAccessServer?: AttributeKeyAccessServer; +}; + +/** + * Describes the message policy.attributes.RemoveKeyAccessServerFromAttributeResponse. + * Use `create(RemoveKeyAccessServerFromAttributeResponseSchema)` to create a new message. + */ +export const RemoveKeyAccessServerFromAttributeResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_attributes_attributes, 29); + +/** + * @generated from message policy.attributes.AssignKeyAccessServerToValueRequest + */ +export type AssignKeyAccessServerToValueRequest = Message<"policy.attributes.AssignKeyAccessServerToValueRequest"> & { + /** + * Required + * + * @generated from field: policy.attributes.ValueKeyAccessServer value_key_access_server = 1; + */ + valueKeyAccessServer?: ValueKeyAccessServer; +}; + +/** + * Describes the message policy.attributes.AssignKeyAccessServerToValueRequest. + * Use `create(AssignKeyAccessServerToValueRequestSchema)` to create a new message. + */ +export const AssignKeyAccessServerToValueRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_attributes_attributes, 30); + +/** + * @generated from message policy.attributes.AssignKeyAccessServerToValueResponse + */ +export type AssignKeyAccessServerToValueResponse = Message<"policy.attributes.AssignKeyAccessServerToValueResponse"> & { + /** + * @generated from field: policy.attributes.ValueKeyAccessServer value_key_access_server = 1; + */ + valueKeyAccessServer?: ValueKeyAccessServer; +}; + +/** + * Describes the message policy.attributes.AssignKeyAccessServerToValueResponse. + * Use `create(AssignKeyAccessServerToValueResponseSchema)` to create a new message. + */ +export const AssignKeyAccessServerToValueResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_attributes_attributes, 31); + +/** + * @generated from message policy.attributes.RemoveKeyAccessServerFromValueRequest + */ +export type RemoveKeyAccessServerFromValueRequest = Message<"policy.attributes.RemoveKeyAccessServerFromValueRequest"> & { + /** + * Required + * + * @generated from field: policy.attributes.ValueKeyAccessServer value_key_access_server = 1; + */ + valueKeyAccessServer?: ValueKeyAccessServer; +}; + +/** + * Describes the message policy.attributes.RemoveKeyAccessServerFromValueRequest. + * Use `create(RemoveKeyAccessServerFromValueRequestSchema)` to create a new message. + */ +export const RemoveKeyAccessServerFromValueRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_attributes_attributes, 32); + +/** + * @generated from message policy.attributes.RemoveKeyAccessServerFromValueResponse + */ +export type RemoveKeyAccessServerFromValueResponse = Message<"policy.attributes.RemoveKeyAccessServerFromValueResponse"> & { + /** + * @generated from field: policy.attributes.ValueKeyAccessServer value_key_access_server = 1; + */ + valueKeyAccessServer?: ValueKeyAccessServer; +}; + +/** + * Describes the message policy.attributes.RemoveKeyAccessServerFromValueResponse. + * Use `create(RemoveKeyAccessServerFromValueResponseSchema)` to create a new message. + */ +export const RemoveKeyAccessServerFromValueResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_attributes_attributes, 33); + +/** + * @generated from message policy.attributes.AssignPublicKeyToAttributeRequest + */ +export type AssignPublicKeyToAttributeRequest = Message<"policy.attributes.AssignPublicKeyToAttributeRequest"> & { + /** + * Required + * + * @generated from field: policy.attributes.AttributeKey attribute_key = 1; + */ + attributeKey?: AttributeKey; +}; + +/** + * Describes the message policy.attributes.AssignPublicKeyToAttributeRequest. + * Use `create(AssignPublicKeyToAttributeRequestSchema)` to create a new message. + */ +export const AssignPublicKeyToAttributeRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_attributes_attributes, 34); + +/** + * @generated from message policy.attributes.AssignPublicKeyToAttributeResponse + */ +export type AssignPublicKeyToAttributeResponse = Message<"policy.attributes.AssignPublicKeyToAttributeResponse"> & { + /** + * Required + * + * @generated from field: policy.attributes.AttributeKey attribute_key = 1; + */ + attributeKey?: AttributeKey; +}; + +/** + * Describes the message policy.attributes.AssignPublicKeyToAttributeResponse. + * Use `create(AssignPublicKeyToAttributeResponseSchema)` to create a new message. + */ +export const AssignPublicKeyToAttributeResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_attributes_attributes, 35); + +/** + * @generated from message policy.attributes.RemovePublicKeyFromAttributeRequest + */ +export type RemovePublicKeyFromAttributeRequest = Message<"policy.attributes.RemovePublicKeyFromAttributeRequest"> & { + /** + * Required + * + * @generated from field: policy.attributes.AttributeKey attribute_key = 1; + */ + attributeKey?: AttributeKey; +}; + +/** + * Describes the message policy.attributes.RemovePublicKeyFromAttributeRequest. + * Use `create(RemovePublicKeyFromAttributeRequestSchema)` to create a new message. + */ +export const RemovePublicKeyFromAttributeRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_attributes_attributes, 36); + +/** + * @generated from message policy.attributes.RemovePublicKeyFromAttributeResponse + */ +export type RemovePublicKeyFromAttributeResponse = Message<"policy.attributes.RemovePublicKeyFromAttributeResponse"> & { + /** + * Required + * + * @generated from field: policy.attributes.AttributeKey attribute_key = 1; + */ + attributeKey?: AttributeKey; +}; + +/** + * Describes the message policy.attributes.RemovePublicKeyFromAttributeResponse. + * Use `create(RemovePublicKeyFromAttributeResponseSchema)` to create a new message. + */ +export const RemovePublicKeyFromAttributeResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_attributes_attributes, 37); + +/** + * @generated from message policy.attributes.AssignPublicKeyToValueRequest + */ +export type AssignPublicKeyToValueRequest = Message<"policy.attributes.AssignPublicKeyToValueRequest"> & { + /** + * Required + * + * @generated from field: policy.attributes.ValueKey value_key = 1; + */ + valueKey?: ValueKey; +}; + +/** + * Describes the message policy.attributes.AssignPublicKeyToValueRequest. + * Use `create(AssignPublicKeyToValueRequestSchema)` to create a new message. + */ +export const AssignPublicKeyToValueRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_attributes_attributes, 38); + +/** + * @generated from message policy.attributes.AssignPublicKeyToValueResponse + */ +export type AssignPublicKeyToValueResponse = Message<"policy.attributes.AssignPublicKeyToValueResponse"> & { + /** + * Required + * + * @generated from field: policy.attributes.ValueKey value_key = 1; + */ + valueKey?: ValueKey; +}; + +/** + * Describes the message policy.attributes.AssignPublicKeyToValueResponse. + * Use `create(AssignPublicKeyToValueResponseSchema)` to create a new message. + */ +export const AssignPublicKeyToValueResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_attributes_attributes, 39); + +/** + * @generated from message policy.attributes.RemovePublicKeyFromValueRequest + */ +export type RemovePublicKeyFromValueRequest = Message<"policy.attributes.RemovePublicKeyFromValueRequest"> & { + /** + * Required + * + * @generated from field: policy.attributes.ValueKey value_key = 1; + */ + valueKey?: ValueKey; +}; + +/** + * Describes the message policy.attributes.RemovePublicKeyFromValueRequest. + * Use `create(RemovePublicKeyFromValueRequestSchema)` to create a new message. + */ +export const RemovePublicKeyFromValueRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_attributes_attributes, 40); + +/** + * @generated from message policy.attributes.RemovePublicKeyFromValueResponse + */ +export type RemovePublicKeyFromValueResponse = Message<"policy.attributes.RemovePublicKeyFromValueResponse"> & { + /** + * Required + * + * @generated from field: policy.attributes.ValueKey value_key = 1; + */ + valueKey?: ValueKey; +}; + +/** + * Describes the message policy.attributes.RemovePublicKeyFromValueResponse. + * Use `create(RemovePublicKeyFromValueResponseSchema)` to create a new message. + */ +export const RemovePublicKeyFromValueResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_attributes_attributes, 41); + +/** + * / + * / Attribute Service + * / + * + * @generated from service policy.attributes.AttributesService + */ +export const AttributesService: GenService<{ + /** + * --------------------------------------* + * Attribute RPCs + * --------------------------------------- + * + * @generated from rpc policy.attributes.AttributesService.ListAttributes + */ + listAttributes: { + methodKind: "unary"; + input: typeof ListAttributesRequestSchema; + output: typeof ListAttributesResponseSchema; + }, + /** + * @generated from rpc policy.attributes.AttributesService.ListAttributeValues + */ + listAttributeValues: { + methodKind: "unary"; + input: typeof ListAttributeValuesRequestSchema; + output: typeof ListAttributeValuesResponseSchema; + }, + /** + * @generated from rpc policy.attributes.AttributesService.GetAttribute + */ + getAttribute: { + methodKind: "unary"; + input: typeof GetAttributeRequestSchema; + output: typeof GetAttributeResponseSchema; + }, + /** + * @generated from rpc policy.attributes.AttributesService.GetAttributeValuesByFqns + */ + getAttributeValuesByFqns: { + methodKind: "unary"; + input: typeof GetAttributeValuesByFqnsRequestSchema; + output: typeof GetAttributeValuesByFqnsResponseSchema; + }, + /** + * @generated from rpc policy.attributes.AttributesService.CreateAttribute + */ + createAttribute: { + methodKind: "unary"; + input: typeof CreateAttributeRequestSchema; + output: typeof CreateAttributeResponseSchema; + }, + /** + * @generated from rpc policy.attributes.AttributesService.UpdateAttribute + */ + updateAttribute: { + methodKind: "unary"; + input: typeof UpdateAttributeRequestSchema; + output: typeof UpdateAttributeResponseSchema; + }, + /** + * @generated from rpc policy.attributes.AttributesService.DeactivateAttribute + */ + deactivateAttribute: { + methodKind: "unary"; + input: typeof DeactivateAttributeRequestSchema; + output: typeof DeactivateAttributeResponseSchema; + }, + /** + * --------------------------------------* + * Value RPCs + * --------------------------------------- + * + * @generated from rpc policy.attributes.AttributesService.GetAttributeValue + */ + getAttributeValue: { + methodKind: "unary"; + input: typeof GetAttributeValueRequestSchema; + output: typeof GetAttributeValueResponseSchema; + }, + /** + * @generated from rpc policy.attributes.AttributesService.CreateAttributeValue + */ + createAttributeValue: { + methodKind: "unary"; + input: typeof CreateAttributeValueRequestSchema; + output: typeof CreateAttributeValueResponseSchema; + }, + /** + * @generated from rpc policy.attributes.AttributesService.UpdateAttributeValue + */ + updateAttributeValue: { + methodKind: "unary"; + input: typeof UpdateAttributeValueRequestSchema; + output: typeof UpdateAttributeValueResponseSchema; + }, + /** + * @generated from rpc policy.attributes.AttributesService.DeactivateAttributeValue + */ + deactivateAttributeValue: { + methodKind: "unary"; + input: typeof DeactivateAttributeValueRequestSchema; + output: typeof DeactivateAttributeValueResponseSchema; + }, + /** + * --------------------------------------* + * Attribute <> Key Access Server RPCs + * --------------------------------------- + * + * @generated from rpc policy.attributes.AttributesService.AssignKeyAccessServerToAttribute + */ + assignKeyAccessServerToAttribute: { + methodKind: "unary"; + input: typeof AssignKeyAccessServerToAttributeRequestSchema; + output: typeof AssignKeyAccessServerToAttributeResponseSchema; + }, + /** + * @generated from rpc policy.attributes.AttributesService.RemoveKeyAccessServerFromAttribute + */ + removeKeyAccessServerFromAttribute: { + methodKind: "unary"; + input: typeof RemoveKeyAccessServerFromAttributeRequestSchema; + output: typeof RemoveKeyAccessServerFromAttributeResponseSchema; + }, + /** + * @generated from rpc policy.attributes.AttributesService.AssignKeyAccessServerToValue + */ + assignKeyAccessServerToValue: { + methodKind: "unary"; + input: typeof AssignKeyAccessServerToValueRequestSchema; + output: typeof AssignKeyAccessServerToValueResponseSchema; + }, + /** + * @generated from rpc policy.attributes.AttributesService.RemoveKeyAccessServerFromValue + */ + removeKeyAccessServerFromValue: { + methodKind: "unary"; + input: typeof RemoveKeyAccessServerFromValueRequestSchema; + output: typeof RemoveKeyAccessServerFromValueResponseSchema; + }, + /** + * @generated from rpc policy.attributes.AttributesService.AssignPublicKeyToAttribute + */ + assignPublicKeyToAttribute: { + methodKind: "unary"; + input: typeof AssignPublicKeyToAttributeRequestSchema; + output: typeof AssignPublicKeyToAttributeResponseSchema; + }, + /** + * @generated from rpc policy.attributes.AttributesService.RemovePublicKeyFromAttribute + */ + removePublicKeyFromAttribute: { + methodKind: "unary"; + input: typeof RemovePublicKeyFromAttributeRequestSchema; + output: typeof RemovePublicKeyFromAttributeResponseSchema; + }, + /** + * @generated from rpc policy.attributes.AttributesService.AssignPublicKeyToValue + */ + assignPublicKeyToValue: { + methodKind: "unary"; + input: typeof AssignPublicKeyToValueRequestSchema; + output: typeof AssignPublicKeyToValueResponseSchema; + }, + /** + * @generated from rpc policy.attributes.AttributesService.RemovePublicKeyFromValue + */ + removePublicKeyFromValue: { + methodKind: "unary"; + input: typeof RemovePublicKeyFromValueRequestSchema; + output: typeof RemovePublicKeyFromValueResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_policy_attributes_attributes, 0); + diff --git a/lib/src/platform/policy/kasregistry/key_access_server_registry_connect.d.ts b/lib/src/platform/policy/kasregistry/key_access_server_registry_connect.d.ts deleted file mode 100644 index f0f1e2ea..00000000 --- a/lib/src/platform/policy/kasregistry/key_access_server_registry_connect.d.ts +++ /dev/null @@ -1,62 +0,0 @@ -// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=js+dts,import_extension=none" -// @generated from file policy/kasregistry/key_access_server_registry.proto (package policy.kasregistry, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { CreateKeyAccessServerRequest, CreateKeyAccessServerResponse, DeleteKeyAccessServerRequest, DeleteKeyAccessServerResponse, GetKeyAccessServerRequest, GetKeyAccessServerResponse, ListKeyAccessServersRequest, ListKeyAccessServersResponse, UpdateKeyAccessServerRequest, UpdateKeyAccessServerResponse } from "./key_access_server_registry_pb"; -import { MethodKind } from "@bufbuild/protobuf"; - -/** - * @generated from service policy.kasregistry.KeyAccessServerRegistryService - */ -export declare const KeyAccessServerRegistryService: { - readonly typeName: "policy.kasregistry.KeyAccessServerRegistryService", - readonly methods: { - /** - * @generated from rpc policy.kasregistry.KeyAccessServerRegistryService.ListKeyAccessServers - */ - readonly listKeyAccessServers: { - readonly name: "ListKeyAccessServers", - readonly I: typeof ListKeyAccessServersRequest, - readonly O: typeof ListKeyAccessServersResponse, - readonly kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.kasregistry.KeyAccessServerRegistryService.GetKeyAccessServer - */ - readonly getKeyAccessServer: { - readonly name: "GetKeyAccessServer", - readonly I: typeof GetKeyAccessServerRequest, - readonly O: typeof GetKeyAccessServerResponse, - readonly kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.kasregistry.KeyAccessServerRegistryService.CreateKeyAccessServer - */ - readonly createKeyAccessServer: { - readonly name: "CreateKeyAccessServer", - readonly I: typeof CreateKeyAccessServerRequest, - readonly O: typeof CreateKeyAccessServerResponse, - readonly kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.kasregistry.KeyAccessServerRegistryService.UpdateKeyAccessServer - */ - readonly updateKeyAccessServer: { - readonly name: "UpdateKeyAccessServer", - readonly I: typeof UpdateKeyAccessServerRequest, - readonly O: typeof UpdateKeyAccessServerResponse, - readonly kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.kasregistry.KeyAccessServerRegistryService.DeleteKeyAccessServer - */ - readonly deleteKeyAccessServer: { - readonly name: "DeleteKeyAccessServer", - readonly I: typeof DeleteKeyAccessServerRequest, - readonly O: typeof DeleteKeyAccessServerResponse, - readonly kind: MethodKind.Unary, - }, - } -}; - diff --git a/lib/src/platform/policy/kasregistry/key_access_server_registry_connect.js b/lib/src/platform/policy/kasregistry/key_access_server_registry_connect.js deleted file mode 100644 index f1b1b14f..00000000 --- a/lib/src/platform/policy/kasregistry/key_access_server_registry_connect.js +++ /dev/null @@ -1,62 +0,0 @@ -// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=js+dts,import_extension=none" -// @generated from file policy/kasregistry/key_access_server_registry.proto (package policy.kasregistry, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { CreateKeyAccessServerRequest, CreateKeyAccessServerResponse, DeleteKeyAccessServerRequest, DeleteKeyAccessServerResponse, GetKeyAccessServerRequest, GetKeyAccessServerResponse, ListKeyAccessServersRequest, ListKeyAccessServersResponse, UpdateKeyAccessServerRequest, UpdateKeyAccessServerResponse } from "./key_access_server_registry_pb"; -import { MethodKind } from "@bufbuild/protobuf"; - -/** - * @generated from service policy.kasregistry.KeyAccessServerRegistryService - */ -export const KeyAccessServerRegistryService = { - typeName: "policy.kasregistry.KeyAccessServerRegistryService", - methods: { - /** - * @generated from rpc policy.kasregistry.KeyAccessServerRegistryService.ListKeyAccessServers - */ - listKeyAccessServers: { - name: "ListKeyAccessServers", - I: ListKeyAccessServersRequest, - O: ListKeyAccessServersResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.kasregistry.KeyAccessServerRegistryService.GetKeyAccessServer - */ - getKeyAccessServer: { - name: "GetKeyAccessServer", - I: GetKeyAccessServerRequest, - O: GetKeyAccessServerResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.kasregistry.KeyAccessServerRegistryService.CreateKeyAccessServer - */ - createKeyAccessServer: { - name: "CreateKeyAccessServer", - I: CreateKeyAccessServerRequest, - O: CreateKeyAccessServerResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.kasregistry.KeyAccessServerRegistryService.UpdateKeyAccessServer - */ - updateKeyAccessServer: { - name: "UpdateKeyAccessServer", - I: UpdateKeyAccessServerRequest, - O: UpdateKeyAccessServerResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.kasregistry.KeyAccessServerRegistryService.DeleteKeyAccessServer - */ - deleteKeyAccessServer: { - name: "DeleteKeyAccessServer", - I: DeleteKeyAccessServerRequest, - O: DeleteKeyAccessServerResponse, - kind: MethodKind.Unary, - }, - } -}; - diff --git a/lib/src/platform/policy/kasregistry/key_access_server_registry_pb.d.ts b/lib/src/platform/policy/kasregistry/key_access_server_registry_pb.d.ts deleted file mode 100644 index 300f59c5..00000000 --- a/lib/src/platform/policy/kasregistry/key_access_server_registry_pb.d.ts +++ /dev/null @@ -1,283 +0,0 @@ -// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" -// @generated from file policy/kasregistry/key_access_server_registry.proto (package policy.kasregistry, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3 } from "@bufbuild/protobuf"; -import type { KeyAccessServer, PublicKey } from "../objects_pb"; -import type { MetadataMutable, MetadataUpdateEnum } from "../../common/common_pb"; - -/** - * @generated from message policy.kasregistry.GetKeyAccessServerRequest - */ -export declare class GetKeyAccessServerRequest extends Message { - /** - * @generated from field: string id = 1; - */ - id: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.kasregistry.GetKeyAccessServerRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetKeyAccessServerRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetKeyAccessServerRequest; - - static fromJsonString(jsonString: string, options?: Partial): GetKeyAccessServerRequest; - - static equals(a: GetKeyAccessServerRequest | PlainMessage | undefined, b: GetKeyAccessServerRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.kasregistry.GetKeyAccessServerResponse - */ -export declare class GetKeyAccessServerResponse extends Message { - /** - * @generated from field: policy.KeyAccessServer key_access_server = 1; - */ - keyAccessServer?: KeyAccessServer; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.kasregistry.GetKeyAccessServerResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetKeyAccessServerResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetKeyAccessServerResponse; - - static fromJsonString(jsonString: string, options?: Partial): GetKeyAccessServerResponse; - - static equals(a: GetKeyAccessServerResponse | PlainMessage | undefined, b: GetKeyAccessServerResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.kasregistry.ListKeyAccessServersRequest - */ -export declare class ListKeyAccessServersRequest extends Message { - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.kasregistry.ListKeyAccessServersRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): ListKeyAccessServersRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): ListKeyAccessServersRequest; - - static fromJsonString(jsonString: string, options?: Partial): ListKeyAccessServersRequest; - - static equals(a: ListKeyAccessServersRequest | PlainMessage | undefined, b: ListKeyAccessServersRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.kasregistry.ListKeyAccessServersResponse - */ -export declare class ListKeyAccessServersResponse extends Message { - /** - * @generated from field: repeated policy.KeyAccessServer key_access_servers = 1; - */ - keyAccessServers: KeyAccessServer[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.kasregistry.ListKeyAccessServersResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): ListKeyAccessServersResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): ListKeyAccessServersResponse; - - static fromJsonString(jsonString: string, options?: Partial): ListKeyAccessServersResponse; - - static equals(a: ListKeyAccessServersResponse | PlainMessage | undefined, b: ListKeyAccessServersResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.kasregistry.CreateKeyAccessServerRequest - */ -export declare class CreateKeyAccessServerRequest extends Message { - /** - * Required - * - * @generated from field: string uri = 1; - */ - uri: string; - - /** - * @generated from field: policy.PublicKey public_key = 2; - */ - publicKey?: PublicKey; - - /** - * Common metadata - * - * @generated from field: common.MetadataMutable metadata = 100; - */ - metadata?: MetadataMutable; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.kasregistry.CreateKeyAccessServerRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateKeyAccessServerRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateKeyAccessServerRequest; - - static fromJsonString(jsonString: string, options?: Partial): CreateKeyAccessServerRequest; - - static equals(a: CreateKeyAccessServerRequest | PlainMessage | undefined, b: CreateKeyAccessServerRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.kasregistry.CreateKeyAccessServerResponse - */ -export declare class CreateKeyAccessServerResponse extends Message { - /** - * @generated from field: policy.KeyAccessServer key_access_server = 1; - */ - keyAccessServer?: KeyAccessServer; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.kasregistry.CreateKeyAccessServerResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateKeyAccessServerResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateKeyAccessServerResponse; - - static fromJsonString(jsonString: string, options?: Partial): CreateKeyAccessServerResponse; - - static equals(a: CreateKeyAccessServerResponse | PlainMessage | undefined, b: CreateKeyAccessServerResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.kasregistry.UpdateKeyAccessServerRequest - */ -export declare class UpdateKeyAccessServerRequest extends Message { - /** - * Required - * - * @generated from field: string id = 1; - */ - id: string; - - /** - * @generated from field: string uri = 2; - */ - uri: string; - - /** - * @generated from field: policy.PublicKey public_key = 3; - */ - publicKey?: PublicKey; - - /** - * Common metadata - * - * @generated from field: common.MetadataMutable metadata = 100; - */ - metadata?: MetadataMutable; - - /** - * @generated from field: common.MetadataUpdateEnum metadata_update_behavior = 101; - */ - metadataUpdateBehavior: MetadataUpdateEnum; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.kasregistry.UpdateKeyAccessServerRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): UpdateKeyAccessServerRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): UpdateKeyAccessServerRequest; - - static fromJsonString(jsonString: string, options?: Partial): UpdateKeyAccessServerRequest; - - static equals(a: UpdateKeyAccessServerRequest | PlainMessage | undefined, b: UpdateKeyAccessServerRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.kasregistry.UpdateKeyAccessServerResponse - */ -export declare class UpdateKeyAccessServerResponse extends Message { - /** - * @generated from field: policy.KeyAccessServer key_access_server = 1; - */ - keyAccessServer?: KeyAccessServer; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.kasregistry.UpdateKeyAccessServerResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): UpdateKeyAccessServerResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): UpdateKeyAccessServerResponse; - - static fromJsonString(jsonString: string, options?: Partial): UpdateKeyAccessServerResponse; - - static equals(a: UpdateKeyAccessServerResponse | PlainMessage | undefined, b: UpdateKeyAccessServerResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.kasregistry.DeleteKeyAccessServerRequest - */ -export declare class DeleteKeyAccessServerRequest extends Message { - /** - * @generated from field: string id = 1; - */ - id: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.kasregistry.DeleteKeyAccessServerRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): DeleteKeyAccessServerRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): DeleteKeyAccessServerRequest; - - static fromJsonString(jsonString: string, options?: Partial): DeleteKeyAccessServerRequest; - - static equals(a: DeleteKeyAccessServerRequest | PlainMessage | undefined, b: DeleteKeyAccessServerRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.kasregistry.DeleteKeyAccessServerResponse - */ -export declare class DeleteKeyAccessServerResponse extends Message { - /** - * @generated from field: policy.KeyAccessServer key_access_server = 1; - */ - keyAccessServer?: KeyAccessServer; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.kasregistry.DeleteKeyAccessServerResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): DeleteKeyAccessServerResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): DeleteKeyAccessServerResponse; - - static fromJsonString(jsonString: string, options?: Partial): DeleteKeyAccessServerResponse; - - static equals(a: DeleteKeyAccessServerResponse | PlainMessage | undefined, b: DeleteKeyAccessServerResponse | PlainMessage | undefined): boolean; -} - diff --git a/lib/src/platform/policy/kasregistry/key_access_server_registry_pb.js b/lib/src/platform/policy/kasregistry/key_access_server_registry_pb.js deleted file mode 100644 index 82c26c5f..00000000 --- a/lib/src/platform/policy/kasregistry/key_access_server_registry_pb.js +++ /dev/null @@ -1,113 +0,0 @@ -// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" -// @generated from file policy/kasregistry/key_access_server_registry.proto (package policy.kasregistry, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { proto3 } from "@bufbuild/protobuf"; -import { KeyAccessServer, PublicKey } from "../objects_pb"; -import { MetadataMutable, MetadataUpdateEnum } from "../../common/common_pb"; - -/** - * @generated from message policy.kasregistry.GetKeyAccessServerRequest - */ -export const GetKeyAccessServerRequest = /*@__PURE__*/ proto3.makeMessageType( - "policy.kasregistry.GetKeyAccessServerRequest", - () => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message policy.kasregistry.GetKeyAccessServerResponse - */ -export const GetKeyAccessServerResponse = /*@__PURE__*/ proto3.makeMessageType( - "policy.kasregistry.GetKeyAccessServerResponse", - () => [ - { no: 1, name: "key_access_server", kind: "message", T: KeyAccessServer }, - ], -); - -/** - * @generated from message policy.kasregistry.ListKeyAccessServersRequest - */ -export const ListKeyAccessServersRequest = /*@__PURE__*/ proto3.makeMessageType( - "policy.kasregistry.ListKeyAccessServersRequest", - [], -); - -/** - * @generated from message policy.kasregistry.ListKeyAccessServersResponse - */ -export const ListKeyAccessServersResponse = /*@__PURE__*/ proto3.makeMessageType( - "policy.kasregistry.ListKeyAccessServersResponse", - () => [ - { no: 1, name: "key_access_servers", kind: "message", T: KeyAccessServer, repeated: true }, - ], -); - -/** - * @generated from message policy.kasregistry.CreateKeyAccessServerRequest - */ -export const CreateKeyAccessServerRequest = /*@__PURE__*/ proto3.makeMessageType( - "policy.kasregistry.CreateKeyAccessServerRequest", - () => [ - { no: 1, name: "uri", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "public_key", kind: "message", T: PublicKey }, - { no: 100, name: "metadata", kind: "message", T: MetadataMutable }, - ], -); - -/** - * @generated from message policy.kasregistry.CreateKeyAccessServerResponse - */ -export const CreateKeyAccessServerResponse = /*@__PURE__*/ proto3.makeMessageType( - "policy.kasregistry.CreateKeyAccessServerResponse", - () => [ - { no: 1, name: "key_access_server", kind: "message", T: KeyAccessServer }, - ], -); - -/** - * @generated from message policy.kasregistry.UpdateKeyAccessServerRequest - */ -export const UpdateKeyAccessServerRequest = /*@__PURE__*/ proto3.makeMessageType( - "policy.kasregistry.UpdateKeyAccessServerRequest", - () => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "uri", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "public_key", kind: "message", T: PublicKey }, - { no: 100, name: "metadata", kind: "message", T: MetadataMutable }, - { no: 101, name: "metadata_update_behavior", kind: "enum", T: proto3.getEnumType(MetadataUpdateEnum) }, - ], -); - -/** - * @generated from message policy.kasregistry.UpdateKeyAccessServerResponse - */ -export const UpdateKeyAccessServerResponse = /*@__PURE__*/ proto3.makeMessageType( - "policy.kasregistry.UpdateKeyAccessServerResponse", - () => [ - { no: 1, name: "key_access_server", kind: "message", T: KeyAccessServer }, - ], -); - -/** - * @generated from message policy.kasregistry.DeleteKeyAccessServerRequest - */ -export const DeleteKeyAccessServerRequest = /*@__PURE__*/ proto3.makeMessageType( - "policy.kasregistry.DeleteKeyAccessServerRequest", - () => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message policy.kasregistry.DeleteKeyAccessServerResponse - */ -export const DeleteKeyAccessServerResponse = /*@__PURE__*/ proto3.makeMessageType( - "policy.kasregistry.DeleteKeyAccessServerResponse", - () => [ - { no: 1, name: "key_access_server", kind: "message", T: KeyAccessServer }, - ], -); - diff --git a/lib/src/platform/policy/kasregistry/key_access_server_registry_pb.ts b/lib/src/platform/policy/kasregistry/key_access_server_registry_pb.ts new file mode 100644 index 00000000..6a2115f3 --- /dev/null +++ b/lib/src/platform/policy/kasregistry/key_access_server_registry_pb.ts @@ -0,0 +1,1482 @@ +// @generated by protoc-gen-es v2.2.5 with parameter "target=ts,import_extension=.js" +// @generated from file policy/kasregistry/key_access_server_registry.proto (package policy.kasregistry, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1"; +import { file_buf_validate_validate } from "../../buf/validate/validate_pb.js"; +import type { Metadata, MetadataMutable, MetadataUpdateEnum } from "../../common/common_pb.js"; +import { file_common_common } from "../../common/common_pb.js"; +import { file_google_api_annotations } from "../../google/api/annotations_pb.js"; +import type { Algorithm, KasKey, KasPublicKey, Key, KeyAccessServer, KeyMode, KeyStatus, PublicKey, SourceType } from "../objects_pb.js"; +import { file_policy_objects } from "../objects_pb.js"; +import type { PageRequest, PageResponse } from "../selectors_pb.js"; +import { file_policy_selectors } from "../selectors_pb.js"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file policy/kasregistry/key_access_server_registry.proto. + */ +export const file_policy_kasregistry_key_access_server_registry: GenFile = /*@__PURE__*/ + fileDesc("CjNwb2xpY3kva2FzcmVnaXN0cnkva2V5X2FjY2Vzc19zZXJ2ZXJfcmVnaXN0cnkucHJvdG8SEnBvbGljeS5rYXNyZWdpc3RyeSLOAwoZR2V0S2V5QWNjZXNzU2VydmVyUmVxdWVzdBIZCgJpZBgBIAEoCUINGAG6SAjYAQJyA7ABARIaCgZrYXNfaWQYAiABKAlCCLpIBXIDsAEBSAASFwoEbmFtZRgDIAEoCUIHukgEcgIQAUgAEhkKA3VyaRgEIAEoCUIKukgHcgUQAYgBAUgAOrcCukizAhqoAQoQZXhjbHVzaXZlX2ZpZWxkcxJKRWl0aGVyIHVzZSBkZXByZWNhdGVkICdpZCcgZmllbGQgb3Igb25lIG9mICdrYXNfaWQnIG9yICd1cmknLCBidXQgbm90IGJvdGgaSCEoaGFzKHRoaXMuaWQpICYmIChoYXModGhpcy5rYXNfaWQpIHx8IGhhcyh0aGlzLnVyaSkgfHwgaGFzKHRoaXMubmFtZSkpKRqFAQoPcmVxdWlyZWRfZmllbGRzEi1FaXRoZXIgaWQgb3Igb25lIG9mIGthc19pZCBvciB1cmkgbXVzdCBiZSBzZXQaQ2hhcyh0aGlzLmlkKSB8fCBoYXModGhpcy5rYXNfaWQpIHx8IGhhcyh0aGlzLnVyaSkgfH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RLZXlBY2Nlc3NTZXJ2ZXJHcmFudHNSZXNwb25zZSIlkAIBgtPkkwIcEhova2V5LWFjY2Vzcy1zZXJ2ZXJzL2dyYW50cxJaCglDcmVhdGVLZXkSJC5wb2xpY3kua2FzcmVnaXN0cnkuQ3JlYXRlS2V5UmVxdWVzdBolLnBvbGljeS5rYXNyZWdpc3RyeS5DcmVhdGVLZXlSZXNwb25zZSIAElEKBkdldEtleRIhLnBvbGljeS5rYXNyZWdpc3RyeS5HZXRLZXlSZXF1ZXN0GiIucG9saWN5Lmthc3JlZ2lzdHJ5LkdldEtleVJlc3BvbnNlIgASVwoITGlzdEtleXMSIy5wb2xpY3kua2FzcmVnaXN0cnkuTGlzdEtleXNSZXF1ZXN0GiQucG9saWN5Lmthc3JlZ2lzdHJ5Lkxpc3RLZXlzUmVzcG9uc2UiABJaCglVcGRhdGVLZXkSJC5wb2xpY3kua2FzcmVnaXN0cnkuVXBkYXRlS2V5UmVxdWVzdBolLnBvbGljeS5rYXNyZWdpc3RyeS5VcGRhdGVLZXlSZXNwb25zZSIAEloKCVJvdGF0ZUtleRIkLnBvbGljeS5rYXNyZWdpc3RyeS5Sb3RhdGVLZXlSZXF1ZXN0GiUucG9saWN5Lmthc3JlZ2lzdHJ5LlJvdGF0ZUtleVJlc3BvbnNlIgBiBnByb3RvMw", [file_buf_validate_validate, file_common_common, file_google_api_annotations, file_policy_objects, file_policy_selectors]); + +/** + * @generated from message policy.kasregistry.GetKeyAccessServerRequest + */ +export type GetKeyAccessServerRequest = Message<"policy.kasregistry.GetKeyAccessServerRequest"> & { + /** + * Deprecated + * + * @generated from field: string id = 1 [deprecated = true]; + * @deprecated + */ + id: string; + + /** + * @generated from oneof policy.kasregistry.GetKeyAccessServerRequest.identifier + */ + identifier: { + /** + * option (buf.validate.oneof).required = true; // TODO: enable this when we remove the deprecated field + * + * @generated from field: string kas_id = 2; + */ + value: string; + case: "kasId"; + } | { + /** + * @generated from field: string name = 3; + */ + value: string; + case: "name"; + } | { + /** + * @generated from field: string uri = 4; + */ + value: string; + case: "uri"; + } | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message policy.kasregistry.GetKeyAccessServerRequest. + * Use `create(GetKeyAccessServerRequestSchema)` to create a new message. + */ +export const GetKeyAccessServerRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_kasregistry_key_access_server_registry, 0); + +/** + * @generated from message policy.kasregistry.GetKeyAccessServerResponse + */ +export type GetKeyAccessServerResponse = Message<"policy.kasregistry.GetKeyAccessServerResponse"> & { + /** + * @generated from field: policy.KeyAccessServer key_access_server = 1; + */ + keyAccessServer?: KeyAccessServer; +}; + +/** + * Describes the message policy.kasregistry.GetKeyAccessServerResponse. + * Use `create(GetKeyAccessServerResponseSchema)` to create a new message. + */ +export const GetKeyAccessServerResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_kasregistry_key_access_server_registry, 1); + +/** + * @generated from message policy.kasregistry.ListKeyAccessServersRequest + */ +export type ListKeyAccessServersRequest = Message<"policy.kasregistry.ListKeyAccessServersRequest"> & { + /** + * Optional + * + * @generated from field: policy.PageRequest pagination = 10; + */ + pagination?: PageRequest; +}; + +/** + * Describes the message policy.kasregistry.ListKeyAccessServersRequest. + * Use `create(ListKeyAccessServersRequestSchema)` to create a new message. + */ +export const ListKeyAccessServersRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_kasregistry_key_access_server_registry, 2); + +/** + * @generated from message policy.kasregistry.ListKeyAccessServersResponse + */ +export type ListKeyAccessServersResponse = Message<"policy.kasregistry.ListKeyAccessServersResponse"> & { + /** + * @generated from field: repeated policy.KeyAccessServer key_access_servers = 1; + */ + keyAccessServers: KeyAccessServer[]; + + /** + * @generated from field: policy.PageResponse pagination = 10; + */ + pagination?: PageResponse; +}; + +/** + * Describes the message policy.kasregistry.ListKeyAccessServersResponse. + * Use `create(ListKeyAccessServersResponseSchema)` to create a new message. + */ +export const ListKeyAccessServersResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_kasregistry_key_access_server_registry, 3); + +/** + * @generated from message policy.kasregistry.CreateKeyAccessServerRequest + */ +export type CreateKeyAccessServerRequest = Message<"policy.kasregistry.CreateKeyAccessServerRequest"> & { + /** + * Required + * + * @generated from field: string uri = 1; + */ + uri: string; + + /** + * Deprecated + * + * @generated from field: policy.PublicKey public_key = 2; + */ + publicKey?: PublicKey; + + /** + * Optional + * + * @generated from field: policy.SourceType source_type = 3; + */ + sourceType: SourceType; + + /** + * Optional + * + * @generated from field: string name = 20; + */ + name: string; + + /** + * Common metadata + * + * @generated from field: common.MetadataMutable metadata = 100; + */ + metadata?: MetadataMutable; +}; + +/** + * Describes the message policy.kasregistry.CreateKeyAccessServerRequest. + * Use `create(CreateKeyAccessServerRequestSchema)` to create a new message. + */ +export const CreateKeyAccessServerRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_kasregistry_key_access_server_registry, 4); + +/** + * @generated from message policy.kasregistry.CreateKeyAccessServerResponse + */ +export type CreateKeyAccessServerResponse = Message<"policy.kasregistry.CreateKeyAccessServerResponse"> & { + /** + * @generated from field: policy.KeyAccessServer key_access_server = 1; + */ + keyAccessServer?: KeyAccessServer; +}; + +/** + * Describes the message policy.kasregistry.CreateKeyAccessServerResponse. + * Use `create(CreateKeyAccessServerResponseSchema)` to create a new message. + */ +export const CreateKeyAccessServerResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_kasregistry_key_access_server_registry, 5); + +/** + * @generated from message policy.kasregistry.UpdateKeyAccessServerRequest + */ +export type UpdateKeyAccessServerRequest = Message<"policy.kasregistry.UpdateKeyAccessServerRequest"> & { + /** + * Required + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Optional + * + * @generated from field: string uri = 2; + */ + uri: string; + + /** + * Deprecated + * Optional + * + * @generated from field: policy.PublicKey public_key = 3; + */ + publicKey?: PublicKey; + + /** + * Optional + * Using UNSPECIFIED will result in a successful update, + * but will not actually update the underlying source. + * You should not update KAS's from INTERNAL/EXTERNAL + * to unspecified. + * + * @generated from field: policy.SourceType source_type = 4; + */ + sourceType: SourceType; + + /** + * Optional + * + * @generated from field: string name = 20; + */ + name: string; + + /** + * Optional + * Common metadata + * + * @generated from field: common.MetadataMutable metadata = 100; + */ + metadata?: MetadataMutable; + + /** + * @generated from field: common.MetadataUpdateEnum metadata_update_behavior = 101; + */ + metadataUpdateBehavior: MetadataUpdateEnum; +}; + +/** + * Describes the message policy.kasregistry.UpdateKeyAccessServerRequest. + * Use `create(UpdateKeyAccessServerRequestSchema)` to create a new message. + */ +export const UpdateKeyAccessServerRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_kasregistry_key_access_server_registry, 6); + +/** + * @generated from message policy.kasregistry.UpdateKeyAccessServerResponse + */ +export type UpdateKeyAccessServerResponse = Message<"policy.kasregistry.UpdateKeyAccessServerResponse"> & { + /** + * @generated from field: policy.KeyAccessServer key_access_server = 1; + */ + keyAccessServer?: KeyAccessServer; +}; + +/** + * Describes the message policy.kasregistry.UpdateKeyAccessServerResponse. + * Use `create(UpdateKeyAccessServerResponseSchema)` to create a new message. + */ +export const UpdateKeyAccessServerResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_kasregistry_key_access_server_registry, 7); + +/** + * @generated from message policy.kasregistry.DeleteKeyAccessServerRequest + */ +export type DeleteKeyAccessServerRequest = Message<"policy.kasregistry.DeleteKeyAccessServerRequest"> & { + /** + * Required + * + * @generated from field: string id = 1; + */ + id: string; +}; + +/** + * Describes the message policy.kasregistry.DeleteKeyAccessServerRequest. + * Use `create(DeleteKeyAccessServerRequestSchema)` to create a new message. + */ +export const DeleteKeyAccessServerRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_kasregistry_key_access_server_registry, 8); + +/** + * @generated from message policy.kasregistry.DeleteKeyAccessServerResponse + */ +export type DeleteKeyAccessServerResponse = Message<"policy.kasregistry.DeleteKeyAccessServerResponse"> & { + /** + * @generated from field: policy.KeyAccessServer key_access_server = 1; + */ + keyAccessServer?: KeyAccessServer; +}; + +/** + * Describes the message policy.kasregistry.DeleteKeyAccessServerResponse. + * Use `create(DeleteKeyAccessServerResponseSchema)` to create a new message. + */ +export const DeleteKeyAccessServerResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_kasregistry_key_access_server_registry, 9); + +/** + * Can be namespace, attribute definition, or value + * + * @generated from message policy.kasregistry.GrantedPolicyObject + */ +export type GrantedPolicyObject = Message<"policy.kasregistry.GrantedPolicyObject"> & { + /** + * @generated from field: string id = 1; + */ + id: string; + + /** + * @generated from field: string fqn = 2; + */ + fqn: string; +}; + +/** + * Describes the message policy.kasregistry.GrantedPolicyObject. + * Use `create(GrantedPolicyObjectSchema)` to create a new message. + */ +export const GrantedPolicyObjectSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_kasregistry_key_access_server_registry, 10); + +/** + * Deprecated + * + * @generated from message policy.kasregistry.KeyAccessServerGrants + */ +export type KeyAccessServerGrants = Message<"policy.kasregistry.KeyAccessServerGrants"> & { + /** + * @generated from field: policy.KeyAccessServer key_access_server = 1; + */ + keyAccessServer?: KeyAccessServer; + + /** + * @generated from field: repeated policy.kasregistry.GrantedPolicyObject namespace_grants = 2; + */ + namespaceGrants: GrantedPolicyObject[]; + + /** + * @generated from field: repeated policy.kasregistry.GrantedPolicyObject attribute_grants = 3; + */ + attributeGrants: GrantedPolicyObject[]; + + /** + * @generated from field: repeated policy.kasregistry.GrantedPolicyObject value_grants = 4; + */ + valueGrants: GrantedPolicyObject[]; +}; + +/** + * Describes the message policy.kasregistry.KeyAccessServerGrants. + * Use `create(KeyAccessServerGrantsSchema)` to create a new message. + */ +export const KeyAccessServerGrantsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_kasregistry_key_access_server_registry, 11); + +/** + * @generated from message policy.kasregistry.CreatePublicKeyRequest + */ +export type CreatePublicKeyRequest = Message<"policy.kasregistry.CreatePublicKeyRequest"> & { + /** + * Required + * + * @generated from field: string kas_id = 1; + */ + kasId: string; + + /** + * Required + * + * @generated from field: policy.KasPublicKey key = 2; + */ + key?: KasPublicKey; + + /** + * Common metadata + * + * @generated from field: common.MetadataMutable metadata = 100; + */ + metadata?: MetadataMutable; +}; + +/** + * Describes the message policy.kasregistry.CreatePublicKeyRequest. + * Use `create(CreatePublicKeyRequestSchema)` to create a new message. + */ +export const CreatePublicKeyRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_kasregistry_key_access_server_registry, 12); + +/** + * @generated from message policy.kasregistry.CreatePublicKeyResponse + */ +export type CreatePublicKeyResponse = Message<"policy.kasregistry.CreatePublicKeyResponse"> & { + /** + * @generated from field: policy.Key key = 1; + */ + key?: Key; +}; + +/** + * Describes the message policy.kasregistry.CreatePublicKeyResponse. + * Use `create(CreatePublicKeyResponseSchema)` to create a new message. + */ +export const CreatePublicKeyResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_kasregistry_key_access_server_registry, 13); + +/** + * @generated from message policy.kasregistry.GetPublicKeyRequest + */ +export type GetPublicKeyRequest = Message<"policy.kasregistry.GetPublicKeyRequest"> & { + /** + * @generated from oneof policy.kasregistry.GetPublicKeyRequest.identifier + */ + identifier: { + /** + * @generated from field: string id = 1; + */ + value: string; + case: "id"; + } | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message policy.kasregistry.GetPublicKeyRequest. + * Use `create(GetPublicKeyRequestSchema)` to create a new message. + */ +export const GetPublicKeyRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_kasregistry_key_access_server_registry, 14); + +/** + * @generated from message policy.kasregistry.GetPublicKeyResponse + */ +export type GetPublicKeyResponse = Message<"policy.kasregistry.GetPublicKeyResponse"> & { + /** + * @generated from field: policy.Key key = 1; + */ + key?: Key; +}; + +/** + * Describes the message policy.kasregistry.GetPublicKeyResponse. + * Use `create(GetPublicKeyResponseSchema)` to create a new message. + */ +export const GetPublicKeyResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_kasregistry_key_access_server_registry, 15); + +/** + * @generated from message policy.kasregistry.ListPublicKeysRequest + */ +export type ListPublicKeysRequest = Message<"policy.kasregistry.ListPublicKeysRequest"> & { + /** + * @generated from oneof policy.kasregistry.ListPublicKeysRequest.kas_filter + */ + kasFilter: { + /** + * Optional + * + * @generated from field: string kas_id = 1; + */ + value: string; + case: "kasId"; + } | { + /** + * Optional + * + * @generated from field: string kas_name = 2; + */ + value: string; + case: "kasName"; + } | { + /** + * Optional + * + * @generated from field: string kas_uri = 3; + */ + value: string; + case: "kasUri"; + } | { case: undefined; value?: undefined }; + + /** + * Optional + * + * @generated from field: policy.PageRequest pagination = 10; + */ + pagination?: PageRequest; +}; + +/** + * Describes the message policy.kasregistry.ListPublicKeysRequest. + * Use `create(ListPublicKeysRequestSchema)` to create a new message. + */ +export const ListPublicKeysRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_kasregistry_key_access_server_registry, 16); + +/** + * @generated from message policy.kasregistry.ListPublicKeysResponse + */ +export type ListPublicKeysResponse = Message<"policy.kasregistry.ListPublicKeysResponse"> & { + /** + * @generated from field: repeated policy.Key keys = 1; + */ + keys: Key[]; + + /** + * @generated from field: policy.PageResponse pagination = 10; + */ + pagination?: PageResponse; +}; + +/** + * Describes the message policy.kasregistry.ListPublicKeysResponse. + * Use `create(ListPublicKeysResponseSchema)` to create a new message. + */ +export const ListPublicKeysResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_kasregistry_key_access_server_registry, 17); + +/** + * @generated from message policy.kasregistry.ListPublicKeyMappingRequest + */ +export type ListPublicKeyMappingRequest = Message<"policy.kasregistry.ListPublicKeyMappingRequest"> & { + /** + * @generated from oneof policy.kasregistry.ListPublicKeyMappingRequest.kas_filter + */ + kasFilter: { + /** + * Optional + * + * @generated from field: string kas_id = 1; + */ + value: string; + case: "kasId"; + } | { + /** + * Optional + * + * @generated from field: string kas_name = 2; + */ + value: string; + case: "kasName"; + } | { + /** + * Optional + * + * @generated from field: string kas_uri = 3; + */ + value: string; + case: "kasUri"; + } | { case: undefined; value?: undefined }; + + /** + * Optional Public Key ID + * + * @generated from field: string public_key_id = 4; + */ + publicKeyId: string; + + /** + * Optional + * + * @generated from field: policy.PageRequest pagination = 10; + */ + pagination?: PageRequest; +}; + +/** + * Describes the message policy.kasregistry.ListPublicKeyMappingRequest. + * Use `create(ListPublicKeyMappingRequestSchema)` to create a new message. + */ +export const ListPublicKeyMappingRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_kasregistry_key_access_server_registry, 18); + +/** + * @generated from message policy.kasregistry.ListPublicKeyMappingResponse + */ +export type ListPublicKeyMappingResponse = Message<"policy.kasregistry.ListPublicKeyMappingResponse"> & { + /** + * @generated from field: repeated policy.kasregistry.ListPublicKeyMappingResponse.PublicKeyMapping public_key_mappings = 1; + */ + publicKeyMappings: ListPublicKeyMappingResponse_PublicKeyMapping[]; + + /** + * @generated from field: policy.PageResponse pagination = 10; + */ + pagination?: PageResponse; +}; + +/** + * Describes the message policy.kasregistry.ListPublicKeyMappingResponse. + * Use `create(ListPublicKeyMappingResponseSchema)` to create a new message. + */ +export const ListPublicKeyMappingResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_kasregistry_key_access_server_registry, 19); + +/** + * @generated from message policy.kasregistry.ListPublicKeyMappingResponse.PublicKeyMapping + */ +export type ListPublicKeyMappingResponse_PublicKeyMapping = Message<"policy.kasregistry.ListPublicKeyMappingResponse.PublicKeyMapping"> & { + /** + * @generated from field: string kas_id = 2; + */ + kasId: string; + + /** + * @generated from field: string kas_name = 3; + */ + kasName: string; + + /** + * @generated from field: string kas_uri = 4; + */ + kasUri: string; + + /** + * @generated from field: repeated policy.kasregistry.ListPublicKeyMappingResponse.PublicKey public_keys = 5; + */ + publicKeys: ListPublicKeyMappingResponse_PublicKey[]; +}; + +/** + * Describes the message policy.kasregistry.ListPublicKeyMappingResponse.PublicKeyMapping. + * Use `create(ListPublicKeyMappingResponse_PublicKeyMappingSchema)` to create a new message. + */ +export const ListPublicKeyMappingResponse_PublicKeyMappingSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_kasregistry_key_access_server_registry, 19, 0); + +/** + * @generated from message policy.kasregistry.ListPublicKeyMappingResponse.PublicKey + */ +export type ListPublicKeyMappingResponse_PublicKey = Message<"policy.kasregistry.ListPublicKeyMappingResponse.PublicKey"> & { + /** + * @generated from field: policy.Key key = 1; + */ + key?: Key; + + /** + * @generated from field: repeated policy.kasregistry.ListPublicKeyMappingResponse.Association values = 6; + */ + values: ListPublicKeyMappingResponse_Association[]; + + /** + * @generated from field: repeated policy.kasregistry.ListPublicKeyMappingResponse.Association definitions = 7; + */ + definitions: ListPublicKeyMappingResponse_Association[]; + + /** + * @generated from field: repeated policy.kasregistry.ListPublicKeyMappingResponse.Association namespaces = 8; + */ + namespaces: ListPublicKeyMappingResponse_Association[]; +}; + +/** + * Describes the message policy.kasregistry.ListPublicKeyMappingResponse.PublicKey. + * Use `create(ListPublicKeyMappingResponse_PublicKeySchema)` to create a new message. + */ +export const ListPublicKeyMappingResponse_PublicKeySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_kasregistry_key_access_server_registry, 19, 1); + +/** + * @generated from message policy.kasregistry.ListPublicKeyMappingResponse.Association + */ +export type ListPublicKeyMappingResponse_Association = Message<"policy.kasregistry.ListPublicKeyMappingResponse.Association"> & { + /** + * @generated from field: string id = 1; + */ + id: string; + + /** + * @generated from field: string fqn = 2; + */ + fqn: string; +}; + +/** + * Describes the message policy.kasregistry.ListPublicKeyMappingResponse.Association. + * Use `create(ListPublicKeyMappingResponse_AssociationSchema)` to create a new message. + */ +export const ListPublicKeyMappingResponse_AssociationSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_kasregistry_key_access_server_registry, 19, 2); + +/** + * @generated from message policy.kasregistry.UpdatePublicKeyRequest + */ +export type UpdatePublicKeyRequest = Message<"policy.kasregistry.UpdatePublicKeyRequest"> & { + /** + * Required + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Optional + * Common metadata + * + * @generated from field: common.MetadataMutable metadata = 100; + */ + metadata?: MetadataMutable; + + /** + * @generated from field: common.MetadataUpdateEnum metadata_update_behavior = 101; + */ + metadataUpdateBehavior: MetadataUpdateEnum; +}; + +/** + * Describes the message policy.kasregistry.UpdatePublicKeyRequest. + * Use `create(UpdatePublicKeyRequestSchema)` to create a new message. + */ +export const UpdatePublicKeyRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_kasregistry_key_access_server_registry, 20); + +/** + * @generated from message policy.kasregistry.UpdatePublicKeyResponse + */ +export type UpdatePublicKeyResponse = Message<"policy.kasregistry.UpdatePublicKeyResponse"> & { + /** + * @generated from field: policy.Key key = 1; + */ + key?: Key; +}; + +/** + * Describes the message policy.kasregistry.UpdatePublicKeyResponse. + * Use `create(UpdatePublicKeyResponseSchema)` to create a new message. + */ +export const UpdatePublicKeyResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_kasregistry_key_access_server_registry, 21); + +/** + * @generated from message policy.kasregistry.DeactivatePublicKeyRequest + */ +export type DeactivatePublicKeyRequest = Message<"policy.kasregistry.DeactivatePublicKeyRequest"> & { + /** + * @generated from field: string id = 1; + */ + id: string; +}; + +/** + * Describes the message policy.kasregistry.DeactivatePublicKeyRequest. + * Use `create(DeactivatePublicKeyRequestSchema)` to create a new message. + */ +export const DeactivatePublicKeyRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_kasregistry_key_access_server_registry, 22); + +/** + * @generated from message policy.kasregistry.DeactivatePublicKeyResponse + */ +export type DeactivatePublicKeyResponse = Message<"policy.kasregistry.DeactivatePublicKeyResponse"> & { + /** + * @generated from field: policy.Key key = 1; + */ + key?: Key; +}; + +/** + * Describes the message policy.kasregistry.DeactivatePublicKeyResponse. + * Use `create(DeactivatePublicKeyResponseSchema)` to create a new message. + */ +export const DeactivatePublicKeyResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_kasregistry_key_access_server_registry, 23); + +/** + * @generated from message policy.kasregistry.ActivatePublicKeyRequest + */ +export type ActivatePublicKeyRequest = Message<"policy.kasregistry.ActivatePublicKeyRequest"> & { + /** + * @generated from field: string id = 1; + */ + id: string; +}; + +/** + * Describes the message policy.kasregistry.ActivatePublicKeyRequest. + * Use `create(ActivatePublicKeyRequestSchema)` to create a new message. + */ +export const ActivatePublicKeyRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_kasregistry_key_access_server_registry, 24); + +/** + * @generated from message policy.kasregistry.ActivatePublicKeyResponse + */ +export type ActivatePublicKeyResponse = Message<"policy.kasregistry.ActivatePublicKeyResponse"> & { + /** + * @generated from field: policy.Key key = 1; + */ + key?: Key; +}; + +/** + * Describes the message policy.kasregistry.ActivatePublicKeyResponse. + * Use `create(ActivatePublicKeyResponseSchema)` to create a new message. + */ +export const ActivatePublicKeyResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_kasregistry_key_access_server_registry, 25); + +/** + * LIST of KAS Grants returns flat response of grants to all policy objects. It + * does not employ selectors for grants to specific policy objects or build the + * attribute tree relation. If grants to a known namespace, attribute, or value + * are needed, use the respective GET request to the specific policy object. + * + * @generated from message policy.kasregistry.ListKeyAccessServerGrantsRequest + */ +export type ListKeyAccessServerGrantsRequest = Message<"policy.kasregistry.ListKeyAccessServerGrantsRequest"> & { + /** + * Optional + * Filter LIST by ID of a registered Key Access Server. + * If neither is provided, grants from all registered KASs to policy attribute + * objects are returned. + * + * @generated from field: string kas_id = 1; + */ + kasId: string; + + /** + * Optional + * Filter LIST by URI of a registered Key Access Server. + * If none is provided, grants from all registered KASs to policy attribute + * objects are returned. + * + * @generated from field: string kas_uri = 2; + */ + kasUri: string; + + /** + * Optional + * Filter LIST by name of a registered Key Access Server. + * If none are provided, grants from all registered KASs to policy attribute + * objects are returned. + * + * @generated from field: string kas_name = 3; + */ + kasName: string; + + /** + * Optional + * + * @generated from field: policy.PageRequest pagination = 10; + */ + pagination?: PageRequest; +}; + +/** + * Describes the message policy.kasregistry.ListKeyAccessServerGrantsRequest. + * Use `create(ListKeyAccessServerGrantsRequestSchema)` to create a new message. + */ +export const ListKeyAccessServerGrantsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_kasregistry_key_access_server_registry, 26); + +/** + * Deprecated + * + * @generated from message policy.kasregistry.ListKeyAccessServerGrantsResponse + */ +export type ListKeyAccessServerGrantsResponse = Message<"policy.kasregistry.ListKeyAccessServerGrantsResponse"> & { + /** + * @generated from field: repeated policy.kasregistry.KeyAccessServerGrants grants = 1 [deprecated = true]; + * @deprecated + */ + grants: KeyAccessServerGrants[]; + + /** + * @generated from field: policy.PageResponse pagination = 10; + */ + pagination?: PageResponse; +}; + +/** + * Describes the message policy.kasregistry.ListKeyAccessServerGrantsResponse. + * Use `create(ListKeyAccessServerGrantsResponseSchema)` to create a new message. + */ +export const ListKeyAccessServerGrantsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_kasregistry_key_access_server_registry, 27); + +/** + * Create a new asymmetric key for the specified Key Access Server (KAS) + * + * @generated from message policy.kasregistry.CreateKeyRequest + */ +export type CreateKeyRequest = Message<"policy.kasregistry.CreateKeyRequest"> & { + /** + * Required + * + * The unique identifier of the Key Access Server + * + * @generated from field: string kas_id = 1; + */ + kasId: string; + + /** + * Required + * + * A user-defined identifier for the key + * + * @generated from field: string key_id = 2; + */ + keyId: string; + + /** + * Required + * + * The algorithm to be used for the key + * + * @generated from field: policy.Algorithm key_algorithm = 3; + */ + keyAlgorithm: Algorithm; + + /** + * Required + * + * The mode of the key (e.g., local or external) + * + * @generated from field: policy.KeyMode key_mode = 4; + */ + keyMode: KeyMode; + + /** + * Required + * + * Context or additional data specific to the public key, based on the key provider implementation + * + * @generated from field: bytes public_key_ctx = 5; + */ + publicKeyCtx: Uint8Array; + + /** + * Optional + * + * Context or additional data specific to the private key, based on the key provider implementation + * + * @generated from field: bytes private_key_ctx = 6; + */ + privateKeyCtx: Uint8Array; + + /** + * Optional + * + * Configuration ID for the key provider, if applicable + * + * @generated from field: string provider_config_id = 7; + */ + providerConfigId: string; + + /** + * Common metadata + * + * Mutable metadata for the key + * + * @generated from field: common.MetadataMutable metadata = 100; + */ + metadata?: MetadataMutable; +}; + +/** + * Describes the message policy.kasregistry.CreateKeyRequest. + * Use `create(CreateKeyRequestSchema)` to create a new message. + */ +export const CreateKeyRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_kasregistry_key_access_server_registry, 28); + +/** + * Response to a CreateKeyRequest, containing the created asymmetric key + * + * @generated from message policy.kasregistry.CreateKeyResponse + */ +export type CreateKeyResponse = Message<"policy.kasregistry.CreateKeyResponse"> & { + /** + * The created asymmetric key for a KAS. + * + * @generated from field: policy.KasKey kas_key = 1; + */ + kasKey?: KasKey; +}; + +/** + * Describes the message policy.kasregistry.CreateKeyResponse. + * Use `create(CreateKeyResponseSchema)` to create a new message. + */ +export const CreateKeyResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_kasregistry_key_access_server_registry, 29); + +/** + * Retrieve an existing asymmetric key from the Key Management System + * + * @generated from message policy.kasregistry.GetKeyRequest + */ +export type GetKeyRequest = Message<"policy.kasregistry.GetKeyRequest"> & { + /** + * @generated from oneof policy.kasregistry.GetKeyRequest.identifier + */ + identifier: { + /** + * The unique identifier of the key to retrieve + * + * @generated from field: string id = 2; + */ + value: string; + case: "id"; + } | { + /** + * @generated from field: policy.kasregistry.KasKeyIdentifier key = 3; + */ + value: KasKeyIdentifier; + case: "key"; + } | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message policy.kasregistry.GetKeyRequest. + * Use `create(GetKeyRequestSchema)` to create a new message. + */ +export const GetKeyRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_kasregistry_key_access_server_registry, 30); + +/** + * Response to a GetKeyRequest, containing the requested asymmetric key + * + * @generated from message policy.kasregistry.GetKeyResponse + */ +export type GetKeyResponse = Message<"policy.kasregistry.GetKeyResponse"> & { + /** + * The requested asymmetric key for a KAS. + * + * @generated from field: policy.KasKey kas_key = 1; + */ + kasKey?: KasKey; +}; + +/** + * Describes the message policy.kasregistry.GetKeyResponse. + * Use `create(GetKeyResponseSchema)` to create a new message. + */ +export const GetKeyResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_kasregistry_key_access_server_registry, 31); + +/** + * List all asymmetric keys managed by a specific Key Access Server or with a given algorithm + * + * @generated from message policy.kasregistry.ListKeysRequest + */ +export type ListKeysRequest = Message<"policy.kasregistry.ListKeysRequest"> & { + /** + * Filter keys by algorithm + * + * @generated from field: policy.Algorithm key_algorithm = 1; + */ + keyAlgorithm: Algorithm; + + /** + * @generated from oneof policy.kasregistry.ListKeysRequest.kas_filter + */ + kasFilter: { + /** + * Filter keys by the KAS ID + * + * @generated from field: string kas_id = 2; + */ + value: string; + case: "kasId"; + } | { + /** + * Filter keys by the KAS name + * + * @generated from field: string kas_name = 3; + */ + value: string; + case: "kasName"; + } | { + /** + * Filter keys by the KAS URI + * + * @generated from field: string kas_uri = 4; + */ + value: string; + case: "kasUri"; + } | { case: undefined; value?: undefined }; + + /** + * Optional + * + * Pagination request for the list of keys + * + * @generated from field: policy.PageRequest pagination = 10; + */ + pagination?: PageRequest; +}; + +/** + * Describes the message policy.kasregistry.ListKeysRequest. + * Use `create(ListKeysRequestSchema)` to create a new message. + */ +export const ListKeysRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_kasregistry_key_access_server_registry, 32); + +/** + * Response to a ListKeysRequest, containing the list of asymmetric keys and pagination information + * + * @generated from message policy.kasregistry.ListKeysResponse + */ +export type ListKeysResponse = Message<"policy.kasregistry.ListKeysResponse"> & { + /** + * The list of kas keys + * + * @generated from field: repeated policy.KasKey kas_keys = 1; + */ + kasKeys: KasKey[]; + + /** + * Pagination response for the list of keys + * + * @generated from field: policy.PageResponse pagination = 10; + */ + pagination?: PageResponse; +}; + +/** + * Describes the message policy.kasregistry.ListKeysResponse. + * Use `create(ListKeysResponseSchema)` to create a new message. + */ +export const ListKeysResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_kasregistry_key_access_server_registry, 33); + +/** + * Update an existing asymmetric key in the Key Management System + * + * @generated from message policy.kasregistry.UpdateKeyRequest + */ +export type UpdateKeyRequest = Message<"policy.kasregistry.UpdateKeyRequest"> & { + /** + * Required + * + * The unique identifier of the key to update + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Optional + * + * The new status of the key (e.g., active, inactive) + * + * @generated from field: policy.KeyStatus key_status = 2; + */ + keyStatus: KeyStatus; + + /** + * Optional + * Common metadata + * + * Mutable metadata for the key + * + * @generated from field: common.MetadataMutable metadata = 100; + */ + metadata?: MetadataMutable; + + /** + * The behavior for updating the metadata + * + * @generated from field: common.MetadataUpdateEnum metadata_update_behavior = 101; + */ + metadataUpdateBehavior: MetadataUpdateEnum; +}; + +/** + * Describes the message policy.kasregistry.UpdateKeyRequest. + * Use `create(UpdateKeyRequestSchema)` to create a new message. + */ +export const UpdateKeyRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_kasregistry_key_access_server_registry, 34); + +/** + * Response to an UpdateKeyRequest, containing the updated asymmetric key + * + * @generated from message policy.kasregistry.UpdateKeyResponse + */ +export type UpdateKeyResponse = Message<"policy.kasregistry.UpdateKeyResponse"> & { + /** + * The updated kas key + * + * @generated from field: policy.KasKey kas_key = 1; + */ + kasKey?: KasKey; +}; + +/** + * Describes the message policy.kasregistry.UpdateKeyResponse. + * Use `create(UpdateKeyResponseSchema)` to create a new message. + */ +export const UpdateKeyResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_kasregistry_key_access_server_registry, 35); + +/** + * Nested message for specifying the active key using KAS ID and Key ID + * + * @generated from message policy.kasregistry.KasKeyIdentifier + */ +export type KasKeyIdentifier = Message<"policy.kasregistry.KasKeyIdentifier"> & { + /** + * Required UUID of the Key Access Server + * + * @generated from oneof policy.kasregistry.KasKeyIdentifier.identifier + */ + identifier: { + /** + * @generated from field: string kas_id = 2; + */ + value: string; + case: "kasId"; + } | { + /** + * @generated from field: string name = 3; + */ + value: string; + case: "name"; + } | { + /** + * @generated from field: string uri = 4; + */ + value: string; + case: "uri"; + } | { case: undefined; value?: undefined }; + + /** + * Required Key ID of the key in question + * + * @generated from field: string kid = 5; + */ + kid: string; +}; + +/** + * Describes the message policy.kasregistry.KasKeyIdentifier. + * Use `create(KasKeyIdentifierSchema)` to create a new message. + */ +export const KasKeyIdentifierSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_kasregistry_key_access_server_registry, 36); + +/** + * @generated from message policy.kasregistry.RotateKeyRequest + */ +export type RotateKeyRequest = Message<"policy.kasregistry.RotateKeyRequest"> & { + /** + * Required (Current Active Key ID) + * + * @generated from oneof policy.kasregistry.RotateKeyRequest.active_key + */ + activeKey: { + /** + * Current Active Key UUID + * + * @generated from field: string id = 1; + */ + value: string; + case: "id"; + } | { + /** + * Alternative way to specify the active key using KAS ID and Key ID + * + * @generated from field: policy.kasregistry.KasKeyIdentifier key = 2; + */ + value: KasKeyIdentifier; + case: "key"; + } | { case: undefined; value?: undefined }; + + /** + * Information about the new key to be rotated in + * + * @generated from field: policy.kasregistry.RotateKeyRequest.NewKey new_key = 3; + */ + newKey?: RotateKeyRequest_NewKey; +}; + +/** + * Describes the message policy.kasregistry.RotateKeyRequest. + * Use `create(RotateKeyRequestSchema)` to create a new message. + */ +export const RotateKeyRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_kasregistry_key_access_server_registry, 37); + +/** + * Nested message for specifying the new key details + * + * @generated from message policy.kasregistry.RotateKeyRequest.NewKey + */ +export type RotateKeyRequest_NewKey = Message<"policy.kasregistry.RotateKeyRequest.NewKey"> & { + /** + * Required + * + * @generated from field: string key_id = 1; + */ + keyId: string; + + /** + * Required + * + * @generated from field: policy.Algorithm algorithm = 2; + */ + algorithm: Algorithm; + + /** + * Required + * + * @generated from field: policy.KeyMode key_mode = 3; + */ + keyMode: KeyMode; + + /** + * Required + * + * Specific structure based on key provider implementation + * + * @generated from field: bytes private_key_ctx = 4; + */ + privateKeyCtx: Uint8Array; + + /** + * Optional + * + * @generated from field: bytes public_key_ctx = 5; + */ + publicKeyCtx: Uint8Array; + + /** + * @generated from field: string provider_config_id = 6; + */ + providerConfigId: string; + + /** + * Common metadata fields + * + * @generated from field: common.Metadata metadata = 100; + */ + metadata?: Metadata; +}; + +/** + * Describes the message policy.kasregistry.RotateKeyRequest.NewKey. + * Use `create(RotateKeyRequest_NewKeySchema)` to create a new message. + */ +export const RotateKeyRequest_NewKeySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_kasregistry_key_access_server_registry, 37, 0); + +/** + * Response message for the RotateKey request + * + * @generated from message policy.kasregistry.RotateKeyResponse + */ +export type RotateKeyResponse = Message<"policy.kasregistry.RotateKeyResponse"> & { + /** + * The newly rotated Kas Key + * + * @generated from field: policy.KasKey kas_key = 1; + */ + kasKey?: KasKey; +}; + +/** + * Describes the message policy.kasregistry.RotateKeyResponse. + * Use `create(RotateKeyResponseSchema)` to create a new message. + */ +export const RotateKeyResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_kasregistry_key_access_server_registry, 38); + +/** + * @generated from service policy.kasregistry.KeyAccessServerRegistryService + */ +export const KeyAccessServerRegistryService: GenService<{ + /** + * @generated from rpc policy.kasregistry.KeyAccessServerRegistryService.ListKeyAccessServers + */ + listKeyAccessServers: { + methodKind: "unary"; + input: typeof ListKeyAccessServersRequestSchema; + output: typeof ListKeyAccessServersResponseSchema; + }, + /** + * @generated from rpc policy.kasregistry.KeyAccessServerRegistryService.GetKeyAccessServer + */ + getKeyAccessServer: { + methodKind: "unary"; + input: typeof GetKeyAccessServerRequestSchema; + output: typeof GetKeyAccessServerResponseSchema; + }, + /** + * @generated from rpc policy.kasregistry.KeyAccessServerRegistryService.CreateKeyAccessServer + */ + createKeyAccessServer: { + methodKind: "unary"; + input: typeof CreateKeyAccessServerRequestSchema; + output: typeof CreateKeyAccessServerResponseSchema; + }, + /** + * @generated from rpc policy.kasregistry.KeyAccessServerRegistryService.UpdateKeyAccessServer + */ + updateKeyAccessServer: { + methodKind: "unary"; + input: typeof UpdateKeyAccessServerRequestSchema; + output: typeof UpdateKeyAccessServerResponseSchema; + }, + /** + * @generated from rpc policy.kasregistry.KeyAccessServerRegistryService.DeleteKeyAccessServer + */ + deleteKeyAccessServer: { + methodKind: "unary"; + input: typeof DeleteKeyAccessServerRequestSchema; + output: typeof DeleteKeyAccessServerResponseSchema; + }, + /** + * Deprecated + * + * @generated from rpc policy.kasregistry.KeyAccessServerRegistryService.ListKeyAccessServerGrants + */ + listKeyAccessServerGrants: { + methodKind: "unary"; + input: typeof ListKeyAccessServerGrantsRequestSchema; + output: typeof ListKeyAccessServerGrantsResponseSchema; + }, + /** + * KAS Key Management + * Request to create a new key in the Key Access Service. + * + * @generated from rpc policy.kasregistry.KeyAccessServerRegistryService.CreateKey + */ + createKey: { + methodKind: "unary"; + input: typeof CreateKeyRequestSchema; + output: typeof CreateKeyResponseSchema; + }, + /** + * Request to retrieve a key from the Key Access Service. + * + * @generated from rpc policy.kasregistry.KeyAccessServerRegistryService.GetKey + */ + getKey: { + methodKind: "unary"; + input: typeof GetKeyRequestSchema; + output: typeof GetKeyResponseSchema; + }, + /** + * Request to list keys in the Key Access Service. + * + * @generated from rpc policy.kasregistry.KeyAccessServerRegistryService.ListKeys + */ + listKeys: { + methodKind: "unary"; + input: typeof ListKeysRequestSchema; + output: typeof ListKeysResponseSchema; + }, + /** + * Request to update a key in the Key Access Service. + * + * @generated from rpc policy.kasregistry.KeyAccessServerRegistryService.UpdateKey + */ + updateKey: { + methodKind: "unary"; + input: typeof UpdateKeyRequestSchema; + output: typeof UpdateKeyResponseSchema; + }, + /** + * Request to rotate a key in the Key Access Service. + * + * @generated from rpc policy.kasregistry.KeyAccessServerRegistryService.RotateKey + */ + rotateKey: { + methodKind: "unary"; + input: typeof RotateKeyRequestSchema; + output: typeof RotateKeyResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_policy_kasregistry_key_access_server_registry, 0); + diff --git a/lib/src/platform/policy/keymanagement/key_management_pb.ts b/lib/src/platform/policy/keymanagement/key_management_pb.ts new file mode 100644 index 00000000..2edeb916 --- /dev/null +++ b/lib/src/platform/policy/keymanagement/key_management_pb.ts @@ -0,0 +1,316 @@ +// @generated by protoc-gen-es v2.2.5 with parameter "target=ts,import_extension=.js" +// @generated from file policy/keymanagement/key_management.proto (package policy.keymanagement, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1"; +import { file_buf_validate_validate } from "../../buf/validate/validate_pb.js"; +import type { MetadataMutable, MetadataUpdateEnum } from "../../common/common_pb.js"; +import { file_common_common } from "../../common/common_pb.js"; +import type { KeyProviderConfig } from "../objects_pb.js"; +import { file_policy_objects } from "../objects_pb.js"; +import type { PageRequest, PageResponse } from "../selectors_pb.js"; +import { file_policy_selectors } from "../selectors_pb.js"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file policy/keymanagement/key_management.proto. + */ +export const file_policy_keymanagement_key_management: GenFile = /*@__PURE__*/ + fileDesc("Cilwb2xpY3kva2V5bWFuYWdlbWVudC9rZXlfbWFuYWdlbWVudC5wcm90bxIUcG9saWN5LmtleW1hbmFnZW1lbnQiewobQ3JlYXRlUHJvdmlkZXJDb25maWdSZXF1ZXN0EhQKBG5hbWUYASABKAlCBrpIA8gBARIbCgtjb25maWdfanNvbhgCIAEoDEIGukgDyAEBEikKCG1ldGFkYXRhGGQgASgLMhcuY29tbW9uLk1ldGFkYXRhTXV0YWJsZSJSChxDcmVhdGVQcm92aWRlckNvbmZpZ1Jlc3BvbnNlEjIKD3Byb3ZpZGVyX2NvbmZpZxgBIAEoCzIZLnBvbGljeS5LZXlQcm92aWRlckNvbmZpZyJgChhHZ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5TWFuYWdlbWVudFNlcnZpY2USfwoUQ3JlYXRlUHJvdmlkZXJDb25maWcSMS5wb2xpY3kua2V5bWFuYWdlbWVudC5DcmVhdGVQcm92aWRlckNvbmZpZ1JlcXVlc3QaMi5wb2xpY3kua2V5bWFuYWdlbWVudC5DcmVhdGVQcm92aWRlckNvbmZpZ1Jlc3BvbnNlIgASdgoRR2V0UHJvdmlkZXJDb25maWcSLi5wb2xpY3kua2V5bWFuYWdlbWVudC5HZXRQcm92aWRlckNvbmZpZ1JlcXVlc3QaLy5wb2xpY3kua2V5bWFuYWdlbWVudC5HZXRQcm92aWRlckNvbmZpZ1Jlc3BvbnNlIgASfAoTTGlzdFByb3ZpZGVyQ29uZmlncxIwLnBvbGljeS5rZXltYW5hZ2VtZW50Lkxpc3RQcm92aWRlckNvbmZpZ3NSZXF1ZXN0GjEucG9saWN5LmtleW1hbmFnZW1lbnQuTGlzdFByb3ZpZGVyQ29uZmlnc1Jlc3BvbnNlIgASfwoUVXBkYXRlUHJvdmlkZXJDb25maWcSMS5wb2xpY3kua2V5bWFuYWdlbWVudC5VcGRhdGVQcm92aWRlckNvbmZpZ1JlcXVlc3QaMi5wb2xpY3kua2V5bWFuYWdlbWVudC5VcGRhdGVQcm92aWRlckNvbmZpZ1Jlc3BvbnNlIgASfwoURGVsZXRlUHJvdmlkZXJDb25maWcSMS5wb2xpY3kua2V5bWFuYWdlbWVudC5EZWxldGVQcm92aWRlckNvbmZpZ1JlcXVlc3QaMi5wb2xpY3kua2V5bWFuYWdlbWVudC5EZWxldGVQcm92aWRlckNvbmZpZ1Jlc3BvbnNlIgBiBnByb3RvMw", [file_buf_validate_validate, file_common_common, file_policy_objects, file_policy_selectors]); + +/** + * + * Provider Configuration Requests and Response Messages + * + * @generated from message policy.keymanagement.CreateProviderConfigRequest + */ +export type CreateProviderConfigRequest = Message<"policy.keymanagement.CreateProviderConfigRequest"> & { + /** + * Required + * The name of the key provider. (e.g. "AWS KMS", "Google Cloud KMS", "Azure Key Vault") + * + * @generated from field: string name = 1; + */ + name: string; + + /** + * Required + * JSON configuration for the key provider. This is unique to individual key providers. + * + * @generated from field: bytes config_json = 2; + */ + configJson: Uint8Array; + + /** + * Common metadata + * + * @generated from field: common.MetadataMutable metadata = 100; + */ + metadata?: MetadataMutable; +}; + +/** + * Describes the message policy.keymanagement.CreateProviderConfigRequest. + * Use `create(CreateProviderConfigRequestSchema)` to create a new message. + */ +export const CreateProviderConfigRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_keymanagement_key_management, 0); + +/** + * @generated from message policy.keymanagement.CreateProviderConfigResponse + */ +export type CreateProviderConfigResponse = Message<"policy.keymanagement.CreateProviderConfigResponse"> & { + /** + * @generated from field: policy.KeyProviderConfig provider_config = 1; + */ + providerConfig?: KeyProviderConfig; +}; + +/** + * Describes the message policy.keymanagement.CreateProviderConfigResponse. + * Use `create(CreateProviderConfigResponseSchema)` to create a new message. + */ +export const CreateProviderConfigResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_keymanagement_key_management, 1); + +/** + * @generated from message policy.keymanagement.GetProviderConfigRequest + */ +export type GetProviderConfigRequest = Message<"policy.keymanagement.GetProviderConfigRequest"> & { + /** + * Required + * + * @generated from oneof policy.keymanagement.GetProviderConfigRequest.identifier + */ + identifier: { + /** + * @generated from field: string id = 2; + */ + value: string; + case: "id"; + } | { + /** + * @generated from field: string name = 3; + */ + value: string; + case: "name"; + } | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message policy.keymanagement.GetProviderConfigRequest. + * Use `create(GetProviderConfigRequestSchema)` to create a new message. + */ +export const GetProviderConfigRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_keymanagement_key_management, 2); + +/** + * @generated from message policy.keymanagement.GetProviderConfigResponse + */ +export type GetProviderConfigResponse = Message<"policy.keymanagement.GetProviderConfigResponse"> & { + /** + * @generated from field: policy.KeyProviderConfig provider_config = 1; + */ + providerConfig?: KeyProviderConfig; +}; + +/** + * Describes the message policy.keymanagement.GetProviderConfigResponse. + * Use `create(GetProviderConfigResponseSchema)` to create a new message. + */ +export const GetProviderConfigResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_keymanagement_key_management, 3); + +/** + * @generated from message policy.keymanagement.ListProviderConfigsRequest + */ +export type ListProviderConfigsRequest = Message<"policy.keymanagement.ListProviderConfigsRequest"> & { + /** + * Optional + * + * @generated from field: policy.PageRequest pagination = 10; + */ + pagination?: PageRequest; +}; + +/** + * Describes the message policy.keymanagement.ListProviderConfigsRequest. + * Use `create(ListProviderConfigsRequestSchema)` to create a new message. + */ +export const ListProviderConfigsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_keymanagement_key_management, 4); + +/** + * @generated from message policy.keymanagement.ListProviderConfigsResponse + */ +export type ListProviderConfigsResponse = Message<"policy.keymanagement.ListProviderConfigsResponse"> & { + /** + * @generated from field: repeated policy.KeyProviderConfig provider_configs = 1; + */ + providerConfigs: KeyProviderConfig[]; + + /** + * @generated from field: policy.PageResponse pagination = 10; + */ + pagination?: PageResponse; +}; + +/** + * Describes the message policy.keymanagement.ListProviderConfigsResponse. + * Use `create(ListProviderConfigsResponseSchema)` to create a new message. + */ +export const ListProviderConfigsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_keymanagement_key_management, 5); + +/** + * @generated from message policy.keymanagement.UpdateProviderConfigRequest + */ +export type UpdateProviderConfigRequest = Message<"policy.keymanagement.UpdateProviderConfigRequest"> & { + /** + * Required + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Optional + * + * @generated from field: string name = 2; + */ + name: string; + + /** + * Optional + * + * @generated from field: bytes config_json = 3; + */ + configJson: Uint8Array; + + /** + * Optional + * Common metadata + * + * @generated from field: common.MetadataMutable metadata = 100; + */ + metadata?: MetadataMutable; + + /** + * @generated from field: common.MetadataUpdateEnum metadata_update_behavior = 101; + */ + metadataUpdateBehavior: MetadataUpdateEnum; +}; + +/** + * Describes the message policy.keymanagement.UpdateProviderConfigRequest. + * Use `create(UpdateProviderConfigRequestSchema)` to create a new message. + */ +export const UpdateProviderConfigRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_keymanagement_key_management, 6); + +/** + * @generated from message policy.keymanagement.UpdateProviderConfigResponse + */ +export type UpdateProviderConfigResponse = Message<"policy.keymanagement.UpdateProviderConfigResponse"> & { + /** + * @generated from field: policy.KeyProviderConfig provider_config = 1; + */ + providerConfig?: KeyProviderConfig; +}; + +/** + * Describes the message policy.keymanagement.UpdateProviderConfigResponse. + * Use `create(UpdateProviderConfigResponseSchema)` to create a new message. + */ +export const UpdateProviderConfigResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_keymanagement_key_management, 7); + +/** + * In order to delete a provider configuration you must first delete all keys associated with the provider. + * + * @generated from message policy.keymanagement.DeleteProviderConfigRequest + */ +export type DeleteProviderConfigRequest = Message<"policy.keymanagement.DeleteProviderConfigRequest"> & { + /** + * Required + * + * @generated from field: string id = 1; + */ + id: string; +}; + +/** + * Describes the message policy.keymanagement.DeleteProviderConfigRequest. + * Use `create(DeleteProviderConfigRequestSchema)` to create a new message. + */ +export const DeleteProviderConfigRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_keymanagement_key_management, 8); + +/** + * @generated from message policy.keymanagement.DeleteProviderConfigResponse + */ +export type DeleteProviderConfigResponse = Message<"policy.keymanagement.DeleteProviderConfigResponse"> & { + /** + * @generated from field: policy.KeyProviderConfig provider_config = 1; + */ + providerConfig?: KeyProviderConfig; +}; + +/** + * Describes the message policy.keymanagement.DeleteProviderConfigResponse. + * Use `create(DeleteProviderConfigResponseSchema)` to create a new message. + */ +export const DeleteProviderConfigResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_keymanagement_key_management, 9); + +/** + * @generated from service policy.keymanagement.KeyManagementService + */ +export const KeyManagementService: GenService<{ + /** + * Key Management + * Provider Management + * + * @generated from rpc policy.keymanagement.KeyManagementService.CreateProviderConfig + */ + createProviderConfig: { + methodKind: "unary"; + input: typeof CreateProviderConfigRequestSchema; + output: typeof CreateProviderConfigResponseSchema; + }, + /** + * @generated from rpc policy.keymanagement.KeyManagementService.GetProviderConfig + */ + getProviderConfig: { + methodKind: "unary"; + input: typeof GetProviderConfigRequestSchema; + output: typeof GetProviderConfigResponseSchema; + }, + /** + * @generated from rpc policy.keymanagement.KeyManagementService.ListProviderConfigs + */ + listProviderConfigs: { + methodKind: "unary"; + input: typeof ListProviderConfigsRequestSchema; + output: typeof ListProviderConfigsResponseSchema; + }, + /** + * @generated from rpc policy.keymanagement.KeyManagementService.UpdateProviderConfig + */ + updateProviderConfig: { + methodKind: "unary"; + input: typeof UpdateProviderConfigRequestSchema; + output: typeof UpdateProviderConfigResponseSchema; + }, + /** + * @generated from rpc policy.keymanagement.KeyManagementService.DeleteProviderConfig + */ + deleteProviderConfig: { + methodKind: "unary"; + input: typeof DeleteProviderConfigRequestSchema; + output: typeof DeleteProviderConfigResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_policy_keymanagement_key_management, 0); + diff --git a/lib/src/platform/policy/namespaces/namespaces_connect.d.ts b/lib/src/platform/policy/namespaces/namespaces_connect.d.ts deleted file mode 100644 index 669a4817..00000000 --- a/lib/src/platform/policy/namespaces/namespaces_connect.d.ts +++ /dev/null @@ -1,62 +0,0 @@ -// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=js+dts,import_extension=none" -// @generated from file policy/namespaces/namespaces.proto (package policy.namespaces, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { CreateNamespaceRequest, CreateNamespaceResponse, DeactivateNamespaceRequest, DeactivateNamespaceResponse, GetNamespaceRequest, GetNamespaceResponse, ListNamespacesRequest, ListNamespacesResponse, UpdateNamespaceRequest, UpdateNamespaceResponse } from "./namespaces_pb"; -import { MethodKind } from "@bufbuild/protobuf"; - -/** - * @generated from service policy.namespaces.NamespaceService - */ -export declare const NamespaceService: { - readonly typeName: "policy.namespaces.NamespaceService", - readonly methods: { - /** - * @generated from rpc policy.namespaces.NamespaceService.GetNamespace - */ - readonly getNamespace: { - readonly name: "GetNamespace", - readonly I: typeof GetNamespaceRequest, - readonly O: typeof GetNamespaceResponse, - readonly kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.namespaces.NamespaceService.ListNamespaces - */ - readonly listNamespaces: { - readonly name: "ListNamespaces", - readonly I: typeof ListNamespacesRequest, - readonly O: typeof ListNamespacesResponse, - readonly kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.namespaces.NamespaceService.CreateNamespace - */ - readonly createNamespace: { - readonly name: "CreateNamespace", - readonly I: typeof CreateNamespaceRequest, - readonly O: typeof CreateNamespaceResponse, - readonly kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.namespaces.NamespaceService.UpdateNamespace - */ - readonly updateNamespace: { - readonly name: "UpdateNamespace", - readonly I: typeof UpdateNamespaceRequest, - readonly O: typeof UpdateNamespaceResponse, - readonly kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.namespaces.NamespaceService.DeactivateNamespace - */ - readonly deactivateNamespace: { - readonly name: "DeactivateNamespace", - readonly I: typeof DeactivateNamespaceRequest, - readonly O: typeof DeactivateNamespaceResponse, - readonly kind: MethodKind.Unary, - }, - } -}; - diff --git a/lib/src/platform/policy/namespaces/namespaces_connect.js b/lib/src/platform/policy/namespaces/namespaces_connect.js deleted file mode 100644 index f962d9f7..00000000 --- a/lib/src/platform/policy/namespaces/namespaces_connect.js +++ /dev/null @@ -1,62 +0,0 @@ -// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=js+dts,import_extension=none" -// @generated from file policy/namespaces/namespaces.proto (package policy.namespaces, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { CreateNamespaceRequest, CreateNamespaceResponse, DeactivateNamespaceRequest, DeactivateNamespaceResponse, GetNamespaceRequest, GetNamespaceResponse, ListNamespacesRequest, ListNamespacesResponse, UpdateNamespaceRequest, UpdateNamespaceResponse } from "./namespaces_pb"; -import { MethodKind } from "@bufbuild/protobuf"; - -/** - * @generated from service policy.namespaces.NamespaceService - */ -export const NamespaceService = { - typeName: "policy.namespaces.NamespaceService", - methods: { - /** - * @generated from rpc policy.namespaces.NamespaceService.GetNamespace - */ - getNamespace: { - name: "GetNamespace", - I: GetNamespaceRequest, - O: GetNamespaceResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.namespaces.NamespaceService.ListNamespaces - */ - listNamespaces: { - name: "ListNamespaces", - I: ListNamespacesRequest, - O: ListNamespacesResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.namespaces.NamespaceService.CreateNamespace - */ - createNamespace: { - name: "CreateNamespace", - I: CreateNamespaceRequest, - O: CreateNamespaceResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.namespaces.NamespaceService.UpdateNamespace - */ - updateNamespace: { - name: "UpdateNamespace", - I: UpdateNamespaceRequest, - O: UpdateNamespaceResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.namespaces.NamespaceService.DeactivateNamespace - */ - deactivateNamespace: { - name: "DeactivateNamespace", - I: DeactivateNamespaceRequest, - O: DeactivateNamespaceResponse, - kind: MethodKind.Unary, - }, - } -}; - diff --git a/lib/src/platform/policy/namespaces/namespaces_pb.d.ts b/lib/src/platform/policy/namespaces/namespaces_pb.d.ts deleted file mode 100644 index 2ed7c6ca..00000000 --- a/lib/src/platform/policy/namespaces/namespaces_pb.d.ts +++ /dev/null @@ -1,270 +0,0 @@ -// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" -// @generated from file policy/namespaces/namespaces.proto (package policy.namespaces, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3 } from "@bufbuild/protobuf"; -import type { Namespace } from "../objects_pb"; -import type { ActiveStateEnum, MetadataMutable, MetadataUpdateEnum } from "../../common/common_pb"; - -/** - * @generated from message policy.namespaces.GetNamespaceRequest - */ -export declare class GetNamespaceRequest extends Message { - /** - * @generated from field: string id = 1; - */ - id: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.namespaces.GetNamespaceRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetNamespaceRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetNamespaceRequest; - - static fromJsonString(jsonString: string, options?: Partial): GetNamespaceRequest; - - static equals(a: GetNamespaceRequest | PlainMessage | undefined, b: GetNamespaceRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.namespaces.GetNamespaceResponse - */ -export declare class GetNamespaceResponse extends Message { - /** - * @generated from field: policy.Namespace namespace = 1; - */ - namespace?: Namespace; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.namespaces.GetNamespaceResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetNamespaceResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetNamespaceResponse; - - static fromJsonString(jsonString: string, options?: Partial): GetNamespaceResponse; - - static equals(a: GetNamespaceResponse | PlainMessage | undefined, b: GetNamespaceResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.namespaces.ListNamespacesRequest - */ -export declare class ListNamespacesRequest extends Message { - /** - * ACTIVE by default when not specified - * - * @generated from field: common.ActiveStateEnum state = 1; - */ - state: ActiveStateEnum; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.namespaces.ListNamespacesRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): ListNamespacesRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): ListNamespacesRequest; - - static fromJsonString(jsonString: string, options?: Partial): ListNamespacesRequest; - - static equals(a: ListNamespacesRequest | PlainMessage | undefined, b: ListNamespacesRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.namespaces.ListNamespacesResponse - */ -export declare class ListNamespacesResponse extends Message { - /** - * @generated from field: repeated policy.Namespace namespaces = 1; - */ - namespaces: Namespace[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.namespaces.ListNamespacesResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): ListNamespacesResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): ListNamespacesResponse; - - static fromJsonString(jsonString: string, options?: Partial): ListNamespacesResponse; - - static equals(a: ListNamespacesResponse | PlainMessage | undefined, b: ListNamespacesResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.namespaces.CreateNamespaceRequest - */ -export declare class CreateNamespaceRequest extends Message { - /** - * Required - * - * @generated from field: string name = 1; - */ - name: string; - - /** - * Optional - * - * @generated from field: common.MetadataMutable metadata = 100; - */ - metadata?: MetadataMutable; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.namespaces.CreateNamespaceRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateNamespaceRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateNamespaceRequest; - - static fromJsonString(jsonString: string, options?: Partial): CreateNamespaceRequest; - - static equals(a: CreateNamespaceRequest | PlainMessage | undefined, b: CreateNamespaceRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.namespaces.CreateNamespaceResponse - */ -export declare class CreateNamespaceResponse extends Message { - /** - * @generated from field: policy.Namespace namespace = 1; - */ - namespace?: Namespace; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.namespaces.CreateNamespaceResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateNamespaceResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateNamespaceResponse; - - static fromJsonString(jsonString: string, options?: Partial): CreateNamespaceResponse; - - static equals(a: CreateNamespaceResponse | PlainMessage | undefined, b: CreateNamespaceResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.namespaces.UpdateNamespaceRequest - */ -export declare class UpdateNamespaceRequest extends Message { - /** - * Required - * - * @generated from field: string id = 1; - */ - id: string; - - /** - * Optional - * - * @generated from field: common.MetadataMutable metadata = 100; - */ - metadata?: MetadataMutable; - - /** - * @generated from field: common.MetadataUpdateEnum metadata_update_behavior = 101; - */ - metadataUpdateBehavior: MetadataUpdateEnum; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.namespaces.UpdateNamespaceRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): UpdateNamespaceRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): UpdateNamespaceRequest; - - static fromJsonString(jsonString: string, options?: Partial): UpdateNamespaceRequest; - - static equals(a: UpdateNamespaceRequest | PlainMessage | undefined, b: UpdateNamespaceRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.namespaces.UpdateNamespaceResponse - */ -export declare class UpdateNamespaceResponse extends Message { - /** - * @generated from field: policy.Namespace namespace = 1; - */ - namespace?: Namespace; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.namespaces.UpdateNamespaceResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): UpdateNamespaceResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): UpdateNamespaceResponse; - - static fromJsonString(jsonString: string, options?: Partial): UpdateNamespaceResponse; - - static equals(a: UpdateNamespaceResponse | PlainMessage | undefined, b: UpdateNamespaceResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.namespaces.DeactivateNamespaceRequest - */ -export declare class DeactivateNamespaceRequest extends Message { - /** - * @generated from field: string id = 1; - */ - id: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.namespaces.DeactivateNamespaceRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): DeactivateNamespaceRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): DeactivateNamespaceRequest; - - static fromJsonString(jsonString: string, options?: Partial): DeactivateNamespaceRequest; - - static equals(a: DeactivateNamespaceRequest | PlainMessage | undefined, b: DeactivateNamespaceRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.namespaces.DeactivateNamespaceResponse - */ -export declare class DeactivateNamespaceResponse extends Message { - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.namespaces.DeactivateNamespaceResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): DeactivateNamespaceResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): DeactivateNamespaceResponse; - - static fromJsonString(jsonString: string, options?: Partial): DeactivateNamespaceResponse; - - static equals(a: DeactivateNamespaceResponse | PlainMessage | undefined, b: DeactivateNamespaceResponse | PlainMessage | undefined): boolean; -} - diff --git a/lib/src/platform/policy/namespaces/namespaces_pb.js b/lib/src/platform/policy/namespaces/namespaces_pb.js deleted file mode 100644 index 1ef90ce5..00000000 --- a/lib/src/platform/policy/namespaces/namespaces_pb.js +++ /dev/null @@ -1,110 +0,0 @@ -// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" -// @generated from file policy/namespaces/namespaces.proto (package policy.namespaces, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { proto3 } from "@bufbuild/protobuf"; -import { Namespace } from "../objects_pb"; -import { ActiveStateEnum, MetadataMutable, MetadataUpdateEnum } from "../../common/common_pb"; - -/** - * @generated from message policy.namespaces.GetNamespaceRequest - */ -export const GetNamespaceRequest = /*@__PURE__*/ proto3.makeMessageType( - "policy.namespaces.GetNamespaceRequest", - () => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message policy.namespaces.GetNamespaceResponse - */ -export const GetNamespaceResponse = /*@__PURE__*/ proto3.makeMessageType( - "policy.namespaces.GetNamespaceResponse", - () => [ - { no: 1, name: "namespace", kind: "message", T: Namespace }, - ], -); - -/** - * @generated from message policy.namespaces.ListNamespacesRequest - */ -export const ListNamespacesRequest = /*@__PURE__*/ proto3.makeMessageType( - "policy.namespaces.ListNamespacesRequest", - () => [ - { no: 1, name: "state", kind: "enum", T: proto3.getEnumType(ActiveStateEnum) }, - ], -); - -/** - * @generated from message policy.namespaces.ListNamespacesResponse - */ -export const ListNamespacesResponse = /*@__PURE__*/ proto3.makeMessageType( - "policy.namespaces.ListNamespacesResponse", - () => [ - { no: 1, name: "namespaces", kind: "message", T: Namespace, repeated: true }, - ], -); - -/** - * @generated from message policy.namespaces.CreateNamespaceRequest - */ -export const CreateNamespaceRequest = /*@__PURE__*/ proto3.makeMessageType( - "policy.namespaces.CreateNamespaceRequest", - () => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 100, name: "metadata", kind: "message", T: MetadataMutable }, - ], -); - -/** - * @generated from message policy.namespaces.CreateNamespaceResponse - */ -export const CreateNamespaceResponse = /*@__PURE__*/ proto3.makeMessageType( - "policy.namespaces.CreateNamespaceResponse", - () => [ - { no: 1, name: "namespace", kind: "message", T: Namespace }, - ], -); - -/** - * @generated from message policy.namespaces.UpdateNamespaceRequest - */ -export const UpdateNamespaceRequest = /*@__PURE__*/ proto3.makeMessageType( - "policy.namespaces.UpdateNamespaceRequest", - () => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 100, name: "metadata", kind: "message", T: MetadataMutable }, - { no: 101, name: "metadata_update_behavior", kind: "enum", T: proto3.getEnumType(MetadataUpdateEnum) }, - ], -); - -/** - * @generated from message policy.namespaces.UpdateNamespaceResponse - */ -export const UpdateNamespaceResponse = /*@__PURE__*/ proto3.makeMessageType( - "policy.namespaces.UpdateNamespaceResponse", - () => [ - { no: 1, name: "namespace", kind: "message", T: Namespace }, - ], -); - -/** - * @generated from message policy.namespaces.DeactivateNamespaceRequest - */ -export const DeactivateNamespaceRequest = /*@__PURE__*/ proto3.makeMessageType( - "policy.namespaces.DeactivateNamespaceRequest", - () => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message policy.namespaces.DeactivateNamespaceResponse - */ -export const DeactivateNamespaceResponse = /*@__PURE__*/ proto3.makeMessageType( - "policy.namespaces.DeactivateNamespaceResponse", - [], -); - diff --git a/lib/src/platform/policy/namespaces/namespaces_pb.ts b/lib/src/platform/policy/namespaces/namespaces_pb.ts new file mode 100644 index 00000000..31ca44ee --- /dev/null +++ b/lib/src/platform/policy/namespaces/namespaces_pb.ts @@ -0,0 +1,528 @@ +// @generated by protoc-gen-es v2.2.5 with parameter "target=ts,import_extension=.js" +// @generated from file policy/namespaces/namespaces.proto (package policy.namespaces, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1"; +import { file_buf_validate_validate } from "../../buf/validate/validate_pb.js"; +import { file_google_api_annotations } from "../../google/api/annotations_pb.js"; +import type { ActiveStateEnum, MetadataMutable, MetadataUpdateEnum } from "../../common/common_pb.js"; +import { file_common_common } from "../../common/common_pb.js"; +import type { Namespace } from "../objects_pb.js"; +import { file_policy_objects } from "../objects_pb.js"; +import type { PageRequest, PageResponse } from "../selectors_pb.js"; +import { file_policy_selectors } from "../selectors_pb.js"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file policy/namespaces/namespaces.proto. + */ +export const file_policy_namespaces_namespaces: GenFile = /*@__PURE__*/ + fileDesc("CiJwb2xpY3kvbmFtZXNwYWNlcy9uYW1lc3BhY2VzLnByb3RvEhFwb2xpY3kubmFtZXNwYWNlcyJiChhOYW1lc3BhY2VLZXlBY2Nlc3NTZXJ2ZXISHgoMbmFtZXNwYWNlX2lkGAEgASgJQ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lc3BhY2USNC5wb2xpY3kubmFtZXNwYWNlcy5Bc3NpZ25QdWJsaWNLZXlUb05hbWVzcGFjZVJlcXVlc3QaNS5wb2xpY3kubmFtZXNwYWNlcy5Bc3NpZ25QdWJsaWNLZXlUb05hbWVzcGFjZVJlc3BvbnNlIgASkQEKHFJlbW92ZVB1YmxpY0tleUZyb21OYW1lc3BhY2USNi5wb2xpY3kubmFtZXNwYWNlcy5SZW1vdmVQdWJsaWNLZXlGcm9tTmFtZXNwYWNlUmVxdWVzdBo3LnBvbGljeS5uYW1lc3BhY2VzLlJlbW92ZVB1YmxpY0tleUZyb21OYW1lc3BhY2VSZXNwb25zZSIAYgZwcm90bzM", [file_buf_validate_validate, file_google_api_annotations, file_common_common, file_policy_objects, file_policy_selectors]); + +/** + * @generated from message policy.namespaces.NamespaceKeyAccessServer + */ +export type NamespaceKeyAccessServer = Message<"policy.namespaces.NamespaceKeyAccessServer"> & { + /** + * Required + * + * @generated from field: string namespace_id = 1; + */ + namespaceId: string; + + /** + * Required + * + * @generated from field: string key_access_server_id = 2; + */ + keyAccessServerId: string; +}; + +/** + * Describes the message policy.namespaces.NamespaceKeyAccessServer. + * Use `create(NamespaceKeyAccessServerSchema)` to create a new message. + */ +export const NamespaceKeyAccessServerSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_namespaces_namespaces, 0); + +/** + * @generated from message policy.namespaces.NamespaceKey + */ +export type NamespaceKey = Message<"policy.namespaces.NamespaceKey"> & { + /** + * Required + * + * @generated from field: string namespace_id = 1; + */ + namespaceId: string; + + /** + * Required (The id from the Asymmetric Key object) + * + * @generated from field: string key_id = 2; + */ + keyId: string; +}; + +/** + * Describes the message policy.namespaces.NamespaceKey. + * Use `create(NamespaceKeySchema)` to create a new message. + */ +export const NamespaceKeySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_namespaces_namespaces, 1); + +/** + * @generated from message policy.namespaces.GetNamespaceRequest + */ +export type GetNamespaceRequest = Message<"policy.namespaces.GetNamespaceRequest"> & { + /** + * Deprecated + * + * @generated from field: string id = 1 [deprecated = true]; + * @deprecated + */ + id: string; + + /** + * @generated from oneof policy.namespaces.GetNamespaceRequest.identifier + */ + identifier: { + /** + * option (buf.validate.oneof).required = true; // TODO: enable this when we remove the deprecated field + * + * @generated from field: string namespace_id = 2; + */ + value: string; + case: "namespaceId"; + } | { + /** + * @generated from field: string fqn = 3; + */ + value: string; + case: "fqn"; + } | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message policy.namespaces.GetNamespaceRequest. + * Use `create(GetNamespaceRequestSchema)` to create a new message. + */ +export const GetNamespaceRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_namespaces_namespaces, 2); + +/** + * @generated from message policy.namespaces.GetNamespaceResponse + */ +export type GetNamespaceResponse = Message<"policy.namespaces.GetNamespaceResponse"> & { + /** + * @generated from field: policy.Namespace namespace = 1; + */ + namespace?: Namespace; +}; + +/** + * Describes the message policy.namespaces.GetNamespaceResponse. + * Use `create(GetNamespaceResponseSchema)` to create a new message. + */ +export const GetNamespaceResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_namespaces_namespaces, 3); + +/** + * @generated from message policy.namespaces.ListNamespacesRequest + */ +export type ListNamespacesRequest = Message<"policy.namespaces.ListNamespacesRequest"> & { + /** + * Optional + * ACTIVE by default when not specified + * + * @generated from field: common.ActiveStateEnum state = 1; + */ + state: ActiveStateEnum; + + /** + * Optional + * + * @generated from field: policy.PageRequest pagination = 10; + */ + pagination?: PageRequest; +}; + +/** + * Describes the message policy.namespaces.ListNamespacesRequest. + * Use `create(ListNamespacesRequestSchema)` to create a new message. + */ +export const ListNamespacesRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_namespaces_namespaces, 4); + +/** + * @generated from message policy.namespaces.ListNamespacesResponse + */ +export type ListNamespacesResponse = Message<"policy.namespaces.ListNamespacesResponse"> & { + /** + * @generated from field: repeated policy.Namespace namespaces = 1; + */ + namespaces: Namespace[]; + + /** + * @generated from field: policy.PageResponse pagination = 10; + */ + pagination?: PageResponse; +}; + +/** + * Describes the message policy.namespaces.ListNamespacesResponse. + * Use `create(ListNamespacesResponseSchema)` to create a new message. + */ +export const ListNamespacesResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_namespaces_namespaces, 5); + +/** + * @generated from message policy.namespaces.CreateNamespaceRequest + */ +export type CreateNamespaceRequest = Message<"policy.namespaces.CreateNamespaceRequest"> & { + /** + * Required + * + * @generated from field: string name = 1; + */ + name: string; + + /** + * Optional + * + * @generated from field: common.MetadataMutable metadata = 100; + */ + metadata?: MetadataMutable; +}; + +/** + * Describes the message policy.namespaces.CreateNamespaceRequest. + * Use `create(CreateNamespaceRequestSchema)` to create a new message. + */ +export const CreateNamespaceRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_namespaces_namespaces, 6); + +/** + * @generated from message policy.namespaces.CreateNamespaceResponse + */ +export type CreateNamespaceResponse = Message<"policy.namespaces.CreateNamespaceResponse"> & { + /** + * @generated from field: policy.Namespace namespace = 1; + */ + namespace?: Namespace; +}; + +/** + * Describes the message policy.namespaces.CreateNamespaceResponse. + * Use `create(CreateNamespaceResponseSchema)` to create a new message. + */ +export const CreateNamespaceResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_namespaces_namespaces, 7); + +/** + * @generated from message policy.namespaces.UpdateNamespaceRequest + */ +export type UpdateNamespaceRequest = Message<"policy.namespaces.UpdateNamespaceRequest"> & { + /** + * Required + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Optional + * + * @generated from field: common.MetadataMutable metadata = 100; + */ + metadata?: MetadataMutable; + + /** + * @generated from field: common.MetadataUpdateEnum metadata_update_behavior = 101; + */ + metadataUpdateBehavior: MetadataUpdateEnum; +}; + +/** + * Describes the message policy.namespaces.UpdateNamespaceRequest. + * Use `create(UpdateNamespaceRequestSchema)` to create a new message. + */ +export const UpdateNamespaceRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_namespaces_namespaces, 8); + +/** + * @generated from message policy.namespaces.UpdateNamespaceResponse + */ +export type UpdateNamespaceResponse = Message<"policy.namespaces.UpdateNamespaceResponse"> & { + /** + * @generated from field: policy.Namespace namespace = 1; + */ + namespace?: Namespace; +}; + +/** + * Describes the message policy.namespaces.UpdateNamespaceResponse. + * Use `create(UpdateNamespaceResponseSchema)` to create a new message. + */ +export const UpdateNamespaceResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_namespaces_namespaces, 9); + +/** + * @generated from message policy.namespaces.DeactivateNamespaceRequest + */ +export type DeactivateNamespaceRequest = Message<"policy.namespaces.DeactivateNamespaceRequest"> & { + /** + * Required + * + * @generated from field: string id = 1; + */ + id: string; +}; + +/** + * Describes the message policy.namespaces.DeactivateNamespaceRequest. + * Use `create(DeactivateNamespaceRequestSchema)` to create a new message. + */ +export const DeactivateNamespaceRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_namespaces_namespaces, 10); + +/** + * @generated from message policy.namespaces.DeactivateNamespaceResponse + */ +export type DeactivateNamespaceResponse = Message<"policy.namespaces.DeactivateNamespaceResponse"> & { +}; + +/** + * Describes the message policy.namespaces.DeactivateNamespaceResponse. + * Use `create(DeactivateNamespaceResponseSchema)` to create a new message. + */ +export const DeactivateNamespaceResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_namespaces_namespaces, 11); + +/** + * @generated from message policy.namespaces.AssignKeyAccessServerToNamespaceRequest + */ +export type AssignKeyAccessServerToNamespaceRequest = Message<"policy.namespaces.AssignKeyAccessServerToNamespaceRequest"> & { + /** + * @generated from field: policy.namespaces.NamespaceKeyAccessServer namespace_key_access_server = 1; + */ + namespaceKeyAccessServer?: NamespaceKeyAccessServer; +}; + +/** + * Describes the message policy.namespaces.AssignKeyAccessServerToNamespaceRequest. + * Use `create(AssignKeyAccessServerToNamespaceRequestSchema)` to create a new message. + */ +export const AssignKeyAccessServerToNamespaceRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_namespaces_namespaces, 12); + +/** + * @generated from message policy.namespaces.AssignKeyAccessServerToNamespaceResponse + */ +export type AssignKeyAccessServerToNamespaceResponse = Message<"policy.namespaces.AssignKeyAccessServerToNamespaceResponse"> & { + /** + * @generated from field: policy.namespaces.NamespaceKeyAccessServer namespace_key_access_server = 1; + */ + namespaceKeyAccessServer?: NamespaceKeyAccessServer; +}; + +/** + * Describes the message policy.namespaces.AssignKeyAccessServerToNamespaceResponse. + * Use `create(AssignKeyAccessServerToNamespaceResponseSchema)` to create a new message. + */ +export const AssignKeyAccessServerToNamespaceResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_namespaces_namespaces, 13); + +/** + * @generated from message policy.namespaces.RemoveKeyAccessServerFromNamespaceRequest + */ +export type RemoveKeyAccessServerFromNamespaceRequest = Message<"policy.namespaces.RemoveKeyAccessServerFromNamespaceRequest"> & { + /** + * @generated from field: policy.namespaces.NamespaceKeyAccessServer namespace_key_access_server = 1; + */ + namespaceKeyAccessServer?: NamespaceKeyAccessServer; +}; + +/** + * Describes the message policy.namespaces.RemoveKeyAccessServerFromNamespaceRequest. + * Use `create(RemoveKeyAccessServerFromNamespaceRequestSchema)` to create a new message. + */ +export const RemoveKeyAccessServerFromNamespaceRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_namespaces_namespaces, 14); + +/** + * @generated from message policy.namespaces.RemoveKeyAccessServerFromNamespaceResponse + */ +export type RemoveKeyAccessServerFromNamespaceResponse = Message<"policy.namespaces.RemoveKeyAccessServerFromNamespaceResponse"> & { + /** + * @generated from field: policy.namespaces.NamespaceKeyAccessServer namespace_key_access_server = 1; + */ + namespaceKeyAccessServer?: NamespaceKeyAccessServer; +}; + +/** + * Describes the message policy.namespaces.RemoveKeyAccessServerFromNamespaceResponse. + * Use `create(RemoveKeyAccessServerFromNamespaceResponseSchema)` to create a new message. + */ +export const RemoveKeyAccessServerFromNamespaceResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_namespaces_namespaces, 15); + +/** + * + * Assign Key to Namespace + * + * @generated from message policy.namespaces.AssignPublicKeyToNamespaceRequest + */ +export type AssignPublicKeyToNamespaceRequest = Message<"policy.namespaces.AssignPublicKeyToNamespaceRequest"> & { + /** + * @generated from field: policy.namespaces.NamespaceKey namespace_key = 1; + */ + namespaceKey?: NamespaceKey; +}; + +/** + * Describes the message policy.namespaces.AssignPublicKeyToNamespaceRequest. + * Use `create(AssignPublicKeyToNamespaceRequestSchema)` to create a new message. + */ +export const AssignPublicKeyToNamespaceRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_namespaces_namespaces, 16); + +/** + * @generated from message policy.namespaces.AssignPublicKeyToNamespaceResponse + */ +export type AssignPublicKeyToNamespaceResponse = Message<"policy.namespaces.AssignPublicKeyToNamespaceResponse"> & { + /** + * @generated from field: policy.namespaces.NamespaceKey namespace_key = 1; + */ + namespaceKey?: NamespaceKey; +}; + +/** + * Describes the message policy.namespaces.AssignPublicKeyToNamespaceResponse. + * Use `create(AssignPublicKeyToNamespaceResponseSchema)` to create a new message. + */ +export const AssignPublicKeyToNamespaceResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_namespaces_namespaces, 17); + +/** + * @generated from message policy.namespaces.RemovePublicKeyFromNamespaceRequest + */ +export type RemovePublicKeyFromNamespaceRequest = Message<"policy.namespaces.RemovePublicKeyFromNamespaceRequest"> & { + /** + * @generated from field: policy.namespaces.NamespaceKey namespace_key = 1; + */ + namespaceKey?: NamespaceKey; +}; + +/** + * Describes the message policy.namespaces.RemovePublicKeyFromNamespaceRequest. + * Use `create(RemovePublicKeyFromNamespaceRequestSchema)` to create a new message. + */ +export const RemovePublicKeyFromNamespaceRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_namespaces_namespaces, 18); + +/** + * @generated from message policy.namespaces.RemovePublicKeyFromNamespaceResponse + */ +export type RemovePublicKeyFromNamespaceResponse = Message<"policy.namespaces.RemovePublicKeyFromNamespaceResponse"> & { + /** + * @generated from field: policy.namespaces.NamespaceKey namespace_key = 1; + */ + namespaceKey?: NamespaceKey; +}; + +/** + * Describes the message policy.namespaces.RemovePublicKeyFromNamespaceResponse. + * Use `create(RemovePublicKeyFromNamespaceResponseSchema)` to create a new message. + */ +export const RemovePublicKeyFromNamespaceResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_namespaces_namespaces, 19); + +/** + * @generated from service policy.namespaces.NamespaceService + */ +export const NamespaceService: GenService<{ + /** + * @generated from rpc policy.namespaces.NamespaceService.GetNamespace + */ + getNamespace: { + methodKind: "unary"; + input: typeof GetNamespaceRequestSchema; + output: typeof GetNamespaceResponseSchema; + }, + /** + * @generated from rpc policy.namespaces.NamespaceService.ListNamespaces + */ + listNamespaces: { + methodKind: "unary"; + input: typeof ListNamespacesRequestSchema; + output: typeof ListNamespacesResponseSchema; + }, + /** + * @generated from rpc policy.namespaces.NamespaceService.CreateNamespace + */ + createNamespace: { + methodKind: "unary"; + input: typeof CreateNamespaceRequestSchema; + output: typeof CreateNamespaceResponseSchema; + }, + /** + * @generated from rpc policy.namespaces.NamespaceService.UpdateNamespace + */ + updateNamespace: { + methodKind: "unary"; + input: typeof UpdateNamespaceRequestSchema; + output: typeof UpdateNamespaceResponseSchema; + }, + /** + * @generated from rpc policy.namespaces.NamespaceService.DeactivateNamespace + */ + deactivateNamespace: { + methodKind: "unary"; + input: typeof DeactivateNamespaceRequestSchema; + output: typeof DeactivateNamespaceResponseSchema; + }, + /** + * --------------------------------------* + * Namespace <> Key Access Server RPCs + * --------------------------------------- + * + * @generated from rpc policy.namespaces.NamespaceService.AssignKeyAccessServerToNamespace + */ + assignKeyAccessServerToNamespace: { + methodKind: "unary"; + input: typeof AssignKeyAccessServerToNamespaceRequestSchema; + output: typeof AssignKeyAccessServerToNamespaceResponseSchema; + }, + /** + * @generated from rpc policy.namespaces.NamespaceService.RemoveKeyAccessServerFromNamespace + */ + removeKeyAccessServerFromNamespace: { + methodKind: "unary"; + input: typeof RemoveKeyAccessServerFromNamespaceRequestSchema; + output: typeof RemoveKeyAccessServerFromNamespaceResponseSchema; + }, + /** + * --------------------------------------* + * Namespace <> Key RPCs + * --------------------------------------- + * + * @generated from rpc policy.namespaces.NamespaceService.AssignPublicKeyToNamespace + */ + assignPublicKeyToNamespace: { + methodKind: "unary"; + input: typeof AssignPublicKeyToNamespaceRequestSchema; + output: typeof AssignPublicKeyToNamespaceResponseSchema; + }, + /** + * @generated from rpc policy.namespaces.NamespaceService.RemovePublicKeyFromNamespace + */ + removePublicKeyFromNamespace: { + methodKind: "unary"; + input: typeof RemovePublicKeyFromNamespaceRequestSchema; + output: typeof RemovePublicKeyFromNamespaceResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_policy_namespaces_namespaces, 0); + diff --git a/lib/src/platform/policy/objects_pb.d.ts b/lib/src/platform/policy/objects_pb.d.ts deleted file mode 100644 index 36fc5d59..00000000 --- a/lib/src/platform/policy/objects_pb.d.ts +++ /dev/null @@ -1,725 +0,0 @@ -// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" -// @generated from file policy/objects.proto (package policy, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3 } from "@bufbuild/protobuf"; -import type { Metadata } from "../common/common_pb"; - -/** - * buflint ENUM_VALUE_PREFIX: to make sure that C++ scoping rules aren't violated when users add new enum values to an enum in a given package - * - * @generated from enum policy.AttributeRuleTypeEnum - */ -export declare enum AttributeRuleTypeEnum { - /** - * @generated from enum value: ATTRIBUTE_RULE_TYPE_ENUM_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, - - /** - * @generated from enum value: ATTRIBUTE_RULE_TYPE_ENUM_ALL_OF = 1; - */ - ALL_OF = 1, - - /** - * @generated from enum value: ATTRIBUTE_RULE_TYPE_ENUM_ANY_OF = 2; - */ - ANY_OF = 2, - - /** - * @generated from enum value: ATTRIBUTE_RULE_TYPE_ENUM_HIERARCHY = 3; - */ - HIERARCHY = 3, -} - -/** - * buflint ENUM_VALUE_PREFIX: to make sure that C++ scoping rules aren't violated when users add new enum values to an enum in a given package - * - * @generated from enum policy.SubjectMappingOperatorEnum - */ -export declare enum SubjectMappingOperatorEnum { - /** - * @generated from enum value: SUBJECT_MAPPING_OPERATOR_ENUM_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, - - /** - * @generated from enum value: SUBJECT_MAPPING_OPERATOR_ENUM_IN = 1; - */ - IN = 1, - - /** - * @generated from enum value: SUBJECT_MAPPING_OPERATOR_ENUM_NOT_IN = 2; - */ - NOT_IN = 2, -} - -/** - * buflint ENUM_VALUE_PREFIX: to make sure that C++ scoping rules aren't violated when users add new enum values to an enum in a given package - * - * @generated from enum policy.ConditionBooleanTypeEnum - */ -export declare enum ConditionBooleanTypeEnum { - /** - * @generated from enum value: CONDITION_BOOLEAN_TYPE_ENUM_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, - - /** - * @generated from enum value: CONDITION_BOOLEAN_TYPE_ENUM_AND = 1; - */ - AND = 1, - - /** - * @generated from enum value: CONDITION_BOOLEAN_TYPE_ENUM_OR = 2; - */ - OR = 2, -} - -/** - * @generated from message policy.Namespace - */ -export declare class Namespace extends Message { - /** - * generated uuid in database - * - * @generated from field: string id = 1; - */ - id: string; - - /** - * used to partition Attribute Definitions, support by namespace AuthN and enable federation - * - * @generated from field: string name = 2; - */ - name: string; - - /** - * @generated from field: string fqn = 3; - */ - fqn: string; - - /** - * active by default until explicitly deactivated - * - * @generated from field: google.protobuf.BoolValue active = 4; - */ - active?: boolean; - - /** - * @generated from field: common.Metadata metadata = 5; - */ - metadata?: Metadata; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.Namespace"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): Namespace; - - static fromJson(jsonValue: JsonValue, options?: Partial): Namespace; - - static fromJsonString(jsonString: string, options?: Partial): Namespace; - - static equals(a: Namespace | PlainMessage | undefined, b: Namespace | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.Attribute - */ -export declare class Attribute extends Message { - /** - * @generated from field: string id = 1; - */ - id: string; - - /** - * namespace of the attribute - * - * @generated from field: policy.Namespace namespace = 2; - */ - namespace?: Namespace; - - /** - * attribute name - * - * @generated from field: string name = 3; - */ - name: string; - - /** - * attribute rule enum - * - * @generated from field: policy.AttributeRuleTypeEnum rule = 4; - */ - rule: AttributeRuleTypeEnum; - - /** - * @generated from field: repeated policy.Value values = 5; - */ - values: Value[]; - - /** - * @generated from field: repeated policy.KeyAccessServer grants = 6; - */ - grants: KeyAccessServer[]; - - /** - * @generated from field: string fqn = 7; - */ - fqn: string; - - /** - * active by default until explicitly deactivated - * - * @generated from field: google.protobuf.BoolValue active = 8; - */ - active?: boolean; - - /** - * Common metadata - * - * @generated from field: common.Metadata metadata = 100; - */ - metadata?: Metadata; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.Attribute"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): Attribute; - - static fromJson(jsonValue: JsonValue, options?: Partial): Attribute; - - static fromJsonString(jsonString: string, options?: Partial): Attribute; - - static equals(a: Attribute | PlainMessage | undefined, b: Attribute | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.Value - */ -export declare class Value extends Message { - /** - * generated uuid in database - * - * @generated from field: string id = 1; - */ - id: string; - - /** - * @generated from field: policy.Attribute attribute = 2; - */ - attribute?: Attribute; - - /** - * @generated from field: string value = 3; - */ - value: string; - - /** - * list of attribute values that this value is related to (attribute group) - * - * @generated from field: repeated policy.Value members = 4; - */ - members: Value[]; - - /** - * list of key access servers - * - * @generated from field: repeated policy.KeyAccessServer grants = 5; - */ - grants: KeyAccessServer[]; - - /** - * @generated from field: string fqn = 6; - */ - fqn: string; - - /** - * active by default until explicitly deactivated - * - * @generated from field: google.protobuf.BoolValue active = 7; - */ - active?: boolean; - - /** - * subject mapping - * - * @generated from field: repeated policy.SubjectMapping subject_mappings = 8; - */ - subjectMappings: SubjectMapping[]; - - /** - * Common metadata - * - * @generated from field: common.Metadata metadata = 100; - */ - metadata?: Metadata; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.Value"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): Value; - - static fromJson(jsonValue: JsonValue, options?: Partial): Value; - - static fromJsonString(jsonString: string, options?: Partial): Value; - - static equals(a: Value | PlainMessage | undefined, b: Value | PlainMessage | undefined): boolean; -} - -/** - * An action an entity can take - * - * @generated from message policy.Action - */ -export declare class Action extends Message { - /** - * @generated from oneof policy.Action.value - */ - value: { - /** - * @generated from field: policy.Action.StandardAction standard = 1; - */ - value: Action_StandardAction; - case: "standard"; - } | { - /** - * @generated from field: string custom = 2; - */ - value: string; - case: "custom"; - } | { case: undefined; value?: undefined }; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.Action"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): Action; - - static fromJson(jsonValue: JsonValue, options?: Partial): Action; - - static fromJsonString(jsonString: string, options?: Partial): Action; - - static equals(a: Action | PlainMessage | undefined, b: Action | PlainMessage | undefined): boolean; -} - -/** - * Standard actions supported by the platform - * - * @generated from enum policy.Action.StandardAction - */ -export declare enum Action_StandardAction { - /** - * @generated from enum value: STANDARD_ACTION_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, - - /** - * @generated from enum value: STANDARD_ACTION_DECRYPT = 1; - */ - DECRYPT = 1, - - /** - * @generated from enum value: STANDARD_ACTION_TRANSMIT = 2; - */ - TRANSMIT = 2, -} - -/** - * - * Subject Mapping: A Policy assigning Subject Set(s) to a permitted attribute value + action(s) combination - * - * Example: Subjects in sets 1 and 2 are entitled attribute value http://wwww.example.org/attr/example/value/one - * with permitted actions TRANSMIT and DECRYPT - * { - * "id": "someid", - * "attribute_value": {example_one_attribute_value...}, - * "subject_condition_set": {"subject_sets":[{subject_set_1},{subject_set_2}]...}, - * "actions": [{"standard": "STANDARD_ACTION_DECRYPT"}", {"standard": "STANDARD_ACTION_TRANSMIT"}] - * } - * - * @generated from message policy.SubjectMapping - */ -export declare class SubjectMapping extends Message { - /** - * @generated from field: string id = 1; - */ - id: string; - - /** - * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute" - * - * @generated from field: policy.Value attribute_value = 2; - */ - attributeValue?: Value; - - /** - * the reusable SubjectConditionSet mapped to the given Attribute Value - * - * @generated from field: policy.SubjectConditionSet subject_condition_set = 3; - */ - subjectConditionSet?: SubjectConditionSet; - - /** - * The actions permitted by subjects in this mapping - * - * @generated from field: repeated policy.Action actions = 4; - */ - actions: Action[]; - - /** - * @generated from field: common.Metadata metadata = 100; - */ - metadata?: Metadata; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.SubjectMapping"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): SubjectMapping; - - static fromJson(jsonValue: JsonValue, options?: Partial): SubjectMapping; - - static fromJsonString(jsonString: string, options?: Partial): SubjectMapping; - - static equals(a: SubjectMapping | PlainMessage | undefined, b: SubjectMapping | PlainMessage | undefined): boolean; -} - -/** - * * - * A Condition defines a rule of - * - * Example: Subjects with a field selected by the flattened selector "'.division'" and a value of "Accounting" or "Marketing": - * { - * "subject_external_selector_value": "'.division'", - * "operator": "SUBJECT_MAPPING_OPERATOR_ENUM_IN", - * "subject_external_values" : ["Accounting", "Marketing"] - * } - * - * Example: Subjects that are not part of the Fantastic Four according to their alias field: - * { - * "subject_external_selector_value": "'.data[0].alias'", - * "operator": "SUBJECT_MAPPING_OPERATOR_ENUM_NOT_IN", - * "subject_external_values" : ["mister_fantastic", "the_thing", "human_torch", "invisible_woman"] - * } - * - * @generated from message policy.Condition - */ -export declare class Condition extends Message { - /** - * a selector for a field value on a flattened Entity Representation (such as from idP/LDAP) - * - * @generated from field: string subject_external_selector_value = 1; - */ - subjectExternalSelectorValue: string; - - /** - * the evaluation operator of relation - * - * @generated from field: policy.SubjectMappingOperatorEnum operator = 2; - */ - operator: SubjectMappingOperatorEnum; - - /** - * list of comparison values for the result of applying the subject_external_selector_value on a flattened Entity Representation (Subject), evaluated by the operator - * - * @generated from field: repeated string subject_external_values = 3; - */ - subjectExternalValues: string[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.Condition"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): Condition; - - static fromJson(jsonValue: JsonValue, options?: Partial): Condition; - - static fromJsonString(jsonString: string, options?: Partial): Condition; - - static equals(a: Condition | PlainMessage | undefined, b: Condition | PlainMessage | undefined): boolean; -} - -/** - * A collection of Conditions evaluated by the boolean_operator provided - * - * @generated from message policy.ConditionGroup - */ -export declare class ConditionGroup extends Message { - /** - * @generated from field: repeated policy.Condition conditions = 1; - */ - conditions: Condition[]; - - /** - * the boolean evaluation type across the conditions - * - * @generated from field: policy.ConditionBooleanTypeEnum boolean_operator = 2; - */ - booleanOperator: ConditionBooleanTypeEnum; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.ConditionGroup"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): ConditionGroup; - - static fromJson(jsonValue: JsonValue, options?: Partial): ConditionGroup; - - static fromJsonString(jsonString: string, options?: Partial): ConditionGroup; - - static equals(a: ConditionGroup | PlainMessage | undefined, b: ConditionGroup | PlainMessage | undefined): boolean; -} - -/** - * A collection of Condition Groups - * - * @generated from message policy.SubjectSet - */ -export declare class SubjectSet extends Message { - /** - * multiple Condition Groups are evaluated with AND logic - * - * @generated from field: repeated policy.ConditionGroup condition_groups = 1; - */ - conditionGroups: ConditionGroup[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.SubjectSet"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): SubjectSet; - - static fromJson(jsonValue: JsonValue, options?: Partial): SubjectSet; - - static fromJsonString(jsonString: string, options?: Partial): SubjectSet; - - static equals(a: SubjectSet | PlainMessage | undefined, b: SubjectSet | PlainMessage | undefined): boolean; -} - -/** - * - * A container for multiple Subject Sets, each containing Condition Groups, each containing Conditions. Multiple Subject Sets in a SubjectConditionSet - * are evaluated with AND logic. As each Subject Mapping has only one Attribute Value, the SubjectConditionSet is reusable across multiple - * Subject Mappings / Attribute Values and is an independent unit. - * - * @generated from message policy.SubjectConditionSet - */ -export declare class SubjectConditionSet extends Message { - /** - * @generated from field: string id = 1; - */ - id: string; - - /** - * @generated from field: repeated policy.SubjectSet subject_sets = 3; - */ - subjectSets: SubjectSet[]; - - /** - * @generated from field: common.Metadata metadata = 100; - */ - metadata?: Metadata; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.SubjectConditionSet"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): SubjectConditionSet; - - static fromJson(jsonValue: JsonValue, options?: Partial): SubjectConditionSet; - - static fromJsonString(jsonString: string, options?: Partial): SubjectConditionSet; - - static equals(a: SubjectConditionSet | PlainMessage | undefined, b: SubjectConditionSet | PlainMessage | undefined): boolean; -} - -/** - * - * - * A property of a Subject/Entity as its selector expression -> value result pair. This would mirror external user attributes retrieved - * from an authoritative source such as an IDP (Identity Provider) or User Store. Examples include such ADFS/LDAP, OKTA, etc. - * For now, a valid property must contain both a selector expression & a resulting value. - * - * The external_selector_value is a specifier to select a value from a flattened external representation of an Entity (such as from idP/LDAP), - * and the external_value is the value selected by the external_selector_value on that Entity Representation (Subject Context). These mirror the Condition. - * - * @generated from message policy.SubjectProperty - */ -export declare class SubjectProperty extends Message { - /** - * @generated from field: string external_selector_value = 1; - */ - externalSelectorValue: string; - - /** - * @generated from field: string external_value = 2; - */ - externalValue: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.SubjectProperty"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): SubjectProperty; - - static fromJson(jsonValue: JsonValue, options?: Partial): SubjectProperty; - - static fromJsonString(jsonString: string, options?: Partial): SubjectProperty; - - static equals(a: SubjectProperty | PlainMessage | undefined, b: SubjectProperty | PlainMessage | undefined): boolean; -} - -/** - * - * Resource Mappings (aka Access Control Resource Encodings aka ACRE) are structures supporting the mapping of Resources and Attribute Values - * - * @generated from message policy.ResourceMapping - */ -export declare class ResourceMapping extends Message { - /** - * @generated from field: string id = 1; - */ - id: string; - - /** - * @generated from field: common.Metadata metadata = 2; - */ - metadata?: Metadata; - - /** - * @generated from field: policy.Value attribute_value = 3; - */ - attributeValue?: Value; - - /** - * @generated from field: repeated string terms = 4; - */ - terms: string[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.ResourceMapping"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): ResourceMapping; - - static fromJson(jsonValue: JsonValue, options?: Partial): ResourceMapping; - - static fromJsonString(jsonString: string, options?: Partial): ResourceMapping; - - static equals(a: ResourceMapping | PlainMessage | undefined, b: ResourceMapping | PlainMessage | undefined): boolean; -} - -/** - * - * Key Access Server Registry - * - * @generated from message policy.KeyAccessServer - */ -export declare class KeyAccessServer extends Message { - /** - * @generated from field: string id = 1; - */ - id: string; - - /** - * Address of a KAS instance - * - * @generated from field: string uri = 2; - */ - uri: string; - - /** - * @generated from field: policy.PublicKey public_key = 3; - */ - publicKey?: PublicKey; - - /** - * Common metadata - * - * @generated from field: common.Metadata metadata = 100; - */ - metadata?: Metadata; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.KeyAccessServer"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): KeyAccessServer; - - static fromJson(jsonValue: JsonValue, options?: Partial): KeyAccessServer; - - static fromJsonString(jsonString: string, options?: Partial): KeyAccessServer; - - static equals(a: KeyAccessServer | PlainMessage | undefined, b: KeyAccessServer | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.PublicKey - */ -export declare class PublicKey extends Message { - /** - * @generated from oneof policy.PublicKey.public_key - */ - publicKey: { - /** - * kas public key url - optional since can also be retrieved via public key - * - * @generated from field: string remote = 1; - */ - value: string; - case: "remote"; - } | { - /** - * public key - optional since can also be retrieved via url - * - * @generated from field: string local = 2; - */ - value: string; - case: "local"; - } | { case: undefined; value?: undefined }; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.PublicKey"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): PublicKey; - - static fromJson(jsonValue: JsonValue, options?: Partial): PublicKey; - - static fromJsonString(jsonString: string, options?: Partial): PublicKey; - - static equals(a: PublicKey | PlainMessage | undefined, b: PublicKey | PlainMessage | undefined): boolean; -} - diff --git a/lib/src/platform/policy/objects_pb.js b/lib/src/platform/policy/objects_pb.js deleted file mode 100644 index 3484a11e..00000000 --- a/lib/src/platform/policy/objects_pb.js +++ /dev/null @@ -1,288 +0,0 @@ -// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" -// @generated from file policy/objects.proto (package policy, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { BoolValue, proto3 } from "@bufbuild/protobuf"; -import { Metadata } from "../common/common_pb"; - -/** - * buflint ENUM_VALUE_PREFIX: to make sure that C++ scoping rules aren't violated when users add new enum values to an enum in a given package - * - * @generated from enum policy.AttributeRuleTypeEnum - */ -export const AttributeRuleTypeEnum = /*@__PURE__*/ proto3.makeEnum( - "policy.AttributeRuleTypeEnum", - [ - {no: 0, name: "ATTRIBUTE_RULE_TYPE_ENUM_UNSPECIFIED", localName: "UNSPECIFIED"}, - {no: 1, name: "ATTRIBUTE_RULE_TYPE_ENUM_ALL_OF", localName: "ALL_OF"}, - {no: 2, name: "ATTRIBUTE_RULE_TYPE_ENUM_ANY_OF", localName: "ANY_OF"}, - {no: 3, name: "ATTRIBUTE_RULE_TYPE_ENUM_HIERARCHY", localName: "HIERARCHY"}, - ], -); - -/** - * buflint ENUM_VALUE_PREFIX: to make sure that C++ scoping rules aren't violated when users add new enum values to an enum in a given package - * - * @generated from enum policy.SubjectMappingOperatorEnum - */ -export const SubjectMappingOperatorEnum = /*@__PURE__*/ proto3.makeEnum( - "policy.SubjectMappingOperatorEnum", - [ - {no: 0, name: "SUBJECT_MAPPING_OPERATOR_ENUM_UNSPECIFIED", localName: "UNSPECIFIED"}, - {no: 1, name: "SUBJECT_MAPPING_OPERATOR_ENUM_IN", localName: "IN"}, - {no: 2, name: "SUBJECT_MAPPING_OPERATOR_ENUM_NOT_IN", localName: "NOT_IN"}, - ], -); - -/** - * buflint ENUM_VALUE_PREFIX: to make sure that C++ scoping rules aren't violated when users add new enum values to an enum in a given package - * - * @generated from enum policy.ConditionBooleanTypeEnum - */ -export const ConditionBooleanTypeEnum = /*@__PURE__*/ proto3.makeEnum( - "policy.ConditionBooleanTypeEnum", - [ - {no: 0, name: "CONDITION_BOOLEAN_TYPE_ENUM_UNSPECIFIED", localName: "UNSPECIFIED"}, - {no: 1, name: "CONDITION_BOOLEAN_TYPE_ENUM_AND", localName: "AND"}, - {no: 2, name: "CONDITION_BOOLEAN_TYPE_ENUM_OR", localName: "OR"}, - ], -); - -/** - * @generated from message policy.Namespace - */ -export const Namespace = /*@__PURE__*/ proto3.makeMessageType( - "policy.Namespace", - () => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "fqn", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "active", kind: "message", T: BoolValue }, - { no: 5, name: "metadata", kind: "message", T: Metadata }, - ], -); - -/** - * @generated from message policy.Attribute - */ -export const Attribute = /*@__PURE__*/ proto3.makeMessageType( - "policy.Attribute", - () => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "namespace", kind: "message", T: Namespace }, - { no: 3, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "rule", kind: "enum", T: proto3.getEnumType(AttributeRuleTypeEnum) }, - { no: 5, name: "values", kind: "message", T: Value, repeated: true }, - { no: 6, name: "grants", kind: "message", T: KeyAccessServer, repeated: true }, - { no: 7, name: "fqn", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 8, name: "active", kind: "message", T: BoolValue }, - { no: 100, name: "metadata", kind: "message", T: Metadata }, - ], -); - -/** - * @generated from message policy.Value - */ -export const Value = /*@__PURE__*/ proto3.makeMessageType( - "policy.Value", - () => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "attribute", kind: "message", T: Attribute }, - { no: 3, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "members", kind: "message", T: Value, repeated: true }, - { no: 5, name: "grants", kind: "message", T: KeyAccessServer, repeated: true }, - { no: 6, name: "fqn", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 7, name: "active", kind: "message", T: BoolValue }, - { no: 8, name: "subject_mappings", kind: "message", T: SubjectMapping, repeated: true }, - { no: 100, name: "metadata", kind: "message", T: Metadata }, - ], -); - -/** - * An action an entity can take - * - * @generated from message policy.Action - */ -export const Action = /*@__PURE__*/ proto3.makeMessageType( - "policy.Action", - () => [ - { no: 1, name: "standard", kind: "enum", T: proto3.getEnumType(Action_StandardAction), oneof: "value" }, - { no: 2, name: "custom", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "value" }, - ], -); - -/** - * Standard actions supported by the platform - * - * @generated from enum policy.Action.StandardAction - */ -export const Action_StandardAction = /*@__PURE__*/ proto3.makeEnum( - "policy.Action.StandardAction", - [ - {no: 0, name: "STANDARD_ACTION_UNSPECIFIED", localName: "UNSPECIFIED"}, - {no: 1, name: "STANDARD_ACTION_DECRYPT", localName: "DECRYPT"}, - {no: 2, name: "STANDARD_ACTION_TRANSMIT", localName: "TRANSMIT"}, - ], -); - -/** - * - * Subject Mapping: A Policy assigning Subject Set(s) to a permitted attribute value + action(s) combination - * - * Example: Subjects in sets 1 and 2 are entitled attribute value http://wwww.example.org/attr/example/value/one - * with permitted actions TRANSMIT and DECRYPT - * { - * "id": "someid", - * "attribute_value": {example_one_attribute_value...}, - * "subject_condition_set": {"subject_sets":[{subject_set_1},{subject_set_2}]...}, - * "actions": [{"standard": "STANDARD_ACTION_DECRYPT"}", {"standard": "STANDARD_ACTION_TRANSMIT"}] - * } - * - * @generated from message policy.SubjectMapping - */ -export const SubjectMapping = /*@__PURE__*/ proto3.makeMessageType( - "policy.SubjectMapping", - () => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "attribute_value", kind: "message", T: Value }, - { no: 3, name: "subject_condition_set", kind: "message", T: SubjectConditionSet }, - { no: 4, name: "actions", kind: "message", T: Action, repeated: true }, - { no: 100, name: "metadata", kind: "message", T: Metadata }, - ], -); - -/** - * * - * A Condition defines a rule of - * - * Example: Subjects with a field selected by the flattened selector "'.division'" and a value of "Accounting" or "Marketing": - * { - * "subject_external_selector_value": "'.division'", - * "operator": "SUBJECT_MAPPING_OPERATOR_ENUM_IN", - * "subject_external_values" : ["Accounting", "Marketing"] - * } - * - * Example: Subjects that are not part of the Fantastic Four according to their alias field: - * { - * "subject_external_selector_value": "'.data[0].alias'", - * "operator": "SUBJECT_MAPPING_OPERATOR_ENUM_NOT_IN", - * "subject_external_values" : ["mister_fantastic", "the_thing", "human_torch", "invisible_woman"] - * } - * - * @generated from message policy.Condition - */ -export const Condition = /*@__PURE__*/ proto3.makeMessageType( - "policy.Condition", - () => [ - { no: 1, name: "subject_external_selector_value", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "operator", kind: "enum", T: proto3.getEnumType(SubjectMappingOperatorEnum) }, - { no: 3, name: "subject_external_values", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - ], -); - -/** - * A collection of Conditions evaluated by the boolean_operator provided - * - * @generated from message policy.ConditionGroup - */ -export const ConditionGroup = /*@__PURE__*/ proto3.makeMessageType( - "policy.ConditionGroup", - () => [ - { no: 1, name: "conditions", kind: "message", T: Condition, repeated: true }, - { no: 2, name: "boolean_operator", kind: "enum", T: proto3.getEnumType(ConditionBooleanTypeEnum) }, - ], -); - -/** - * A collection of Condition Groups - * - * @generated from message policy.SubjectSet - */ -export const SubjectSet = /*@__PURE__*/ proto3.makeMessageType( - "policy.SubjectSet", - () => [ - { no: 1, name: "condition_groups", kind: "message", T: ConditionGroup, repeated: true }, - ], -); - -/** - * - * A container for multiple Subject Sets, each containing Condition Groups, each containing Conditions. Multiple Subject Sets in a SubjectConditionSet - * are evaluated with AND logic. As each Subject Mapping has only one Attribute Value, the SubjectConditionSet is reusable across multiple - * Subject Mappings / Attribute Values and is an independent unit. - * - * @generated from message policy.SubjectConditionSet - */ -export const SubjectConditionSet = /*@__PURE__*/ proto3.makeMessageType( - "policy.SubjectConditionSet", - () => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "subject_sets", kind: "message", T: SubjectSet, repeated: true }, - { no: 100, name: "metadata", kind: "message", T: Metadata }, - ], -); - -/** - * - * - * A property of a Subject/Entity as its selector expression -> value result pair. This would mirror external user attributes retrieved - * from an authoritative source such as an IDP (Identity Provider) or User Store. Examples include such ADFS/LDAP, OKTA, etc. - * For now, a valid property must contain both a selector expression & a resulting value. - * - * The external_selector_value is a specifier to select a value from a flattened external representation of an Entity (such as from idP/LDAP), - * and the external_value is the value selected by the external_selector_value on that Entity Representation (Subject Context). These mirror the Condition. - * - * @generated from message policy.SubjectProperty - */ -export const SubjectProperty = /*@__PURE__*/ proto3.makeMessageType( - "policy.SubjectProperty", - () => [ - { no: 1, name: "external_selector_value", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "external_value", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * - * Resource Mappings (aka Access Control Resource Encodings aka ACRE) are structures supporting the mapping of Resources and Attribute Values - * - * @generated from message policy.ResourceMapping - */ -export const ResourceMapping = /*@__PURE__*/ proto3.makeMessageType( - "policy.ResourceMapping", - () => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "metadata", kind: "message", T: Metadata }, - { no: 3, name: "attribute_value", kind: "message", T: Value }, - { no: 4, name: "terms", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - ], -); - -/** - * - * Key Access Server Registry - * - * @generated from message policy.KeyAccessServer - */ -export const KeyAccessServer = /*@__PURE__*/ proto3.makeMessageType( - "policy.KeyAccessServer", - () => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "uri", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "public_key", kind: "message", T: PublicKey }, - { no: 100, name: "metadata", kind: "message", T: Metadata }, - ], -); - -/** - * @generated from message policy.PublicKey - */ -export const PublicKey = /*@__PURE__*/ proto3.makeMessageType( - "policy.PublicKey", - () => [ - { no: 1, name: "remote", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "public_key" }, - { no: 2, name: "local", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "public_key" }, - ], -); - diff --git a/lib/src/platform/policy/objects_pb.ts b/lib/src/platform/policy/objects_pb.ts new file mode 100644 index 00000000..5c9587de --- /dev/null +++ b/lib/src/platform/policy/objects_pb.ts @@ -0,0 +1,1319 @@ +// @generated by protoc-gen-es v2.2.5 with parameter "target=ts,import_extension=.js" +// @generated from file policy/objects.proto (package policy, syntax proto3) +/* eslint-disable */ + +import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1"; +import { enumDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1"; +import { file_buf_validate_validate } from "../buf/validate/validate_pb.js"; +import type { Metadata } from "../common/common_pb.js"; +import { file_common_common } from "../common/common_pb.js"; +import { file_google_protobuf_wrappers } from "@bufbuild/protobuf/wkt"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file policy/objects.proto. + */ +export const file_policy_objects: GenFile = /*@__PURE__*/ + fileDesc("ChRwb2xpY3kvb2JqZWN0cy5wcm90bxIGcG9saWN5ImYKEUtleVByb3ZpZGVyQ29uZmlnEgoKAmlkGAEgASgJEgwKBG5hbWUYAiABKAkSEwoLY29uZmlnX2pzb24YAyABKAwSIgoIbWV0YWRhdGEYZCABKAsyEC5jb21tb24uTWV0YWRhdGEizQEKCU5hbWVzcGFjZRIKCgJpZBgBIAEoCRIMCgRuYW1lGAIgASgJEgsKA2ZxbhgDIAEoCRIqCgZhY3RpdmUYBCABKAsyGi5nb29nbGUucHJvdG9idWYuQm9vbFZhbHVlEiIKCG1ldGFkYXRhGAUgASgLMhAuY29tbW9uLk1ldGFkYXRhEicKBmdyYW50cxgGIAMoCzIXLnBvbGljeS5LZXlBY2Nlc3NTZXJ2ZXISIAoIa2FzX2tleXMYByADKAsyDi5wb2xpY3kuS2FzS2V5IswCCglBdHRyaWJ1dGUSCgoCaWQYASABKAkSJAoJbmFtZXNwYWNlGAIgASgLMhEucG9saWN5Lk5hbWVzcGFjZRIMCgRuYW1lGAMgASgJEjgKBHJ1bGUYBCABKA4yHS5wb2xpY3kuQXR0cmlidXRlUnVsZVR5cGVFbnVtQgu6SAjIAQGCAQIQARIdCgZ2YWx1ZXMYBSADKAsyDS5wb2xpY3kuVmFsdWUSJwoGZ3JhbnRzGAYgAygLMhcucG9saWN5LktleUFjY2Vzc1NlcnZlchILCgNmcW4YByABKAkSKgoGYWN0aXZlGAggASgLMhouZ29vZ2xlLnByb3RvYnVmLkJvb2xWYWx1ZRIgCghrYXNfa2V5cxgJIA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TEdfRU5VTV9FQ19TRUNQMzg0UjEQBhIoCiRLQVNfUFVCTElDX0tFWV9BTEdfRU5VTV9FQ19TRUNQNTIxUjEQByqbAQoJQWxnb3JpdGhtEhkKFUFMR09SSVRITV9VTlNQRUNJRklFRBAAEhYKEkFMR09SSVRITV9SU0FfMjA0OBABEhYKEkFMR09SSVRITV9SU0FfNDA5NhACEhUKEUFMR09SSVRITV9FQ19QMjU2EAMSFQoRQUxHT1JJVEhNX0VDX1AzODQQBBIVChFBTEdPUklUSE1fRUNfUDUyMRAFKnMKCUtleVN0YXR1cxIaChZLRVlfU1RBVFVTX1VOU1BFQ0lGSUVEEAASFQoRS0VZX1NUQVRVU19BQ1RJVkUQARIXChNLRVlfU1RBVFVTX0lOQUNUSVZFEAISGgoWS0VZX1NUQVRVU19DT01QUk9NSVNFRBADKkwKB0tleU1vZGUSGAoUS0VZX01PREVfVU5TUEVDSUZJRUQQABISCg5LRVlfTU9ERV9MT0NBTBABEhMKD0tFWV9NT0RFX1JFTU9URRACYgZwcm90bzM", [file_buf_validate_validate, file_common_common, file_google_protobuf_wrappers]); + +/** + * @generated from message policy.KeyProviderConfig + */ +export type KeyProviderConfig = Message<"policy.KeyProviderConfig"> & { + /** + * @generated from field: string id = 1; + */ + id: string; + + /** + * @generated from field: string name = 2; + */ + name: string; + + /** + * @generated from field: bytes config_json = 3; + */ + configJson: Uint8Array; + + /** + * Common metadata + * + * @generated from field: common.Metadata metadata = 100; + */ + metadata?: Metadata; +}; + +/** + * Describes the message policy.KeyProviderConfig. + * Use `create(KeyProviderConfigSchema)` to create a new message. + */ +export const KeyProviderConfigSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_objects, 0); + +/** + * @generated from message policy.Namespace + */ +export type Namespace = Message<"policy.Namespace"> & { + /** + * generated uuid in database + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * used to partition Attribute Definitions, support by namespace AuthN and + * enable federation + * + * @generated from field: string name = 2; + */ + name: string; + + /** + * @generated from field: string fqn = 3; + */ + fqn: string; + + /** + * active by default until explicitly deactivated + * + * @generated from field: google.protobuf.BoolValue active = 4; + */ + active?: boolean; + + /** + * @generated from field: common.Metadata metadata = 5; + */ + metadata?: Metadata; + + /** + * KAS grants for the namespace + * + * @generated from field: repeated policy.KeyAccessServer grants = 6; + */ + grants: KeyAccessServer[]; + + /** + * Keys for the namespace + * + * @generated from field: repeated policy.KasKey kas_keys = 7; + */ + kasKeys: KasKey[]; +}; + +/** + * Describes the message policy.Namespace. + * Use `create(NamespaceSchema)` to create a new message. + */ +export const NamespaceSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_objects, 1); + +/** + * @generated from message policy.Attribute + */ +export type Attribute = Message<"policy.Attribute"> & { + /** + * @generated from field: string id = 1; + */ + id: string; + + /** + * namespace of the attribute + * + * @generated from field: policy.Namespace namespace = 2; + */ + namespace?: Namespace; + + /** + * attribute name + * + * @generated from field: string name = 3; + */ + name: string; + + /** + * attribute rule enum + * + * @generated from field: policy.AttributeRuleTypeEnum rule = 4; + */ + rule: AttributeRuleTypeEnum; + + /** + * @generated from field: repeated policy.Value values = 5; + */ + values: Value[]; + + /** + * Deprecated + * + * @generated from field: repeated policy.KeyAccessServer grants = 6; + */ + grants: KeyAccessServer[]; + + /** + * @generated from field: string fqn = 7; + */ + fqn: string; + + /** + * active by default until explicitly deactivated + * + * @generated from field: google.protobuf.BoolValue active = 8; + */ + active?: boolean; + + /** + * Keys associated with the attribute + * + * @generated from field: repeated policy.KasKey kas_keys = 9; + */ + kasKeys: KasKey[]; + + /** + * Common metadata + * + * @generated from field: common.Metadata metadata = 100; + */ + metadata?: Metadata; +}; + +/** + * Describes the message policy.Attribute. + * Use `create(AttributeSchema)` to create a new message. + */ +export const AttributeSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_objects, 2); + +/** + * @generated from message policy.Value + */ +export type Value = Message<"policy.Value"> & { + /** + * generated uuid in database + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * @generated from field: policy.Attribute attribute = 2; + */ + attribute?: Attribute; + + /** + * @generated from field: string value = 3; + */ + value: string; + + /** + * Deprecated + * list of key access servers + * + * @generated from field: repeated policy.KeyAccessServer grants = 5; + */ + grants: KeyAccessServer[]; + + /** + * @generated from field: string fqn = 6; + */ + fqn: string; + + /** + * active by default until explicitly deactivated + * + * @generated from field: google.protobuf.BoolValue active = 7; + */ + active?: boolean; + + /** + * subject mapping + * + * @generated from field: repeated policy.SubjectMapping subject_mappings = 8; + */ + subjectMappings: SubjectMapping[]; + + /** + * @generated from field: repeated policy.KasKey kas_keys = 9; + */ + kasKeys: KasKey[]; + + /** + * Common metadata + * + * @generated from field: common.Metadata metadata = 100; + */ + metadata?: Metadata; +}; + +/** + * Describes the message policy.Value. + * Use `create(ValueSchema)` to create a new message. + */ +export const ValueSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_objects, 3); + +/** + * An action an entity can take + * + * @generated from message policy.Action + */ +export type Action = Message<"policy.Action"> & { + /** + * Generated uuid in database + * + * @generated from field: string id = 3; + */ + id: string; + + /** + * Deprecated + * + * @generated from oneof policy.Action.value + */ + value: { + /** + * Deprecated + * + * @generated from field: policy.Action.StandardAction standard = 1; + */ + value: Action_StandardAction; + case: "standard"; + } | { + /** + * Deprecated + * + * @generated from field: string custom = 2; + */ + value: string; + case: "custom"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from field: string name = 4; + */ + name: string; + + /** + * @generated from field: common.Metadata metadata = 100; + */ + metadata?: Metadata; +}; + +/** + * Describes the message policy.Action. + * Use `create(ActionSchema)` to create a new message. + */ +export const ActionSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_objects, 4); + +/** + * @generated from enum policy.Action.StandardAction + */ +export enum Action_StandardAction { + /** + * @generated from enum value: STANDARD_ACTION_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * Deprecated + * Migrate to 'read' action name + * + * @generated from enum value: STANDARD_ACTION_DECRYPT = 1; + */ + DECRYPT = 1, + + /** + * Deprecated + * Migrate to 'create' action name + * + * @generated from enum value: STANDARD_ACTION_TRANSMIT = 2; + */ + TRANSMIT = 2, +} + +/** + * Describes the enum policy.Action.StandardAction. + */ +export const Action_StandardActionSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_policy_objects, 4, 0); + +/** + * + * Subject Mapping: A Policy assigning Subject Set(s) to a permitted attribute + * value + action(s) combination + * + * @generated from message policy.SubjectMapping + */ +export type SubjectMapping = Message<"policy.SubjectMapping"> & { + /** + * @generated from field: string id = 1; + */ + id: string; + + /** + * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute" + * + * @generated from field: policy.Value attribute_value = 2; + */ + attributeValue?: Value; + + /** + * the reusable SubjectConditionSet mapped to the given Attribute Value + * + * @generated from field: policy.SubjectConditionSet subject_condition_set = 3; + */ + subjectConditionSet?: SubjectConditionSet; + + /** + * The actions permitted by subjects in this mapping + * + * @generated from field: repeated policy.Action actions = 4; + */ + actions: Action[]; + + /** + * @generated from field: common.Metadata metadata = 100; + */ + metadata?: Metadata; +}; + +/** + * Describes the message policy.SubjectMapping. + * Use `create(SubjectMappingSchema)` to create a new message. + */ +export const SubjectMappingSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_objects, 5); + +/** + * * + * A Condition defines a rule of + * + * @generated from message policy.Condition + */ +export type Condition = Message<"policy.Condition"> & { + /** + * a selector for a field value on a flattened Entity Representation (such as + * from idP/LDAP) + * + * @generated from field: string subject_external_selector_value = 1; + */ + subjectExternalSelectorValue: string; + + /** + * the evaluation operator of relation + * + * @generated from field: policy.SubjectMappingOperatorEnum operator = 2; + */ + operator: SubjectMappingOperatorEnum; + + /** + * list of comparison values for the result of applying the + * subject_external_selector_value on a flattened Entity Representation + * (Subject), evaluated by the operator + * + * @generated from field: repeated string subject_external_values = 3; + */ + subjectExternalValues: string[]; +}; + +/** + * Describes the message policy.Condition. + * Use `create(ConditionSchema)` to create a new message. + */ +export const ConditionSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_objects, 6); + +/** + * A collection of Conditions evaluated by the boolean_operator provided + * + * @generated from message policy.ConditionGroup + */ +export type ConditionGroup = Message<"policy.ConditionGroup"> & { + /** + * @generated from field: repeated policy.Condition conditions = 1; + */ + conditions: Condition[]; + + /** + * the boolean evaluation type across the conditions + * + * @generated from field: policy.ConditionBooleanTypeEnum boolean_operator = 2; + */ + booleanOperator: ConditionBooleanTypeEnum; +}; + +/** + * Describes the message policy.ConditionGroup. + * Use `create(ConditionGroupSchema)` to create a new message. + */ +export const ConditionGroupSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_objects, 7); + +/** + * A collection of Condition Groups + * + * @generated from message policy.SubjectSet + */ +export type SubjectSet = Message<"policy.SubjectSet"> & { + /** + * multiple Condition Groups are evaluated with AND logic + * + * @generated from field: repeated policy.ConditionGroup condition_groups = 1; + */ + conditionGroups: ConditionGroup[]; +}; + +/** + * Describes the message policy.SubjectSet. + * Use `create(SubjectSetSchema)` to create a new message. + */ +export const SubjectSetSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_objects, 8); + +/** + * + * A container for multiple Subject Sets, each containing Condition Groups, each + * containing Conditions. Multiple Subject Sets in a SubjectConditionSet are + * evaluated with AND logic. As each Subject Mapping has only one Attribute + * Value, the SubjectConditionSet is reusable across multiple Subject Mappings / + * Attribute Values and is an independent unit. + * + * @generated from message policy.SubjectConditionSet + */ +export type SubjectConditionSet = Message<"policy.SubjectConditionSet"> & { + /** + * @generated from field: string id = 1; + */ + id: string; + + /** + * @generated from field: repeated policy.SubjectSet subject_sets = 3; + */ + subjectSets: SubjectSet[]; + + /** + * @generated from field: common.Metadata metadata = 100; + */ + metadata?: Metadata; +}; + +/** + * Describes the message policy.SubjectConditionSet. + * Use `create(SubjectConditionSetSchema)` to create a new message. + */ +export const SubjectConditionSetSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_objects, 9); + +/** + * + * + * A property of a Subject/Entity as its selector expression -> value result + * pair. This would mirror external user attributes retrieved from an + * authoritative source such as an IDP (Identity Provider) or User Store. + * Examples include such ADFS/LDAP, OKTA, etc. For now, a valid property must + * contain both a selector expression & a resulting value. + * + * The external_selector_value is a specifier to select a value from a flattened + * external representation of an Entity (such as from idP/LDAP), and the + * external_value is the value selected by the external_selector_value on that + * Entity Representation (Subject Context). These mirror the Condition. + * + * @generated from message policy.SubjectProperty + */ +export type SubjectProperty = Message<"policy.SubjectProperty"> & { + /** + * @generated from field: string external_selector_value = 1; + */ + externalSelectorValue: string; + + /** + * @generated from field: string external_value = 2; + */ + externalValue: string; +}; + +/** + * Describes the message policy.SubjectProperty. + * Use `create(SubjectPropertySchema)` to create a new message. + */ +export const SubjectPropertySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_objects, 10); + +/** + * + * Resource Mapping Groups are namespaced collections of Resource Mappings + * associated under a common group name. + * + * @generated from message policy.ResourceMappingGroup + */ +export type ResourceMappingGroup = Message<"policy.ResourceMappingGroup"> & { + /** + * @generated from field: string id = 1; + */ + id: string; + + /** + * the namespace containing the group of resource mappings + * + * @generated from field: string namespace_id = 2; + */ + namespaceId: string; + + /** + * the common name for the group of resource mappings, which must be unique + * per namespace + * + * @generated from field: string name = 3; + */ + name: string; + + /** + * Common metadata + * + * @generated from field: common.Metadata metadata = 100; + */ + metadata?: Metadata; +}; + +/** + * Describes the message policy.ResourceMappingGroup. + * Use `create(ResourceMappingGroupSchema)` to create a new message. + */ +export const ResourceMappingGroupSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_objects, 11); + +/** + * + * Resource Mappings (aka Access Control Resource Encodings aka ACRE) are + * structures supporting the mapping of Resources and Attribute Values + * + * @generated from message policy.ResourceMapping + */ +export type ResourceMapping = Message<"policy.ResourceMapping"> & { + /** + * @generated from field: string id = 1; + */ + id: string; + + /** + * @generated from field: common.Metadata metadata = 2; + */ + metadata?: Metadata; + + /** + * @generated from field: policy.Value attribute_value = 3; + */ + attributeValue?: Value; + + /** + * @generated from field: repeated string terms = 4; + */ + terms: string[]; + + /** + * @generated from field: policy.ResourceMappingGroup group = 5; + */ + group?: ResourceMappingGroup; +}; + +/** + * Describes the message policy.ResourceMapping. + * Use `create(ResourceMappingSchema)` to create a new message. + */ +export const ResourceMappingSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_objects, 12); + +/** + * + * Key Access Server Registry + * + * @generated from message policy.KeyAccessServer + */ +export type KeyAccessServer = Message<"policy.KeyAccessServer"> & { + /** + * @generated from field: string id = 1; + */ + id: string; + + /** + * Address of a KAS instance + * + * @generated from field: string uri = 2; + */ + uri: string; + + /** + * Deprecated + * + * @generated from field: policy.PublicKey public_key = 3; + */ + publicKey?: PublicKey; + + /** + * The source of the KAS: (INTERNAL, EXTERNAL) + * + * @generated from field: policy.SourceType source_type = 4; + */ + sourceType: SourceType; + + /** + * Kas keys associated with this KAS + * + * @generated from field: repeated policy.KasKey kas_keys = 5; + */ + kasKeys: KasKey[]; + + /** + * Optional + * Unique name of the KAS instance + * + * @generated from field: string name = 20; + */ + name: string; + + /** + * Common metadata + * + * @generated from field: common.Metadata metadata = 100; + */ + metadata?: Metadata; +}; + +/** + * Describes the message policy.KeyAccessServer. + * Use `create(KeyAccessServerSchema)` to create a new message. + */ +export const KeyAccessServerSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_objects, 13); + +/** + * @generated from message policy.Key + */ +export type Key = Message<"policy.Key"> & { + /** + * the database record ID, not the key ID (`kid`) + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * @generated from field: google.protobuf.BoolValue is_active = 2; + */ + isActive?: boolean; + + /** + * @generated from field: google.protobuf.BoolValue was_mapped = 3; + */ + wasMapped?: boolean; + + /** + * @generated from field: policy.KasPublicKey public_key = 4; + */ + publicKey?: KasPublicKey; + + /** + * @generated from field: policy.KeyAccessServer kas = 5; + */ + kas?: KeyAccessServer; + + /** + * Common metadata + * + * @generated from field: common.Metadata metadata = 100; + */ + metadata?: Metadata; +}; + +/** + * Describes the message policy.Key. + * Use `create(KeySchema)` to create a new message. + */ +export const KeySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_objects, 14); + +/** + * Deprecated + * A KAS public key and some associated metadata for further identifcation + * + * @generated from message policy.KasPublicKey + */ +export type KasPublicKey = Message<"policy.KasPublicKey"> & { + /** + * x509 ASN.1 content in PEM envelope, usually + * + * @generated from field: string pem = 1; + */ + pem: string; + + /** + * A unique string identifier for this key + * + * @generated from field: string kid = 2; + */ + kid: string; + + /** + * A known algorithm type with any additional parameters encoded. + * To start, these may be `rsa:2048` for encrypting ZTDF files and + * `ec:secp256r1` for nanoTDF, but more formats may be added as needed. + * + * @generated from field: policy.KasPublicKeyAlgEnum alg = 3; + */ + alg: KasPublicKeyAlgEnum; +}; + +/** + * Describes the message policy.KasPublicKey. + * Use `create(KasPublicKeySchema)` to create a new message. + */ +export const KasPublicKeySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_objects, 15); + +/** + * Deprecated + * A list of known KAS public keys + * + * @generated from message policy.KasPublicKeySet + */ +export type KasPublicKeySet = Message<"policy.KasPublicKeySet"> & { + /** + * @generated from field: repeated policy.KasPublicKey keys = 1; + */ + keys: KasPublicKey[]; +}; + +/** + * Describes the message policy.KasPublicKeySet. + * Use `create(KasPublicKeySetSchema)` to create a new message. + */ +export const KasPublicKeySetSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_objects, 16); + +/** + * Deprecated + * + * @generated from message policy.PublicKey + */ +export type PublicKey = Message<"policy.PublicKey"> & { + /** + * @generated from oneof policy.PublicKey.public_key + */ + publicKey: { + /** + * kas public key url - optional since can also be retrieved via public key + * + * @generated from field: string remote = 1; + */ + value: string; + case: "remote"; + } | { + /** + * public key with additional information. Current preferred version + * + * @generated from field: policy.KasPublicKeySet cached = 3; + */ + value: KasPublicKeySet; + case: "cached"; + } | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message policy.PublicKey. + * Use `create(PublicKeySchema)` to create a new message. + */ +export const PublicKeySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_objects, 17); + +/** + * @generated from message policy.RegisteredResource + */ +export type RegisteredResource = Message<"policy.RegisteredResource"> & { + /** + * @generated from field: string id = 1; + */ + id: string; + + /** + * @generated from field: string name = 2; + */ + name: string; + + /** + * @generated from field: repeated policy.RegisteredResourceValue values = 3; + */ + values: RegisteredResourceValue[]; + + /** + * Common metadata + * + * @generated from field: common.Metadata metadata = 100; + */ + metadata?: Metadata; +}; + +/** + * Describes the message policy.RegisteredResource. + * Use `create(RegisteredResourceSchema)` to create a new message. + */ +export const RegisteredResourceSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_objects, 18); + +/** + * @generated from message policy.RegisteredResourceValue + */ +export type RegisteredResourceValue = Message<"policy.RegisteredResourceValue"> & { + /** + * @generated from field: string id = 1; + */ + id: string; + + /** + * @generated from field: string value = 2; + */ + value: string; + + /** + * @generated from field: policy.RegisteredResource resource = 3; + */ + resource?: RegisteredResource; + + /** + * Common metadata + * + * @generated from field: common.Metadata metadata = 100; + */ + metadata?: Metadata; +}; + +/** + * Describes the message policy.RegisteredResourceValue. + * Use `create(RegisteredResourceValueSchema)` to create a new message. + */ +export const RegisteredResourceValueSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_objects, 19); + +/** + * @generated from message policy.KasKey + */ +export type KasKey = Message<"policy.KasKey"> & { + /** + * @generated from field: string kas_id = 1; + */ + kasId: string; + + /** + * @generated from field: policy.AsymmetricKey key = 2; + */ + key?: AsymmetricKey; +}; + +/** + * Describes the message policy.KasKey. + * Use `create(KasKeySchema)` to create a new message. + */ +export const KasKeySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_objects, 20); + +/** + * @generated from message policy.AsymmetricKey + */ +export type AsymmetricKey = Message<"policy.AsymmetricKey"> & { + /** + * @generated from field: string id = 1; + */ + id: string; + + /** + * @generated from field: string key_id = 2; + */ + keyId: string; + + /** + * @generated from field: policy.Algorithm key_algorithm = 3; + */ + keyAlgorithm: Algorithm; + + /** + * @generated from field: policy.KeyStatus key_status = 4; + */ + keyStatus: KeyStatus; + + /** + * Specifies how the key is managed (local or remote) + * + * @generated from field: policy.KeyMode key_mode = 5; + */ + keyMode: KeyMode; + + /** + * Specific structure based on key provider implementation + * + * @generated from field: bytes public_key_ctx = 6; + */ + publicKeyCtx: Uint8Array; + + /** + * Specific structure based on key provider implementation + * + * @generated from field: bytes private_key_ctx = 7; + */ + privateKeyCtx: Uint8Array; + + /** + * Configuration for the key provider + * + * @generated from field: policy.KeyProviderConfig provider_config = 8; + */ + providerConfig?: KeyProviderConfig; + + /** + * Common metadata fields + * + * @generated from field: common.Metadata metadata = 100; + */ + metadata?: Metadata; +}; + +/** + * Describes the message policy.AsymmetricKey. + * Use `create(AsymmetricKeySchema)` to create a new message. + */ +export const AsymmetricKeySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_objects, 21); + +/** + * @generated from message policy.SymmetricKey + */ +export type SymmetricKey = Message<"policy.SymmetricKey"> & { + /** + * @generated from field: string id = 1; + */ + id: string; + + /** + * @generated from field: string key_id = 2; + */ + keyId: string; + + /** + * @generated from field: policy.KeyStatus key_status = 3; + */ + keyStatus: KeyStatus; + + /** + * Specifies how the key is managed (local or remote) + * + * @generated from field: policy.KeyMode key_mode = 4; + */ + keyMode: KeyMode; + + /** + * Specific structure based on key provider implementation + * + * @generated from field: bytes key_ctx = 5; + */ + keyCtx: Uint8Array; + + /** + * Configuration for the key provider + * + * @generated from field: policy.KeyProviderConfig provider_config = 6; + */ + providerConfig?: KeyProviderConfig; + + /** + * Common metadata fields + * + * @generated from field: common.Metadata metadata = 100; + */ + metadata?: Metadata; +}; + +/** + * Describes the message policy.SymmetricKey. + * Use `create(SymmetricKeySchema)` to create a new message. + */ +export const SymmetricKeySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_objects, 22); + +/** + * @generated from enum policy.AttributeRuleTypeEnum + */ +export enum AttributeRuleTypeEnum { + /** + * @generated from enum value: ATTRIBUTE_RULE_TYPE_ENUM_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: ATTRIBUTE_RULE_TYPE_ENUM_ALL_OF = 1; + */ + ALL_OF = 1, + + /** + * @generated from enum value: ATTRIBUTE_RULE_TYPE_ENUM_ANY_OF = 2; + */ + ANY_OF = 2, + + /** + * @generated from enum value: ATTRIBUTE_RULE_TYPE_ENUM_HIERARCHY = 3; + */ + HIERARCHY = 3, +} + +/** + * Describes the enum policy.AttributeRuleTypeEnum. + */ +export const AttributeRuleTypeEnumSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_policy_objects, 0); + +/** + * @generated from enum policy.SubjectMappingOperatorEnum + */ +export enum SubjectMappingOperatorEnum { + /** + * @generated from enum value: SUBJECT_MAPPING_OPERATOR_ENUM_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * operator that returns true if a value in a list matches the string + * + * @generated from enum value: SUBJECT_MAPPING_OPERATOR_ENUM_IN = 1; + */ + IN = 1, + + /** + * operator that returns true if a value is not in a list that is matched by + * string + * + * @generated from enum value: SUBJECT_MAPPING_OPERATOR_ENUM_NOT_IN = 2; + */ + NOT_IN = 2, + + /** + * operator that returns true if a value in a list contains the substring + * + * @generated from enum value: SUBJECT_MAPPING_OPERATOR_ENUM_IN_CONTAINS = 3; + */ + IN_CONTAINS = 3, +} + +/** + * Describes the enum policy.SubjectMappingOperatorEnum. + */ +export const SubjectMappingOperatorEnumSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_policy_objects, 1); + +/** + * @generated from enum policy.ConditionBooleanTypeEnum + */ +export enum ConditionBooleanTypeEnum { + /** + * @generated from enum value: CONDITION_BOOLEAN_TYPE_ENUM_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: CONDITION_BOOLEAN_TYPE_ENUM_AND = 1; + */ + AND = 1, + + /** + * @generated from enum value: CONDITION_BOOLEAN_TYPE_ENUM_OR = 2; + */ + OR = 2, +} + +/** + * Describes the enum policy.ConditionBooleanTypeEnum. + */ +export const ConditionBooleanTypeEnumSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_policy_objects, 2); + +/** + * Describes whether this kas is managed by the organization or if they imported + * the kas information from an external party. These two modes are necessary in order + * to encrypt a tdf dek with an external parties kas public key. + * + * @generated from enum policy.SourceType + */ +export enum SourceType { + /** + * @generated from enum value: SOURCE_TYPE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * The kas is managed by the organization. + * + * @generated from enum value: SOURCE_TYPE_INTERNAL = 1; + */ + INTERNAL = 1, + + /** + * The kas is managed by an external party. + * + * @generated from enum value: SOURCE_TYPE_EXTERNAL = 2; + */ + EXTERNAL = 2, +} + +/** + * Describes the enum policy.SourceType. + */ +export const SourceTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_policy_objects, 3); + +/** + * @generated from enum policy.KasPublicKeyAlgEnum + */ +export enum KasPublicKeyAlgEnum { + /** + * @generated from enum value: KAS_PUBLIC_KEY_ALG_ENUM_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: KAS_PUBLIC_KEY_ALG_ENUM_RSA_2048 = 1; + */ + RSA_2048 = 1, + + /** + * @generated from enum value: KAS_PUBLIC_KEY_ALG_ENUM_RSA_4096 = 2; + */ + RSA_4096 = 2, + + /** + * @generated from enum value: KAS_PUBLIC_KEY_ALG_ENUM_EC_SECP256R1 = 5; + */ + EC_SECP256R1 = 5, + + /** + * @generated from enum value: KAS_PUBLIC_KEY_ALG_ENUM_EC_SECP384R1 = 6; + */ + EC_SECP384R1 = 6, + + /** + * @generated from enum value: KAS_PUBLIC_KEY_ALG_ENUM_EC_SECP521R1 = 7; + */ + EC_SECP521R1 = 7, +} + +/** + * Describes the enum policy.KasPublicKeyAlgEnum. + */ +export const KasPublicKeyAlgEnumSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_policy_objects, 4); + +/** + * Supported key algorithms. + * + * @generated from enum policy.Algorithm + */ +export enum Algorithm { + /** + * @generated from enum value: ALGORITHM_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: ALGORITHM_RSA_2048 = 1; + */ + RSA_2048 = 1, + + /** + * @generated from enum value: ALGORITHM_RSA_4096 = 2; + */ + RSA_4096 = 2, + + /** + * @generated from enum value: ALGORITHM_EC_P256 = 3; + */ + EC_P256 = 3, + + /** + * @generated from enum value: ALGORITHM_EC_P384 = 4; + */ + EC_P384 = 4, + + /** + * @generated from enum value: ALGORITHM_EC_P521 = 5; + */ + EC_P521 = 5, +} + +/** + * Describes the enum policy.Algorithm. + */ +export const AlgorithmSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_policy_objects, 5); + +/** + * The status of the key + * + * @generated from enum policy.KeyStatus + */ +export enum KeyStatus { + /** + * @generated from enum value: KEY_STATUS_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: KEY_STATUS_ACTIVE = 1; + */ + ACTIVE = 1, + + /** + * @generated from enum value: KEY_STATUS_INACTIVE = 2; + */ + INACTIVE = 2, + + /** + * @generated from enum value: KEY_STATUS_COMPROMISED = 3; + */ + COMPROMISED = 3, +} + +/** + * Describes the enum policy.KeyStatus. + */ +export const KeyStatusSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_policy_objects, 6); + +/** + * Describe how the kas private key is managed. + * If the key mode is LOCAL, then the kas private key is stored in the database. + * This could be encrypted or unencrypted. + * Remote means that the kas private key is stored in a remote key system like KMS or HSM + * and all operations are done by the remote key system. + * + * @generated from enum policy.KeyMode + */ +export enum KeyMode { + /** + * @generated from enum value: KEY_MODE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: KEY_MODE_LOCAL = 1; + */ + LOCAL = 1, + + /** + * @generated from enum value: KEY_MODE_REMOTE = 2; + */ + REMOTE = 2, +} + +/** + * Describes the enum policy.KeyMode. + */ +export const KeyModeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_policy_objects, 7); + diff --git a/lib/src/platform/policy/registeredresources/registered_resources_pb.ts b/lib/src/platform/policy/registeredresources/registered_resources_pb.ts new file mode 100644 index 00000000..9c2df823 --- /dev/null +++ b/lib/src/platform/policy/registeredresources/registered_resources_pb.ts @@ -0,0 +1,623 @@ +// @generated by protoc-gen-es v2.2.5 with parameter "target=ts,import_extension=.js" +// @generated from file policy/registeredresources/registered_resources.proto (package policy.registeredresources, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1"; +import { file_buf_validate_validate } from "../../buf/validate/validate_pb.js"; +import type { MetadataMutable, MetadataUpdateEnum } from "../../common/common_pb.js"; +import { file_common_common } from "../../common/common_pb.js"; +import type { RegisteredResource, RegisteredResourceValue } from "../objects_pb.js"; +import { file_policy_objects } from "../objects_pb.js"; +import type { PageRequest, PageResponse } from "../selectors_pb.js"; +import { file_policy_selectors } from "../selectors_pb.js"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file policy/registeredresources/registered_resources.proto. + */ +export const file_policy_registeredresources_registered_resources: GenFile = /*@__PURE__*/ + fileDesc("CjVwb2xpY3kvcmVnaXN0ZXJlZHJlc291cmNlcy9yZWdpc3RlcmVkX3Jlc291cmNlcy5wcm90bxIacG9saWN5LnJlZ2lzdGVyZWRyZXNvdXJjZXMiwQMKH0NyZWF0ZVJlZ2lzdGVyZWRSZXNvdXJjZVJlcXVlc3QSogIKBG5hbWUYASABKAlCkwK6SI8CugGDAgoOcnJfbmFtZV9mb3JtYXQSswFSZWdpc3RlcmVkIFJlc291cmNlIE5hbWUgbXVzdCBiZSBhbiBhbHBoYW51bWVyaWMgc3RyaW5nLCBhbGxvd2luZyBoeXBoZW5zIGFuZCB1bmRlcnNjb3JlcyBidXQgbm90IGFzIHRoZSBmaXJzdCBvciBsYXN0IGNoYXJhY3Rlci4gVGhlIHN0b3JlZCBuYW1lIHdpbGwgYmUgbm9ybWFs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3VyY2VzLkRlbGV0ZVJlZ2lzdGVyZWRSZXNvdXJjZVZhbHVlUmVxdWVzdBpBLnBvbGljeS5yZWdpc3RlcmVkcmVzb3VyY2VzLkRlbGV0ZVJlZ2lzdGVyZWRSZXNvdXJjZVZhbHVlUmVzcG9uc2UiAGIGcHJvdG8z", [file_buf_validate_validate, file_common_common, file_policy_objects, file_policy_selectors]); + +/** + * @generated from message policy.registeredresources.CreateRegisteredResourceRequest + */ +export type CreateRegisteredResourceRequest = Message<"policy.registeredresources.CreateRegisteredResourceRequest"> & { + /** + * Required + * + * @generated from field: string name = 1; + */ + name: string; + + /** + * Optional + * Registered Resource Values (when provided) must be alphanumeric strings, allowing hyphens and underscores but not as the first or last character. + * The stored value will be normalized to lower case. + * + * @generated from field: repeated string values = 2; + */ + values: string[]; + + /** + * Optional + * Common metadata + * + * @generated from field: common.MetadataMutable metadata = 100; + */ + metadata?: MetadataMutable; +}; + +/** + * Describes the message policy.registeredresources.CreateRegisteredResourceRequest. + * Use `create(CreateRegisteredResourceRequestSchema)` to create a new message. + */ +export const CreateRegisteredResourceRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_registeredresources_registered_resources, 0); + +/** + * @generated from message policy.registeredresources.CreateRegisteredResourceResponse + */ +export type CreateRegisteredResourceResponse = Message<"policy.registeredresources.CreateRegisteredResourceResponse"> & { + /** + * @generated from field: policy.RegisteredResource resource = 1; + */ + resource?: RegisteredResource; +}; + +/** + * Describes the message policy.registeredresources.CreateRegisteredResourceResponse. + * Use `create(CreateRegisteredResourceResponseSchema)` to create a new message. + */ +export const CreateRegisteredResourceResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_registeredresources_registered_resources, 1); + +/** + * @generated from message policy.registeredresources.GetRegisteredResourceRequest + */ +export type GetRegisteredResourceRequest = Message<"policy.registeredresources.GetRegisteredResourceRequest"> & { + /** + * @generated from oneof policy.registeredresources.GetRegisteredResourceRequest.identifier + */ + identifier: { + /** + * @generated from field: string id = 1; + */ + value: string; + case: "id"; + } | { + /** + * @generated from field: string name = 2; + */ + value: string; + case: "name"; + } | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message policy.registeredresources.GetRegisteredResourceRequest. + * Use `create(GetRegisteredResourceRequestSchema)` to create a new message. + */ +export const GetRegisteredResourceRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_registeredresources_registered_resources, 2); + +/** + * @generated from message policy.registeredresources.GetRegisteredResourceResponse + */ +export type GetRegisteredResourceResponse = Message<"policy.registeredresources.GetRegisteredResourceResponse"> & { + /** + * @generated from field: policy.RegisteredResource resource = 1; + */ + resource?: RegisteredResource; +}; + +/** + * Describes the message policy.registeredresources.GetRegisteredResourceResponse. + * Use `create(GetRegisteredResourceResponseSchema)` to create a new message. + */ +export const GetRegisteredResourceResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_registeredresources_registered_resources, 3); + +/** + * @generated from message policy.registeredresources.ListRegisteredResourcesRequest + */ +export type ListRegisteredResourcesRequest = Message<"policy.registeredresources.ListRegisteredResourcesRequest"> & { + /** + * Optional + * + * @generated from field: policy.PageRequest pagination = 10; + */ + pagination?: PageRequest; +}; + +/** + * Describes the message policy.registeredresources.ListRegisteredResourcesRequest. + * Use `create(ListRegisteredResourcesRequestSchema)` to create a new message. + */ +export const ListRegisteredResourcesRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_registeredresources_registered_resources, 4); + +/** + * @generated from message policy.registeredresources.ListRegisteredResourcesResponse + */ +export type ListRegisteredResourcesResponse = Message<"policy.registeredresources.ListRegisteredResourcesResponse"> & { + /** + * @generated from field: repeated policy.RegisteredResource resources = 1; + */ + resources: RegisteredResource[]; + + /** + * @generated from field: policy.PageResponse pagination = 10; + */ + pagination?: PageResponse; +}; + +/** + * Describes the message policy.registeredresources.ListRegisteredResourcesResponse. + * Use `create(ListRegisteredResourcesResponseSchema)` to create a new message. + */ +export const ListRegisteredResourcesResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_registeredresources_registered_resources, 5); + +/** + * @generated from message policy.registeredresources.UpdateRegisteredResourceRequest + */ +export type UpdateRegisteredResourceRequest = Message<"policy.registeredresources.UpdateRegisteredResourceRequest"> & { + /** + * Required + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Optional + * + * @generated from field: string name = 2; + */ + name: string; + + /** + * Optional + * Common metadata + * + * @generated from field: common.MetadataMutable metadata = 100; + */ + metadata?: MetadataMutable; + + /** + * @generated from field: common.MetadataUpdateEnum metadata_update_behavior = 101; + */ + metadataUpdateBehavior: MetadataUpdateEnum; +}; + +/** + * Describes the message policy.registeredresources.UpdateRegisteredResourceRequest. + * Use `create(UpdateRegisteredResourceRequestSchema)` to create a new message. + */ +export const UpdateRegisteredResourceRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_registeredresources_registered_resources, 6); + +/** + * @generated from message policy.registeredresources.UpdateRegisteredResourceResponse + */ +export type UpdateRegisteredResourceResponse = Message<"policy.registeredresources.UpdateRegisteredResourceResponse"> & { + /** + * @generated from field: policy.RegisteredResource resource = 1; + */ + resource?: RegisteredResource; +}; + +/** + * Describes the message policy.registeredresources.UpdateRegisteredResourceResponse. + * Use `create(UpdateRegisteredResourceResponseSchema)` to create a new message. + */ +export const UpdateRegisteredResourceResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_registeredresources_registered_resources, 7); + +/** + * @generated from message policy.registeredresources.DeleteRegisteredResourceRequest + */ +export type DeleteRegisteredResourceRequest = Message<"policy.registeredresources.DeleteRegisteredResourceRequest"> & { + /** + * Required + * + * @generated from field: string id = 1; + */ + id: string; +}; + +/** + * Describes the message policy.registeredresources.DeleteRegisteredResourceRequest. + * Use `create(DeleteRegisteredResourceRequestSchema)` to create a new message. + */ +export const DeleteRegisteredResourceRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_registeredresources_registered_resources, 8); + +/** + * @generated from message policy.registeredresources.DeleteRegisteredResourceResponse + */ +export type DeleteRegisteredResourceResponse = Message<"policy.registeredresources.DeleteRegisteredResourceResponse"> & { + /** + * @generated from field: policy.RegisteredResource resource = 1; + */ + resource?: RegisteredResource; +}; + +/** + * Describes the message policy.registeredresources.DeleteRegisteredResourceResponse. + * Use `create(DeleteRegisteredResourceResponseSchema)` to create a new message. + */ +export const DeleteRegisteredResourceResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_registeredresources_registered_resources, 9); + +/** + * @generated from message policy.registeredresources.CreateRegisteredResourceValueRequest + */ +export type CreateRegisteredResourceValueRequest = Message<"policy.registeredresources.CreateRegisteredResourceValueRequest"> & { + /** + * Required + * + * @generated from field: string resource_id = 1; + */ + resourceId: string; + + /** + * Required + * + * @generated from field: string value = 2; + */ + value: string; + + /** + * Optional + * Common metadata + * + * @generated from field: common.MetadataMutable metadata = 100; + */ + metadata?: MetadataMutable; +}; + +/** + * Describes the message policy.registeredresources.CreateRegisteredResourceValueRequest. + * Use `create(CreateRegisteredResourceValueRequestSchema)` to create a new message. + */ +export const CreateRegisteredResourceValueRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_registeredresources_registered_resources, 10); + +/** + * @generated from message policy.registeredresources.CreateRegisteredResourceValueResponse + */ +export type CreateRegisteredResourceValueResponse = Message<"policy.registeredresources.CreateRegisteredResourceValueResponse"> & { + /** + * @generated from field: policy.RegisteredResourceValue value = 1; + */ + value?: RegisteredResourceValue; +}; + +/** + * Describes the message policy.registeredresources.CreateRegisteredResourceValueResponse. + * Use `create(CreateRegisteredResourceValueResponseSchema)` to create a new message. + */ +export const CreateRegisteredResourceValueResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_registeredresources_registered_resources, 11); + +/** + * @generated from message policy.registeredresources.GetRegisteredResourceValueRequest + */ +export type GetRegisteredResourceValueRequest = Message<"policy.registeredresources.GetRegisteredResourceValueRequest"> & { + /** + * @generated from oneof policy.registeredresources.GetRegisteredResourceValueRequest.identifier + */ + identifier: { + /** + * @generated from field: string id = 1; + */ + value: string; + case: "id"; + } | { + /** + * @generated from field: string fqn = 2; + */ + value: string; + case: "fqn"; + } | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message policy.registeredresources.GetRegisteredResourceValueRequest. + * Use `create(GetRegisteredResourceValueRequestSchema)` to create a new message. + */ +export const GetRegisteredResourceValueRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_registeredresources_registered_resources, 12); + +/** + * @generated from message policy.registeredresources.GetRegisteredResourceValueResponse + */ +export type GetRegisteredResourceValueResponse = Message<"policy.registeredresources.GetRegisteredResourceValueResponse"> & { + /** + * @generated from field: policy.RegisteredResourceValue value = 1; + */ + value?: RegisteredResourceValue; +}; + +/** + * Describes the message policy.registeredresources.GetRegisteredResourceValueResponse. + * Use `create(GetRegisteredResourceValueResponseSchema)` to create a new message. + */ +export const GetRegisteredResourceValueResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_registeredresources_registered_resources, 13); + +/** + * @generated from message policy.registeredresources.GetRegisteredResourceValuesByFQNsRequest + */ +export type GetRegisteredResourceValuesByFQNsRequest = Message<"policy.registeredresources.GetRegisteredResourceValuesByFQNsRequest"> & { + /** + * Required + * + * @generated from field: repeated string fqns = 1; + */ + fqns: string[]; +}; + +/** + * Describes the message policy.registeredresources.GetRegisteredResourceValuesByFQNsRequest. + * Use `create(GetRegisteredResourceValuesByFQNsRequestSchema)` to create a new message. + */ +export const GetRegisteredResourceValuesByFQNsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_registeredresources_registered_resources, 14); + +/** + * @generated from message policy.registeredresources.GetRegisteredResourceValuesByFQNsResponse + */ +export type GetRegisteredResourceValuesByFQNsResponse = Message<"policy.registeredresources.GetRegisteredResourceValuesByFQNsResponse"> & { + /** + * @generated from field: map fqn_value_map = 1; + */ + fqnValueMap: { [key: string]: RegisteredResourceValue }; +}; + +/** + * Describes the message policy.registeredresources.GetRegisteredResourceValuesByFQNsResponse. + * Use `create(GetRegisteredResourceValuesByFQNsResponseSchema)` to create a new message. + */ +export const GetRegisteredResourceValuesByFQNsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_registeredresources_registered_resources, 15); + +/** + * @generated from message policy.registeredresources.ListRegisteredResourceValuesRequest + */ +export type ListRegisteredResourceValuesRequest = Message<"policy.registeredresources.ListRegisteredResourceValuesRequest"> & { + /** + * Optional + * + * @generated from field: string resource_id = 1; + */ + resourceId: string; + + /** + * Optional + * + * @generated from field: policy.PageRequest pagination = 10; + */ + pagination?: PageRequest; +}; + +/** + * Describes the message policy.registeredresources.ListRegisteredResourceValuesRequest. + * Use `create(ListRegisteredResourceValuesRequestSchema)` to create a new message. + */ +export const ListRegisteredResourceValuesRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_registeredresources_registered_resources, 16); + +/** + * @generated from message policy.registeredresources.ListRegisteredResourceValuesResponse + */ +export type ListRegisteredResourceValuesResponse = Message<"policy.registeredresources.ListRegisteredResourceValuesResponse"> & { + /** + * @generated from field: repeated policy.RegisteredResourceValue values = 1; + */ + values: RegisteredResourceValue[]; + + /** + * @generated from field: policy.PageResponse pagination = 10; + */ + pagination?: PageResponse; +}; + +/** + * Describes the message policy.registeredresources.ListRegisteredResourceValuesResponse. + * Use `create(ListRegisteredResourceValuesResponseSchema)` to create a new message. + */ +export const ListRegisteredResourceValuesResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_registeredresources_registered_resources, 17); + +/** + * @generated from message policy.registeredresources.UpdateRegisteredResourceValueRequest + */ +export type UpdateRegisteredResourceValueRequest = Message<"policy.registeredresources.UpdateRegisteredResourceValueRequest"> & { + /** + * Required + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Optional + * + * @generated from field: string value = 2; + */ + value: string; + + /** + * Optional + * Common metadata + * + * @generated from field: common.MetadataMutable metadata = 100; + */ + metadata?: MetadataMutable; + + /** + * @generated from field: common.MetadataUpdateEnum metadata_update_behavior = 101; + */ + metadataUpdateBehavior: MetadataUpdateEnum; +}; + +/** + * Describes the message policy.registeredresources.UpdateRegisteredResourceValueRequest. + * Use `create(UpdateRegisteredResourceValueRequestSchema)` to create a new message. + */ +export const UpdateRegisteredResourceValueRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_registeredresources_registered_resources, 18); + +/** + * @generated from message policy.registeredresources.UpdateRegisteredResourceValueResponse + */ +export type UpdateRegisteredResourceValueResponse = Message<"policy.registeredresources.UpdateRegisteredResourceValueResponse"> & { + /** + * @generated from field: policy.RegisteredResourceValue value = 1; + */ + value?: RegisteredResourceValue; +}; + +/** + * Describes the message policy.registeredresources.UpdateRegisteredResourceValueResponse. + * Use `create(UpdateRegisteredResourceValueResponseSchema)` to create a new message. + */ +export const UpdateRegisteredResourceValueResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_registeredresources_registered_resources, 19); + +/** + * @generated from message policy.registeredresources.DeleteRegisteredResourceValueRequest + */ +export type DeleteRegisteredResourceValueRequest = Message<"policy.registeredresources.DeleteRegisteredResourceValueRequest"> & { + /** + * Required + * + * @generated from field: string id = 1; + */ + id: string; +}; + +/** + * Describes the message policy.registeredresources.DeleteRegisteredResourceValueRequest. + * Use `create(DeleteRegisteredResourceValueRequestSchema)` to create a new message. + */ +export const DeleteRegisteredResourceValueRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_registeredresources_registered_resources, 20); + +/** + * @generated from message policy.registeredresources.DeleteRegisteredResourceValueResponse + */ +export type DeleteRegisteredResourceValueResponse = Message<"policy.registeredresources.DeleteRegisteredResourceValueResponse"> & { + /** + * @generated from field: policy.RegisteredResourceValue value = 1; + */ + value?: RegisteredResourceValue; +}; + +/** + * Describes the message policy.registeredresources.DeleteRegisteredResourceValueResponse. + * Use `create(DeleteRegisteredResourceValueResponseSchema)` to create a new message. + */ +export const DeleteRegisteredResourceValueResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_registeredresources_registered_resources, 21); + +/** + * Registered Resources + * + * @generated from service policy.registeredresources.RegisteredResourcesService + */ +export const RegisteredResourcesService: GenService<{ + /** + * @generated from rpc policy.registeredresources.RegisteredResourcesService.CreateRegisteredResource + */ + createRegisteredResource: { + methodKind: "unary"; + input: typeof CreateRegisteredResourceRequestSchema; + output: typeof CreateRegisteredResourceResponseSchema; + }, + /** + * @generated from rpc policy.registeredresources.RegisteredResourcesService.GetRegisteredResource + */ + getRegisteredResource: { + methodKind: "unary"; + input: typeof GetRegisteredResourceRequestSchema; + output: typeof GetRegisteredResourceResponseSchema; + }, + /** + * @generated from rpc policy.registeredresources.RegisteredResourcesService.ListRegisteredResources + */ + listRegisteredResources: { + methodKind: "unary"; + input: typeof ListRegisteredResourcesRequestSchema; + output: typeof ListRegisteredResourcesResponseSchema; + }, + /** + * @generated from rpc policy.registeredresources.RegisteredResourcesService.UpdateRegisteredResource + */ + updateRegisteredResource: { + methodKind: "unary"; + input: typeof UpdateRegisteredResourceRequestSchema; + output: typeof UpdateRegisteredResourceResponseSchema; + }, + /** + * @generated from rpc policy.registeredresources.RegisteredResourcesService.DeleteRegisteredResource + */ + deleteRegisteredResource: { + methodKind: "unary"; + input: typeof DeleteRegisteredResourceRequestSchema; + output: typeof DeleteRegisteredResourceResponseSchema; + }, + /** + * @generated from rpc policy.registeredresources.RegisteredResourcesService.CreateRegisteredResourceValue + */ + createRegisteredResourceValue: { + methodKind: "unary"; + input: typeof CreateRegisteredResourceValueRequestSchema; + output: typeof CreateRegisteredResourceValueResponseSchema; + }, + /** + * @generated from rpc policy.registeredresources.RegisteredResourcesService.GetRegisteredResourceValue + */ + getRegisteredResourceValue: { + methodKind: "unary"; + input: typeof GetRegisteredResourceValueRequestSchema; + output: typeof GetRegisteredResourceValueResponseSchema; + }, + /** + * @generated from rpc policy.registeredresources.RegisteredResourcesService.GetRegisteredResourceValuesByFQNs + */ + getRegisteredResourceValuesByFQNs: { + methodKind: "unary"; + input: typeof GetRegisteredResourceValuesByFQNsRequestSchema; + output: typeof GetRegisteredResourceValuesByFQNsResponseSchema; + }, + /** + * @generated from rpc policy.registeredresources.RegisteredResourcesService.ListRegisteredResourceValues + */ + listRegisteredResourceValues: { + methodKind: "unary"; + input: typeof ListRegisteredResourceValuesRequestSchema; + output: typeof ListRegisteredResourceValuesResponseSchema; + }, + /** + * @generated from rpc policy.registeredresources.RegisteredResourcesService.UpdateRegisteredResourceValue + */ + updateRegisteredResourceValue: { + methodKind: "unary"; + input: typeof UpdateRegisteredResourceValueRequestSchema; + output: typeof UpdateRegisteredResourceValueResponseSchema; + }, + /** + * @generated from rpc policy.registeredresources.RegisteredResourcesService.DeleteRegisteredResourceValue + */ + deleteRegisteredResourceValue: { + methodKind: "unary"; + input: typeof DeleteRegisteredResourceValueRequestSchema; + output: typeof DeleteRegisteredResourceValueResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_policy_registeredresources_registered_resources, 0); + diff --git a/lib/src/platform/policy/resourcemapping/resource_mapping_connect.d.ts b/lib/src/platform/policy/resourcemapping/resource_mapping_connect.d.ts deleted file mode 100644 index 38377b11..00000000 --- a/lib/src/platform/policy/resourcemapping/resource_mapping_connect.d.ts +++ /dev/null @@ -1,259 +0,0 @@ -// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=js+dts,import_extension=none" -// @generated from file policy/resourcemapping/resource_mapping.proto (package policy.resourcemapping, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { CreateResourceMappingRequest, CreateResourceMappingResponse, DeleteResourceMappingRequest, DeleteResourceMappingResponse, GetResourceMappingRequest, GetResourceMappingResponse, ListResourceMappingsRequest, ListResourceMappingsResponse, UpdateResourceMappingRequest, UpdateResourceMappingResponse } from "./resource_mapping_pb"; -import { MethodKind } from "@bufbuild/protobuf"; - -/** - * - * Resource Mappings - * - * @generated from service policy.resourcemapping.ResourceMappingService - */ -export declare const ResourceMappingService: { - readonly typeName: "policy.resourcemapping.ResourceMappingService", - readonly methods: { - /** - * - * Request Example: - * - empty body - * - * Response Example: - * { - * "resource_mappings": [ - * { - * "terms": [ - * "TOPSECRET", - * "TS", - * ], - * "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e", - * "metadata": { - * "labels": [], - * "created_at": { - * "seconds": "1706103276", - * "nanos": 510718000 - * }, - * "updated_at": { - * "seconds": "1706107873", - * "nanos": 399786000 - * }, - * "description": "" - * }, - * "attribute_value": { - * "members": [], - * "id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", - * "metadata": null, - * "attribute_id": "", - * "value": "value1" - * } - * } - * ] - * } - * - * @generated from rpc policy.resourcemapping.ResourceMappingService.ListResourceMappings - */ - readonly listResourceMappings: { - readonly name: "ListResourceMappings", - readonly I: typeof ListResourceMappingsRequest, - readonly O: typeof ListResourceMappingsResponse, - readonly kind: MethodKind.Unary, - }, - /** - * - * Request Example: - * { - * "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e" - * } - * - * Response Example: - * { - * "resource_mapping": { - * "terms": [ - * "TOPSECRET", - * "TS", - * ], - * "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e", - * "metadata": { - * "labels": [], - * "created_at": { - * "seconds": "1706103276", - * "nanos": 510718000 - * }, - * "updated_at": { - * "seconds": "1706107873", - * "nanos": 399786000 - * }, - * "description": "" - * }, - * "attribute_value": { - * "members": [], - * "id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", - * "metadata": null, - * "attribute_id": "", - * "value": "value1" - * } - * } - * } - * - * @generated from rpc policy.resourcemapping.ResourceMappingService.GetResourceMapping - */ - readonly getResourceMapping: { - readonly name: "GetResourceMapping", - readonly I: typeof GetResourceMappingRequest, - readonly O: typeof GetResourceMappingResponse, - readonly kind: MethodKind.Unary, - }, - /** - * - * Request Example: - * { - * "resource_mapping": { - * "attribute_value_id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", - * "terms": [ - * "TOPSECRET", - * "TS", - * ] - * } - * } - * - * Response Example: - * { - * "resource_mapping": { - * "terms": [ - * "TOPSECRET", - * "TS", - * ], - * "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e", - * "metadata": { - * "labels": [], - * "created_at": { - * "seconds": "1706103276", - * "nanos": 510718000 - * }, - * "updated_at": { - * "seconds": "1706107873", - * "nanos": 399786000 - * }, - * "description": "" - * }, - * "attribute_value": { - * "members": [], - * "id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", - * "metadata": null, - * "attribute_id": "", - * "value": "value1" - * } - * } - * } - * - * @generated from rpc policy.resourcemapping.ResourceMappingService.CreateResourceMapping - */ - readonly createResourceMapping: { - readonly name: "CreateResourceMapping", - readonly I: typeof CreateResourceMappingRequest, - readonly O: typeof CreateResourceMappingResponse, - readonly kind: MethodKind.Unary, - }, - /** - * - * Request Example: - * { - * "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e", - * "resource_mapping": { - * "attribute_value_id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", - * "terms": [ - * "TOPSECRET", - * "TS", - * "NEWTERM" - * ] - * } - * } - * - * Response Example: - * { - * "resource_mapping": { - * "terms": [ - * "TOPSECRET", - * "TS", - * ], - * "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e", - * "metadata": { - * "labels": [], - * "created_at": { - * "seconds": "1706103276", - * "nanos": 510718000 - * }, - * "updated_at": { - * "seconds": "1706107873", - * "nanos": 399786000 - * }, - * "description": "" - * }, - * "attribute_value": { - * "members": [], - * "id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", - * "metadata": null, - * "attribute_id": "", - * "value": "value1" - * } - * } - * } - * - * @generated from rpc policy.resourcemapping.ResourceMappingService.UpdateResourceMapping - */ - readonly updateResourceMapping: { - readonly name: "UpdateResourceMapping", - readonly I: typeof UpdateResourceMappingRequest, - readonly O: typeof UpdateResourceMappingResponse, - readonly kind: MethodKind.Unary, - }, - /** - * - * Request Example: - * { - * "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e" - * } - * - * Response Example: - * { - * "resource_mapping": { - * "terms": [ - * "TOPSECRET", - * "TS", - * ], - * "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e", - * "metadata": { - * "labels": [], - * "created_at": { - * "seconds": "1706103276", - * "nanos": 510718000 - * }, - * "updated_at": { - * "seconds": "1706107873", - * "nanos": 399786000 - * }, - * "description": "" - * }, - * "attribute_value": { - * "members": [], - * "id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", - * "metadata": null, - * "attribute_id": "", - * "value": "value1" - * } - * } - * } - * - * @generated from rpc policy.resourcemapping.ResourceMappingService.DeleteResourceMapping - */ - readonly deleteResourceMapping: { - readonly name: "DeleteResourceMapping", - readonly I: typeof DeleteResourceMappingRequest, - readonly O: typeof DeleteResourceMappingResponse, - readonly kind: MethodKind.Unary, - }, - } -}; - diff --git a/lib/src/platform/policy/resourcemapping/resource_mapping_connect.js b/lib/src/platform/policy/resourcemapping/resource_mapping_connect.js deleted file mode 100644 index c9c66071..00000000 --- a/lib/src/platform/policy/resourcemapping/resource_mapping_connect.js +++ /dev/null @@ -1,259 +0,0 @@ -// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=js+dts,import_extension=none" -// @generated from file policy/resourcemapping/resource_mapping.proto (package policy.resourcemapping, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { CreateResourceMappingRequest, CreateResourceMappingResponse, DeleteResourceMappingRequest, DeleteResourceMappingResponse, GetResourceMappingRequest, GetResourceMappingResponse, ListResourceMappingsRequest, ListResourceMappingsResponse, UpdateResourceMappingRequest, UpdateResourceMappingResponse } from "./resource_mapping_pb"; -import { MethodKind } from "@bufbuild/protobuf"; - -/** - * - * Resource Mappings - * - * @generated from service policy.resourcemapping.ResourceMappingService - */ -export const ResourceMappingService = { - typeName: "policy.resourcemapping.ResourceMappingService", - methods: { - /** - * - * Request Example: - * - empty body - * - * Response Example: - * { - * "resource_mappings": [ - * { - * "terms": [ - * "TOPSECRET", - * "TS", - * ], - * "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e", - * "metadata": { - * "labels": [], - * "created_at": { - * "seconds": "1706103276", - * "nanos": 510718000 - * }, - * "updated_at": { - * "seconds": "1706107873", - * "nanos": 399786000 - * }, - * "description": "" - * }, - * "attribute_value": { - * "members": [], - * "id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", - * "metadata": null, - * "attribute_id": "", - * "value": "value1" - * } - * } - * ] - * } - * - * @generated from rpc policy.resourcemapping.ResourceMappingService.ListResourceMappings - */ - listResourceMappings: { - name: "ListResourceMappings", - I: ListResourceMappingsRequest, - O: ListResourceMappingsResponse, - kind: MethodKind.Unary, - }, - /** - * - * Request Example: - * { - * "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e" - * } - * - * Response Example: - * { - * "resource_mapping": { - * "terms": [ - * "TOPSECRET", - * "TS", - * ], - * "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e", - * "metadata": { - * "labels": [], - * "created_at": { - * "seconds": "1706103276", - * "nanos": 510718000 - * }, - * "updated_at": { - * "seconds": "1706107873", - * "nanos": 399786000 - * }, - * "description": "" - * }, - * "attribute_value": { - * "members": [], - * "id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", - * "metadata": null, - * "attribute_id": "", - * "value": "value1" - * } - * } - * } - * - * @generated from rpc policy.resourcemapping.ResourceMappingService.GetResourceMapping - */ - getResourceMapping: { - name: "GetResourceMapping", - I: GetResourceMappingRequest, - O: GetResourceMappingResponse, - kind: MethodKind.Unary, - }, - /** - * - * Request Example: - * { - * "resource_mapping": { - * "attribute_value_id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", - * "terms": [ - * "TOPSECRET", - * "TS", - * ] - * } - * } - * - * Response Example: - * { - * "resource_mapping": { - * "terms": [ - * "TOPSECRET", - * "TS", - * ], - * "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e", - * "metadata": { - * "labels": [], - * "created_at": { - * "seconds": "1706103276", - * "nanos": 510718000 - * }, - * "updated_at": { - * "seconds": "1706107873", - * "nanos": 399786000 - * }, - * "description": "" - * }, - * "attribute_value": { - * "members": [], - * "id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", - * "metadata": null, - * "attribute_id": "", - * "value": "value1" - * } - * } - * } - * - * @generated from rpc policy.resourcemapping.ResourceMappingService.CreateResourceMapping - */ - createResourceMapping: { - name: "CreateResourceMapping", - I: CreateResourceMappingRequest, - O: CreateResourceMappingResponse, - kind: MethodKind.Unary, - }, - /** - * - * Request Example: - * { - * "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e", - * "resource_mapping": { - * "attribute_value_id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", - * "terms": [ - * "TOPSECRET", - * "TS", - * "NEWTERM" - * ] - * } - * } - * - * Response Example: - * { - * "resource_mapping": { - * "terms": [ - * "TOPSECRET", - * "TS", - * ], - * "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e", - * "metadata": { - * "labels": [], - * "created_at": { - * "seconds": "1706103276", - * "nanos": 510718000 - * }, - * "updated_at": { - * "seconds": "1706107873", - * "nanos": 399786000 - * }, - * "description": "" - * }, - * "attribute_value": { - * "members": [], - * "id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", - * "metadata": null, - * "attribute_id": "", - * "value": "value1" - * } - * } - * } - * - * @generated from rpc policy.resourcemapping.ResourceMappingService.UpdateResourceMapping - */ - updateResourceMapping: { - name: "UpdateResourceMapping", - I: UpdateResourceMappingRequest, - O: UpdateResourceMappingResponse, - kind: MethodKind.Unary, - }, - /** - * - * Request Example: - * { - * "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e" - * } - * - * Response Example: - * { - * "resource_mapping": { - * "terms": [ - * "TOPSECRET", - * "TS", - * ], - * "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e", - * "metadata": { - * "labels": [], - * "created_at": { - * "seconds": "1706103276", - * "nanos": 510718000 - * }, - * "updated_at": { - * "seconds": "1706107873", - * "nanos": 399786000 - * }, - * "description": "" - * }, - * "attribute_value": { - * "members": [], - * "id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", - * "metadata": null, - * "attribute_id": "", - * "value": "value1" - * } - * } - * } - * - * @generated from rpc policy.resourcemapping.ResourceMappingService.DeleteResourceMapping - */ - deleteResourceMapping: { - name: "DeleteResourceMapping", - I: DeleteResourceMappingRequest, - O: DeleteResourceMappingResponse, - kind: MethodKind.Unary, - }, - } -}; - diff --git a/lib/src/platform/policy/resourcemapping/resource_mapping_pb.d.ts b/lib/src/platform/policy/resourcemapping/resource_mapping_pb.d.ts deleted file mode 100644 index 5b5f5fbb..00000000 --- a/lib/src/platform/policy/resourcemapping/resource_mapping_pb.d.ts +++ /dev/null @@ -1,314 +0,0 @@ -// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" -// @generated from file policy/resourcemapping/resource_mapping.proto (package policy.resourcemapping, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3 } from "@bufbuild/protobuf"; -import type { ResourceMapping } from "../objects_pb"; -import type { MetadataMutable, MetadataUpdateEnum } from "../../common/common_pb"; - -/** - * @generated from message policy.resourcemapping.ListResourceMappingsRequest - */ -export declare class ListResourceMappingsRequest extends Message { - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.resourcemapping.ListResourceMappingsRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): ListResourceMappingsRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): ListResourceMappingsRequest; - - static fromJsonString(jsonString: string, options?: Partial): ListResourceMappingsRequest; - - static equals(a: ListResourceMappingsRequest | PlainMessage | undefined, b: ListResourceMappingsRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.resourcemapping.ListResourceMappingsResponse - */ -export declare class ListResourceMappingsResponse extends Message { - /** - * @generated from field: repeated policy.ResourceMapping resource_mappings = 1; - */ - resourceMappings: ResourceMapping[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.resourcemapping.ListResourceMappingsResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): ListResourceMappingsResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): ListResourceMappingsResponse; - - static fromJsonString(jsonString: string, options?: Partial): ListResourceMappingsResponse; - - static equals(a: ListResourceMappingsResponse | PlainMessage | undefined, b: ListResourceMappingsResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.resourcemapping.GetResourceMappingRequest - */ -export declare class GetResourceMappingRequest extends Message { - /** - * @generated from field: string id = 1; - */ - id: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.resourcemapping.GetResourceMappingRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetResourceMappingRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetResourceMappingRequest; - - static fromJsonString(jsonString: string, options?: Partial): GetResourceMappingRequest; - - static equals(a: GetResourceMappingRequest | PlainMessage | undefined, b: GetResourceMappingRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.resourcemapping.GetResourceMappingResponse - */ -export declare class GetResourceMappingResponse extends Message { - /** - * @generated from field: policy.ResourceMapping resource_mapping = 1; - */ - resourceMapping?: ResourceMapping; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.resourcemapping.GetResourceMappingResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetResourceMappingResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetResourceMappingResponse; - - static fromJsonString(jsonString: string, options?: Partial): GetResourceMappingResponse; - - static equals(a: GetResourceMappingResponse | PlainMessage | undefined, b: GetResourceMappingResponse | PlainMessage | undefined): boolean; -} - -/** - * - * ### Request - * - * grpcurl -plaintext -d @ localhost:8080 policy.resourcemapping.ResourceMappingService/CreateResourceMapping < { - /** - * Required - * - * @generated from field: string attribute_value_id = 1; - */ - attributeValueId: string; - - /** - * @generated from field: repeated string terms = 2; - */ - terms: string[]; - - /** - * Optional - * - * @generated from field: common.MetadataMutable metadata = 100; - */ - metadata?: MetadataMutable; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.resourcemapping.CreateResourceMappingRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateResourceMappingRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateResourceMappingRequest; - - static fromJsonString(jsonString: string, options?: Partial): CreateResourceMappingRequest; - - static equals(a: CreateResourceMappingRequest | PlainMessage | undefined, b: CreateResourceMappingRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.resourcemapping.CreateResourceMappingResponse - */ -export declare class CreateResourceMappingResponse extends Message { - /** - * @generated from field: policy.ResourceMapping resource_mapping = 1; - */ - resourceMapping?: ResourceMapping; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.resourcemapping.CreateResourceMappingResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateResourceMappingResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateResourceMappingResponse; - - static fromJsonString(jsonString: string, options?: Partial): CreateResourceMappingResponse; - - static equals(a: CreateResourceMappingResponse | PlainMessage | undefined, b: CreateResourceMappingResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.resourcemapping.UpdateResourceMappingRequest - */ -export declare class UpdateResourceMappingRequest extends Message { - /** - * Required - * - * @generated from field: string id = 1; - */ - id: string; - - /** - * Optional - * - * @generated from field: string attribute_value_id = 4; - */ - attributeValueId: string; - - /** - * @generated from field: repeated string terms = 5; - */ - terms: string[]; - - /** - * Common Metadata - * - * @generated from field: common.MetadataMutable metadata = 100; - */ - metadata?: MetadataMutable; - - /** - * @generated from field: common.MetadataUpdateEnum metadata_update_behavior = 101; - */ - metadataUpdateBehavior: MetadataUpdateEnum; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.resourcemapping.UpdateResourceMappingRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): UpdateResourceMappingRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): UpdateResourceMappingRequest; - - static fromJsonString(jsonString: string, options?: Partial): UpdateResourceMappingRequest; - - static equals(a: UpdateResourceMappingRequest | PlainMessage | undefined, b: UpdateResourceMappingRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.resourcemapping.UpdateResourceMappingResponse - */ -export declare class UpdateResourceMappingResponse extends Message { - /** - * @generated from field: policy.ResourceMapping resource_mapping = 1; - */ - resourceMapping?: ResourceMapping; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.resourcemapping.UpdateResourceMappingResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): UpdateResourceMappingResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): UpdateResourceMappingResponse; - - static fromJsonString(jsonString: string, options?: Partial): UpdateResourceMappingResponse; - - static equals(a: UpdateResourceMappingResponse | PlainMessage | undefined, b: UpdateResourceMappingResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.resourcemapping.DeleteResourceMappingRequest - */ -export declare class DeleteResourceMappingRequest extends Message { - /** - * @generated from field: string id = 1; - */ - id: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.resourcemapping.DeleteResourceMappingRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): DeleteResourceMappingRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): DeleteResourceMappingRequest; - - static fromJsonString(jsonString: string, options?: Partial): DeleteResourceMappingRequest; - - static equals(a: DeleteResourceMappingRequest | PlainMessage | undefined, b: DeleteResourceMappingRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.resourcemapping.DeleteResourceMappingResponse - */ -export declare class DeleteResourceMappingResponse extends Message { - /** - * @generated from field: policy.ResourceMapping resource_mapping = 1; - */ - resourceMapping?: ResourceMapping; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.resourcemapping.DeleteResourceMappingResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): DeleteResourceMappingResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): DeleteResourceMappingResponse; - - static fromJsonString(jsonString: string, options?: Partial): DeleteResourceMappingResponse; - - static equals(a: DeleteResourceMappingResponse | PlainMessage | undefined, b: DeleteResourceMappingResponse | PlainMessage | undefined): boolean; -} - diff --git a/lib/src/platform/policy/resourcemapping/resource_mapping_pb.js b/lib/src/platform/policy/resourcemapping/resource_mapping_pb.js deleted file mode 100644 index c0e0ae56..00000000 --- a/lib/src/platform/policy/resourcemapping/resource_mapping_pb.js +++ /dev/null @@ -1,142 +0,0 @@ -// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" -// @generated from file policy/resourcemapping/resource_mapping.proto (package policy.resourcemapping, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { proto3 } from "@bufbuild/protobuf"; -import { ResourceMapping } from "../objects_pb"; -import { MetadataMutable, MetadataUpdateEnum } from "../../common/common_pb"; - -/** - * @generated from message policy.resourcemapping.ListResourceMappingsRequest - */ -export const ListResourceMappingsRequest = /*@__PURE__*/ proto3.makeMessageType( - "policy.resourcemapping.ListResourceMappingsRequest", - [], -); - -/** - * @generated from message policy.resourcemapping.ListResourceMappingsResponse - */ -export const ListResourceMappingsResponse = /*@__PURE__*/ proto3.makeMessageType( - "policy.resourcemapping.ListResourceMappingsResponse", - () => [ - { no: 1, name: "resource_mappings", kind: "message", T: ResourceMapping, repeated: true }, - ], -); - -/** - * @generated from message policy.resourcemapping.GetResourceMappingRequest - */ -export const GetResourceMappingRequest = /*@__PURE__*/ proto3.makeMessageType( - "policy.resourcemapping.GetResourceMappingRequest", - () => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message policy.resourcemapping.GetResourceMappingResponse - */ -export const GetResourceMappingResponse = /*@__PURE__*/ proto3.makeMessageType( - "policy.resourcemapping.GetResourceMappingResponse", - () => [ - { no: 1, name: "resource_mapping", kind: "message", T: ResourceMapping }, - ], -); - -/** - * - * ### Request - * - * grpcurl -plaintext -d @ localhost:8080 policy.resourcemapping.ResourceMappingService/CreateResourceMapping < [ - { no: 1, name: "attribute_value_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "terms", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 100, name: "metadata", kind: "message", T: MetadataMutable }, - ], -); - -/** - * @generated from message policy.resourcemapping.CreateResourceMappingResponse - */ -export const CreateResourceMappingResponse = /*@__PURE__*/ proto3.makeMessageType( - "policy.resourcemapping.CreateResourceMappingResponse", - () => [ - { no: 1, name: "resource_mapping", kind: "message", T: ResourceMapping }, - ], -); - -/** - * @generated from message policy.resourcemapping.UpdateResourceMappingRequest - */ -export const UpdateResourceMappingRequest = /*@__PURE__*/ proto3.makeMessageType( - "policy.resourcemapping.UpdateResourceMappingRequest", - () => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "attribute_value_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "terms", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 100, name: "metadata", kind: "message", T: MetadataMutable }, - { no: 101, name: "metadata_update_behavior", kind: "enum", T: proto3.getEnumType(MetadataUpdateEnum) }, - ], -); - -/** - * @generated from message policy.resourcemapping.UpdateResourceMappingResponse - */ -export const UpdateResourceMappingResponse = /*@__PURE__*/ proto3.makeMessageType( - "policy.resourcemapping.UpdateResourceMappingResponse", - () => [ - { no: 1, name: "resource_mapping", kind: "message", T: ResourceMapping }, - ], -); - -/** - * @generated from message policy.resourcemapping.DeleteResourceMappingRequest - */ -export const DeleteResourceMappingRequest = /*@__PURE__*/ proto3.makeMessageType( - "policy.resourcemapping.DeleteResourceMappingRequest", - () => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message policy.resourcemapping.DeleteResourceMappingResponse - */ -export const DeleteResourceMappingResponse = /*@__PURE__*/ proto3.makeMessageType( - "policy.resourcemapping.DeleteResourceMappingResponse", - () => [ - { no: 1, name: "resource_mapping", kind: "message", T: ResourceMapping }, - ], -); - diff --git a/lib/src/platform/policy/resourcemapping/resource_mapping_pb.ts b/lib/src/platform/policy/resourcemapping/resource_mapping_pb.ts new file mode 100644 index 00000000..33b23f9e --- /dev/null +++ b/lib/src/platform/policy/resourcemapping/resource_mapping_pb.ts @@ -0,0 +1,658 @@ +// @generated by protoc-gen-es v2.2.5 with parameter "target=ts,import_extension=.js" +// @generated from file policy/resourcemapping/resource_mapping.proto (package policy.resourcemapping, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1"; +import { file_buf_validate_validate } from "../../buf/validate/validate_pb.js"; +import { file_google_api_annotations } from "../../google/api/annotations_pb.js"; +import type { MetadataMutable, MetadataUpdateEnum } from "../../common/common_pb.js"; +import { file_common_common } from "../../common/common_pb.js"; +import type { ResourceMapping, ResourceMappingGroup } from "../objects_pb.js"; +import { file_policy_objects } from "../objects_pb.js"; +import type { PageRequest, PageResponse } from "../selectors_pb.js"; +import { file_policy_selectors } from "../selectors_pb.js"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file policy/resourcemapping/resource_mapping.proto. + */ +export const file_policy_resourcemapping_resource_mapping: GenFile = /*@__PURE__*/ + fileDesc("Ci1wb2xpY3kvcmVzb3VyY2VtYXBwaW5nL3Jlc291cmNlX21hcHBp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VwLWZxbnMSnwEKEkdldFJlc291cmNlTWFwcGluZxIxLnBvbGljeS5yZXNvdXJjZW1hcHBpbmcuR2V0UmVzb3VyY2VNYXBwaW5nUmVxdWVzdBoyLnBvbGljeS5yZXNvdXJjZW1hcHBpbmcuR2V0UmVzb3VyY2VNYXBwaW5nUmVzcG9uc2UiIpACAYLT5JMCGRIXL3Jlc291cmNlLW1hcHBpbmdzL3tpZH0SowEKFUNyZWF0ZVJlc291cmNlTWFwcGluZxI0LnBvbGljeS5yZXNvdXJjZW1hcHBpbmcuQ3JlYXRlUmVzb3VyY2VNYXBwaW5nUmVxdWVzdBo1LnBvbGljeS5yZXNvdXJjZW1hcHBpbmcuQ3JlYXRlUmVzb3VyY2VNYXBwaW5nUmVzcG9uc2UiHYLT5JMCFzoBKiISL3Jlc291cmNlLW1hcHBpbmdzEqgBChVVcGRhdGVSZXNvdXJjZU1hcHBpbmcSNC5wb2xpY3kucmVzb3VyY2VtYXBwaW5nLlVwZGF0ZVJlc291cmNlTWFwcGluZ1JlcXVlc3QaNS5wb2xpY3kucmVzb3VyY2VtYXBwaW5nLlVwZGF0ZVJlc291cmNlTWFwcGluZ1Jlc3BvbnNlIiKC0+STAhw6ASoyFy9yZXNvdXJjZS1tYXBwaW5ncy97aWR9EqUBChVEZWxldGVSZXNvdXJjZU1hcHBpbmcSNC5wb2xpY3kucmVzb3VyY2VtYXBwaW5nLkRlbGV0ZVJlc291cmNlTWFwcGluZ1JlcXVlc3QaNS5wb2xpY3kucmVzb3VyY2VtYXBwaW5nLkRlbGV0ZVJlc291cmNlTWFwcGluZ1Jlc3BvbnNlIh+C0+STAhkqFy9yZXNvdXJjZS1tYXBwaW5ncy97aWR9YgZwcm90bzM", [file_buf_validate_validate, file_google_api_annotations, file_common_common, file_policy_objects, file_policy_selectors]); + +/** + * @generated from message policy.resourcemapping.ListResourceMappingGroupsRequest + */ +export type ListResourceMappingGroupsRequest = Message<"policy.resourcemapping.ListResourceMappingGroupsRequest"> & { + /** + * Optional + * + * @generated from field: string namespace_id = 1; + */ + namespaceId: string; + + /** + * Optional + * + * @generated from field: policy.PageRequest pagination = 10; + */ + pagination?: PageRequest; +}; + +/** + * Describes the message policy.resourcemapping.ListResourceMappingGroupsRequest. + * Use `create(ListResourceMappingGroupsRequestSchema)` to create a new message. + */ +export const ListResourceMappingGroupsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_resourcemapping_resource_mapping, 0); + +/** + * @generated from message policy.resourcemapping.ListResourceMappingGroupsResponse + */ +export type ListResourceMappingGroupsResponse = Message<"policy.resourcemapping.ListResourceMappingGroupsResponse"> & { + /** + * @generated from field: repeated policy.ResourceMappingGroup resource_mapping_groups = 1; + */ + resourceMappingGroups: ResourceMappingGroup[]; + + /** + * @generated from field: policy.PageResponse pagination = 10; + */ + pagination?: PageResponse; +}; + +/** + * Describes the message policy.resourcemapping.ListResourceMappingGroupsResponse. + * Use `create(ListResourceMappingGroupsResponseSchema)` to create a new message. + */ +export const ListResourceMappingGroupsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_resourcemapping_resource_mapping, 1); + +/** + * @generated from message policy.resourcemapping.GetResourceMappingGroupRequest + */ +export type GetResourceMappingGroupRequest = Message<"policy.resourcemapping.GetResourceMappingGroupRequest"> & { + /** + * Required + * + * @generated from field: string id = 1; + */ + id: string; +}; + +/** + * Describes the message policy.resourcemapping.GetResourceMappingGroupRequest. + * Use `create(GetResourceMappingGroupRequestSchema)` to create a new message. + */ +export const GetResourceMappingGroupRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_resourcemapping_resource_mapping, 2); + +/** + * @generated from message policy.resourcemapping.GetResourceMappingGroupResponse + */ +export type GetResourceMappingGroupResponse = Message<"policy.resourcemapping.GetResourceMappingGroupResponse"> & { + /** + * @generated from field: policy.ResourceMappingGroup resource_mapping_group = 1; + */ + resourceMappingGroup?: ResourceMappingGroup; +}; + +/** + * Describes the message policy.resourcemapping.GetResourceMappingGroupResponse. + * Use `create(GetResourceMappingGroupResponseSchema)` to create a new message. + */ +export const GetResourceMappingGroupResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_resourcemapping_resource_mapping, 3); + +/** + * @generated from message policy.resourcemapping.CreateResourceMappingGroupRequest + */ +export type CreateResourceMappingGroupRequest = Message<"policy.resourcemapping.CreateResourceMappingGroupRequest"> & { + /** + * Required + * + * @generated from field: string namespace_id = 1; + */ + namespaceId: string; + + /** + * Required + * + * @generated from field: string name = 2; + */ + name: string; + + /** + * Common metadata + * + * @generated from field: common.MetadataMutable metadata = 100; + */ + metadata?: MetadataMutable; +}; + +/** + * Describes the message policy.resourcemapping.CreateResourceMappingGroupRequest. + * Use `create(CreateResourceMappingGroupRequestSchema)` to create a new message. + */ +export const CreateResourceMappingGroupRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_resourcemapping_resource_mapping, 4); + +/** + * @generated from message policy.resourcemapping.CreateResourceMappingGroupResponse + */ +export type CreateResourceMappingGroupResponse = Message<"policy.resourcemapping.CreateResourceMappingGroupResponse"> & { + /** + * @generated from field: policy.ResourceMappingGroup resource_mapping_group = 1; + */ + resourceMappingGroup?: ResourceMappingGroup; +}; + +/** + * Describes the message policy.resourcemapping.CreateResourceMappingGroupResponse. + * Use `create(CreateResourceMappingGroupResponseSchema)` to create a new message. + */ +export const CreateResourceMappingGroupResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_resourcemapping_resource_mapping, 5); + +/** + * @generated from message policy.resourcemapping.UpdateResourceMappingGroupRequest + */ +export type UpdateResourceMappingGroupRequest = Message<"policy.resourcemapping.UpdateResourceMappingGroupRequest"> & { + /** + * Required + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Optional + * + * @generated from field: string namespace_id = 2; + */ + namespaceId: string; + + /** + * Optional + * + * @generated from field: string name = 3; + */ + name: string; + + /** + * Common metadata + * + * @generated from field: common.MetadataMutable metadata = 100; + */ + metadata?: MetadataMutable; + + /** + * @generated from field: common.MetadataUpdateEnum metadata_update_behavior = 101; + */ + metadataUpdateBehavior: MetadataUpdateEnum; +}; + +/** + * Describes the message policy.resourcemapping.UpdateResourceMappingGroupRequest. + * Use `create(UpdateResourceMappingGroupRequestSchema)` to create a new message. + */ +export const UpdateResourceMappingGroupRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_resourcemapping_resource_mapping, 6); + +/** + * @generated from message policy.resourcemapping.UpdateResourceMappingGroupResponse + */ +export type UpdateResourceMappingGroupResponse = Message<"policy.resourcemapping.UpdateResourceMappingGroupResponse"> & { + /** + * @generated from field: policy.ResourceMappingGroup resource_mapping_group = 1; + */ + resourceMappingGroup?: ResourceMappingGroup; +}; + +/** + * Describes the message policy.resourcemapping.UpdateResourceMappingGroupResponse. + * Use `create(UpdateResourceMappingGroupResponseSchema)` to create a new message. + */ +export const UpdateResourceMappingGroupResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_resourcemapping_resource_mapping, 7); + +/** + * @generated from message policy.resourcemapping.DeleteResourceMappingGroupRequest + */ +export type DeleteResourceMappingGroupRequest = Message<"policy.resourcemapping.DeleteResourceMappingGroupRequest"> & { + /** + * Required + * + * @generated from field: string id = 1; + */ + id: string; +}; + +/** + * Describes the message policy.resourcemapping.DeleteResourceMappingGroupRequest. + * Use `create(DeleteResourceMappingGroupRequestSchema)` to create a new message. + */ +export const DeleteResourceMappingGroupRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_resourcemapping_resource_mapping, 8); + +/** + * @generated from message policy.resourcemapping.DeleteResourceMappingGroupResponse + */ +export type DeleteResourceMappingGroupResponse = Message<"policy.resourcemapping.DeleteResourceMappingGroupResponse"> & { + /** + * @generated from field: policy.ResourceMappingGroup resource_mapping_group = 1; + */ + resourceMappingGroup?: ResourceMappingGroup; +}; + +/** + * Describes the message policy.resourcemapping.DeleteResourceMappingGroupResponse. + * Use `create(DeleteResourceMappingGroupResponseSchema)` to create a new message. + */ +export const DeleteResourceMappingGroupResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_resourcemapping_resource_mapping, 9); + +/** + * @generated from message policy.resourcemapping.ListResourceMappingsRequest + */ +export type ListResourceMappingsRequest = Message<"policy.resourcemapping.ListResourceMappingsRequest"> & { + /** + * Optional + * + * @generated from field: string group_id = 1; + */ + groupId: string; + + /** + * Optional + * + * @generated from field: policy.PageRequest pagination = 10; + */ + pagination?: PageRequest; +}; + +/** + * Describes the message policy.resourcemapping.ListResourceMappingsRequest. + * Use `create(ListResourceMappingsRequestSchema)` to create a new message. + */ +export const ListResourceMappingsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_resourcemapping_resource_mapping, 10); + +/** + * @generated from message policy.resourcemapping.ListResourceMappingsResponse + */ +export type ListResourceMappingsResponse = Message<"policy.resourcemapping.ListResourceMappingsResponse"> & { + /** + * @generated from field: repeated policy.ResourceMapping resource_mappings = 1; + */ + resourceMappings: ResourceMapping[]; + + /** + * @generated from field: policy.PageResponse pagination = 10; + */ + pagination?: PageResponse; +}; + +/** + * Describes the message policy.resourcemapping.ListResourceMappingsResponse. + * Use `create(ListResourceMappingsResponseSchema)` to create a new message. + */ +export const ListResourceMappingsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_resourcemapping_resource_mapping, 11); + +/** + * @generated from message policy.resourcemapping.ListResourceMappingsByGroupFqnsRequest + */ +export type ListResourceMappingsByGroupFqnsRequest = Message<"policy.resourcemapping.ListResourceMappingsByGroupFqnsRequest"> & { + /** + * Required + * Structure of the RM Group FQN is 'https:///resm/' + * + * @generated from field: repeated string fqns = 1; + */ + fqns: string[]; +}; + +/** + * Describes the message policy.resourcemapping.ListResourceMappingsByGroupFqnsRequest. + * Use `create(ListResourceMappingsByGroupFqnsRequestSchema)` to create a new message. + */ +export const ListResourceMappingsByGroupFqnsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_resourcemapping_resource_mapping, 12); + +/** + * @generated from message policy.resourcemapping.ResourceMappingsByGroup + */ +export type ResourceMappingsByGroup = Message<"policy.resourcemapping.ResourceMappingsByGroup"> & { + /** + * @generated from field: policy.ResourceMappingGroup group = 1; + */ + group?: ResourceMappingGroup; + + /** + * @generated from field: repeated policy.ResourceMapping mappings = 2; + */ + mappings: ResourceMapping[]; +}; + +/** + * Describes the message policy.resourcemapping.ResourceMappingsByGroup. + * Use `create(ResourceMappingsByGroupSchema)` to create a new message. + */ +export const ResourceMappingsByGroupSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_resourcemapping_resource_mapping, 13); + +/** + * @generated from message policy.resourcemapping.ListResourceMappingsByGroupFqnsResponse + */ +export type ListResourceMappingsByGroupFqnsResponse = Message<"policy.resourcemapping.ListResourceMappingsByGroupFqnsResponse"> & { + /** + * @generated from field: map fqn_resource_mapping_groups = 1; + */ + fqnResourceMappingGroups: { [key: string]: ResourceMappingsByGroup }; +}; + +/** + * Describes the message policy.resourcemapping.ListResourceMappingsByGroupFqnsResponse. + * Use `create(ListResourceMappingsByGroupFqnsResponseSchema)` to create a new message. + */ +export const ListResourceMappingsByGroupFqnsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_resourcemapping_resource_mapping, 14); + +/** + * @generated from message policy.resourcemapping.GetResourceMappingRequest + */ +export type GetResourceMappingRequest = Message<"policy.resourcemapping.GetResourceMappingRequest"> & { + /** + * Required + * + * @generated from field: string id = 1; + */ + id: string; +}; + +/** + * Describes the message policy.resourcemapping.GetResourceMappingRequest. + * Use `create(GetResourceMappingRequestSchema)` to create a new message. + */ +export const GetResourceMappingRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_resourcemapping_resource_mapping, 15); + +/** + * @generated from message policy.resourcemapping.GetResourceMappingResponse + */ +export type GetResourceMappingResponse = Message<"policy.resourcemapping.GetResourceMappingResponse"> & { + /** + * @generated from field: policy.ResourceMapping resource_mapping = 1; + */ + resourceMapping?: ResourceMapping; +}; + +/** + * Describes the message policy.resourcemapping.GetResourceMappingResponse. + * Use `create(GetResourceMappingResponseSchema)` to create a new message. + */ +export const GetResourceMappingResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_resourcemapping_resource_mapping, 16); + +/** + * @generated from message policy.resourcemapping.CreateResourceMappingRequest + */ +export type CreateResourceMappingRequest = Message<"policy.resourcemapping.CreateResourceMappingRequest"> & { + /** + * Required + * + * @generated from field: string attribute_value_id = 1; + */ + attributeValueId: string; + + /** + * Required + * + * @generated from field: repeated string terms = 2; + */ + terms: string[]; + + /** + * Optional + * + * @generated from field: string group_id = 3; + */ + groupId: string; + + /** + * Optional + * + * @generated from field: common.MetadataMutable metadata = 100; + */ + metadata?: MetadataMutable; +}; + +/** + * Describes the message policy.resourcemapping.CreateResourceMappingRequest. + * Use `create(CreateResourceMappingRequestSchema)` to create a new message. + */ +export const CreateResourceMappingRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_resourcemapping_resource_mapping, 17); + +/** + * @generated from message policy.resourcemapping.CreateResourceMappingResponse + */ +export type CreateResourceMappingResponse = Message<"policy.resourcemapping.CreateResourceMappingResponse"> & { + /** + * @generated from field: policy.ResourceMapping resource_mapping = 1; + */ + resourceMapping?: ResourceMapping; +}; + +/** + * Describes the message policy.resourcemapping.CreateResourceMappingResponse. + * Use `create(CreateResourceMappingResponseSchema)` to create a new message. + */ +export const CreateResourceMappingResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_resourcemapping_resource_mapping, 18); + +/** + * @generated from message policy.resourcemapping.UpdateResourceMappingRequest + */ +export type UpdateResourceMappingRequest = Message<"policy.resourcemapping.UpdateResourceMappingRequest"> & { + /** + * Required + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Optional + * + * @generated from field: string attribute_value_id = 4; + */ + attributeValueId: string; + + /** + * Optional + * + * @generated from field: repeated string terms = 5; + */ + terms: string[]; + + /** + * Optional + * + * @generated from field: string group_id = 6; + */ + groupId: string; + + /** + * Optional + * Common Metadata + * + * @generated from field: common.MetadataMutable metadata = 100; + */ + metadata?: MetadataMutable; + + /** + * @generated from field: common.MetadataUpdateEnum metadata_update_behavior = 101; + */ + metadataUpdateBehavior: MetadataUpdateEnum; +}; + +/** + * Describes the message policy.resourcemapping.UpdateResourceMappingRequest. + * Use `create(UpdateResourceMappingRequestSchema)` to create a new message. + */ +export const UpdateResourceMappingRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_resourcemapping_resource_mapping, 19); + +/** + * @generated from message policy.resourcemapping.UpdateResourceMappingResponse + */ +export type UpdateResourceMappingResponse = Message<"policy.resourcemapping.UpdateResourceMappingResponse"> & { + /** + * @generated from field: policy.ResourceMapping resource_mapping = 1; + */ + resourceMapping?: ResourceMapping; +}; + +/** + * Describes the message policy.resourcemapping.UpdateResourceMappingResponse. + * Use `create(UpdateResourceMappingResponseSchema)` to create a new message. + */ +export const UpdateResourceMappingResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_resourcemapping_resource_mapping, 20); + +/** + * @generated from message policy.resourcemapping.DeleteResourceMappingRequest + */ +export type DeleteResourceMappingRequest = Message<"policy.resourcemapping.DeleteResourceMappingRequest"> & { + /** + * Required + * + * @generated from field: string id = 1; + */ + id: string; +}; + +/** + * Describes the message policy.resourcemapping.DeleteResourceMappingRequest. + * Use `create(DeleteResourceMappingRequestSchema)` to create a new message. + */ +export const DeleteResourceMappingRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_resourcemapping_resource_mapping, 21); + +/** + * @generated from message policy.resourcemapping.DeleteResourceMappingResponse + */ +export type DeleteResourceMappingResponse = Message<"policy.resourcemapping.DeleteResourceMappingResponse"> & { + /** + * @generated from field: policy.ResourceMapping resource_mapping = 1; + */ + resourceMapping?: ResourceMapping; +}; + +/** + * Describes the message policy.resourcemapping.DeleteResourceMappingResponse. + * Use `create(DeleteResourceMappingResponseSchema)` to create a new message. + */ +export const DeleteResourceMappingResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_resourcemapping_resource_mapping, 22); + +/** + * + * Resource Mapping Groups + * + * @generated from service policy.resourcemapping.ResourceMappingService + */ +export const ResourceMappingService: GenService<{ + /** + * @generated from rpc policy.resourcemapping.ResourceMappingService.ListResourceMappingGroups + */ + listResourceMappingGroups: { + methodKind: "unary"; + input: typeof ListResourceMappingGroupsRequestSchema; + output: typeof ListResourceMappingGroupsResponseSchema; + }, + /** + * @generated from rpc policy.resourcemapping.ResourceMappingService.GetResourceMappingGroup + */ + getResourceMappingGroup: { + methodKind: "unary"; + input: typeof GetResourceMappingGroupRequestSchema; + output: typeof GetResourceMappingGroupResponseSchema; + }, + /** + * @generated from rpc policy.resourcemapping.ResourceMappingService.CreateResourceMappingGroup + */ + createResourceMappingGroup: { + methodKind: "unary"; + input: typeof CreateResourceMappingGroupRequestSchema; + output: typeof CreateResourceMappingGroupResponseSchema; + }, + /** + * @generated from rpc policy.resourcemapping.ResourceMappingService.UpdateResourceMappingGroup + */ + updateResourceMappingGroup: { + methodKind: "unary"; + input: typeof UpdateResourceMappingGroupRequestSchema; + output: typeof UpdateResourceMappingGroupResponseSchema; + }, + /** + * @generated from rpc policy.resourcemapping.ResourceMappingService.DeleteResourceMappingGroup + */ + deleteResourceMappingGroup: { + methodKind: "unary"; + input: typeof DeleteResourceMappingGroupRequestSchema; + output: typeof DeleteResourceMappingGroupResponseSchema; + }, + /** + * @generated from rpc policy.resourcemapping.ResourceMappingService.ListResourceMappings + */ + listResourceMappings: { + methodKind: "unary"; + input: typeof ListResourceMappingsRequestSchema; + output: typeof ListResourceMappingsResponseSchema; + }, + /** + * @generated from rpc policy.resourcemapping.ResourceMappingService.ListResourceMappingsByGroupFqns + */ + listResourceMappingsByGroupFqns: { + methodKind: "unary"; + input: typeof ListResourceMappingsByGroupFqnsRequestSchema; + output: typeof ListResourceMappingsByGroupFqnsResponseSchema; + }, + /** + * @generated from rpc policy.resourcemapping.ResourceMappingService.GetResourceMapping + */ + getResourceMapping: { + methodKind: "unary"; + input: typeof GetResourceMappingRequestSchema; + output: typeof GetResourceMappingResponseSchema; + }, + /** + * @generated from rpc policy.resourcemapping.ResourceMappingService.CreateResourceMapping + */ + createResourceMapping: { + methodKind: "unary"; + input: typeof CreateResourceMappingRequestSchema; + output: typeof CreateResourceMappingResponseSchema; + }, + /** + * @generated from rpc policy.resourcemapping.ResourceMappingService.UpdateResourceMapping + */ + updateResourceMapping: { + methodKind: "unary"; + input: typeof UpdateResourceMappingRequestSchema; + output: typeof UpdateResourceMappingResponseSchema; + }, + /** + * @generated from rpc policy.resourcemapping.ResourceMappingService.DeleteResourceMapping + */ + deleteResourceMapping: { + methodKind: "unary"; + input: typeof DeleteResourceMappingRequestSchema; + output: typeof DeleteResourceMappingResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_policy_resourcemapping_resource_mapping, 0); + diff --git a/lib/src/platform/policy/selectors_pb.d.ts b/lib/src/platform/policy/selectors_pb.d.ts deleted file mode 100644 index 7bb3ab59..00000000 --- a/lib/src/platform/policy/selectors_pb.d.ts +++ /dev/null @@ -1,269 +0,0 @@ -// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" -// @generated from file policy/selectors.proto (package policy, 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 policy.AttributeNamespaceSelector - */ -export declare class AttributeNamespaceSelector extends Message { - /** - * @generated from field: policy.AttributeNamespaceSelector.AttributeSelector with_attributes = 10; - */ - withAttributes?: AttributeNamespaceSelector_AttributeSelector; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.AttributeNamespaceSelector"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): AttributeNamespaceSelector; - - static fromJson(jsonValue: JsonValue, options?: Partial): AttributeNamespaceSelector; - - static fromJsonString(jsonString: string, options?: Partial): AttributeNamespaceSelector; - - static equals(a: AttributeNamespaceSelector | PlainMessage | undefined, b: AttributeNamespaceSelector | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.AttributeNamespaceSelector.AttributeSelector - */ -export declare class AttributeNamespaceSelector_AttributeSelector extends Message { - /** - * @generated from field: bool with_key_access_grants = 1; - */ - withKeyAccessGrants: boolean; - - /** - * @generated from field: policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector with_values = 10; - */ - withValues?: AttributeNamespaceSelector_AttributeSelector_ValueSelector; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.AttributeNamespaceSelector.AttributeSelector"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): AttributeNamespaceSelector_AttributeSelector; - - static fromJson(jsonValue: JsonValue, options?: Partial): AttributeNamespaceSelector_AttributeSelector; - - static fromJsonString(jsonString: string, options?: Partial): AttributeNamespaceSelector_AttributeSelector; - - static equals(a: AttributeNamespaceSelector_AttributeSelector | PlainMessage | undefined, b: AttributeNamespaceSelector_AttributeSelector | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector - */ -export declare class AttributeNamespaceSelector_AttributeSelector_ValueSelector extends Message { - /** - * @generated from field: bool with_key_access_grants = 1; - */ - withKeyAccessGrants: boolean; - - /** - * @generated from field: bool with_subject_maps = 2; - */ - withSubjectMaps: boolean; - - /** - * @generated from field: bool with_resource_maps = 3; - */ - withResourceMaps: boolean; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): AttributeNamespaceSelector_AttributeSelector_ValueSelector; - - static fromJson(jsonValue: JsonValue, options?: Partial): AttributeNamespaceSelector_AttributeSelector_ValueSelector; - - static fromJsonString(jsonString: string, options?: Partial): AttributeNamespaceSelector_AttributeSelector_ValueSelector; - - static equals(a: AttributeNamespaceSelector_AttributeSelector_ValueSelector | PlainMessage | undefined, b: AttributeNamespaceSelector_AttributeSelector_ValueSelector | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.AttributeDefinitionSelector - */ -export declare class AttributeDefinitionSelector extends Message { - /** - * @generated from field: bool with_key_access_grants = 1; - */ - withKeyAccessGrants: boolean; - - /** - * @generated from field: policy.AttributeDefinitionSelector.NamespaceSelector with_namespace = 10; - */ - withNamespace?: AttributeDefinitionSelector_NamespaceSelector; - - /** - * @generated from field: policy.AttributeDefinitionSelector.ValueSelector with_values = 11; - */ - withValues?: AttributeDefinitionSelector_ValueSelector; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.AttributeDefinitionSelector"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): AttributeDefinitionSelector; - - static fromJson(jsonValue: JsonValue, options?: Partial): AttributeDefinitionSelector; - - static fromJsonString(jsonString: string, options?: Partial): AttributeDefinitionSelector; - - static equals(a: AttributeDefinitionSelector | PlainMessage | undefined, b: AttributeDefinitionSelector | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.AttributeDefinitionSelector.NamespaceSelector - */ -export declare class AttributeDefinitionSelector_NamespaceSelector extends Message { - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.AttributeDefinitionSelector.NamespaceSelector"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): AttributeDefinitionSelector_NamespaceSelector; - - static fromJson(jsonValue: JsonValue, options?: Partial): AttributeDefinitionSelector_NamespaceSelector; - - static fromJsonString(jsonString: string, options?: Partial): AttributeDefinitionSelector_NamespaceSelector; - - static equals(a: AttributeDefinitionSelector_NamespaceSelector | PlainMessage | undefined, b: AttributeDefinitionSelector_NamespaceSelector | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.AttributeDefinitionSelector.ValueSelector - */ -export declare class AttributeDefinitionSelector_ValueSelector extends Message { - /** - * @generated from field: bool with_key_access_grants = 1; - */ - withKeyAccessGrants: boolean; - - /** - * @generated from field: bool with_subject_maps = 2; - */ - withSubjectMaps: boolean; - - /** - * @generated from field: bool with_resource_maps = 3; - */ - withResourceMaps: boolean; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.AttributeDefinitionSelector.ValueSelector"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): AttributeDefinitionSelector_ValueSelector; - - static fromJson(jsonValue: JsonValue, options?: Partial): AttributeDefinitionSelector_ValueSelector; - - static fromJsonString(jsonString: string, options?: Partial): AttributeDefinitionSelector_ValueSelector; - - static equals(a: AttributeDefinitionSelector_ValueSelector | PlainMessage | undefined, b: AttributeDefinitionSelector_ValueSelector | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.AttributeValueSelector - */ -export declare class AttributeValueSelector extends Message { - /** - * @generated from field: bool with_key_access_grants = 1; - */ - withKeyAccessGrants: boolean; - - /** - * @generated from field: bool with_subject_maps = 2; - */ - withSubjectMaps: boolean; - - /** - * @generated from field: bool with_resource_maps = 3; - */ - withResourceMaps: boolean; - - /** - * @generated from field: policy.AttributeValueSelector.AttributeSelector with_attribute = 10; - */ - withAttribute?: AttributeValueSelector_AttributeSelector; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.AttributeValueSelector"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): AttributeValueSelector; - - static fromJson(jsonValue: JsonValue, options?: Partial): AttributeValueSelector; - - static fromJsonString(jsonString: string, options?: Partial): AttributeValueSelector; - - static equals(a: AttributeValueSelector | PlainMessage | undefined, b: AttributeValueSelector | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.AttributeValueSelector.AttributeSelector - */ -export declare class AttributeValueSelector_AttributeSelector extends Message { - /** - * @generated from field: bool with_key_access_grants = 1; - */ - withKeyAccessGrants: boolean; - - /** - * @generated from field: policy.AttributeValueSelector.AttributeSelector.NamespaceSelector with_namespace = 10; - */ - withNamespace?: AttributeValueSelector_AttributeSelector_NamespaceSelector; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.AttributeValueSelector.AttributeSelector"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): AttributeValueSelector_AttributeSelector; - - static fromJson(jsonValue: JsonValue, options?: Partial): AttributeValueSelector_AttributeSelector; - - static fromJsonString(jsonString: string, options?: Partial): AttributeValueSelector_AttributeSelector; - - static equals(a: AttributeValueSelector_AttributeSelector | PlainMessage | undefined, b: AttributeValueSelector_AttributeSelector | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.AttributeValueSelector.AttributeSelector.NamespaceSelector - */ -export declare class AttributeValueSelector_AttributeSelector_NamespaceSelector extends Message { - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.AttributeValueSelector.AttributeSelector.NamespaceSelector"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): AttributeValueSelector_AttributeSelector_NamespaceSelector; - - static fromJson(jsonValue: JsonValue, options?: Partial): AttributeValueSelector_AttributeSelector_NamespaceSelector; - - static fromJsonString(jsonString: string, options?: Partial): AttributeValueSelector_AttributeSelector_NamespaceSelector; - - static equals(a: AttributeValueSelector_AttributeSelector_NamespaceSelector | PlainMessage | undefined, b: AttributeValueSelector_AttributeSelector_NamespaceSelector | PlainMessage | undefined): boolean; -} - diff --git a/lib/src/platform/policy/selectors_pb.js b/lib/src/platform/policy/selectors_pb.js deleted file mode 100644 index c26c58ed..00000000 --- a/lib/src/platform/policy/selectors_pb.js +++ /dev/null @@ -1,110 +0,0 @@ -// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" -// @generated from file policy/selectors.proto (package policy, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { proto3 } from "@bufbuild/protobuf"; - -/** - * @generated from message policy.AttributeNamespaceSelector - */ -export const AttributeNamespaceSelector = /*@__PURE__*/ proto3.makeMessageType( - "policy.AttributeNamespaceSelector", - () => [ - { no: 10, name: "with_attributes", kind: "message", T: AttributeNamespaceSelector_AttributeSelector }, - ], -); - -/** - * @generated from message policy.AttributeNamespaceSelector.AttributeSelector - */ -export const AttributeNamespaceSelector_AttributeSelector = /*@__PURE__*/ proto3.makeMessageType( - "policy.AttributeNamespaceSelector.AttributeSelector", - () => [ - { no: 1, name: "with_key_access_grants", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 10, name: "with_values", kind: "message", T: AttributeNamespaceSelector_AttributeSelector_ValueSelector }, - ], - {localName: "AttributeNamespaceSelector_AttributeSelector"}, -); - -/** - * @generated from message policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector - */ -export const AttributeNamespaceSelector_AttributeSelector_ValueSelector = /*@__PURE__*/ proto3.makeMessageType( - "policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector", - () => [ - { no: 1, name: "with_key_access_grants", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 2, name: "with_subject_maps", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 3, name: "with_resource_maps", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ], - {localName: "AttributeNamespaceSelector_AttributeSelector_ValueSelector"}, -); - -/** - * @generated from message policy.AttributeDefinitionSelector - */ -export const AttributeDefinitionSelector = /*@__PURE__*/ proto3.makeMessageType( - "policy.AttributeDefinitionSelector", - () => [ - { no: 1, name: "with_key_access_grants", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 10, name: "with_namespace", kind: "message", T: AttributeDefinitionSelector_NamespaceSelector }, - { no: 11, name: "with_values", kind: "message", T: AttributeDefinitionSelector_ValueSelector }, - ], -); - -/** - * @generated from message policy.AttributeDefinitionSelector.NamespaceSelector - */ -export const AttributeDefinitionSelector_NamespaceSelector = /*@__PURE__*/ proto3.makeMessageType( - "policy.AttributeDefinitionSelector.NamespaceSelector", - [], - {localName: "AttributeDefinitionSelector_NamespaceSelector"}, -); - -/** - * @generated from message policy.AttributeDefinitionSelector.ValueSelector - */ -export const AttributeDefinitionSelector_ValueSelector = /*@__PURE__*/ proto3.makeMessageType( - "policy.AttributeDefinitionSelector.ValueSelector", - () => [ - { no: 1, name: "with_key_access_grants", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 2, name: "with_subject_maps", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 3, name: "with_resource_maps", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ], - {localName: "AttributeDefinitionSelector_ValueSelector"}, -); - -/** - * @generated from message policy.AttributeValueSelector - */ -export const AttributeValueSelector = /*@__PURE__*/ proto3.makeMessageType( - "policy.AttributeValueSelector", - () => [ - { no: 1, name: "with_key_access_grants", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 2, name: "with_subject_maps", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 3, name: "with_resource_maps", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 10, name: "with_attribute", kind: "message", T: AttributeValueSelector_AttributeSelector }, - ], -); - -/** - * @generated from message policy.AttributeValueSelector.AttributeSelector - */ -export const AttributeValueSelector_AttributeSelector = /*@__PURE__*/ proto3.makeMessageType( - "policy.AttributeValueSelector.AttributeSelector", - () => [ - { no: 1, name: "with_key_access_grants", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 10, name: "with_namespace", kind: "message", T: AttributeValueSelector_AttributeSelector_NamespaceSelector }, - ], - {localName: "AttributeValueSelector_AttributeSelector"}, -); - -/** - * @generated from message policy.AttributeValueSelector.AttributeSelector.NamespaceSelector - */ -export const AttributeValueSelector_AttributeSelector_NamespaceSelector = /*@__PURE__*/ proto3.makeMessageType( - "policy.AttributeValueSelector.AttributeSelector.NamespaceSelector", - [], - {localName: "AttributeValueSelector_AttributeSelector_NamespaceSelector"}, -); - diff --git a/lib/src/platform/policy/selectors_pb.ts b/lib/src/platform/policy/selectors_pb.ts new file mode 100644 index 00000000..44409e75 --- /dev/null +++ b/lib/src/platform/policy/selectors_pb.ts @@ -0,0 +1,277 @@ +// @generated by protoc-gen-es v2.2.5 with parameter "target=ts,import_extension=.js" +// @generated from file policy/selectors.proto (package policy, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file policy/selectors.proto. + */ +export const file_policy_selectors: GenFile = /*@__PURE__*/ + fileDesc("ChZwb2xpY3kvc2VsZWN0b3JzLnByb3RvEgZwb2xpY3ki4gIKGkF0dHJpYnV0ZU5hbWVzcGFjZVNlbGVjdG9yEk0KD3dpdGhfYXR0cmlidXRlcxgKIAEoCzI0LnBvbGljeS5BdHRyaWJ1dGVOYW1lc3BhY2VTZWxlY3Rvci5BdHRyaWJ1dGVTZWxlY3Rvchr0AQoRQXR0cmlidXRlU2VsZWN0b3ISHgoWd2l0aF9rZXlfYWNjZXNzX2dyYW50cxgBIAEoCBJXCgt3aXRoX3ZhbHVlcxgKIAEoCzJCLnBvbGljeS5BdHRyaWJ1dGVOYW1lc3BhY2VTZWxlY3Rvci5BdHRyaWJ1dGVTZWxlY3Rvci5WYWx1ZVNlbGVjdG9yGmYKDVZhbHVlU2VsZWN0b3ISHgoWd2l0aF9rZXlfYWNjZXNzX2dyYW50cxgBIAEoCBIZChF3aXRoX3N1YmplY3RfbWFwcxgCIAEoCBIaChJ3aXRoX3Jlc291cmNlX21hcHMYAyABKAgi0QIKG0F0dHJpYnV0ZURlZmluaXRpb25TZWxlY3RvchIeChZ3aXRoX2tleV9hY2Nlc3NfZ3JhbnRzGAEgASgIEk0KDndpdGhfbmFtZXNwYWNlGAogASgLMjUucG9saWN5LkF0dHJpYnV0ZURlZmluaXRpb25TZWxlY3Rvci5OYW1lc3BhY2VTZWxlY3RvchJGCgt3aXRoX3ZhbHVlcxgLIAEoCzIxLnBvbGljeS5BdHRyaWJ1dGVEZWZpbml0aW9uU2VsZWN0b3IuVmFsdWVTZWxlY3RvchoTChFOYW1lc3BhY2VTZWxlY3RvchpmCg1WYWx1ZVNlbGVjdG9yEh4KFndpdGhfa2V5X2FjY2Vzc19ncmFudHMYASABKAgSGQoRd2l0aF9zdWJqZWN0X21hcHMYAiABKAgSGgoSd2l0aF9yZXNvdXJjZV9tYXBzGAMgASgIIuACChZBdHRyaWJ1dGVWYWx1ZVNlbGVjdG9yEh4KFndpdGhfa2V5X2FjY2Vzc19ncmFudHMYASABKAgSGQoRd2l0aF9zdWJqZWN0X21hcHMYAiABKAgSGgoSd2l0aF9yZXNvdXJjZV9tYXBzGAMgASgIEkgKDndpdGhfYXR0cmlidXRlGAogASgLMjAucG9saWN5LkF0dHJpYnV0ZVZhbHVlU2VsZWN0b3IuQXR0cmlidXRlU2VsZWN0b3IapAEKEUF0dHJpYnV0ZVNlbGVjdG9yEh4KFndpdGhfa2V5X2FjY2Vzc19ncmFudHMYASABKAgSWgoOd2l0aF9uYW1lc3BhY2UYCiABKAsyQi5wb2xpY3kuQXR0cmlidXRlVmFsdWVTZWxlY3Rvci5BdHRyaWJ1dGVTZWxlY3Rvci5OYW1lc3BhY2VTZWxlY3RvchoTChFOYW1lc3BhY2VTZWxlY3RvciIsCgtQYWdlUmVxdWVzdBINCgVsaW1pdBgBIAEoBRIOCgZvZmZzZXQYAiABKAUiSgoMUGFnZVJlc3BvbnNlEhYKDmN1cnJlbnRfb2Zmc2V0GAEgASgFEhMKC25leHRfb2Zmc2V0GAIgASgFEg0KBXRvdGFsGAMgASgFYgZwcm90bzM"); + +/** + * @generated from message policy.AttributeNamespaceSelector + */ +export type AttributeNamespaceSelector = Message<"policy.AttributeNamespaceSelector"> & { + /** + * @generated from field: policy.AttributeNamespaceSelector.AttributeSelector with_attributes = 10; + */ + withAttributes?: AttributeNamespaceSelector_AttributeSelector; +}; + +/** + * Describes the message policy.AttributeNamespaceSelector. + * Use `create(AttributeNamespaceSelectorSchema)` to create a new message. + */ +export const AttributeNamespaceSelectorSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_selectors, 0); + +/** + * @generated from message policy.AttributeNamespaceSelector.AttributeSelector + */ +export type AttributeNamespaceSelector_AttributeSelector = Message<"policy.AttributeNamespaceSelector.AttributeSelector"> & { + /** + * @generated from field: bool with_key_access_grants = 1; + */ + withKeyAccessGrants: boolean; + + /** + * @generated from field: policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector with_values = 10; + */ + withValues?: AttributeNamespaceSelector_AttributeSelector_ValueSelector; +}; + +/** + * Describes the message policy.AttributeNamespaceSelector.AttributeSelector. + * Use `create(AttributeNamespaceSelector_AttributeSelectorSchema)` to create a new message. + */ +export const AttributeNamespaceSelector_AttributeSelectorSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_selectors, 0, 0); + +/** + * @generated from message policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector + */ +export type AttributeNamespaceSelector_AttributeSelector_ValueSelector = Message<"policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector"> & { + /** + * @generated from field: bool with_key_access_grants = 1; + */ + withKeyAccessGrants: boolean; + + /** + * @generated from field: bool with_subject_maps = 2; + */ + withSubjectMaps: boolean; + + /** + * @generated from field: bool with_resource_maps = 3; + */ + withResourceMaps: boolean; +}; + +/** + * Describes the message policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector. + * Use `create(AttributeNamespaceSelector_AttributeSelector_ValueSelectorSchema)` to create a new message. + */ +export const AttributeNamespaceSelector_AttributeSelector_ValueSelectorSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_selectors, 0, 0, 0); + +/** + * @generated from message policy.AttributeDefinitionSelector + */ +export type AttributeDefinitionSelector = Message<"policy.AttributeDefinitionSelector"> & { + /** + * @generated from field: bool with_key_access_grants = 1; + */ + withKeyAccessGrants: boolean; + + /** + * @generated from field: policy.AttributeDefinitionSelector.NamespaceSelector with_namespace = 10; + */ + withNamespace?: AttributeDefinitionSelector_NamespaceSelector; + + /** + * @generated from field: policy.AttributeDefinitionSelector.ValueSelector with_values = 11; + */ + withValues?: AttributeDefinitionSelector_ValueSelector; +}; + +/** + * Describes the message policy.AttributeDefinitionSelector. + * Use `create(AttributeDefinitionSelectorSchema)` to create a new message. + */ +export const AttributeDefinitionSelectorSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_selectors, 1); + +/** + * @generated from message policy.AttributeDefinitionSelector.NamespaceSelector + */ +export type AttributeDefinitionSelector_NamespaceSelector = Message<"policy.AttributeDefinitionSelector.NamespaceSelector"> & { +}; + +/** + * Describes the message policy.AttributeDefinitionSelector.NamespaceSelector. + * Use `create(AttributeDefinitionSelector_NamespaceSelectorSchema)` to create a new message. + */ +export const AttributeDefinitionSelector_NamespaceSelectorSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_selectors, 1, 0); + +/** + * @generated from message policy.AttributeDefinitionSelector.ValueSelector + */ +export type AttributeDefinitionSelector_ValueSelector = Message<"policy.AttributeDefinitionSelector.ValueSelector"> & { + /** + * @generated from field: bool with_key_access_grants = 1; + */ + withKeyAccessGrants: boolean; + + /** + * @generated from field: bool with_subject_maps = 2; + */ + withSubjectMaps: boolean; + + /** + * @generated from field: bool with_resource_maps = 3; + */ + withResourceMaps: boolean; +}; + +/** + * Describes the message policy.AttributeDefinitionSelector.ValueSelector. + * Use `create(AttributeDefinitionSelector_ValueSelectorSchema)` to create a new message. + */ +export const AttributeDefinitionSelector_ValueSelectorSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_selectors, 1, 1); + +/** + * @generated from message policy.AttributeValueSelector + */ +export type AttributeValueSelector = Message<"policy.AttributeValueSelector"> & { + /** + * @generated from field: bool with_key_access_grants = 1; + */ + withKeyAccessGrants: boolean; + + /** + * @generated from field: bool with_subject_maps = 2; + */ + withSubjectMaps: boolean; + + /** + * @generated from field: bool with_resource_maps = 3; + */ + withResourceMaps: boolean; + + /** + * @generated from field: policy.AttributeValueSelector.AttributeSelector with_attribute = 10; + */ + withAttribute?: AttributeValueSelector_AttributeSelector; +}; + +/** + * Describes the message policy.AttributeValueSelector. + * Use `create(AttributeValueSelectorSchema)` to create a new message. + */ +export const AttributeValueSelectorSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_selectors, 2); + +/** + * @generated from message policy.AttributeValueSelector.AttributeSelector + */ +export type AttributeValueSelector_AttributeSelector = Message<"policy.AttributeValueSelector.AttributeSelector"> & { + /** + * @generated from field: bool with_key_access_grants = 1; + */ + withKeyAccessGrants: boolean; + + /** + * @generated from field: policy.AttributeValueSelector.AttributeSelector.NamespaceSelector with_namespace = 10; + */ + withNamespace?: AttributeValueSelector_AttributeSelector_NamespaceSelector; +}; + +/** + * Describes the message policy.AttributeValueSelector.AttributeSelector. + * Use `create(AttributeValueSelector_AttributeSelectorSchema)` to create a new message. + */ +export const AttributeValueSelector_AttributeSelectorSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_selectors, 2, 0); + +/** + * @generated from message policy.AttributeValueSelector.AttributeSelector.NamespaceSelector + */ +export type AttributeValueSelector_AttributeSelector_NamespaceSelector = Message<"policy.AttributeValueSelector.AttributeSelector.NamespaceSelector"> & { +}; + +/** + * Describes the message policy.AttributeValueSelector.AttributeSelector.NamespaceSelector. + * Use `create(AttributeValueSelector_AttributeSelector_NamespaceSelectorSchema)` to create a new message. + */ +export const AttributeValueSelector_AttributeSelector_NamespaceSelectorSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_selectors, 2, 0, 0); + +/** + * @generated from message policy.PageRequest + */ +export type PageRequest = Message<"policy.PageRequest"> & { + /** + * Optional + * Set to configured default limit if not provided + * Maximum limit set in platform config and enforced by services + * + * @generated from field: int32 limit = 1; + */ + limit: number; + + /** + * Optional + * Defaulted if not provided + * + * @generated from field: int32 offset = 2; + */ + offset: number; +}; + +/** + * Describes the message policy.PageRequest. + * Use `create(PageRequestSchema)` to create a new message. + */ +export const PageRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_selectors, 3); + +/** + * @generated from message policy.PageResponse + */ +export type PageResponse = Message<"policy.PageResponse"> & { + /** + * Requested pagination offset + * + * @generated from field: int32 current_offset = 1; + */ + currentOffset: number; + + /** + * Calculated with request limit + offset or defaults + * Empty when none remain after current page + * + * @generated from field: int32 next_offset = 2; + */ + nextOffset: number; + + /** + * Total count of entire list + * + * @generated from field: int32 total = 3; + */ + total: number; +}; + +/** + * Describes the message policy.PageResponse. + * Use `create(PageResponseSchema)` to create a new message. + */ +export const PageResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_selectors, 4); + diff --git a/lib/src/platform/policy/subjectmapping/subject_mapping_connect.d.ts b/lib/src/platform/policy/subjectmapping/subject_mapping_connect.d.ts deleted file mode 100644 index 80e62848..00000000 --- a/lib/src/platform/policy/subjectmapping/subject_mapping_connect.d.ts +++ /dev/null @@ -1,118 +0,0 @@ -// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=js+dts,import_extension=none" -// @generated from file policy/subjectmapping/subject_mapping.proto (package policy.subjectmapping, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { CreateSubjectConditionSetRequest, CreateSubjectConditionSetResponse, CreateSubjectMappingRequest, CreateSubjectMappingResponse, DeleteSubjectConditionSetRequest, DeleteSubjectConditionSetResponse, DeleteSubjectMappingRequest, DeleteSubjectMappingResponse, GetSubjectConditionSetRequest, GetSubjectConditionSetResponse, GetSubjectMappingRequest, GetSubjectMappingResponse, ListSubjectConditionSetsRequest, ListSubjectConditionSetsResponse, ListSubjectMappingsRequest, ListSubjectMappingsResponse, MatchSubjectMappingsRequest, MatchSubjectMappingsResponse, UpdateSubjectConditionSetRequest, UpdateSubjectConditionSetResponse, UpdateSubjectMappingRequest, UpdateSubjectMappingResponse } from "./subject_mapping_pb"; -import { MethodKind } from "@bufbuild/protobuf"; - -/** - * @generated from service policy.subjectmapping.SubjectMappingService - */ -export declare const SubjectMappingService: { - readonly typeName: "policy.subjectmapping.SubjectMappingService", - readonly methods: { - /** - * Find matching Subject Mappings for a given Subject - * - * @generated from rpc policy.subjectmapping.SubjectMappingService.MatchSubjectMappings - */ - readonly matchSubjectMappings: { - readonly name: "MatchSubjectMappings", - readonly I: typeof MatchSubjectMappingsRequest, - readonly O: typeof MatchSubjectMappingsResponse, - readonly kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.subjectmapping.SubjectMappingService.ListSubjectMappings - */ - readonly listSubjectMappings: { - readonly name: "ListSubjectMappings", - readonly I: typeof ListSubjectMappingsRequest, - readonly O: typeof ListSubjectMappingsResponse, - readonly kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.subjectmapping.SubjectMappingService.GetSubjectMapping - */ - readonly getSubjectMapping: { - readonly name: "GetSubjectMapping", - readonly I: typeof GetSubjectMappingRequest, - readonly O: typeof GetSubjectMappingResponse, - readonly kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.subjectmapping.SubjectMappingService.CreateSubjectMapping - */ - readonly createSubjectMapping: { - readonly name: "CreateSubjectMapping", - readonly I: typeof CreateSubjectMappingRequest, - readonly O: typeof CreateSubjectMappingResponse, - readonly kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.subjectmapping.SubjectMappingService.UpdateSubjectMapping - */ - readonly updateSubjectMapping: { - readonly name: "UpdateSubjectMapping", - readonly I: typeof UpdateSubjectMappingRequest, - readonly O: typeof UpdateSubjectMappingResponse, - readonly kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.subjectmapping.SubjectMappingService.DeleteSubjectMapping - */ - readonly deleteSubjectMapping: { - readonly name: "DeleteSubjectMapping", - readonly I: typeof DeleteSubjectMappingRequest, - readonly O: typeof DeleteSubjectMappingResponse, - readonly kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.subjectmapping.SubjectMappingService.ListSubjectConditionSets - */ - readonly listSubjectConditionSets: { - readonly name: "ListSubjectConditionSets", - readonly I: typeof ListSubjectConditionSetsRequest, - readonly O: typeof ListSubjectConditionSetsResponse, - readonly kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.subjectmapping.SubjectMappingService.GetSubjectConditionSet - */ - readonly getSubjectConditionSet: { - readonly name: "GetSubjectConditionSet", - readonly I: typeof GetSubjectConditionSetRequest, - readonly O: typeof GetSubjectConditionSetResponse, - readonly kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.subjectmapping.SubjectMappingService.CreateSubjectConditionSet - */ - readonly createSubjectConditionSet: { - readonly name: "CreateSubjectConditionSet", - readonly I: typeof CreateSubjectConditionSetRequest, - readonly O: typeof CreateSubjectConditionSetResponse, - readonly kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.subjectmapping.SubjectMappingService.UpdateSubjectConditionSet - */ - readonly updateSubjectConditionSet: { - readonly name: "UpdateSubjectConditionSet", - readonly I: typeof UpdateSubjectConditionSetRequest, - readonly O: typeof UpdateSubjectConditionSetResponse, - readonly kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.subjectmapping.SubjectMappingService.DeleteSubjectConditionSet - */ - readonly deleteSubjectConditionSet: { - readonly name: "DeleteSubjectConditionSet", - readonly I: typeof DeleteSubjectConditionSetRequest, - readonly O: typeof DeleteSubjectConditionSetResponse, - readonly kind: MethodKind.Unary, - }, - } -}; - diff --git a/lib/src/platform/policy/subjectmapping/subject_mapping_connect.js b/lib/src/platform/policy/subjectmapping/subject_mapping_connect.js deleted file mode 100644 index 16b1e1a7..00000000 --- a/lib/src/platform/policy/subjectmapping/subject_mapping_connect.js +++ /dev/null @@ -1,118 +0,0 @@ -// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=js+dts,import_extension=none" -// @generated from file policy/subjectmapping/subject_mapping.proto (package policy.subjectmapping, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { CreateSubjectConditionSetRequest, CreateSubjectConditionSetResponse, CreateSubjectMappingRequest, CreateSubjectMappingResponse, DeleteSubjectConditionSetRequest, DeleteSubjectConditionSetResponse, DeleteSubjectMappingRequest, DeleteSubjectMappingResponse, GetSubjectConditionSetRequest, GetSubjectConditionSetResponse, GetSubjectMappingRequest, GetSubjectMappingResponse, ListSubjectConditionSetsRequest, ListSubjectConditionSetsResponse, ListSubjectMappingsRequest, ListSubjectMappingsResponse, MatchSubjectMappingsRequest, MatchSubjectMappingsResponse, UpdateSubjectConditionSetRequest, UpdateSubjectConditionSetResponse, UpdateSubjectMappingRequest, UpdateSubjectMappingResponse } from "./subject_mapping_pb"; -import { MethodKind } from "@bufbuild/protobuf"; - -/** - * @generated from service policy.subjectmapping.SubjectMappingService - */ -export const SubjectMappingService = { - typeName: "policy.subjectmapping.SubjectMappingService", - methods: { - /** - * Find matching Subject Mappings for a given Subject - * - * @generated from rpc policy.subjectmapping.SubjectMappingService.MatchSubjectMappings - */ - matchSubjectMappings: { - name: "MatchSubjectMappings", - I: MatchSubjectMappingsRequest, - O: MatchSubjectMappingsResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.subjectmapping.SubjectMappingService.ListSubjectMappings - */ - listSubjectMappings: { - name: "ListSubjectMappings", - I: ListSubjectMappingsRequest, - O: ListSubjectMappingsResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.subjectmapping.SubjectMappingService.GetSubjectMapping - */ - getSubjectMapping: { - name: "GetSubjectMapping", - I: GetSubjectMappingRequest, - O: GetSubjectMappingResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.subjectmapping.SubjectMappingService.CreateSubjectMapping - */ - createSubjectMapping: { - name: "CreateSubjectMapping", - I: CreateSubjectMappingRequest, - O: CreateSubjectMappingResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.subjectmapping.SubjectMappingService.UpdateSubjectMapping - */ - updateSubjectMapping: { - name: "UpdateSubjectMapping", - I: UpdateSubjectMappingRequest, - O: UpdateSubjectMappingResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.subjectmapping.SubjectMappingService.DeleteSubjectMapping - */ - deleteSubjectMapping: { - name: "DeleteSubjectMapping", - I: DeleteSubjectMappingRequest, - O: DeleteSubjectMappingResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.subjectmapping.SubjectMappingService.ListSubjectConditionSets - */ - listSubjectConditionSets: { - name: "ListSubjectConditionSets", - I: ListSubjectConditionSetsRequest, - O: ListSubjectConditionSetsResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.subjectmapping.SubjectMappingService.GetSubjectConditionSet - */ - getSubjectConditionSet: { - name: "GetSubjectConditionSet", - I: GetSubjectConditionSetRequest, - O: GetSubjectConditionSetResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.subjectmapping.SubjectMappingService.CreateSubjectConditionSet - */ - createSubjectConditionSet: { - name: "CreateSubjectConditionSet", - I: CreateSubjectConditionSetRequest, - O: CreateSubjectConditionSetResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.subjectmapping.SubjectMappingService.UpdateSubjectConditionSet - */ - updateSubjectConditionSet: { - name: "UpdateSubjectConditionSet", - I: UpdateSubjectConditionSetRequest, - O: UpdateSubjectConditionSetResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc policy.subjectmapping.SubjectMappingService.DeleteSubjectConditionSet - */ - deleteSubjectConditionSet: { - name: "DeleteSubjectConditionSet", - I: DeleteSubjectConditionSetRequest, - O: DeleteSubjectConditionSetResponse, - kind: MethodKind.Unary, - }, - } -}; - diff --git a/lib/src/platform/policy/subjectmapping/subject_mapping_pb.d.ts b/lib/src/platform/policy/subjectmapping/subject_mapping_pb.d.ts deleted file mode 100644 index 1ca84a83..00000000 --- a/lib/src/platform/policy/subjectmapping/subject_mapping_pb.d.ts +++ /dev/null @@ -1,672 +0,0 @@ -// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" -// @generated from file policy/subjectmapping/subject_mapping.proto (package policy.subjectmapping, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3 } from "@bufbuild/protobuf"; -import type { Action, SubjectConditionSet, SubjectMapping, SubjectProperty, SubjectSet } from "../objects_pb"; -import type { MetadataMutable, MetadataUpdateEnum } from "../../common/common_pb"; - -/** - * MatchSubjectMappingsRequest liberally returns a list of SubjectMappings based on the provided SubjectProperties. The SubjectMappings are returned - * if there is any single condition found among the structures that matches for one of the provided properties: - * 1. The external selector value, external value, and an IN operator - * 2. The external selector value, _no_ external value, and a NOT_IN operator - * - * Without this filtering, if a selector value was something like '.emailAddress' or '.username', every Subject is probably going to relate to that mapping - * in some way or another, potentially matching every single attribute in the DB if a policy admin has relied heavily on that field. There is no - * logic applied beyond a single condition within the query to avoid business logic interpreting the supplied conditions beyond the bare minimum - * initial filter. - * - * NOTE: if you have any issues, debug logs are available within the service to help identify why a mapping was or was not returned. - * - * @generated from message policy.subjectmapping.MatchSubjectMappingsRequest - */ -export declare class MatchSubjectMappingsRequest extends Message { - /** - * @generated from field: repeated policy.SubjectProperty subject_properties = 1; - */ - subjectProperties: SubjectProperty[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.subjectmapping.MatchSubjectMappingsRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): MatchSubjectMappingsRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): MatchSubjectMappingsRequest; - - static fromJsonString(jsonString: string, options?: Partial): MatchSubjectMappingsRequest; - - static equals(a: MatchSubjectMappingsRequest | PlainMessage | undefined, b: MatchSubjectMappingsRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.subjectmapping.MatchSubjectMappingsResponse - */ -export declare class MatchSubjectMappingsResponse extends Message { - /** - * @generated from field: repeated policy.SubjectMapping subject_mappings = 1; - */ - subjectMappings: SubjectMapping[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.subjectmapping.MatchSubjectMappingsResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): MatchSubjectMappingsResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): MatchSubjectMappingsResponse; - - static fromJsonString(jsonString: string, options?: Partial): MatchSubjectMappingsResponse; - - static equals(a: MatchSubjectMappingsResponse | PlainMessage | undefined, b: MatchSubjectMappingsResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.subjectmapping.GetSubjectMappingRequest - */ -export declare class GetSubjectMappingRequest extends Message { - /** - * @generated from field: string id = 1; - */ - id: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.subjectmapping.GetSubjectMappingRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetSubjectMappingRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetSubjectMappingRequest; - - static fromJsonString(jsonString: string, options?: Partial): GetSubjectMappingRequest; - - static equals(a: GetSubjectMappingRequest | PlainMessage | undefined, b: GetSubjectMappingRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.subjectmapping.GetSubjectMappingResponse - */ -export declare class GetSubjectMappingResponse extends Message { - /** - * @generated from field: policy.SubjectMapping subject_mapping = 1; - */ - subjectMapping?: SubjectMapping; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.subjectmapping.GetSubjectMappingResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetSubjectMappingResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetSubjectMappingResponse; - - static fromJsonString(jsonString: string, options?: Partial): GetSubjectMappingResponse; - - static equals(a: GetSubjectMappingResponse | PlainMessage | undefined, b: GetSubjectMappingResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.subjectmapping.ListSubjectMappingsRequest - */ -export declare class ListSubjectMappingsRequest extends Message { - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.subjectmapping.ListSubjectMappingsRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): ListSubjectMappingsRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): ListSubjectMappingsRequest; - - static fromJsonString(jsonString: string, options?: Partial): ListSubjectMappingsRequest; - - static equals(a: ListSubjectMappingsRequest | PlainMessage | undefined, b: ListSubjectMappingsRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.subjectmapping.ListSubjectMappingsResponse - */ -export declare class ListSubjectMappingsResponse extends Message { - /** - * @generated from field: repeated policy.SubjectMapping subject_mappings = 1; - */ - subjectMappings: SubjectMapping[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.subjectmapping.ListSubjectMappingsResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): ListSubjectMappingsResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): ListSubjectMappingsResponse; - - static fromJsonString(jsonString: string, options?: Partial): ListSubjectMappingsResponse; - - static equals(a: ListSubjectMappingsResponse | PlainMessage | undefined, b: ListSubjectMappingsResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.subjectmapping.CreateSubjectMappingRequest - */ -export declare class CreateSubjectMappingRequest extends Message { - /** - * Required - * Attribute Value to be mapped to - * - * @generated from field: string attribute_value_id = 1; - */ - attributeValueId: string; - - /** - * The actions permitted by subjects in this mapping - * - * @generated from field: repeated policy.Action actions = 2; - */ - actions: Action[]; - - /** - * Either of the following: - * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set) - * - * @generated from field: string existing_subject_condition_set_id = 3; - */ - existingSubjectConditionSetId: string; - - /** - * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided) - * - * @generated from field: policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4; - */ - newSubjectConditionSet?: SubjectConditionSetCreate; - - /** - * Optional - * - * @generated from field: common.MetadataMutable metadata = 100; - */ - metadata?: MetadataMutable; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.subjectmapping.CreateSubjectMappingRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateSubjectMappingRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateSubjectMappingRequest; - - static fromJsonString(jsonString: string, options?: Partial): CreateSubjectMappingRequest; - - static equals(a: CreateSubjectMappingRequest | PlainMessage | undefined, b: CreateSubjectMappingRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.subjectmapping.CreateSubjectMappingResponse - */ -export declare class CreateSubjectMappingResponse extends Message { - /** - * @generated from field: policy.SubjectMapping subject_mapping = 1; - */ - subjectMapping?: SubjectMapping; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.subjectmapping.CreateSubjectMappingResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateSubjectMappingResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateSubjectMappingResponse; - - static fromJsonString(jsonString: string, options?: Partial): CreateSubjectMappingResponse; - - static equals(a: CreateSubjectMappingResponse | PlainMessage | undefined, b: CreateSubjectMappingResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.subjectmapping.UpdateSubjectMappingRequest - */ -export declare class UpdateSubjectMappingRequest extends Message { - /** - * Required - * - * @generated from field: string id = 1; - */ - id: string; - - /** - * Optional - * Replaces the existing SubjectConditionSet id with a new one - * - * @generated from field: string subject_condition_set_id = 2; - */ - subjectConditionSetId: string; - - /** - * Replaces entire list of actions permitted by subjects - * - * @generated from field: repeated policy.Action actions = 3; - */ - actions: Action[]; - - /** - * Common metadata - * - * @generated from field: common.MetadataMutable metadata = 100; - */ - metadata?: MetadataMutable; - - /** - * @generated from field: common.MetadataUpdateEnum metadata_update_behavior = 101; - */ - metadataUpdateBehavior: MetadataUpdateEnum; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.subjectmapping.UpdateSubjectMappingRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): UpdateSubjectMappingRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): UpdateSubjectMappingRequest; - - static fromJsonString(jsonString: string, options?: Partial): UpdateSubjectMappingRequest; - - static equals(a: UpdateSubjectMappingRequest | PlainMessage | undefined, b: UpdateSubjectMappingRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.subjectmapping.UpdateSubjectMappingResponse - */ -export declare class UpdateSubjectMappingResponse extends Message { - /** - * Only ID of the updated Subject Mapping provided - * - * @generated from field: policy.SubjectMapping subject_mapping = 1; - */ - subjectMapping?: SubjectMapping; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.subjectmapping.UpdateSubjectMappingResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): UpdateSubjectMappingResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): UpdateSubjectMappingResponse; - - static fromJsonString(jsonString: string, options?: Partial): UpdateSubjectMappingResponse; - - static equals(a: UpdateSubjectMappingResponse | PlainMessage | undefined, b: UpdateSubjectMappingResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.subjectmapping.DeleteSubjectMappingRequest - */ -export declare class DeleteSubjectMappingRequest extends Message { - /** - * @generated from field: string id = 1; - */ - id: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.subjectmapping.DeleteSubjectMappingRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): DeleteSubjectMappingRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): DeleteSubjectMappingRequest; - - static fromJsonString(jsonString: string, options?: Partial): DeleteSubjectMappingRequest; - - static equals(a: DeleteSubjectMappingRequest | PlainMessage | undefined, b: DeleteSubjectMappingRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.subjectmapping.DeleteSubjectMappingResponse - */ -export declare class DeleteSubjectMappingResponse extends Message { - /** - * Only ID of the updated Subject Mapping provided - * - * @generated from field: policy.SubjectMapping subject_mapping = 1; - */ - subjectMapping?: SubjectMapping; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.subjectmapping.DeleteSubjectMappingResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): DeleteSubjectMappingResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): DeleteSubjectMappingResponse; - - static fromJsonString(jsonString: string, options?: Partial): DeleteSubjectMappingResponse; - - static equals(a: DeleteSubjectMappingResponse | PlainMessage | undefined, b: DeleteSubjectMappingResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.subjectmapping.GetSubjectConditionSetRequest - */ -export declare class GetSubjectConditionSetRequest extends Message { - /** - * @generated from field: string id = 1; - */ - id: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.subjectmapping.GetSubjectConditionSetRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetSubjectConditionSetRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetSubjectConditionSetRequest; - - static fromJsonString(jsonString: string, options?: Partial): GetSubjectConditionSetRequest; - - static equals(a: GetSubjectConditionSetRequest | PlainMessage | undefined, b: GetSubjectConditionSetRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.subjectmapping.GetSubjectConditionSetResponse - */ -export declare class GetSubjectConditionSetResponse extends Message { - /** - * @generated from field: policy.SubjectConditionSet subject_condition_set = 1; - */ - subjectConditionSet?: SubjectConditionSet; - - /** - * contextualized Subject Mappings associated with this SubjectConditionSet - * - * @generated from field: repeated policy.SubjectMapping associated_subject_mappings = 2; - */ - associatedSubjectMappings: SubjectMapping[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.subjectmapping.GetSubjectConditionSetResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetSubjectConditionSetResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetSubjectConditionSetResponse; - - static fromJsonString(jsonString: string, options?: Partial): GetSubjectConditionSetResponse; - - static equals(a: GetSubjectConditionSetResponse | PlainMessage | undefined, b: GetSubjectConditionSetResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.subjectmapping.ListSubjectConditionSetsRequest - */ -export declare class ListSubjectConditionSetsRequest extends Message { - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.subjectmapping.ListSubjectConditionSetsRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): ListSubjectConditionSetsRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): ListSubjectConditionSetsRequest; - - static fromJsonString(jsonString: string, options?: Partial): ListSubjectConditionSetsRequest; - - static equals(a: ListSubjectConditionSetsRequest | PlainMessage | undefined, b: ListSubjectConditionSetsRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.subjectmapping.ListSubjectConditionSetsResponse - */ -export declare class ListSubjectConditionSetsResponse extends Message { - /** - * @generated from field: repeated policy.SubjectConditionSet subject_condition_sets = 1; - */ - subjectConditionSets: SubjectConditionSet[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.subjectmapping.ListSubjectConditionSetsResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): ListSubjectConditionSetsResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): ListSubjectConditionSetsResponse; - - static fromJsonString(jsonString: string, options?: Partial): ListSubjectConditionSetsResponse; - - static equals(a: ListSubjectConditionSetsResponse | PlainMessage | undefined, b: ListSubjectConditionSetsResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.subjectmapping.SubjectConditionSetCreate - */ -export declare class SubjectConditionSetCreate extends Message { - /** - * Required - * - * @generated from field: repeated policy.SubjectSet subject_sets = 1; - */ - subjectSets: SubjectSet[]; - - /** - * Optional - * Common metadata - * - * @generated from field: common.MetadataMutable metadata = 100; - */ - metadata?: MetadataMutable; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.subjectmapping.SubjectConditionSetCreate"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): SubjectConditionSetCreate; - - static fromJson(jsonValue: JsonValue, options?: Partial): SubjectConditionSetCreate; - - static fromJsonString(jsonString: string, options?: Partial): SubjectConditionSetCreate; - - static equals(a: SubjectConditionSetCreate | PlainMessage | undefined, b: SubjectConditionSetCreate | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.subjectmapping.CreateSubjectConditionSetRequest - */ -export declare class CreateSubjectConditionSetRequest extends Message { - /** - * @generated from field: policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1; - */ - subjectConditionSet?: SubjectConditionSetCreate; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.subjectmapping.CreateSubjectConditionSetRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateSubjectConditionSetRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateSubjectConditionSetRequest; - - static fromJsonString(jsonString: string, options?: Partial): CreateSubjectConditionSetRequest; - - static equals(a: CreateSubjectConditionSetRequest | PlainMessage | undefined, b: CreateSubjectConditionSetRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.subjectmapping.CreateSubjectConditionSetResponse - */ -export declare class CreateSubjectConditionSetResponse extends Message { - /** - * @generated from field: policy.SubjectConditionSet subject_condition_set = 1; - */ - subjectConditionSet?: SubjectConditionSet; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.subjectmapping.CreateSubjectConditionSetResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateSubjectConditionSetResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateSubjectConditionSetResponse; - - static fromJsonString(jsonString: string, options?: Partial): CreateSubjectConditionSetResponse; - - static equals(a: CreateSubjectConditionSetResponse | PlainMessage | undefined, b: CreateSubjectConditionSetResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.subjectmapping.UpdateSubjectConditionSetRequest - */ -export declare class UpdateSubjectConditionSetRequest extends Message { - /** - * Required - * - * @generated from field: string id = 1; - */ - id: string; - - /** - * Optional - * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions - * - * @generated from field: repeated policy.SubjectSet subject_sets = 2; - */ - subjectSets: SubjectSet[]; - - /** - * Common metadata - * - * @generated from field: common.MetadataMutable metadata = 100; - */ - metadata?: MetadataMutable; - - /** - * @generated from field: common.MetadataUpdateEnum metadata_update_behavior = 101; - */ - metadataUpdateBehavior: MetadataUpdateEnum; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.subjectmapping.UpdateSubjectConditionSetRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): UpdateSubjectConditionSetRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): UpdateSubjectConditionSetRequest; - - static fromJsonString(jsonString: string, options?: Partial): UpdateSubjectConditionSetRequest; - - static equals(a: UpdateSubjectConditionSetRequest | PlainMessage | undefined, b: UpdateSubjectConditionSetRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.subjectmapping.UpdateSubjectConditionSetResponse - */ -export declare class UpdateSubjectConditionSetResponse extends Message { - /** - * Only ID of updated Subject Condition Set provided - * - * @generated from field: policy.SubjectConditionSet subject_condition_set = 1; - */ - subjectConditionSet?: SubjectConditionSet; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.subjectmapping.UpdateSubjectConditionSetResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): UpdateSubjectConditionSetResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): UpdateSubjectConditionSetResponse; - - static fromJsonString(jsonString: string, options?: Partial): UpdateSubjectConditionSetResponse; - - static equals(a: UpdateSubjectConditionSetResponse | PlainMessage | undefined, b: UpdateSubjectConditionSetResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.subjectmapping.DeleteSubjectConditionSetRequest - */ -export declare class DeleteSubjectConditionSetRequest extends Message { - /** - * @generated from field: string id = 1; - */ - id: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.subjectmapping.DeleteSubjectConditionSetRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): DeleteSubjectConditionSetRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): DeleteSubjectConditionSetRequest; - - static fromJsonString(jsonString: string, options?: Partial): DeleteSubjectConditionSetRequest; - - static equals(a: DeleteSubjectConditionSetRequest | PlainMessage | undefined, b: DeleteSubjectConditionSetRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message policy.subjectmapping.DeleteSubjectConditionSetResponse - */ -export declare class DeleteSubjectConditionSetResponse extends Message { - /** - * Only ID of deleted Subject Condition Set provided - * - * @generated from field: policy.SubjectConditionSet subject_condition_set = 1; - */ - subjectConditionSet?: SubjectConditionSet; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "policy.subjectmapping.DeleteSubjectConditionSetResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): DeleteSubjectConditionSetResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): DeleteSubjectConditionSetResponse; - - static fromJsonString(jsonString: string, options?: Partial): DeleteSubjectConditionSetResponse; - - static equals(a: DeleteSubjectConditionSetResponse | PlainMessage | undefined, b: DeleteSubjectConditionSetResponse | PlainMessage | undefined): boolean; -} - diff --git a/lib/src/platform/policy/subjectmapping/subject_mapping_pb.js b/lib/src/platform/policy/subjectmapping/subject_mapping_pb.js deleted file mode 100644 index a039063d..00000000 --- a/lib/src/platform/policy/subjectmapping/subject_mapping_pb.js +++ /dev/null @@ -1,260 +0,0 @@ -// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" -// @generated from file policy/subjectmapping/subject_mapping.proto (package policy.subjectmapping, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { proto3 } from "@bufbuild/protobuf"; -import { Action, SubjectConditionSet, SubjectMapping, SubjectProperty, SubjectSet } from "../objects_pb"; -import { MetadataMutable, MetadataUpdateEnum } from "../../common/common_pb"; - -/** - * MatchSubjectMappingsRequest liberally returns a list of SubjectMappings based on the provided SubjectProperties. The SubjectMappings are returned - * if there is any single condition found among the structures that matches for one of the provided properties: - * 1. The external selector value, external value, and an IN operator - * 2. The external selector value, _no_ external value, and a NOT_IN operator - * - * Without this filtering, if a selector value was something like '.emailAddress' or '.username', every Subject is probably going to relate to that mapping - * in some way or another, potentially matching every single attribute in the DB if a policy admin has relied heavily on that field. There is no - * logic applied beyond a single condition within the query to avoid business logic interpreting the supplied conditions beyond the bare minimum - * initial filter. - * - * NOTE: if you have any issues, debug logs are available within the service to help identify why a mapping was or was not returned. - * - * @generated from message policy.subjectmapping.MatchSubjectMappingsRequest - */ -export const MatchSubjectMappingsRequest = /*@__PURE__*/ proto3.makeMessageType( - "policy.subjectmapping.MatchSubjectMappingsRequest", - () => [ - { no: 1, name: "subject_properties", kind: "message", T: SubjectProperty, repeated: true }, - ], -); - -/** - * @generated from message policy.subjectmapping.MatchSubjectMappingsResponse - */ -export const MatchSubjectMappingsResponse = /*@__PURE__*/ proto3.makeMessageType( - "policy.subjectmapping.MatchSubjectMappingsResponse", - () => [ - { no: 1, name: "subject_mappings", kind: "message", T: SubjectMapping, repeated: true }, - ], -); - -/** - * @generated from message policy.subjectmapping.GetSubjectMappingRequest - */ -export const GetSubjectMappingRequest = /*@__PURE__*/ proto3.makeMessageType( - "policy.subjectmapping.GetSubjectMappingRequest", - () => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message policy.subjectmapping.GetSubjectMappingResponse - */ -export const GetSubjectMappingResponse = /*@__PURE__*/ proto3.makeMessageType( - "policy.subjectmapping.GetSubjectMappingResponse", - () => [ - { no: 1, name: "subject_mapping", kind: "message", T: SubjectMapping }, - ], -); - -/** - * @generated from message policy.subjectmapping.ListSubjectMappingsRequest - */ -export const ListSubjectMappingsRequest = /*@__PURE__*/ proto3.makeMessageType( - "policy.subjectmapping.ListSubjectMappingsRequest", - [], -); - -/** - * @generated from message policy.subjectmapping.ListSubjectMappingsResponse - */ -export const ListSubjectMappingsResponse = /*@__PURE__*/ proto3.makeMessageType( - "policy.subjectmapping.ListSubjectMappingsResponse", - () => [ - { no: 1, name: "subject_mappings", kind: "message", T: SubjectMapping, repeated: true }, - ], -); - -/** - * @generated from message policy.subjectmapping.CreateSubjectMappingRequest - */ -export const CreateSubjectMappingRequest = /*@__PURE__*/ proto3.makeMessageType( - "policy.subjectmapping.CreateSubjectMappingRequest", - () => [ - { no: 1, name: "attribute_value_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "actions", kind: "message", T: Action, repeated: true }, - { no: 3, name: "existing_subject_condition_set_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "new_subject_condition_set", kind: "message", T: SubjectConditionSetCreate }, - { no: 100, name: "metadata", kind: "message", T: MetadataMutable }, - ], -); - -/** - * @generated from message policy.subjectmapping.CreateSubjectMappingResponse - */ -export const CreateSubjectMappingResponse = /*@__PURE__*/ proto3.makeMessageType( - "policy.subjectmapping.CreateSubjectMappingResponse", - () => [ - { no: 1, name: "subject_mapping", kind: "message", T: SubjectMapping }, - ], -); - -/** - * @generated from message policy.subjectmapping.UpdateSubjectMappingRequest - */ -export const UpdateSubjectMappingRequest = /*@__PURE__*/ proto3.makeMessageType( - "policy.subjectmapping.UpdateSubjectMappingRequest", - () => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "subject_condition_set_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "actions", kind: "message", T: Action, repeated: true }, - { no: 100, name: "metadata", kind: "message", T: MetadataMutable }, - { no: 101, name: "metadata_update_behavior", kind: "enum", T: proto3.getEnumType(MetadataUpdateEnum) }, - ], -); - -/** - * @generated from message policy.subjectmapping.UpdateSubjectMappingResponse - */ -export const UpdateSubjectMappingResponse = /*@__PURE__*/ proto3.makeMessageType( - "policy.subjectmapping.UpdateSubjectMappingResponse", - () => [ - { no: 1, name: "subject_mapping", kind: "message", T: SubjectMapping }, - ], -); - -/** - * @generated from message policy.subjectmapping.DeleteSubjectMappingRequest - */ -export const DeleteSubjectMappingRequest = /*@__PURE__*/ proto3.makeMessageType( - "policy.subjectmapping.DeleteSubjectMappingRequest", - () => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message policy.subjectmapping.DeleteSubjectMappingResponse - */ -export const DeleteSubjectMappingResponse = /*@__PURE__*/ proto3.makeMessageType( - "policy.subjectmapping.DeleteSubjectMappingResponse", - () => [ - { no: 1, name: "subject_mapping", kind: "message", T: SubjectMapping }, - ], -); - -/** - * @generated from message policy.subjectmapping.GetSubjectConditionSetRequest - */ -export const GetSubjectConditionSetRequest = /*@__PURE__*/ proto3.makeMessageType( - "policy.subjectmapping.GetSubjectConditionSetRequest", - () => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message policy.subjectmapping.GetSubjectConditionSetResponse - */ -export const GetSubjectConditionSetResponse = /*@__PURE__*/ proto3.makeMessageType( - "policy.subjectmapping.GetSubjectConditionSetResponse", - () => [ - { no: 1, name: "subject_condition_set", kind: "message", T: SubjectConditionSet }, - { no: 2, name: "associated_subject_mappings", kind: "message", T: SubjectMapping, repeated: true }, - ], -); - -/** - * @generated from message policy.subjectmapping.ListSubjectConditionSetsRequest - */ -export const ListSubjectConditionSetsRequest = /*@__PURE__*/ proto3.makeMessageType( - "policy.subjectmapping.ListSubjectConditionSetsRequest", - [], -); - -/** - * @generated from message policy.subjectmapping.ListSubjectConditionSetsResponse - */ -export const ListSubjectConditionSetsResponse = /*@__PURE__*/ proto3.makeMessageType( - "policy.subjectmapping.ListSubjectConditionSetsResponse", - () => [ - { no: 1, name: "subject_condition_sets", kind: "message", T: SubjectConditionSet, repeated: true }, - ], -); - -/** - * @generated from message policy.subjectmapping.SubjectConditionSetCreate - */ -export const SubjectConditionSetCreate = /*@__PURE__*/ proto3.makeMessageType( - "policy.subjectmapping.SubjectConditionSetCreate", - () => [ - { no: 1, name: "subject_sets", kind: "message", T: SubjectSet, repeated: true }, - { no: 100, name: "metadata", kind: "message", T: MetadataMutable }, - ], -); - -/** - * @generated from message policy.subjectmapping.CreateSubjectConditionSetRequest - */ -export const CreateSubjectConditionSetRequest = /*@__PURE__*/ proto3.makeMessageType( - "policy.subjectmapping.CreateSubjectConditionSetRequest", - () => [ - { no: 1, name: "subject_condition_set", kind: "message", T: SubjectConditionSetCreate }, - ], -); - -/** - * @generated from message policy.subjectmapping.CreateSubjectConditionSetResponse - */ -export const CreateSubjectConditionSetResponse = /*@__PURE__*/ proto3.makeMessageType( - "policy.subjectmapping.CreateSubjectConditionSetResponse", - () => [ - { no: 1, name: "subject_condition_set", kind: "message", T: SubjectConditionSet }, - ], -); - -/** - * @generated from message policy.subjectmapping.UpdateSubjectConditionSetRequest - */ -export const UpdateSubjectConditionSetRequest = /*@__PURE__*/ proto3.makeMessageType( - "policy.subjectmapping.UpdateSubjectConditionSetRequest", - () => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "subject_sets", kind: "message", T: SubjectSet, repeated: true }, - { no: 100, name: "metadata", kind: "message", T: MetadataMutable }, - { no: 101, name: "metadata_update_behavior", kind: "enum", T: proto3.getEnumType(MetadataUpdateEnum) }, - ], -); - -/** - * @generated from message policy.subjectmapping.UpdateSubjectConditionSetResponse - */ -export const UpdateSubjectConditionSetResponse = /*@__PURE__*/ proto3.makeMessageType( - "policy.subjectmapping.UpdateSubjectConditionSetResponse", - () => [ - { no: 1, name: "subject_condition_set", kind: "message", T: SubjectConditionSet }, - ], -); - -/** - * @generated from message policy.subjectmapping.DeleteSubjectConditionSetRequest - */ -export const DeleteSubjectConditionSetRequest = /*@__PURE__*/ proto3.makeMessageType( - "policy.subjectmapping.DeleteSubjectConditionSetRequest", - () => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message policy.subjectmapping.DeleteSubjectConditionSetResponse - */ -export const DeleteSubjectConditionSetResponse = /*@__PURE__*/ proto3.makeMessageType( - "policy.subjectmapping.DeleteSubjectConditionSetResponse", - () => [ - { no: 1, name: "subject_condition_set", kind: "message", T: SubjectConditionSet }, - ], -); - diff --git a/lib/src/platform/policy/subjectmapping/subject_mapping_pb.ts b/lib/src/platform/policy/subjectmapping/subject_mapping_pb.ts new file mode 100644 index 00000000..6a0bfa2d --- /dev/null +++ b/lib/src/platform/policy/subjectmapping/subject_mapping_pb.ts @@ -0,0 +1,687 @@ +// @generated by protoc-gen-es v2.2.5 with parameter "target=ts,import_extension=.js" +// @generated from file policy/subjectmapping/subject_mapping.proto (package policy.subjectmapping, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1"; +import { file_buf_validate_validate } from "../../buf/validate/validate_pb.js"; +import { file_google_api_annotations } from "../../google/api/annotations_pb.js"; +import type { MetadataMutable, MetadataUpdateEnum } from "../../common/common_pb.js"; +import { file_common_common } from "../../common/common_pb.js"; +import type { Action, SubjectConditionSet, SubjectMapping, SubjectProperty, SubjectSet } from "../objects_pb.js"; +import { file_policy_objects } from "../objects_pb.js"; +import type { PageRequest, PageResponse } from "../selectors_pb.js"; +import { file_policy_selectors } from "../selectors_pb.js"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file policy/subjectmapping/subject_mapping.proto. + */ +export const file_policy_subjectmapping_subject_mapping: GenFile = /*@__PURE__*/ + fileDesc("Citwb2xpY3kvc3ViamVjdG1hcHBpbmcvc3ViamVjdF9tYXBwaW5nLnByb3RvEhVwb2xpY3kuc3ViamVjdG1hcHBpbmciXAobTWF0Y2hTdWJqZWN0TWFwcGluZ3NSZXF1ZXN0Ej0KEnN1YmplY3RfcHJvcGVydGllcxgBIAMoCzIXLnBvbGljeS5TdWJqZWN0UHJvcGVydHlCCLpIBZIBAggBIlAKHE1hdGNoU3ViamVjdE1hcHBpbmdzUmVzcG9uc2USMAoQc3ViamVjdF9tYXBwaW5ncxgBIAMoCzIWLnBvbGljeS5TdWJqZWN0TWFwcGluZyIwChhHZXRTdWJqZWN0TWFwcGluZ1JlcXVlc3QSFAoCaWQYASABKAlCCLpIBXIDsAEBIkwKGUdldFN1YmplY3RNYXBwaW5nUmVzcG9uc2USLwoPc3ViamVjdF9tYXBwaW5nGAEgASgLMhYucG9saWN5LlN1YmplY3RNYXBwaW5nIkUKGkxpc3RTdWJqZWN0TWFwcGluZ3NSZXF1ZXN0EicKCnBhZ2luYXRpb24YCiABKAsyEy5wb2xpY3kuUGFnZVJlcXVlc3QieQobTGlzdFN1YmplY3RNYXBwaW5nc1Jlc3BvbnNlEjAKEHN1YmplY3RfbWFwcGluZ3MYASADKAsyFi5wb2xpY3kuU3ViamVjdE1hcHBpbmcSKAoKcGFnaW5hdGlvbhgKIAEoCzIULnBvbGljeS5QYWdlUmVzcG9uc2Ui0AMKG0NyZWF0ZVN1YmplY3RNYXBwaW5nUmVxdWVzdBIkChJhdHRyaWJ1dGVfdmFsdWVfaWQYASABKAlCCLpIBXIDsAEB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XRpb25TZXQSNy5wb2xpY3kuc3ViamVjdG1hcHBpbmcuVXBkYXRlU3ViamVjdENvbmRpdGlvblNldFJlcXVlc3QaOC5wb2xpY3kuc3ViamVjdG1hcHBpbmcuVXBkYXRlU3ViamVjdENvbmRpdGlvblNldFJlc3BvbnNlIieC0+STAiE6ASoyHC9zdWJqZWN0LWNvbmRpdGlvbi1zZXRzL3tpZH0StAEKGURlbGV0ZVN1YmplY3RDb25kaXRpb25TZXQSNy5wb2xpY3kuc3ViamVjdG1hcHBpbmcuRGVsZXRlU3ViamVjdENvbmRpdGlvblNldFJlcXVlc3QaOC5wb2xpY3kuc3ViamVjdG1hcHBpbmcuRGVsZXRlU3ViamVjdENvbmRpdGlvblNldFJlc3BvbnNlIiSC0+STAh4qHC9zdWJqZWN0LWNvbmRpdGlvbi1zZXRzL3tpZH0S3AEKJURlbGV0ZUFsbFVubWFwcGVkU3ViamVjdENvbmRpdGlvblNldHMSQy5wb2xpY3kuc3ViamVjdG1hcHBpbmcuRGVsZXRlQWxsVW5tYXBwZWRTdWJqZWN0Q29uZGl0aW9uU2V0c1JlcXVlc3QaRC5wb2xpY3kuc3ViamVjdG1hcHBpbmcuRGVsZXRlQWxsVW5tYXBwZWRTdWJqZWN0Q29uZGl0aW9uU2V0c1Jlc3BvbnNlIiiC0+STAiIqIC9zdWJqZWN0LWNvbmRpdGlvbi1zZXRzL3VubWFwcGVkYgZwcm90bzM", [file_buf_validate_validate, file_google_api_annotations, file_common_common, file_policy_objects, file_policy_selectors]); + +/** + * MatchSubjectMappingsRequest liberally returns a list of SubjectMappings based on the provided SubjectProperties. + * The SubjectMappings are returned if an external selector field matches. + * + * @generated from message policy.subjectmapping.MatchSubjectMappingsRequest + */ +export type MatchSubjectMappingsRequest = Message<"policy.subjectmapping.MatchSubjectMappingsRequest"> & { + /** + * @generated from field: repeated policy.SubjectProperty subject_properties = 1; + */ + subjectProperties: SubjectProperty[]; +}; + +/** + * Describes the message policy.subjectmapping.MatchSubjectMappingsRequest. + * Use `create(MatchSubjectMappingsRequestSchema)` to create a new message. + */ +export const MatchSubjectMappingsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_subjectmapping_subject_mapping, 0); + +/** + * @generated from message policy.subjectmapping.MatchSubjectMappingsResponse + */ +export type MatchSubjectMappingsResponse = Message<"policy.subjectmapping.MatchSubjectMappingsResponse"> & { + /** + * @generated from field: repeated policy.SubjectMapping subject_mappings = 1; + */ + subjectMappings: SubjectMapping[]; +}; + +/** + * Describes the message policy.subjectmapping.MatchSubjectMappingsResponse. + * Use `create(MatchSubjectMappingsResponseSchema)` to create a new message. + */ +export const MatchSubjectMappingsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_subjectmapping_subject_mapping, 1); + +/** + * @generated from message policy.subjectmapping.GetSubjectMappingRequest + */ +export type GetSubjectMappingRequest = Message<"policy.subjectmapping.GetSubjectMappingRequest"> & { + /** + * Required + * + * @generated from field: string id = 1; + */ + id: string; +}; + +/** + * Describes the message policy.subjectmapping.GetSubjectMappingRequest. + * Use `create(GetSubjectMappingRequestSchema)` to create a new message. + */ +export const GetSubjectMappingRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_subjectmapping_subject_mapping, 2); + +/** + * @generated from message policy.subjectmapping.GetSubjectMappingResponse + */ +export type GetSubjectMappingResponse = Message<"policy.subjectmapping.GetSubjectMappingResponse"> & { + /** + * @generated from field: policy.SubjectMapping subject_mapping = 1; + */ + subjectMapping?: SubjectMapping; +}; + +/** + * Describes the message policy.subjectmapping.GetSubjectMappingResponse. + * Use `create(GetSubjectMappingResponseSchema)` to create a new message. + */ +export const GetSubjectMappingResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_subjectmapping_subject_mapping, 3); + +/** + * @generated from message policy.subjectmapping.ListSubjectMappingsRequest + */ +export type ListSubjectMappingsRequest = Message<"policy.subjectmapping.ListSubjectMappingsRequest"> & { + /** + * Optional + * + * @generated from field: policy.PageRequest pagination = 10; + */ + pagination?: PageRequest; +}; + +/** + * Describes the message policy.subjectmapping.ListSubjectMappingsRequest. + * Use `create(ListSubjectMappingsRequestSchema)` to create a new message. + */ +export const ListSubjectMappingsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_subjectmapping_subject_mapping, 4); + +/** + * @generated from message policy.subjectmapping.ListSubjectMappingsResponse + */ +export type ListSubjectMappingsResponse = Message<"policy.subjectmapping.ListSubjectMappingsResponse"> & { + /** + * @generated from field: repeated policy.SubjectMapping subject_mappings = 1; + */ + subjectMappings: SubjectMapping[]; + + /** + * @generated from field: policy.PageResponse pagination = 10; + */ + pagination?: PageResponse; +}; + +/** + * Describes the message policy.subjectmapping.ListSubjectMappingsResponse. + * Use `create(ListSubjectMappingsResponseSchema)` to create a new message. + */ +export const ListSubjectMappingsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_subjectmapping_subject_mapping, 5); + +/** + * @generated from message policy.subjectmapping.CreateSubjectMappingRequest + */ +export type CreateSubjectMappingRequest = Message<"policy.subjectmapping.CreateSubjectMappingRequest"> & { + /** + * Required + * Attribute Value to be mapped to + * + * @generated from field: string attribute_value_id = 1; + */ + attributeValueId: string; + + /** + * Required + * The actions permitted by subjects in this mapping + * + * @generated from field: repeated policy.Action actions = 2; + */ + actions: Action[]; + + /** + * Either of the following: + * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set) + * + * @generated from field: string existing_subject_condition_set_id = 3; + */ + existingSubjectConditionSetId: string; + + /** + * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided) + * + * @generated from field: policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4; + */ + newSubjectConditionSet?: SubjectConditionSetCreate; + + /** + * Optional + * + * @generated from field: common.MetadataMutable metadata = 100; + */ + metadata?: MetadataMutable; +}; + +/** + * Describes the message policy.subjectmapping.CreateSubjectMappingRequest. + * Use `create(CreateSubjectMappingRequestSchema)` to create a new message. + */ +export const CreateSubjectMappingRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_subjectmapping_subject_mapping, 6); + +/** + * @generated from message policy.subjectmapping.CreateSubjectMappingResponse + */ +export type CreateSubjectMappingResponse = Message<"policy.subjectmapping.CreateSubjectMappingResponse"> & { + /** + * @generated from field: policy.SubjectMapping subject_mapping = 1; + */ + subjectMapping?: SubjectMapping; +}; + +/** + * Describes the message policy.subjectmapping.CreateSubjectMappingResponse. + * Use `create(CreateSubjectMappingResponseSchema)` to create a new message. + */ +export const CreateSubjectMappingResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_subjectmapping_subject_mapping, 7); + +/** + * @generated from message policy.subjectmapping.UpdateSubjectMappingRequest + */ +export type UpdateSubjectMappingRequest = Message<"policy.subjectmapping.UpdateSubjectMappingRequest"> & { + /** + * Required + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Optional + * Replaces the existing SubjectConditionSet id with a new one + * + * @generated from field: string subject_condition_set_id = 2; + */ + subjectConditionSetId: string; + + /** + * Optional + * Replaces entire list of actions permitted by subjects + * + * @generated from field: repeated policy.Action actions = 3; + */ + actions: Action[]; + + /** + * Common metadata + * + * @generated from field: common.MetadataMutable metadata = 100; + */ + metadata?: MetadataMutable; + + /** + * @generated from field: common.MetadataUpdateEnum metadata_update_behavior = 101; + */ + metadataUpdateBehavior: MetadataUpdateEnum; +}; + +/** + * Describes the message policy.subjectmapping.UpdateSubjectMappingRequest. + * Use `create(UpdateSubjectMappingRequestSchema)` to create a new message. + */ +export const UpdateSubjectMappingRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_subjectmapping_subject_mapping, 8); + +/** + * @generated from message policy.subjectmapping.UpdateSubjectMappingResponse + */ +export type UpdateSubjectMappingResponse = Message<"policy.subjectmapping.UpdateSubjectMappingResponse"> & { + /** + * Only ID of the updated Subject Mapping provided + * + * @generated from field: policy.SubjectMapping subject_mapping = 1; + */ + subjectMapping?: SubjectMapping; +}; + +/** + * Describes the message policy.subjectmapping.UpdateSubjectMappingResponse. + * Use `create(UpdateSubjectMappingResponseSchema)` to create a new message. + */ +export const UpdateSubjectMappingResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_subjectmapping_subject_mapping, 9); + +/** + * @generated from message policy.subjectmapping.DeleteSubjectMappingRequest + */ +export type DeleteSubjectMappingRequest = Message<"policy.subjectmapping.DeleteSubjectMappingRequest"> & { + /** + * Required + * + * @generated from field: string id = 1; + */ + id: string; +}; + +/** + * Describes the message policy.subjectmapping.DeleteSubjectMappingRequest. + * Use `create(DeleteSubjectMappingRequestSchema)` to create a new message. + */ +export const DeleteSubjectMappingRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_subjectmapping_subject_mapping, 10); + +/** + * @generated from message policy.subjectmapping.DeleteSubjectMappingResponse + */ +export type DeleteSubjectMappingResponse = Message<"policy.subjectmapping.DeleteSubjectMappingResponse"> & { + /** + * Only ID of the updated Subject Mapping provided + * + * @generated from field: policy.SubjectMapping subject_mapping = 1; + */ + subjectMapping?: SubjectMapping; +}; + +/** + * Describes the message policy.subjectmapping.DeleteSubjectMappingResponse. + * Use `create(DeleteSubjectMappingResponseSchema)` to create a new message. + */ +export const DeleteSubjectMappingResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_subjectmapping_subject_mapping, 11); + +/** + * @generated from message policy.subjectmapping.GetSubjectConditionSetRequest + */ +export type GetSubjectConditionSetRequest = Message<"policy.subjectmapping.GetSubjectConditionSetRequest"> & { + /** + * Required + * + * @generated from field: string id = 1; + */ + id: string; +}; + +/** + * Describes the message policy.subjectmapping.GetSubjectConditionSetRequest. + * Use `create(GetSubjectConditionSetRequestSchema)` to create a new message. + */ +export const GetSubjectConditionSetRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_subjectmapping_subject_mapping, 12); + +/** + * @generated from message policy.subjectmapping.GetSubjectConditionSetResponse + */ +export type GetSubjectConditionSetResponse = Message<"policy.subjectmapping.GetSubjectConditionSetResponse"> & { + /** + * @generated from field: policy.SubjectConditionSet subject_condition_set = 1; + */ + subjectConditionSet?: SubjectConditionSet; + + /** + * contextualized Subject Mappings associated with this SubjectConditionSet + * + * @generated from field: repeated policy.SubjectMapping associated_subject_mappings = 2; + */ + associatedSubjectMappings: SubjectMapping[]; +}; + +/** + * Describes the message policy.subjectmapping.GetSubjectConditionSetResponse. + * Use `create(GetSubjectConditionSetResponseSchema)` to create a new message. + */ +export const GetSubjectConditionSetResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_subjectmapping_subject_mapping, 13); + +/** + * @generated from message policy.subjectmapping.ListSubjectConditionSetsRequest + */ +export type ListSubjectConditionSetsRequest = Message<"policy.subjectmapping.ListSubjectConditionSetsRequest"> & { + /** + * Optional + * + * @generated from field: policy.PageRequest pagination = 10; + */ + pagination?: PageRequest; +}; + +/** + * Describes the message policy.subjectmapping.ListSubjectConditionSetsRequest. + * Use `create(ListSubjectConditionSetsRequestSchema)` to create a new message. + */ +export const ListSubjectConditionSetsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_subjectmapping_subject_mapping, 14); + +/** + * @generated from message policy.subjectmapping.ListSubjectConditionSetsResponse + */ +export type ListSubjectConditionSetsResponse = Message<"policy.subjectmapping.ListSubjectConditionSetsResponse"> & { + /** + * @generated from field: repeated policy.SubjectConditionSet subject_condition_sets = 1; + */ + subjectConditionSets: SubjectConditionSet[]; + + /** + * @generated from field: policy.PageResponse pagination = 10; + */ + pagination?: PageResponse; +}; + +/** + * Describes the message policy.subjectmapping.ListSubjectConditionSetsResponse. + * Use `create(ListSubjectConditionSetsResponseSchema)` to create a new message. + */ +export const ListSubjectConditionSetsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_subjectmapping_subject_mapping, 15); + +/** + * @generated from message policy.subjectmapping.SubjectConditionSetCreate + */ +export type SubjectConditionSetCreate = Message<"policy.subjectmapping.SubjectConditionSetCreate"> & { + /** + * Required + * + * @generated from field: repeated policy.SubjectSet subject_sets = 1; + */ + subjectSets: SubjectSet[]; + + /** + * Optional + * Common metadata + * + * @generated from field: common.MetadataMutable metadata = 100; + */ + metadata?: MetadataMutable; +}; + +/** + * Describes the message policy.subjectmapping.SubjectConditionSetCreate. + * Use `create(SubjectConditionSetCreateSchema)` to create a new message. + */ +export const SubjectConditionSetCreateSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_subjectmapping_subject_mapping, 16); + +/** + * @generated from message policy.subjectmapping.CreateSubjectConditionSetRequest + */ +export type CreateSubjectConditionSetRequest = Message<"policy.subjectmapping.CreateSubjectConditionSetRequest"> & { + /** + * @generated from field: policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1; + */ + subjectConditionSet?: SubjectConditionSetCreate; +}; + +/** + * Describes the message policy.subjectmapping.CreateSubjectConditionSetRequest. + * Use `create(CreateSubjectConditionSetRequestSchema)` to create a new message. + */ +export const CreateSubjectConditionSetRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_subjectmapping_subject_mapping, 17); + +/** + * @generated from message policy.subjectmapping.CreateSubjectConditionSetResponse + */ +export type CreateSubjectConditionSetResponse = Message<"policy.subjectmapping.CreateSubjectConditionSetResponse"> & { + /** + * @generated from field: policy.SubjectConditionSet subject_condition_set = 1; + */ + subjectConditionSet?: SubjectConditionSet; +}; + +/** + * Describes the message policy.subjectmapping.CreateSubjectConditionSetResponse. + * Use `create(CreateSubjectConditionSetResponseSchema)` to create a new message. + */ +export const CreateSubjectConditionSetResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_subjectmapping_subject_mapping, 18); + +/** + * @generated from message policy.subjectmapping.UpdateSubjectConditionSetRequest + */ +export type UpdateSubjectConditionSetRequest = Message<"policy.subjectmapping.UpdateSubjectConditionSetRequest"> & { + /** + * Required + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Optional + * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions + * + * @generated from field: repeated policy.SubjectSet subject_sets = 2; + */ + subjectSets: SubjectSet[]; + + /** + * Common metadata + * + * @generated from field: common.MetadataMutable metadata = 100; + */ + metadata?: MetadataMutable; + + /** + * @generated from field: common.MetadataUpdateEnum metadata_update_behavior = 101; + */ + metadataUpdateBehavior: MetadataUpdateEnum; +}; + +/** + * Describes the message policy.subjectmapping.UpdateSubjectConditionSetRequest. + * Use `create(UpdateSubjectConditionSetRequestSchema)` to create a new message. + */ +export const UpdateSubjectConditionSetRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_subjectmapping_subject_mapping, 19); + +/** + * @generated from message policy.subjectmapping.UpdateSubjectConditionSetResponse + */ +export type UpdateSubjectConditionSetResponse = Message<"policy.subjectmapping.UpdateSubjectConditionSetResponse"> & { + /** + * Only ID of updated Subject Condition Set provided + * + * @generated from field: policy.SubjectConditionSet subject_condition_set = 1; + */ + subjectConditionSet?: SubjectConditionSet; +}; + +/** + * Describes the message policy.subjectmapping.UpdateSubjectConditionSetResponse. + * Use `create(UpdateSubjectConditionSetResponseSchema)` to create a new message. + */ +export const UpdateSubjectConditionSetResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_subjectmapping_subject_mapping, 20); + +/** + * @generated from message policy.subjectmapping.DeleteSubjectConditionSetRequest + */ +export type DeleteSubjectConditionSetRequest = Message<"policy.subjectmapping.DeleteSubjectConditionSetRequest"> & { + /** + * Required + * + * @generated from field: string id = 1; + */ + id: string; +}; + +/** + * Describes the message policy.subjectmapping.DeleteSubjectConditionSetRequest. + * Use `create(DeleteSubjectConditionSetRequestSchema)` to create a new message. + */ +export const DeleteSubjectConditionSetRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_subjectmapping_subject_mapping, 21); + +/** + * @generated from message policy.subjectmapping.DeleteSubjectConditionSetResponse + */ +export type DeleteSubjectConditionSetResponse = Message<"policy.subjectmapping.DeleteSubjectConditionSetResponse"> & { + /** + * Only ID of deleted Subject Condition Set provided + * + * @generated from field: policy.SubjectConditionSet subject_condition_set = 1; + */ + subjectConditionSet?: SubjectConditionSet; +}; + +/** + * Describes the message policy.subjectmapping.DeleteSubjectConditionSetResponse. + * Use `create(DeleteSubjectConditionSetResponseSchema)` to create a new message. + */ +export const DeleteSubjectConditionSetResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_subjectmapping_subject_mapping, 22); + +/** + * Prune any Subject Condition Sets not utilized within a Subject Mapping + * + * @generated from message policy.subjectmapping.DeleteAllUnmappedSubjectConditionSetsRequest + */ +export type DeleteAllUnmappedSubjectConditionSetsRequest = Message<"policy.subjectmapping.DeleteAllUnmappedSubjectConditionSetsRequest"> & { +}; + +/** + * Describes the message policy.subjectmapping.DeleteAllUnmappedSubjectConditionSetsRequest. + * Use `create(DeleteAllUnmappedSubjectConditionSetsRequestSchema)` to create a new message. + */ +export const DeleteAllUnmappedSubjectConditionSetsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_subjectmapping_subject_mapping, 23); + +/** + * @generated from message policy.subjectmapping.DeleteAllUnmappedSubjectConditionSetsResponse + */ +export type DeleteAllUnmappedSubjectConditionSetsResponse = Message<"policy.subjectmapping.DeleteAllUnmappedSubjectConditionSetsResponse"> & { + /** + * Only IDs of any deleted Subject Condition Set provided + * + * @generated from field: repeated policy.SubjectConditionSet subject_condition_sets = 1; + */ + subjectConditionSets: SubjectConditionSet[]; +}; + +/** + * Describes the message policy.subjectmapping.DeleteAllUnmappedSubjectConditionSetsResponse. + * Use `create(DeleteAllUnmappedSubjectConditionSetsResponseSchema)` to create a new message. + */ +export const DeleteAllUnmappedSubjectConditionSetsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_subjectmapping_subject_mapping, 24); + +/** + * @generated from service policy.subjectmapping.SubjectMappingService + */ +export const SubjectMappingService: GenService<{ + /** + * Find matching Subject Mappings for a given Subject + * + * @generated from rpc policy.subjectmapping.SubjectMappingService.MatchSubjectMappings + */ + matchSubjectMappings: { + methodKind: "unary"; + input: typeof MatchSubjectMappingsRequestSchema; + output: typeof MatchSubjectMappingsResponseSchema; + }, + /** + * @generated from rpc policy.subjectmapping.SubjectMappingService.ListSubjectMappings + */ + listSubjectMappings: { + methodKind: "unary"; + input: typeof ListSubjectMappingsRequestSchema; + output: typeof ListSubjectMappingsResponseSchema; + }, + /** + * @generated from rpc policy.subjectmapping.SubjectMappingService.GetSubjectMapping + */ + getSubjectMapping: { + methodKind: "unary"; + input: typeof GetSubjectMappingRequestSchema; + output: typeof GetSubjectMappingResponseSchema; + }, + /** + * @generated from rpc policy.subjectmapping.SubjectMappingService.CreateSubjectMapping + */ + createSubjectMapping: { + methodKind: "unary"; + input: typeof CreateSubjectMappingRequestSchema; + output: typeof CreateSubjectMappingResponseSchema; + }, + /** + * @generated from rpc policy.subjectmapping.SubjectMappingService.UpdateSubjectMapping + */ + updateSubjectMapping: { + methodKind: "unary"; + input: typeof UpdateSubjectMappingRequestSchema; + output: typeof UpdateSubjectMappingResponseSchema; + }, + /** + * @generated from rpc policy.subjectmapping.SubjectMappingService.DeleteSubjectMapping + */ + deleteSubjectMapping: { + methodKind: "unary"; + input: typeof DeleteSubjectMappingRequestSchema; + output: typeof DeleteSubjectMappingResponseSchema; + }, + /** + * @generated from rpc policy.subjectmapping.SubjectMappingService.ListSubjectConditionSets + */ + listSubjectConditionSets: { + methodKind: "unary"; + input: typeof ListSubjectConditionSetsRequestSchema; + output: typeof ListSubjectConditionSetsResponseSchema; + }, + /** + * @generated from rpc policy.subjectmapping.SubjectMappingService.GetSubjectConditionSet + */ + getSubjectConditionSet: { + methodKind: "unary"; + input: typeof GetSubjectConditionSetRequestSchema; + output: typeof GetSubjectConditionSetResponseSchema; + }, + /** + * @generated from rpc policy.subjectmapping.SubjectMappingService.CreateSubjectConditionSet + */ + createSubjectConditionSet: { + methodKind: "unary"; + input: typeof CreateSubjectConditionSetRequestSchema; + output: typeof CreateSubjectConditionSetResponseSchema; + }, + /** + * @generated from rpc policy.subjectmapping.SubjectMappingService.UpdateSubjectConditionSet + */ + updateSubjectConditionSet: { + methodKind: "unary"; + input: typeof UpdateSubjectConditionSetRequestSchema; + output: typeof UpdateSubjectConditionSetResponseSchema; + }, + /** + * @generated from rpc policy.subjectmapping.SubjectMappingService.DeleteSubjectConditionSet + */ + deleteSubjectConditionSet: { + methodKind: "unary"; + input: typeof DeleteSubjectConditionSetRequestSchema; + output: typeof DeleteSubjectConditionSetResponseSchema; + }, + /** + * @generated from rpc policy.subjectmapping.SubjectMappingService.DeleteAllUnmappedSubjectConditionSets + */ + deleteAllUnmappedSubjectConditionSets: { + methodKind: "unary"; + input: typeof DeleteAllUnmappedSubjectConditionSetsRequestSchema; + output: typeof DeleteAllUnmappedSubjectConditionSetsResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_policy_subjectmapping_subject_mapping, 0); + diff --git a/lib/src/platform/policy/unsafe/unsafe_pb.ts b/lib/src/platform/policy/unsafe/unsafe_pb.ts new file mode 100644 index 00000000..4e7b9c55 --- /dev/null +++ b/lib/src/platform/policy/unsafe/unsafe_pb.ts @@ -0,0 +1,593 @@ +// @generated by protoc-gen-es v2.2.5 with parameter "target=ts,import_extension=.js" +// @generated from file policy/unsafe/unsafe.proto (package policy.unsafe, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1"; +import { file_buf_validate_validate } from "../../buf/validate/validate_pb.js"; +import { file_google_api_annotations } from "../../google/api/annotations_pb.js"; +import type { Attribute, AttributeRuleTypeEnum, Key, Namespace, Value } from "../objects_pb.js"; +import { file_policy_objects } from "../objects_pb.js"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file policy/unsafe/unsafe.proto. + */ +export const file_policy_unsafe_unsafe: GenFile = /*@__PURE__*/ + fileDesc("Chpwb2xpY3kvdW5zYWZlL3Vuc2FmZS5wcm90bxINcG9saWN5LnVuc2FmZSLhBAocVW5zYWZl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hZmUuVW5zYWZlRGVsZXRlQXR0cmlidXRlVmFsdWVSZXF1ZXN0GjEucG9saWN5LnVuc2FmZS5VbnNhZmVEZWxldGVBdHRyaWJ1dGVWYWx1ZVJlc3BvbnNlIiaC0+STAiAqHi91bnNhZmUvYXR0cmlidXRlcy92YWx1ZXMve2lkfRJrChJVbnNhZmVEZWxldGVLYXNLZXkSKC5wb2xpY3kudW5zYWZlLlVuc2FmZURlbGV0ZUthc0tleVJlcXVlc3QaKS5wb2xpY3kudW5zYWZlLlVuc2FmZURlbGV0ZUthc0tleVJlc3BvbnNlIgBiBnByb3RvMw", [file_buf_validate_validate, file_google_api_annotations, file_policy_objects]); + +/** + * WARNING!! + * Updating the Namespace of an Attribute will retroactively alter access to existing TDFs of the old and new Namespace name. + * Existing Attribute Definitions and their Values under the Namespace will now be associated with the new Namespace name. + * + * @generated from message policy.unsafe.UnsafeUpdateNamespaceRequest + */ +export type UnsafeUpdateNamespaceRequest = Message<"policy.unsafe.UnsafeUpdateNamespaceRequest"> & { + /** + * Required + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Required + * + * @generated from field: string name = 2; + */ + name: string; +}; + +/** + * Describes the message policy.unsafe.UnsafeUpdateNamespaceRequest. + * Use `create(UnsafeUpdateNamespaceRequestSchema)` to create a new message. + */ +export const UnsafeUpdateNamespaceRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_unsafe_unsafe, 0); + +/** + * @generated from message policy.unsafe.UnsafeUpdateNamespaceResponse + */ +export type UnsafeUpdateNamespaceResponse = Message<"policy.unsafe.UnsafeUpdateNamespaceResponse"> & { + /** + * @generated from field: policy.Namespace namespace = 1; + */ + namespace?: Namespace; +}; + +/** + * Describes the message policy.unsafe.UnsafeUpdateNamespaceResponse. + * Use `create(UnsafeUpdateNamespaceResponseSchema)` to create a new message. + */ +export const UnsafeUpdateNamespaceResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_unsafe_unsafe, 1); + +/** + * WARNING!! + * Reactivating a Namespace can potentially open up an access path to existing TDFs containing any Attributes under the Namespace. + * Active state of any Definitions and their Values under this Namespace will NOT be changed. + * + * @generated from message policy.unsafe.UnsafeReactivateNamespaceRequest + */ +export type UnsafeReactivateNamespaceRequest = Message<"policy.unsafe.UnsafeReactivateNamespaceRequest"> & { + /** + * Required + * + * @generated from field: string id = 1; + */ + id: string; +}; + +/** + * Describes the message policy.unsafe.UnsafeReactivateNamespaceRequest. + * Use `create(UnsafeReactivateNamespaceRequestSchema)` to create a new message. + */ +export const UnsafeReactivateNamespaceRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_unsafe_unsafe, 2); + +/** + * @generated from message policy.unsafe.UnsafeReactivateNamespaceResponse + */ +export type UnsafeReactivateNamespaceResponse = Message<"policy.unsafe.UnsafeReactivateNamespaceResponse"> & { + /** + * @generated from field: policy.Namespace namespace = 1; + */ + namespace?: Namespace; +}; + +/** + * Describes the message policy.unsafe.UnsafeReactivateNamespaceResponse. + * Use `create(UnsafeReactivateNamespaceResponseSchema)` to create a new message. + */ +export const UnsafeReactivateNamespaceResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_unsafe_unsafe, 3); + +/** + * WARNING!! + * Deleting a Namespace will free up the Attribute Namespace, Definitions, and Values for reuse, which can introduce an access path to existing TDFs containing the deleted policy. + * Definitions and their Values under this Namespace will be cascadingly deleted. + * + * @generated from message policy.unsafe.UnsafeDeleteNamespaceRequest + */ +export type UnsafeDeleteNamespaceRequest = Message<"policy.unsafe.UnsafeDeleteNamespaceRequest"> & { + /** + * Required + * UUID of the Namespace + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Required + * Fully Qualified Name (FQN) of Namespace (i.e. https://), normalized to lower case. + * + * @generated from field: string fqn = 2; + */ + fqn: string; +}; + +/** + * Describes the message policy.unsafe.UnsafeDeleteNamespaceRequest. + * Use `create(UnsafeDeleteNamespaceRequestSchema)` to create a new message. + */ +export const UnsafeDeleteNamespaceRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_unsafe_unsafe, 4); + +/** + * @generated from message policy.unsafe.UnsafeDeleteNamespaceResponse + */ +export type UnsafeDeleteNamespaceResponse = Message<"policy.unsafe.UnsafeDeleteNamespaceResponse"> & { + /** + * @generated from field: policy.Namespace namespace = 1; + */ + namespace?: Namespace; +}; + +/** + * Describes the message policy.unsafe.UnsafeDeleteNamespaceResponse. + * Use `create(UnsafeDeleteNamespaceResponseSchema)` to create a new message. + */ +export const UnsafeDeleteNamespaceResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_unsafe_unsafe, 5); + +/** + * WARNING!! + * Updating an Attribute can have dangerous consequences. Use with caution. + * + * @generated from message policy.unsafe.UnsafeUpdateAttributeRequest + */ +export type UnsafeUpdateAttributeRequest = Message<"policy.unsafe.UnsafeUpdateAttributeRequest"> & { + /** + * Required + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Optional + * WARNING!! + * Updating the name of an Attribute will retroactively alter access to existing TDFs of the old and new Attribute name. + * + * @generated from field: string name = 2; + */ + name: string; + + /** + * Optional + * WARNING!! + * Updating the rule of an Attribute will retroactively alter access to existing TDFs of the Attribute name. + * + * @generated from field: policy.AttributeRuleTypeEnum rule = 3; + */ + rule: AttributeRuleTypeEnum; + + /** + * Optional + * WARNING!! + * Unsafe reordering requires the full list of values in the new order they should be stored. Updating the order of values in a HIERARCHY-rule Attribute Definition + * will retroactively alter access to existing TDFs containing those values. Replacing values on an attribute in place is not supported; values can be unsafely deleted + * deleted, created, and unsafely re-ordered as necessary. + * + * @generated from field: repeated string values_order = 4; + */ + valuesOrder: string[]; +}; + +/** + * Describes the message policy.unsafe.UnsafeUpdateAttributeRequest. + * Use `create(UnsafeUpdateAttributeRequestSchema)` to create a new message. + */ +export const UnsafeUpdateAttributeRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_unsafe_unsafe, 6); + +/** + * @generated from message policy.unsafe.UnsafeUpdateAttributeResponse + */ +export type UnsafeUpdateAttributeResponse = Message<"policy.unsafe.UnsafeUpdateAttributeResponse"> & { + /** + * @generated from field: policy.Attribute attribute = 1; + */ + attribute?: Attribute; +}; + +/** + * Describes the message policy.unsafe.UnsafeUpdateAttributeResponse. + * Use `create(UnsafeUpdateAttributeResponseSchema)` to create a new message. + */ +export const UnsafeUpdateAttributeResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_unsafe_unsafe, 7); + +/** + * WARNING!! + * Reactivating an Attribute can potentially open up an access path to existing TDFs containing the Attribute name. + * Active state of any Values under this Attribute Definition will NOT be changed. + * + * @generated from message policy.unsafe.UnsafeReactivateAttributeRequest + */ +export type UnsafeReactivateAttributeRequest = Message<"policy.unsafe.UnsafeReactivateAttributeRequest"> & { + /** + * Required + * + * @generated from field: string id = 1; + */ + id: string; +}; + +/** + * Describes the message policy.unsafe.UnsafeReactivateAttributeRequest. + * Use `create(UnsafeReactivateAttributeRequestSchema)` to create a new message. + */ +export const UnsafeReactivateAttributeRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_unsafe_unsafe, 8); + +/** + * @generated from message policy.unsafe.UnsafeReactivateAttributeResponse + */ +export type UnsafeReactivateAttributeResponse = Message<"policy.unsafe.UnsafeReactivateAttributeResponse"> & { + /** + * @generated from field: policy.Attribute attribute = 1; + */ + attribute?: Attribute; +}; + +/** + * Describes the message policy.unsafe.UnsafeReactivateAttributeResponse. + * Use `create(UnsafeReactivateAttributeResponseSchema)` to create a new message. + */ +export const UnsafeReactivateAttributeResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_unsafe_unsafe, 9); + +/** + * WARNING!! + * Deleting an Attribute will free up the Attribute name for reuse, which can introduce an access path to existing TDFs containing the deleted Attribute name. + * Values under this Attribute will be cascadingly deleted. + * Any KAS Grants associated with this Attribute will be cascadingly deleted. + * + * @generated from message policy.unsafe.UnsafeDeleteAttributeRequest + */ +export type UnsafeDeleteAttributeRequest = Message<"policy.unsafe.UnsafeDeleteAttributeRequest"> & { + /** + * Required + * UUID of the Attribute + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Required + * Fully Qualified Name (FQN) of Attribute Definition (i.e. https:///attr/), normalized to lower case. + * + * @generated from field: string fqn = 2; + */ + fqn: string; +}; + +/** + * Describes the message policy.unsafe.UnsafeDeleteAttributeRequest. + * Use `create(UnsafeDeleteAttributeRequestSchema)` to create a new message. + */ +export const UnsafeDeleteAttributeRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_unsafe_unsafe, 10); + +/** + * @generated from message policy.unsafe.UnsafeDeleteAttributeResponse + */ +export type UnsafeDeleteAttributeResponse = Message<"policy.unsafe.UnsafeDeleteAttributeResponse"> & { + /** + * @generated from field: policy.Attribute attribute = 1; + */ + attribute?: Attribute; +}; + +/** + * Describes the message policy.unsafe.UnsafeDeleteAttributeResponse. + * Use `create(UnsafeDeleteAttributeResponseSchema)` to create a new message. + */ +export const UnsafeDeleteAttributeResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_unsafe_unsafe, 11); + +/** + * WARNING!! + * Updating an Attribute Value will retroactively alter access to existing TDFs containing the old and new Attribute Value. + * + * @generated from message policy.unsafe.UnsafeUpdateAttributeValueRequest + */ +export type UnsafeUpdateAttributeValueRequest = Message<"policy.unsafe.UnsafeUpdateAttributeValueRequest"> & { + /** + * Required + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Required + * + * @generated from field: string value = 2; + */ + value: string; +}; + +/** + * Describes the message policy.unsafe.UnsafeUpdateAttributeValueRequest. + * Use `create(UnsafeUpdateAttributeValueRequestSchema)` to create a new message. + */ +export const UnsafeUpdateAttributeValueRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_unsafe_unsafe, 12); + +/** + * @generated from message policy.unsafe.UnsafeUpdateAttributeValueResponse + */ +export type UnsafeUpdateAttributeValueResponse = Message<"policy.unsafe.UnsafeUpdateAttributeValueResponse"> & { + /** + * @generated from field: policy.Value value = 1; + */ + value?: Value; +}; + +/** + * Describes the message policy.unsafe.UnsafeUpdateAttributeValueResponse. + * Use `create(UnsafeUpdateAttributeValueResponseSchema)` to create a new message. + */ +export const UnsafeUpdateAttributeValueResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_unsafe_unsafe, 13); + +/** + * WARNING!! + * Reactivating an Attribute Value can potentially open up an access path to existing TDFs containing the Attribute Value. + * + * @generated from message policy.unsafe.UnsafeReactivateAttributeValueRequest + */ +export type UnsafeReactivateAttributeValueRequest = Message<"policy.unsafe.UnsafeReactivateAttributeValueRequest"> & { + /** + * Required + * + * @generated from field: string id = 1; + */ + id: string; +}; + +/** + * Describes the message policy.unsafe.UnsafeReactivateAttributeValueRequest. + * Use `create(UnsafeReactivateAttributeValueRequestSchema)` to create a new message. + */ +export const UnsafeReactivateAttributeValueRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_unsafe_unsafe, 14); + +/** + * @generated from message policy.unsafe.UnsafeReactivateAttributeValueResponse + */ +export type UnsafeReactivateAttributeValueResponse = Message<"policy.unsafe.UnsafeReactivateAttributeValueResponse"> & { + /** + * @generated from field: policy.Value value = 1; + */ + value?: Value; +}; + +/** + * Describes the message policy.unsafe.UnsafeReactivateAttributeValueResponse. + * Use `create(UnsafeReactivateAttributeValueResponseSchema)` to create a new message. + */ +export const UnsafeReactivateAttributeValueResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_unsafe_unsafe, 15); + +/** + * WARNING!! + * Deleting an Attribute Value will free up the Attribute Value for reuse, which can introduce an access path to existing TDFs containing the deleted Attribute Value. + * Any KAS Grants associated with this Attribute Value will be cascadingly deleted. + * + * @generated from message policy.unsafe.UnsafeDeleteAttributeValueRequest + */ +export type UnsafeDeleteAttributeValueRequest = Message<"policy.unsafe.UnsafeDeleteAttributeValueRequest"> & { + /** + * Required + * UUID of the Attribute Value + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Required + * Fully Qualified Name (FQN) of Attribute Value (i.e. https:///attr//value/), normalized to lower case. + * + * @generated from field: string fqn = 2; + */ + fqn: string; +}; + +/** + * Describes the message policy.unsafe.UnsafeDeleteAttributeValueRequest. + * Use `create(UnsafeDeleteAttributeValueRequestSchema)` to create a new message. + */ +export const UnsafeDeleteAttributeValueRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_unsafe_unsafe, 16); + +/** + * @generated from message policy.unsafe.UnsafeDeleteAttributeValueResponse + */ +export type UnsafeDeleteAttributeValueResponse = Message<"policy.unsafe.UnsafeDeleteAttributeValueResponse"> & { + /** + * @generated from field: policy.Value value = 1; + */ + value?: Value; +}; + +/** + * Describes the message policy.unsafe.UnsafeDeleteAttributeValueResponse. + * Use `create(UnsafeDeleteAttributeValueResponseSchema)` to create a new message. + */ +export const UnsafeDeleteAttributeValueResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_unsafe_unsafe, 17); + +/** + * WARNING!! + * + * @generated from message policy.unsafe.UnsafeDeleteKasKeyRequest + */ +export type UnsafeDeleteKasKeyRequest = Message<"policy.unsafe.UnsafeDeleteKasKeyRequest"> & { + /** + * Required + * UUID of the Key + * + * @generated from field: string id = 1; + */ + id: string; +}; + +/** + * Describes the message policy.unsafe.UnsafeDeleteKasKeyRequest. + * Use `create(UnsafeDeleteKasKeyRequestSchema)` to create a new message. + */ +export const UnsafeDeleteKasKeyRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_unsafe_unsafe, 18); + +/** + * @generated from message policy.unsafe.UnsafeDeleteKasKeyResponse + */ +export type UnsafeDeleteKasKeyResponse = Message<"policy.unsafe.UnsafeDeleteKasKeyResponse"> & { + /** + * @generated from field: policy.Key key = 1; + */ + key?: Key; +}; + +/** + * Describes the message policy.unsafe.UnsafeDeleteKasKeyResponse. + * Use `create(UnsafeDeleteKasKeyResponseSchema)` to create a new message. + */ +export const UnsafeDeleteKasKeyResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_policy_unsafe_unsafe, 19); + +/** + * / + * / Unsafe Service + * / IN FLIGHT AND NOT YET IMPLEMENTED! + * / + * + * @generated from service policy.unsafe.UnsafeService + */ +export const UnsafeService: GenService<{ + /** + * --------------------------------------* + * Namespace RPCs + * --------------------------------------- + * + * @generated from rpc policy.unsafe.UnsafeService.UnsafeUpdateNamespace + */ + unsafeUpdateNamespace: { + methodKind: "unary"; + input: typeof UnsafeUpdateNamespaceRequestSchema; + output: typeof UnsafeUpdateNamespaceResponseSchema; + }, + /** + * @generated from rpc policy.unsafe.UnsafeService.UnsafeReactivateNamespace + */ + unsafeReactivateNamespace: { + methodKind: "unary"; + input: typeof UnsafeReactivateNamespaceRequestSchema; + output: typeof UnsafeReactivateNamespaceResponseSchema; + }, + /** + * @generated from rpc policy.unsafe.UnsafeService.UnsafeDeleteNamespace + */ + unsafeDeleteNamespace: { + methodKind: "unary"; + input: typeof UnsafeDeleteNamespaceRequestSchema; + output: typeof UnsafeDeleteNamespaceResponseSchema; + }, + /** + * --------------------------------------* + * Attribute RPCs + * --------------------------------------- + * + * @generated from rpc policy.unsafe.UnsafeService.UnsafeUpdateAttribute + */ + unsafeUpdateAttribute: { + methodKind: "unary"; + input: typeof UnsafeUpdateAttributeRequestSchema; + output: typeof UnsafeUpdateAttributeResponseSchema; + }, + /** + * @generated from rpc policy.unsafe.UnsafeService.UnsafeReactivateAttribute + */ + unsafeReactivateAttribute: { + methodKind: "unary"; + input: typeof UnsafeReactivateAttributeRequestSchema; + output: typeof UnsafeReactivateAttributeResponseSchema; + }, + /** + * @generated from rpc policy.unsafe.UnsafeService.UnsafeDeleteAttribute + */ + unsafeDeleteAttribute: { + methodKind: "unary"; + input: typeof UnsafeDeleteAttributeRequestSchema; + output: typeof UnsafeDeleteAttributeResponseSchema; + }, + /** + * --------------------------------------* + * Value RPCs + * --------------------------------------- + * + * @generated from rpc policy.unsafe.UnsafeService.UnsafeUpdateAttributeValue + */ + unsafeUpdateAttributeValue: { + methodKind: "unary"; + input: typeof UnsafeUpdateAttributeValueRequestSchema; + output: typeof UnsafeUpdateAttributeValueResponseSchema; + }, + /** + * @generated from rpc policy.unsafe.UnsafeService.UnsafeReactivateAttributeValue + */ + unsafeReactivateAttributeValue: { + methodKind: "unary"; + input: typeof UnsafeReactivateAttributeValueRequestSchema; + output: typeof UnsafeReactivateAttributeValueResponseSchema; + }, + /** + * @generated from rpc policy.unsafe.UnsafeService.UnsafeDeleteAttributeValue + */ + unsafeDeleteAttributeValue: { + methodKind: "unary"; + input: typeof UnsafeDeleteAttributeValueRequestSchema; + output: typeof UnsafeDeleteAttributeValueResponseSchema; + }, + /** + * --------------------------------------* + * Kas Key RPCs + * --------------------------------------- + * + * @generated from rpc policy.unsafe.UnsafeService.UnsafeDeleteKasKey + */ + unsafeDeleteKasKey: { + methodKind: "unary"; + input: typeof UnsafeDeleteKasKeyRequestSchema; + output: typeof UnsafeDeleteKasKeyResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_policy_unsafe_unsafe, 0); + diff --git a/lib/src/platform/protoc-gen-openapiv2/options/annotations_pb.ts b/lib/src/platform/protoc-gen-openapiv2/options/annotations_pb.ts new file mode 100644 index 00000000..cc512067 --- /dev/null +++ b/lib/src/platform/protoc-gen-openapiv2/options/annotations_pb.ts @@ -0,0 +1,83 @@ +// @generated by protoc-gen-es v2.2.5 with parameter "target=ts,import_extension=.js" +// @generated from file protoc-gen-openapiv2/options/annotations.proto (package grpc.gateway.protoc_gen_openapiv2.options, syntax proto3) +/* eslint-disable */ + +import type { GenExtension, GenFile } from "@bufbuild/protobuf/codegenv1"; +import { extDesc, fileDesc } from "@bufbuild/protobuf/codegenv1"; +import type { EnumOptions, FieldOptions, FileOptions, MessageOptions, MethodOptions, ServiceOptions } from "@bufbuild/protobuf/wkt"; +import { file_google_protobuf_descriptor } from "@bufbuild/protobuf/wkt"; +import type { EnumSchema, JSONSchema, Operation, Schema, Swagger, Tag } from "./openapiv2_pb.js"; +import { file_protoc_gen_openapiv2_options_openapiv2 } from "./openapiv2_pb.js"; + +/** + * Describes the file protoc-gen-openapiv2/options/annotations.proto. + */ +export const file_protoc_gen_openapiv2_options_annotations: GenFile = /*@__PURE__*/ + fileDesc("Ci5wcm90b2MtZ2VuLW9wZW5hcGl2Mi9vcHRpb25zL2Fubm90YXRpb25zLnByb3RvEilncnBjLmdhdGV3YXkucHJvdG9jX2dlbl9vcGVuYXBpdjIub3B0aW9uczp+ChFvcGVuYXBpdjJfc3dhZ2dlchIcLmdvb2dsZS5wcm90b2J1Zi5GaWxlT3B0aW9ucxiSCCABKAsyMi5ncnBjLmdhdGV3YXkucHJvdG9jX2dlbl9vcGVuYXBpdjIub3B0aW9ucy5Td2FnZ2VyUhBvcGVuYXBpdjJTd2FnZ2VyOoYBChNvcGVuYXBpdjJfb3BlcmF0aW9uEh4uZ29vZ2xlLnByb3RvYnVmLk1ldGhvZE9wdGlvbnMYkgggASgLMjQuZ3JwYy5nYXRld2F5LnByb3RvY19nZW5fb3BlbmFwaXYyLm9wdGlvbnMuT3BlcmF0aW9uUhJvcGVuYXBpdjJPcGVyYXRpb246fgoQb3BlbmFwaXYyX3NjaGVtYRIfLmdvb2dsZS5wcm90b2J1Zi5NZXNzYWdlT3B0aW9ucxiSCCABKAsyMS5ncnBjLmdhdGV3YXkucHJvdG9jX2dlbl9vcGVuYXBpdjIub3B0aW9ucy5TY2hlbWFSD29wZW5hcGl2MlNjaGVtYTp7Cg5vcGVuYXBpdjJfZW51bRIcLmdvb2dsZS5wcm90b2J1Zi5FbnVtT3B0aW9ucxiSCCABKAsyNS5ncnBjLmdhdGV3YXkucHJvdG9jX2dlbl9vcGVuYXBpdjIub3B0aW9ucy5FbnVtU2NoZW1hUg1vcGVuYXBpdjJFbnVtOnUKDW9wZW5hcGl2Ml90YWcSHy5nb29nbGUucHJvdG9idWYuU2VydmljZU9wdGlvbnMYkgggASgLMi4uZ3JwYy5nYXRld2F5LnByb3RvY19nZW5fb3BlbmFwaXYyLm9wdGlvbnMuVGFnUgxvcGVuYXBpdjJUYWc6fgoPb3BlbmFwaXYyX2ZpZWxkEh0uZ29vZ2xlLnByb3RvYnVmLkZpZWxkT3B0aW9ucxiSCCABKAsyNS5ncnBjLmdhdGV3YXkucHJvdG9jX2dlbl9vcGVuYXBpdjIub3B0aW9ucy5KU09OU2NoZW1hUg5vcGVuYXBpdjJGaWVsZEJIWkZnaXRodWIuY29tL2dycGMtZWNvc3lzdGVtL2dycGMtZ2F0ZXdheS92Mi9wcm90b2MtZ2VuLW9wZW5hcGl2Mi9vcHRpb25zYgZwcm90bzM", [file_google_protobuf_descriptor, file_protoc_gen_openapiv2_options_openapiv2]); + +/** + * 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: GenExtension = /*@__PURE__*/ + extDesc(file_protoc_gen_openapiv2_options_annotations, 0); + +/** + * 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: GenExtension = /*@__PURE__*/ + extDesc(file_protoc_gen_openapiv2_options_annotations, 1); + +/** + * 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: GenExtension = /*@__PURE__*/ + extDesc(file_protoc_gen_openapiv2_options_annotations, 2); + +/** + * 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.EnumSchema openapiv2_enum = 1042; + */ +export const openapiv2_enum: GenExtension = /*@__PURE__*/ + extDesc(file_protoc_gen_openapiv2_options_annotations, 3); + +/** + * 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: GenExtension = /*@__PURE__*/ + extDesc(file_protoc_gen_openapiv2_options_annotations, 4); + +/** + * 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: GenExtension = /*@__PURE__*/ + extDesc(file_protoc_gen_openapiv2_options_annotations, 5); + diff --git a/lib/src/platform/protoc-gen-openapiv2/options/openapiv2_pb.ts b/lib/src/platform/protoc-gen-openapiv2/options/openapiv2_pb.ts new file mode 100644 index 00000000..4af58b56 --- /dev/null +++ b/lib/src/platform/protoc-gen-openapiv2/options/openapiv2_pb.ts @@ -0,0 +1,1615 @@ +// @generated by protoc-gen-es v2.2.5 with parameter "target=ts,import_extension=.js" +// @generated from file protoc-gen-openapiv2/options/openapiv2.proto (package grpc.gateway.protoc_gen_openapiv2.options, syntax proto3) +/* eslint-disable */ + +import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1"; +import { enumDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1"; +import type { Value } from "@bufbuild/protobuf/wkt"; +import { file_google_protobuf_struct } from "@bufbuild/protobuf/wkt"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file protoc-gen-openapiv2/options/openapiv2.proto. + */ +export const file_protoc_gen_openapiv2_options_openapiv2: GenFile = /*@__PURE__*/ + fileDesc("Cixwcm90b2MtZ2VuLW9wZW5hcGl2Mi9vcHRpb25zL29wZW5hc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KEEZMT1dfQVBQTElDQVRJT04QAxIUChBGTE9XX0FDQ0VTU19DT0RFEAQizQIKE1NlY3VyaXR5UmVxdWlyZW1lbnQSdQoUc2VjdXJpdHlfcmVxdWlyZW1lbnQYASADKAsyVy5ncnBjLmdhdGV3YXkucHJvdG9jX2dlbl9vcGVuYXBpdjIub3B0aW9ucy5TZWN1cml0eVJlcXVpcmVtZW50LlNlY3VyaXR5UmVxdWlyZW1lbnRFbnRyeRopChhTZWN1cml0eVJlcXVpcmVtZW50VmFsdWUSDQoFc2NvcGUYASADKAkakwEKGFNlY3VyaXR5UmVxdWlyZW1lbnRFbnRyeRILCgNrZXkYASABKAkSZgoFdmFsdWUYAiABKAsyVy5ncnBjLmdhdGV3YXkucHJvdG9jX2dlbl9vcGVuYXBpdjIub3B0aW9ucy5TZWN1cml0eVJlcXVpcmVtZW50LlNlY3VyaXR5UmVxdWlyZW1lbnRWYWx1ZToCOAEigwEKBlNjb3BlcxJLCgVzY29wZRgBIAMoCzI8LmdycGMuZ2F0ZXdheS5wcm90b2NfZ2VuX29wZW5hcGl2Mi5vcHRpb25zLlNjb3Blcy5TY29wZUVudHJ5GiwKClNjb3BlRW50cnkSCwoDa2V5GAEgASgJEg0KBXZhbHVlGAIgASgJOgI4ASo7CgZTY2hlbWUSCwoHVU5LTk9XThAAEggKBEhUVFAQARIJCgVIVFRQUxACEgYKAldTEAMSBwoDV1NTEARCSFpGZ2l0aHViLmNvbS9ncnBjLWVjb3N5c3RlbS9ncnBjLWdhdGV3YXkvdjIvcHJvdG9jLWdlbi1vcGVuYXBpdjIvb3B0aW9uc2IGcHJvdG8z", [file_google_protobuf_struct]); + +/** + * `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 type Swagger = Message<"grpc.gateway.protoc_gen_openapiv2.options.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 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 extensions = 15; + */ + extensions: { [key: string]: Value }; +}; + +/** + * Describes the message grpc.gateway.protoc_gen_openapiv2.options.Swagger. + * Use `create(SwaggerSchema)` to create a new message. + */ +export const SwaggerSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_protoc_gen_openapiv2_options_openapiv2, 0); + +/** + * `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 type Operation = Message<"grpc.gateway.protoc_gen_openapiv2.options.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 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 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; +}; + +/** + * Describes the message grpc.gateway.protoc_gen_openapiv2.options.Operation. + * Use `create(OperationSchema)` to create a new message. + */ +export const OperationSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_protoc_gen_openapiv2_options_openapiv2, 1); + +/** + * `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 type Parameters = Message<"grpc.gateway.protoc_gen_openapiv2.options.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[]; +}; + +/** + * Describes the message grpc.gateway.protoc_gen_openapiv2.options.Parameters. + * Use `create(ParametersSchema)` to create a new message. + */ +export const ParametersSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_protoc_gen_openapiv2_options_openapiv2, 2); + +/** + * `HeaderParameter` a HTTP header parameter. + * See: https://swagger.io/specification/v2/#parameter-object + * + * @generated from message grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter + */ +export type HeaderParameter = Message<"grpc.gateway.protoc_gen_openapiv2.options.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; +}; + +/** + * Describes the message grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter. + * Use `create(HeaderParameterSchema)` to create a new message. + */ +export const HeaderParameterSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_protoc_gen_openapiv2_options_openapiv2, 3); + +/** + * `Type` is a supported HTTP header type. + * See https://swagger.io/specification/v2/#parameterType. + * + * @generated from enum grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type + */ +export 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, +} + +/** + * Describes the enum grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type. + */ +export const HeaderParameter_TypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_protoc_gen_openapiv2_options_openapiv2, 3, 0); + +/** + * `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 type Header = Message<"grpc.gateway.protoc_gen_openapiv2.options.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; +}; + +/** + * Describes the message grpc.gateway.protoc_gen_openapiv2.options.Header. + * Use `create(HeaderSchema)` to create a new message. + */ +export const HeaderSchema: GenMessage
= /*@__PURE__*/ + messageDesc(file_protoc_gen_openapiv2_options_openapiv2, 4); + +/** + * `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 type Response = Message<"grpc.gateway.protoc_gen_openapiv2.options.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 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 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 extensions = 5; + */ + extensions: { [key: string]: Value }; +}; + +/** + * Describes the message grpc.gateway.protoc_gen_openapiv2.options.Response. + * Use `create(ResponseSchema)` to create a new message. + */ +export const ResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_protoc_gen_openapiv2_options_openapiv2, 5); + +/** + * `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 type Info = Message<"grpc.gateway.protoc_gen_openapiv2.options.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 extensions = 7; + */ + extensions: { [key: string]: Value }; +}; + +/** + * Describes the message grpc.gateway.protoc_gen_openapiv2.options.Info. + * Use `create(InfoSchema)` to create a new message. + */ +export const InfoSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_protoc_gen_openapiv2_options_openapiv2, 6); + +/** + * `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 type Contact = Message<"grpc.gateway.protoc_gen_openapiv2.options.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; +}; + +/** + * Describes the message grpc.gateway.protoc_gen_openapiv2.options.Contact. + * Use `create(ContactSchema)` to create a new message. + */ +export const ContactSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_protoc_gen_openapiv2_options_openapiv2, 7); + +/** + * `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 type License = Message<"grpc.gateway.protoc_gen_openapiv2.options.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; +}; + +/** + * Describes the message grpc.gateway.protoc_gen_openapiv2.options.License. + * Use `create(LicenseSchema)` to create a new message. + */ +export const LicenseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_protoc_gen_openapiv2_options_openapiv2, 8); + +/** + * `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 type ExternalDocumentation = Message<"grpc.gateway.protoc_gen_openapiv2.options.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; +}; + +/** + * Describes the message grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation. + * Use `create(ExternalDocumentationSchema)` to create a new message. + */ +export const ExternalDocumentationSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_protoc_gen_openapiv2_options_openapiv2, 9); + +/** + * `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 type Schema = Message<"grpc.gateway.protoc_gen_openapiv2.options.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; +}; + +/** + * Describes the message grpc.gateway.protoc_gen_openapiv2.options.Schema. + * Use `create(SchemaSchema)` to create a new message. + */ +export const SchemaSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_protoc_gen_openapiv2_options_openapiv2, 10); + +/** + * `EnumSchema` is subset of fields from the OpenAPI v2 specification's Schema object. + * Only fields that are applicable to Enums are included + * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject + * + * Example: + * + * option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_enum) = { + * ... + * title: "MyEnum"; + * description:"This is my nice enum"; + * example: "ZERO"; + * required: true; + * ... + * }; + * + * + * @generated from message grpc.gateway.protoc_gen_openapiv2.options.EnumSchema + */ +export type EnumSchema = Message<"grpc.gateway.protoc_gen_openapiv2.options.EnumSchema"> & { + /** + * A short description of the schema. + * + * @generated from field: string description = 1; + */ + description: string; + + /** + * @generated from field: string default = 2; + */ + default: string; + + /** + * The title of the schema. + * + * @generated from field: string title = 3; + */ + title: string; + + /** + * @generated from field: bool required = 4; + */ + required: boolean; + + /** + * @generated from field: bool read_only = 5; + */ + readOnly: boolean; + + /** + * Additional external documentation for this schema. + * + * @generated from field: grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 6; + */ + externalDocs?: ExternalDocumentation; + + /** + * @generated from field: string example = 7; + */ + example: string; + + /** + * 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 = 8; + */ + ref: 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 extensions = 9; + */ + extensions: { [key: string]: Value }; +}; + +/** + * Describes the message grpc.gateway.protoc_gen_openapiv2.options.EnumSchema. + * Use `create(EnumSchemaSchema)` to create a new message. + */ +export const EnumSchemaSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_protoc_gen_openapiv2_options_openapiv2, 11); + +/** + * `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 type JSONSchema = Message<"grpc.gateway.protoc_gen_openapiv2.options.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 extensions = 48; + */ + extensions: { [key: string]: Value }; +}; + +/** + * Describes the message grpc.gateway.protoc_gen_openapiv2.options.JSONSchema. + * Use `create(JSONSchemaSchema)` to create a new message. + */ +export const JSONSchemaSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_protoc_gen_openapiv2_options_openapiv2, 12); + +/** + * '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 type JSONSchema_FieldConfiguration = Message<"grpc.gateway.protoc_gen_openapiv2.options.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; +}; + +/** + * Describes the message grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration. + * Use `create(JSONSchema_FieldConfigurationSchema)` to create a new message. + */ +export const JSONSchema_FieldConfigurationSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_protoc_gen_openapiv2_options_openapiv2, 12, 0); + +/** + * @generated from enum grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes + */ +export 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, +} + +/** + * Describes the enum grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes. + */ +export const JSONSchema_JSONSchemaSimpleTypesSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_protoc_gen_openapiv2_options_openapiv2, 12, 0); + +/** + * `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 type Tag = Message<"grpc.gateway.protoc_gen_openapiv2.options.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 extensions = 4; + */ + extensions: { [key: string]: Value }; +}; + +/** + * Describes the message grpc.gateway.protoc_gen_openapiv2.options.Tag. + * Use `create(TagSchema)` to create a new message. + */ +export const TagSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_protoc_gen_openapiv2_options_openapiv2, 13); + +/** + * `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 type SecurityDefinitions = Message<"grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions"> & { + /** + * A single security scheme definition, mapping a "name" to the scheme it + * defines. + * + * @generated from field: map security = 1; + */ + security: { [key: string]: SecurityScheme }; +}; + +/** + * Describes the message grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions. + * Use `create(SecurityDefinitionsSchema)` to create a new message. + */ +export const SecurityDefinitionsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_protoc_gen_openapiv2_options_openapiv2, 14); + +/** + * `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 type SecurityScheme = Message<"grpc.gateway.protoc_gen_openapiv2.options.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 extensions = 9; + */ + extensions: { [key: string]: Value }; +}; + +/** + * Describes the message grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme. + * Use `create(SecuritySchemeSchema)` to create a new message. + */ +export const SecuritySchemeSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_protoc_gen_openapiv2_options_openapiv2, 15); + +/** + * 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 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, +} + +/** + * Describes the enum grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type. + */ +export const SecurityScheme_TypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_protoc_gen_openapiv2_options_openapiv2, 15, 0); + +/** + * The location of the API key. Valid values are "query" or "header". + * + * @generated from enum grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In + */ +export 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, +} + +/** + * Describes the enum grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In. + */ +export const SecurityScheme_InSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_protoc_gen_openapiv2_options_openapiv2, 15, 1); + +/** + * 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 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, +} + +/** + * Describes the enum grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow. + */ +export const SecurityScheme_FlowSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_protoc_gen_openapiv2_options_openapiv2, 15, 2); + +/** + * `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 type SecurityRequirement = Message<"grpc.gateway.protoc_gen_openapiv2.options.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 security_requirement = 1; + */ + securityRequirement: { [key: string]: SecurityRequirement_SecurityRequirementValue }; +}; + +/** + * Describes the message grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement. + * Use `create(SecurityRequirementSchema)` to create a new message. + */ +export const SecurityRequirementSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_protoc_gen_openapiv2_options_openapiv2, 16); + +/** + * 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 type SecurityRequirement_SecurityRequirementValue = Message<"grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue"> & { + /** + * @generated from field: repeated string scope = 1; + */ + scope: string[]; +}; + +/** + * Describes the message grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue. + * Use `create(SecurityRequirement_SecurityRequirementValueSchema)` to create a new message. + */ +export const SecurityRequirement_SecurityRequirementValueSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_protoc_gen_openapiv2_options_openapiv2, 16, 0); + +/** + * `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 type Scopes = Message<"grpc.gateway.protoc_gen_openapiv2.options.Scopes"> & { + /** + * Maps between a name of a scope to a short description of it (as the value + * of the property). + * + * @generated from field: map scope = 1; + */ + scope: { [key: string]: string }; +}; + +/** + * Describes the message grpc.gateway.protoc_gen_openapiv2.options.Scopes. + * Use `create(ScopesSchema)` to create a new message. + */ +export const ScopesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_protoc_gen_openapiv2_options_openapiv2, 17); + +/** + * Scheme describes the schemes supported by the OpenAPI Swagger + * and Operation objects. + * + * @generated from enum grpc.gateway.protoc_gen_openapiv2.options.Scheme + */ +export 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, +} + +/** + * Describes the enum grpc.gateway.protoc_gen_openapiv2.options.Scheme. + */ +export const SchemeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_protoc_gen_openapiv2_options_openapiv2, 0); + diff --git a/lib/src/platform/wellknownconfiguration/wellknown_configuration_connect.d.ts b/lib/src/platform/wellknownconfiguration/wellknown_configuration_connect.d.ts deleted file mode 100644 index 98ae9ac1..00000000 --- a/lib/src/platform/wellknownconfiguration/wellknown_configuration_connect.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=js+dts,import_extension=none" -// @generated from file wellknownconfiguration/wellknown_configuration.proto (package wellknownconfiguration, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { GetWellKnownConfigurationRequest, GetWellKnownConfigurationResponse } from "./wellknown_configuration_pb"; -import { MethodKind } from "@bufbuild/protobuf"; - -/** - * @generated from service wellknownconfiguration.WellKnownService - */ -export declare const WellKnownService: { - readonly typeName: "wellknownconfiguration.WellKnownService", - readonly methods: { - /** - * @generated from rpc wellknownconfiguration.WellKnownService.GetWellKnownConfiguration - */ - readonly getWellKnownConfiguration: { - readonly name: "GetWellKnownConfiguration", - readonly I: typeof GetWellKnownConfigurationRequest, - readonly O: typeof GetWellKnownConfigurationResponse, - readonly kind: MethodKind.Unary, - }, - } -}; - diff --git a/lib/src/platform/wellknownconfiguration/wellknown_configuration_connect.js b/lib/src/platform/wellknownconfiguration/wellknown_configuration_connect.js deleted file mode 100644 index 8b0687b2..00000000 --- a/lib/src/platform/wellknownconfiguration/wellknown_configuration_connect.js +++ /dev/null @@ -1,26 +0,0 @@ -// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=js+dts,import_extension=none" -// @generated from file wellknownconfiguration/wellknown_configuration.proto (package wellknownconfiguration, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { GetWellKnownConfigurationRequest, GetWellKnownConfigurationResponse } from "./wellknown_configuration_pb"; -import { MethodKind } from "@bufbuild/protobuf"; - -/** - * @generated from service wellknownconfiguration.WellKnownService - */ -export const WellKnownService = { - typeName: "wellknownconfiguration.WellKnownService", - methods: { - /** - * @generated from rpc wellknownconfiguration.WellKnownService.GetWellKnownConfiguration - */ - getWellKnownConfiguration: { - name: "GetWellKnownConfiguration", - I: GetWellKnownConfigurationRequest, - O: GetWellKnownConfigurationResponse, - kind: MethodKind.Unary, - }, - } -}; - diff --git a/lib/src/platform/wellknownconfiguration/wellknown_configuration_pb.d.ts b/lib/src/platform/wellknownconfiguration/wellknown_configuration_pb.d.ts deleted file mode 100644 index 59e46b15..00000000 --- a/lib/src/platform/wellknownconfiguration/wellknown_configuration_pb.d.ts +++ /dev/null @@ -1,75 +0,0 @@ -// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" -// @generated from file wellknownconfiguration/wellknown_configuration.proto (package wellknownconfiguration, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage, Struct } from "@bufbuild/protobuf"; -import { Message, proto3 } from "@bufbuild/protobuf"; - -/** - * @generated from message wellknownconfiguration.WellKnownConfig - */ -export declare class WellKnownConfig extends Message { - /** - * @generated from field: map configuration = 1; - */ - configuration: { [key: string]: Struct }; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "wellknownconfiguration.WellKnownConfig"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): WellKnownConfig; - - static fromJson(jsonValue: JsonValue, options?: Partial): WellKnownConfig; - - static fromJsonString(jsonString: string, options?: Partial): WellKnownConfig; - - static equals(a: WellKnownConfig | PlainMessage | undefined, b: WellKnownConfig | PlainMessage | undefined): boolean; -} - -/** - * @generated from message wellknownconfiguration.GetWellKnownConfigurationRequest - */ -export declare class GetWellKnownConfigurationRequest extends Message { - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "wellknownconfiguration.GetWellKnownConfigurationRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetWellKnownConfigurationRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetWellKnownConfigurationRequest; - - static fromJsonString(jsonString: string, options?: Partial): GetWellKnownConfigurationRequest; - - static equals(a: GetWellKnownConfigurationRequest | PlainMessage | undefined, b: GetWellKnownConfigurationRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message wellknownconfiguration.GetWellKnownConfigurationResponse - */ -export declare class GetWellKnownConfigurationResponse extends Message { - /** - * @generated from field: google.protobuf.Struct configuration = 1; - */ - configuration?: Struct; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "wellknownconfiguration.GetWellKnownConfigurationResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetWellKnownConfigurationResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetWellKnownConfigurationResponse; - - static fromJsonString(jsonString: string, options?: Partial): GetWellKnownConfigurationResponse; - - static equals(a: GetWellKnownConfigurationResponse | PlainMessage | undefined, b: GetWellKnownConfigurationResponse | PlainMessage | undefined): boolean; -} - diff --git a/lib/src/platform/wellknownconfiguration/wellknown_configuration_pb.js b/lib/src/platform/wellknownconfiguration/wellknown_configuration_pb.js deleted file mode 100644 index 6700d024..00000000 --- a/lib/src/platform/wellknownconfiguration/wellknown_configuration_pb.js +++ /dev/null @@ -1,35 +0,0 @@ -// @generated by protoc-gen-es v1.9.0 with parameter "target=js+dts,import_extension=none" -// @generated from file wellknownconfiguration/wellknown_configuration.proto (package wellknownconfiguration, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { proto3, Struct } from "@bufbuild/protobuf"; - -/** - * @generated from message wellknownconfiguration.WellKnownConfig - */ -export const WellKnownConfig = /*@__PURE__*/ proto3.makeMessageType( - "wellknownconfiguration.WellKnownConfig", - () => [ - { no: 1, name: "configuration", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: Struct} }, - ], -); - -/** - * @generated from message wellknownconfiguration.GetWellKnownConfigurationRequest - */ -export const GetWellKnownConfigurationRequest = /*@__PURE__*/ proto3.makeMessageType( - "wellknownconfiguration.GetWellKnownConfigurationRequest", - [], -); - -/** - * @generated from message wellknownconfiguration.GetWellKnownConfigurationResponse - */ -export const GetWellKnownConfigurationResponse = /*@__PURE__*/ proto3.makeMessageType( - "wellknownconfiguration.GetWellKnownConfigurationResponse", - () => [ - { no: 1, name: "configuration", kind: "message", T: Struct }, - ], -); - diff --git a/lib/src/platform/wellknownconfiguration/wellknown_configuration_pb.ts b/lib/src/platform/wellknownconfiguration/wellknown_configuration_pb.ts new file mode 100644 index 00000000..699dd8bd --- /dev/null +++ b/lib/src/platform/wellknownconfiguration/wellknown_configuration_pb.ts @@ -0,0 +1,78 @@ +// @generated by protoc-gen-es v2.2.5 with parameter "target=ts,import_extension=.js" +// @generated from file wellknownconfiguration/wellknown_configuration.proto (package wellknownconfiguration, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1"; +import { file_google_api_annotations } from "../google/api/annotations_pb.js"; +import { file_google_protobuf_struct } from "@bufbuild/protobuf/wkt"; +import type { JsonObject, Message } from "@bufbuild/protobuf"; + +/** + * Describes the file wellknownconfiguration/wellknown_configuration.proto. + */ +export const file_wellknownconfiguration_wellknown_configuration: GenFile = /*@__PURE__*/ + fileDesc("CjR3ZWxsa25vd25jb25maWd1cmF0aW9uL3dlbGxrbm93bl9jb25maWd1cmF0aW9uLnByb3RvEhZ3ZWxsa25vd25jb25maWd1cmF0aW9uIrMBCg9XZWxsS25vd25Db25maWcSUQoNY29uZmlndXJhdGlvbhgBIAMoCzI6LndlbGxrbm93bmNvbmZpZ3VyYXRpb24uV2VsbEtub3duQ29uZmlnLkNvbmZpZ3VyYXRpb25FbnRyeRpNChJDb25maWd1cmF0aW9uRW50cnkSCwoDa2V5GAEgASgJEiYKBXZhbHVlGAIgASgLMhcuZ29vZ2xlLnByb3RvYnVmLlN0cnVjdDoCOAEiIgogR2V0V2VsbEtub3duQ29uZmlndXJhdGlvblJlcXVlc3QiUwohR2V0V2VsbEtub3duQ29uZmlndXJhdGlvblJlc3BvbnNlEi4KDWNvbmZpZ3VyYXRpb24YASABKAsyFy5nb29nbGUucHJvdG9idWYuU3RydWN0MtQBChBXZWxsS25vd25TZXJ2aWNlEr8BChlHZXRXZWxsS25vd25Db25maWd1cmF0aW9uEjgud2VsbGtub3duY29uZmlndXJhdGlvbi5HZXRXZWxsS25vd25Db25maWd1cmF0aW9uUmVxdWVzdBo5LndlbGxrbm93bmNvbmZpZ3VyYXRpb24uR2V0V2VsbEtub3duQ29uZmlndXJhdGlvblJlc3BvbnNlIi2QAgGC0+STAiQSIi8ud2VsbC1rbm93bi9vcGVudGRmLWNvbmZpZ3VyYXRpb25iBnByb3RvMw", [file_google_api_annotations, file_google_protobuf_struct]); + +/** + * @generated from message wellknownconfiguration.WellKnownConfig + */ +export type WellKnownConfig = Message<"wellknownconfiguration.WellKnownConfig"> & { + /** + * @generated from field: map configuration = 1; + */ + configuration: { [key: string]: JsonObject }; +}; + +/** + * Describes the message wellknownconfiguration.WellKnownConfig. + * Use `create(WellKnownConfigSchema)` to create a new message. + */ +export const WellKnownConfigSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_wellknownconfiguration_wellknown_configuration, 0); + +/** + * @generated from message wellknownconfiguration.GetWellKnownConfigurationRequest + */ +export type GetWellKnownConfigurationRequest = Message<"wellknownconfiguration.GetWellKnownConfigurationRequest"> & { +}; + +/** + * Describes the message wellknownconfiguration.GetWellKnownConfigurationRequest. + * Use `create(GetWellKnownConfigurationRequestSchema)` to create a new message. + */ +export const GetWellKnownConfigurationRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_wellknownconfiguration_wellknown_configuration, 1); + +/** + * @generated from message wellknownconfiguration.GetWellKnownConfigurationResponse + */ +export type GetWellKnownConfigurationResponse = Message<"wellknownconfiguration.GetWellKnownConfigurationResponse"> & { + /** + * @generated from field: google.protobuf.Struct configuration = 1; + */ + configuration?: JsonObject; +}; + +/** + * Describes the message wellknownconfiguration.GetWellKnownConfigurationResponse. + * Use `create(GetWellKnownConfigurationResponseSchema)` to create a new message. + */ +export const GetWellKnownConfigurationResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_wellknownconfiguration_wellknown_configuration, 2); + +/** + * @generated from service wellknownconfiguration.WellKnownService + */ +export const WellKnownService: GenService<{ + /** + * @generated from rpc wellknownconfiguration.WellKnownService.GetWellKnownConfiguration + */ + getWellKnownConfiguration: { + methodKind: "unary"; + input: typeof GetWellKnownConfigurationRequestSchema; + output: typeof GetWellKnownConfigurationResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_wellknownconfiguration_wellknown_configuration, 0); + diff --git a/lib/tests/server.ts b/lib/tests/server.ts index 1be20d3d..d614fbee 100644 --- a/lib/tests/server.ts +++ b/lib/tests/server.ts @@ -66,7 +66,16 @@ const kas: RequestListener = async (req, res) => { console.log('[INFO]: server request: ', req.method, req.url, req.headers); res.setHeader( 'Access-Control-Allow-Headers', - 'authorization, content-type, dpop, range, x-test-response, x-test-response-message' + [ + 'authorization', + 'content-type', + 'dpop', + 'range', + 'x-test-response', + 'x-test-response-message', + 'connect-protocol-version', + 'connect-streaming-protocol-version', + ].join(', ') ); res.setHeader('Access-Control-Allow-Origin', '*'); // GET should be allowed for everything except rewrap, POST only for rewrap but IDC @@ -383,6 +392,26 @@ const kas: RequestListener = async (req, res) => { JSON.stringify({ keyAccessServers: [{ uri: 'http://localhost:3000' }], pagination: {} }) ); return; + } else if ( + url.pathname === '/wellknownconfiguration.WellKnownService/GetWellKnownConfiguration' + ) { + res.statusCode = 200; + res.setHeader('Content-Type', 'application/json'); + res.end(JSON.stringify({ health: { endpoint: '/healthz' } })); + return; + } else if (url.pathname === '/policy.attributes.AttributesService/ListAttributes') { + const token = req.headers['authorization'] as string; + if (!token || !token.startsWith('Bearer dummy-auth-token')) { + res.statusCode = 401; + res.setHeader('Content-Type', 'application/json'); + res.end(JSON.stringify({ status: 'error' })); + return; + } else { + res.statusCode = 200; + res.setHeader('Content-Type', 'application/json'); + res.end(JSON.stringify({ status: 'ok' })); + return; + } } else { console.log(`[DEBUG] invalid path [${url.pathname}]`); res.statusCode = 404; diff --git a/lib/tests/web/platform-rpc.test.ts b/lib/tests/web/platform-rpc.test.ts new file mode 100644 index 00000000..1cba9266 --- /dev/null +++ b/lib/tests/web/platform-rpc.test.ts @@ -0,0 +1,48 @@ +import { expect } from '@esm-bundle/chai'; +import { type AuthProvider, HttpRequest, withHeaders } from '../../src/auth/auth.js'; +import { PlatformClient } from '../../src/platform.js'; + +const authProvider = { + updateClientPublicKey: async () => { + /* mocked function */ + }, + withCreds: async (req: HttpRequest): Promise => + withHeaders(req, { + Authorization: + 'Bearer dummy-auth-token eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJ0ZGYiLCJzdWIiOiJKb2huIERvZSIsImlhdCI6MTUxNjIzOTAyMn0.XFu4sQxAd6n-b7urqTdQ-I9zKqKSQtC04unHsMSpJjc', + }), +}; + +const platformUrl = 'http://localhost:3000'; + +describe('Local Platform Connect RPC Client Tests', () => { + it(`wellknown configuration public rpc method`, async () => { + const platform = new PlatformClient({ + authProvider, + platformUrl, + }); + + try { + const response = await platform.v1.wellknown.getWellKnownConfiguration({}); + expect(response.$typeName).to.equal( + 'wellknownconfiguration.GetWellKnownConfigurationResponse' + ); + } catch (e) { + expect.fail('Test failed missing method', e); + } + }); + + it(`policy attribute method with Authorization headers`, async () => { + const platform = new PlatformClient({ + authProvider, + platformUrl, + }); + + try { + const response = await platform.v1.attributes.listAttributes({}); + expect(response.$typeName).to.equal('policy.attributes.ListAttributesResponse'); + } catch (e) { + expect.fail('Test failed missing auth headers', e); + } + }); +}); diff --git a/scripts/platform.sh b/scripts/platform.sh index ee2216e9..927cd978 100755 --- a/scripts/platform.sh +++ b/scripts/platform.sh @@ -7,9 +7,6 @@ rm -rf platform lib/src/platform git clone https://github.com/opentdf/platform.git # Generate Typescript code -cmd=$(npx buf --version) -if [ $? -ne 0 ]; then - npm install @bufbuild/protoc-gen-es @bufbuild/buf @connectrpc/protoc-gen-connect-es -fi -npx buf generate platform/service +cd lib +npx buf generate ../platform/service echo "Generated Typescript code from Protobuf files (src: platform/service, dst: lib/src/platform)" diff --git a/web-app/package-lock.json b/web-app/package-lock.json index 84ea4e5e..b82003b8 100644 --- a/web-app/package-lock.json +++ b/web-app/package-lock.json @@ -337,6 +337,29 @@ "node": ">=6.9.0" } }, + "node_modules/@bufbuild/protobuf": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-2.3.0.tgz", + "integrity": "sha512-WK6zH4MtBp/uesX8KGCnwDDRVnEVHUvwjsigKXcSR57Oo8Oyv1vRS9qyUlSP+6KWRl5z8tNAU5qpf3QodeVYxA==", + "peer": true + }, + "node_modules/@connectrpc/connect": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@connectrpc/connect/-/connect-2.0.2.tgz", + "integrity": "sha512-xZuylIUNvNlH52e/4eQsZvY4QZyDJRtEFEDnn/yBrv5Xi5ZZI/p8X+GAHH35ucVaBvv9u7OzHZo8+tEh1EFTxA==", + "peerDependencies": { + "@bufbuild/protobuf": "^2.2.0" + } + }, + "node_modules/@connectrpc/connect-web": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@connectrpc/connect-web/-/connect-web-2.0.2.tgz", + "integrity": "sha512-QANMFPiL2o66BdBEctg4TsQLe5ozsBLqcle3dCBp7BwGlNGTY6NnNnqmt+YRnpeMW88GgomJwWNMGCrRD9pRKA==", + "peerDependencies": { + "@bufbuild/protobuf": "^2.2.0", + "@connectrpc/connect": "2.0.2" + } + }, "node_modules/@esbuild/aix-ppc64": { "version": "0.25.0", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.0.tgz", @@ -1116,9 +1139,10 @@ "node_modules/@opentdf/sdk": { "version": "0.3.2", "resolved": "file:../lib/opentdf-sdk-0.3.2.tgz", - "integrity": "sha512-mKAJgtQYsB9+EagrdUp9SW5N24GHiui/cae9iCsQ/rPwfZjNeHTPPTXAU3zVUI5JnvFXbr13KA+AhSLzA6gZdQ==", - "license": "BSD-3-Clause-Clear", + "integrity": "sha512-doAuM1uwX2NXXoE0423IddyiOylk1sqQ5Sdn/TuGeOJ4hhRYXMOAxRPd1KPlyBFcsfloNhPt7q6qXaw2kpjHCg==", "dependencies": { + "@connectrpc/connect": "^2.0.2", + "@connectrpc/connect-web": "^2.0.2", "buffer-crc32": "^1.0.0", "dpop": "^1.4.1", "jose": "^6.0.8", @@ -2187,7 +2211,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-1.0.0.tgz", "integrity": "sha512-Db1SbgBS/fg/392AblrMJk97KggmvYhr4pB5ZIMTWtaivCPMWLkmb7m21cJvpvgK+J3nsU2CmmixNBZx4vFj/w==", - "license": "MIT", "engines": { "node": ">=8.0.0" } @@ -2382,7 +2405,6 @@ "version": "1.4.1", "resolved": "https://registry.npmjs.org/dpop/-/dpop-1.4.1.tgz", "integrity": "sha512-+Cus+OlLk9uFWbPZX/RsLpMviYAmyJpJpooto2NDQ0lnk0/S2TblPunC4nVtETOxCIsXvu4YILIOPC7LIHHXIg==", - "license": "MIT", "funding": { "url": "https://github.com/sponsors/panva" } @@ -3166,10 +3188,9 @@ } }, "node_modules/jose": { - "version": "6.0.10", - "resolved": "https://registry.npmjs.org/jose/-/jose-6.0.10.tgz", - "integrity": "sha512-skIAxZqcMkOrSwjJvplIPYrlXGpxTPnro2/QWTDCxAdWQrSTV5/KqspMWmi5WAx5+ULswASJiZ0a+1B/Lxt9cw==", - "license": "MIT", + "version": "6.0.11", + "resolved": "https://registry.npmjs.org/jose/-/jose-6.0.11.tgz", + "integrity": "sha512-QxG7EaliDARm1O1S8BGakqncGT9s25bKL1WSf6/oa17Tkqwi8D2ZNglqCF+DsYF88/rV66Q/Q2mFAy697E1DUg==", "funding": { "url": "https://github.com/sponsors/panva" } @@ -3218,8 +3239,7 @@ "node_modules/json-canonicalize": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/json-canonicalize/-/json-canonicalize-1.0.6.tgz", - "integrity": "sha512-kP2iYpOS5SZHYhIaR1t9oG80d4uTY3jPoaBj+nimy3njtJk8+sRsVatN8pyJRDRtk9Su3+6XqA2U8k0dByJBUQ==", - "license": "MIT" + "integrity": "sha512-kP2iYpOS5SZHYhIaR1t9oG80d4uTY3jPoaBj+nimy3njtJk8+sRsVatN8pyJRDRtk9Su3+6XqA2U8k0dByJBUQ==" }, "node_modules/json-schema-traverse": { "version": "0.4.1", @@ -4672,7 +4692,6 @@ "https://github.com/sponsors/broofa", "https://github.com/sponsors/ctavan" ], - "license": "MIT", "bin": { "uuid": "dist/esm/bin/uuid" } diff --git a/web-app/src/App.css b/web-app/src/App.css index e9cf35e8..18d8c5d2 100644 --- a/web-app/src/App.css +++ b/web-app/src/App.css @@ -1,6 +1,6 @@ .header { align-items: center; - background: linen; + background: #999; display: flex; margin: 0 auto; padding: 0 36px 0 24px; @@ -29,3 +29,8 @@ .selected { font-weight: bolder; } + +textarea { + width: 100%; + height: 200px; +} \ No newline at end of file diff --git a/web-app/src/components/ConnectRpcExample.tsx b/web-app/src/components/ConnectRpcExample.tsx new file mode 100644 index 00000000..23357b92 --- /dev/null +++ b/web-app/src/components/ConnectRpcExample.tsx @@ -0,0 +1,49 @@ +import { AuthProvider } from '@opentdf/sdk'; +import { PlatformClient } from '@opentdf/sdk/platform'; +import { useState } from 'react'; + +interface ConnectRpcExampleProps { + authProvider: AuthProvider; +} + +export function ConnectRpcExample({ authProvider }: ConnectRpcExampleProps) { + const [result, setResult] = useState(''); + + const platform = new PlatformClient({ + authProvider, + platformUrl: '/api', + }); + + const handleWellknown = async () => { + const response = await platform.v1.wellknown.getWellKnownConfiguration({}); + setResult(JSON.stringify(response.configuration)); + }; + + const handleKas = async () => { + const response = await platform.v1.access.publicKey({}); + setResult(response.publicKey); + }; + + const handlePolicy = async () => { + const response = await platform.v1.attributes.listAttributes({}); + setResult(response.attributes.map((s) => `${s}`).join(',')); + }; + + return ( + <> +
+ Connect RPC + + + + +
+ + ); +} diff --git a/web-app/src/config.ts b/web-app/src/config.ts index bfb01765..b9d587db 100644 --- a/web-app/src/config.ts +++ b/web-app/src/config.ts @@ -14,7 +14,8 @@ function cfg(): TDFConfig { if (!VITE_TDF_CFG) { return { oidc: { - host: 'http://localhost:65432/auth/realms/opentdf', + // points to keycloak login otherwise iss won't match + host: 'http://localhost:8888/auth/realms/opentdf', clientId: 'browsertest', }, kas: 'http://localhost:65432/kas', diff --git a/web-app/vite.config.ts b/web-app/vite.config.ts index 012a4036..d40dc93f 100644 --- a/web-app/vite.config.ts +++ b/web-app/vite.config.ts @@ -1,19 +1,24 @@ -import { createRequire } from 'node:module' +import { createRequire } from 'node:module'; import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; -const require = createRequire(import.meta.url) +const require = createRequire(import.meta.url); -function proxy(): Record { +function proxy(): Record { const { VITE_PROXY } = process.env; if (VITE_PROXY) { console.log(`using VITE_PROXY [${VITE_PROXY}]`); return JSON.parse(VITE_PROXY); } - console.log("using standard VITE_PROXY"); + console.log('using standard VITE_PROXY'); return { '/kas': 'http://localhost:8080', '/auth': 'http://localhost:8888', + '/api': { + target: 'http://localhost:8080', + changeOrigin: true, + rewrite: (path) => path.replace(/^\/api/, ''), + }, }; } @@ -21,8 +26,8 @@ function proxy(): Record { export default defineConfig({ build: { rollupOptions: { - shimMissingExports: true - } + shimMissingExports: true, + }, }, plugins: [react()], server: {