diff --git a/.gitignore b/.gitignore index 6f5fb6a77..86ae609ad 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ dist/ .vscode/ .fuzzer/ keto +!keto/ \ No newline at end of file diff --git a/.schema/version.schema.json b/.schema/version.schema.json index 702fd485d..4ae090cce 100644 --- a/.schema/version.schema.json +++ b/.schema/version.schema.json @@ -1,227 +1,201 @@ { - "$id": "https://github.com/ory/keto/.schema/versions.config.schema.json", - "$schema": "http://json-schema.org/draft-07/schema#", - "oneOf": [ - { - "allOf": [ - { - "properties": { - "version": { - "const": "v0.12.0-alpha.0" - } - }, - "required": [ - "version" - ] - }, - { - "$ref": "https://raw.githubusercontent.com/ory/keto/v0.12.0-alpha.0/.schema/config.schema.json" - } - ] + "$id": "https://github.com/ory/keto/.schema/versions.config.schema.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "oneOf": [ + { + "allOf": [ + { + "properties": { + "version": { + "const": "v0.12.0-alpha.0" + } + }, + "required": ["version"] }, { - "allOf": [ - { - "properties": { - "version": { - "const": "v0.11.1-alpha.0" - } - }, - "required": [ - "version" - ] - }, - { - "$ref": "https://raw.githubusercontent.com/ory/keto/v0.11.1-alpha.0/.schema/config.schema.json" - } - ] + "$ref": "https://raw.githubusercontent.com/ory/keto/v0.12.0-alpha.0/.schema/config.schema.json" + } + ] + }, + { + "allOf": [ + { + "properties": { + "version": { + "const": "v0.11.1-alpha.0" + } + }, + "required": ["version"] }, { - "allOf": [ - { - "properties": { - "version": { - "const": "v0.11.0-alpha.0" - } - }, - "required": [ - "version" - ] - }, - { - "$ref": "https://raw.githubusercontent.com/ory/keto/v0.11.0-alpha.0/.schema/config.schema.json" - } - ] + "$ref": "https://raw.githubusercontent.com/ory/keto/v0.11.1-alpha.0/.schema/config.schema.json" + } + ] + }, + { + "allOf": [ + { + "properties": { + "version": { + "const": "v0.11.0-alpha.0" + } + }, + "required": ["version"] }, { - "allOf": [ - { - "properties": { - "version": { - "const": "v0.10.0-alpha.0" - } - }, - "required": [ - "version" - ] - }, - { - "$ref": "https://raw.githubusercontent.com/ory/keto/v0.10.0-alpha.0/.schema/config.schema.json" - } - ] + "$ref": "https://raw.githubusercontent.com/ory/keto/v0.11.0-alpha.0/.schema/config.schema.json" + } + ] + }, + { + "allOf": [ + { + "properties": { + "version": { + "const": "v0.10.0-alpha.0" + } + }, + "required": ["version"] }, { - "allOf": [ - { - "properties": { - "version": { - "const": "v0.9.0-alpha.0" - } - }, - "required": [ - "version" - ] - }, - { - "$ref": "https://raw.githubusercontent.com/ory/keto/v0.9.0-alpha.0/.schema/config.schema.json" - } - ] + "$ref": "https://raw.githubusercontent.com/ory/keto/v0.10.0-alpha.0/.schema/config.schema.json" + } + ] + }, + { + "allOf": [ + { + "properties": { + "version": { + "const": "v0.9.0-alpha.0" + } + }, + "required": ["version"] }, { - "allOf": [ - { - "properties": { - "version": { - "const": "v0.8.0-alpha.2" - } - }, - "required": [ - "version" - ] - }, - { - "$ref": "https://raw.githubusercontent.com/ory/keto/v0.8.0-alpha.2/.schema/config.schema.json" - } - ] + "$ref": "https://raw.githubusercontent.com/ory/keto/v0.9.0-alpha.0/.schema/config.schema.json" + } + ] + }, + { + "allOf": [ + { + "properties": { + "version": { + "const": "v0.8.0-alpha.2" + } + }, + "required": ["version"] }, { - "allOf": [ - { - "properties": { - "version": { - "const": "v0.6.0-alpha.1" - } - }, - "required": [ - "version" - ] - }, - { - "$ref": "https://raw.githubusercontent.com/ory/keto/v0.6.0-alpha.1/internal/driver/config/config.schema.json" - } - ] + "$ref": "https://raw.githubusercontent.com/ory/keto/v0.8.0-alpha.2/.schema/config.schema.json" + } + ] + }, + { + "allOf": [ + { + "properties": { + "version": { + "const": "v0.6.0-alpha.1" + } + }, + "required": ["version"] }, { - "allOf": [ - { - "properties": { - "version": { - "const": "v0.6.0-alpha.3" - } - }, - "required": [ - "version" - ] - }, - { - "$ref": "https://raw.githubusercontent.com/ory/keto/v0.6.0-alpha.3/internal/driver/config/config.schema.json" - } - ] + "$ref": "https://raw.githubusercontent.com/ory/keto/v0.6.0-alpha.1/internal/driver/config/config.schema.json" + } + ] + }, + { + "allOf": [ + { + "properties": { + "version": { + "const": "v0.6.0-alpha.3" + } + }, + "required": ["version"] }, { - "allOf": [ - { - "properties": { - "version": { - "const": "v0.7.0-alpha.0" - } - }, - "required": [ - "version" - ] - }, - { - "$ref": "https://raw.githubusercontent.com/ory/keto/v0.7.0-alpha.0/.schema/config.schema.json" - } - ] + "$ref": "https://raw.githubusercontent.com/ory/keto/v0.6.0-alpha.3/internal/driver/config/config.schema.json" + } + ] + }, + { + "allOf": [ + { + "properties": { + "version": { + "const": "v0.7.0-alpha.0" + } + }, + "required": ["version"] }, { - "allOf": [ - { - "properties": { - "version": { - "const": "v0.7.0-alpha.1" - } - }, - "required": [ - "version" - ] - }, - { - "$ref": "https://raw.githubusercontent.com/ory/keto/v0.7.0-alpha.1/.schema/config.schema.json" - } - ] + "$ref": "https://raw.githubusercontent.com/ory/keto/v0.7.0-alpha.0/.schema/config.schema.json" + } + ] + }, + { + "allOf": [ + { + "properties": { + "version": { + "const": "v0.7.0-alpha.1" + } + }, + "required": ["version"] }, { - "allOf": [ - { - "properties": { - "version": { - "const": "v0.8.0-alpha.1" - } - }, - "required": [ - "version" - ] - }, - { - "$ref": "https://raw.githubusercontent.com/ory/keto/v0.8.0-alpha.1/.schema/config.schema.json" - } - ] + "$ref": "https://raw.githubusercontent.com/ory/keto/v0.7.0-alpha.1/.schema/config.schema.json" + } + ] + }, + { + "allOf": [ + { + "properties": { + "version": { + "const": "v0.8.0-alpha.1" + } + }, + "required": ["version"] }, { - "allOf": [ - { - "oneOf": [ - { - "properties": { - "version": { - "type": "string", - "maxLength": 0 - } - }, - "required": [ - "version" - ] - }, - { - "not": { - "properties": { - "version": {} - }, - "required": [ - "version" - ] - } - } - ] - }, - { - "$ref": "#/oneOf/0/allOf/1" + "$ref": "https://raw.githubusercontent.com/ory/keto/v0.8.0-alpha.1/.schema/config.schema.json" + } + ] + }, + { + "allOf": [ + { + "oneOf": [ + { + "properties": { + "version": { + "type": "string", + "maxLength": 0 } - ] + }, + "required": ["version"] + }, + { + "not": { + "properties": { + "version": {} + }, + "required": ["version"] + } + } + ] + }, + { + "$ref": "#/oneOf/0/allOf/1" } - ], - "title": "All Versions of the ORY Keto Configuration", - "type": "object" -} \ No newline at end of file + ] + } + ], + "title": "All Versions of the ORY Keto Configuration", + "type": "object" +} diff --git a/Makefile b/Makefile index dc06e7f12..164d6249e 100644 --- a/Makefile +++ b/Makefile @@ -103,7 +103,7 @@ build: # .PHONY: buf-gen buf-gen: .bin/buf .bin/protoc-gen-doc node_modules - buf generate proto + buf generate make format @echo "All code was generated successfully!" diff --git a/buf.gen.yaml b/buf.gen.yaml index b6ef22cdb..3196c47ff 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -9,20 +9,17 @@ plugins: out: proto opt: paths=source_relative,require_unimplemented_servers=false - - plugin: buf.build/protocolbuffers/js - out: proto - opt: import_style=commonjs,binary - - - plugin: buf.build/grpc/node + - name: doc out: proto - opt: grpc_js,binary,import_style=commonjs + opt: proto/markdown.tmpl,proto/buf.md + strategy: all - name: ts out: proto - opt: ts_out=proto - path: node_modules/.bin/protoc-gen-ts - - - name: doc - out: proto - opt: proto/markdown.tmpl,proto/buf.md strategy: all + path: node_modules/ts-proto/protoc-gen-ts_proto + opt: + - outputServices=nice-grpc + - outputServices=generic-definitions + - importSuffix=.js + - esModuleInterop=true diff --git a/buf.work.yaml b/buf.work.yaml new file mode 100644 index 000000000..1878b341b --- /dev/null +++ b/buf.work.yaml @@ -0,0 +1,3 @@ +version: v1 +directories: + - proto diff --git a/buf.yaml b/buf.yaml new file mode 100644 index 000000000..699d0d8b9 --- /dev/null +++ b/buf.yaml @@ -0,0 +1,3 @@ +version: v1 +build: + excludes: [node_modules, proto/node_modules] diff --git a/package-lock.json b/package-lock.json index daae9ad8b..a056762e1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,8 +10,7 @@ "license": "Apache 2.0", "dependencies": { "@openapitools/openapi-generator-cli": "^2.7.0", - "grpc_tools_node_protoc_ts": "^5.3.3", - "grpc-tools": "^1.12.4" + "ts-proto": "1.167.2" }, "devDependencies": { "@ory/keto-namespace-types": "file:contrib/namespace-type-lib", @@ -39,25 +38,6 @@ "node": ">=8" } }, - "node_modules/@mapbox/node-pre-gyp": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.10.tgz", - "integrity": "sha512-4ySo4CjzStuprMwk35H5pPbkymjv1SF3jGLj6rAHp/xT/RF7TL7bd9CTm1xDY49K2qF7jmR/g7k+SkLETP6opA==", - "dependencies": { - "detect-libc": "^2.0.0", - "https-proxy-agent": "^5.0.0", - "make-dir": "^3.1.0", - "node-fetch": "^2.6.7", - "nopt": "^5.0.0", - "npmlog": "^5.0.1", - "rimraf": "^3.0.2", - "semver": "^7.3.5", - "tar": "^6.1.11" - }, - "bin": { - "node-pre-gyp": "bin/node-pre-gyp" - } - }, "node_modules/@nestjs/axios": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/@nestjs/axios/-/axios-0.1.0.tgz", @@ -266,6 +246,60 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", "dev": true }, + "node_modules/@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==" + }, + "node_modules/@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" + }, + "node_modules/@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" + }, + "node_modules/@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" + }, + "node_modules/@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", + "dependencies": { + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" + } + }, + "node_modules/@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" + }, + "node_modules/@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" + }, + "node_modules/@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" + }, + "node_modules/@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" + }, + "node_modules/@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" + }, "node_modules/@textlint/ast-node-types": { "version": "12.1.1", "resolved": "https://registry.npmjs.org/@textlint/ast-node-types/-/ast-node-types-12.1.1.tgz", @@ -297,6 +331,14 @@ "@types/unist": "*" } }, + "node_modules/@types/node": { + "version": "20.11.16", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.16.tgz", + "integrity": "sha512-gKb0enTmRCzXSSUJDq6/sPcqrfCv2mkkG6Jt/clpn5eiCbKTY+SgZUxo+p8ZKMof5dCp9vHQUAB7wOUTod22wQ==", + "dependencies": { + "undici-types": "~5.26.4" + } + }, "node_modules/@types/unist": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.6.tgz", @@ -306,18 +348,8 @@ "node_modules/abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" - }, - "node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true }, "node_modules/anchor-markdown-header": { "version": "0.5.7", @@ -364,23 +396,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/aproba": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", - "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==" - }, - "node_modules/are-we-there-yet": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz", - "integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==", - "dependencies": { - "delegates": "^1.0.0", - "readable-stream": "^3.6.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/array-find-index": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", @@ -534,6 +549,17 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/case-anything": { + "version": "2.1.13", + "resolved": "https://registry.npmjs.org/case-anything/-/case-anything-2.1.13.tgz", + "integrity": "sha512-zlOQ80VrQ2Ue+ymH5OuM/DlDq64mEm+B9UTdHULv5osUMD6HalNTblf2b1u/m6QecjsnOkBpqVZ+XPwIVsy7Ng==", + "engines": { + "node": ">=12.13" + }, + "funding": { + "url": "https://github.com/sponsors/mesqueeb" + } + }, "node_modules/ccount": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/ccount/-/ccount-1.1.0.tgz", @@ -594,14 +620,6 @@ "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==" }, - "node_modules/chownr": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", - "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", - "engines": { - "node": ">=10" - } - }, "node_modules/cli-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", @@ -666,14 +684,6 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, - "node_modules/color-support": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", - "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", - "bin": { - "color-support": "bin.js" - } - }, "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -759,11 +769,6 @@ "resolved": "https://registry.npmjs.org/consola/-/consola-2.15.3.tgz", "integrity": "sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==" }, - "node_modules/console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==" - }, "node_modules/console.table": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/console.table/-/console.table-0.10.0.tgz", @@ -805,6 +810,7 @@ "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, "dependencies": { "ms": "2.1.2" }, @@ -888,11 +894,6 @@ "node": ">=0.4.0" } }, - "node_modules/delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==" - }, "node_modules/detect-indent": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-7.0.1.tgz", @@ -902,14 +903,6 @@ "node": ">=12.20" } }, - "node_modules/detect-libc": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz", - "integrity": "sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==", - "engines": { - "node": ">=8" - } - }, "node_modules/detect-newline": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-4.0.1.tgz", @@ -1025,6 +1018,25 @@ "url": "https://github.com/fb55/domutils?sponsor=1" } }, + "node_modules/dprint-node": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/dprint-node/-/dprint-node-1.0.8.tgz", + "integrity": "sha512-iVKnUtYfGrYcW1ZAlfR/F59cUVL8QIhWoBJoSjkkdua/dkWIgjZfiLMeTjiB06X0ZLkQ0M2C1VbUj/CxkIf1zg==", + "dependencies": { + "detect-libc": "^1.0.3" + } + }, + "node_modules/dprint-node/node_modules/detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", + "bin": { + "detect-libc": "bin/detect-libc.js" + }, + "engines": { + "node": ">=0.10" + } + }, "node_modules/easy-table": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/easy-table/-/easy-table-1.1.0.tgz", @@ -1282,17 +1294,6 @@ "node": ">=12" } }, - "node_modules/fs-minipass": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", - "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -1304,25 +1305,6 @@ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, - "node_modules/gauge": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz", - "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==", - "dependencies": { - "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.2", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.1", - "object-assign": "^4.1.1", - "signal-exit": "^3.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wide-align": "^1.1.2" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -1414,61 +1396,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/google-protobuf": { - "version": "3.15.8", - "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.15.8.tgz", - "integrity": "sha512-2jtfdqTaSxk0cuBJBtTTWsot4WtR9RVr2rXg7x7OoqiuOKopPrwXpM1G4dXIkLcUNRh3RKzz76C8IOkksZSeOw==" - }, "node_modules/graceful-fs": { "version": "4.2.10", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" }, - "node_modules/grpc_tools_node_protoc_ts": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/grpc_tools_node_protoc_ts/-/grpc_tools_node_protoc_ts-5.3.3.tgz", - "integrity": "sha512-M/YrklvVXMtuuj9kb42PxeouZhs7Ul+R4e/31XwrankUcKL8cQQP50Q9q+KEHGyHQaPt6VtKKsxMgLaKbCxeww==", - "dependencies": { - "google-protobuf": "3.15.8", - "handlebars": "4.7.7" - }, - "bin": { - "protoc-gen-ts": "bin/protoc-gen-ts" - } - }, - "node_modules/grpc-tools": { - "version": "1.12.4", - "resolved": "https://registry.npmjs.org/grpc-tools/-/grpc-tools-1.12.4.tgz", - "integrity": "sha512-5+mLAJJma3BjnW/KQp6JBjUMgvu7Mu3dBvBPd1dcbNIb+qiR0817zDpgPjS7gRb+l/8EVNIa3cB02xI9JLToKg==", - "hasInstallScript": true, - "dependencies": { - "@mapbox/node-pre-gyp": "^1.0.5" - }, - "bin": { - "grpc_tools_node_protoc": "bin/protoc.js", - "grpc_tools_node_protoc_plugin": "bin/protoc_plugin.js" - } - }, - "node_modules/handlebars": { - "version": "4.7.7", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", - "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", - "dependencies": { - "minimist": "^1.2.5", - "neo-async": "^2.6.0", - "source-map": "^0.6.1", - "wordwrap": "^1.0.0" - }, - "bin": { - "handlebars": "bin/handlebars" - }, - "engines": { - "node": ">=0.4.7" - }, - "optionalDependencies": { - "uglify-js": "^3.1.4" - } - }, "node_modules/has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -1489,11 +1421,6 @@ "node": ">=8" } }, - "node_modules/has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==" - }, "node_modules/hosted-git-info": { "version": "2.8.9", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", @@ -1519,18 +1446,6 @@ "entities": "^3.0.1" } }, - "node_modules/https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", - "dependencies": { - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/human-signals": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz", @@ -2012,6 +1927,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/long": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" + }, "node_modules/longest-streak": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-2.0.4.tgz", @@ -2022,39 +1942,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/make-dir/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/markdown-table": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-2.0.0.tgz", @@ -2434,57 +2321,20 @@ "node_modules/minimist": { "version": "1.2.6", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" - }, - "node_modules/minipass": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.4.tgz", - "integrity": "sha512-I9WPbWHCGu8W+6k1ZiGpPu0GkoKBeorkfKNuAFBNS1HNFJvke82sxvI5bzcCNpWPorkOO5QQ+zomzzwRxejXiw==", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/minizlib": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", - "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", - "dependencies": { - "minipass": "^3.0.0", - "yallist": "^4.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", + "dev": true }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true }, "node_modules/mute-stream": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==" }, - "node_modules/neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" - }, "node_modules/node-fetch": { "version": "2.6.7", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", @@ -2504,20 +2354,6 @@ } } }, - "node_modules/nopt": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", - "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", - "dependencies": { - "abbrev": "1" - }, - "bin": { - "nopt": "bin/nopt.js" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/normalize-package-data": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", @@ -2572,25 +2408,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/npmlog": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz", - "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==", - "dependencies": { - "are-we-there-yet": "^2.0.0", - "console-control-strings": "^1.1.0", - "gauge": "^3.0.0", - "set-blocking": "^2.0.0" - } - }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -2792,6 +2609,29 @@ } } }, + "node_modules/protobufjs": { + "version": "7.2.6", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.6.tgz", + "integrity": "sha512-dgJaEDDL6x8ASUZ1YqWciTRrdOuYNzoOf27oHNfdyvKqHr5i0FV7FSLU+aIeFjyFgVxrpTOtQUi0BLLBymZaBw==", + "hasInstallScript": true, + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/node": ">=13.7.0", + "long": "^5.0.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -2991,20 +2831,6 @@ "node": ">=0.10.0" } }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/run-applescript": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-5.0.0.tgz", @@ -3153,25 +2979,6 @@ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, - "node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==" - }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -3255,14 +3062,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/spawn-command": { "version": "0.0.2-1", "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz", @@ -3422,22 +3221,6 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", "dev": true }, - "node_modules/tar": { - "version": "6.1.11", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz", - "integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==", - "dependencies": { - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "minipass": "^3.0.0", - "minizlib": "^2.1.1", - "mkdirp": "^1.0.3", - "yallist": "^4.0.0" - }, - "engines": { - "node": ">= 10" - } - }, "node_modules/through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", @@ -3516,6 +3299,37 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/ts-poet": { + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/ts-poet/-/ts-poet-6.6.0.tgz", + "integrity": "sha512-4vEH/wkhcjRPFOdBwIh9ItO6jOoumVLRF4aABDX5JSNEubSqwOulihxQPqai+OkuygJm3WYMInxXQX4QwVNMuw==", + "dependencies": { + "dprint-node": "^1.0.7" + } + }, + "node_modules/ts-proto": { + "version": "1.167.2", + "resolved": "https://registry.npmjs.org/ts-proto/-/ts-proto-1.167.2.tgz", + "integrity": "sha512-7y/BLjiUZphgCe+SZBEG20DP94VK7BHpHcl5fkeN8lRCeABNIsiI54FkUQ8pe7PsHLVpFKqMO5aRLx74FX+4iA==", + "dependencies": { + "case-anything": "^2.1.13", + "protobufjs": "^7.2.4", + "ts-poet": "^6.5.0", + "ts-proto-descriptors": "1.15.0" + }, + "bin": { + "protoc-gen-ts_proto": "protoc-gen-ts_proto" + } + }, + "node_modules/ts-proto-descriptors": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/ts-proto-descriptors/-/ts-proto-descriptors-1.15.0.tgz", + "integrity": "sha512-TYyJ7+H+7Jsqawdv+mfsEpZPTIj9siDHS6EMCzG/z3b/PZiphsX+mWtqFfFVe5/N0Th6V3elK9lQqjnrgTOfrg==", + "dependencies": { + "long": "^5.2.3", + "protobufjs": "^7.2.4" + } + }, "node_modules/tslib": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", @@ -3545,18 +3359,6 @@ "node": ">=4.2.0" } }, - "node_modules/uglify-js": { - "version": "3.16.1", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.16.1.tgz", - "integrity": "sha512-X5BGTIDH8U6IQ1TIRP62YC36k+ULAa1d59BxlWvPUJ1NkW5L3FwcGfEzuVvGmhJFBu0YJ5Ge25tmRISqCmLiRQ==", - "optional": true, - "bin": { - "uglifyjs": "bin/uglifyjs" - }, - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/uid": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/uid/-/uid-2.0.1.tgz", @@ -3574,6 +3376,11 @@ "integrity": "sha512-BQFnUDuAQ4Yf/cYY5LNrK9NCJFKriaRbD9uR1fTeXnBeoa97W0i41qkZfGO9pSo8I5KzjAcSY2XYtdf0oKd7KQ==", "dev": true }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + }, "node_modules/unified": { "version": "9.2.2", "resolved": "https://registry.npmjs.org/unified/-/unified-9.2.2.tgz", @@ -3740,19 +3547,6 @@ "node": ">= 8" } }, - "node_modules/wide-align": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", - "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", - "dependencies": { - "string-width": "^1.0.2 || 2 || 3 || 4" - } - }, - "node_modules/wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==" - }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -3782,11 +3576,6 @@ "node": ">=10" } }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - }, "node_modules/yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", @@ -3829,22 +3618,6 @@ "resolved": "https://registry.npmjs.org/@lukeed/csprng/-/csprng-1.1.0.tgz", "integrity": "sha512-Z7C/xXCiGWsg0KuKsHTKJxbWhpI3Vs5GwLfOean7MGyVFGqdRgBbAjOCh6u4bbjPc/8MJ2pZmK/0DLdCbivLDA==" }, - "@mapbox/node-pre-gyp": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.10.tgz", - "integrity": "sha512-4ySo4CjzStuprMwk35H5pPbkymjv1SF3jGLj6rAHp/xT/RF7TL7bd9CTm1xDY49K2qF7jmR/g7k+SkLETP6opA==", - "requires": { - "detect-libc": "^2.0.0", - "https-proxy-agent": "^5.0.0", - "make-dir": "^3.1.0", - "node-fetch": "^2.6.7", - "nopt": "^5.0.0", - "npmlog": "^5.0.1", - "rimraf": "^3.0.2", - "semver": "^7.3.5", - "tar": "^6.1.11" - } - }, "@nestjs/axios": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/@nestjs/axios/-/axios-0.1.0.tgz", @@ -3978,6 +3751,60 @@ } } }, + "@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==" + }, + "@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" + }, + "@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" + }, + "@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" + }, + "@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", + "requires": { + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" + } + }, + "@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" + }, + "@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" + }, + "@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" + }, + "@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" + }, + "@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" + }, "@textlint/ast-node-types": { "version": "12.1.1", "resolved": "https://registry.npmjs.org/@textlint/ast-node-types/-/ast-node-types-12.1.1.tgz", @@ -4009,6 +3836,14 @@ "@types/unist": "*" } }, + "@types/node": { + "version": "20.11.16", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.16.tgz", + "integrity": "sha512-gKb0enTmRCzXSSUJDq6/sPcqrfCv2mkkG6Jt/clpn5eiCbKTY+SgZUxo+p8ZKMof5dCp9vHQUAB7wOUTod22wQ==", + "requires": { + "undici-types": "~5.26.4" + } + }, "@types/unist": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.6.tgz", @@ -4018,15 +3853,8 @@ "abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" - }, - "agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "requires": { - "debug": "4" - } + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true }, "anchor-markdown-header": { "version": "0.5.7", @@ -4058,20 +3886,6 @@ "color-convert": "^2.0.1" } }, - "aproba": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", - "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==" - }, - "are-we-there-yet": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz", - "integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==", - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^3.6.0" - } - }, "array-find-index": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", @@ -4175,6 +3989,11 @@ "run-applescript": "^5.0.0" } }, + "case-anything": { + "version": "2.1.13", + "resolved": "https://registry.npmjs.org/case-anything/-/case-anything-2.1.13.tgz", + "integrity": "sha512-zlOQ80VrQ2Ue+ymH5OuM/DlDq64mEm+B9UTdHULv5osUMD6HalNTblf2b1u/m6QecjsnOkBpqVZ+XPwIVsy7Ng==" + }, "ccount": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/ccount/-/ccount-1.1.0.tgz", @@ -4213,11 +4032,6 @@ "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==" }, - "chownr": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", - "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==" - }, "cli-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", @@ -4264,11 +4078,6 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, - "color-support": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", - "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==" - }, "combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -4335,11 +4144,6 @@ "resolved": "https://registry.npmjs.org/consola/-/consola-2.15.3.tgz", "integrity": "sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==" }, - "console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==" - }, "console.table": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/console.table/-/console.table-0.10.0.tgz", @@ -4368,6 +4172,7 @@ "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, "requires": { "ms": "2.1.2" } @@ -4419,22 +4224,12 @@ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" }, - "delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==" - }, "detect-indent": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-7.0.1.tgz", "integrity": "sha512-Mc7QhQ8s+cLrnUfU/Ji94vG/r8M26m8f++vyres4ZoojaRDpZ1eSIh/EpzLNwlWuvzSZ3UbDFspjFvTDXe6e/g==", "dev": true }, - "detect-libc": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz", - "integrity": "sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==" - }, "detect-newline": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-4.0.1.tgz", @@ -4519,6 +4314,21 @@ "domhandler": "^4.2.0" } }, + "dprint-node": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/dprint-node/-/dprint-node-1.0.8.tgz", + "integrity": "sha512-iVKnUtYfGrYcW1ZAlfR/F59cUVL8QIhWoBJoSjkkdua/dkWIgjZfiLMeTjiB06X0ZLkQ0M2C1VbUj/CxkIf1zg==", + "requires": { + "detect-libc": "^1.0.3" + }, + "dependencies": { + "detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==" + } + } + }, "easy-table": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/easy-table/-/easy-table-1.1.0.tgz", @@ -4705,14 +4515,6 @@ "universalify": "^2.0.0" } }, - "fs-minipass": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", - "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "requires": { - "minipass": "^3.0.0" - } - }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -4724,22 +4526,6 @@ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, - "gauge": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz", - "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==", - "requires": { - "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.2", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.1", - "object-assign": "^4.1.1", - "signal-exit": "^3.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wide-align": "^1.1.2" - } - }, "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -4798,45 +4584,11 @@ "slash": "^4.0.0" } }, - "google-protobuf": { - "version": "3.15.8", - "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.15.8.tgz", - "integrity": "sha512-2jtfdqTaSxk0cuBJBtTTWsot4WtR9RVr2rXg7x7OoqiuOKopPrwXpM1G4dXIkLcUNRh3RKzz76C8IOkksZSeOw==" - }, "graceful-fs": { "version": "4.2.10", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" }, - "grpc_tools_node_protoc_ts": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/grpc_tools_node_protoc_ts/-/grpc_tools_node_protoc_ts-5.3.3.tgz", - "integrity": "sha512-M/YrklvVXMtuuj9kb42PxeouZhs7Ul+R4e/31XwrankUcKL8cQQP50Q9q+KEHGyHQaPt6VtKKsxMgLaKbCxeww==", - "requires": { - "google-protobuf": "3.15.8", - "handlebars": "4.7.7" - } - }, - "grpc-tools": { - "version": "1.12.4", - "resolved": "https://registry.npmjs.org/grpc-tools/-/grpc-tools-1.12.4.tgz", - "integrity": "sha512-5+mLAJJma3BjnW/KQp6JBjUMgvu7Mu3dBvBPd1dcbNIb+qiR0817zDpgPjS7gRb+l/8EVNIa3cB02xI9JLToKg==", - "requires": { - "@mapbox/node-pre-gyp": "^1.0.5" - } - }, - "handlebars": { - "version": "4.7.7", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", - "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", - "requires": { - "minimist": "^1.2.5", - "neo-async": "^2.6.0", - "source-map": "^0.6.1", - "uglify-js": "^3.1.4", - "wordwrap": "^1.0.0" - } - }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -4851,11 +4603,6 @@ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" }, - "has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==" - }, "hosted-git-info": { "version": "2.8.9", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", @@ -4874,15 +4621,6 @@ "entities": "^3.0.1" } }, - "https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", - "requires": { - "agent-base": "6", - "debug": "4" - } - }, "human-signals": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz", @@ -5211,35 +4949,17 @@ "is-unicode-supported": "^0.1.0" } }, + "long": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" + }, "longest-streak": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-2.0.4.tgz", "integrity": "sha512-vM6rUVCVUJJt33bnmHiZEvr7wPT78ztX7rojL+LW51bHtLh6HTjx84LA5W4+oa6aKEJA7jJu5LR6vQRBpA5DVg==", "dev": true }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "requires": { - "yallist": "^4.0.0" - } - }, - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "requires": { - "semver": "^6.0.0" - }, - "dependencies": { - "semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==" - } - } - }, "markdown-table": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-2.0.0.tgz", @@ -5507,45 +5227,20 @@ "minimist": { "version": "1.2.6", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" - }, - "minipass": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.4.tgz", - "integrity": "sha512-I9WPbWHCGu8W+6k1ZiGpPu0GkoKBeorkfKNuAFBNS1HNFJvke82sxvI5bzcCNpWPorkOO5QQ+zomzzwRxejXiw==", - "requires": { - "yallist": "^4.0.0" - } - }, - "minizlib": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", - "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", - "requires": { - "minipass": "^3.0.0", - "yallist": "^4.0.0" - } - }, - "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", + "dev": true }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true }, "mute-stream": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==" }, - "neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" - }, "node-fetch": { "version": "2.6.7", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", @@ -5554,14 +5249,6 @@ "whatwg-url": "^5.0.0" } }, - "nopt": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", - "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", - "requires": { - "abbrev": "1" - } - }, "normalize-package-data": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", @@ -5605,22 +5292,6 @@ } } }, - "npmlog": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz", - "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==", - "requires": { - "are-we-there-yet": "^2.0.0", - "console-control-strings": "^1.1.0", - "gauge": "^3.0.0", - "set-blocking": "^2.0.0" - } - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==" - }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -5762,6 +5433,25 @@ "synckit": "0.8.5" } }, + "protobufjs": { + "version": "7.2.6", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.6.tgz", + "integrity": "sha512-dgJaEDDL6x8ASUZ1YqWciTRrdOuYNzoOf27oHNfdyvKqHr5i0FV7FSLU+aIeFjyFgVxrpTOtQUi0BLLBymZaBw==", + "requires": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/node": ">=13.7.0", + "long": "^5.0.0" + } + }, "queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -5906,14 +5596,6 @@ "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", "dev": true }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "requires": { - "glob": "^7.1.3" - } - }, "run-applescript": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-5.0.0.tgz", @@ -6008,19 +5690,6 @@ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, - "semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "requires": { - "lru-cache": "^6.0.0" - } - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==" - }, "shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -6082,11 +5751,6 @@ } } }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, "spawn-command": { "version": "0.0.2-1", "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz", @@ -6223,19 +5887,6 @@ } } }, - "tar": { - "version": "6.1.11", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz", - "integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==", - "requires": { - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "minipass": "^3.0.0", - "minizlib": "^2.1.1", - "mkdirp": "^1.0.3", - "yallist": "^4.0.0" - } - }, "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", @@ -6292,6 +5943,34 @@ "integrity": "sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA==", "dev": true }, + "ts-poet": { + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/ts-poet/-/ts-poet-6.6.0.tgz", + "integrity": "sha512-4vEH/wkhcjRPFOdBwIh9ItO6jOoumVLRF4aABDX5JSNEubSqwOulihxQPqai+OkuygJm3WYMInxXQX4QwVNMuw==", + "requires": { + "dprint-node": "^1.0.7" + } + }, + "ts-proto": { + "version": "1.167.2", + "resolved": "https://registry.npmjs.org/ts-proto/-/ts-proto-1.167.2.tgz", + "integrity": "sha512-7y/BLjiUZphgCe+SZBEG20DP94VK7BHpHcl5fkeN8lRCeABNIsiI54FkUQ8pe7PsHLVpFKqMO5aRLx74FX+4iA==", + "requires": { + "case-anything": "^2.1.13", + "protobufjs": "^7.2.4", + "ts-poet": "^6.5.0", + "ts-proto-descriptors": "1.15.0" + } + }, + "ts-proto-descriptors": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/ts-proto-descriptors/-/ts-proto-descriptors-1.15.0.tgz", + "integrity": "sha512-TYyJ7+H+7Jsqawdv+mfsEpZPTIj9siDHS6EMCzG/z3b/PZiphsX+mWtqFfFVe5/N0Th6V3elK9lQqjnrgTOfrg==", + "requires": { + "long": "^5.2.3", + "protobufjs": "^7.2.4" + } + }, "tslib": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", @@ -6308,12 +5987,6 @@ "integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==", "dev": true }, - "uglify-js": { - "version": "3.16.1", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.16.1.tgz", - "integrity": "sha512-X5BGTIDH8U6IQ1TIRP62YC36k+ULAa1d59BxlWvPUJ1NkW5L3FwcGfEzuVvGmhJFBu0YJ5Ge25tmRISqCmLiRQ==", - "optional": true - }, "uid": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/uid/-/uid-2.0.1.tgz", @@ -6328,6 +6001,11 @@ "integrity": "sha512-BQFnUDuAQ4Yf/cYY5LNrK9NCJFKriaRbD9uR1fTeXnBeoa97W0i41qkZfGO9pSo8I5KzjAcSY2XYtdf0oKd7KQ==", "dev": true }, + "undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + }, "unified": { "version": "9.2.2", "resolved": "https://registry.npmjs.org/unified/-/unified-9.2.2.tgz", @@ -6458,19 +6136,6 @@ "isexe": "^2.0.0" } }, - "wide-align": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", - "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", - "requires": { - "string-width": "^1.0.2 || 2 || 3 || 4" - } - }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==" - }, "wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -6491,11 +6156,6 @@ "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==" }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - }, "yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", diff --git a/package.json b/package.json index cec6b4a0d..271a09385 100644 --- a/package.json +++ b/package.json @@ -13,8 +13,7 @@ "prettier": "ory-prettier-styles", "dependencies": { "@openapitools/openapi-generator-cli": "^2.7.0", - "grpc-tools": "^1.12.4", - "grpc_tools_node_protoc_ts": "^5.3.3" + "ts-proto": "1.167.2" }, "devDependencies": { "@ory/keto-namespace-types": "file:contrib/namespace-type-lib", diff --git a/proto/google/protobuf/field_mask.ts b/proto/google/protobuf/field_mask.ts new file mode 100644 index 000000000..1d3a9ef7e --- /dev/null +++ b/proto/google/protobuf/field_mask.ts @@ -0,0 +1,290 @@ +/* eslint-disable */ +import _m0 from "protobufjs/minimal.js"; + +export const protobufPackage = "google.protobuf"; + +/** + * `FieldMask` represents a set of symbolic field paths, for example: + * + * paths: "f.a" + * paths: "f.b.d" + * + * Here `f` represents a field in some root message, `a` and `b` + * fields in the message found in `f`, and `d` a field found in the + * message in `f.b`. + * + * Field masks are used to specify a subset of fields that should be + * returned by a get operation or modified by an update operation. + * Field masks also have a custom JSON encoding (see below). + * + * # Field Masks in Projections + * + * When used in the context of a projection, a response message or + * sub-message is filtered by the API to only contain those fields as + * specified in the mask. For example, if the mask in the previous + * example is applied to a response message as follows: + * + * f { + * a : 22 + * b { + * d : 1 + * x : 2 + * } + * y : 13 + * } + * z: 8 + * + * The result will not contain specific values for fields x,y and z + * (their value will be set to the default, and omitted in proto text + * output): + * + * f { + * a : 22 + * b { + * d : 1 + * } + * } + * + * A repeated field is not allowed except at the last position of a + * paths string. + * + * If a FieldMask object is not present in a get operation, the + * operation applies to all fields (as if a FieldMask of all fields + * had been specified). + * + * Note that a field mask does not necessarily apply to the + * top-level response message. In case of a REST get operation, the + * field mask applies directly to the response, but in case of a REST + * list operation, the mask instead applies to each individual message + * in the returned resource list. In case of a REST custom method, + * other definitions may be used. Where the mask applies will be + * clearly documented together with its declaration in the API. In + * any case, the effect on the returned resource/resources is required + * behavior for APIs. + * + * # Field Masks in Update Operations + * + * A field mask in update operations specifies which fields of the + * targeted resource are going to be updated. The API is required + * to only change the values of the fields as specified in the mask + * and leave the others untouched. If a resource is passed in to + * describe the updated values, the API ignores the values of all + * fields not covered by the mask. + * + * If a repeated field is specified for an update operation, new values will + * be appended to the existing repeated field in the target resource. Note that + * a repeated field is only allowed in the last position of a `paths` string. + * + * If a sub-message is specified in the last position of the field mask for an + * update operation, then new value will be merged into the existing sub-message + * in the target resource. + * + * For example, given the target message: + * + * f { + * b { + * d: 1 + * x: 2 + * } + * c: [1] + * } + * + * And an update message: + * + * f { + * b { + * d: 10 + * } + * c: [2] + * } + * + * then if the field mask is: + * + * paths: ["f.b", "f.c"] + * + * then the result will be: + * + * f { + * b { + * d: 10 + * x: 2 + * } + * c: [1, 2] + * } + * + * An implementation may provide options to override this default behavior for + * repeated and message fields. + * + * In order to reset a field's value to the default, the field must + * be in the mask and set to the default value in the provided resource. + * Hence, in order to reset all fields of a resource, provide a default + * instance of the resource and set all fields in the mask, or do + * not provide a mask as described below. + * + * If a field mask is not present on update, the operation applies to + * all fields (as if a field mask of all fields has been specified). + * Note that in the presence of schema evolution, this may mean that + * fields the client does not know and has therefore not filled into + * the request will be reset to their default. If this is unwanted + * behavior, a specific service may require a client to always specify + * a field mask, producing an error if not. + * + * As with get operations, the location of the resource which + * describes the updated values in the request message depends on the + * operation kind. In any case, the effect of the field mask is + * required to be honored by the API. + * + * ## Considerations for HTTP REST + * + * The HTTP kind of an update operation which uses a field mask must + * be set to PATCH instead of PUT in order to satisfy HTTP semantics + * (PUT must only be used for full updates). + * + * # JSON Encoding of Field Masks + * + * In JSON, a field mask is encoded as a single string where paths are + * separated by a comma. Fields name in each path are converted + * to/from lower-camel naming conventions. + * + * As an example, consider the following message declarations: + * + * message Profile { + * User user = 1; + * Photo photo = 2; + * } + * message User { + * string display_name = 1; + * string address = 2; + * } + * + * In proto a field mask for `Profile` may look as such: + * + * mask { + * paths: "user.display_name" + * paths: "photo" + * } + * + * In JSON, the same mask is represented as below: + * + * { + * mask: "user.displayName,photo" + * } + * + * # Field Masks and Oneof Fields + * + * Field masks treat fields in oneofs just as regular fields. Consider the + * following message: + * + * message SampleMessage { + * oneof test_oneof { + * string name = 4; + * SubMessage sub_message = 9; + * } + * } + * + * The field mask can be: + * + * mask { + * paths: "name" + * } + * + * Or: + * + * mask { + * paths: "sub_message" + * } + * + * Note that oneof type names ("test_oneof" in this case) cannot be used in + * paths. + * + * ## Field Mask Verification + * + * The implementation of any API method which has a FieldMask type field in the + * request should verify the included field paths, and return an + * `INVALID_ARGUMENT` error if any path is unmappable. + */ +export interface FieldMask { + /** The set of field mask paths. */ + paths: string[]; +} + +function createBaseFieldMask(): FieldMask { + return { paths: [] }; +} + +export const FieldMask = { + encode(message: FieldMask, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.paths) { + writer.uint32(10).string(v!); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): FieldMask { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseFieldMask(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.paths.push(reader.string()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): FieldMask { + return { + paths: typeof object === "string" + ? object.split(",").filter(globalThis.Boolean) + : globalThis.Array.isArray(object?.paths) + ? object.paths.map(globalThis.String) + : [], + }; + }, + + toJSON(message: FieldMask): string { + return message.paths.join(","); + }, + + create, I>>(base?: I): FieldMask { + return FieldMask.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): FieldMask { + const message = createBaseFieldMask(); + message.paths = object.paths?.map((e) => e) || []; + return message; + }, + + wrap(paths: string[]): FieldMask { + const result = createBaseFieldMask(); + result.paths = paths; + return result; + }, + + unwrap(message: FieldMask): string[] { + return message.paths; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; diff --git a/proto/ory/keto/opl/v1alpha1/syntax_service.ts b/proto/ory/keto/opl/v1alpha1/syntax_service.ts new file mode 100644 index 000000000..6bf39cbc6 --- /dev/null +++ b/proto/ory/keto/opl/v1alpha1/syntax_service.ts @@ -0,0 +1,378 @@ +/* eslint-disable */ +import type { CallContext, CallOptions } from "nice-grpc-common"; +import _m0 from "protobufjs/minimal.js"; + +export const protobufPackage = "ory.keto.opl.v1alpha1"; + +export interface CheckRequest { + content: Uint8Array; +} + +export interface CheckResponse { + parseErrors: ParseError[]; +} + +export interface ParseError { + message: string; + start: SourcePosition | undefined; + end: SourcePosition | undefined; +} + +export interface SourcePosition { + line: number; + column: number; +} + +function createBaseCheckRequest(): CheckRequest { + return { content: new Uint8Array(0) }; +} + +export const CheckRequest = { + encode(message: CheckRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.content.length !== 0) { + writer.uint32(10).bytes(message.content); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): CheckRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCheckRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.content = reader.bytes(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): CheckRequest { + return { content: isSet(object.content) ? bytesFromBase64(object.content) : new Uint8Array(0) }; + }, + + toJSON(message: CheckRequest): unknown { + const obj: any = {}; + if (message.content.length !== 0) { + obj.content = base64FromBytes(message.content); + } + return obj; + }, + + create, I>>(base?: I): CheckRequest { + return CheckRequest.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): CheckRequest { + const message = createBaseCheckRequest(); + message.content = object.content ?? new Uint8Array(0); + return message; + }, +}; + +function createBaseCheckResponse(): CheckResponse { + return { parseErrors: [] }; +} + +export const CheckResponse = { + encode(message: CheckResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.parseErrors) { + ParseError.encode(v!, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): CheckResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCheckResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.parseErrors.push(ParseError.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): CheckResponse { + return { + parseErrors: globalThis.Array.isArray(object?.parseErrors) + ? object.parseErrors.map((e: any) => ParseError.fromJSON(e)) + : [], + }; + }, + + toJSON(message: CheckResponse): unknown { + const obj: any = {}; + if (message.parseErrors?.length) { + obj.parseErrors = message.parseErrors.map((e) => ParseError.toJSON(e)); + } + return obj; + }, + + create, I>>(base?: I): CheckResponse { + return CheckResponse.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): CheckResponse { + const message = createBaseCheckResponse(); + message.parseErrors = object.parseErrors?.map((e) => ParseError.fromPartial(e)) || []; + return message; + }, +}; + +function createBaseParseError(): ParseError { + return { message: "", start: undefined, end: undefined }; +} + +export const ParseError = { + encode(message: ParseError, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.message !== "") { + writer.uint32(10).string(message.message); + } + if (message.start !== undefined) { + SourcePosition.encode(message.start, writer.uint32(18).fork()).ldelim(); + } + if (message.end !== undefined) { + SourcePosition.encode(message.end, writer.uint32(26).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ParseError { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseParseError(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.message = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.start = SourcePosition.decode(reader, reader.uint32()); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.end = SourcePosition.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): ParseError { + return { + message: isSet(object.message) ? globalThis.String(object.message) : "", + start: isSet(object.start) ? SourcePosition.fromJSON(object.start) : undefined, + end: isSet(object.end) ? SourcePosition.fromJSON(object.end) : undefined, + }; + }, + + toJSON(message: ParseError): unknown { + const obj: any = {}; + if (message.message !== "") { + obj.message = message.message; + } + if (message.start !== undefined) { + obj.start = SourcePosition.toJSON(message.start); + } + if (message.end !== undefined) { + obj.end = SourcePosition.toJSON(message.end); + } + return obj; + }, + + create, I>>(base?: I): ParseError { + return ParseError.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): ParseError { + const message = createBaseParseError(); + message.message = object.message ?? ""; + message.start = (object.start !== undefined && object.start !== null) + ? SourcePosition.fromPartial(object.start) + : undefined; + message.end = (object.end !== undefined && object.end !== null) + ? SourcePosition.fromPartial(object.end) + : undefined; + return message; + }, +}; + +function createBaseSourcePosition(): SourcePosition { + return { line: 0, column: 0 }; +} + +export const SourcePosition = { + encode(message: SourcePosition, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.line !== 0) { + writer.uint32(8).uint32(message.line); + } + if (message.column !== 0) { + writer.uint32(16).uint32(message.column); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): SourcePosition { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSourcePosition(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.line = reader.uint32(); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.column = reader.uint32(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): SourcePosition { + return { + line: isSet(object.line) ? globalThis.Number(object.line) : 0, + column: isSet(object.column) ? globalThis.Number(object.column) : 0, + }; + }, + + toJSON(message: SourcePosition): unknown { + const obj: any = {}; + if (message.line !== 0) { + obj.line = Math.round(message.line); + } + if (message.column !== 0) { + obj.column = Math.round(message.column); + } + return obj; + }, + + create, I>>(base?: I): SourcePosition { + return SourcePosition.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): SourcePosition { + const message = createBaseSourcePosition(); + message.line = object.line ?? 0; + message.column = object.column ?? 0; + return message; + }, +}; + +/** The service that checks the syntax of an OPL file. */ +export type SyntaxServiceDefinition = typeof SyntaxServiceDefinition; +export const SyntaxServiceDefinition = { + name: "SyntaxService", + fullName: "ory.keto.opl.v1alpha1.SyntaxService", + methods: { + /** Performs a syntax check request. */ + check: { + name: "Check", + requestType: CheckRequest, + requestStream: false, + responseType: CheckResponse, + responseStream: false, + options: {}, + }, + }, +} as const; + +export interface SyntaxServiceImplementation { + /** Performs a syntax check request. */ + check(request: CheckRequest, context: CallContext & CallContextExt): Promise>; +} + +export interface SyntaxServiceClient { + /** Performs a syntax check request. */ + check(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; +} + +function bytesFromBase64(b64: string): Uint8Array { + if (globalThis.Buffer) { + return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); + } else { + const bin = globalThis.atob(b64); + const arr = new Uint8Array(bin.length); + for (let i = 0; i < bin.length; ++i) { + arr[i] = bin.charCodeAt(i); + } + return arr; + } +} + +function base64FromBytes(arr: Uint8Array): string { + if (globalThis.Buffer) { + return globalThis.Buffer.from(arr).toString("base64"); + } else { + const bin: string[] = []; + arr.forEach((byte) => { + bin.push(globalThis.String.fromCharCode(byte)); + }); + return globalThis.btoa(bin.join("")); + } +} + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} diff --git a/proto/ory/keto/opl/v1alpha1/syntax_service_grpc_pb.d.ts b/proto/ory/keto/opl/v1alpha1/syntax_service_grpc_pb.d.ts deleted file mode 100644 index f08c2a90a..000000000 --- a/proto/ory/keto/opl/v1alpha1/syntax_service_grpc_pb.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -// package: ory.keto.opl.v1alpha1 -// file: ory/keto/opl/v1alpha1/syntax_service.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as grpc from "grpc"; -import * as ory_keto_opl_v1alpha1_syntax_service_pb from "../../../../ory/keto/opl/v1alpha1/syntax_service_pb"; - -interface ISyntaxServiceService extends grpc.ServiceDefinition { - check: ISyntaxServiceService_ICheck; -} - -interface ISyntaxServiceService_ICheck extends grpc.MethodDefinition { - path: "/ory.keto.opl.v1alpha1.SyntaxService/Check"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} - -export const SyntaxServiceService: ISyntaxServiceService; - -export interface ISyntaxServiceServer { - check: grpc.handleUnaryCall; -} - -export interface ISyntaxServiceClient { - check(request: ory_keto_opl_v1alpha1_syntax_service_pb.CheckRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_opl_v1alpha1_syntax_service_pb.CheckResponse) => void): grpc.ClientUnaryCall; - check(request: ory_keto_opl_v1alpha1_syntax_service_pb.CheckRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_opl_v1alpha1_syntax_service_pb.CheckResponse) => void): grpc.ClientUnaryCall; - check(request: ory_keto_opl_v1alpha1_syntax_service_pb.CheckRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_opl_v1alpha1_syntax_service_pb.CheckResponse) => void): grpc.ClientUnaryCall; -} - -export class SyntaxServiceClient extends grpc.Client implements ISyntaxServiceClient { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - public check(request: ory_keto_opl_v1alpha1_syntax_service_pb.CheckRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_opl_v1alpha1_syntax_service_pb.CheckResponse) => void): grpc.ClientUnaryCall; - public check(request: ory_keto_opl_v1alpha1_syntax_service_pb.CheckRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_opl_v1alpha1_syntax_service_pb.CheckResponse) => void): grpc.ClientUnaryCall; - public check(request: ory_keto_opl_v1alpha1_syntax_service_pb.CheckRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_opl_v1alpha1_syntax_service_pb.CheckResponse) => void): grpc.ClientUnaryCall; -} diff --git a/proto/ory/keto/opl/v1alpha1/syntax_service_grpc_pb.js b/proto/ory/keto/opl/v1alpha1/syntax_service_grpc_pb.js deleted file mode 100644 index b6fde4ad9..000000000 --- a/proto/ory/keto/opl/v1alpha1/syntax_service_grpc_pb.js +++ /dev/null @@ -1,46 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -'use strict'; -var grpc = require('@grpc/grpc-js'); -var ory_keto_opl_v1alpha1_syntax_service_pb = require('../../../../ory/keto/opl/v1alpha1/syntax_service_pb.js'); - -function serialize_ory_keto_opl_v1alpha1_CheckRequest(arg) { - if (!(arg instanceof ory_keto_opl_v1alpha1_syntax_service_pb.CheckRequest)) { - throw new Error('Expected argument of type ory.keto.opl.v1alpha1.CheckRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_ory_keto_opl_v1alpha1_CheckRequest(buffer_arg) { - return ory_keto_opl_v1alpha1_syntax_service_pb.CheckRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_ory_keto_opl_v1alpha1_CheckResponse(arg) { - if (!(arg instanceof ory_keto_opl_v1alpha1_syntax_service_pb.CheckResponse)) { - throw new Error('Expected argument of type ory.keto.opl.v1alpha1.CheckResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_ory_keto_opl_v1alpha1_CheckResponse(buffer_arg) { - return ory_keto_opl_v1alpha1_syntax_service_pb.CheckResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - - -// The service that checks the syntax of an OPL file. -var SyntaxServiceService = exports.SyntaxServiceService = { - // Performs a syntax check request. -check: { - path: '/ory.keto.opl.v1alpha1.SyntaxService/Check', - requestStream: false, - responseStream: false, - requestType: ory_keto_opl_v1alpha1_syntax_service_pb.CheckRequest, - responseType: ory_keto_opl_v1alpha1_syntax_service_pb.CheckResponse, - requestSerialize: serialize_ory_keto_opl_v1alpha1_CheckRequest, - requestDeserialize: deserialize_ory_keto_opl_v1alpha1_CheckRequest, - responseSerialize: serialize_ory_keto_opl_v1alpha1_CheckResponse, - responseDeserialize: deserialize_ory_keto_opl_v1alpha1_CheckResponse, - }, -}; - -exports.SyntaxServiceClient = grpc.makeGenericClientConstructor(SyntaxServiceService); diff --git a/proto/ory/keto/opl/v1alpha1/syntax_service_pb.d.ts b/proto/ory/keto/opl/v1alpha1/syntax_service_pb.d.ts deleted file mode 100644 index cdfc87d69..000000000 --- a/proto/ory/keto/opl/v1alpha1/syntax_service_pb.d.ts +++ /dev/null @@ -1,106 +0,0 @@ -// package: ory.keto.opl.v1alpha1 -// file: ory/keto/opl/v1alpha1/syntax_service.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as jspb from "google-protobuf"; - -export class CheckRequest extends jspb.Message { - getContent(): Uint8Array | string; - getContent_asU8(): Uint8Array; - getContent_asB64(): string; - setContent(value: Uint8Array | string): CheckRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CheckRequest.AsObject; - static toObject(includeInstance: boolean, msg: CheckRequest): CheckRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CheckRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CheckRequest; - static deserializeBinaryFromReader(message: CheckRequest, reader: jspb.BinaryReader): CheckRequest; -} - -export namespace CheckRequest { - export type AsObject = { - content: Uint8Array | string, - } -} - -export class CheckResponse extends jspb.Message { - clearParseErrorsList(): void; - getParseErrorsList(): Array; - setParseErrorsList(value: Array): CheckResponse; - addParseErrors(value?: ParseError, index?: number): ParseError; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CheckResponse.AsObject; - static toObject(includeInstance: boolean, msg: CheckResponse): CheckResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CheckResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CheckResponse; - static deserializeBinaryFromReader(message: CheckResponse, reader: jspb.BinaryReader): CheckResponse; -} - -export namespace CheckResponse { - export type AsObject = { - parseErrorsList: Array, - } -} - -export class ParseError extends jspb.Message { - getMessage(): string; - setMessage(value: string): ParseError; - - hasStart(): boolean; - clearStart(): void; - getStart(): SourcePosition | undefined; - setStart(value?: SourcePosition): ParseError; - - hasEnd(): boolean; - clearEnd(): void; - getEnd(): SourcePosition | undefined; - setEnd(value?: SourcePosition): ParseError; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ParseError.AsObject; - static toObject(includeInstance: boolean, msg: ParseError): ParseError.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ParseError, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ParseError; - static deserializeBinaryFromReader(message: ParseError, reader: jspb.BinaryReader): ParseError; -} - -export namespace ParseError { - export type AsObject = { - message: string, - start?: SourcePosition.AsObject, - end?: SourcePosition.AsObject, - } -} - -export class SourcePosition extends jspb.Message { - getLine(): number; - setLine(value: number): SourcePosition; - getColumn(): number; - setColumn(value: number): SourcePosition; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SourcePosition.AsObject; - static toObject(includeInstance: boolean, msg: SourcePosition): SourcePosition.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SourcePosition, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SourcePosition; - static deserializeBinaryFromReader(message: SourcePosition, reader: jspb.BinaryReader): SourcePosition; -} - -export namespace SourcePosition { - export type AsObject = { - line: number, - column: number, - } -} diff --git a/proto/ory/keto/opl/v1alpha1/syntax_service_pb.js b/proto/ory/keto/opl/v1alpha1/syntax_service_pb.js deleted file mode 100644 index fd530a99f..000000000 --- a/proto/ory/keto/opl/v1alpha1/syntax_service_pb.js +++ /dev/null @@ -1,818 +0,0 @@ -// source: ory/keto/opl/v1alpha1/syntax_service.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); - -goog.exportSymbol('proto.ory.keto.opl.v1alpha1.CheckRequest', null, global); -goog.exportSymbol('proto.ory.keto.opl.v1alpha1.CheckResponse', null, global); -goog.exportSymbol('proto.ory.keto.opl.v1alpha1.ParseError', null, global); -goog.exportSymbol('proto.ory.keto.opl.v1alpha1.SourcePosition', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ory.keto.opl.v1alpha1.CheckRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ory.keto.opl.v1alpha1.CheckRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ory.keto.opl.v1alpha1.CheckRequest.displayName = 'proto.ory.keto.opl.v1alpha1.CheckRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ory.keto.opl.v1alpha1.CheckResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.ory.keto.opl.v1alpha1.CheckResponse.repeatedFields_, null); -}; -goog.inherits(proto.ory.keto.opl.v1alpha1.CheckResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ory.keto.opl.v1alpha1.CheckResponse.displayName = 'proto.ory.keto.opl.v1alpha1.CheckResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ory.keto.opl.v1alpha1.ParseError = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ory.keto.opl.v1alpha1.ParseError, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ory.keto.opl.v1alpha1.ParseError.displayName = 'proto.ory.keto.opl.v1alpha1.ParseError'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ory.keto.opl.v1alpha1.SourcePosition = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ory.keto.opl.v1alpha1.SourcePosition, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ory.keto.opl.v1alpha1.SourcePosition.displayName = 'proto.ory.keto.opl.v1alpha1.SourcePosition'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ory.keto.opl.v1alpha1.CheckRequest.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.opl.v1alpha1.CheckRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ory.keto.opl.v1alpha1.CheckRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.opl.v1alpha1.CheckRequest.toObject = function(includeInstance, msg) { - var f, obj = { - content: msg.getContent_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.opl.v1alpha1.CheckRequest} - */ -proto.ory.keto.opl.v1alpha1.CheckRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.opl.v1alpha1.CheckRequest; - return proto.ory.keto.opl.v1alpha1.CheckRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ory.keto.opl.v1alpha1.CheckRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.opl.v1alpha1.CheckRequest} - */ -proto.ory.keto.opl.v1alpha1.CheckRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setContent(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ory.keto.opl.v1alpha1.CheckRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ory.keto.opl.v1alpha1.CheckRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.opl.v1alpha1.CheckRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.opl.v1alpha1.CheckRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getContent_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } -}; - - -/** - * optional bytes content = 1; - * @return {!(string|Uint8Array)} - */ -proto.ory.keto.opl.v1alpha1.CheckRequest.prototype.getContent = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes content = 1; - * This is a type-conversion wrapper around `getContent()` - * @return {string} - */ -proto.ory.keto.opl.v1alpha1.CheckRequest.prototype.getContent_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getContent())); -}; - - -/** - * optional bytes content = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getContent()` - * @return {!Uint8Array} - */ -proto.ory.keto.opl.v1alpha1.CheckRequest.prototype.getContent_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getContent())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.ory.keto.opl.v1alpha1.CheckRequest} returns this - */ -proto.ory.keto.opl.v1alpha1.CheckRequest.prototype.setContent = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.ory.keto.opl.v1alpha1.CheckResponse.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ory.keto.opl.v1alpha1.CheckResponse.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.opl.v1alpha1.CheckResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ory.keto.opl.v1alpha1.CheckResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.opl.v1alpha1.CheckResponse.toObject = function(includeInstance, msg) { - var f, obj = { - parseErrorsList: jspb.Message.toObjectList(msg.getParseErrorsList(), - proto.ory.keto.opl.v1alpha1.ParseError.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.opl.v1alpha1.CheckResponse} - */ -proto.ory.keto.opl.v1alpha1.CheckResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.opl.v1alpha1.CheckResponse; - return proto.ory.keto.opl.v1alpha1.CheckResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ory.keto.opl.v1alpha1.CheckResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.opl.v1alpha1.CheckResponse} - */ -proto.ory.keto.opl.v1alpha1.CheckResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.ory.keto.opl.v1alpha1.ParseError; - reader.readMessage(value,proto.ory.keto.opl.v1alpha1.ParseError.deserializeBinaryFromReader); - msg.addParseErrors(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ory.keto.opl.v1alpha1.CheckResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ory.keto.opl.v1alpha1.CheckResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.opl.v1alpha1.CheckResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.opl.v1alpha1.CheckResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getParseErrorsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.ory.keto.opl.v1alpha1.ParseError.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated ParseError parse_errors = 1; - * @return {!Array} - */ -proto.ory.keto.opl.v1alpha1.CheckResponse.prototype.getParseErrorsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.ory.keto.opl.v1alpha1.ParseError, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.ory.keto.opl.v1alpha1.CheckResponse} returns this -*/ -proto.ory.keto.opl.v1alpha1.CheckResponse.prototype.setParseErrorsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.ory.keto.opl.v1alpha1.ParseError=} opt_value - * @param {number=} opt_index - * @return {!proto.ory.keto.opl.v1alpha1.ParseError} - */ -proto.ory.keto.opl.v1alpha1.CheckResponse.prototype.addParseErrors = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ory.keto.opl.v1alpha1.ParseError, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.ory.keto.opl.v1alpha1.CheckResponse} returns this - */ -proto.ory.keto.opl.v1alpha1.CheckResponse.prototype.clearParseErrorsList = function() { - return this.setParseErrorsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ory.keto.opl.v1alpha1.ParseError.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.opl.v1alpha1.ParseError.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ory.keto.opl.v1alpha1.ParseError} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.opl.v1alpha1.ParseError.toObject = function(includeInstance, msg) { - var f, obj = { - message: jspb.Message.getFieldWithDefault(msg, 1, ""), - start: (f = msg.getStart()) && proto.ory.keto.opl.v1alpha1.SourcePosition.toObject(includeInstance, f), - end: (f = msg.getEnd()) && proto.ory.keto.opl.v1alpha1.SourcePosition.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.opl.v1alpha1.ParseError} - */ -proto.ory.keto.opl.v1alpha1.ParseError.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.opl.v1alpha1.ParseError; - return proto.ory.keto.opl.v1alpha1.ParseError.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ory.keto.opl.v1alpha1.ParseError} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.opl.v1alpha1.ParseError} - */ -proto.ory.keto.opl.v1alpha1.ParseError.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setMessage(value); - break; - case 2: - var value = new proto.ory.keto.opl.v1alpha1.SourcePosition; - reader.readMessage(value,proto.ory.keto.opl.v1alpha1.SourcePosition.deserializeBinaryFromReader); - msg.setStart(value); - break; - case 3: - var value = new proto.ory.keto.opl.v1alpha1.SourcePosition; - reader.readMessage(value,proto.ory.keto.opl.v1alpha1.SourcePosition.deserializeBinaryFromReader); - msg.setEnd(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ory.keto.opl.v1alpha1.ParseError.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ory.keto.opl.v1alpha1.ParseError.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.opl.v1alpha1.ParseError} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.opl.v1alpha1.ParseError.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMessage(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getStart(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.ory.keto.opl.v1alpha1.SourcePosition.serializeBinaryToWriter - ); - } - f = message.getEnd(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.ory.keto.opl.v1alpha1.SourcePosition.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string message = 1; - * @return {string} - */ -proto.ory.keto.opl.v1alpha1.ParseError.prototype.getMessage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ory.keto.opl.v1alpha1.ParseError} returns this - */ -proto.ory.keto.opl.v1alpha1.ParseError.prototype.setMessage = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional SourcePosition start = 2; - * @return {?proto.ory.keto.opl.v1alpha1.SourcePosition} - */ -proto.ory.keto.opl.v1alpha1.ParseError.prototype.getStart = function() { - return /** @type{?proto.ory.keto.opl.v1alpha1.SourcePosition} */ ( - jspb.Message.getWrapperField(this, proto.ory.keto.opl.v1alpha1.SourcePosition, 2)); -}; - - -/** - * @param {?proto.ory.keto.opl.v1alpha1.SourcePosition|undefined} value - * @return {!proto.ory.keto.opl.v1alpha1.ParseError} returns this -*/ -proto.ory.keto.opl.v1alpha1.ParseError.prototype.setStart = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ory.keto.opl.v1alpha1.ParseError} returns this - */ -proto.ory.keto.opl.v1alpha1.ParseError.prototype.clearStart = function() { - return this.setStart(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ory.keto.opl.v1alpha1.ParseError.prototype.hasStart = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional SourcePosition end = 3; - * @return {?proto.ory.keto.opl.v1alpha1.SourcePosition} - */ -proto.ory.keto.opl.v1alpha1.ParseError.prototype.getEnd = function() { - return /** @type{?proto.ory.keto.opl.v1alpha1.SourcePosition} */ ( - jspb.Message.getWrapperField(this, proto.ory.keto.opl.v1alpha1.SourcePosition, 3)); -}; - - -/** - * @param {?proto.ory.keto.opl.v1alpha1.SourcePosition|undefined} value - * @return {!proto.ory.keto.opl.v1alpha1.ParseError} returns this -*/ -proto.ory.keto.opl.v1alpha1.ParseError.prototype.setEnd = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ory.keto.opl.v1alpha1.ParseError} returns this - */ -proto.ory.keto.opl.v1alpha1.ParseError.prototype.clearEnd = function() { - return this.setEnd(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ory.keto.opl.v1alpha1.ParseError.prototype.hasEnd = function() { - return jspb.Message.getField(this, 3) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ory.keto.opl.v1alpha1.SourcePosition.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.opl.v1alpha1.SourcePosition.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ory.keto.opl.v1alpha1.SourcePosition} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.opl.v1alpha1.SourcePosition.toObject = function(includeInstance, msg) { - var f, obj = { - line: jspb.Message.getFieldWithDefault(msg, 1, 0), - column: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.opl.v1alpha1.SourcePosition} - */ -proto.ory.keto.opl.v1alpha1.SourcePosition.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.opl.v1alpha1.SourcePosition; - return proto.ory.keto.opl.v1alpha1.SourcePosition.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ory.keto.opl.v1alpha1.SourcePosition} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.opl.v1alpha1.SourcePosition} - */ -proto.ory.keto.opl.v1alpha1.SourcePosition.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLine(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setColumn(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ory.keto.opl.v1alpha1.SourcePosition.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ory.keto.opl.v1alpha1.SourcePosition.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.opl.v1alpha1.SourcePosition} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.opl.v1alpha1.SourcePosition.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getLine(); - if (f !== 0) { - writer.writeUint32( - 1, - f - ); - } - f = message.getColumn(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } -}; - - -/** - * optional uint32 line = 1; - * @return {number} - */ -proto.ory.keto.opl.v1alpha1.SourcePosition.prototype.getLine = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.ory.keto.opl.v1alpha1.SourcePosition} returns this - */ -proto.ory.keto.opl.v1alpha1.SourcePosition.prototype.setLine = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint32 column = 2; - * @return {number} - */ -proto.ory.keto.opl.v1alpha1.SourcePosition.prototype.getColumn = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.ory.keto.opl.v1alpha1.SourcePosition} returns this - */ -proto.ory.keto.opl.v1alpha1.SourcePosition.prototype.setColumn = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -goog.object.extend(exports, proto.ory.keto.opl.v1alpha1); diff --git a/proto/ory/keto/relation_tuples/v1alpha2/check_service.ts b/proto/ory/keto/relation_tuples/v1alpha2/check_service.ts new file mode 100644 index 000000000..4737cf7cb --- /dev/null +++ b/proto/ory/keto/relation_tuples/v1alpha2/check_service.ts @@ -0,0 +1,420 @@ +/* eslint-disable */ +import type { CallContext, CallOptions } from "nice-grpc-common"; +import _m0 from "protobufjs/minimal.js"; +import { RelationTuple, Subject } from "./relation_tuples.js"; + +export const protobufPackage = "ory.keto.relation_tuples.v1alpha2"; + +/** + * The request for a CheckService.Check RPC. + * Checks whether a specific subject is related to an object. + */ +export interface CheckRequest { + /** + * The namespace to evaluate the check. + * + * Note: If you use the expand-API and the check + * evaluates a RelationTuple specifying a SubjectSet as + * subject or due to a rewrite rule in a namespace config + * this check request may involve other namespaces automatically. + * + * @deprecated + */ + namespace: string; + /** + * The related object in this check. + * + * @deprecated + */ + object: string; + /** + * The relation between the Object and the Subject. + * + * @deprecated + */ + relation: string; + /** + * The related subject in this check. + * + * @deprecated + */ + subject: Subject | undefined; + tuple: + | RelationTuple + | undefined; + /** + * This field is not implemented yet and has no effect. + * + */ + latest: boolean; + /** + * This field is not implemented yet and has no effect. + * + */ + snaptoken: string; + /** + * The maximum depth to search for a relation. + * + * If the value is less than 1 or greater than the global + * max-depth then the global max-depth will be used instead. + */ + maxDepth: number; +} + +/** The response for a CheckService.Check rpc. */ +export interface CheckResponse { + /** + * Whether the specified subject (id) + * is related to the requested object. + * + * It is false by default if no ACL matches. + */ + allowed: boolean; + /** + * This field is not implemented yet and has no effect. + * + */ + snaptoken: string; +} + +function createBaseCheckRequest(): CheckRequest { + return { + namespace: "", + object: "", + relation: "", + subject: undefined, + tuple: undefined, + latest: false, + snaptoken: "", + maxDepth: 0, + }; +} + +export const CheckRequest = { + encode(message: CheckRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.namespace !== "") { + writer.uint32(10).string(message.namespace); + } + if (message.object !== "") { + writer.uint32(18).string(message.object); + } + if (message.relation !== "") { + writer.uint32(26).string(message.relation); + } + if (message.subject !== undefined) { + Subject.encode(message.subject, writer.uint32(34).fork()).ldelim(); + } + if (message.tuple !== undefined) { + RelationTuple.encode(message.tuple, writer.uint32(66).fork()).ldelim(); + } + if (message.latest === true) { + writer.uint32(40).bool(message.latest); + } + if (message.snaptoken !== "") { + writer.uint32(50).string(message.snaptoken); + } + if (message.maxDepth !== 0) { + writer.uint32(56).int32(message.maxDepth); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): CheckRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCheckRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.namespace = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.object = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.relation = reader.string(); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.subject = Subject.decode(reader, reader.uint32()); + continue; + case 8: + if (tag !== 66) { + break; + } + + message.tuple = RelationTuple.decode(reader, reader.uint32()); + continue; + case 5: + if (tag !== 40) { + break; + } + + message.latest = reader.bool(); + continue; + case 6: + if (tag !== 50) { + break; + } + + message.snaptoken = reader.string(); + continue; + case 7: + if (tag !== 56) { + break; + } + + message.maxDepth = reader.int32(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): CheckRequest { + return { + namespace: isSet(object.namespace) ? globalThis.String(object.namespace) : "", + object: isSet(object.object) ? globalThis.String(object.object) : "", + relation: isSet(object.relation) ? globalThis.String(object.relation) : "", + subject: isSet(object.subject) ? Subject.fromJSON(object.subject) : undefined, + tuple: isSet(object.tuple) ? RelationTuple.fromJSON(object.tuple) : undefined, + latest: isSet(object.latest) ? globalThis.Boolean(object.latest) : false, + snaptoken: isSet(object.snaptoken) ? globalThis.String(object.snaptoken) : "", + maxDepth: isSet(object.maxDepth) ? globalThis.Number(object.maxDepth) : 0, + }; + }, + + toJSON(message: CheckRequest): unknown { + const obj: any = {}; + if (message.namespace !== "") { + obj.namespace = message.namespace; + } + if (message.object !== "") { + obj.object = message.object; + } + if (message.relation !== "") { + obj.relation = message.relation; + } + if (message.subject !== undefined) { + obj.subject = Subject.toJSON(message.subject); + } + if (message.tuple !== undefined) { + obj.tuple = RelationTuple.toJSON(message.tuple); + } + if (message.latest === true) { + obj.latest = message.latest; + } + if (message.snaptoken !== "") { + obj.snaptoken = message.snaptoken; + } + if (message.maxDepth !== 0) { + obj.maxDepth = Math.round(message.maxDepth); + } + return obj; + }, + + create, I>>(base?: I): CheckRequest { + return CheckRequest.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): CheckRequest { + const message = createBaseCheckRequest(); + message.namespace = object.namespace ?? ""; + message.object = object.object ?? ""; + message.relation = object.relation ?? ""; + message.subject = (object.subject !== undefined && object.subject !== null) + ? Subject.fromPartial(object.subject) + : undefined; + message.tuple = (object.tuple !== undefined && object.tuple !== null) + ? RelationTuple.fromPartial(object.tuple) + : undefined; + message.latest = object.latest ?? false; + message.snaptoken = object.snaptoken ?? ""; + message.maxDepth = object.maxDepth ?? 0; + return message; + }, +}; + +function createBaseCheckResponse(): CheckResponse { + return { allowed: false, snaptoken: "" }; +} + +export const CheckResponse = { + encode(message: CheckResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.allowed === true) { + writer.uint32(8).bool(message.allowed); + } + if (message.snaptoken !== "") { + writer.uint32(18).string(message.snaptoken); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): CheckResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCheckResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.allowed = reader.bool(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.snaptoken = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): CheckResponse { + return { + allowed: isSet(object.allowed) ? globalThis.Boolean(object.allowed) : false, + snaptoken: isSet(object.snaptoken) ? globalThis.String(object.snaptoken) : "", + }; + }, + + toJSON(message: CheckResponse): unknown { + const obj: any = {}; + if (message.allowed === true) { + obj.allowed = message.allowed; + } + if (message.snaptoken !== "") { + obj.snaptoken = message.snaptoken; + } + return obj; + }, + + create, I>>(base?: I): CheckResponse { + return CheckResponse.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): CheckResponse { + const message = createBaseCheckResponse(); + message.allowed = object.allowed ?? false; + message.snaptoken = object.snaptoken ?? ""; + return message; + }, +}; + +/** + * The service that performs authorization checks + * based on the stored Access Control Lists. + * + * This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis). + */ +export type CheckServiceDefinition = typeof CheckServiceDefinition; +export const CheckServiceDefinition = { + name: "CheckService", + fullName: "ory.keto.relation_tuples.v1alpha2.CheckService", + methods: { + /** Performs an authorization check. */ + check: { + name: "Check", + requestType: CheckRequest, + requestStream: false, + responseType: CheckResponse, + responseStream: false, + options: {}, + }, + }, +} as const; + +export interface CheckServiceImplementation { + /** Performs an authorization check. */ + check(request: CheckRequest, context: CallContext & CallContextExt): Promise>; +} + +export interface CheckServiceClient { + /** Performs an authorization check. */ + check(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; +} + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc_pb.d.ts deleted file mode 100644 index 2cd99f6ba..000000000 --- a/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc_pb.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -// package: ory.keto.relation_tuples.v1alpha2 -// file: ory/keto/relation_tuples/v1alpha2/check_service.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as grpc from "grpc"; -import * as ory_keto_relation_tuples_v1alpha2_check_service_pb from "../../../../ory/keto/relation_tuples/v1alpha2/check_service_pb"; -import * as ory_keto_relation_tuples_v1alpha2_relation_tuples_pb from "../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb"; - -interface ICheckServiceService extends grpc.ServiceDefinition { - check: ICheckServiceService_ICheck; -} - -interface ICheckServiceService_ICheck extends grpc.MethodDefinition { - path: "/ory.keto.relation_tuples.v1alpha2.CheckService/Check"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} - -export const CheckServiceService: ICheckServiceService; - -export interface ICheckServiceServer { - check: grpc.handleUnaryCall; -} - -export interface ICheckServiceClient { - check(request: ory_keto_relation_tuples_v1alpha2_check_service_pb.CheckRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_check_service_pb.CheckResponse) => void): grpc.ClientUnaryCall; - check(request: ory_keto_relation_tuples_v1alpha2_check_service_pb.CheckRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_check_service_pb.CheckResponse) => void): grpc.ClientUnaryCall; - check(request: ory_keto_relation_tuples_v1alpha2_check_service_pb.CheckRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_check_service_pb.CheckResponse) => void): grpc.ClientUnaryCall; -} - -export class CheckServiceClient extends grpc.Client implements ICheckServiceClient { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - public check(request: ory_keto_relation_tuples_v1alpha2_check_service_pb.CheckRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_check_service_pb.CheckResponse) => void): grpc.ClientUnaryCall; - public check(request: ory_keto_relation_tuples_v1alpha2_check_service_pb.CheckRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_check_service_pb.CheckResponse) => void): grpc.ClientUnaryCall; - public check(request: ory_keto_relation_tuples_v1alpha2_check_service_pb.CheckRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_check_service_pb.CheckResponse) => void): grpc.ClientUnaryCall; -} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc_pb.js deleted file mode 100644 index 57fdbffb3..000000000 --- a/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc_pb.js +++ /dev/null @@ -1,50 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -'use strict'; -var grpc = require('@grpc/grpc-js'); -var ory_keto_relation_tuples_v1alpha2_check_service_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/check_service_pb.js'); -var ory_keto_relation_tuples_v1alpha2_relation_tuples_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js'); - -function serialize_ory_keto_relation_tuples_v1alpha2_CheckRequest(arg) { - if (!(arg instanceof ory_keto_relation_tuples_v1alpha2_check_service_pb.CheckRequest)) { - throw new Error('Expected argument of type ory.keto.relation_tuples.v1alpha2.CheckRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_ory_keto_relation_tuples_v1alpha2_CheckRequest(buffer_arg) { - return ory_keto_relation_tuples_v1alpha2_check_service_pb.CheckRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_ory_keto_relation_tuples_v1alpha2_CheckResponse(arg) { - if (!(arg instanceof ory_keto_relation_tuples_v1alpha2_check_service_pb.CheckResponse)) { - throw new Error('Expected argument of type ory.keto.relation_tuples.v1alpha2.CheckResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_ory_keto_relation_tuples_v1alpha2_CheckResponse(buffer_arg) { - return ory_keto_relation_tuples_v1alpha2_check_service_pb.CheckResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - - -// The service that performs authorization checks -// based on the stored Access Control Lists. -// -// This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis). -var CheckServiceService = exports.CheckServiceService = { - // Performs an authorization check. -check: { - path: '/ory.keto.relation_tuples.v1alpha2.CheckService/Check', - requestStream: false, - responseStream: false, - requestType: ory_keto_relation_tuples_v1alpha2_check_service_pb.CheckRequest, - responseType: ory_keto_relation_tuples_v1alpha2_check_service_pb.CheckResponse, - requestSerialize: serialize_ory_keto_relation_tuples_v1alpha2_CheckRequest, - requestDeserialize: deserialize_ory_keto_relation_tuples_v1alpha2_CheckRequest, - responseSerialize: serialize_ory_keto_relation_tuples_v1alpha2_CheckResponse, - responseDeserialize: deserialize_ory_keto_relation_tuples_v1alpha2_CheckResponse, - }, -}; - -exports.CheckServiceClient = grpc.makeGenericClientConstructor(CheckServiceService); diff --git a/proto/ory/keto/relation_tuples/v1alpha2/check_service_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/check_service_pb.d.ts deleted file mode 100644 index 277e8081a..000000000 --- a/proto/ory/keto/relation_tuples/v1alpha2/check_service_pb.d.ts +++ /dev/null @@ -1,78 +0,0 @@ -// package: ory.keto.relation_tuples.v1alpha2 -// file: ory/keto/relation_tuples/v1alpha2/check_service.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as jspb from "google-protobuf"; -import * as ory_keto_relation_tuples_v1alpha2_relation_tuples_pb from "../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb"; - -export class CheckRequest extends jspb.Message { - getNamespace(): string; - setNamespace(value: string): CheckRequest; - getObject(): string; - setObject(value: string): CheckRequest; - getRelation(): string; - setRelation(value: string): CheckRequest; - - hasSubject(): boolean; - clearSubject(): void; - getSubject(): ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject | undefined; - setSubject(value?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject): CheckRequest; - - hasTuple(): boolean; - clearTuple(): void; - getTuple(): ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple | undefined; - setTuple(value?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple): CheckRequest; - getLatest(): boolean; - setLatest(value: boolean): CheckRequest; - getSnaptoken(): string; - setSnaptoken(value: string): CheckRequest; - getMaxDepth(): number; - setMaxDepth(value: number): CheckRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CheckRequest.AsObject; - static toObject(includeInstance: boolean, msg: CheckRequest): CheckRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CheckRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CheckRequest; - static deserializeBinaryFromReader(message: CheckRequest, reader: jspb.BinaryReader): CheckRequest; -} - -export namespace CheckRequest { - export type AsObject = { - namespace: string, - object: string, - relation: string, - subject?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.AsObject, - tuple?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple.AsObject, - latest: boolean, - snaptoken: string, - maxDepth: number, - } -} - -export class CheckResponse extends jspb.Message { - getAllowed(): boolean; - setAllowed(value: boolean): CheckResponse; - getSnaptoken(): string; - setSnaptoken(value: string): CheckResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CheckResponse.AsObject; - static toObject(includeInstance: boolean, msg: CheckResponse): CheckResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CheckResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CheckResponse; - static deserializeBinaryFromReader(message: CheckResponse, reader: jspb.BinaryReader): CheckResponse; -} - -export namespace CheckResponse { - export type AsObject = { - allowed: boolean, - snaptoken: string, - } -} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/check_service_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/check_service_pb.js deleted file mode 100644 index d1912cc0b..000000000 --- a/proto/ory/keto/relation_tuples/v1alpha2/check_service_pb.js +++ /dev/null @@ -1,612 +0,0 @@ -// source: ory/keto/relation_tuples/v1alpha2/check_service.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); - -var ory_keto_relation_tuples_v1alpha2_relation_tuples_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js'); -goog.object.extend(proto, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb); -goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.CheckRequest', null, global); -goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.CheckResponse', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ory.keto.relation_tuples.v1alpha2.CheckRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.CheckRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.CheckRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ory.keto.relation_tuples.v1alpha2.CheckResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.CheckResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ory.keto.relation_tuples.v1alpha2.CheckResponse.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.CheckResponse'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ory.keto.relation_tuples.v1alpha2.CheckRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.toObject = function(includeInstance, msg) { - var f, obj = { - namespace: jspb.Message.getFieldWithDefault(msg, 1, ""), - object: jspb.Message.getFieldWithDefault(msg, 2, ""), - relation: jspb.Message.getFieldWithDefault(msg, 3, ""), - subject: (f = msg.getSubject()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.toObject(includeInstance, f), - tuple: (f = msg.getTuple()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple.toObject(includeInstance, f), - latest: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), - snaptoken: jspb.Message.getFieldWithDefault(msg, 6, ""), - maxDepth: jspb.Message.getFieldWithDefault(msg, 7, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.CheckRequest} - */ -proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.relation_tuples.v1alpha2.CheckRequest; - return proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.CheckRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.CheckRequest} - */ -proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setNamespace(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setObject(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setRelation(value); - break; - case 4: - var value = new ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject; - reader.readMessage(value,ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.deserializeBinaryFromReader); - msg.setSubject(value); - break; - case 8: - var value = new ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple; - reader.readMessage(value,ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple.deserializeBinaryFromReader); - msg.setTuple(value); - break; - case 5: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setLatest(value); - break; - case 6: - var value = /** @type {string} */ (reader.readString()); - msg.setSnaptoken(value); - break; - case 7: - var value = /** @type {number} */ (reader.readInt32()); - msg.setMaxDepth(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.CheckRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNamespace(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getObject(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getRelation(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getSubject(); - if (f != null) { - writer.writeMessage( - 4, - f, - ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.serializeBinaryToWriter - ); - } - f = message.getTuple(); - if (f != null) { - writer.writeMessage( - 8, - f, - ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple.serializeBinaryToWriter - ); - } - f = message.getLatest(); - if (f) { - writer.writeBool( - 5, - f - ); - } - f = message.getSnaptoken(); - if (f.length > 0) { - writer.writeString( - 6, - f - ); - } - f = message.getMaxDepth(); - if (f !== 0) { - writer.writeInt32( - 7, - f - ); - } -}; - - -/** - * optional string namespace = 1; - * @return {string} - */ -proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.getNamespace = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.CheckRequest} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.setNamespace = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string object = 2; - * @return {string} - */ -proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.getObject = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.CheckRequest} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.setObject = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string relation = 3; - * @return {string} - */ -proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.getRelation = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.CheckRequest} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.setRelation = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional Subject subject = 4; - * @return {?proto.ory.keto.relation_tuples.v1alpha2.Subject} - */ -proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.getSubject = function() { - return /** @type{?proto.ory.keto.relation_tuples.v1alpha2.Subject} */ ( - jspb.Message.getWrapperField(this, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject, 4)); -}; - - -/** - * @param {?proto.ory.keto.relation_tuples.v1alpha2.Subject|undefined} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.CheckRequest} returns this -*/ -proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.setSubject = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.CheckRequest} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.clearSubject = function() { - return this.setSubject(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.hasSubject = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional RelationTuple tuple = 8; - * @return {?proto.ory.keto.relation_tuples.v1alpha2.RelationTuple} - */ -proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.getTuple = function() { - return /** @type{?proto.ory.keto.relation_tuples.v1alpha2.RelationTuple} */ ( - jspb.Message.getWrapperField(this, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple, 8)); -}; - - -/** - * @param {?proto.ory.keto.relation_tuples.v1alpha2.RelationTuple|undefined} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.CheckRequest} returns this -*/ -proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.setTuple = function(value) { - return jspb.Message.setWrapperField(this, 8, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.CheckRequest} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.clearTuple = function() { - return this.setTuple(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.hasTuple = function() { - return jspb.Message.getField(this, 8) != null; -}; - - -/** - * optional bool latest = 5; - * @return {boolean} - */ -proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.getLatest = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.CheckRequest} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.setLatest = function(value) { - return jspb.Message.setProto3BooleanField(this, 5, value); -}; - - -/** - * optional string snaptoken = 6; - * @return {string} - */ -proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.getSnaptoken = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.CheckRequest} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.setSnaptoken = function(value) { - return jspb.Message.setProto3StringField(this, 6, value); -}; - - -/** - * optional int32 max_depth = 7; - * @return {number} - */ -proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.getMaxDepth = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.CheckRequest} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.setMaxDepth = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ory.keto.relation_tuples.v1alpha2.CheckResponse.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.relation_tuples.v1alpha2.CheckResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ory.keto.relation_tuples.v1alpha2.CheckResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.CheckResponse.toObject = function(includeInstance, msg) { - var f, obj = { - allowed: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - snaptoken: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.CheckResponse} - */ -proto.ory.keto.relation_tuples.v1alpha2.CheckResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.relation_tuples.v1alpha2.CheckResponse; - return proto.ory.keto.relation_tuples.v1alpha2.CheckResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.CheckResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.CheckResponse} - */ -proto.ory.keto.relation_tuples.v1alpha2.CheckResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setAllowed(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setSnaptoken(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ory.keto.relation_tuples.v1alpha2.CheckResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ory.keto.relation_tuples.v1alpha2.CheckResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.CheckResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.CheckResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAllowed(); - if (f) { - writer.writeBool( - 1, - f - ); - } - f = message.getSnaptoken(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional bool allowed = 1; - * @return {boolean} - */ -proto.ory.keto.relation_tuples.v1alpha2.CheckResponse.prototype.getAllowed = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.CheckResponse} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.CheckResponse.prototype.setAllowed = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); -}; - - -/** - * optional string snaptoken = 2; - * @return {string} - */ -proto.ory.keto.relation_tuples.v1alpha2.CheckResponse.prototype.getSnaptoken = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.CheckResponse} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.CheckResponse.prototype.setSnaptoken = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -goog.object.extend(exports, proto.ory.keto.relation_tuples.v1alpha2); diff --git a/proto/ory/keto/relation_tuples/v1alpha2/expand_service.ts b/proto/ory/keto/relation_tuples/v1alpha2/expand_service.ts new file mode 100644 index 000000000..c50110f81 --- /dev/null +++ b/proto/ory/keto/relation_tuples/v1alpha2/expand_service.ts @@ -0,0 +1,448 @@ +/* eslint-disable */ +import type { CallContext, CallOptions } from "nice-grpc-common"; +import _m0 from "protobufjs/minimal.js"; +import { RelationTuple, Subject } from "./relation_tuples.js"; + +export const protobufPackage = "ory.keto.relation_tuples.v1alpha2"; + +export enum NodeType { + NODE_TYPE_UNSPECIFIED = 0, + /** NODE_TYPE_UNION - This node expands to a union of all children. */ + NODE_TYPE_UNION = 1, + /** NODE_TYPE_EXCLUSION - Not implemented yet. */ + NODE_TYPE_EXCLUSION = 2, + /** NODE_TYPE_INTERSECTION - Not implemented yet. */ + NODE_TYPE_INTERSECTION = 3, + /** + * NODE_TYPE_LEAF - This node is a leaf and contains no children. + * Its subject is a `SubjectID` unless `max_depth` was reached. + */ + NODE_TYPE_LEAF = 4, + UNRECOGNIZED = -1, +} + +export function nodeTypeFromJSON(object: any): NodeType { + switch (object) { + case 0: + case "NODE_TYPE_UNSPECIFIED": + return NodeType.NODE_TYPE_UNSPECIFIED; + case 1: + case "NODE_TYPE_UNION": + return NodeType.NODE_TYPE_UNION; + case 2: + case "NODE_TYPE_EXCLUSION": + return NodeType.NODE_TYPE_EXCLUSION; + case 3: + case "NODE_TYPE_INTERSECTION": + return NodeType.NODE_TYPE_INTERSECTION; + case 4: + case "NODE_TYPE_LEAF": + return NodeType.NODE_TYPE_LEAF; + case -1: + case "UNRECOGNIZED": + default: + return NodeType.UNRECOGNIZED; + } +} + +export function nodeTypeToJSON(object: NodeType): string { + switch (object) { + case NodeType.NODE_TYPE_UNSPECIFIED: + return "NODE_TYPE_UNSPECIFIED"; + case NodeType.NODE_TYPE_UNION: + return "NODE_TYPE_UNION"; + case NodeType.NODE_TYPE_EXCLUSION: + return "NODE_TYPE_EXCLUSION"; + case NodeType.NODE_TYPE_INTERSECTION: + return "NODE_TYPE_INTERSECTION"; + case NodeType.NODE_TYPE_LEAF: + return "NODE_TYPE_LEAF"; + case NodeType.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } +} + +/** + * The request for an ExpandService.Expand RPC. + * Expands the given subject set. + */ +export interface ExpandRequest { + /** The subject to expand. */ + subject: + | Subject + | undefined; + /** + * The maximum depth of tree to build. + * + * If the value is less than 1 or greater than the global + * max-depth then the global max-depth will be used instead. + * + * It is important to set this parameter to a meaningful + * value. Ponder how deep you really want to display this. + */ + maxDepth: number; + /** + * This field is not implemented yet and has no effect. + * + */ + snaptoken: string; +} + +/** The response for a ExpandService.Expand RPC. */ +export interface ExpandResponse { + /** + * The tree the requested subject set expands to. + * The requested subject set is the subject of the root. + * + * This field can be nil in some circumstances. + */ + tree: SubjectTree | undefined; +} + +export interface SubjectTree { + /** The type of the node. */ + nodeType: NodeType; + /** + * The subject this node represents. + * Deprecated: More information is now available in the tuple field. + * + * @deprecated + */ + subject: + | Subject + | undefined; + /** The relation tuple this node represents. */ + tuple: + | RelationTuple + | undefined; + /** + * The children of this node. + * + * This is never set if `node_type` == `NODE_TYPE_LEAF`. + */ + children: SubjectTree[]; +} + +function createBaseExpandRequest(): ExpandRequest { + return { subject: undefined, maxDepth: 0, snaptoken: "" }; +} + +export const ExpandRequest = { + encode(message: ExpandRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.subject !== undefined) { + Subject.encode(message.subject, writer.uint32(10).fork()).ldelim(); + } + if (message.maxDepth !== 0) { + writer.uint32(16).int32(message.maxDepth); + } + if (message.snaptoken !== "") { + writer.uint32(26).string(message.snaptoken); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ExpandRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseExpandRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.subject = Subject.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.maxDepth = reader.int32(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.snaptoken = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): ExpandRequest { + return { + subject: isSet(object.subject) ? Subject.fromJSON(object.subject) : undefined, + maxDepth: isSet(object.maxDepth) ? globalThis.Number(object.maxDepth) : 0, + snaptoken: isSet(object.snaptoken) ? globalThis.String(object.snaptoken) : "", + }; + }, + + toJSON(message: ExpandRequest): unknown { + const obj: any = {}; + if (message.subject !== undefined) { + obj.subject = Subject.toJSON(message.subject); + } + if (message.maxDepth !== 0) { + obj.maxDepth = Math.round(message.maxDepth); + } + if (message.snaptoken !== "") { + obj.snaptoken = message.snaptoken; + } + return obj; + }, + + create, I>>(base?: I): ExpandRequest { + return ExpandRequest.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): ExpandRequest { + const message = createBaseExpandRequest(); + message.subject = (object.subject !== undefined && object.subject !== null) + ? Subject.fromPartial(object.subject) + : undefined; + message.maxDepth = object.maxDepth ?? 0; + message.snaptoken = object.snaptoken ?? ""; + return message; + }, +}; + +function createBaseExpandResponse(): ExpandResponse { + return { tree: undefined }; +} + +export const ExpandResponse = { + encode(message: ExpandResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.tree !== undefined) { + SubjectTree.encode(message.tree, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ExpandResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseExpandResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.tree = SubjectTree.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): ExpandResponse { + return { tree: isSet(object.tree) ? SubjectTree.fromJSON(object.tree) : undefined }; + }, + + toJSON(message: ExpandResponse): unknown { + const obj: any = {}; + if (message.tree !== undefined) { + obj.tree = SubjectTree.toJSON(message.tree); + } + return obj; + }, + + create, I>>(base?: I): ExpandResponse { + return ExpandResponse.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): ExpandResponse { + const message = createBaseExpandResponse(); + message.tree = (object.tree !== undefined && object.tree !== null) + ? SubjectTree.fromPartial(object.tree) + : undefined; + return message; + }, +}; + +function createBaseSubjectTree(): SubjectTree { + return { nodeType: 0, subject: undefined, tuple: undefined, children: [] }; +} + +export const SubjectTree = { + encode(message: SubjectTree, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.nodeType !== 0) { + writer.uint32(8).int32(message.nodeType); + } + if (message.subject !== undefined) { + Subject.encode(message.subject, writer.uint32(18).fork()).ldelim(); + } + if (message.tuple !== undefined) { + RelationTuple.encode(message.tuple, writer.uint32(34).fork()).ldelim(); + } + for (const v of message.children) { + SubjectTree.encode(v!, writer.uint32(26).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): SubjectTree { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSubjectTree(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.nodeType = reader.int32() as any; + continue; + case 2: + if (tag !== 18) { + break; + } + + message.subject = Subject.decode(reader, reader.uint32()); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.tuple = RelationTuple.decode(reader, reader.uint32()); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.children.push(SubjectTree.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): SubjectTree { + return { + nodeType: isSet(object.nodeType) ? nodeTypeFromJSON(object.nodeType) : 0, + subject: isSet(object.subject) ? Subject.fromJSON(object.subject) : undefined, + tuple: isSet(object.tuple) ? RelationTuple.fromJSON(object.tuple) : undefined, + children: globalThis.Array.isArray(object?.children) + ? object.children.map((e: any) => SubjectTree.fromJSON(e)) + : [], + }; + }, + + toJSON(message: SubjectTree): unknown { + const obj: any = {}; + if (message.nodeType !== 0) { + obj.nodeType = nodeTypeToJSON(message.nodeType); + } + if (message.subject !== undefined) { + obj.subject = Subject.toJSON(message.subject); + } + if (message.tuple !== undefined) { + obj.tuple = RelationTuple.toJSON(message.tuple); + } + if (message.children?.length) { + obj.children = message.children.map((e) => SubjectTree.toJSON(e)); + } + return obj; + }, + + create, I>>(base?: I): SubjectTree { + return SubjectTree.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): SubjectTree { + const message = createBaseSubjectTree(); + message.nodeType = object.nodeType ?? 0; + message.subject = (object.subject !== undefined && object.subject !== null) + ? Subject.fromPartial(object.subject) + : undefined; + message.tuple = (object.tuple !== undefined && object.tuple !== null) + ? RelationTuple.fromPartial(object.tuple) + : undefined; + message.children = object.children?.map((e) => SubjectTree.fromPartial(e)) || []; + return message; + }, +}; + +/** + * The service that performs subject set expansion + * based on the stored Access Control Lists. + * + * This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis). + */ +export type ExpandServiceDefinition = typeof ExpandServiceDefinition; +export const ExpandServiceDefinition = { + name: "ExpandService", + fullName: "ory.keto.relation_tuples.v1alpha2.ExpandService", + methods: { + /** Expands the subject set into a tree of subjects. */ + expand: { + name: "Expand", + requestType: ExpandRequest, + requestStream: false, + responseType: ExpandResponse, + responseStream: false, + options: {}, + }, + }, +} as const; + +export interface ExpandServiceImplementation { + /** Expands the subject set into a tree of subjects. */ + expand(request: ExpandRequest, context: CallContext & CallContextExt): Promise>; +} + +export interface ExpandServiceClient { + /** Expands the subject set into a tree of subjects. */ + expand(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; +} + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/expand_service_grpc_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/expand_service_grpc_pb.d.ts deleted file mode 100644 index 456049012..000000000 --- a/proto/ory/keto/relation_tuples/v1alpha2/expand_service_grpc_pb.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -// package: ory.keto.relation_tuples.v1alpha2 -// file: ory/keto/relation_tuples/v1alpha2/expand_service.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as grpc from "grpc"; -import * as ory_keto_relation_tuples_v1alpha2_expand_service_pb from "../../../../ory/keto/relation_tuples/v1alpha2/expand_service_pb"; -import * as ory_keto_relation_tuples_v1alpha2_relation_tuples_pb from "../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb"; - -interface IExpandServiceService extends grpc.ServiceDefinition { - expand: IExpandServiceService_IExpand; -} - -interface IExpandServiceService_IExpand extends grpc.MethodDefinition { - path: "/ory.keto.relation_tuples.v1alpha2.ExpandService/Expand"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} - -export const ExpandServiceService: IExpandServiceService; - -export interface IExpandServiceServer { - expand: grpc.handleUnaryCall; -} - -export interface IExpandServiceClient { - expand(request: ory_keto_relation_tuples_v1alpha2_expand_service_pb.ExpandRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_expand_service_pb.ExpandResponse) => void): grpc.ClientUnaryCall; - expand(request: ory_keto_relation_tuples_v1alpha2_expand_service_pb.ExpandRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_expand_service_pb.ExpandResponse) => void): grpc.ClientUnaryCall; - expand(request: ory_keto_relation_tuples_v1alpha2_expand_service_pb.ExpandRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_expand_service_pb.ExpandResponse) => void): grpc.ClientUnaryCall; -} - -export class ExpandServiceClient extends grpc.Client implements IExpandServiceClient { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - public expand(request: ory_keto_relation_tuples_v1alpha2_expand_service_pb.ExpandRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_expand_service_pb.ExpandResponse) => void): grpc.ClientUnaryCall; - public expand(request: ory_keto_relation_tuples_v1alpha2_expand_service_pb.ExpandRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_expand_service_pb.ExpandResponse) => void): grpc.ClientUnaryCall; - public expand(request: ory_keto_relation_tuples_v1alpha2_expand_service_pb.ExpandRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_expand_service_pb.ExpandResponse) => void): grpc.ClientUnaryCall; -} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/expand_service_grpc_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/expand_service_grpc_pb.js deleted file mode 100644 index a68a2b437..000000000 --- a/proto/ory/keto/relation_tuples/v1alpha2/expand_service_grpc_pb.js +++ /dev/null @@ -1,50 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -'use strict'; -var grpc = require('@grpc/grpc-js'); -var ory_keto_relation_tuples_v1alpha2_expand_service_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/expand_service_pb.js'); -var ory_keto_relation_tuples_v1alpha2_relation_tuples_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js'); - -function serialize_ory_keto_relation_tuples_v1alpha2_ExpandRequest(arg) { - if (!(arg instanceof ory_keto_relation_tuples_v1alpha2_expand_service_pb.ExpandRequest)) { - throw new Error('Expected argument of type ory.keto.relation_tuples.v1alpha2.ExpandRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_ory_keto_relation_tuples_v1alpha2_ExpandRequest(buffer_arg) { - return ory_keto_relation_tuples_v1alpha2_expand_service_pb.ExpandRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_ory_keto_relation_tuples_v1alpha2_ExpandResponse(arg) { - if (!(arg instanceof ory_keto_relation_tuples_v1alpha2_expand_service_pb.ExpandResponse)) { - throw new Error('Expected argument of type ory.keto.relation_tuples.v1alpha2.ExpandResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_ory_keto_relation_tuples_v1alpha2_ExpandResponse(buffer_arg) { - return ory_keto_relation_tuples_v1alpha2_expand_service_pb.ExpandResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - - -// The service that performs subject set expansion -// based on the stored Access Control Lists. -// -// This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis). -var ExpandServiceService = exports.ExpandServiceService = { - // Expands the subject set into a tree of subjects. -expand: { - path: '/ory.keto.relation_tuples.v1alpha2.ExpandService/Expand', - requestStream: false, - responseStream: false, - requestType: ory_keto_relation_tuples_v1alpha2_expand_service_pb.ExpandRequest, - responseType: ory_keto_relation_tuples_v1alpha2_expand_service_pb.ExpandResponse, - requestSerialize: serialize_ory_keto_relation_tuples_v1alpha2_ExpandRequest, - requestDeserialize: deserialize_ory_keto_relation_tuples_v1alpha2_ExpandRequest, - responseSerialize: serialize_ory_keto_relation_tuples_v1alpha2_ExpandResponse, - responseDeserialize: deserialize_ory_keto_relation_tuples_v1alpha2_ExpandResponse, - }, -}; - -exports.ExpandServiceClient = grpc.makeGenericClientConstructor(ExpandServiceService); diff --git a/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.d.ts deleted file mode 100644 index bbc463a9d..000000000 --- a/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.d.ts +++ /dev/null @@ -1,105 +0,0 @@ -// package: ory.keto.relation_tuples.v1alpha2 -// file: ory/keto/relation_tuples/v1alpha2/expand_service.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as jspb from "google-protobuf"; -import * as ory_keto_relation_tuples_v1alpha2_relation_tuples_pb from "../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb"; - -export class ExpandRequest extends jspb.Message { - - hasSubject(): boolean; - clearSubject(): void; - getSubject(): ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject | undefined; - setSubject(value?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject): ExpandRequest; - getMaxDepth(): number; - setMaxDepth(value: number): ExpandRequest; - getSnaptoken(): string; - setSnaptoken(value: string): ExpandRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ExpandRequest.AsObject; - static toObject(includeInstance: boolean, msg: ExpandRequest): ExpandRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ExpandRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ExpandRequest; - static deserializeBinaryFromReader(message: ExpandRequest, reader: jspb.BinaryReader): ExpandRequest; -} - -export namespace ExpandRequest { - export type AsObject = { - subject?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.AsObject, - maxDepth: number, - snaptoken: string, - } -} - -export class ExpandResponse extends jspb.Message { - - hasTree(): boolean; - clearTree(): void; - getTree(): SubjectTree | undefined; - setTree(value?: SubjectTree): ExpandResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ExpandResponse.AsObject; - static toObject(includeInstance: boolean, msg: ExpandResponse): ExpandResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ExpandResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ExpandResponse; - static deserializeBinaryFromReader(message: ExpandResponse, reader: jspb.BinaryReader): ExpandResponse; -} - -export namespace ExpandResponse { - export type AsObject = { - tree?: SubjectTree.AsObject, - } -} - -export class SubjectTree extends jspb.Message { - getNodeType(): NodeType; - setNodeType(value: NodeType): SubjectTree; - - hasSubject(): boolean; - clearSubject(): void; - getSubject(): ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject | undefined; - setSubject(value?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject): SubjectTree; - - hasTuple(): boolean; - clearTuple(): void; - getTuple(): ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple | undefined; - setTuple(value?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple): SubjectTree; - clearChildrenList(): void; - getChildrenList(): Array; - setChildrenList(value: Array): SubjectTree; - addChildren(value?: SubjectTree, index?: number): SubjectTree; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SubjectTree.AsObject; - static toObject(includeInstance: boolean, msg: SubjectTree): SubjectTree.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SubjectTree, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SubjectTree; - static deserializeBinaryFromReader(message: SubjectTree, reader: jspb.BinaryReader): SubjectTree; -} - -export namespace SubjectTree { - export type AsObject = { - nodeType: NodeType, - subject?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.AsObject, - tuple?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple.AsObject, - childrenList: Array, - } -} - -export enum NodeType { - NODE_TYPE_UNSPECIFIED = 0, - NODE_TYPE_UNION = 1, - NODE_TYPE_EXCLUSION = 2, - NODE_TYPE_INTERSECTION = 3, - NODE_TYPE_LEAF = 4, -} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.js deleted file mode 100644 index 36b6412a4..000000000 --- a/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.js +++ /dev/null @@ -1,758 +0,0 @@ -// source: ory/keto/relation_tuples/v1alpha2/expand_service.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); - -var ory_keto_relation_tuples_v1alpha2_relation_tuples_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js'); -goog.object.extend(proto, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb); -goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest', null, global); -goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse', null, global); -goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.NodeType', null, global); -goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.SubjectTree', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ory.keto.relation_tuples.v1alpha2.SubjectTree = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.repeatedFields_, null); -}; -goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.SubjectTree, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.SubjectTree'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.toObject = function(includeInstance, msg) { - var f, obj = { - subject: (f = msg.getSubject()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.toObject(includeInstance, f), - maxDepth: jspb.Message.getFieldWithDefault(msg, 2, 0), - snaptoken: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest} - */ -proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest; - return proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest} - */ -proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject; - reader.readMessage(value,ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.deserializeBinaryFromReader); - msg.setSubject(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setMaxDepth(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setSnaptoken(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSubject(); - if (f != null) { - writer.writeMessage( - 1, - f, - ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.serializeBinaryToWriter - ); - } - f = message.getMaxDepth(); - if (f !== 0) { - writer.writeInt32( - 2, - f - ); - } - f = message.getSnaptoken(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional Subject subject = 1; - * @return {?proto.ory.keto.relation_tuples.v1alpha2.Subject} - */ -proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.prototype.getSubject = function() { - return /** @type{?proto.ory.keto.relation_tuples.v1alpha2.Subject} */ ( - jspb.Message.getWrapperField(this, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject, 1)); -}; - - -/** - * @param {?proto.ory.keto.relation_tuples.v1alpha2.Subject|undefined} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest} returns this -*/ -proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.prototype.setSubject = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.prototype.clearSubject = function() { - return this.setSubject(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.prototype.hasSubject = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional int32 max_depth = 2; - * @return {number} - */ -proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.prototype.getMaxDepth = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.prototype.setMaxDepth = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional string snaptoken = 3; - * @return {string} - */ -proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.prototype.getSnaptoken = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.prototype.setSnaptoken = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse.toObject = function(includeInstance, msg) { - var f, obj = { - tree: (f = msg.getTree()) && proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse} - */ -proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse; - return proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse} - */ -proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.ory.keto.relation_tuples.v1alpha2.SubjectTree; - reader.readMessage(value,proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.deserializeBinaryFromReader); - msg.setTree(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTree(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.serializeBinaryToWriter - ); - } -}; - - -/** - * optional SubjectTree tree = 1; - * @return {?proto.ory.keto.relation_tuples.v1alpha2.SubjectTree} - */ -proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse.prototype.getTree = function() { - return /** @type{?proto.ory.keto.relation_tuples.v1alpha2.SubjectTree} */ ( - jspb.Message.getWrapperField(this, proto.ory.keto.relation_tuples.v1alpha2.SubjectTree, 1)); -}; - - -/** - * @param {?proto.ory.keto.relation_tuples.v1alpha2.SubjectTree|undefined} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse} returns this -*/ -proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse.prototype.setTree = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse.prototype.clearTree = function() { - return this.setTree(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse.prototype.hasTree = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.repeatedFields_ = [3]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ory.keto.relation_tuples.v1alpha2.SubjectTree} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.toObject = function(includeInstance, msg) { - var f, obj = { - nodeType: jspb.Message.getFieldWithDefault(msg, 1, 0), - subject: (f = msg.getSubject()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.toObject(includeInstance, f), - tuple: (f = msg.getTuple()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple.toObject(includeInstance, f), - childrenList: jspb.Message.toObjectList(msg.getChildrenList(), - proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.SubjectTree} - */ -proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.relation_tuples.v1alpha2.SubjectTree; - return proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.SubjectTree} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.SubjectTree} - */ -proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!proto.ory.keto.relation_tuples.v1alpha2.NodeType} */ (reader.readEnum()); - msg.setNodeType(value); - break; - case 2: - var value = new ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject; - reader.readMessage(value,ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.deserializeBinaryFromReader); - msg.setSubject(value); - break; - case 4: - var value = new ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple; - reader.readMessage(value,ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple.deserializeBinaryFromReader); - msg.setTuple(value); - break; - case 3: - var value = new proto.ory.keto.relation_tuples.v1alpha2.SubjectTree; - reader.readMessage(value,proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.deserializeBinaryFromReader); - msg.addChildren(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.SubjectTree} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNodeType(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getSubject(); - if (f != null) { - writer.writeMessage( - 2, - f, - ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.serializeBinaryToWriter - ); - } - f = message.getTuple(); - if (f != null) { - writer.writeMessage( - 4, - f, - ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple.serializeBinaryToWriter - ); - } - f = message.getChildrenList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.serializeBinaryToWriter - ); - } -}; - - -/** - * optional NodeType node_type = 1; - * @return {!proto.ory.keto.relation_tuples.v1alpha2.NodeType} - */ -proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.prototype.getNodeType = function() { - return /** @type {!proto.ory.keto.relation_tuples.v1alpha2.NodeType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.ory.keto.relation_tuples.v1alpha2.NodeType} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.SubjectTree} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.prototype.setNodeType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * optional Subject subject = 2; - * @return {?proto.ory.keto.relation_tuples.v1alpha2.Subject} - */ -proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.prototype.getSubject = function() { - return /** @type{?proto.ory.keto.relation_tuples.v1alpha2.Subject} */ ( - jspb.Message.getWrapperField(this, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject, 2)); -}; - - -/** - * @param {?proto.ory.keto.relation_tuples.v1alpha2.Subject|undefined} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.SubjectTree} returns this -*/ -proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.prototype.setSubject = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.SubjectTree} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.prototype.clearSubject = function() { - return this.setSubject(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.prototype.hasSubject = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional RelationTuple tuple = 4; - * @return {?proto.ory.keto.relation_tuples.v1alpha2.RelationTuple} - */ -proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.prototype.getTuple = function() { - return /** @type{?proto.ory.keto.relation_tuples.v1alpha2.RelationTuple} */ ( - jspb.Message.getWrapperField(this, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple, 4)); -}; - - -/** - * @param {?proto.ory.keto.relation_tuples.v1alpha2.RelationTuple|undefined} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.SubjectTree} returns this -*/ -proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.prototype.setTuple = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.SubjectTree} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.prototype.clearTuple = function() { - return this.setTuple(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.prototype.hasTuple = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * repeated SubjectTree children = 3; - * @return {!Array} - */ -proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.prototype.getChildrenList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.ory.keto.relation_tuples.v1alpha2.SubjectTree, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.SubjectTree} returns this -*/ -proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.prototype.setChildrenList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); -}; - - -/** - * @param {!proto.ory.keto.relation_tuples.v1alpha2.SubjectTree=} opt_value - * @param {number=} opt_index - * @return {!proto.ory.keto.relation_tuples.v1alpha2.SubjectTree} - */ -proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.prototype.addChildren = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.ory.keto.relation_tuples.v1alpha2.SubjectTree, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.SubjectTree} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.prototype.clearChildrenList = function() { - return this.setChildrenList([]); -}; - - -/** - * @enum {number} - */ -proto.ory.keto.relation_tuples.v1alpha2.NodeType = { - NODE_TYPE_UNSPECIFIED: 0, - NODE_TYPE_UNION: 1, - NODE_TYPE_EXCLUSION: 2, - NODE_TYPE_INTERSECTION: 3, - NODE_TYPE_LEAF: 4 -}; - -goog.object.extend(exports, proto.ory.keto.relation_tuples.v1alpha2); diff --git a/proto/ory/keto/relation_tuples/v1alpha2/index.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/index.d.ts deleted file mode 100644 index 7e52c454d..000000000 --- a/proto/ory/keto/relation_tuples/v1alpha2/index.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import * as relationTuples from './relation_tuples_pb' -import * as write from './write_service_pb' -import * as writeService from './write_service_grpc_pb' -import * as check from './check_service_pb' -import * as checkService from './check_service_grpc_pb' -import * as expand from './expand_service_pb' -import * as expandService from './expand_service_grpc_pb' -import * as read from './read_service_pb' -import * as readService from './read_service_grpc_pb' -declare module '@ory/keto-grpc-client/ory/keto/relation_tuples/v1alpha2' { - export { - relationTuples, - write, - writeService, - check, - checkService, - expand, - expandService, - read, - readService - } -} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/index.js b/proto/ory/keto/relation_tuples/v1alpha2/index.js deleted file mode 100644 index 08e099950..000000000 --- a/proto/ory/keto/relation_tuples/v1alpha2/index.js +++ /dev/null @@ -1,24 +0,0 @@ -// This has to be as is because of the way named exports -// are supported in ESM from CommonJS packages. Don't ask, it just works. - -const relationTuples = require('./relation_tuples_pb.js') -const write = require('./write_service_pb.js') -const writeService = require('./write_service_grpc_pb.js') -const check = require('./check_service_pb.js') -const checkService = require('./check_service_grpc_pb.js') -const expand = require('./expand_service_pb.js') -const expandService = require('./expand_service_grpc_pb.js') -const read = require('./read_service_pb.js') -const readService = require('./read_service_grpc_pb.js') - -module.exports = { - relationTuples, - check, - checkService, - write, - writeService, - expand, - expandService, - read, - readService -} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.ts b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.ts new file mode 100644 index 000000000..2e405f24e --- /dev/null +++ b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.ts @@ -0,0 +1,232 @@ +/* eslint-disable */ +import type { CallContext, CallOptions } from "nice-grpc-common"; +import _m0 from "protobufjs/minimal.js"; + +export const protobufPackage = "ory.keto.relation_tuples.v1alpha2"; + +/** Request for ReadService.ListNamespaces RPC. */ +export interface ListNamespacesRequest { +} + +export interface ListNamespacesResponse { + namespaces: Namespace[]; +} + +export interface Namespace { + name: string; +} + +function createBaseListNamespacesRequest(): ListNamespacesRequest { + return {}; +} + +export const ListNamespacesRequest = { + encode(_: ListNamespacesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ListNamespacesRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseListNamespacesRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(_: any): ListNamespacesRequest { + return {}; + }, + + toJSON(_: ListNamespacesRequest): unknown { + const obj: any = {}; + return obj; + }, + + create, I>>(base?: I): ListNamespacesRequest { + return ListNamespacesRequest.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(_: I): ListNamespacesRequest { + const message = createBaseListNamespacesRequest(); + return message; + }, +}; + +function createBaseListNamespacesResponse(): ListNamespacesResponse { + return { namespaces: [] }; +} + +export const ListNamespacesResponse = { + encode(message: ListNamespacesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.namespaces) { + Namespace.encode(v!, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ListNamespacesResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseListNamespacesResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.namespaces.push(Namespace.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): ListNamespacesResponse { + return { + namespaces: globalThis.Array.isArray(object?.namespaces) + ? object.namespaces.map((e: any) => Namespace.fromJSON(e)) + : [], + }; + }, + + toJSON(message: ListNamespacesResponse): unknown { + const obj: any = {}; + if (message.namespaces?.length) { + obj.namespaces = message.namespaces.map((e) => Namespace.toJSON(e)); + } + return obj; + }, + + create, I>>(base?: I): ListNamespacesResponse { + return ListNamespacesResponse.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): ListNamespacesResponse { + const message = createBaseListNamespacesResponse(); + message.namespaces = object.namespaces?.map((e) => Namespace.fromPartial(e)) || []; + return message; + }, +}; + +function createBaseNamespace(): Namespace { + return { name: "" }; +} + +export const Namespace = { + encode(message: Namespace, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.name !== "") { + writer.uint32(10).string(message.name); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Namespace { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseNamespace(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.name = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Namespace { + return { name: isSet(object.name) ? globalThis.String(object.name) : "" }; + }, + + toJSON(message: Namespace): unknown { + const obj: any = {}; + if (message.name !== "") { + obj.name = message.name; + } + return obj; + }, + + create, I>>(base?: I): Namespace { + return Namespace.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Namespace { + const message = createBaseNamespace(); + message.name = object.name ?? ""; + return message; + }, +}; + +/** + * The service to query namespaces. + * + * This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis). + */ +export type NamespacesServiceDefinition = typeof NamespacesServiceDefinition; +export const NamespacesServiceDefinition = { + name: "NamespacesService", + fullName: "ory.keto.relation_tuples.v1alpha2.NamespacesService", + methods: { + /** Lists Namespaces */ + listNamespaces: { + name: "ListNamespaces", + requestType: ListNamespacesRequest, + requestStream: false, + responseType: ListNamespacesResponse, + responseStream: false, + options: {}, + }, + }, +} as const; + +export interface NamespacesServiceImplementation { + /** Lists Namespaces */ + listNamespaces( + request: ListNamespacesRequest, + context: CallContext & CallContextExt, + ): Promise>; +} + +export interface NamespacesServiceClient { + /** Lists Namespaces */ + listNamespaces( + request: DeepPartial, + options?: CallOptions & CallOptionsExt, + ): Promise; +} + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_grpc_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_grpc_pb.d.ts deleted file mode 100644 index 8573542bf..000000000 --- a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_grpc_pb.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -// package: ory.keto.relation_tuples.v1alpha2 -// file: ory/keto/relation_tuples/v1alpha2/namespaces_service.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as grpc from "grpc"; -import * as ory_keto_relation_tuples_v1alpha2_namespaces_service_pb from "../../../../ory/keto/relation_tuples/v1alpha2/namespaces_service_pb"; - -interface INamespacesServiceService extends grpc.ServiceDefinition { - listNamespaces: INamespacesServiceService_IListNamespaces; -} - -interface INamespacesServiceService_IListNamespaces extends grpc.MethodDefinition { - path: "/ory.keto.relation_tuples.v1alpha2.NamespacesService/ListNamespaces"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} - -export const NamespacesServiceService: INamespacesServiceService; - -export interface INamespacesServiceServer { - listNamespaces: grpc.handleUnaryCall; -} - -export interface INamespacesServiceClient { - listNamespaces(request: ory_keto_relation_tuples_v1alpha2_namespaces_service_pb.ListNamespacesRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_namespaces_service_pb.ListNamespacesResponse) => void): grpc.ClientUnaryCall; - listNamespaces(request: ory_keto_relation_tuples_v1alpha2_namespaces_service_pb.ListNamespacesRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_namespaces_service_pb.ListNamespacesResponse) => void): grpc.ClientUnaryCall; - listNamespaces(request: ory_keto_relation_tuples_v1alpha2_namespaces_service_pb.ListNamespacesRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_namespaces_service_pb.ListNamespacesResponse) => void): grpc.ClientUnaryCall; -} - -export class NamespacesServiceClient extends grpc.Client implements INamespacesServiceClient { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - public listNamespaces(request: ory_keto_relation_tuples_v1alpha2_namespaces_service_pb.ListNamespacesRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_namespaces_service_pb.ListNamespacesResponse) => void): grpc.ClientUnaryCall; - public listNamespaces(request: ory_keto_relation_tuples_v1alpha2_namespaces_service_pb.ListNamespacesRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_namespaces_service_pb.ListNamespacesResponse) => void): grpc.ClientUnaryCall; - public listNamespaces(request: ory_keto_relation_tuples_v1alpha2_namespaces_service_pb.ListNamespacesRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_namespaces_service_pb.ListNamespacesResponse) => void): grpc.ClientUnaryCall; -} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_grpc_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_grpc_pb.js deleted file mode 100644 index a7aad5f61..000000000 --- a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_grpc_pb.js +++ /dev/null @@ -1,48 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -'use strict'; -var grpc = require('@grpc/grpc-js'); -var ory_keto_relation_tuples_v1alpha2_namespaces_service_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/namespaces_service_pb.js'); - -function serialize_ory_keto_relation_tuples_v1alpha2_ListNamespacesRequest(arg) { - if (!(arg instanceof ory_keto_relation_tuples_v1alpha2_namespaces_service_pb.ListNamespacesRequest)) { - throw new Error('Expected argument of type ory.keto.relation_tuples.v1alpha2.ListNamespacesRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_ory_keto_relation_tuples_v1alpha2_ListNamespacesRequest(buffer_arg) { - return ory_keto_relation_tuples_v1alpha2_namespaces_service_pb.ListNamespacesRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_ory_keto_relation_tuples_v1alpha2_ListNamespacesResponse(arg) { - if (!(arg instanceof ory_keto_relation_tuples_v1alpha2_namespaces_service_pb.ListNamespacesResponse)) { - throw new Error('Expected argument of type ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_ory_keto_relation_tuples_v1alpha2_ListNamespacesResponse(buffer_arg) { - return ory_keto_relation_tuples_v1alpha2_namespaces_service_pb.ListNamespacesResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - - -// The service to query namespaces. -// -// This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis). -var NamespacesServiceService = exports.NamespacesServiceService = { - // Lists Namespaces -listNamespaces: { - path: '/ory.keto.relation_tuples.v1alpha2.NamespacesService/ListNamespaces', - requestStream: false, - responseStream: false, - requestType: ory_keto_relation_tuples_v1alpha2_namespaces_service_pb.ListNamespacesRequest, - responseType: ory_keto_relation_tuples_v1alpha2_namespaces_service_pb.ListNamespacesResponse, - requestSerialize: serialize_ory_keto_relation_tuples_v1alpha2_ListNamespacesRequest, - requestDeserialize: deserialize_ory_keto_relation_tuples_v1alpha2_ListNamespacesRequest, - responseSerialize: serialize_ory_keto_relation_tuples_v1alpha2_ListNamespacesResponse, - responseDeserialize: deserialize_ory_keto_relation_tuples_v1alpha2_ListNamespacesResponse, - }, -}; - -exports.NamespacesServiceClient = grpc.makeGenericClientConstructor(NamespacesServiceService); diff --git a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_pb.d.ts deleted file mode 100644 index 8183431f9..000000000 --- a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_pb.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -// package: ory.keto.relation_tuples.v1alpha2 -// file: ory/keto/relation_tuples/v1alpha2/namespaces_service.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as jspb from "google-protobuf"; - -export class ListNamespacesRequest extends jspb.Message { - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListNamespacesRequest.AsObject; - static toObject(includeInstance: boolean, msg: ListNamespacesRequest): ListNamespacesRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListNamespacesRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListNamespacesRequest; - static deserializeBinaryFromReader(message: ListNamespacesRequest, reader: jspb.BinaryReader): ListNamespacesRequest; -} - -export namespace ListNamespacesRequest { - export type AsObject = { - } -} - -export class ListNamespacesResponse extends jspb.Message { - clearNamespacesList(): void; - getNamespacesList(): Array; - setNamespacesList(value: Array): ListNamespacesResponse; - addNamespaces(value?: Namespace, index?: number): Namespace; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListNamespacesResponse.AsObject; - static toObject(includeInstance: boolean, msg: ListNamespacesResponse): ListNamespacesResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListNamespacesResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListNamespacesResponse; - static deserializeBinaryFromReader(message: ListNamespacesResponse, reader: jspb.BinaryReader): ListNamespacesResponse; -} - -export namespace ListNamespacesResponse { - export type AsObject = { - namespacesList: Array, - } -} - -export class Namespace extends jspb.Message { - getName(): string; - setName(value: string): Namespace; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Namespace.AsObject; - static toObject(includeInstance: boolean, msg: Namespace): Namespace.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Namespace, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Namespace; - static deserializeBinaryFromReader(message: Namespace, reader: jspb.BinaryReader): Namespace; -} - -export namespace Namespace { - export type AsObject = { - name: string, - } -} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_pb.js deleted file mode 100644 index 0d7ed7949..000000000 --- a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_pb.js +++ /dev/null @@ -1,481 +0,0 @@ -// source: ory/keto/relation_tuples/v1alpha2/namespaces_service.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); - -goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesRequest', null, global); -goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse', null, global); -goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.Namespace', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesRequest.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse.repeatedFields_, null); -}; -goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ory.keto.relation_tuples.v1alpha2.Namespace = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.Namespace, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ory.keto.relation_tuples.v1alpha2.Namespace.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.Namespace'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesRequest.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesRequest} - */ -proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesRequest; - return proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesRequest} - */ -proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse.toObject = function(includeInstance, msg) { - var f, obj = { - namespacesList: jspb.Message.toObjectList(msg.getNamespacesList(), - proto.ory.keto.relation_tuples.v1alpha2.Namespace.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse} - */ -proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse; - return proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse} - */ -proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.ory.keto.relation_tuples.v1alpha2.Namespace; - reader.readMessage(value,proto.ory.keto.relation_tuples.v1alpha2.Namespace.deserializeBinaryFromReader); - msg.addNamespaces(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNamespacesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.ory.keto.relation_tuples.v1alpha2.Namespace.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated Namespace namespaces = 1; - * @return {!Array} - */ -proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse.prototype.getNamespacesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.ory.keto.relation_tuples.v1alpha2.Namespace, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse} returns this -*/ -proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse.prototype.setNamespacesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.ory.keto.relation_tuples.v1alpha2.Namespace=} opt_value - * @param {number=} opt_index - * @return {!proto.ory.keto.relation_tuples.v1alpha2.Namespace} - */ -proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse.prototype.addNamespaces = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ory.keto.relation_tuples.v1alpha2.Namespace, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse.prototype.clearNamespacesList = function() { - return this.setNamespacesList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ory.keto.relation_tuples.v1alpha2.Namespace.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.relation_tuples.v1alpha2.Namespace.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ory.keto.relation_tuples.v1alpha2.Namespace} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.Namespace.toObject = function(includeInstance, msg) { - var f, obj = { - name: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.Namespace} - */ -proto.ory.keto.relation_tuples.v1alpha2.Namespace.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.relation_tuples.v1alpha2.Namespace; - return proto.ory.keto.relation_tuples.v1alpha2.Namespace.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.Namespace} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.Namespace} - */ -proto.ory.keto.relation_tuples.v1alpha2.Namespace.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setName(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ory.keto.relation_tuples.v1alpha2.Namespace.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ory.keto.relation_tuples.v1alpha2.Namespace.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.Namespace} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.Namespace.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string name = 1; - * @return {string} - */ -proto.ory.keto.relation_tuples.v1alpha2.Namespace.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.Namespace} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.Namespace.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -goog.object.extend(exports, proto.ory.keto.relation_tuples.v1alpha2); diff --git a/proto/ory/keto/relation_tuples/v1alpha2/read_service.ts b/proto/ory/keto/relation_tuples/v1alpha2/read_service.ts new file mode 100644 index 000000000..410729ad4 --- /dev/null +++ b/proto/ory/keto/relation_tuples/v1alpha2/read_service.ts @@ -0,0 +1,483 @@ +/* eslint-disable */ +import type { CallContext, CallOptions } from "nice-grpc-common"; +import _m0 from "protobufjs/minimal.js"; +import { FieldMask } from "../../../../google/protobuf/field_mask.js"; +import { RelationQuery, RelationTuple, Subject } from "./relation_tuples.js"; + +export const protobufPackage = "ory.keto.relation_tuples.v1alpha2"; + +/** + * Request for ReadService.ListRelationTuples RPC. + * See `ListRelationTuplesRequest_Query` for how to filter the query. + */ +export interface ListRelationTuplesRequest { + /** + * All query constraints are concatenated + * with a logical AND operator. + * + * The RelationTuple list from ListRelationTuplesResponse + * is ordered from the newest RelationTuple to the oldest. + * + * @deprecated + */ + query: ListRelationTuplesRequest_Query | undefined; + relationQuery: + | RelationQuery + | undefined; + /** + * This field is not implemented yet and has no effect. + * + */ + expandMask: + | string[] + | undefined; + /** + * This field is not implemented yet and has no effect. + * + */ + snaptoken: string; + /** + * Optional. The maximum number of + * RelationTuples to return in the response. + * + * Default: 100 + */ + pageSize: number; + /** + * Optional. An opaque pagination token returned from + * a previous call to `ListRelationTuples` that + * indicates where the page should start at. + * + * An empty token denotes the first page. All successive + * pages require the token from the previous page. + */ + pageToken: string; +} + +/** + * The query for listing relationships. + * Clients can specify any optional field to + * partially filter for specific relationships. + * + * Example use cases (namespace is always required): + * - object only: display a list of all permissions referring to a specific object + * - relation only: get all groups that have members; get all directories that have content + * - object & relation: display all subjects that have a specific permission relation + * - subject & relation: display all groups a subject belongs to; display all objects a subject has access to + * - object & relation & subject: check whether the relation tuple already exists + */ +export interface ListRelationTuplesRequest_Query { + /** Required. The namespace to query. */ + namespace: string; + /** Optional. The object to query for. */ + object: string; + /** Optional. The relation to query for. */ + relation: string; + /** Optional. The subject to query for. */ + subject: Subject | undefined; +} + +/** The response of a ReadService.ListRelationTuples RPC. */ +export interface ListRelationTuplesResponse { + /** The relationships matching the list request. */ + relationTuples: RelationTuple[]; + /** + * The token required to get the next page. + * If this is the last page, the token will be the empty string. + */ + nextPageToken: string; +} + +function createBaseListRelationTuplesRequest(): ListRelationTuplesRequest { + return { + query: undefined, + relationQuery: undefined, + expandMask: undefined, + snaptoken: "", + pageSize: 0, + pageToken: "", + }; +} + +export const ListRelationTuplesRequest = { + encode(message: ListRelationTuplesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.query !== undefined) { + ListRelationTuplesRequest_Query.encode(message.query, writer.uint32(10).fork()).ldelim(); + } + if (message.relationQuery !== undefined) { + RelationQuery.encode(message.relationQuery, writer.uint32(50).fork()).ldelim(); + } + if (message.expandMask !== undefined) { + FieldMask.encode(FieldMask.wrap(message.expandMask), writer.uint32(18).fork()).ldelim(); + } + if (message.snaptoken !== "") { + writer.uint32(26).string(message.snaptoken); + } + if (message.pageSize !== 0) { + writer.uint32(32).int32(message.pageSize); + } + if (message.pageToken !== "") { + writer.uint32(42).string(message.pageToken); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ListRelationTuplesRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseListRelationTuplesRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.query = ListRelationTuplesRequest_Query.decode(reader, reader.uint32()); + continue; + case 6: + if (tag !== 50) { + break; + } + + message.relationQuery = RelationQuery.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.expandMask = FieldMask.unwrap(FieldMask.decode(reader, reader.uint32())); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.snaptoken = reader.string(); + continue; + case 4: + if (tag !== 32) { + break; + } + + message.pageSize = reader.int32(); + continue; + case 5: + if (tag !== 42) { + break; + } + + message.pageToken = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): ListRelationTuplesRequest { + return { + query: isSet(object.query) ? ListRelationTuplesRequest_Query.fromJSON(object.query) : undefined, + relationQuery: isSet(object.relationQuery) ? RelationQuery.fromJSON(object.relationQuery) : undefined, + expandMask: isSet(object.expandMask) ? FieldMask.unwrap(FieldMask.fromJSON(object.expandMask)) : undefined, + snaptoken: isSet(object.snaptoken) ? globalThis.String(object.snaptoken) : "", + pageSize: isSet(object.pageSize) ? globalThis.Number(object.pageSize) : 0, + pageToken: isSet(object.pageToken) ? globalThis.String(object.pageToken) : "", + }; + }, + + toJSON(message: ListRelationTuplesRequest): unknown { + const obj: any = {}; + if (message.query !== undefined) { + obj.query = ListRelationTuplesRequest_Query.toJSON(message.query); + } + if (message.relationQuery !== undefined) { + obj.relationQuery = RelationQuery.toJSON(message.relationQuery); + } + if (message.expandMask !== undefined) { + obj.expandMask = FieldMask.toJSON(FieldMask.wrap(message.expandMask)); + } + if (message.snaptoken !== "") { + obj.snaptoken = message.snaptoken; + } + if (message.pageSize !== 0) { + obj.pageSize = Math.round(message.pageSize); + } + if (message.pageToken !== "") { + obj.pageToken = message.pageToken; + } + return obj; + }, + + create, I>>(base?: I): ListRelationTuplesRequest { + return ListRelationTuplesRequest.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): ListRelationTuplesRequest { + const message = createBaseListRelationTuplesRequest(); + message.query = (object.query !== undefined && object.query !== null) + ? ListRelationTuplesRequest_Query.fromPartial(object.query) + : undefined; + message.relationQuery = (object.relationQuery !== undefined && object.relationQuery !== null) + ? RelationQuery.fromPartial(object.relationQuery) + : undefined; + message.expandMask = object.expandMask ?? undefined; + message.snaptoken = object.snaptoken ?? ""; + message.pageSize = object.pageSize ?? 0; + message.pageToken = object.pageToken ?? ""; + return message; + }, +}; + +function createBaseListRelationTuplesRequest_Query(): ListRelationTuplesRequest_Query { + return { namespace: "", object: "", relation: "", subject: undefined }; +} + +export const ListRelationTuplesRequest_Query = { + encode(message: ListRelationTuplesRequest_Query, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.namespace !== "") { + writer.uint32(10).string(message.namespace); + } + if (message.object !== "") { + writer.uint32(18).string(message.object); + } + if (message.relation !== "") { + writer.uint32(26).string(message.relation); + } + if (message.subject !== undefined) { + Subject.encode(message.subject, writer.uint32(34).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ListRelationTuplesRequest_Query { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseListRelationTuplesRequest_Query(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.namespace = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.object = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.relation = reader.string(); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.subject = Subject.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): ListRelationTuplesRequest_Query { + return { + namespace: isSet(object.namespace) ? globalThis.String(object.namespace) : "", + object: isSet(object.object) ? globalThis.String(object.object) : "", + relation: isSet(object.relation) ? globalThis.String(object.relation) : "", + subject: isSet(object.subject) ? Subject.fromJSON(object.subject) : undefined, + }; + }, + + toJSON(message: ListRelationTuplesRequest_Query): unknown { + const obj: any = {}; + if (message.namespace !== "") { + obj.namespace = message.namespace; + } + if (message.object !== "") { + obj.object = message.object; + } + if (message.relation !== "") { + obj.relation = message.relation; + } + if (message.subject !== undefined) { + obj.subject = Subject.toJSON(message.subject); + } + return obj; + }, + + create, I>>(base?: I): ListRelationTuplesRequest_Query { + return ListRelationTuplesRequest_Query.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): ListRelationTuplesRequest_Query { + const message = createBaseListRelationTuplesRequest_Query(); + message.namespace = object.namespace ?? ""; + message.object = object.object ?? ""; + message.relation = object.relation ?? ""; + message.subject = (object.subject !== undefined && object.subject !== null) + ? Subject.fromPartial(object.subject) + : undefined; + return message; + }, +}; + +function createBaseListRelationTuplesResponse(): ListRelationTuplesResponse { + return { relationTuples: [], nextPageToken: "" }; +} + +export const ListRelationTuplesResponse = { + encode(message: ListRelationTuplesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.relationTuples) { + RelationTuple.encode(v!, writer.uint32(10).fork()).ldelim(); + } + if (message.nextPageToken !== "") { + writer.uint32(18).string(message.nextPageToken); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ListRelationTuplesResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseListRelationTuplesResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.relationTuples.push(RelationTuple.decode(reader, reader.uint32())); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.nextPageToken = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): ListRelationTuplesResponse { + return { + relationTuples: globalThis.Array.isArray(object?.relationTuples) + ? object.relationTuples.map((e: any) => RelationTuple.fromJSON(e)) + : [], + nextPageToken: isSet(object.nextPageToken) ? globalThis.String(object.nextPageToken) : "", + }; + }, + + toJSON(message: ListRelationTuplesResponse): unknown { + const obj: any = {}; + if (message.relationTuples?.length) { + obj.relationTuples = message.relationTuples.map((e) => RelationTuple.toJSON(e)); + } + if (message.nextPageToken !== "") { + obj.nextPageToken = message.nextPageToken; + } + return obj; + }, + + create, I>>(base?: I): ListRelationTuplesResponse { + return ListRelationTuplesResponse.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): ListRelationTuplesResponse { + const message = createBaseListRelationTuplesResponse(); + message.relationTuples = object.relationTuples?.map((e) => RelationTuple.fromPartial(e)) || []; + message.nextPageToken = object.nextPageToken ?? ""; + return message; + }, +}; + +/** + * The service to query relationships. + * + * This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis). + */ +export type ReadServiceDefinition = typeof ReadServiceDefinition; +export const ReadServiceDefinition = { + name: "ReadService", + fullName: "ory.keto.relation_tuples.v1alpha2.ReadService", + methods: { + /** Lists ACL relationships. */ + listRelationTuples: { + name: "ListRelationTuples", + requestType: ListRelationTuplesRequest, + requestStream: false, + responseType: ListRelationTuplesResponse, + responseStream: false, + options: {}, + }, + }, +} as const; + +export interface ReadServiceImplementation { + /** Lists ACL relationships. */ + listRelationTuples( + request: ListRelationTuplesRequest, + context: CallContext & CallContextExt, + ): Promise>; +} + +export interface ReadServiceClient { + /** Lists ACL relationships. */ + listRelationTuples( + request: DeepPartial, + options?: CallOptions & CallOptionsExt, + ): Promise; +} + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc_pb.d.ts deleted file mode 100644 index 4622b75af..000000000 --- a/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc_pb.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -// package: ory.keto.relation_tuples.v1alpha2 -// file: ory/keto/relation_tuples/v1alpha2/read_service.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as grpc from "grpc"; -import * as ory_keto_relation_tuples_v1alpha2_read_service_pb from "../../../../ory/keto/relation_tuples/v1alpha2/read_service_pb"; -import * as ory_keto_relation_tuples_v1alpha2_relation_tuples_pb from "../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb"; -import * as google_protobuf_field_mask_pb from "google-protobuf/google/protobuf/field_mask_pb"; - -interface IReadServiceService extends grpc.ServiceDefinition { - listRelationTuples: IReadServiceService_IListRelationTuples; -} - -interface IReadServiceService_IListRelationTuples extends grpc.MethodDefinition { - path: "/ory.keto.relation_tuples.v1alpha2.ReadService/ListRelationTuples"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} - -export const ReadServiceService: IReadServiceService; - -export interface IReadServiceServer { - listRelationTuples: grpc.handleUnaryCall; -} - -export interface IReadServiceClient { - listRelationTuples(request: ory_keto_relation_tuples_v1alpha2_read_service_pb.ListRelationTuplesRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_read_service_pb.ListRelationTuplesResponse) => void): grpc.ClientUnaryCall; - listRelationTuples(request: ory_keto_relation_tuples_v1alpha2_read_service_pb.ListRelationTuplesRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_read_service_pb.ListRelationTuplesResponse) => void): grpc.ClientUnaryCall; - listRelationTuples(request: ory_keto_relation_tuples_v1alpha2_read_service_pb.ListRelationTuplesRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_read_service_pb.ListRelationTuplesResponse) => void): grpc.ClientUnaryCall; -} - -export class ReadServiceClient extends grpc.Client implements IReadServiceClient { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - public listRelationTuples(request: ory_keto_relation_tuples_v1alpha2_read_service_pb.ListRelationTuplesRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_read_service_pb.ListRelationTuplesResponse) => void): grpc.ClientUnaryCall; - public listRelationTuples(request: ory_keto_relation_tuples_v1alpha2_read_service_pb.ListRelationTuplesRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_read_service_pb.ListRelationTuplesResponse) => void): grpc.ClientUnaryCall; - public listRelationTuples(request: ory_keto_relation_tuples_v1alpha2_read_service_pb.ListRelationTuplesRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_read_service_pb.ListRelationTuplesResponse) => void): grpc.ClientUnaryCall; -} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc_pb.js deleted file mode 100644 index 5f3a2e045..000000000 --- a/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc_pb.js +++ /dev/null @@ -1,50 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -'use strict'; -var grpc = require('@grpc/grpc-js'); -var ory_keto_relation_tuples_v1alpha2_read_service_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/read_service_pb.js'); -var ory_keto_relation_tuples_v1alpha2_relation_tuples_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js'); -var google_protobuf_field_mask_pb = require('google-protobuf/google/protobuf/field_mask_pb.js'); - -function serialize_ory_keto_relation_tuples_v1alpha2_ListRelationTuplesRequest(arg) { - if (!(arg instanceof ory_keto_relation_tuples_v1alpha2_read_service_pb.ListRelationTuplesRequest)) { - throw new Error('Expected argument of type ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_ory_keto_relation_tuples_v1alpha2_ListRelationTuplesRequest(buffer_arg) { - return ory_keto_relation_tuples_v1alpha2_read_service_pb.ListRelationTuplesRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_ory_keto_relation_tuples_v1alpha2_ListRelationTuplesResponse(arg) { - if (!(arg instanceof ory_keto_relation_tuples_v1alpha2_read_service_pb.ListRelationTuplesResponse)) { - throw new Error('Expected argument of type ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_ory_keto_relation_tuples_v1alpha2_ListRelationTuplesResponse(buffer_arg) { - return ory_keto_relation_tuples_v1alpha2_read_service_pb.ListRelationTuplesResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - - -// The service to query relationships. -// -// This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis). -var ReadServiceService = exports.ReadServiceService = { - // Lists ACL relationships. -listRelationTuples: { - path: '/ory.keto.relation_tuples.v1alpha2.ReadService/ListRelationTuples', - requestStream: false, - responseStream: false, - requestType: ory_keto_relation_tuples_v1alpha2_read_service_pb.ListRelationTuplesRequest, - responseType: ory_keto_relation_tuples_v1alpha2_read_service_pb.ListRelationTuplesResponse, - requestSerialize: serialize_ory_keto_relation_tuples_v1alpha2_ListRelationTuplesRequest, - requestDeserialize: deserialize_ory_keto_relation_tuples_v1alpha2_ListRelationTuplesRequest, - responseSerialize: serialize_ory_keto_relation_tuples_v1alpha2_ListRelationTuplesResponse, - responseDeserialize: deserialize_ory_keto_relation_tuples_v1alpha2_ListRelationTuplesResponse, - }, -}; - -exports.ReadServiceClient = grpc.makeGenericClientConstructor(ReadServiceService); diff --git a/proto/ory/keto/relation_tuples/v1alpha2/read_service_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/read_service_pb.d.ts deleted file mode 100644 index 9ab8fee58..000000000 --- a/proto/ory/keto/relation_tuples/v1alpha2/read_service_pb.d.ts +++ /dev/null @@ -1,112 +0,0 @@ -// package: ory.keto.relation_tuples.v1alpha2 -// file: ory/keto/relation_tuples/v1alpha2/read_service.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as jspb from "google-protobuf"; -import * as ory_keto_relation_tuples_v1alpha2_relation_tuples_pb from "../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb"; -import * as google_protobuf_field_mask_pb from "google-protobuf/google/protobuf/field_mask_pb"; - -export class ListRelationTuplesRequest extends jspb.Message { - - hasQuery(): boolean; - clearQuery(): void; - getQuery(): ListRelationTuplesRequest.Query | undefined; - setQuery(value?: ListRelationTuplesRequest.Query): ListRelationTuplesRequest; - - hasRelationQuery(): boolean; - clearRelationQuery(): void; - getRelationQuery(): ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationQuery | undefined; - setRelationQuery(value?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationQuery): ListRelationTuplesRequest; - - hasExpandMask(): boolean; - clearExpandMask(): void; - getExpandMask(): google_protobuf_field_mask_pb.FieldMask | undefined; - setExpandMask(value?: google_protobuf_field_mask_pb.FieldMask): ListRelationTuplesRequest; - getSnaptoken(): string; - setSnaptoken(value: string): ListRelationTuplesRequest; - getPageSize(): number; - setPageSize(value: number): ListRelationTuplesRequest; - getPageToken(): string; - setPageToken(value: string): ListRelationTuplesRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListRelationTuplesRequest.AsObject; - static toObject(includeInstance: boolean, msg: ListRelationTuplesRequest): ListRelationTuplesRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListRelationTuplesRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListRelationTuplesRequest; - static deserializeBinaryFromReader(message: ListRelationTuplesRequest, reader: jspb.BinaryReader): ListRelationTuplesRequest; -} - -export namespace ListRelationTuplesRequest { - export type AsObject = { - query?: ListRelationTuplesRequest.Query.AsObject, - relationQuery?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationQuery.AsObject, - expandMask?: google_protobuf_field_mask_pb.FieldMask.AsObject, - snaptoken: string, - pageSize: number, - pageToken: string, - } - - - export class Query extends jspb.Message { - getNamespace(): string; - setNamespace(value: string): Query; - getObject(): string; - setObject(value: string): Query; - getRelation(): string; - setRelation(value: string): Query; - - hasSubject(): boolean; - clearSubject(): void; - getSubject(): ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject | undefined; - setSubject(value?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject): Query; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Query.AsObject; - static toObject(includeInstance: boolean, msg: Query): Query.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Query, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Query; - static deserializeBinaryFromReader(message: Query, reader: jspb.BinaryReader): Query; - } - - export namespace Query { - export type AsObject = { - namespace: string, - object: string, - relation: string, - subject?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.AsObject, - } - } - -} - -export class ListRelationTuplesResponse extends jspb.Message { - clearRelationTuplesList(): void; - getRelationTuplesList(): Array; - setRelationTuplesList(value: Array): ListRelationTuplesResponse; - addRelationTuples(value?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple, index?: number): ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple; - getNextPageToken(): string; - setNextPageToken(value: string): ListRelationTuplesResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListRelationTuplesResponse.AsObject; - static toObject(includeInstance: boolean, msg: ListRelationTuplesResponse): ListRelationTuplesResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListRelationTuplesResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListRelationTuplesResponse; - static deserializeBinaryFromReader(message: ListRelationTuplesResponse, reader: jspb.BinaryReader): ListRelationTuplesResponse; -} - -export namespace ListRelationTuplesResponse { - export type AsObject = { - relationTuplesList: Array, - nextPageToken: string, - } -} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/read_service_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/read_service_pb.js deleted file mode 100644 index 6b06c56b4..000000000 --- a/proto/ory/keto/relation_tuples/v1alpha2/read_service_pb.js +++ /dev/null @@ -1,868 +0,0 @@ -// source: ory/keto/relation_tuples/v1alpha2/read_service.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); - -var ory_keto_relation_tuples_v1alpha2_relation_tuples_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js'); -goog.object.extend(proto, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb); -var google_protobuf_field_mask_pb = require('google-protobuf/google/protobuf/field_mask_pb.js'); -goog.object.extend(proto, google_protobuf_field_mask_pb); -goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest', null, global); -goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query', null, global); -goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse.repeatedFields_, null); -}; -goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.toObject = function(includeInstance, msg) { - var f, obj = { - query: (f = msg.getQuery()) && proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.toObject(includeInstance, f), - relationQuery: (f = msg.getRelationQuery()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationQuery.toObject(includeInstance, f), - expandMask: (f = msg.getExpandMask()) && google_protobuf_field_mask_pb.FieldMask.toObject(includeInstance, f), - snaptoken: jspb.Message.getFieldWithDefault(msg, 3, ""), - pageSize: jspb.Message.getFieldWithDefault(msg, 4, 0), - pageToken: jspb.Message.getFieldWithDefault(msg, 5, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest} - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest; - return proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest} - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query; - reader.readMessage(value,proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.deserializeBinaryFromReader); - msg.setQuery(value); - break; - case 6: - var value = new ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationQuery; - reader.readMessage(value,ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationQuery.deserializeBinaryFromReader); - msg.setRelationQuery(value); - break; - case 2: - var value = new google_protobuf_field_mask_pb.FieldMask; - reader.readMessage(value,google_protobuf_field_mask_pb.FieldMask.deserializeBinaryFromReader); - msg.setExpandMask(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setSnaptoken(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt32()); - msg.setPageSize(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setPageToken(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getQuery(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.serializeBinaryToWriter - ); - } - f = message.getRelationQuery(); - if (f != null) { - writer.writeMessage( - 6, - f, - ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationQuery.serializeBinaryToWriter - ); - } - f = message.getExpandMask(); - if (f != null) { - writer.writeMessage( - 2, - f, - google_protobuf_field_mask_pb.FieldMask.serializeBinaryToWriter - ); - } - f = message.getSnaptoken(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getPageSize(); - if (f !== 0) { - writer.writeInt32( - 4, - f - ); - } - f = message.getPageToken(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.toObject = function(includeInstance, msg) { - var f, obj = { - namespace: jspb.Message.getFieldWithDefault(msg, 1, ""), - object: jspb.Message.getFieldWithDefault(msg, 2, ""), - relation: jspb.Message.getFieldWithDefault(msg, 3, ""), - subject: (f = msg.getSubject()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query} - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query; - return proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query} - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setNamespace(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setObject(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setRelation(value); - break; - case 4: - var value = new ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject; - reader.readMessage(value,ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.deserializeBinaryFromReader); - msg.setSubject(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNamespace(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getObject(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getRelation(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getSubject(); - if (f != null) { - writer.writeMessage( - 4, - f, - ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string namespace = 1; - * @return {string} - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.prototype.getNamespace = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.prototype.setNamespace = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string object = 2; - * @return {string} - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.prototype.getObject = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.prototype.setObject = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string relation = 3; - * @return {string} - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.prototype.getRelation = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.prototype.setRelation = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional Subject subject = 4; - * @return {?proto.ory.keto.relation_tuples.v1alpha2.Subject} - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.prototype.getSubject = function() { - return /** @type{?proto.ory.keto.relation_tuples.v1alpha2.Subject} */ ( - jspb.Message.getWrapperField(this, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject, 4)); -}; - - -/** - * @param {?proto.ory.keto.relation_tuples.v1alpha2.Subject|undefined} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query} returns this -*/ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.prototype.setSubject = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.prototype.clearSubject = function() { - return this.setSubject(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.prototype.hasSubject = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional Query query = 1; - * @return {?proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query} - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.getQuery = function() { - return /** @type{?proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query} */ ( - jspb.Message.getWrapperField(this, proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query, 1)); -}; - - -/** - * @param {?proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query|undefined} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest} returns this -*/ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.setQuery = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.clearQuery = function() { - return this.setQuery(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.hasQuery = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional RelationQuery relation_query = 6; - * @return {?proto.ory.keto.relation_tuples.v1alpha2.RelationQuery} - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.getRelationQuery = function() { - return /** @type{?proto.ory.keto.relation_tuples.v1alpha2.RelationQuery} */ ( - jspb.Message.getWrapperField(this, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationQuery, 6)); -}; - - -/** - * @param {?proto.ory.keto.relation_tuples.v1alpha2.RelationQuery|undefined} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest} returns this -*/ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.setRelationQuery = function(value) { - return jspb.Message.setWrapperField(this, 6, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.clearRelationQuery = function() { - return this.setRelationQuery(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.hasRelationQuery = function() { - return jspb.Message.getField(this, 6) != null; -}; - - -/** - * optional google.protobuf.FieldMask expand_mask = 2; - * @return {?proto.google.protobuf.FieldMask} - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.getExpandMask = function() { - return /** @type{?proto.google.protobuf.FieldMask} */ ( - jspb.Message.getWrapperField(this, google_protobuf_field_mask_pb.FieldMask, 2)); -}; - - -/** - * @param {?proto.google.protobuf.FieldMask|undefined} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest} returns this -*/ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.setExpandMask = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.clearExpandMask = function() { - return this.setExpandMask(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.hasExpandMask = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional string snaptoken = 3; - * @return {string} - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.getSnaptoken = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.setSnaptoken = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional int32 page_size = 4; - * @return {number} - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.getPageSize = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.setPageSize = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional string page_token = 5; - * @return {string} - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.getPageToken = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.setPageToken = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse.toObject = function(includeInstance, msg) { - var f, obj = { - relationTuplesList: jspb.Message.toObjectList(msg.getRelationTuplesList(), - ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple.toObject, includeInstance), - nextPageToken: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse} - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse; - return proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse} - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple; - reader.readMessage(value,ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple.deserializeBinaryFromReader); - msg.addRelationTuples(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setNextPageToken(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRelationTuplesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple.serializeBinaryToWriter - ); - } - f = message.getNextPageToken(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * repeated RelationTuple relation_tuples = 1; - * @return {!Array} - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse.prototype.getRelationTuplesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse} returns this -*/ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse.prototype.setRelationTuplesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.ory.keto.relation_tuples.v1alpha2.RelationTuple=} opt_value - * @param {number=} opt_index - * @return {!proto.ory.keto.relation_tuples.v1alpha2.RelationTuple} - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse.prototype.addRelationTuples = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ory.keto.relation_tuples.v1alpha2.RelationTuple, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse.prototype.clearRelationTuplesList = function() { - return this.setRelationTuplesList([]); -}; - - -/** - * optional string next_page_token = 2; - * @return {string} - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse.prototype.getNextPageToken = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse.prototype.setNextPageToken = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -goog.object.extend(exports, proto.ory.keto.relation_tuples.v1alpha2); diff --git a/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.ts b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.ts new file mode 100644 index 000000000..18bcfd7fa --- /dev/null +++ b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.ts @@ -0,0 +1,482 @@ +/* eslint-disable */ +import _m0 from "protobufjs/minimal.js"; + +export const protobufPackage = "ory.keto.relation_tuples.v1alpha2"; + +/** RelationTuple defines a relation between an Object and a Subject. */ +export interface RelationTuple { + /** The namespace this relation tuple lives in. */ + namespace: string; + /** + * The object related by this tuple. + * It is an object in the namespace of the tuple. + */ + object: string; + /** The relation between an Object and a Subject. */ + relation: string; + /** + * The subject related by this tuple. + * A Subject either represents a concrete subject id or + * a `SubjectSet` that expands to more Subjects. + */ + subject: Subject | undefined; +} + +/** + * The query for listing relationships. + * Clients can specify any optional field to + * partially filter for specific relationships. + * + * Example use cases (namespace is always required): + * - object only: display a list of all permissions referring to a specific object + * - relation only: get all groups that have members; get all directories that have content + * - object & relation: display all subjects that have a specific permission relation + * - subject & relation: display all groups a subject belongs to; display all objects a subject has access to + * - object & relation & subject: check whether the relation tuple already exists + */ +export interface RelationQuery { + /** The namespace this relation tuple lives in. */ + namespace?: + | string + | undefined; + /** + * The object related by this tuple. + * It is an object in the namespace of the tuple. + */ + object?: + | string + | undefined; + /** The relation between an Object and a Subject. */ + relation?: + | string + | undefined; + /** + * The subject related by this tuple. + * A Subject either represents a concrete subject id or + * a `SubjectSet` that expands to more Subjects. + */ + subject?: Subject | undefined; +} + +/** + * Subject is either a concrete subject id or + * a `SubjectSet` expanding to more Subjects. + */ +export interface Subject { + /** A concrete id of the subject. */ + id?: + | string + | undefined; + /** + * A subject set that expands to more Subjects. + * More information are available under [concepts](../concepts/15_subjects.mdx). + */ + set?: SubjectSet | undefined; +} + +/** + * SubjectSet refers to all subjects who have + * the same `relation` on an `object`. + */ +export interface SubjectSet { + /** + * The namespace of the object and relation + * referenced in this subject set. + */ + namespace: string; + /** The object related by this subject set. */ + object: string; + /** The relation between the object and the subjects. */ + relation: string; +} + +function createBaseRelationTuple(): RelationTuple { + return { namespace: "", object: "", relation: "", subject: undefined }; +} + +export const RelationTuple = { + encode(message: RelationTuple, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.namespace !== "") { + writer.uint32(10).string(message.namespace); + } + if (message.object !== "") { + writer.uint32(18).string(message.object); + } + if (message.relation !== "") { + writer.uint32(26).string(message.relation); + } + if (message.subject !== undefined) { + Subject.encode(message.subject, writer.uint32(34).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): RelationTuple { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseRelationTuple(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.namespace = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.object = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.relation = reader.string(); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.subject = Subject.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): RelationTuple { + return { + namespace: isSet(object.namespace) ? globalThis.String(object.namespace) : "", + object: isSet(object.object) ? globalThis.String(object.object) : "", + relation: isSet(object.relation) ? globalThis.String(object.relation) : "", + subject: isSet(object.subject) ? Subject.fromJSON(object.subject) : undefined, + }; + }, + + toJSON(message: RelationTuple): unknown { + const obj: any = {}; + if (message.namespace !== "") { + obj.namespace = message.namespace; + } + if (message.object !== "") { + obj.object = message.object; + } + if (message.relation !== "") { + obj.relation = message.relation; + } + if (message.subject !== undefined) { + obj.subject = Subject.toJSON(message.subject); + } + return obj; + }, + + create, I>>(base?: I): RelationTuple { + return RelationTuple.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): RelationTuple { + const message = createBaseRelationTuple(); + message.namespace = object.namespace ?? ""; + message.object = object.object ?? ""; + message.relation = object.relation ?? ""; + message.subject = (object.subject !== undefined && object.subject !== null) + ? Subject.fromPartial(object.subject) + : undefined; + return message; + }, +}; + +function createBaseRelationQuery(): RelationQuery { + return { namespace: undefined, object: undefined, relation: undefined, subject: undefined }; +} + +export const RelationQuery = { + encode(message: RelationQuery, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.namespace !== undefined) { + writer.uint32(10).string(message.namespace); + } + if (message.object !== undefined) { + writer.uint32(18).string(message.object); + } + if (message.relation !== undefined) { + writer.uint32(26).string(message.relation); + } + if (message.subject !== undefined) { + Subject.encode(message.subject, writer.uint32(34).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): RelationQuery { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseRelationQuery(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.namespace = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.object = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.relation = reader.string(); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.subject = Subject.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): RelationQuery { + return { + namespace: isSet(object.namespace) ? globalThis.String(object.namespace) : undefined, + object: isSet(object.object) ? globalThis.String(object.object) : undefined, + relation: isSet(object.relation) ? globalThis.String(object.relation) : undefined, + subject: isSet(object.subject) ? Subject.fromJSON(object.subject) : undefined, + }; + }, + + toJSON(message: RelationQuery): unknown { + const obj: any = {}; + if (message.namespace !== undefined) { + obj.namespace = message.namespace; + } + if (message.object !== undefined) { + obj.object = message.object; + } + if (message.relation !== undefined) { + obj.relation = message.relation; + } + if (message.subject !== undefined) { + obj.subject = Subject.toJSON(message.subject); + } + return obj; + }, + + create, I>>(base?: I): RelationQuery { + return RelationQuery.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): RelationQuery { + const message = createBaseRelationQuery(); + message.namespace = object.namespace ?? undefined; + message.object = object.object ?? undefined; + message.relation = object.relation ?? undefined; + message.subject = (object.subject !== undefined && object.subject !== null) + ? Subject.fromPartial(object.subject) + : undefined; + return message; + }, +}; + +function createBaseSubject(): Subject { + return { id: undefined, set: undefined }; +} + +export const Subject = { + encode(message: Subject, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.id !== undefined) { + writer.uint32(10).string(message.id); + } + if (message.set !== undefined) { + SubjectSet.encode(message.set, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Subject { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSubject(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.id = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.set = SubjectSet.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Subject { + return { + id: isSet(object.id) ? globalThis.String(object.id) : undefined, + set: isSet(object.set) ? SubjectSet.fromJSON(object.set) : undefined, + }; + }, + + toJSON(message: Subject): unknown { + const obj: any = {}; + if (message.id !== undefined) { + obj.id = message.id; + } + if (message.set !== undefined) { + obj.set = SubjectSet.toJSON(message.set); + } + return obj; + }, + + create, I>>(base?: I): Subject { + return Subject.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Subject { + const message = createBaseSubject(); + message.id = object.id ?? undefined; + message.set = (object.set !== undefined && object.set !== null) ? SubjectSet.fromPartial(object.set) : undefined; + return message; + }, +}; + +function createBaseSubjectSet(): SubjectSet { + return { namespace: "", object: "", relation: "" }; +} + +export const SubjectSet = { + encode(message: SubjectSet, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.namespace !== "") { + writer.uint32(10).string(message.namespace); + } + if (message.object !== "") { + writer.uint32(18).string(message.object); + } + if (message.relation !== "") { + writer.uint32(26).string(message.relation); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): SubjectSet { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSubjectSet(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.namespace = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.object = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.relation = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): SubjectSet { + return { + namespace: isSet(object.namespace) ? globalThis.String(object.namespace) : "", + object: isSet(object.object) ? globalThis.String(object.object) : "", + relation: isSet(object.relation) ? globalThis.String(object.relation) : "", + }; + }, + + toJSON(message: SubjectSet): unknown { + const obj: any = {}; + if (message.namespace !== "") { + obj.namespace = message.namespace; + } + if (message.object !== "") { + obj.object = message.object; + } + if (message.relation !== "") { + obj.relation = message.relation; + } + return obj; + }, + + create, I>>(base?: I): SubjectSet { + return SubjectSet.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): SubjectSet { + const message = createBaseSubjectSet(); + message.namespace = object.namespace ?? ""; + message.object = object.object ?? ""; + message.relation = object.relation ?? ""; + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples_grpc_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples_grpc_pb.js deleted file mode 100644 index 97b3a2461..000000000 --- a/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples_grpc_pb.js +++ /dev/null @@ -1 +0,0 @@ -// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.d.ts deleted file mode 100644 index 82bfeb6f7..000000000 --- a/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.d.ts +++ /dev/null @@ -1,144 +0,0 @@ -// package: ory.keto.relation_tuples.v1alpha2 -// file: ory/keto/relation_tuples/v1alpha2/relation_tuples.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as jspb from "google-protobuf"; - -export class RelationTuple extends jspb.Message { - getNamespace(): string; - setNamespace(value: string): RelationTuple; - getObject(): string; - setObject(value: string): RelationTuple; - getRelation(): string; - setRelation(value: string): RelationTuple; - - hasSubject(): boolean; - clearSubject(): void; - getSubject(): Subject | undefined; - setSubject(value?: Subject): RelationTuple; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RelationTuple.AsObject; - static toObject(includeInstance: boolean, msg: RelationTuple): RelationTuple.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RelationTuple, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RelationTuple; - static deserializeBinaryFromReader(message: RelationTuple, reader: jspb.BinaryReader): RelationTuple; -} - -export namespace RelationTuple { - export type AsObject = { - namespace: string, - object: string, - relation: string, - subject?: Subject.AsObject, - } -} - -export class RelationQuery extends jspb.Message { - - hasNamespace(): boolean; - clearNamespace(): void; - getNamespace(): string | undefined; - setNamespace(value: string): RelationQuery; - - hasObject(): boolean; - clearObject(): void; - getObject(): string | undefined; - setObject(value: string): RelationQuery; - - hasRelation(): boolean; - clearRelation(): void; - getRelation(): string | undefined; - setRelation(value: string): RelationQuery; - - hasSubject(): boolean; - clearSubject(): void; - getSubject(): Subject | undefined; - setSubject(value?: Subject): RelationQuery; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RelationQuery.AsObject; - static toObject(includeInstance: boolean, msg: RelationQuery): RelationQuery.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RelationQuery, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RelationQuery; - static deserializeBinaryFromReader(message: RelationQuery, reader: jspb.BinaryReader): RelationQuery; -} - -export namespace RelationQuery { - export type AsObject = { - namespace?: string, - object?: string, - relation?: string, - subject?: Subject.AsObject, - } -} - -export class Subject extends jspb.Message { - - hasId(): boolean; - clearId(): void; - getId(): string; - setId(value: string): Subject; - - hasSet(): boolean; - clearSet(): void; - getSet(): SubjectSet | undefined; - setSet(value?: SubjectSet): Subject; - - getRefCase(): Subject.RefCase; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Subject.AsObject; - static toObject(includeInstance: boolean, msg: Subject): Subject.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Subject, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Subject; - static deserializeBinaryFromReader(message: Subject, reader: jspb.BinaryReader): Subject; -} - -export namespace Subject { - export type AsObject = { - id: string, - set?: SubjectSet.AsObject, - } - - export enum RefCase { - REF_NOT_SET = 0, - ID = 1, - SET = 2, - } - -} - -export class SubjectSet extends jspb.Message { - getNamespace(): string; - setNamespace(value: string): SubjectSet; - getObject(): string; - setObject(value: string): SubjectSet; - getRelation(): string; - setRelation(value: string): SubjectSet; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SubjectSet.AsObject; - static toObject(includeInstance: boolean, msg: SubjectSet): SubjectSet.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SubjectSet, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SubjectSet; - static deserializeBinaryFromReader(message: SubjectSet, reader: jspb.BinaryReader): SubjectSet; -} - -export namespace SubjectSet { - export type AsObject = { - namespace: string, - object: string, - relation: string, - } -} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js deleted file mode 100644 index feb5a1a5a..000000000 --- a/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js +++ /dev/null @@ -1,1064 +0,0 @@ -// source: ory/keto/relation_tuples/v1alpha2/relation_tuples.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); - -goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.RelationQuery', null, global); -goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.RelationTuple', null, global); -goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.Subject', null, global); -goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.Subject.RefCase', null, global); -goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.SubjectSet', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationTuple = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.RelationTuple, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.RelationTuple'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationQuery = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.RelationQuery, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ory.keto.relation_tuples.v1alpha2.RelationQuery.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.RelationQuery'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ory.keto.relation_tuples.v1alpha2.Subject = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.ory.keto.relation_tuples.v1alpha2.Subject.oneofGroups_); -}; -goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.Subject, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ory.keto.relation_tuples.v1alpha2.Subject.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.Subject'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ory.keto.relation_tuples.v1alpha2.SubjectSet = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.SubjectSet, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.SubjectSet'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ory.keto.relation_tuples.v1alpha2.RelationTuple} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.toObject = function(includeInstance, msg) { - var f, obj = { - namespace: jspb.Message.getFieldWithDefault(msg, 1, ""), - object: jspb.Message.getFieldWithDefault(msg, 2, ""), - relation: jspb.Message.getFieldWithDefault(msg, 3, ""), - subject: (f = msg.getSubject()) && proto.ory.keto.relation_tuples.v1alpha2.Subject.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.RelationTuple} - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.relation_tuples.v1alpha2.RelationTuple; - return proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.RelationTuple} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.RelationTuple} - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setNamespace(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setObject(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setRelation(value); - break; - case 4: - var value = new proto.ory.keto.relation_tuples.v1alpha2.Subject; - reader.readMessage(value,proto.ory.keto.relation_tuples.v1alpha2.Subject.deserializeBinaryFromReader); - msg.setSubject(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.RelationTuple} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNamespace(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getObject(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getRelation(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getSubject(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.ory.keto.relation_tuples.v1alpha2.Subject.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string namespace = 1; - * @return {string} - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.prototype.getNamespace = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.RelationTuple} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.prototype.setNamespace = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string object = 2; - * @return {string} - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.prototype.getObject = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.RelationTuple} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.prototype.setObject = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string relation = 3; - * @return {string} - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.prototype.getRelation = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.RelationTuple} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.prototype.setRelation = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional Subject subject = 4; - * @return {?proto.ory.keto.relation_tuples.v1alpha2.Subject} - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.prototype.getSubject = function() { - return /** @type{?proto.ory.keto.relation_tuples.v1alpha2.Subject} */ ( - jspb.Message.getWrapperField(this, proto.ory.keto.relation_tuples.v1alpha2.Subject, 4)); -}; - - -/** - * @param {?proto.ory.keto.relation_tuples.v1alpha2.Subject|undefined} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.RelationTuple} returns this -*/ -proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.prototype.setSubject = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.RelationTuple} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.prototype.clearSubject = function() { - return this.setSubject(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.prototype.hasSubject = function() { - return jspb.Message.getField(this, 4) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationQuery.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.relation_tuples.v1alpha2.RelationQuery.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ory.keto.relation_tuples.v1alpha2.RelationQuery} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationQuery.toObject = function(includeInstance, msg) { - var f, obj = { - namespace: jspb.Message.getFieldWithDefault(msg, 1, ""), - object: jspb.Message.getFieldWithDefault(msg, 2, ""), - relation: jspb.Message.getFieldWithDefault(msg, 3, ""), - subject: (f = msg.getSubject()) && proto.ory.keto.relation_tuples.v1alpha2.Subject.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.RelationQuery} - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationQuery.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.relation_tuples.v1alpha2.RelationQuery; - return proto.ory.keto.relation_tuples.v1alpha2.RelationQuery.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.RelationQuery} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.RelationQuery} - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationQuery.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setNamespace(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setObject(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setRelation(value); - break; - case 4: - var value = new proto.ory.keto.relation_tuples.v1alpha2.Subject; - reader.readMessage(value,proto.ory.keto.relation_tuples.v1alpha2.Subject.deserializeBinaryFromReader); - msg.setSubject(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationQuery.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ory.keto.relation_tuples.v1alpha2.RelationQuery.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.RelationQuery} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationQuery.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = /** @type {string} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeString( - 1, - f - ); - } - f = /** @type {string} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeString( - 2, - f - ); - } - f = /** @type {string} */ (jspb.Message.getField(message, 3)); - if (f != null) { - writer.writeString( - 3, - f - ); - } - f = message.getSubject(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.ory.keto.relation_tuples.v1alpha2.Subject.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string namespace = 1; - * @return {string} - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationQuery.prototype.getNamespace = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.RelationQuery} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationQuery.prototype.setNamespace = function(value) { - return jspb.Message.setField(this, 1, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.RelationQuery} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationQuery.prototype.clearNamespace = function() { - return jspb.Message.setField(this, 1, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationQuery.prototype.hasNamespace = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string object = 2; - * @return {string} - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationQuery.prototype.getObject = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.RelationQuery} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationQuery.prototype.setObject = function(value) { - return jspb.Message.setField(this, 2, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.RelationQuery} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationQuery.prototype.clearObject = function() { - return jspb.Message.setField(this, 2, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationQuery.prototype.hasObject = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional string relation = 3; - * @return {string} - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationQuery.prototype.getRelation = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.RelationQuery} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationQuery.prototype.setRelation = function(value) { - return jspb.Message.setField(this, 3, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.RelationQuery} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationQuery.prototype.clearRelation = function() { - return jspb.Message.setField(this, 3, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationQuery.prototype.hasRelation = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional Subject subject = 4; - * @return {?proto.ory.keto.relation_tuples.v1alpha2.Subject} - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationQuery.prototype.getSubject = function() { - return /** @type{?proto.ory.keto.relation_tuples.v1alpha2.Subject} */ ( - jspb.Message.getWrapperField(this, proto.ory.keto.relation_tuples.v1alpha2.Subject, 4)); -}; - - -/** - * @param {?proto.ory.keto.relation_tuples.v1alpha2.Subject|undefined} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.RelationQuery} returns this -*/ -proto.ory.keto.relation_tuples.v1alpha2.RelationQuery.prototype.setSubject = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.RelationQuery} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationQuery.prototype.clearSubject = function() { - return this.setSubject(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationQuery.prototype.hasSubject = function() { - return jspb.Message.getField(this, 4) != null; -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.ory.keto.relation_tuples.v1alpha2.Subject.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.ory.keto.relation_tuples.v1alpha2.Subject.RefCase = { - REF_NOT_SET: 0, - ID: 1, - SET: 2 -}; - -/** - * @return {proto.ory.keto.relation_tuples.v1alpha2.Subject.RefCase} - */ -proto.ory.keto.relation_tuples.v1alpha2.Subject.prototype.getRefCase = function() { - return /** @type {proto.ory.keto.relation_tuples.v1alpha2.Subject.RefCase} */(jspb.Message.computeOneofCase(this, proto.ory.keto.relation_tuples.v1alpha2.Subject.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ory.keto.relation_tuples.v1alpha2.Subject.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.relation_tuples.v1alpha2.Subject.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ory.keto.relation_tuples.v1alpha2.Subject} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.Subject.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - set: (f = msg.getSet()) && proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.Subject} - */ -proto.ory.keto.relation_tuples.v1alpha2.Subject.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.relation_tuples.v1alpha2.Subject; - return proto.ory.keto.relation_tuples.v1alpha2.Subject.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.Subject} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.Subject} - */ -proto.ory.keto.relation_tuples.v1alpha2.Subject.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setId(value); - break; - case 2: - var value = new proto.ory.keto.relation_tuples.v1alpha2.SubjectSet; - reader.readMessage(value,proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.deserializeBinaryFromReader); - msg.setSet(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ory.keto.relation_tuples.v1alpha2.Subject.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ory.keto.relation_tuples.v1alpha2.Subject.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.Subject} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.Subject.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = /** @type {string} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeString( - 1, - f - ); - } - f = message.getSet(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string id = 1; - * @return {string} - */ -proto.ory.keto.relation_tuples.v1alpha2.Subject.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.Subject} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.Subject.prototype.setId = function(value) { - return jspb.Message.setOneofField(this, 1, proto.ory.keto.relation_tuples.v1alpha2.Subject.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.Subject} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.Subject.prototype.clearId = function() { - return jspb.Message.setOneofField(this, 1, proto.ory.keto.relation_tuples.v1alpha2.Subject.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ory.keto.relation_tuples.v1alpha2.Subject.prototype.hasId = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional SubjectSet set = 2; - * @return {?proto.ory.keto.relation_tuples.v1alpha2.SubjectSet} - */ -proto.ory.keto.relation_tuples.v1alpha2.Subject.prototype.getSet = function() { - return /** @type{?proto.ory.keto.relation_tuples.v1alpha2.SubjectSet} */ ( - jspb.Message.getWrapperField(this, proto.ory.keto.relation_tuples.v1alpha2.SubjectSet, 2)); -}; - - -/** - * @param {?proto.ory.keto.relation_tuples.v1alpha2.SubjectSet|undefined} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.Subject} returns this -*/ -proto.ory.keto.relation_tuples.v1alpha2.Subject.prototype.setSet = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.ory.keto.relation_tuples.v1alpha2.Subject.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.Subject} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.Subject.prototype.clearSet = function() { - return this.setSet(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ory.keto.relation_tuples.v1alpha2.Subject.prototype.hasSet = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ory.keto.relation_tuples.v1alpha2.SubjectSet} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.toObject = function(includeInstance, msg) { - var f, obj = { - namespace: jspb.Message.getFieldWithDefault(msg, 1, ""), - object: jspb.Message.getFieldWithDefault(msg, 2, ""), - relation: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.SubjectSet} - */ -proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.relation_tuples.v1alpha2.SubjectSet; - return proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.SubjectSet} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.SubjectSet} - */ -proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setNamespace(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setObject(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setRelation(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.SubjectSet} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNamespace(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getObject(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getRelation(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional string namespace = 1; - * @return {string} - */ -proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.prototype.getNamespace = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.SubjectSet} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.prototype.setNamespace = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string object = 2; - * @return {string} - */ -proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.prototype.getObject = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.SubjectSet} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.prototype.setObject = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string relation = 3; - * @return {string} - */ -proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.prototype.getRelation = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.SubjectSet} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.prototype.setRelation = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -goog.object.extend(exports, proto.ory.keto.relation_tuples.v1alpha2); diff --git a/proto/ory/keto/relation_tuples/v1alpha2/version.ts b/proto/ory/keto/relation_tuples/v1alpha2/version.ts new file mode 100644 index 000000000..c60c784f0 --- /dev/null +++ b/proto/ory/keto/relation_tuples/v1alpha2/version.ts @@ -0,0 +1,169 @@ +/* eslint-disable */ +import type { CallContext, CallOptions } from "nice-grpc-common"; +import _m0 from "protobufjs/minimal.js"; + +export const protobufPackage = "ory.keto.relation_tuples.v1alpha2"; + +/** Request for the VersionService.GetVersion RPC. */ +export interface GetVersionRequest { +} + +/** Response of the VersionService.GetVersion RPC. */ +export interface GetVersionResponse { + /** The version string of the Ory Keto instance. */ + version: string; +} + +function createBaseGetVersionRequest(): GetVersionRequest { + return {}; +} + +export const GetVersionRequest = { + encode(_: GetVersionRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): GetVersionRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGetVersionRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(_: any): GetVersionRequest { + return {}; + }, + + toJSON(_: GetVersionRequest): unknown { + const obj: any = {}; + return obj; + }, + + create, I>>(base?: I): GetVersionRequest { + return GetVersionRequest.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(_: I): GetVersionRequest { + const message = createBaseGetVersionRequest(); + return message; + }, +}; + +function createBaseGetVersionResponse(): GetVersionResponse { + return { version: "" }; +} + +export const GetVersionResponse = { + encode(message: GetVersionResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.version !== "") { + writer.uint32(10).string(message.version); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): GetVersionResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGetVersionResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.version = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): GetVersionResponse { + return { version: isSet(object.version) ? globalThis.String(object.version) : "" }; + }, + + toJSON(message: GetVersionResponse): unknown { + const obj: any = {}; + if (message.version !== "") { + obj.version = message.version; + } + return obj; + }, + + create, I>>(base?: I): GetVersionResponse { + return GetVersionResponse.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): GetVersionResponse { + const message = createBaseGetVersionResponse(); + message.version = object.version ?? ""; + return message; + }, +}; + +/** + * The service returning the specific Ory Keto instance version. + * + * This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis) and [write-APIs](../concepts/25_api-overview.mdx#write-apis). + */ +export type VersionServiceDefinition = typeof VersionServiceDefinition; +export const VersionServiceDefinition = { + name: "VersionService", + fullName: "ory.keto.relation_tuples.v1alpha2.VersionService", + methods: { + /** Returns the version of the Ory Keto instance. */ + getVersion: { + name: "GetVersion", + requestType: GetVersionRequest, + requestStream: false, + responseType: GetVersionResponse, + responseStream: false, + options: {}, + }, + }, +} as const; + +export interface VersionServiceImplementation { + /** Returns the version of the Ory Keto instance. */ + getVersion( + request: GetVersionRequest, + context: CallContext & CallContextExt, + ): Promise>; +} + +export interface VersionServiceClient { + /** Returns the version of the Ory Keto instance. */ + getVersion( + request: DeepPartial, + options?: CallOptions & CallOptionsExt, + ): Promise; +} + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/version_grpc_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/version_grpc_pb.d.ts deleted file mode 100644 index e99b28cc7..000000000 --- a/proto/ory/keto/relation_tuples/v1alpha2/version_grpc_pb.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -// package: ory.keto.relation_tuples.v1alpha2 -// file: ory/keto/relation_tuples/v1alpha2/version.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as grpc from "grpc"; -import * as ory_keto_relation_tuples_v1alpha2_version_pb from "../../../../ory/keto/relation_tuples/v1alpha2/version_pb"; - -interface IVersionServiceService extends grpc.ServiceDefinition { - getVersion: IVersionServiceService_IGetVersion; -} - -interface IVersionServiceService_IGetVersion extends grpc.MethodDefinition { - path: "/ory.keto.relation_tuples.v1alpha2.VersionService/GetVersion"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} - -export const VersionServiceService: IVersionServiceService; - -export interface IVersionServiceServer { - getVersion: grpc.handleUnaryCall; -} - -export interface IVersionServiceClient { - getVersion(request: ory_keto_relation_tuples_v1alpha2_version_pb.GetVersionRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_version_pb.GetVersionResponse) => void): grpc.ClientUnaryCall; - getVersion(request: ory_keto_relation_tuples_v1alpha2_version_pb.GetVersionRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_version_pb.GetVersionResponse) => void): grpc.ClientUnaryCall; - getVersion(request: ory_keto_relation_tuples_v1alpha2_version_pb.GetVersionRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_version_pb.GetVersionResponse) => void): grpc.ClientUnaryCall; -} - -export class VersionServiceClient extends grpc.Client implements IVersionServiceClient { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - public getVersion(request: ory_keto_relation_tuples_v1alpha2_version_pb.GetVersionRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_version_pb.GetVersionResponse) => void): grpc.ClientUnaryCall; - public getVersion(request: ory_keto_relation_tuples_v1alpha2_version_pb.GetVersionRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_version_pb.GetVersionResponse) => void): grpc.ClientUnaryCall; - public getVersion(request: ory_keto_relation_tuples_v1alpha2_version_pb.GetVersionRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_version_pb.GetVersionResponse) => void): grpc.ClientUnaryCall; -} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/version_grpc_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/version_grpc_pb.js deleted file mode 100644 index 8dba0fae7..000000000 --- a/proto/ory/keto/relation_tuples/v1alpha2/version_grpc_pb.js +++ /dev/null @@ -1,48 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -'use strict'; -var grpc = require('@grpc/grpc-js'); -var ory_keto_relation_tuples_v1alpha2_version_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/version_pb.js'); - -function serialize_ory_keto_relation_tuples_v1alpha2_GetVersionRequest(arg) { - if (!(arg instanceof ory_keto_relation_tuples_v1alpha2_version_pb.GetVersionRequest)) { - throw new Error('Expected argument of type ory.keto.relation_tuples.v1alpha2.GetVersionRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_ory_keto_relation_tuples_v1alpha2_GetVersionRequest(buffer_arg) { - return ory_keto_relation_tuples_v1alpha2_version_pb.GetVersionRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_ory_keto_relation_tuples_v1alpha2_GetVersionResponse(arg) { - if (!(arg instanceof ory_keto_relation_tuples_v1alpha2_version_pb.GetVersionResponse)) { - throw new Error('Expected argument of type ory.keto.relation_tuples.v1alpha2.GetVersionResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_ory_keto_relation_tuples_v1alpha2_GetVersionResponse(buffer_arg) { - return ory_keto_relation_tuples_v1alpha2_version_pb.GetVersionResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - - -// The service returning the specific Ory Keto instance version. -// -// This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis) and [write-APIs](../concepts/25_api-overview.mdx#write-apis). -var VersionServiceService = exports.VersionServiceService = { - // Returns the version of the Ory Keto instance. -getVersion: { - path: '/ory.keto.relation_tuples.v1alpha2.VersionService/GetVersion', - requestStream: false, - responseStream: false, - requestType: ory_keto_relation_tuples_v1alpha2_version_pb.GetVersionRequest, - responseType: ory_keto_relation_tuples_v1alpha2_version_pb.GetVersionResponse, - requestSerialize: serialize_ory_keto_relation_tuples_v1alpha2_GetVersionRequest, - requestDeserialize: deserialize_ory_keto_relation_tuples_v1alpha2_GetVersionRequest, - responseSerialize: serialize_ory_keto_relation_tuples_v1alpha2_GetVersionResponse, - responseDeserialize: deserialize_ory_keto_relation_tuples_v1alpha2_GetVersionResponse, - }, -}; - -exports.VersionServiceClient = grpc.makeGenericClientConstructor(VersionServiceService); diff --git a/proto/ory/keto/relation_tuples/v1alpha2/version_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/version_pb.d.ts deleted file mode 100644 index bf91795fe..000000000 --- a/proto/ory/keto/relation_tuples/v1alpha2/version_pb.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -// package: ory.keto.relation_tuples.v1alpha2 -// file: ory/keto/relation_tuples/v1alpha2/version.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as jspb from "google-protobuf"; - -export class GetVersionRequest extends jspb.Message { - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetVersionRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetVersionRequest): GetVersionRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetVersionRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetVersionRequest; - static deserializeBinaryFromReader(message: GetVersionRequest, reader: jspb.BinaryReader): GetVersionRequest; -} - -export namespace GetVersionRequest { - export type AsObject = { - } -} - -export class GetVersionResponse extends jspb.Message { - getVersion(): string; - setVersion(value: string): GetVersionResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetVersionResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetVersionResponse): GetVersionResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetVersionResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetVersionResponse; - static deserializeBinaryFromReader(message: GetVersionResponse, reader: jspb.BinaryReader): GetVersionResponse; -} - -export namespace GetVersionResponse { - export type AsObject = { - version: string, - } -} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/version_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/version_pb.js deleted file mode 100644 index 827707b8d..000000000 --- a/proto/ory/keto/relation_tuples/v1alpha2/version_pb.js +++ /dev/null @@ -1,299 +0,0 @@ -// source: ory/keto/relation_tuples/v1alpha2/version.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); - -goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.GetVersionRequest', null, global); -goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ory.keto.relation_tuples.v1alpha2.GetVersionRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.GetVersionRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ory.keto.relation_tuples.v1alpha2.GetVersionRequest.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.GetVersionRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ory.keto.relation_tuples.v1alpha2.GetVersionRequest.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.relation_tuples.v1alpha2.GetVersionRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ory.keto.relation_tuples.v1alpha2.GetVersionRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.GetVersionRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.GetVersionRequest} - */ -proto.ory.keto.relation_tuples.v1alpha2.GetVersionRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.relation_tuples.v1alpha2.GetVersionRequest; - return proto.ory.keto.relation_tuples.v1alpha2.GetVersionRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.GetVersionRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.GetVersionRequest} - */ -proto.ory.keto.relation_tuples.v1alpha2.GetVersionRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ory.keto.relation_tuples.v1alpha2.GetVersionRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ory.keto.relation_tuples.v1alpha2.GetVersionRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.GetVersionRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.GetVersionRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse.toObject = function(includeInstance, msg) { - var f, obj = { - version: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse} - */ -proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse; - return proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse} - */ -proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setVersion(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVersion(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string version = 1; - * @return {string} - */ -proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse.prototype.getVersion = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse.prototype.setVersion = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -goog.object.extend(exports, proto.ory.keto.relation_tuples.v1alpha2); diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service.ts b/proto/ory/keto/relation_tuples/v1alpha2/write_service.ts new file mode 100644 index 000000000..29bea1ff1 --- /dev/null +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service.ts @@ -0,0 +1,618 @@ +/* eslint-disable */ +import type { CallContext, CallOptions } from "nice-grpc-common"; +import _m0 from "protobufjs/minimal.js"; +import { RelationQuery, RelationTuple, Subject } from "./relation_tuples.js"; + +export const protobufPackage = "ory.keto.relation_tuples.v1alpha2"; + +/** The request of a WriteService.TransactRelationTuples RPC. */ +export interface TransactRelationTuplesRequest { + /** + * The write delta for the relationships operated in one single transaction. + * Either all actions succeed or no change takes effect on error. + */ + relationTupleDeltas: RelationTupleDelta[]; +} + +/** Write-delta for a TransactRelationTuplesRequest. */ +export interface RelationTupleDelta { + /** The action to do on the RelationTuple. */ + action: RelationTupleDelta_Action; + /** The target RelationTuple. */ + relationTuple: RelationTuple | undefined; +} + +export enum RelationTupleDelta_Action { + /** + * ACTION_UNSPECIFIED - Unspecified. + * The `TransactRelationTuples` RPC ignores this + * RelationTupleDelta if an action was unspecified. + */ + ACTION_UNSPECIFIED = 0, + /** + * ACTION_INSERT - Insertion of a new RelationTuple. + * It is ignored if already existing. + */ + ACTION_INSERT = 1, + /** + * ACTION_DELETE - Deletion of the RelationTuple. + * It is ignored if it does not exist. + */ + ACTION_DELETE = 2, + UNRECOGNIZED = -1, +} + +export function relationTupleDelta_ActionFromJSON(object: any): RelationTupleDelta_Action { + switch (object) { + case 0: + case "ACTION_UNSPECIFIED": + return RelationTupleDelta_Action.ACTION_UNSPECIFIED; + case 1: + case "ACTION_INSERT": + return RelationTupleDelta_Action.ACTION_INSERT; + case 2: + case "ACTION_DELETE": + return RelationTupleDelta_Action.ACTION_DELETE; + case -1: + case "UNRECOGNIZED": + default: + return RelationTupleDelta_Action.UNRECOGNIZED; + } +} + +export function relationTupleDelta_ActionToJSON(object: RelationTupleDelta_Action): string { + switch (object) { + case RelationTupleDelta_Action.ACTION_UNSPECIFIED: + return "ACTION_UNSPECIFIED"; + case RelationTupleDelta_Action.ACTION_INSERT: + return "ACTION_INSERT"; + case RelationTupleDelta_Action.ACTION_DELETE: + return "ACTION_DELETE"; + case RelationTupleDelta_Action.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } +} + +/** The response of a WriteService.TransactRelationTuples rpc. */ +export interface TransactRelationTuplesResponse { + /** + * This field is not implemented yet and has no effect. + * + */ + snaptokens: string[]; +} + +export interface DeleteRelationTuplesRequest { + /** @deprecated */ + query: DeleteRelationTuplesRequest_Query | undefined; + relationQuery: RelationQuery | undefined; +} + +/** The query for deleting relationships */ +export interface DeleteRelationTuplesRequest_Query { + /** Optional. The namespace to query. */ + namespace: string; + /** Optional. The object to query for. */ + object: string; + /** Optional. The relation to query for. */ + relation: string; + /** Optional. The subject to query for. */ + subject: Subject | undefined; +} + +export interface DeleteRelationTuplesResponse { +} + +function createBaseTransactRelationTuplesRequest(): TransactRelationTuplesRequest { + return { relationTupleDeltas: [] }; +} + +export const TransactRelationTuplesRequest = { + encode(message: TransactRelationTuplesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.relationTupleDeltas) { + RelationTupleDelta.encode(v!, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): TransactRelationTuplesRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTransactRelationTuplesRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.relationTupleDeltas.push(RelationTupleDelta.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TransactRelationTuplesRequest { + return { + relationTupleDeltas: globalThis.Array.isArray(object?.relationTupleDeltas) + ? object.relationTupleDeltas.map((e: any) => RelationTupleDelta.fromJSON(e)) + : [], + }; + }, + + toJSON(message: TransactRelationTuplesRequest): unknown { + const obj: any = {}; + if (message.relationTupleDeltas?.length) { + obj.relationTupleDeltas = message.relationTupleDeltas.map((e) => RelationTupleDelta.toJSON(e)); + } + return obj; + }, + + create, I>>(base?: I): TransactRelationTuplesRequest { + return TransactRelationTuplesRequest.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): TransactRelationTuplesRequest { + const message = createBaseTransactRelationTuplesRequest(); + message.relationTupleDeltas = object.relationTupleDeltas?.map((e) => RelationTupleDelta.fromPartial(e)) || []; + return message; + }, +}; + +function createBaseRelationTupleDelta(): RelationTupleDelta { + return { action: 0, relationTuple: undefined }; +} + +export const RelationTupleDelta = { + encode(message: RelationTupleDelta, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.action !== 0) { + writer.uint32(8).int32(message.action); + } + if (message.relationTuple !== undefined) { + RelationTuple.encode(message.relationTuple, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): RelationTupleDelta { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseRelationTupleDelta(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.action = reader.int32() as any; + continue; + case 2: + if (tag !== 18) { + break; + } + + message.relationTuple = RelationTuple.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): RelationTupleDelta { + return { + action: isSet(object.action) ? relationTupleDelta_ActionFromJSON(object.action) : 0, + relationTuple: isSet(object.relationTuple) ? RelationTuple.fromJSON(object.relationTuple) : undefined, + }; + }, + + toJSON(message: RelationTupleDelta): unknown { + const obj: any = {}; + if (message.action !== 0) { + obj.action = relationTupleDelta_ActionToJSON(message.action); + } + if (message.relationTuple !== undefined) { + obj.relationTuple = RelationTuple.toJSON(message.relationTuple); + } + return obj; + }, + + create, I>>(base?: I): RelationTupleDelta { + return RelationTupleDelta.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): RelationTupleDelta { + const message = createBaseRelationTupleDelta(); + message.action = object.action ?? 0; + message.relationTuple = (object.relationTuple !== undefined && object.relationTuple !== null) + ? RelationTuple.fromPartial(object.relationTuple) + : undefined; + return message; + }, +}; + +function createBaseTransactRelationTuplesResponse(): TransactRelationTuplesResponse { + return { snaptokens: [] }; +} + +export const TransactRelationTuplesResponse = { + encode(message: TransactRelationTuplesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.snaptokens) { + writer.uint32(10).string(v!); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): TransactRelationTuplesResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTransactRelationTuplesResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.snaptokens.push(reader.string()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TransactRelationTuplesResponse { + return { + snaptokens: globalThis.Array.isArray(object?.snaptokens) + ? object.snaptokens.map((e: any) => globalThis.String(e)) + : [], + }; + }, + + toJSON(message: TransactRelationTuplesResponse): unknown { + const obj: any = {}; + if (message.snaptokens?.length) { + obj.snaptokens = message.snaptokens; + } + return obj; + }, + + create, I>>(base?: I): TransactRelationTuplesResponse { + return TransactRelationTuplesResponse.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): TransactRelationTuplesResponse { + const message = createBaseTransactRelationTuplesResponse(); + message.snaptokens = object.snaptokens?.map((e) => e) || []; + return message; + }, +}; + +function createBaseDeleteRelationTuplesRequest(): DeleteRelationTuplesRequest { + return { query: undefined, relationQuery: undefined }; +} + +export const DeleteRelationTuplesRequest = { + encode(message: DeleteRelationTuplesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.query !== undefined) { + DeleteRelationTuplesRequest_Query.encode(message.query, writer.uint32(10).fork()).ldelim(); + } + if (message.relationQuery !== undefined) { + RelationQuery.encode(message.relationQuery, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): DeleteRelationTuplesRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseDeleteRelationTuplesRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.query = DeleteRelationTuplesRequest_Query.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.relationQuery = RelationQuery.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): DeleteRelationTuplesRequest { + return { + query: isSet(object.query) ? DeleteRelationTuplesRequest_Query.fromJSON(object.query) : undefined, + relationQuery: isSet(object.relationQuery) ? RelationQuery.fromJSON(object.relationQuery) : undefined, + }; + }, + + toJSON(message: DeleteRelationTuplesRequest): unknown { + const obj: any = {}; + if (message.query !== undefined) { + obj.query = DeleteRelationTuplesRequest_Query.toJSON(message.query); + } + if (message.relationQuery !== undefined) { + obj.relationQuery = RelationQuery.toJSON(message.relationQuery); + } + return obj; + }, + + create, I>>(base?: I): DeleteRelationTuplesRequest { + return DeleteRelationTuplesRequest.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): DeleteRelationTuplesRequest { + const message = createBaseDeleteRelationTuplesRequest(); + message.query = (object.query !== undefined && object.query !== null) + ? DeleteRelationTuplesRequest_Query.fromPartial(object.query) + : undefined; + message.relationQuery = (object.relationQuery !== undefined && object.relationQuery !== null) + ? RelationQuery.fromPartial(object.relationQuery) + : undefined; + return message; + }, +}; + +function createBaseDeleteRelationTuplesRequest_Query(): DeleteRelationTuplesRequest_Query { + return { namespace: "", object: "", relation: "", subject: undefined }; +} + +export const DeleteRelationTuplesRequest_Query = { + encode(message: DeleteRelationTuplesRequest_Query, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.namespace !== "") { + writer.uint32(10).string(message.namespace); + } + if (message.object !== "") { + writer.uint32(18).string(message.object); + } + if (message.relation !== "") { + writer.uint32(26).string(message.relation); + } + if (message.subject !== undefined) { + Subject.encode(message.subject, writer.uint32(34).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): DeleteRelationTuplesRequest_Query { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseDeleteRelationTuplesRequest_Query(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.namespace = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.object = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.relation = reader.string(); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.subject = Subject.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): DeleteRelationTuplesRequest_Query { + return { + namespace: isSet(object.namespace) ? globalThis.String(object.namespace) : "", + object: isSet(object.object) ? globalThis.String(object.object) : "", + relation: isSet(object.relation) ? globalThis.String(object.relation) : "", + subject: isSet(object.subject) ? Subject.fromJSON(object.subject) : undefined, + }; + }, + + toJSON(message: DeleteRelationTuplesRequest_Query): unknown { + const obj: any = {}; + if (message.namespace !== "") { + obj.namespace = message.namespace; + } + if (message.object !== "") { + obj.object = message.object; + } + if (message.relation !== "") { + obj.relation = message.relation; + } + if (message.subject !== undefined) { + obj.subject = Subject.toJSON(message.subject); + } + return obj; + }, + + create, I>>( + base?: I, + ): DeleteRelationTuplesRequest_Query { + return DeleteRelationTuplesRequest_Query.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): DeleteRelationTuplesRequest_Query { + const message = createBaseDeleteRelationTuplesRequest_Query(); + message.namespace = object.namespace ?? ""; + message.object = object.object ?? ""; + message.relation = object.relation ?? ""; + message.subject = (object.subject !== undefined && object.subject !== null) + ? Subject.fromPartial(object.subject) + : undefined; + return message; + }, +}; + +function createBaseDeleteRelationTuplesResponse(): DeleteRelationTuplesResponse { + return {}; +} + +export const DeleteRelationTuplesResponse = { + encode(_: DeleteRelationTuplesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): DeleteRelationTuplesResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseDeleteRelationTuplesResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(_: any): DeleteRelationTuplesResponse { + return {}; + }, + + toJSON(_: DeleteRelationTuplesResponse): unknown { + const obj: any = {}; + return obj; + }, + + create, I>>(base?: I): DeleteRelationTuplesResponse { + return DeleteRelationTuplesResponse.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(_: I): DeleteRelationTuplesResponse { + const message = createBaseDeleteRelationTuplesResponse(); + return message; + }, +}; + +/** + * The write service to create and delete Access Control Lists. + * + * This service is part of the [write-APIs](../concepts/25_api-overview.mdx#write-apis). + */ +export type WriteServiceDefinition = typeof WriteServiceDefinition; +export const WriteServiceDefinition = { + name: "WriteService", + fullName: "ory.keto.relation_tuples.v1alpha2.WriteService", + methods: { + /** Writes one or more relationships in a single transaction. */ + transactRelationTuples: { + name: "TransactRelationTuples", + requestType: TransactRelationTuplesRequest, + requestStream: false, + responseType: TransactRelationTuplesResponse, + responseStream: false, + options: {}, + }, + /** Deletes relationships based on relation query */ + deleteRelationTuples: { + name: "DeleteRelationTuples", + requestType: DeleteRelationTuplesRequest, + requestStream: false, + responseType: DeleteRelationTuplesResponse, + responseStream: false, + options: {}, + }, + }, +} as const; + +export interface WriteServiceImplementation { + /** Writes one or more relationships in a single transaction. */ + transactRelationTuples( + request: TransactRelationTuplesRequest, + context: CallContext & CallContextExt, + ): Promise>; + /** Deletes relationships based on relation query */ + deleteRelationTuples( + request: DeleteRelationTuplesRequest, + context: CallContext & CallContextExt, + ): Promise>; +} + +export interface WriteServiceClient { + /** Writes one or more relationships in a single transaction. */ + transactRelationTuples( + request: DeepPartial, + options?: CallOptions & CallOptionsExt, + ): Promise; + /** Deletes relationships based on relation query */ + deleteRelationTuples( + request: DeepPartial, + options?: CallOptions & CallOptionsExt, + ): Promise; +} + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc_pb.d.ts deleted file mode 100644 index 4e9f29615..000000000 --- a/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc_pb.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -// package: ory.keto.relation_tuples.v1alpha2 -// file: ory/keto/relation_tuples/v1alpha2/write_service.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as grpc from "grpc"; -import * as ory_keto_relation_tuples_v1alpha2_write_service_pb from "../../../../ory/keto/relation_tuples/v1alpha2/write_service_pb"; -import * as ory_keto_relation_tuples_v1alpha2_relation_tuples_pb from "../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb"; - -interface IWriteServiceService extends grpc.ServiceDefinition { - transactRelationTuples: IWriteServiceService_ITransactRelationTuples; - deleteRelationTuples: IWriteServiceService_IDeleteRelationTuples; -} - -interface IWriteServiceService_ITransactRelationTuples extends grpc.MethodDefinition { - path: "/ory.keto.relation_tuples.v1alpha2.WriteService/TransactRelationTuples"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IWriteServiceService_IDeleteRelationTuples extends grpc.MethodDefinition { - path: "/ory.keto.relation_tuples.v1alpha2.WriteService/DeleteRelationTuples"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} - -export const WriteServiceService: IWriteServiceService; - -export interface IWriteServiceServer { - transactRelationTuples: grpc.handleUnaryCall; - deleteRelationTuples: grpc.handleUnaryCall; -} - -export interface IWriteServiceClient { - transactRelationTuples(request: ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesResponse) => void): grpc.ClientUnaryCall; - transactRelationTuples(request: ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesResponse) => void): grpc.ClientUnaryCall; - transactRelationTuples(request: ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesResponse) => void): grpc.ClientUnaryCall; - deleteRelationTuples(request: ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesResponse) => void): grpc.ClientUnaryCall; - deleteRelationTuples(request: ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesResponse) => void): grpc.ClientUnaryCall; - deleteRelationTuples(request: ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesResponse) => void): grpc.ClientUnaryCall; -} - -export class WriteServiceClient extends grpc.Client implements IWriteServiceClient { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - public transactRelationTuples(request: ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesResponse) => void): grpc.ClientUnaryCall; - public transactRelationTuples(request: ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesResponse) => void): grpc.ClientUnaryCall; - public transactRelationTuples(request: ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesResponse) => void): grpc.ClientUnaryCall; - public deleteRelationTuples(request: ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesResponse) => void): grpc.ClientUnaryCall; - public deleteRelationTuples(request: ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesResponse) => void): grpc.ClientUnaryCall; - public deleteRelationTuples(request: ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesResponse) => void): grpc.ClientUnaryCall; -} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc_pb.js deleted file mode 100644 index 44547a688..000000000 --- a/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc_pb.js +++ /dev/null @@ -1,83 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -'use strict'; -var grpc = require('@grpc/grpc-js'); -var ory_keto_relation_tuples_v1alpha2_write_service_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/write_service_pb.js'); -var ory_keto_relation_tuples_v1alpha2_relation_tuples_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js'); - -function serialize_ory_keto_relation_tuples_v1alpha2_DeleteRelationTuplesRequest(arg) { - if (!(arg instanceof ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesRequest)) { - throw new Error('Expected argument of type ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_ory_keto_relation_tuples_v1alpha2_DeleteRelationTuplesRequest(buffer_arg) { - return ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_ory_keto_relation_tuples_v1alpha2_DeleteRelationTuplesResponse(arg) { - if (!(arg instanceof ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesResponse)) { - throw new Error('Expected argument of type ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_ory_keto_relation_tuples_v1alpha2_DeleteRelationTuplesResponse(buffer_arg) { - return ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_ory_keto_relation_tuples_v1alpha2_TransactRelationTuplesRequest(arg) { - if (!(arg instanceof ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesRequest)) { - throw new Error('Expected argument of type ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_ory_keto_relation_tuples_v1alpha2_TransactRelationTuplesRequest(buffer_arg) { - return ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_ory_keto_relation_tuples_v1alpha2_TransactRelationTuplesResponse(arg) { - if (!(arg instanceof ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesResponse)) { - throw new Error('Expected argument of type ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_ory_keto_relation_tuples_v1alpha2_TransactRelationTuplesResponse(buffer_arg) { - return ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - - -// The write service to create and delete Access Control Lists. -// -// This service is part of the [write-APIs](../concepts/25_api-overview.mdx#write-apis). -var WriteServiceService = exports.WriteServiceService = { - // Writes one or more relationships in a single transaction. -transactRelationTuples: { - path: '/ory.keto.relation_tuples.v1alpha2.WriteService/TransactRelationTuples', - requestStream: false, - responseStream: false, - requestType: ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesRequest, - responseType: ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesResponse, - requestSerialize: serialize_ory_keto_relation_tuples_v1alpha2_TransactRelationTuplesRequest, - requestDeserialize: deserialize_ory_keto_relation_tuples_v1alpha2_TransactRelationTuplesRequest, - responseSerialize: serialize_ory_keto_relation_tuples_v1alpha2_TransactRelationTuplesResponse, - responseDeserialize: deserialize_ory_keto_relation_tuples_v1alpha2_TransactRelationTuplesResponse, - }, - // Deletes relationships based on relation query -deleteRelationTuples: { - path: '/ory.keto.relation_tuples.v1alpha2.WriteService/DeleteRelationTuples', - requestStream: false, - responseStream: false, - requestType: ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesRequest, - responseType: ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesResponse, - requestSerialize: serialize_ory_keto_relation_tuples_v1alpha2_DeleteRelationTuplesRequest, - requestDeserialize: deserialize_ory_keto_relation_tuples_v1alpha2_DeleteRelationTuplesRequest, - responseSerialize: serialize_ory_keto_relation_tuples_v1alpha2_DeleteRelationTuplesResponse, - responseDeserialize: deserialize_ory_keto_relation_tuples_v1alpha2_DeleteRelationTuplesResponse, - }, -}; - -exports.WriteServiceClient = grpc.makeGenericClientConstructor(WriteServiceService); diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.d.ts deleted file mode 100644 index f633c84ca..000000000 --- a/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.d.ts +++ /dev/null @@ -1,165 +0,0 @@ -// package: ory.keto.relation_tuples.v1alpha2 -// file: ory/keto/relation_tuples/v1alpha2/write_service.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as jspb from "google-protobuf"; -import * as ory_keto_relation_tuples_v1alpha2_relation_tuples_pb from "../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb"; - -export class TransactRelationTuplesRequest extends jspb.Message { - clearRelationTupleDeltasList(): void; - getRelationTupleDeltasList(): Array; - setRelationTupleDeltasList(value: Array): TransactRelationTuplesRequest; - addRelationTupleDeltas(value?: RelationTupleDelta, index?: number): RelationTupleDelta; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TransactRelationTuplesRequest.AsObject; - static toObject(includeInstance: boolean, msg: TransactRelationTuplesRequest): TransactRelationTuplesRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TransactRelationTuplesRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TransactRelationTuplesRequest; - static deserializeBinaryFromReader(message: TransactRelationTuplesRequest, reader: jspb.BinaryReader): TransactRelationTuplesRequest; -} - -export namespace TransactRelationTuplesRequest { - export type AsObject = { - relationTupleDeltasList: Array, - } -} - -export class RelationTupleDelta extends jspb.Message { - getAction(): RelationTupleDelta.Action; - setAction(value: RelationTupleDelta.Action): RelationTupleDelta; - - hasRelationTuple(): boolean; - clearRelationTuple(): void; - getRelationTuple(): ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple | undefined; - setRelationTuple(value?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple): RelationTupleDelta; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RelationTupleDelta.AsObject; - static toObject(includeInstance: boolean, msg: RelationTupleDelta): RelationTupleDelta.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RelationTupleDelta, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RelationTupleDelta; - static deserializeBinaryFromReader(message: RelationTupleDelta, reader: jspb.BinaryReader): RelationTupleDelta; -} - -export namespace RelationTupleDelta { - export type AsObject = { - action: RelationTupleDelta.Action, - relationTuple?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple.AsObject, - } - - export enum Action { - ACTION_UNSPECIFIED = 0, - ACTION_INSERT = 1, - ACTION_DELETE = 2, - } - -} - -export class TransactRelationTuplesResponse extends jspb.Message { - clearSnaptokensList(): void; - getSnaptokensList(): Array; - setSnaptokensList(value: Array): TransactRelationTuplesResponse; - addSnaptokens(value: string, index?: number): string; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TransactRelationTuplesResponse.AsObject; - static toObject(includeInstance: boolean, msg: TransactRelationTuplesResponse): TransactRelationTuplesResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TransactRelationTuplesResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TransactRelationTuplesResponse; - static deserializeBinaryFromReader(message: TransactRelationTuplesResponse, reader: jspb.BinaryReader): TransactRelationTuplesResponse; -} - -export namespace TransactRelationTuplesResponse { - export type AsObject = { - snaptokensList: Array, - } -} - -export class DeleteRelationTuplesRequest extends jspb.Message { - - hasQuery(): boolean; - clearQuery(): void; - getQuery(): DeleteRelationTuplesRequest.Query | undefined; - setQuery(value?: DeleteRelationTuplesRequest.Query): DeleteRelationTuplesRequest; - - hasRelationQuery(): boolean; - clearRelationQuery(): void; - getRelationQuery(): ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationQuery | undefined; - setRelationQuery(value?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationQuery): DeleteRelationTuplesRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DeleteRelationTuplesRequest.AsObject; - static toObject(includeInstance: boolean, msg: DeleteRelationTuplesRequest): DeleteRelationTuplesRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DeleteRelationTuplesRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DeleteRelationTuplesRequest; - static deserializeBinaryFromReader(message: DeleteRelationTuplesRequest, reader: jspb.BinaryReader): DeleteRelationTuplesRequest; -} - -export namespace DeleteRelationTuplesRequest { - export type AsObject = { - query?: DeleteRelationTuplesRequest.Query.AsObject, - relationQuery?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationQuery.AsObject, - } - - - export class Query extends jspb.Message { - getNamespace(): string; - setNamespace(value: string): Query; - getObject(): string; - setObject(value: string): Query; - getRelation(): string; - setRelation(value: string): Query; - - hasSubject(): boolean; - clearSubject(): void; - getSubject(): ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject | undefined; - setSubject(value?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject): Query; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Query.AsObject; - static toObject(includeInstance: boolean, msg: Query): Query.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Query, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Query; - static deserializeBinaryFromReader(message: Query, reader: jspb.BinaryReader): Query; - } - - export namespace Query { - export type AsObject = { - namespace: string, - object: string, - relation: string, - subject?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.AsObject, - } - } - -} - -export class DeleteRelationTuplesResponse extends jspb.Message { - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DeleteRelationTuplesResponse.AsObject; - static toObject(includeInstance: boolean, msg: DeleteRelationTuplesResponse): DeleteRelationTuplesResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DeleteRelationTuplesResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DeleteRelationTuplesResponse; - static deserializeBinaryFromReader(message: DeleteRelationTuplesResponse, reader: jspb.BinaryReader): DeleteRelationTuplesResponse; -} - -export namespace DeleteRelationTuplesResponse { - export type AsObject = { - } -} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.js deleted file mode 100644 index 0d7dd3426..000000000 --- a/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.js +++ /dev/null @@ -1,1209 +0,0 @@ -// source: ory/keto/relation_tuples/v1alpha2/write_service.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); - -var ory_keto_relation_tuples_v1alpha2_relation_tuples_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js'); -goog.object.extend(proto, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb); -goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest', null, global); -goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query', null, global); -goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse', null, global); -goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta', null, global); -goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action', null, global); -goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest', null, global); -goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest.repeatedFields_, null); -}; -goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse.repeatedFields_, null); -}; -goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse'; -} - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest.toObject = function(includeInstance, msg) { - var f, obj = { - relationTupleDeltasList: jspb.Message.toObjectList(msg.getRelationTupleDeltasList(), - proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest} - */ -proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest; - return proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest} - */ -proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta; - reader.readMessage(value,proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.deserializeBinaryFromReader); - msg.addRelationTupleDeltas(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRelationTupleDeltasList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated RelationTupleDelta relation_tuple_deltas = 1; - * @return {!Array} - */ -proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest.prototype.getRelationTupleDeltasList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest} returns this -*/ -proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest.prototype.setRelationTupleDeltasList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta=} opt_value - * @param {number=} opt_index - * @return {!proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta} - */ -proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest.prototype.addRelationTupleDeltas = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest.prototype.clearRelationTupleDeltasList = function() { - return this.setRelationTupleDeltasList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.toObject = function(includeInstance, msg) { - var f, obj = { - action: jspb.Message.getFieldWithDefault(msg, 1, 0), - relationTuple: (f = msg.getRelationTuple()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta} - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta; - return proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta} - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action} */ (reader.readEnum()); - msg.setAction(value); - break; - case 2: - var value = new ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple; - reader.readMessage(value,ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple.deserializeBinaryFromReader); - msg.setRelationTuple(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAction(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getRelationTuple(); - if (f != null) { - writer.writeMessage( - 2, - f, - ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple.serializeBinaryToWriter - ); - } -}; - - -/** - * @enum {number} - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action = { - ACTION_UNSPECIFIED: 0, - ACTION_INSERT: 1, - ACTION_DELETE: 2 -}; - -/** - * optional Action action = 1; - * @return {!proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action} - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.prototype.getAction = function() { - return /** @type {!proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.prototype.setAction = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * optional RelationTuple relation_tuple = 2; - * @return {?proto.ory.keto.relation_tuples.v1alpha2.RelationTuple} - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.prototype.getRelationTuple = function() { - return /** @type{?proto.ory.keto.relation_tuples.v1alpha2.RelationTuple} */ ( - jspb.Message.getWrapperField(this, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple, 2)); -}; - - -/** - * @param {?proto.ory.keto.relation_tuples.v1alpha2.RelationTuple|undefined} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta} returns this -*/ -proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.prototype.setRelationTuple = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.prototype.clearRelationTuple = function() { - return this.setRelationTuple(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.prototype.hasRelationTuple = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse.toObject = function(includeInstance, msg) { - var f, obj = { - snaptokensList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse} - */ -proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse; - return proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse} - */ -proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.addSnaptokens(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSnaptokensList(); - if (f.length > 0) { - writer.writeRepeatedString( - 1, - f - ); - } -}; - - -/** - * repeated string snaptokens = 1; - * @return {!Array} - */ -proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse.prototype.getSnaptokensList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse.prototype.setSnaptokensList = function(value) { - return jspb.Message.setField(this, 1, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse.prototype.addSnaptokens = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse.prototype.clearSnaptokensList = function() { - return this.setSnaptokensList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.toObject = function(includeInstance, msg) { - var f, obj = { - query: (f = msg.getQuery()) && proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.toObject(includeInstance, f), - relationQuery: (f = msg.getRelationQuery()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationQuery.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest} - */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest; - return proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest} - */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query; - reader.readMessage(value,proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.deserializeBinaryFromReader); - msg.setQuery(value); - break; - case 2: - var value = new ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationQuery; - reader.readMessage(value,ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationQuery.deserializeBinaryFromReader); - msg.setRelationQuery(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getQuery(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.serializeBinaryToWriter - ); - } - f = message.getRelationQuery(); - if (f != null) { - writer.writeMessage( - 2, - f, - ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationQuery.serializeBinaryToWriter - ); - } -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.toObject = function(includeInstance, msg) { - var f, obj = { - namespace: jspb.Message.getFieldWithDefault(msg, 1, ""), - object: jspb.Message.getFieldWithDefault(msg, 2, ""), - relation: jspb.Message.getFieldWithDefault(msg, 3, ""), - subject: (f = msg.getSubject()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} - */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query; - return proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} - */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setNamespace(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setObject(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setRelation(value); - break; - case 4: - var value = new ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject; - reader.readMessage(value,ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.deserializeBinaryFromReader); - msg.setSubject(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNamespace(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getObject(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getRelation(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getSubject(); - if (f != null) { - writer.writeMessage( - 4, - f, - ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string namespace = 1; - * @return {string} - */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.getNamespace = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.setNamespace = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string object = 2; - * @return {string} - */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.getObject = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.setObject = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string relation = 3; - * @return {string} - */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.getRelation = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.setRelation = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional Subject subject = 4; - * @return {?proto.ory.keto.relation_tuples.v1alpha2.Subject} - */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.getSubject = function() { - return /** @type{?proto.ory.keto.relation_tuples.v1alpha2.Subject} */ ( - jspb.Message.getWrapperField(this, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject, 4)); -}; - - -/** - * @param {?proto.ory.keto.relation_tuples.v1alpha2.Subject|undefined} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} returns this -*/ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.setSubject = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.clearSubject = function() { - return this.setSubject(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.hasSubject = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional Query query = 1; - * @return {?proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} - */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.getQuery = function() { - return /** @type{?proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} */ ( - jspb.Message.getWrapperField(this, proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query, 1)); -}; - - -/** - * @param {?proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query|undefined} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest} returns this -*/ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.setQuery = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.clearQuery = function() { - return this.setQuery(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.hasQuery = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional RelationQuery relation_query = 2; - * @return {?proto.ory.keto.relation_tuples.v1alpha2.RelationQuery} - */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.getRelationQuery = function() { - return /** @type{?proto.ory.keto.relation_tuples.v1alpha2.RelationQuery} */ ( - jspb.Message.getWrapperField(this, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationQuery, 2)); -}; - - -/** - * @param {?proto.ory.keto.relation_tuples.v1alpha2.RelationQuery|undefined} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest} returns this -*/ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.setRelationQuery = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest} returns this - */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.clearRelationQuery = function() { - return this.setRelationQuery(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.hasRelationQuery = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse} - */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse; - return proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse} - */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - -goog.object.extend(exports, proto.ory.keto.relation_tuples.v1alpha2); diff --git a/proto/package-lock.json b/proto/package-lock.json index ce323f395..6001e5c8e 100644 --- a/proto/package-lock.json +++ b/proto/package-lock.json @@ -1,547 +1,43 @@ { "name": "@ory/keto-grpc-client", - "version": "0.6.0-alpha.1", + "version": "0.12.0-alpha.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ory/keto-grpc-client", - "version": "0.6.0-alpha.1", + "version": "0.12.0-alpha.1", "dependencies": { - "@grpc/grpc-js": "1.9.6", - "google-protobuf": "^3.21.2" + "nice-grpc-common": "2.0.2" } }, - "node_modules/@grpc/grpc-js": { - "version": "1.9.6", - "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.9.6.tgz", - "integrity": "sha512-yq3qTy23u++8zdvf+h4mz4ohDFi681JAkMZZPTKh8zmUVh0AKLisFlgxcn22FMNowXz15oJ6pqgwT7DJ+PdJvg==", + "node_modules/nice-grpc-common": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/nice-grpc-common/-/nice-grpc-common-2.0.2.tgz", + "integrity": "sha512-7RNWbls5kAL1QVUOXvBsv1uO0wPQK3lHv+cY1gwkTzirnG1Nop4cBJZubpgziNbaVc/bl9QJcyvsf/NQxa3rjQ==", "dependencies": { - "@grpc/proto-loader": "^0.7.8", - "@types/node": ">=12.12.47" - }, - "engines": { - "node": "^8.13.0 || >=10.10.0" + "ts-error": "^1.0.6" } }, - "node_modules/@grpc/proto-loader": { - "version": "0.7.10", - "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.10.tgz", - "integrity": "sha512-CAqDfoaQ8ykFd9zqBDn4k6iWT9loLAlc2ETmDFS9JCD70gDcnA4L3AFEo2iV7KyAtAAHFW9ftq1Fz+Vsgq80RQ==", - "dependencies": { - "lodash.camelcase": "^4.3.0", - "long": "^5.0.0", - "protobufjs": "^7.2.4", - "yargs": "^17.7.2" - }, - "bin": { - "proto-loader-gen-types": "build/bin/proto-loader-gen-types.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/@protobufjs/aspromise": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", - "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==" - }, - "node_modules/@protobufjs/base64": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", - "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" - }, - "node_modules/@protobufjs/codegen": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", - "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" - }, - "node_modules/@protobufjs/eventemitter": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", - "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" - }, - "node_modules/@protobufjs/fetch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", - "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", - "dependencies": { - "@protobufjs/aspromise": "^1.1.1", - "@protobufjs/inquire": "^1.1.0" - } - }, - "node_modules/@protobufjs/float": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", - "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" - }, - "node_modules/@protobufjs/inquire": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", - "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" - }, - "node_modules/@protobufjs/path": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", - "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" - }, - "node_modules/@protobufjs/pool": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", - "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" - }, - "node_modules/@protobufjs/utf8": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", - "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" - }, - "node_modules/@types/node": { - "version": "20.8.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.7.tgz", - "integrity": "sha512-21TKHHh3eUHIi2MloeptJWALuCu5H7HQTdTrWIFReA8ad+aggoX+lRes3ex7/FtpC+sVUpFMQ+QTfYr74mruiQ==", - "dependencies": { - "undici-types": "~5.25.1" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, - "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "engines": { - "node": ">=6" - } - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/google-protobuf": { - "version": "3.21.2", - "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.21.2.tgz", - "integrity": "sha512-3MSOYFO5U9mPGikIYCzK0SaThypfGgS6bHqrUGXG3DPHCrb+txNqeEcns1W0lkGfk0rCyNXm7xB9rMxnCiZOoA==" - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "engines": { - "node": ">=8" - } - }, - "node_modules/lodash.camelcase": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==" - }, - "node_modules/long": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", - "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" - }, - "node_modules/protobufjs": { - "version": "7.2.5", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.5.tgz", - "integrity": "sha512-gGXRSXvxQ7UiPgfw8gevrfRWcTlSbOFg+p/N+JVJEK5VhueL2miT6qTymqAmjr1Q5WbOCyJbyrk6JfWKwlFn6A==", - "hasInstallScript": true, - "dependencies": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/node": ">=13.7.0", - "long": "^5.0.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/undici-types": { - "version": "5.25.3", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.25.3.tgz", - "integrity": "sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==" - }, - "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "engines": { - "node": ">=12" - } + "node_modules/ts-error": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/ts-error/-/ts-error-1.0.6.tgz", + "integrity": "sha512-tLJxacIQUM82IR7JO1UUkKlYuUTmoY9HBJAmNWFzheSlDS5SPMcNIepejHJa4BpPQLAcbRhRf3GDJzyj6rbKvA==" } }, "dependencies": { - "@grpc/grpc-js": { - "version": "1.9.6", - "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.9.6.tgz", - "integrity": "sha512-yq3qTy23u++8zdvf+h4mz4ohDFi681JAkMZZPTKh8zmUVh0AKLisFlgxcn22FMNowXz15oJ6pqgwT7DJ+PdJvg==", - "requires": { - "@grpc/proto-loader": "^0.7.8", - "@types/node": ">=12.12.47" - } - }, - "@grpc/proto-loader": { - "version": "0.7.10", - "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.10.tgz", - "integrity": "sha512-CAqDfoaQ8ykFd9zqBDn4k6iWT9loLAlc2ETmDFS9JCD70gDcnA4L3AFEo2iV7KyAtAAHFW9ftq1Fz+Vsgq80RQ==", - "requires": { - "lodash.camelcase": "^4.3.0", - "long": "^5.0.0", - "protobufjs": "^7.2.4", - "yargs": "^17.7.2" - } - }, - "@protobufjs/aspromise": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", - "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==" - }, - "@protobufjs/base64": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", - "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" - }, - "@protobufjs/codegen": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", - "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" - }, - "@protobufjs/eventemitter": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", - "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" - }, - "@protobufjs/fetch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", - "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", - "requires": { - "@protobufjs/aspromise": "^1.1.1", - "@protobufjs/inquire": "^1.1.0" - } - }, - "@protobufjs/float": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", - "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" - }, - "@protobufjs/inquire": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", - "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" - }, - "@protobufjs/path": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", - "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" - }, - "@protobufjs/pool": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", - "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" - }, - "@protobufjs/utf8": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", - "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" - }, - "@types/node": { - "version": "20.8.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.7.tgz", - "integrity": "sha512-21TKHHh3eUHIi2MloeptJWALuCu5H7HQTdTrWIFReA8ad+aggoX+lRes3ex7/FtpC+sVUpFMQ+QTfYr74mruiQ==", - "requires": { - "undici-types": "~5.25.1" - } - }, - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "requires": { - "color-convert": "^2.0.1" - } - }, - "cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, - "escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" - }, - "google-protobuf": { - "version": "3.21.2", - "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.21.2.tgz", - "integrity": "sha512-3MSOYFO5U9mPGikIYCzK0SaThypfGgS6bHqrUGXG3DPHCrb+txNqeEcns1W0lkGfk0rCyNXm7xB9rMxnCiZOoA==" - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" - }, - "lodash.camelcase": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==" - }, - "long": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", - "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" - }, - "protobufjs": { - "version": "7.2.5", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.5.tgz", - "integrity": "sha512-gGXRSXvxQ7UiPgfw8gevrfRWcTlSbOFg+p/N+JVJEK5VhueL2miT6qTymqAmjr1Q5WbOCyJbyrk6JfWKwlFn6A==", - "requires": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/node": ">=13.7.0", - "long": "^5.0.0" - } - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==" - }, - "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - } - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "undici-types": { - "version": "5.25.3", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.25.3.tgz", - "integrity": "sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==" - }, - "wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, - "y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==" - }, - "yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "nice-grpc-common": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/nice-grpc-common/-/nice-grpc-common-2.0.2.tgz", + "integrity": "sha512-7RNWbls5kAL1QVUOXvBsv1uO0wPQK3lHv+cY1gwkTzirnG1Nop4cBJZubpgziNbaVc/bl9QJcyvsf/NQxa3rjQ==", "requires": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" + "ts-error": "^1.0.6" } }, - "yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==" + "ts-error": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/ts-error/-/ts-error-1.0.6.tgz", + "integrity": "sha512-tLJxacIQUM82IR7JO1UUkKlYuUTmoY9HBJAmNWFzheSlDS5SPMcNIepejHJa4BpPQLAcbRhRf3GDJzyj6rbKvA==" } } } diff --git a/proto/package.json b/proto/package.json index 4c8ba1501..eba7cea6a 100644 --- a/proto/package.json +++ b/proto/package.json @@ -1,12 +1,11 @@ { "name": "@ory/keto-grpc-client", - "version": "0.6.0-alpha.1", + "version": "0.12.0-alpha.1", "description": "gRPC client for Ory Keto", "homepage": "https://www.ory.sh/keto", "bugs": "https://github.com/ory/keto/issues", "main": "./index.js", "dependencies": { - "@grpc/grpc-js": "1.9.6", - "google-protobuf": "^3.21.2" + "nice-grpc-common": "2.0.2" } }