From 3484d26b340807e3c68fdd207a0d4c7c97c3ce7f Mon Sep 17 00:00:00 2001 From: Scott Phillips Date: Thu, 17 Aug 2023 15:55:01 -0400 Subject: [PATCH 1/6] spike: Initial commit of sample --- samples/connect-basic/.gitignore | 24 + samples/connect-basic/index.html | 13 + samples/connect-basic/package-lock.json | 1310 ++++++++++++++++++++++ samples/connect-basic/package.json | 19 + samples/connect-basic/public/vite.svg | 1 + samples/connect-basic/src/counter.ts | 9 + samples/connect-basic/src/main.ts | 24 + samples/connect-basic/src/server.ts | 24 + samples/connect-basic/src/style.css | 97 ++ samples/connect-basic/src/typescript.svg | 1 + samples/connect-basic/src/vite-env.d.ts | 1 + samples/connect-basic/tsconfig.json | 23 + 12 files changed, 1546 insertions(+) create mode 100644 samples/connect-basic/.gitignore create mode 100644 samples/connect-basic/index.html create mode 100644 samples/connect-basic/package-lock.json create mode 100644 samples/connect-basic/package.json create mode 100644 samples/connect-basic/public/vite.svg create mode 100644 samples/connect-basic/src/counter.ts create mode 100644 samples/connect-basic/src/main.ts create mode 100644 samples/connect-basic/src/server.ts create mode 100644 samples/connect-basic/src/style.css create mode 100644 samples/connect-basic/src/typescript.svg create mode 100644 samples/connect-basic/src/vite-env.d.ts create mode 100644 samples/connect-basic/tsconfig.json diff --git a/samples/connect-basic/.gitignore b/samples/connect-basic/.gitignore new file mode 100644 index 000000000..a547bf36d --- /dev/null +++ b/samples/connect-basic/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/samples/connect-basic/index.html b/samples/connect-basic/index.html new file mode 100644 index 000000000..e265b60b0 --- /dev/null +++ b/samples/connect-basic/index.html @@ -0,0 +1,13 @@ + + + + + + + Vite + TS + + +
+ + + diff --git a/samples/connect-basic/package-lock.json b/samples/connect-basic/package-lock.json new file mode 100644 index 000000000..dafb9f9f2 --- /dev/null +++ b/samples/connect-basic/package-lock.json @@ -0,0 +1,1310 @@ +{ + "name": "connect-basic", + "version": "0.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "connect-basic", + "version": "0.0.0", + "dependencies": { + "@trinsic/trinsic": "file:../../web", + "express": "^4.18.2" + }, + "devDependencies": { + "@types/express": "^4.17.17", + "typescript": "^5.0.2", + "vite": "^4.4.5" + } + }, + "../../web": { + "name": "@trinsic/trinsic", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@azure/core-asynciterator-polyfill": "1.0.2", + "buffer": "6.0.3", + "fastestsmallesttextencoderdecoder": "1.0.22", + "google-protobuf": "3.21.2", + "js-base64": "3.7.5", + "long": "5.2.3", + "nice-grpc-web": "3.2.4", + "protobufjs": "7.2.4" + }, + "devDependencies": { + "@babel/core": "7.18.10", + "@babel/plugin-transform-modules-commonjs": "7.18.6", + "@types/google-protobuf": "3.15.6", + "@types/jasmine": "4.0.3", + "@types/jest": "28.1.7", + "@types/karma": "6.3.3", + "@types/karma-webpack": "2.0.11", + "@types/node": "18.7.8", + "@types/uuid": "8.3.4", + "babel-jest": "28.1.3", + "babel-plugin-dynamic-import-node": "2.3.3", + "chromedriver": "105.0.0", + "copyfiles": "2.4.1", + "dotenv": "16.0.1", + "esm": "3.2.25", + "expect": "29.0.1", + "jasmine": "4.3.0", + "jasmine-core": "4.3.0", + "jasmine-spec-reporter": "7.0.0", + "jest": "28.1.3", + "karma": "6.4.0", + "karma-chrome-launcher": "3.1.1", + "karma-coverage": "2.2.0", + "karma-jasmine": "5.1.0", + "karma-jasmine-html-reporter": "2.0.0", + "karma-sourcemap-loader": "0.3.8", + "karma-typescript": "5.5.3", + "karma-webpack": "5.0.0", + "ts-jest": "28.0.8", + "ts-loader": "9.3.1", + "ts-node": "10.9.1", + "ts-proto": "1.156.2", + "typescript": "4.7.4", + "uuid": "8.3.2", + "vite": "4.4.9", + "vite-plugin-dts": "3.5.2", + "webpack": "5.76.0", + "webpack-cli": "4.10.0" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz", + "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz", + "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz", + "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz", + "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz", + "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz", + "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz", + "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz", + "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz", + "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz", + "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz", + "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz", + "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz", + "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz", + "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz", + "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz", + "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz", + "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz", + "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz", + "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz", + "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz", + "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz", + "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@trinsic/trinsic": { + "resolved": "../../web", + "link": true + }, + "node_modules/@types/body-parser": { + "version": "1.19.2", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", + "integrity": "sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==", + "dev": true, + "dependencies": { + "@types/connect": "*", + "@types/node": "*" + } + }, + "node_modules/@types/connect": { + "version": "3.4.35", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz", + "integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/express": { + "version": "4.17.17", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.17.tgz", + "integrity": "sha512-Q4FmmuLGBG58btUnfS1c1r/NQdlp3DMfGDGig8WhfpA2YRUtEkxAjkZb0yvplJGYdF1fsQ81iMDcH24sSCNC/Q==", + "dev": true, + "dependencies": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "^4.17.33", + "@types/qs": "*", + "@types/serve-static": "*" + } + }, + "node_modules/@types/express-serve-static-core": { + "version": "4.17.35", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.35.tgz", + "integrity": "sha512-wALWQwrgiB2AWTT91CB62b6Yt0sNHpznUXeZEcnPU3DRdlDIz74x8Qg1UUYKSVFi+va5vKOLYRBI1bRKiLLKIg==", + "dev": true, + "dependencies": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*", + "@types/send": "*" + } + }, + "node_modules/@types/http-errors": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.1.tgz", + "integrity": "sha512-/K3ds8TRAfBvi5vfjuz8y6+GiAYBZ0x4tXv1Av6CWBWn0IlADc+ZX9pMq7oU0fNQPnBwIZl3rmeLp6SBApbxSQ==", + "dev": true + }, + "node_modules/@types/mime": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz", + "integrity": "sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==", + "dev": true + }, + "node_modules/@types/node": { + "version": "20.5.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.5.0.tgz", + "integrity": "sha512-Mgq7eCtoTjT89FqNoTzzXg2XvCi5VMhRV6+I2aYanc6kQCBImeNaAYRs/DyoVqk1YEUJK5gN9VO7HRIdz4Wo3Q==", + "dev": true + }, + "node_modules/@types/qs": { + "version": "6.9.7", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", + "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==", + "dev": true + }, + "node_modules/@types/range-parser": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz", + "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==", + "dev": true + }, + "node_modules/@types/send": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.1.tgz", + "integrity": "sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q==", + "dev": true, + "dependencies": { + "@types/mime": "^1", + "@types/node": "*" + } + }, + "node_modules/@types/serve-static": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.2.tgz", + "integrity": "sha512-J2LqtvFYCzaj8pVYKw8klQXrLLk7TBZmQ4ShlcdkELFKGwGMfevMLneMMRkMgZxotOD9wg497LpC7O8PcvAmfw==", + "dev": true, + "dependencies": { + "@types/http-errors": "*", + "@types/mime": "*", + "@types/node": "*" + } + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" + }, + "node_modules/body-parser": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", + "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.1", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/esbuild": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", + "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/android-arm": "0.18.20", + "@esbuild/android-arm64": "0.18.20", + "@esbuild/android-x64": "0.18.20", + "@esbuild/darwin-arm64": "0.18.20", + "@esbuild/darwin-x64": "0.18.20", + "@esbuild/freebsd-arm64": "0.18.20", + "@esbuild/freebsd-x64": "0.18.20", + "@esbuild/linux-arm": "0.18.20", + "@esbuild/linux-arm64": "0.18.20", + "@esbuild/linux-ia32": "0.18.20", + "@esbuild/linux-loong64": "0.18.20", + "@esbuild/linux-mips64el": "0.18.20", + "@esbuild/linux-ppc64": "0.18.20", + "@esbuild/linux-riscv64": "0.18.20", + "@esbuild/linux-s390x": "0.18.20", + "@esbuild/linux-x64": "0.18.20", + "@esbuild/netbsd-x64": "0.18.20", + "@esbuild/openbsd-x64": "0.18.20", + "@esbuild/sunos-x64": "0.18.20", + "@esbuild/win32-arm64": "0.18.20", + "@esbuild/win32-ia32": "0.18.20", + "@esbuild/win32-x64": "0.18.20" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express": { + "version": "4.18.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", + "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.1", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.5.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.2.0", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.11.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/finalhandler": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "node_modules/get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/nanoid": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", + "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/object-inspect": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "node_modules/postcss": { + "version": "8.4.28", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.28.tgz", + "integrity": "sha512-Z7V5j0cq8oEKyejIKfpD8b4eBy9cwW2JWPk0+fB1HOAMsfHbnAXLLS+PfVWlzMSLQaWttKDt607I0XHmpE67Vw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "nanoid": "^3.3.6", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", + "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/rollup": { + "version": "3.28.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.28.0.tgz", + "integrity": "sha512-d7zhvo1OUY2SXSM6pfNjgD5+d0Nz87CUp4mt8l/GgVP3oBsPwzNvSzyu1me6BSG9JIgWNTVcafIXBIyM8yQ3yw==", + "dev": true, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=14.18.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/serve-static": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "dependencies": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.18.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/typescript": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz", + "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/vite": { + "version": "4.4.9", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.4.9.tgz", + "integrity": "sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==", + "dev": true, + "dependencies": { + "esbuild": "^0.18.10", + "postcss": "^8.4.27", + "rollup": "^3.27.1" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + }, + "peerDependencies": { + "@types/node": ">= 14", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + } + } +} diff --git a/samples/connect-basic/package.json b/samples/connect-basic/package.json new file mode 100644 index 000000000..48c9e1ef5 --- /dev/null +++ b/samples/connect-basic/package.json @@ -0,0 +1,19 @@ +{ + "name": "connect-basic", + "private": true, + "version": "0.0.0", + "scripts": { + "dev": "vite", + "build": "tsc && vite build", + "preview": "vite preview" + }, + "dependencies": { + "@trinsic/trinsic": "file:../../web", + "express": "^4.18.2" + }, + "devDependencies": { + "@types/express": "4.17.17", + "typescript": "5.1.6", + "vite": "4.4.9" + } +} diff --git a/samples/connect-basic/public/vite.svg b/samples/connect-basic/public/vite.svg new file mode 100644 index 000000000..e7b8dfb1b --- /dev/null +++ b/samples/connect-basic/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/samples/connect-basic/src/counter.ts b/samples/connect-basic/src/counter.ts new file mode 100644 index 000000000..09e5afd2d --- /dev/null +++ b/samples/connect-basic/src/counter.ts @@ -0,0 +1,9 @@ +export function setupCounter(element: HTMLButtonElement) { + let counter = 0 + const setCounter = (count: number) => { + counter = count + element.innerHTML = `count is ${counter}` + } + element.addEventListener('click', () => setCounter(counter + 1)) + setCounter(0) +} diff --git a/samples/connect-basic/src/main.ts b/samples/connect-basic/src/main.ts new file mode 100644 index 000000000..2f852a7cf --- /dev/null +++ b/samples/connect-basic/src/main.ts @@ -0,0 +1,24 @@ +import './style.css' +import typescriptLogo from './typescript.svg' +import viteLogo from '/vite.svg' +import { setupCounter } from './counter' + +document.querySelector('#app')!.innerHTML = ` +
+ + + + + + +

Vite + TypeScript

+
+ +
+

+ Click on the Vite and TypeScript logos to learn more +

+
+` + +setupCounter(document.querySelector('#counter')!) diff --git a/samples/connect-basic/src/server.ts b/samples/connect-basic/src/server.ts new file mode 100644 index 000000000..cf898d92d --- /dev/null +++ b/samples/connect-basic/src/server.ts @@ -0,0 +1,24 @@ +import express from "express"; +import { Express, Request, Response } from "express"; +import "dotenv/config"; +import { + TrinsicOptions, + TrinsicService +} from "@trinsic/trinsic"; + +//----------------- +const app: Express = express(); +const port = 8000; +const trinsic = new TrinsicService({ serverEndpoint: "dev-internal.trinsic.cloud", serverPort: 443, serverUseTls: true }); +const connect = trinsic.connect() + +//----------------- +app.get("/connect_init", async (req: Request, res: Response) => { + // TODO: Create a connection invitation + // TODO: Return the connection invitation as JSON +}); + +//----------------- +app.listen(port, () => { + console.log(`⚡️[server]: Server is running at https://localhost:${port}`); +}); diff --git a/samples/connect-basic/src/style.css b/samples/connect-basic/src/style.css new file mode 100644 index 000000000..b528b6cc2 --- /dev/null +++ b/samples/connect-basic/src/style.css @@ -0,0 +1,97 @@ +:root { + font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; + line-height: 1.5; + font-weight: 400; + + color-scheme: light dark; + color: rgba(255, 255, 255, 0.87); + background-color: #242424; + + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -webkit-text-size-adjust: 100%; +} + +a { + font-weight: 500; + color: #646cff; + text-decoration: inherit; +} +a:hover { + color: #535bf2; +} + +body { + margin: 0; + display: flex; + place-items: center; + min-width: 320px; + min-height: 100vh; +} + +h1 { + font-size: 3.2em; + line-height: 1.1; +} + +#app { + max-width: 1280px; + margin: 0 auto; + padding: 2rem; + text-align: center; +} + +.logo { + height: 6em; + padding: 1.5em; + will-change: filter; + transition: filter 300ms; +} +.logo:hover { + filter: drop-shadow(0 0 2em #646cffaa); +} +.logo.vanilla:hover { + filter: drop-shadow(0 0 2em #3178c6aa); +} + +.card { + padding: 2em; +} + +.read-the-docs { + color: #888; +} + +button { + border-radius: 8px; + border: 1px solid transparent; + padding: 0.6em 1.2em; + font-size: 1em; + font-weight: 500; + font-family: inherit; + background-color: #1a1a1a; + cursor: pointer; + transition: border-color 0.25s; +} +button:hover { + border-color: #646cff; +} +button:focus, +button:focus-visible { + outline: 4px auto -webkit-focus-ring-color; +} + +@media (prefers-color-scheme: light) { + :root { + color: #213547; + background-color: #ffffff; + } + a:hover { + color: #747bff; + } + button { + background-color: #f9f9f9; + } +} diff --git a/samples/connect-basic/src/typescript.svg b/samples/connect-basic/src/typescript.svg new file mode 100644 index 000000000..d91c910cc --- /dev/null +++ b/samples/connect-basic/src/typescript.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/samples/connect-basic/src/vite-env.d.ts b/samples/connect-basic/src/vite-env.d.ts new file mode 100644 index 000000000..11f02fe2a --- /dev/null +++ b/samples/connect-basic/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/samples/connect-basic/tsconfig.json b/samples/connect-basic/tsconfig.json new file mode 100644 index 000000000..788f9fc95 --- /dev/null +++ b/samples/connect-basic/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "node", + "esModuleInterop": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"] +} From 6378c94958687e22e6579f476f2ebd4491b80032 Mon Sep 17 00:00:00 2001 From: Scott Phillips Date: Fri, 18 Aug 2023 10:10:14 -0400 Subject: [PATCH 2/6] spike: connect sample backend/frontend --- .../connect-basic/connect-app/.eslintrc.cjs | 18 + .../{ => connect-app}/.gitignore | 0 samples/connect-basic/connect-app/README.md | 27 + samples/connect-basic/connect-app/index.html | 13 + .../connect-app/package-lock.json | 2884 +++++++++++++++++ .../connect-basic/connect-app/package.json | 28 + .../{ => connect-app}/public/vite.svg | 0 samples/connect-basic/connect-app/src/App.css | 42 + samples/connect-basic/connect-app/src/App.tsx | 39 + .../connect-app/src/assets/react.svg | 1 + .../connect-basic/connect-app/src/index.css | 69 + .../connect-basic/connect-app/src/main.tsx | 10 + .../{ => connect-app}/src/vite-env.d.ts | 0 .../connect-basic/connect-app/tsconfig.json | 25 + .../connect-app/tsconfig.node.json | 10 + .../connect-basic/connect-app/vite.config.ts | 7 + .../connect-backend/package-lock.json | 601 ++++ .../connect-backend/package.json | 19 + .../connect-basic/connect-backend/src/app.ts | 19 + .../connect-backend/tsconfig.json | 11 + samples/connect-basic/index.html | 13 - samples/connect-basic/package-lock.json | 1310 -------- samples/connect-basic/package.json | 19 - samples/connect-basic/src/counter.ts | 9 - samples/connect-basic/src/main.ts | 24 - samples/connect-basic/src/server.ts | 24 - samples/connect-basic/src/style.css | 97 - samples/connect-basic/src/typescript.svg | 1 - samples/connect-basic/tsconfig.json | 23 - web/src/TrinsicService.ts | 2 +- web/src/index.ts | 4 + 31 files changed, 3828 insertions(+), 1521 deletions(-) create mode 100644 samples/connect-basic/connect-app/.eslintrc.cjs rename samples/connect-basic/{ => connect-app}/.gitignore (100%) create mode 100644 samples/connect-basic/connect-app/README.md create mode 100644 samples/connect-basic/connect-app/index.html create mode 100644 samples/connect-basic/connect-app/package-lock.json create mode 100644 samples/connect-basic/connect-app/package.json rename samples/connect-basic/{ => connect-app}/public/vite.svg (100%) create mode 100644 samples/connect-basic/connect-app/src/App.css create mode 100644 samples/connect-basic/connect-app/src/App.tsx create mode 100644 samples/connect-basic/connect-app/src/assets/react.svg create mode 100644 samples/connect-basic/connect-app/src/index.css create mode 100644 samples/connect-basic/connect-app/src/main.tsx rename samples/connect-basic/{ => connect-app}/src/vite-env.d.ts (100%) create mode 100644 samples/connect-basic/connect-app/tsconfig.json create mode 100644 samples/connect-basic/connect-app/tsconfig.node.json create mode 100644 samples/connect-basic/connect-app/vite.config.ts create mode 100644 samples/connect-basic/connect-backend/package-lock.json create mode 100644 samples/connect-basic/connect-backend/package.json create mode 100644 samples/connect-basic/connect-backend/src/app.ts create mode 100644 samples/connect-basic/connect-backend/tsconfig.json delete mode 100644 samples/connect-basic/index.html delete mode 100644 samples/connect-basic/package-lock.json delete mode 100644 samples/connect-basic/package.json delete mode 100644 samples/connect-basic/src/counter.ts delete mode 100644 samples/connect-basic/src/main.ts delete mode 100644 samples/connect-basic/src/server.ts delete mode 100644 samples/connect-basic/src/style.css delete mode 100644 samples/connect-basic/src/typescript.svg delete mode 100644 samples/connect-basic/tsconfig.json diff --git a/samples/connect-basic/connect-app/.eslintrc.cjs b/samples/connect-basic/connect-app/.eslintrc.cjs new file mode 100644 index 000000000..2b480e0d4 --- /dev/null +++ b/samples/connect-basic/connect-app/.eslintrc.cjs @@ -0,0 +1,18 @@ +module.exports = { + root: true, + env: { browser: true, es2020: true }, + extends: [ + "eslint:recommended", + "plugin:@typescript-eslint/recommended", + "plugin:react-hooks/recommended", + ], + ignorePatterns: ["dist", ".eslintrc.cjs"], + parser: "@typescript-eslint/parser", + plugins: ["react-refresh"], + rules: { + "react-refresh/only-export-components": [ + "warn", + { allowConstantExport: true }, + ], + }, +}; diff --git a/samples/connect-basic/.gitignore b/samples/connect-basic/connect-app/.gitignore similarity index 100% rename from samples/connect-basic/.gitignore rename to samples/connect-basic/connect-app/.gitignore diff --git a/samples/connect-basic/connect-app/README.md b/samples/connect-basic/connect-app/README.md new file mode 100644 index 000000000..e57168e1d --- /dev/null +++ b/samples/connect-basic/connect-app/README.md @@ -0,0 +1,27 @@ +# React + TypeScript + Vite + +This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. + +Currently, two official plugins are available: + +- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh +- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh + +## Expanding the ESLint configuration + +If you are developing a production application, we recommend updating the configuration to enable type aware lint rules: + +- Configure the top-level `parserOptions` property like this: + +```js + parserOptions: { + ecmaVersion: 'latest', + sourceType: 'module', + project: ['./tsconfig.json', './tsconfig.node.json'], + tsconfigRootDir: __dirname, + }, +``` + +- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked` +- Optionally add `plugin:@typescript-eslint/stylistic-type-checked` +- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list diff --git a/samples/connect-basic/connect-app/index.html b/samples/connect-basic/connect-app/index.html new file mode 100644 index 000000000..e0ef3be83 --- /dev/null +++ b/samples/connect-basic/connect-app/index.html @@ -0,0 +1,13 @@ + + + + + + + Vite + React + TS + + +
+ + + diff --git a/samples/connect-basic/connect-app/package-lock.json b/samples/connect-basic/connect-app/package-lock.json new file mode 100644 index 000000000..e97a900a3 --- /dev/null +++ b/samples/connect-basic/connect-app/package-lock.json @@ -0,0 +1,2884 @@ +{ + "name": "connect-app", + "version": "0.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "connect-app", + "version": "0.0.0", + "dependencies": { + "react": "^18.2.0", + "react-dom": "^18.2.0" + }, + "devDependencies": { + "@types/react": "^18.2.15", + "@types/react-dom": "^18.2.7", + "@typescript-eslint/eslint-plugin": "^6.0.0", + "@typescript-eslint/parser": "^6.0.0", + "@vitejs/plugin-react": "^4.0.3", + "eslint": "^8.45.0", + "eslint-plugin-react-hooks": "^4.6.0", + "eslint-plugin-react-refresh": "^0.4.3", + "typescript": "^5.0.2", + "vite": "^4.4.5" + } + }, + "node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", + "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.10.tgz", + "integrity": "sha512-/KKIMG4UEL35WmI9OlvMhurwtytjvXoFcGNrOvyG9zIzA8YmPjVtIZUf7b05+TPO7G7/GEmLHDaoCgACHl9hhA==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.22.10", + "chalk": "^2.4.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.22.9", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.9.tgz", + "integrity": "sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.22.10.tgz", + "integrity": "sha512-fTmqbbUBAwCcre6zPzNngvsI0aNrPZe77AeqvDxWM9Nm+04RrJ3CAmGHA9f7lJQY6ZMhRztNemy4uslDxTX4Qw==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.22.10", + "@babel/generator": "^7.22.10", + "@babel/helper-compilation-targets": "^7.22.10", + "@babel/helper-module-transforms": "^7.22.9", + "@babel/helpers": "^7.22.10", + "@babel/parser": "^7.22.10", + "@babel/template": "^7.22.5", + "@babel/traverse": "^7.22.10", + "@babel/types": "^7.22.10", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.2", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/core/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/generator": { + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.10.tgz", + "integrity": "sha512-79KIf7YiWjjdZ81JnLujDRApWtl7BxTqWD88+FFdQEIOG8LJ0etDOM7CXuIgGJa55sGOwZVwuEsaLEm0PJ5/+A==", + "dev": true, + "dependencies": { + "@babel/types": "^7.22.10", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.10.tgz", + "integrity": "sha512-JMSwHD4J7SLod0idLq5PKgI+6g/hLD/iuWBq08ZX49xE14VpVEojJ5rHWptpirV2j020MvypRLAXAO50igCJ5Q==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.22.9", + "@babel/helper-validator-option": "^7.22.5", + "browserslist": "^4.21.9", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-environment-visitor": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz", + "integrity": "sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz", + "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==", + "dev": true, + "dependencies": { + "@babel/template": "^7.22.5", + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-hoist-variables": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.5.tgz", + "integrity": "sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.22.9", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.22.9.tgz", + "integrity": "sha512-t+WA2Xn5K+rTeGtC8jCsdAH52bjggG5TKRuRrAGNM/mjIbO4GxvlLMFOEz9wXY5I2XQ60PMFsAG2WIcG82dQMQ==", + "dev": true, + "dependencies": { + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-module-imports": "^7.22.5", + "@babel/helper-simple-access": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/helper-validator-identifier": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", + "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-simple-access": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", + "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", + "dev": true, + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "dev": true, + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", + "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz", + "integrity": "sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.10.tgz", + "integrity": "sha512-a41J4NW8HyZa1I1vAndrraTlPZ/eZoga2ZgS7fEr0tZJGVU4xqdE80CEm0CcNjha5EZ8fTBYLKHF0kqDUuAwQw==", + "dev": true, + "dependencies": { + "@babel/template": "^7.22.5", + "@babel/traverse": "^7.22.10", + "@babel/types": "^7.22.10" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.10.tgz", + "integrity": "sha512-78aUtVcT7MUscr0K5mIEnkwxPE0MaxkR5RxRwuHaQ+JuU5AmTPhY+do2mdzVTnIJJpyBglql2pehuBIWHug+WQ==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.22.5", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.10.tgz", + "integrity": "sha512-lNbdGsQb9ekfsnjFGhEiF4hfFqGgfOP3H3d27re3n+CGhNuTSUEQdfWk556sTLNTloczcdM5TYF2LhzmDQKyvQ==", + "dev": true, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-self": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.22.5.tgz", + "integrity": "sha512-nTh2ogNUtxbiSbxaT4Ds6aXnXEipHweN9YRgOX/oNXdf0cCrGn/+2LozFa3lnPV5D90MkjhgckCPBrsoSc1a7g==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-source": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.22.5.tgz", + "integrity": "sha512-yIiRO6yobeEIaI0RTbIr8iAK9FcBHLtZq0S89ZPjDLQXBA4xvghaKqI0etp/tF3htTM0sazJKKLz9oEiGRtu7w==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz", + "integrity": "sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.22.5", + "@babel/parser": "^7.22.5", + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.10.tgz", + "integrity": "sha512-Q/urqV4pRByiNNpb/f5OSv28ZlGJiFiiTh+GAHktbIrkPhPbl90+uW6SmpoLyZqutrg9AEaEf3Q/ZBRHBXgxig==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.22.10", + "@babel/generator": "^7.22.10", + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-function-name": "^7.22.5", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.22.10", + "@babel/types": "^7.22.10", + "debug": "^4.1.0", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.10.tgz", + "integrity": "sha512-obaoigiLrlDZ7TUQln/8m4mSqIW2QFeOrCQc9r+xsaHGNoplVNYlRVpsfE8Vj35GEm2ZH4ZhrNYogs/3fj85kg==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.5", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz", + "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz", + "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz", + "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz", + "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz", + "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz", + "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz", + "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz", + "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz", + "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz", + "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz", + "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz", + "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz", + "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz", + "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz", + "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz", + "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz", + "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz", + "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz", + "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz", + "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz", + "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz", + "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.6.2.tgz", + "integrity": "sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz", + "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "13.21.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.21.0.tgz", + "integrity": "sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/js": { + "version": "8.47.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.47.0.tgz", + "integrity": "sha512-P6omY1zv5MItm93kLM8s2vr1HICJH8v0dvddDhysbIuZ+vcjOHg5Zbkf1mTkcmi2JA9oBG2anOkRnW8WJTS8Og==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", + "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.19", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz", + "integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@types/json-schema": { + "version": "7.0.12", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz", + "integrity": "sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==", + "dev": true + }, + "node_modules/@types/prop-types": { + "version": "15.7.5", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", + "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==", + "dev": true + }, + "node_modules/@types/react": { + "version": "18.2.20", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.20.tgz", + "integrity": "sha512-WKNtmsLWJM/3D5mG4U84cysVY31ivmyw85dE84fOCk5Hx78wezB/XEjVPWl2JTZ5FkEeaTJf+VgUAUn3PE7Isw==", + "dev": true, + "dependencies": { + "@types/prop-types": "*", + "@types/scheduler": "*", + "csstype": "^3.0.2" + } + }, + "node_modules/@types/react-dom": { + "version": "18.2.7", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.7.tgz", + "integrity": "sha512-GRaAEriuT4zp9N4p1i8BDBYmEyfo+xQ3yHjJU4eiK5NDa1RmUZG+unZABUTK4/Ox/M+GaHwb6Ow8rUITrtjszA==", + "dev": true, + "dependencies": { + "@types/react": "*" + } + }, + "node_modules/@types/scheduler": { + "version": "0.16.3", + "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.3.tgz", + "integrity": "sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ==", + "dev": true + }, + "node_modules/@types/semver": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz", + "integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==", + "dev": true + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.4.0.tgz", + "integrity": "sha512-62o2Hmc7Gs3p8SLfbXcipjWAa6qk2wZGChXG2JbBtYpwSRmti/9KHLqfbLs9uDigOexG+3PaQ9G2g3201FWLKg==", + "dev": true, + "dependencies": { + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "6.4.0", + "@typescript-eslint/type-utils": "6.4.0", + "@typescript-eslint/utils": "6.4.0", + "@typescript-eslint/visitor-keys": "6.4.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.4.0.tgz", + "integrity": "sha512-I1Ah1irl033uxjxO9Xql7+biL3YD7w9IU8zF+xlzD/YxY6a4b7DYA08PXUUCbm2sEljwJF6ERFy2kTGAGcNilg==", + "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "6.4.0", + "@typescript-eslint/types": "6.4.0", + "@typescript-eslint/typescript-estree": "6.4.0", + "@typescript-eslint/visitor-keys": "6.4.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.4.0.tgz", + "integrity": "sha512-TUS7vaKkPWDVvl7GDNHFQMsMruD+zhkd3SdVW0d7b+7Zo+bd/hXJQ8nsiUZMi1jloWo6c9qt3B7Sqo+flC1nig==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.4.0", + "@typescript-eslint/visitor-keys": "6.4.0" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.4.0.tgz", + "integrity": "sha512-TvqrUFFyGY0cX3WgDHcdl2/mMCWCDv/0thTtx/ODMY1QhEiyFtv/OlLaNIiYLwRpAxAtOLOY9SUf1H3Q3dlwAg==", + "dev": true, + "dependencies": { + "@typescript-eslint/typescript-estree": "6.4.0", + "@typescript-eslint/utils": "6.4.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/types": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.4.0.tgz", + "integrity": "sha512-+FV9kVFrS7w78YtzkIsNSoYsnOtrYVnKWSTVXoL1761CsCRv5wpDOINgsXpxD67YCLZtVQekDDyaxfjVWUJmmg==", + "dev": true, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.4.0.tgz", + "integrity": "sha512-iDPJArf/K2sxvjOR6skeUCNgHR/tCQXBsa+ee1/clRKr3olZjZ/dSkXPZjG6YkPtnW6p5D1egeEPMCW6Gn4yLA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.4.0", + "@typescript-eslint/visitor-keys": "6.4.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.4.0.tgz", + "integrity": "sha512-BvvwryBQpECPGo8PwF/y/q+yacg8Hn/2XS+DqL/oRsOPK+RPt29h5Ui5dqOKHDlbXrAeHUTnyG3wZA0KTDxRZw==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.4.0", + "@typescript-eslint/types": "6.4.0", + "@typescript-eslint/typescript-estree": "6.4.0", + "semver": "^7.5.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.4.0.tgz", + "integrity": "sha512-yJSfyT+uJm+JRDWYRYdCm2i+pmvXJSMtPR9Cq5/XQs4QIgNoLcoRtDdzsLbLsFM/c6um6ohQkg/MLxWvoIndJA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.4.0", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@vitejs/plugin-react": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.0.4.tgz", + "integrity": "sha512-7wU921ABnNYkETiMaZy7XqpueMnpu5VxvVps13MjmCo+utBdD79sZzrApHawHtVX66cCJQQTXFcjH0y9dSUK8g==", + "dev": true, + "dependencies": { + "@babel/core": "^7.22.9", + "@babel/plugin-transform-react-jsx-self": "^7.22.5", + "@babel/plugin-transform-react-jsx-source": "^7.22.5", + "react-refresh": "^0.14.0" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "peerDependencies": { + "vite": "^4.2.0" + } + }, + "node_modules/acorn": { + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", + "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "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==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.21.10", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.10.tgz", + "integrity": "sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "caniuse-lite": "^1.0.30001517", + "electron-to-chromium": "^1.4.477", + "node-releases": "^2.0.13", + "update-browserslist-db": "^1.0.11" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001521", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001521.tgz", + "integrity": "sha512-fnx1grfpEOvDGH+V17eccmNjucGUnCbP6KL+l5KqBIerp26WK/+RQ7CIDE37KGJjaPyqWXXlFUyKiWmvdNNKmQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ] + }, + "node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "dev": true + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/csstype": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz", + "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==", + "dev": true + }, + "node_modules/debug": { + "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" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.4.495", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.495.tgz", + "integrity": "sha512-mwknuemBZnoOCths4GtpU/SDuVMp3uQHKa2UNJT9/aVD6WVRjGpXOxRGX7lm6ILIenTdGXPSTCTDaWos5tEU8Q==", + "dev": true + }, + "node_modules/esbuild": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", + "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/android-arm": "0.18.20", + "@esbuild/android-arm64": "0.18.20", + "@esbuild/android-x64": "0.18.20", + "@esbuild/darwin-arm64": "0.18.20", + "@esbuild/darwin-x64": "0.18.20", + "@esbuild/freebsd-arm64": "0.18.20", + "@esbuild/freebsd-x64": "0.18.20", + "@esbuild/linux-arm": "0.18.20", + "@esbuild/linux-arm64": "0.18.20", + "@esbuild/linux-ia32": "0.18.20", + "@esbuild/linux-loong64": "0.18.20", + "@esbuild/linux-mips64el": "0.18.20", + "@esbuild/linux-ppc64": "0.18.20", + "@esbuild/linux-riscv64": "0.18.20", + "@esbuild/linux-s390x": "0.18.20", + "@esbuild/linux-x64": "0.18.20", + "@esbuild/netbsd-x64": "0.18.20", + "@esbuild/openbsd-x64": "0.18.20", + "@esbuild/sunos-x64": "0.18.20", + "@esbuild/win32-arm64": "0.18.20", + "@esbuild/win32-ia32": "0.18.20", + "@esbuild/win32-x64": "0.18.20" + } + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/eslint": { + "version": "8.47.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.47.0.tgz", + "integrity": "sha512-spUQWrdPt+pRVP1TTJLmfRNJJHHZryFmptzcafwSvHsceV81djHOdnEeDmkdotZyLNjDhrOasNK8nikkoG1O8Q==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.2", + "@eslint/js": "^8.47.0", + "@humanwhocodes/config-array": "^0.11.10", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-plugin-react-hooks": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz", + "integrity": "sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==", + "dev": true, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0" + } + }, + "node_modules/eslint-plugin-react-refresh": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.3.tgz", + "integrity": "sha512-Hh0wv8bUNY877+sI0BlCUlsS0TYYQqvzEwJsJJPM2WF4RnTStSnSR3zdJYa2nPOJgg3UghXi54lVyMSmpCalzA==", + "dev": true, + "peerDependencies": { + "eslint": ">=7" + } + }, + "node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/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==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/eslint/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/eslint/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==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/eslint/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==", + "dev": true + }, + "node_modules/eslint/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/globals": { + "version": "13.21.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.21.0.tgz", + "integrity": "sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-glob": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", + "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true + }, + "node_modules/fastq": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "dependencies": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", + "dev": true + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/ignore": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "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==", + "dev": true + }, + "node_modules/nanoid": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", + "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, + "node_modules/node-releases": { + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", + "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", + "dev": true + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/optionator": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "dev": true, + "dependencies": { + "@aashutoshrathi/word-wrap": "^1.2.3", + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.4.28", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.28.tgz", + "integrity": "sha512-Z7V5j0cq8oEKyejIKfpD8b4eBy9cwW2JWPk0+fB1HOAMsfHbnAXLLS+PfVWlzMSLQaWttKDt607I0XHmpE67Vw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "nanoid": "^3.3.6", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/punycode": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/react": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", + "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", + "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", + "dependencies": { + "loose-envify": "^1.1.0", + "scheduler": "^0.23.0" + }, + "peerDependencies": { + "react": "^18.2.0" + } + }, + "node_modules/react-refresh": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.0.tgz", + "integrity": "sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "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==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rollup": { + "version": "3.28.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.28.0.tgz", + "integrity": "sha512-d7zhvo1OUY2SXSM6pfNjgD5+d0Nz87CUp4mt8l/GgVP3oBsPwzNvSzyu1me6BSG9JIgWNTVcafIXBIyM8yQ3yw==", + "dev": true, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=14.18.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/scheduler": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", + "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", + "dependencies": { + "loose-envify": "^1.1.0" + } + }, + "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==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/semver/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==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/semver/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "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==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/ts-api-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.1.tgz", + "integrity": "sha512-lC/RGlPmwdrIBFTX59wwNzqh7aR2otPNPR/5brHZm/XKFYKsfqxihXUe9pU3JI+3vGkl+vyCoNNnPhJn3aLK1A==", + "dev": true, + "engines": { + "node": ">=16.13.0" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typescript": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz", + "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", + "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/vite": { + "version": "4.4.9", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.4.9.tgz", + "integrity": "sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==", + "dev": true, + "dependencies": { + "esbuild": "^0.18.10", + "postcss": "^8.4.27", + "rollup": "^3.27.1" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + }, + "peerDependencies": { + "@types/node": ">= 14", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/samples/connect-basic/connect-app/package.json b/samples/connect-basic/connect-app/package.json new file mode 100644 index 000000000..328f14178 --- /dev/null +++ b/samples/connect-basic/connect-app/package.json @@ -0,0 +1,28 @@ +{ + "name": "connect-app", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc && vite build", + "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", + "preview": "vite preview" + }, + "dependencies": { + "react": "^18.2.0", + "react-dom": "^18.2.0" + }, + "devDependencies": { + "@types/react": "^18.2.15", + "@types/react-dom": "^18.2.7", + "@typescript-eslint/eslint-plugin": "^6.0.0", + "@typescript-eslint/parser": "^6.0.0", + "@vitejs/plugin-react": "^4.0.3", + "eslint": "^8.45.0", + "eslint-plugin-react-hooks": "^4.6.0", + "eslint-plugin-react-refresh": "^0.4.3", + "typescript": "^5.0.2", + "vite": "^4.4.5" + } +} diff --git a/samples/connect-basic/public/vite.svg b/samples/connect-basic/connect-app/public/vite.svg similarity index 100% rename from samples/connect-basic/public/vite.svg rename to samples/connect-basic/connect-app/public/vite.svg diff --git a/samples/connect-basic/connect-app/src/App.css b/samples/connect-basic/connect-app/src/App.css new file mode 100644 index 000000000..f44fb79ad --- /dev/null +++ b/samples/connect-basic/connect-app/src/App.css @@ -0,0 +1,42 @@ +#root { + max-width: 1280px; + margin: 0 auto; + padding: 2rem; + text-align: center; +} + +.logo { + height: 6em; + padding: 1.5em; + will-change: filter; + transition: filter 300ms; +} +.logo:hover { + filter: drop-shadow(0 0 2em #646cffaa); +} +.logo.react:hover { + filter: drop-shadow(0 0 2em #61dafbaa); +} + +@keyframes logo-spin { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +} + +@media (prefers-reduced-motion: no-preference) { + a:nth-of-type(2) .logo { + animation: logo-spin infinite 20s linear; + } +} + +.card { + padding: 2em; +} + +.read-the-docs { + color: #888; +} diff --git a/samples/connect-basic/connect-app/src/App.tsx b/samples/connect-basic/connect-app/src/App.tsx new file mode 100644 index 000000000..4c3373952 --- /dev/null +++ b/samples/connect-basic/connect-app/src/App.tsx @@ -0,0 +1,39 @@ +import { useState } from "react"; +import reactLogo from "./assets/react.svg"; +import viteLogo from "/vite.svg"; +import "./App.css"; + +function App() { + const [count, setCount] = useState(0); + + return ( + <> + +

Vite + React

+
+ +

+ Edit src/App.tsx and save to test HMR +

+
+

+ Click on the Vite and React logos to learn more +

+ + ); +} + +export default App; diff --git a/samples/connect-basic/connect-app/src/assets/react.svg b/samples/connect-basic/connect-app/src/assets/react.svg new file mode 100644 index 000000000..6c87de9bb --- /dev/null +++ b/samples/connect-basic/connect-app/src/assets/react.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/samples/connect-basic/connect-app/src/index.css b/samples/connect-basic/connect-app/src/index.css new file mode 100644 index 000000000..8da4c0ffa --- /dev/null +++ b/samples/connect-basic/connect-app/src/index.css @@ -0,0 +1,69 @@ +:root { + font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; + line-height: 1.5; + font-weight: 400; + + color-scheme: light dark; + color: rgba(255, 255, 255, 0.87); + background-color: #242424; + + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -webkit-text-size-adjust: 100%; +} + +a { + font-weight: 500; + color: #646cff; + text-decoration: inherit; +} +a:hover { + color: #535bf2; +} + +body { + margin: 0; + display: flex; + place-items: center; + min-width: 320px; + min-height: 100vh; +} + +h1 { + font-size: 3.2em; + line-height: 1.1; +} + +button { + border-radius: 8px; + border: 1px solid transparent; + padding: 0.6em 1.2em; + font-size: 1em; + font-weight: 500; + font-family: inherit; + background-color: #1a1a1a; + cursor: pointer; + transition: border-color 0.25s; +} +button:hover { + border-color: #646cff; +} +button:focus, +button:focus-visible { + outline: 4px auto -webkit-focus-ring-color; +} + +@media (prefers-color-scheme: light) { + :root { + color: #213547; + background-color: #ffffff; + } + a:hover { + color: #747bff; + } + button { + background-color: #f9f9f9; + } +} diff --git a/samples/connect-basic/connect-app/src/main.tsx b/samples/connect-basic/connect-app/src/main.tsx new file mode 100644 index 000000000..ec27f30f4 --- /dev/null +++ b/samples/connect-basic/connect-app/src/main.tsx @@ -0,0 +1,10 @@ +import React from "react"; +import ReactDOM from "react-dom/client"; +import App from "./App.tsx"; +import "./index.css"; + +ReactDOM.createRoot(document.getElementById("root")!).render( + + + , +); diff --git a/samples/connect-basic/src/vite-env.d.ts b/samples/connect-basic/connect-app/src/vite-env.d.ts similarity index 100% rename from samples/connect-basic/src/vite-env.d.ts rename to samples/connect-basic/connect-app/src/vite-env.d.ts diff --git a/samples/connect-basic/connect-app/tsconfig.json b/samples/connect-basic/connect-app/tsconfig.json new file mode 100644 index 000000000..30d6ff14f --- /dev/null +++ b/samples/connect-basic/connect-app/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "module": "ESNext", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "react-jsx", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"], + "references": [{ "path": "./tsconfig.node.json" }] +} diff --git a/samples/connect-basic/connect-app/tsconfig.node.json b/samples/connect-basic/connect-app/tsconfig.node.json new file mode 100644 index 000000000..26063d857 --- /dev/null +++ b/samples/connect-basic/connect-app/tsconfig.node.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "composite": true, + "skipLibCheck": true, + "module": "ESNext", + "moduleResolution": "bundler", + "allowSyntheticDefaultImports": true + }, + "include": ["vite.config.ts"] +} diff --git a/samples/connect-basic/connect-app/vite.config.ts b/samples/connect-basic/connect-app/vite.config.ts new file mode 100644 index 000000000..2c24a3e34 --- /dev/null +++ b/samples/connect-basic/connect-app/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from "vite"; +import react from "@vitejs/plugin-react"; + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [react()], +}); diff --git a/samples/connect-basic/connect-backend/package-lock.json b/samples/connect-basic/connect-backend/package-lock.json new file mode 100644 index 000000000..064326903 --- /dev/null +++ b/samples/connect-basic/connect-backend/package-lock.json @@ -0,0 +1,601 @@ +{ + "name": "connect-backend", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "connect-backend", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "express": "^4.17.1" + }, + "devDependencies": { + "@types/express": "^4.17.1", + "typescript": "^5.1.6" + } + }, + "node_modules/@types/body-parser": { + "version": "1.19.2", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", + "integrity": "sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==", + "dev": true, + "dependencies": { + "@types/connect": "*", + "@types/node": "*" + } + }, + "node_modules/@types/connect": { + "version": "3.4.35", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz", + "integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/express": { + "version": "4.17.1", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.1.tgz", + "integrity": "sha512-VfH/XCP0QbQk5B5puLqTLEeFgR8lfCJHZJKkInZ9mkYd+u8byX0kztXEQxEk4wZXJs8HI+7km2ALXjn4YKcX9w==", + "dev": true, + "dependencies": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "*", + "@types/serve-static": "*" + } + }, + "node_modules/@types/express-serve-static-core": { + "version": "4.17.35", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.35.tgz", + "integrity": "sha512-wALWQwrgiB2AWTT91CB62b6Yt0sNHpznUXeZEcnPU3DRdlDIz74x8Qg1UUYKSVFi+va5vKOLYRBI1bRKiLLKIg==", + "dev": true, + "dependencies": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*", + "@types/send": "*" + } + }, + "node_modules/@types/http-errors": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.1.tgz", + "integrity": "sha512-/K3ds8TRAfBvi5vfjuz8y6+GiAYBZ0x4tXv1Av6CWBWn0IlADc+ZX9pMq7oU0fNQPnBwIZl3rmeLp6SBApbxSQ==", + "dev": true + }, + "node_modules/@types/mime": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz", + "integrity": "sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==", + "dev": true + }, + "node_modules/@types/node": { + "version": "20.5.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.5.0.tgz", + "integrity": "sha512-Mgq7eCtoTjT89FqNoTzzXg2XvCi5VMhRV6+I2aYanc6kQCBImeNaAYRs/DyoVqk1YEUJK5gN9VO7HRIdz4Wo3Q==", + "dev": true + }, + "node_modules/@types/qs": { + "version": "6.9.7", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", + "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==", + "dev": true + }, + "node_modules/@types/range-parser": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz", + "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==", + "dev": true + }, + "node_modules/@types/send": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.1.tgz", + "integrity": "sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q==", + "dev": true, + "dependencies": { + "@types/mime": "^1", + "@types/node": "*" + } + }, + "node_modules/@types/serve-static": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.2.tgz", + "integrity": "sha512-J2LqtvFYCzaj8pVYKw8klQXrLLk7TBZmQ4ShlcdkELFKGwGMfevMLneMMRkMgZxotOD9wg497LpC7O8PcvAmfw==", + "dev": true, + "dependencies": { + "@types/http-errors": "*", + "@types/mime": "*", + "@types/node": "*" + } + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" + }, + "node_modules/body-parser": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", + "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", + "dependencies": { + "bytes": "3.1.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "on-finished": "~2.3.0", + "qs": "6.7.0", + "raw-body": "2.4.0", + "type-is": "~1.6.17" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/bytes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", + "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/content-disposition": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", + "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", + "dependencies": { + "safe-buffer": "5.1.2" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", + "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha512-3NdhDuEXnfun/z7x9GOElY49LoqVHoGScmOKwmxhsS8N5Y+Z8KyPPDnaSzqWgYt/ji4mqwfTS34Htrk0zPIXVg==" + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express": { + "version": "4.17.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", + "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", + "dependencies": { + "accepts": "~1.3.7", + "array-flatten": "1.1.1", + "body-parser": "1.19.0", + "content-disposition": "0.5.3", + "content-type": "~1.0.4", + "cookie": "0.4.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "~1.1.2", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.5", + "qs": "6.7.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.1.2", + "send": "0.17.1", + "serve-static": "1.14.1", + "setprototypeof": "1.1.1", + "statuses": "~1.5.0", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/http-errors": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", + "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", + "dependencies": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==" + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/qs": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", + "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", + "dependencies": { + "bytes": "3.1.0", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/send": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", + "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", + "dependencies": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.7.2", + "mime": "1.6.0", + "ms": "2.1.1", + "on-finished": "~2.3.0", + "range-parser": "~1.2.1", + "statuses": "~1.5.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + }, + "node_modules/serve-static": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", + "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", + "dependencies": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.17.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/setprototypeof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" + }, + "node_modules/statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/toidentifier": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", + "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/typescript": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz", + "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "engines": { + "node": ">= 0.8" + } + } + } +} diff --git a/samples/connect-basic/connect-backend/package.json b/samples/connect-basic/connect-backend/package.json new file mode 100644 index 000000000..45d87261e --- /dev/null +++ b/samples/connect-basic/connect-backend/package.json @@ -0,0 +1,19 @@ +{ + "name": "connect-backend", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "ISC", + "devDependencies": { + "@types/express": "^4.17.1", + "typescript": "^5.1.6" + }, + "dependencies": { + "express": "^4.17.1" + } +} diff --git a/samples/connect-basic/connect-backend/src/app.ts b/samples/connect-basic/connect-backend/src/app.ts new file mode 100644 index 000000000..c71b2eee5 --- /dev/null +++ b/samples/connect-basic/connect-backend/src/app.ts @@ -0,0 +1,19 @@ +import express from "express"; + +const app = express(); +const port = 3000; + +app.get("/", (req, res) => { + res.send("Hello World!"); +}); + +app.get("/connect_init", (req, res) => { + // TODO - Trinsic service initialize + // TODO - Open connect session using government id + // TODO - Save the `id` somewhere in a memory DB + // TODO - Return the client_token to the user +}); + +app.listen(port, () => { + return console.log(`Express is listening at http://localhost:${port}`); +}); diff --git a/samples/connect-basic/connect-backend/tsconfig.json b/samples/connect-basic/connect-backend/tsconfig.json new file mode 100644 index 000000000..71d1a6089 --- /dev/null +++ b/samples/connect-basic/connect-backend/tsconfig.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "module": "commonjs", + "esModuleInterop": true, + "target": "es2020", + "moduleResolution": "node", + "sourceMap": true, + "outDir": "dist" + }, + "lib": ["es2015"] +} diff --git a/samples/connect-basic/index.html b/samples/connect-basic/index.html deleted file mode 100644 index e265b60b0..000000000 --- a/samples/connect-basic/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - Vite + TS - - -
- - - diff --git a/samples/connect-basic/package-lock.json b/samples/connect-basic/package-lock.json deleted file mode 100644 index dafb9f9f2..000000000 --- a/samples/connect-basic/package-lock.json +++ /dev/null @@ -1,1310 +0,0 @@ -{ - "name": "connect-basic", - "version": "0.0.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "connect-basic", - "version": "0.0.0", - "dependencies": { - "@trinsic/trinsic": "file:../../web", - "express": "^4.18.2" - }, - "devDependencies": { - "@types/express": "^4.17.17", - "typescript": "^5.0.2", - "vite": "^4.4.5" - } - }, - "../../web": { - "name": "@trinsic/trinsic", - "version": "1.0.0", - "license": "ISC", - "dependencies": { - "@azure/core-asynciterator-polyfill": "1.0.2", - "buffer": "6.0.3", - "fastestsmallesttextencoderdecoder": "1.0.22", - "google-protobuf": "3.21.2", - "js-base64": "3.7.5", - "long": "5.2.3", - "nice-grpc-web": "3.2.4", - "protobufjs": "7.2.4" - }, - "devDependencies": { - "@babel/core": "7.18.10", - "@babel/plugin-transform-modules-commonjs": "7.18.6", - "@types/google-protobuf": "3.15.6", - "@types/jasmine": "4.0.3", - "@types/jest": "28.1.7", - "@types/karma": "6.3.3", - "@types/karma-webpack": "2.0.11", - "@types/node": "18.7.8", - "@types/uuid": "8.3.4", - "babel-jest": "28.1.3", - "babel-plugin-dynamic-import-node": "2.3.3", - "chromedriver": "105.0.0", - "copyfiles": "2.4.1", - "dotenv": "16.0.1", - "esm": "3.2.25", - "expect": "29.0.1", - "jasmine": "4.3.0", - "jasmine-core": "4.3.0", - "jasmine-spec-reporter": "7.0.0", - "jest": "28.1.3", - "karma": "6.4.0", - "karma-chrome-launcher": "3.1.1", - "karma-coverage": "2.2.0", - "karma-jasmine": "5.1.0", - "karma-jasmine-html-reporter": "2.0.0", - "karma-sourcemap-loader": "0.3.8", - "karma-typescript": "5.5.3", - "karma-webpack": "5.0.0", - "ts-jest": "28.0.8", - "ts-loader": "9.3.1", - "ts-node": "10.9.1", - "ts-proto": "1.156.2", - "typescript": "4.7.4", - "uuid": "8.3.2", - "vite": "4.4.9", - "vite-plugin-dts": "3.5.2", - "webpack": "5.76.0", - "webpack-cli": "4.10.0" - } - }, - "node_modules/@esbuild/android-arm": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz", - "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz", - "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz", - "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz", - "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz", - "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz", - "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz", - "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz", - "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz", - "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz", - "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz", - "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==", - "cpu": [ - "loong64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz", - "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==", - "cpu": [ - "mips64el" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz", - "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz", - "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==", - "cpu": [ - "riscv64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz", - "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==", - "cpu": [ - "s390x" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz", - "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz", - "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz", - "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz", - "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz", - "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz", - "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz", - "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@trinsic/trinsic": { - "resolved": "../../web", - "link": true - }, - "node_modules/@types/body-parser": { - "version": "1.19.2", - "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", - "integrity": "sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==", - "dev": true, - "dependencies": { - "@types/connect": "*", - "@types/node": "*" - } - }, - "node_modules/@types/connect": { - "version": "3.4.35", - "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz", - "integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/express": { - "version": "4.17.17", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.17.tgz", - "integrity": "sha512-Q4FmmuLGBG58btUnfS1c1r/NQdlp3DMfGDGig8WhfpA2YRUtEkxAjkZb0yvplJGYdF1fsQ81iMDcH24sSCNC/Q==", - "dev": true, - "dependencies": { - "@types/body-parser": "*", - "@types/express-serve-static-core": "^4.17.33", - "@types/qs": "*", - "@types/serve-static": "*" - } - }, - "node_modules/@types/express-serve-static-core": { - "version": "4.17.35", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.35.tgz", - "integrity": "sha512-wALWQwrgiB2AWTT91CB62b6Yt0sNHpznUXeZEcnPU3DRdlDIz74x8Qg1UUYKSVFi+va5vKOLYRBI1bRKiLLKIg==", - "dev": true, - "dependencies": { - "@types/node": "*", - "@types/qs": "*", - "@types/range-parser": "*", - "@types/send": "*" - } - }, - "node_modules/@types/http-errors": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.1.tgz", - "integrity": "sha512-/K3ds8TRAfBvi5vfjuz8y6+GiAYBZ0x4tXv1Av6CWBWn0IlADc+ZX9pMq7oU0fNQPnBwIZl3rmeLp6SBApbxSQ==", - "dev": true - }, - "node_modules/@types/mime": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz", - "integrity": "sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==", - "dev": true - }, - "node_modules/@types/node": { - "version": "20.5.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.5.0.tgz", - "integrity": "sha512-Mgq7eCtoTjT89FqNoTzzXg2XvCi5VMhRV6+I2aYanc6kQCBImeNaAYRs/DyoVqk1YEUJK5gN9VO7HRIdz4Wo3Q==", - "dev": true - }, - "node_modules/@types/qs": { - "version": "6.9.7", - "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", - "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==", - "dev": true - }, - "node_modules/@types/range-parser": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz", - "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==", - "dev": true - }, - "node_modules/@types/send": { - "version": "0.17.1", - "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.1.tgz", - "integrity": "sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q==", - "dev": true, - "dependencies": { - "@types/mime": "^1", - "@types/node": "*" - } - }, - "node_modules/@types/serve-static": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.2.tgz", - "integrity": "sha512-J2LqtvFYCzaj8pVYKw8klQXrLLk7TBZmQ4ShlcdkELFKGwGMfevMLneMMRkMgZxotOD9wg497LpC7O8PcvAmfw==", - "dev": true, - "dependencies": { - "@types/http-errors": "*", - "@types/mime": "*", - "@types/node": "*" - } - }, - "node_modules/accepts": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", - "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", - "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" - }, - "node_modules/body-parser": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", - "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", - "dependencies": { - "bytes": "3.1.2", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.11.0", - "raw-body": "2.5.1", - "type-is": "~1.6.18", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/content-disposition": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", - "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", - "dependencies": { - "safe-buffer": "5.2.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/content-type": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", - "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/cookie": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", - "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" - }, - "node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/destroy": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", - "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" - }, - "node_modules/encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/esbuild": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", - "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==", - "dev": true, - "hasInstallScript": true, - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=12" - }, - "optionalDependencies": { - "@esbuild/android-arm": "0.18.20", - "@esbuild/android-arm64": "0.18.20", - "@esbuild/android-x64": "0.18.20", - "@esbuild/darwin-arm64": "0.18.20", - "@esbuild/darwin-x64": "0.18.20", - "@esbuild/freebsd-arm64": "0.18.20", - "@esbuild/freebsd-x64": "0.18.20", - "@esbuild/linux-arm": "0.18.20", - "@esbuild/linux-arm64": "0.18.20", - "@esbuild/linux-ia32": "0.18.20", - "@esbuild/linux-loong64": "0.18.20", - "@esbuild/linux-mips64el": "0.18.20", - "@esbuild/linux-ppc64": "0.18.20", - "@esbuild/linux-riscv64": "0.18.20", - "@esbuild/linux-s390x": "0.18.20", - "@esbuild/linux-x64": "0.18.20", - "@esbuild/netbsd-x64": "0.18.20", - "@esbuild/openbsd-x64": "0.18.20", - "@esbuild/sunos-x64": "0.18.20", - "@esbuild/win32-arm64": "0.18.20", - "@esbuild/win32-ia32": "0.18.20", - "@esbuild/win32-x64": "0.18.20" - } - }, - "node_modules/escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" - }, - "node_modules/etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/express": { - "version": "4.18.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", - "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", - "dependencies": { - "accepts": "~1.3.8", - "array-flatten": "1.1.1", - "body-parser": "1.20.1", - "content-disposition": "0.5.4", - "content-type": "~1.0.4", - "cookie": "0.5.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "2.0.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.2.0", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.7", - "qs": "6.11.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "node_modules/finalhandler": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", - "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", - "dependencies": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "statuses": "2.0.1", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/forwarded": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", - "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" - }, - "node_modules/get-intrinsic": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", - "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", - "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/has-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", - "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "node_modules/ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" - }, - "node_modules/methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" - }, - "node_modules/nanoid": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", - "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/object-inspect": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", - "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/on-finished": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", - "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" - }, - "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true - }, - "node_modules/postcss": { - "version": "8.4.28", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.28.tgz", - "integrity": "sha512-Z7V5j0cq8oEKyejIKfpD8b4eBy9cwW2JWPk0+fB1HOAMsfHbnAXLLS+PfVWlzMSLQaWttKDt607I0XHmpE67Vw==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "nanoid": "^3.3.6", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/proxy-addr": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", - "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", - "dependencies": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", - "dependencies": { - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/raw-body": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", - "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", - "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/rollup": { - "version": "3.28.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.28.0.tgz", - "integrity": "sha512-d7zhvo1OUY2SXSM6pfNjgD5+d0Nz87CUp4mt8l/GgVP3oBsPwzNvSzyu1me6BSG9JIgWNTVcafIXBIyM8yQ3yw==", - "dev": true, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=14.18.0", - "npm": ">=8.0.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "node_modules/send": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", - "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", - "dependencies": { - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "2.4.1", - "range-parser": "~1.2.1", - "statuses": "2.0.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/send/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" - }, - "node_modules/serve-static": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", - "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", - "dependencies": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.18.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" - }, - "node_modules/side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/toidentifier": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", - "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", - "engines": { - "node": ">=0.6" - } - }, - "node_modules/type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/typescript": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz", - "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/vite": { - "version": "4.4.9", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.4.9.tgz", - "integrity": "sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==", - "dev": true, - "dependencies": { - "esbuild": "^0.18.10", - "postcss": "^8.4.27", - "rollup": "^3.27.1" - }, - "bin": { - "vite": "bin/vite.js" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/vitejs/vite?sponsor=1" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - }, - "peerDependencies": { - "@types/node": ">= 14", - "less": "*", - "lightningcss": "^1.21.0", - "sass": "*", - "stylus": "*", - "sugarss": "*", - "terser": "^5.4.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "less": { - "optional": true - }, - "lightningcss": { - "optional": true - }, - "sass": { - "optional": true - }, - "stylus": { - "optional": true - }, - "sugarss": { - "optional": true - }, - "terser": { - "optional": true - } - } - } - } -} diff --git a/samples/connect-basic/package.json b/samples/connect-basic/package.json deleted file mode 100644 index 48c9e1ef5..000000000 --- a/samples/connect-basic/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "connect-basic", - "private": true, - "version": "0.0.0", - "scripts": { - "dev": "vite", - "build": "tsc && vite build", - "preview": "vite preview" - }, - "dependencies": { - "@trinsic/trinsic": "file:../../web", - "express": "^4.18.2" - }, - "devDependencies": { - "@types/express": "4.17.17", - "typescript": "5.1.6", - "vite": "4.4.9" - } -} diff --git a/samples/connect-basic/src/counter.ts b/samples/connect-basic/src/counter.ts deleted file mode 100644 index 09e5afd2d..000000000 --- a/samples/connect-basic/src/counter.ts +++ /dev/null @@ -1,9 +0,0 @@ -export function setupCounter(element: HTMLButtonElement) { - let counter = 0 - const setCounter = (count: number) => { - counter = count - element.innerHTML = `count is ${counter}` - } - element.addEventListener('click', () => setCounter(counter + 1)) - setCounter(0) -} diff --git a/samples/connect-basic/src/main.ts b/samples/connect-basic/src/main.ts deleted file mode 100644 index 2f852a7cf..000000000 --- a/samples/connect-basic/src/main.ts +++ /dev/null @@ -1,24 +0,0 @@ -import './style.css' -import typescriptLogo from './typescript.svg' -import viteLogo from '/vite.svg' -import { setupCounter } from './counter' - -document.querySelector('#app')!.innerHTML = ` -
- - - - - - -

Vite + TypeScript

-
- -
-

- Click on the Vite and TypeScript logos to learn more -

-
-` - -setupCounter(document.querySelector('#counter')!) diff --git a/samples/connect-basic/src/server.ts b/samples/connect-basic/src/server.ts deleted file mode 100644 index cf898d92d..000000000 --- a/samples/connect-basic/src/server.ts +++ /dev/null @@ -1,24 +0,0 @@ -import express from "express"; -import { Express, Request, Response } from "express"; -import "dotenv/config"; -import { - TrinsicOptions, - TrinsicService -} from "@trinsic/trinsic"; - -//----------------- -const app: Express = express(); -const port = 8000; -const trinsic = new TrinsicService({ serverEndpoint: "dev-internal.trinsic.cloud", serverPort: 443, serverUseTls: true }); -const connect = trinsic.connect() - -//----------------- -app.get("/connect_init", async (req: Request, res: Response) => { - // TODO: Create a connection invitation - // TODO: Return the connection invitation as JSON -}); - -//----------------- -app.listen(port, () => { - console.log(`⚡️[server]: Server is running at https://localhost:${port}`); -}); diff --git a/samples/connect-basic/src/style.css b/samples/connect-basic/src/style.css deleted file mode 100644 index b528b6cc2..000000000 --- a/samples/connect-basic/src/style.css +++ /dev/null @@ -1,97 +0,0 @@ -:root { - font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; - line-height: 1.5; - font-weight: 400; - - color-scheme: light dark; - color: rgba(255, 255, 255, 0.87); - background-color: #242424; - - font-synthesis: none; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - -webkit-text-size-adjust: 100%; -} - -a { - font-weight: 500; - color: #646cff; - text-decoration: inherit; -} -a:hover { - color: #535bf2; -} - -body { - margin: 0; - display: flex; - place-items: center; - min-width: 320px; - min-height: 100vh; -} - -h1 { - font-size: 3.2em; - line-height: 1.1; -} - -#app { - max-width: 1280px; - margin: 0 auto; - padding: 2rem; - text-align: center; -} - -.logo { - height: 6em; - padding: 1.5em; - will-change: filter; - transition: filter 300ms; -} -.logo:hover { - filter: drop-shadow(0 0 2em #646cffaa); -} -.logo.vanilla:hover { - filter: drop-shadow(0 0 2em #3178c6aa); -} - -.card { - padding: 2em; -} - -.read-the-docs { - color: #888; -} - -button { - border-radius: 8px; - border: 1px solid transparent; - padding: 0.6em 1.2em; - font-size: 1em; - font-weight: 500; - font-family: inherit; - background-color: #1a1a1a; - cursor: pointer; - transition: border-color 0.25s; -} -button:hover { - border-color: #646cff; -} -button:focus, -button:focus-visible { - outline: 4px auto -webkit-focus-ring-color; -} - -@media (prefers-color-scheme: light) { - :root { - color: #213547; - background-color: #ffffff; - } - a:hover { - color: #747bff; - } - button { - background-color: #f9f9f9; - } -} diff --git a/samples/connect-basic/src/typescript.svg b/samples/connect-basic/src/typescript.svg deleted file mode 100644 index d91c910cc..000000000 --- a/samples/connect-basic/src/typescript.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/samples/connect-basic/tsconfig.json b/samples/connect-basic/tsconfig.json deleted file mode 100644 index 788f9fc95..000000000 --- a/samples/connect-basic/tsconfig.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2020", - "useDefineForClassFields": true, - "module": "ESNext", - "lib": ["ES2020", "DOM", "DOM.Iterable"], - "skipLibCheck": true, - - /* Bundler mode */ - "moduleResolution": "node", - "esModuleInterop": true, - "resolveJsonModule": true, - "isolatedModules": true, - "noEmit": true, - - /* Linting */ - "strict": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "noFallthroughCasesInSwitch": true - }, - "include": ["src"] -} diff --git a/web/src/TrinsicService.ts b/web/src/TrinsicService.ts index beb447366..587e0fb61 100644 --- a/web/src/TrinsicService.ts +++ b/web/src/TrinsicService.ts @@ -30,7 +30,7 @@ export class TrinsicService extends ServiceBase { return this._access!; } - public connection(): ConnectService { + public connect(): ConnectService { this._connect = this._connect || new ConnectService(this.options); this._connect.options = this.options; return this._connect!; diff --git a/web/src/index.ts b/web/src/index.ts index 0694baff8..00602ca49 100644 --- a/web/src/index.ts +++ b/web/src/index.ts @@ -3,6 +3,8 @@ import "@azure/core-asynciterator-polyfill"; import "fastestsmallesttextencoderdecoder"; import { WalletService } from "./WalletService"; +import { ConnectService } from "./ConnectService"; +import { AccessManagementService } from "./AccessManagementService import { ProviderService } from "./ProviderService"; import { TrustRegistryService } from "./TrustRegistryService"; import { CredentialService } from "./CredentialService"; @@ -17,6 +19,8 @@ export * from "./XHRTransport"; export { TrinsicService, + ConnectService, + AccessManagementService, WalletService, ProviderService, TrustRegistryService, From ab5566a6c415d77a3cdf0a04a1098e029502a002 Mon Sep 17 00:00:00 2001 From: Scott Phillips Date: Fri, 18 Aug 2023 12:41:42 -0400 Subject: [PATCH 3/6] fix: Backend spike --- samples/connect-basic/connect-app/index.html | 2 +- .../connect-app/package-lock.json | 59 + .../connect-basic/connect-app/package.json | 1 + samples/connect-basic/connect-app/src/App.tsx | 13 +- .../connect-basic/connect-app/src/shared.ts | 33 + .../connect-backend/package-lock.json | 692 +- .../connect-backend/package.json | 11 +- .../connect-basic/connect-backend/src/app.ts | 83 +- .../connect-backend/src/shared.ts | 23 + web/package.json | 8 +- web/src/index.ts | 2 +- web/src/proto/google/protobuf/descriptor.ts | 9511 ++++++++--------- web/src/proto/sdk/options/v1/options.ts | 247 +- web/src/proto/services/account/v1/account.ts | 2113 ++-- web/src/proto/services/common/v1/common.ts | 664 +- web/src/proto/services/connect/v1/connect.ts | 2107 ++-- .../file-management/v1/file-management.ts | 1902 ++-- .../proto/services/options/field-options.ts | 486 +- .../services/provider/v1/access-management.ts | 1352 ++- .../proto/services/provider/v1/provider.ts | 3726 +++---- .../trust-registry/v1/trust-registry.ts | 2339 ++-- .../universal-wallet/v1/universal-wallet.ts | 5814 +++++----- .../templates/v1/templates.ts | 8708 +++++++-------- .../v1/verifiable-credentials.ts | 4058 ++++--- web/src/providers.ts | 19 +- 25 files changed, 20616 insertions(+), 23357 deletions(-) create mode 100644 samples/connect-basic/connect-app/src/shared.ts create mode 100644 samples/connect-basic/connect-backend/src/shared.ts diff --git a/samples/connect-basic/connect-app/index.html b/samples/connect-basic/connect-app/index.html index e0ef3be83..1713de440 100644 --- a/samples/connect-basic/connect-app/index.html +++ b/samples/connect-basic/connect-app/index.html @@ -8,6 +8,6 @@
- + diff --git a/samples/connect-basic/connect-app/package-lock.json b/samples/connect-basic/connect-app/package-lock.json index e97a900a3..08ac2238e 100644 --- a/samples/connect-basic/connect-app/package-lock.json +++ b/samples/connect-basic/connect-app/package-lock.json @@ -8,6 +8,7 @@ "name": "connect-app", "version": "0.0.0", "dependencies": { + "@trinsic/trinsic": "file:../../../web", "react": "^18.2.0", "react-dom": "^18.2.0" }, @@ -24,6 +25,60 @@ "vite": "^4.4.5" } }, + "../../../web": { + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@azure/core-asynciterator-polyfill": "1.0.2", + "buffer": "6.0.3", + "fastestsmallesttextencoderdecoder": "1.0.22", + "google-protobuf": "3.21.2", + "js-base64": "3.7.5", + "long": "5.2.3", + "nice-grpc-web": "3.2.4", + "protobufjs": "7.2.4" + }, + "devDependencies": { + "@babel/core": "7.18.10", + "@babel/plugin-transform-modules-commonjs": "7.18.6", + "@types/google-protobuf": "3.15.6", + "@types/jasmine": "4.0.3", + "@types/jest": "28.1.7", + "@types/karma": "6.3.3", + "@types/karma-webpack": "2.0.11", + "@types/node": "18.7.8", + "@types/uuid": "8.3.4", + "babel-jest": "28.1.3", + "babel-plugin-dynamic-import-node": "2.3.3", + "chromedriver": "105.0.0", + "copyfiles": "2.4.1", + "dotenv": "16.0.1", + "esm": "3.2.25", + "expect": "29.0.1", + "jasmine": "4.3.0", + "jasmine-core": "4.3.0", + "jasmine-spec-reporter": "7.0.0", + "jest": "28.1.3", + "karma": "6.4.0", + "karma-chrome-launcher": "3.1.1", + "karma-coverage": "2.2.0", + "karma-jasmine": "5.1.0", + "karma-jasmine-html-reporter": "2.0.0", + "karma-sourcemap-loader": "0.3.8", + "karma-typescript": "5.5.3", + "karma-webpack": "5.0.0", + "ts-jest": "28.0.8", + "ts-loader": "9.3.1", + "ts-node": "10.9.1", + "ts-proto": "1.156.2", + "typescript": "4.7.4", + "uuid": "8.3.2", + "vite": "4.4.9", + "vite-plugin-dts": "3.5.2", + "webpack": "5.76.0", + "webpack-cli": "4.10.0" + } + }, "node_modules/@aashutoshrathi/word-wrap": { "version": "1.2.6", "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", @@ -930,6 +985,10 @@ "node": ">= 8" } }, + "node_modules/@trinsic/trinsic": { + "resolved": "../../../web", + "link": true + }, "node_modules/@types/json-schema": { "version": "7.0.12", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz", diff --git a/samples/connect-basic/connect-app/package.json b/samples/connect-basic/connect-app/package.json index 328f14178..be42628a6 100644 --- a/samples/connect-basic/connect-app/package.json +++ b/samples/connect-basic/connect-app/package.json @@ -10,6 +10,7 @@ "preview": "vite preview" }, "dependencies": { + "@trinsic/trinsic": "file:../../../web", "react": "^18.2.0", "react-dom": "^18.2.0" }, diff --git a/samples/connect-basic/connect-app/src/App.tsx b/samples/connect-basic/connect-app/src/App.tsx index 4c3373952..a40ad5edd 100644 --- a/samples/connect-basic/connect-app/src/App.tsx +++ b/samples/connect-basic/connect-app/src/App.tsx @@ -2,9 +2,10 @@ import { useState } from "react"; import reactLogo from "./assets/react.svg"; import viteLogo from "/vite.svg"; import "./App.css"; +import {connectInit, SessionResult} from "./shared.ts"; function App() { - const [count, setCount] = useState(0); + const [clientToken, setClientToken] = useState("N/A"); return ( <> @@ -22,8 +23,14 @@ function App() {

Vite + React

-

Edit src/App.tsx and save to test HMR diff --git a/samples/connect-basic/connect-app/src/shared.ts b/samples/connect-basic/connect-app/src/shared.ts new file mode 100644 index 000000000..ac68aa43e --- /dev/null +++ b/samples/connect-basic/connect-app/src/shared.ts @@ -0,0 +1,33 @@ +export type SessionResult = { + client_token: string; + verifiable_presentation: string; +} + +export const backendUrl = "http://localhost:3000"; +export const frontendUrl = "http://localhost:5173"; + + +export async function connectInit(): Promise { + // This should be a POST request + const response = await fetch( backendUrl + "/connect_init",{ method: "POST", headers: { + 'Content-Type': 'application/json', + 'Access-Control-Allow-Origin': '*' + }}); + return await response.json(); +} + +export async function connectGetSession(): Promise { + const response = await fetch(backendUrl + "/connect_get_session",{ method: "POST", headers: { + 'Content-Type': 'application/json', + 'Access-Control-Allow-Origin': '*' + }}); + return await response.json(); +} + +export async function connectCancel(): Promise { + const response = await fetch(backendUrl + "/connect_cancel",{ method: "POST", headers: { + 'Content-Type': 'application/json', + 'Access-Control-Allow-Origin': '*' + }}); + return await response.json(); +} \ No newline at end of file diff --git a/samples/connect-basic/connect-backend/package-lock.json b/samples/connect-basic/connect-backend/package-lock.json index 064326903..1e306a422 100644 --- a/samples/connect-basic/connect-backend/package-lock.json +++ b/samples/connect-basic/connect-backend/package-lock.json @@ -9,13 +9,140 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "express": "^4.17.1" + "@trinsic/trinsic": "file:../../../web", + "body-parser": "^1.20.2", + "cors": "^2.8.5", + "express": "^4.18.2", + "nice-grpc-web": "^3.3.1" }, "devDependencies": { + "@types/cors": "^2.8.13", "@types/express": "^4.17.1", + "@types/node": "^20.5.0", + "ts-node": "10.9.1", "typescript": "^5.1.6" } }, + "../../../web": { + "name": "@trinsic/trinsic", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@azure/core-asynciterator-polyfill": "1.0.2", + "buffer": "6.0.3", + "fastestsmallesttextencoderdecoder": "1.0.22", + "google-protobuf": "3.21.2", + "js-base64": "3.7.5", + "long": "5.2.3", + "nice-grpc-web": "3.2.4", + "protobufjs": "7.2.4" + }, + "devDependencies": { + "@babel/core": "7.18.10", + "@babel/plugin-transform-modules-commonjs": "7.18.6", + "@types/google-protobuf": "3.15.6", + "@types/jasmine": "4.0.3", + "@types/jest": "28.1.7", + "@types/karma": "6.3.3", + "@types/karma-webpack": "2.0.11", + "@types/node": "18.7.8", + "@types/uuid": "8.3.4", + "babel-jest": "28.1.3", + "babel-plugin-dynamic-import-node": "2.3.3", + "chromedriver": "105.0.0", + "copyfiles": "2.4.1", + "dotenv": "16.0.1", + "esm": "3.2.25", + "expect": "29.0.1", + "jasmine": "4.3.0", + "jasmine-core": "4.3.0", + "jasmine-spec-reporter": "7.0.0", + "jest": "28.1.3", + "karma": "6.4.0", + "karma-chrome-launcher": "3.1.1", + "karma-coverage": "2.2.0", + "karma-jasmine": "5.1.0", + "karma-jasmine-html-reporter": "2.0.0", + "karma-sourcemap-loader": "0.3.8", + "karma-typescript": "5.5.3", + "karma-webpack": "5.0.0", + "ts-jest": "28.0.8", + "ts-loader": "9.3.1", + "ts-node": "10.9.1", + "ts-proto": "1.156.2", + "typescript": "4.7.4", + "uuid": "8.3.2", + "vite": "4.4.9", + "vite-plugin-dts": "3.5.2", + "webpack": "5.76.0", + "webpack-cli": "4.10.0" + } + }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@trinsic/trinsic": { + "resolved": "../../../web", + "link": true + }, + "node_modules/@tsconfig/node10": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", + "dev": true + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true + }, "node_modules/@types/body-parser": { "version": "1.19.2", "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", @@ -35,14 +162,24 @@ "@types/node": "*" } }, + "node_modules/@types/cors": { + "version": "2.8.13", + "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.13.tgz", + "integrity": "sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/express": { - "version": "4.17.1", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.1.tgz", - "integrity": "sha512-VfH/XCP0QbQk5B5puLqTLEeFgR8lfCJHZJKkInZ9mkYd+u8byX0kztXEQxEk4wZXJs8HI+7km2ALXjn4YKcX9w==", + "version": "4.17.17", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.17.tgz", + "integrity": "sha512-Q4FmmuLGBG58btUnfS1c1r/NQdlp3DMfGDGig8WhfpA2YRUtEkxAjkZb0yvplJGYdF1fsQ81iMDcH24sSCNC/Q==", "dev": true, "dependencies": { "@types/body-parser": "*", - "@types/express-serve-static-core": "*", + "@types/express-serve-static-core": "^4.17.33", + "@types/qs": "*", "@types/serve-static": "*" } }, @@ -109,6 +246,11 @@ "@types/node": "*" } }, + "node_modules/abort-controller-x": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/abort-controller-x/-/abort-controller-x-0.4.3.tgz", + "integrity": "sha512-VtUwTNU8fpMwvWGn4xE93ywbogTYsuT+AUxAXOeelbXuQVIwNmC5YLeho9sH4vZ4ITW8414TTAOG1nW6uIVHCA==" + }, "node_modules/accepts": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", @@ -121,45 +263,87 @@ "node": ">= 0.6" } }, + "node_modules/acorn": { + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", + "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true + }, "node_modules/array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" }, "node_modules/body-parser": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", - "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", + "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", "dependencies": { - "bytes": "3.1.0", - "content-type": "~1.0.4", + "bytes": "3.1.2", + "content-type": "~1.0.5", "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "1.7.2", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", "iconv-lite": "0.4.24", - "on-finished": "~2.3.0", - "qs": "6.7.0", - "raw-body": "2.4.0", - "type-is": "~1.6.17" + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" }, "engines": { - "node": ">= 0.8" + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" } }, "node_modules/bytes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", - "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", "engines": { "node": ">= 0.8" } }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/content-disposition": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", - "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", "dependencies": { - "safe-buffer": "5.1.2" + "safe-buffer": "5.2.1" }, "engines": { "node": ">= 0.6" @@ -174,9 +358,9 @@ } }, "node_modules/cookie": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", - "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", "engines": { "node": ">= 0.6" } @@ -186,6 +370,24 @@ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" }, + "node_modules/cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true + }, "node_modules/debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -195,17 +397,30 @@ } }, "node_modules/depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", "engines": { - "node": ">= 0.6" + "node": ">= 0.8" } }, "node_modules/destroy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha512-3NdhDuEXnfun/z7x9GOElY49LoqVHoGScmOKwmxhsS8N5Y+Z8KyPPDnaSzqWgYt/ji4mqwfTS34Htrk0zPIXVg==" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } }, "node_modules/ee-first": { "version": "1.1.1", @@ -234,37 +449,38 @@ } }, "node_modules/express": { - "version": "4.17.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", - "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", + "version": "4.18.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", + "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", "dependencies": { - "accepts": "~1.3.7", + "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.19.0", - "content-disposition": "0.5.3", + "body-parser": "1.20.1", + "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.4.0", + "cookie": "0.5.0", "cookie-signature": "1.0.6", "debug": "2.6.9", - "depd": "~1.1.2", + "depd": "2.0.0", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "etag": "~1.8.1", - "finalhandler": "~1.1.2", + "finalhandler": "1.2.0", "fresh": "0.5.2", + "http-errors": "2.0.0", "merge-descriptors": "1.0.1", "methods": "~1.1.2", - "on-finished": "~2.3.0", + "on-finished": "2.4.1", "parseurl": "~1.3.3", "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.5", - "qs": "6.7.0", + "proxy-addr": "~2.0.7", + "qs": "6.11.0", "range-parser": "~1.2.1", - "safe-buffer": "5.1.2", - "send": "0.17.1", - "serve-static": "1.14.1", - "setprototypeof": "1.1.1", - "statuses": "~1.5.0", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", "type-is": "~1.6.18", "utils-merge": "1.0.1", "vary": "~1.1.2" @@ -273,17 +489,54 @@ "node": ">= 0.10.0" } }, + "node_modules/express/node_modules/body-parser": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", + "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.1", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/express/node_modules/raw-body": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", + "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/finalhandler": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", - "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", "dependencies": { "debug": "2.6.9", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", - "on-finished": "~2.3.0", + "on-finished": "2.4.1", "parseurl": "~1.3.3", - "statuses": "~1.5.0", + "statuses": "2.0.1", "unpipe": "~1.0.0" }, "engines": { @@ -306,19 +559,71 @@ "node": ">= 0.6" } }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "node_modules/get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/http-errors": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", - "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", "dependencies": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.1", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.0" + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" }, "engines": { - "node": ">= 0.6" + "node": ">= 0.8" } }, "node_modules/iconv-lite": { @@ -333,9 +638,9 @@ } }, "node_modules/inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==" + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "node_modules/ipaddr.js": { "version": "1.9.1", @@ -345,6 +650,25 @@ "node": ">= 0.10" } }, + "node_modules/isomorphic-ws": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-5.0.0.tgz", + "integrity": "sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==", + "peerDependencies": { + "ws": "*" + } + }, + "node_modules/js-base64": { + "version": "3.7.5", + "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-3.7.5.tgz", + "integrity": "sha512-3MEt5DTINKqfScXKfJFrRbxkrnk2AxPWGBL/ycjz4dK8iqiSJ06UxD8jh8xuh6p10TX4t2+7FsBYVxxQbMg+qA==" + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -409,10 +733,45 @@ "node": ">= 0.6" } }, + "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": { + "ts-error": "^1.0.6" + } + }, + "node_modules/nice-grpc-web": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/nice-grpc-web/-/nice-grpc-web-3.3.1.tgz", + "integrity": "sha512-KXListAFLjJ7L/GsrRW5YWT+2oZDaF8Lu19ms7+HMykDGtIksqvZwR6+EzVmunFJciiNDShJ4EXr1W6eaiZoDQ==", + "dependencies": { + "abort-controller-x": "^0.4.0", + "isomorphic-ws": "^5.0.0", + "js-base64": "^3.7.2", + "nice-grpc-common": "^2.0.2" + } + }, + "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/object-inspect": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", "dependencies": { "ee-first": "1.1.1" }, @@ -446,11 +805,17 @@ } }, "node_modules/qs": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", - "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dependencies": { + "side-channel": "^1.0.4" + }, "engines": { "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/range-parser": { @@ -462,12 +827,12 @@ } }, "node_modules/raw-body": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", - "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", "dependencies": { - "bytes": "3.1.0", - "http-errors": "1.7.2", + "bytes": "3.1.2", + "http-errors": "2.0.0", "iconv-lite": "0.4.24", "unpipe": "1.0.0" }, @@ -476,9 +841,23 @@ } }, "node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] }, "node_modules/safer-buffer": { "version": "2.1.2", @@ -486,68 +865,129 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "node_modules/send": { - "version": "0.17.1", - "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", - "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", "dependencies": { "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", + "depd": "2.0.0", + "destroy": "1.2.0", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "etag": "~1.8.1", "fresh": "0.5.2", - "http-errors": "~1.7.2", + "http-errors": "2.0.0", "mime": "1.6.0", - "ms": "2.1.1", - "on-finished": "~2.3.0", + "ms": "2.1.3", + "on-finished": "2.4.1", "range-parser": "~1.2.1", - "statuses": "~1.5.0" + "statuses": "2.0.1" }, "engines": { "node": ">= 0.8.0" } }, "node_modules/send/node_modules/ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, "node_modules/serve-static": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", - "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", "dependencies": { "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "parseurl": "~1.3.3", - "send": "0.17.1" + "send": "0.18.0" }, "engines": { "node": ">= 0.8.0" } }, "node_modules/setprototypeof": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", - "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", "engines": { - "node": ">= 0.6" + "node": ">= 0.8" } }, "node_modules/toidentifier": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", - "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", "engines": { "node": ">=0.6" } }, + "node_modules/ts-error": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/ts-error/-/ts-error-1.0.6.tgz", + "integrity": "sha512-tLJxacIQUM82IR7JO1UUkKlYuUTmoY9HBJAmNWFzheSlDS5SPMcNIepejHJa4BpPQLAcbRhRf3GDJzyj6rbKvA==" + }, + "node_modules/ts-node": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "dev": true, + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, "node_modules/type-is": { "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", @@ -589,6 +1029,12 @@ "node": ">= 0.4.0" } }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true + }, "node_modules/vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", @@ -596,6 +1042,36 @@ "engines": { "node": ">= 0.8" } + }, + "node_modules/ws": { + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", + "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", + "peer": true, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "engines": { + "node": ">=6" + } } } } diff --git a/samples/connect-basic/connect-backend/package.json b/samples/connect-basic/connect-backend/package.json index 45d87261e..225655501 100644 --- a/samples/connect-basic/connect-backend/package.json +++ b/samples/connect-basic/connect-backend/package.json @@ -4,16 +4,23 @@ "description": "", "main": "index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "start": "ts-node src/app.ts" }, "keywords": [], "author": "", "license": "ISC", "devDependencies": { + "@types/cors": "^2.8.13", "@types/express": "^4.17.1", + "@types/node": "^20.5.0", + "ts-node": "10.9.1", "typescript": "^5.1.6" }, "dependencies": { - "express": "^4.17.1" + "@trinsic/trinsic": "file:../../../web", + "body-parser": "^1.20.2", + "cors": "^2.8.5", + "express": "^4.18.2", + "nice-grpc-web": "^3.3.1" } } diff --git a/samples/connect-basic/connect-backend/src/app.ts b/samples/connect-basic/connect-backend/src/app.ts index c71b2eee5..61eb39d57 100644 --- a/samples/connect-basic/connect-backend/src/app.ts +++ b/samples/connect-basic/connect-backend/src/app.ts @@ -1,17 +1,88 @@ import express from "express"; +import {FetchTransport} from "nice-grpc-web"; +import bodyParser from 'body-parser'; +import {SessionResult} from "./shared"; +import cors from "cors"; + +import {TrinsicService, TransportProvider, IDVSessionState, VerificationType} from "@trinsic/trinsic"; const app = express(); const port = 3000; +TransportProvider.overrideTransport = FetchTransport(); +const trinsic = new TrinsicService({ authToken: process.env.TRINSIC_AUTH_TOKEN, serverEndpoint: "dev-internal.trinsic.cloud" }); +const connectSvc = trinsic.connect(); +let sessionId = "SESSION-ID-KEY"; +const mockDatabase = new Map(); + +// Generate HTML content with hyperlinks +// TODO - Get this from the `app.routes` +const htmlContent = ` + + + Endpoints + + +

Available Endpoints

+ + + + `; + +// Allow requests without the 'Origin' header +app.use(cors({ + origin: "*" +})); + +app.use(bodyParser.json()); + app.get("/", (req, res) => { - res.send("Hello World!"); + console.log("GET /"); + res.send(htmlContent); +}); + +app.post("/connect_init", async (req, res) => { + console.log("POST /connect_init"); + // Read the input with our mapping key + // const { sessionId } = req.body; + // Create a connect session + // Open connect session using government id + const result = await connectSvc.createSession({verifications: [{type: VerificationType.GOVERNMENT_ID }]}) + mockDatabase.set(sessionId, result.session.id); + req.read() + // Return the client_token to the user + const sessionResult: SessionResult = { client_token: result.session.clientToken, verifiable_presentation: "" }; + res.status(200).json(sessionResult); +}); + +app.post("/connect_get_session", async (req, res) => { + console.log("POST /connect_get_session"); + // const {sessionId} = req.body; + // Use the `id` to get the session + const result = await connectSvc.getSession({idvSessionId: mockDatabase.get(sessionId)}); + + const sessionResult: SessionResult = { client_token: "", verifiable_presentation: "" }; + + if (result.session.state === IDVSessionState.IDV_SUCCESS) { + // Return the session + sessionResult.verifiable_presentation = result.session.resultVp; + res.status(200); + } else { + // Processing + res.status(102); + } + res.send(JSON.stringify(sessionResult)); }); -app.get("/connect_init", (req, res) => { - // TODO - Trinsic service initialize - // TODO - Open connect session using government id - // TODO - Save the `id` somewhere in a memory DB - // TODO - Return the client_token to the user +app.post("/connect_cancel", async (req, res) => { + console.log("POST /connect_cancel"); + // TODO - Call the `CancelSession` endpoint to terminate + const result = await connectSvc.cancelSession({idvSessionId: mockDatabase.get(sessionId)}); + res.status(200); }); app.listen(port, () => { diff --git a/samples/connect-basic/connect-backend/src/shared.ts b/samples/connect-basic/connect-backend/src/shared.ts new file mode 100644 index 000000000..70dcd42b8 --- /dev/null +++ b/samples/connect-basic/connect-backend/src/shared.ts @@ -0,0 +1,23 @@ +export type SessionResult = { + client_token: string; + verifiable_presentation: string; +} + +export const backendUrl = "http://localhost:3000"; +export const frontendUrl = "http://localhost:5173"; + + +export async function connectInit(): Promise { + const response = await fetch(backendUrl + "/connect_init"); + return await response.json(); +} + +export async function connectGetSession(): Promise { + const response = await fetch(backendUrl + "/connect_get_session"); + return await response.json(); +} + +export async function connectCancel(): Promise { + const response = await fetch(backendUrl + "/connect_cancel"); + return await response.json(); +} \ No newline at end of file diff --git a/web/package.json b/web/package.json index 426617769..28dcf6e13 100644 --- a/web/package.json +++ b/web/package.json @@ -2,13 +2,13 @@ "name": "@trinsic/trinsic", "version": "1.0.0", "description": "Node and Browser wrapper for the Trinsic services", - "main": "dist/index.js", - "types": "lib/index.d.ts", + "main": "dist/trinsic.umd.js", + "types": "dist/index.d.ts", "files": [ - "lib/**/*" + "dist/**/*" ], "exports": { - ".": "./lib/index.js" + ".": "./dist/trinsic.umd.js" }, "scripts": { "build": "npm run build:proto && npm run build:vite", diff --git a/web/src/index.ts b/web/src/index.ts index 00602ca49..ff623952b 100644 --- a/web/src/index.ts +++ b/web/src/index.ts @@ -4,7 +4,7 @@ import "fastestsmallesttextencoderdecoder"; import { WalletService } from "./WalletService"; import { ConnectService } from "./ConnectService"; -import { AccessManagementService } from "./AccessManagementService +import { AccessManagementService } from "./AccessManagementService"; import { ProviderService } from "./ProviderService"; import { TrustRegistryService } from "./TrustRegistryService"; import { CredentialService } from "./CredentialService"; diff --git a/web/src/proto/google/protobuf/descriptor.ts b/web/src/proto/google/protobuf/descriptor.ts index 6fe5f9e3c..6ceedc488 100644 --- a/web/src/proto/google/protobuf/descriptor.ts +++ b/web/src/proto/google/protobuf/descriptor.ts @@ -7,68 +7,86 @@ import _m0 from "protobufjs/minimal"; * files it parses. */ export interface FileDescriptorSet { - file?: FileDescriptorProto[] | undefined; + file?: FileDescriptorProto[] | undefined; } /** Describes a complete .proto file. */ export interface FileDescriptorProto { - /** file name, relative to root of source tree */ - name?: string | undefined; - /** e.g. "foo", "foo.bar", etc. */ - package?: string | undefined; - /** Names of files imported by this file. */ - dependency?: string[] | undefined; - /** Indexes of the public imported files in the dependency list above. */ - publicDependency?: number[] | undefined; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - */ - weakDependency?: number[] | undefined; - /** All top-level definitions in this file. */ - messageType?: DescriptorProto[] | undefined; - enumType?: EnumDescriptorProto[] | undefined; - service?: ServiceDescriptorProto[] | undefined; - extension?: FieldDescriptorProto[] | undefined; - options?: FileOptions | undefined; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - */ - sourceCodeInfo?: SourceCodeInfo | undefined; - /** - * The syntax of the proto file. - * The supported values are "proto2" and "proto3". - */ - syntax?: string | undefined; + /** file name, relative to root of source tree */ + name?: + | string + | undefined; + /** e.g. "foo", "foo.bar", etc. */ + package?: + | string + | undefined; + /** Names of files imported by this file. */ + dependency?: + | string[] + | undefined; + /** Indexes of the public imported files in the dependency list above. */ + publicDependency?: + | number[] + | undefined; + /** + * Indexes of the weak imported files in the dependency list. + * For Google-internal migration only. Do not use. + */ + weakDependency?: + | number[] + | undefined; + /** All top-level definitions in this file. */ + messageType?: DescriptorProto[] | undefined; + enumType?: EnumDescriptorProto[] | undefined; + service?: ServiceDescriptorProto[] | undefined; + extension?: FieldDescriptorProto[] | undefined; + options?: + | FileOptions + | undefined; + /** + * This field contains optional information about the original source code. + * You may safely remove this entire field without harming runtime + * functionality of the descriptors -- the information is needed only by + * development tools. + */ + sourceCodeInfo?: + | SourceCodeInfo + | undefined; + /** + * The syntax of the proto file. + * The supported values are "proto2" and "proto3". + */ + syntax?: string | undefined; } /** Describes a message type. */ export interface DescriptorProto { - name?: string | undefined; - field?: FieldDescriptorProto[] | undefined; - extension?: FieldDescriptorProto[] | undefined; - nestedType?: DescriptorProto[] | undefined; - enumType?: EnumDescriptorProto[] | undefined; - extensionRange?: DescriptorProto_ExtensionRange[] | undefined; - oneofDecl?: OneofDescriptorProto[] | undefined; - options?: MessageOptions | undefined; - reservedRange?: DescriptorProto_ReservedRange[] | undefined; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - */ - reservedName?: string[] | undefined; + name?: string | undefined; + field?: FieldDescriptorProto[] | undefined; + extension?: FieldDescriptorProto[] | undefined; + nestedType?: DescriptorProto[] | undefined; + enumType?: EnumDescriptorProto[] | undefined; + extensionRange?: DescriptorProto_ExtensionRange[] | undefined; + oneofDecl?: OneofDescriptorProto[] | undefined; + options?: MessageOptions | undefined; + reservedRange?: + | DescriptorProto_ReservedRange[] + | undefined; + /** + * Reserved field names, which may not be used by fields in the same message. + * A given name may only be reserved once. + */ + reservedName?: string[] | undefined; } export interface DescriptorProto_ExtensionRange { - /** Inclusive. */ - start?: number | undefined; - /** Exclusive. */ - end?: number | undefined; - options?: ExtensionRangeOptions | undefined; + /** Inclusive. */ + start?: + | number + | undefined; + /** Exclusive. */ + end?: number | undefined; + options?: ExtensionRangeOptions | undefined; } /** @@ -77,307 +95,319 @@ export interface DescriptorProto_ExtensionRange { * not overlap. */ export interface DescriptorProto_ReservedRange { - /** Inclusive. */ - start?: number | undefined; - /** Exclusive. */ - end?: number | undefined; + /** Inclusive. */ + start?: + | number + | undefined; + /** Exclusive. */ + end?: number | undefined; } export interface ExtensionRangeOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption?: UninterpretedOption[] | undefined; + /** The parser stores options it doesn't recognize here. See above. */ + uninterpretedOption?: UninterpretedOption[] | undefined; } /** Describes a field within a message. */ export interface FieldDescriptorProto { - name?: string | undefined; - number?: number | undefined; - label?: FieldDescriptorProto_Label | undefined; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - */ - type?: FieldDescriptorProto_Type | undefined; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - */ - typeName?: string | undefined; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - */ - extendee?: string | undefined; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - */ - defaultValue?: string | undefined; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - */ - oneofIndex?: number | undefined; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - */ - jsonName?: string | undefined; - options?: FieldOptions | undefined; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3Optional?: boolean | undefined; + name?: string | undefined; + number?: number | undefined; + label?: + | FieldDescriptorProto_Label + | undefined; + /** + * If type_name is set, this need not be set. If both this and type_name + * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. + */ + type?: + | FieldDescriptorProto_Type + | undefined; + /** + * For message and enum types, this is the name of the type. If the name + * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping + * rules are used to find the type (i.e. first the nested types within this + * message are searched, then within the parent, on up to the root + * namespace). + */ + typeName?: + | string + | undefined; + /** + * For extensions, this is the name of the type being extended. It is + * resolved in the same manner as type_name. + */ + extendee?: + | string + | undefined; + /** + * For numeric types, contains the original text representation of the value. + * For booleans, "true" or "false". + * For strings, contains the default text contents (not escaped in any way). + * For bytes, contains the C escaped value. All bytes >= 128 are escaped. + */ + defaultValue?: + | string + | undefined; + /** + * If set, gives the index of a oneof in the containing type's oneof_decl + * list. This field is a member of that oneof. + */ + oneofIndex?: + | number + | undefined; + /** + * JSON name of this field. The value is set by protocol compiler. If the + * user has set a "json_name" option on this field, that option's value + * will be used. Otherwise, it's deduced from the field's name by converting + * it to camelCase. + */ + jsonName?: string | undefined; + options?: + | FieldOptions + | undefined; + /** + * If true, this is a proto3 "optional". When a proto3 field is optional, it + * tracks presence regardless of field type. + * + * When proto3_optional is true, this field must be belong to a oneof to + * signal to old proto3 clients that presence is tracked for this field. This + * oneof is known as a "synthetic" oneof, and this field must be its sole + * member (each proto3 optional field gets its own synthetic oneof). Synthetic + * oneofs exist in the descriptor only, and do not generate any API. Synthetic + * oneofs must be ordered after all "real" oneofs. + * + * For message fields, proto3_optional doesn't create any semantic change, + * since non-repeated message fields always track presence. However it still + * indicates the semantic detail of whether the user wrote "optional" or not. + * This can be useful for round-tripping the .proto file. For consistency we + * give message fields a synthetic oneof also, even though it is not required + * to track presence. This is especially important because the parser can't + * tell if a field is a message or an enum, so it must always create a + * synthetic oneof. + * + * Proto2 optional fields do not set this flag, because they already indicate + * optional with `LABEL_OPTIONAL`. + */ + proto3Optional?: boolean | undefined; } export enum FieldDescriptorProto_Type { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - TYPE_GROUP = 10, - /** TYPE_MESSAGE - Length-delimited aggregate. */ - TYPE_MESSAGE = 11, - /** TYPE_BYTES - New in version 2. */ - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - /** TYPE_SINT32 - Uses ZigZag encoding. */ - TYPE_SINT32 = 17, - /** TYPE_SINT64 - Uses ZigZag encoding. */ - TYPE_SINT64 = 18, - UNRECOGNIZED = -1, + /** + * TYPE_DOUBLE - 0 is reserved for errors. + * Order is weird for historical reasons. + */ + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + /** + * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if + * negative values are likely. + */ + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + /** + * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if + * negative values are likely. + */ + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + /** + * TYPE_GROUP - Tag-delimited aggregate. + * Group type is deprecated and not supported in proto3. However, Proto3 + * implementations should still be able to parse the group wire format and + * treat group fields as unknown fields. + */ + TYPE_GROUP = 10, + /** TYPE_MESSAGE - Length-delimited aggregate. */ + TYPE_MESSAGE = 11, + /** TYPE_BYTES - New in version 2. */ + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + /** TYPE_SINT32 - Uses ZigZag encoding. */ + TYPE_SINT32 = 17, + /** TYPE_SINT64 - Uses ZigZag encoding. */ + TYPE_SINT64 = 18, + UNRECOGNIZED = -1, } -export function fieldDescriptorProto_TypeFromJSON( - object: any, -): FieldDescriptorProto_Type { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Type.UNRECOGNIZED; - } +export function fieldDescriptorProto_TypeFromJSON(object: any): FieldDescriptorProto_Type { + switch (object) { + case 1: + case "TYPE_DOUBLE": + return FieldDescriptorProto_Type.TYPE_DOUBLE; + case 2: + case "TYPE_FLOAT": + return FieldDescriptorProto_Type.TYPE_FLOAT; + case 3: + case "TYPE_INT64": + return FieldDescriptorProto_Type.TYPE_INT64; + case 4: + case "TYPE_UINT64": + return FieldDescriptorProto_Type.TYPE_UINT64; + case 5: + case "TYPE_INT32": + return FieldDescriptorProto_Type.TYPE_INT32; + case 6: + case "TYPE_FIXED64": + return FieldDescriptorProto_Type.TYPE_FIXED64; + case 7: + case "TYPE_FIXED32": + return FieldDescriptorProto_Type.TYPE_FIXED32; + case 8: + case "TYPE_BOOL": + return FieldDescriptorProto_Type.TYPE_BOOL; + case 9: + case "TYPE_STRING": + return FieldDescriptorProto_Type.TYPE_STRING; + case 10: + case "TYPE_GROUP": + return FieldDescriptorProto_Type.TYPE_GROUP; + case 11: + case "TYPE_MESSAGE": + return FieldDescriptorProto_Type.TYPE_MESSAGE; + case 12: + case "TYPE_BYTES": + return FieldDescriptorProto_Type.TYPE_BYTES; + case 13: + case "TYPE_UINT32": + return FieldDescriptorProto_Type.TYPE_UINT32; + case 14: + case "TYPE_ENUM": + return FieldDescriptorProto_Type.TYPE_ENUM; + case 15: + case "TYPE_SFIXED32": + return FieldDescriptorProto_Type.TYPE_SFIXED32; + case 16: + case "TYPE_SFIXED64": + return FieldDescriptorProto_Type.TYPE_SFIXED64; + case 17: + case "TYPE_SINT32": + return FieldDescriptorProto_Type.TYPE_SINT32; + case 18: + case "TYPE_SINT64": + return FieldDescriptorProto_Type.TYPE_SINT64; + case -1: + case "UNRECOGNIZED": + default: + return FieldDescriptorProto_Type.UNRECOGNIZED; + } } -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type, -): string { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - case FieldDescriptorProto_Type.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } +export function fieldDescriptorProto_TypeToJSON(object: FieldDescriptorProto_Type): string { + switch (object) { + case FieldDescriptorProto_Type.TYPE_DOUBLE: + return "TYPE_DOUBLE"; + case FieldDescriptorProto_Type.TYPE_FLOAT: + return "TYPE_FLOAT"; + case FieldDescriptorProto_Type.TYPE_INT64: + return "TYPE_INT64"; + case FieldDescriptorProto_Type.TYPE_UINT64: + return "TYPE_UINT64"; + case FieldDescriptorProto_Type.TYPE_INT32: + return "TYPE_INT32"; + case FieldDescriptorProto_Type.TYPE_FIXED64: + return "TYPE_FIXED64"; + case FieldDescriptorProto_Type.TYPE_FIXED32: + return "TYPE_FIXED32"; + case FieldDescriptorProto_Type.TYPE_BOOL: + return "TYPE_BOOL"; + case FieldDescriptorProto_Type.TYPE_STRING: + return "TYPE_STRING"; + case FieldDescriptorProto_Type.TYPE_GROUP: + return "TYPE_GROUP"; + case FieldDescriptorProto_Type.TYPE_MESSAGE: + return "TYPE_MESSAGE"; + case FieldDescriptorProto_Type.TYPE_BYTES: + return "TYPE_BYTES"; + case FieldDescriptorProto_Type.TYPE_UINT32: + return "TYPE_UINT32"; + case FieldDescriptorProto_Type.TYPE_ENUM: + return "TYPE_ENUM"; + case FieldDescriptorProto_Type.TYPE_SFIXED32: + return "TYPE_SFIXED32"; + case FieldDescriptorProto_Type.TYPE_SFIXED64: + return "TYPE_SFIXED64"; + case FieldDescriptorProto_Type.TYPE_SINT32: + return "TYPE_SINT32"; + case FieldDescriptorProto_Type.TYPE_SINT64: + return "TYPE_SINT64"; + case FieldDescriptorProto_Type.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } } export enum FieldDescriptorProto_Label { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - UNRECOGNIZED = -1, + /** LABEL_OPTIONAL - 0 is reserved for errors */ + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3, + UNRECOGNIZED = -1, } -export function fieldDescriptorProto_LabelFromJSON( - object: any, -): FieldDescriptorProto_Label { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - case -1: - case "UNRECOGNIZED": - default: - return FieldDescriptorProto_Label.UNRECOGNIZED; - } +export function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptorProto_Label { + switch (object) { + case 1: + case "LABEL_OPTIONAL": + return FieldDescriptorProto_Label.LABEL_OPTIONAL; + case 2: + case "LABEL_REQUIRED": + return FieldDescriptorProto_Label.LABEL_REQUIRED; + case 3: + case "LABEL_REPEATED": + return FieldDescriptorProto_Label.LABEL_REPEATED; + case -1: + case "UNRECOGNIZED": + default: + return FieldDescriptorProto_Label.UNRECOGNIZED; + } } -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label, -): string { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - case FieldDescriptorProto_Label.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } +export function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_Label): string { + switch (object) { + case FieldDescriptorProto_Label.LABEL_OPTIONAL: + return "LABEL_OPTIONAL"; + case FieldDescriptorProto_Label.LABEL_REQUIRED: + return "LABEL_REQUIRED"; + case FieldDescriptorProto_Label.LABEL_REPEATED: + return "LABEL_REPEATED"; + case FieldDescriptorProto_Label.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } } /** Describes a oneof. */ export interface OneofDescriptorProto { - name?: string | undefined; - options?: OneofOptions | undefined; + name?: string | undefined; + options?: OneofOptions | undefined; } /** Describes an enum type. */ export interface EnumDescriptorProto { - name?: string | undefined; - value?: EnumValueDescriptorProto[] | undefined; - options?: EnumOptions | undefined; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - */ - reservedRange?: EnumDescriptorProto_EnumReservedRange[] | undefined; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - */ - reservedName?: string[] | undefined; + name?: string | undefined; + value?: EnumValueDescriptorProto[] | undefined; + options?: + | EnumOptions + | undefined; + /** + * Range of reserved numeric values. Reserved numeric values may not be used + * by enum values in the same enum declaration. Reserved ranges may not + * overlap. + */ + reservedRange?: + | EnumDescriptorProto_EnumReservedRange[] + | undefined; + /** + * Reserved enum value names, which may not be reused. A given name may only + * be reserved once. + */ + reservedName?: string[] | undefined; } /** @@ -389,497 +419,565 @@ export interface EnumDescriptorProto { * domain. */ export interface EnumDescriptorProto_EnumReservedRange { - /** Inclusive. */ - start?: number | undefined; - /** Inclusive. */ - end?: number | undefined; + /** Inclusive. */ + start?: + | number + | undefined; + /** Inclusive. */ + end?: number | undefined; } /** Describes a value within an enum. */ export interface EnumValueDescriptorProto { - name?: string | undefined; - number?: number | undefined; - options?: EnumValueOptions | undefined; + name?: string | undefined; + number?: number | undefined; + options?: EnumValueOptions | undefined; } /** Describes a service. */ export interface ServiceDescriptorProto { - name?: string | undefined; - method?: MethodDescriptorProto[] | undefined; - options?: ServiceOptions | undefined; + name?: string | undefined; + method?: MethodDescriptorProto[] | undefined; + options?: ServiceOptions | undefined; } /** Describes a method of a service. */ export interface MethodDescriptorProto { - name?: string | undefined; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - */ - inputType?: string | undefined; - outputType?: string | undefined; - options?: MethodOptions | undefined; - /** Identifies if client streams multiple client messages */ - clientStreaming?: boolean | undefined; - /** Identifies if server streams multiple server messages */ - serverStreaming?: boolean | undefined; + name?: + | string + | undefined; + /** + * Input and output type names. These are resolved in the same way as + * FieldDescriptorProto.type_name, but must refer to a message type. + */ + inputType?: string | undefined; + outputType?: string | undefined; + options?: + | MethodOptions + | undefined; + /** Identifies if client streams multiple client messages */ + clientStreaming?: + | boolean + | undefined; + /** Identifies if server streams multiple server messages */ + serverStreaming?: boolean | undefined; } export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - */ - javaPackage?: string | undefined; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - */ - javaOuterClassname?: string | undefined; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - */ - javaMultipleFiles?: boolean | undefined; - /** - * This option does nothing. - * - * @deprecated - */ - javaGenerateEqualsAndHash?: boolean | undefined; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - */ - javaStringCheckUtf8?: boolean | undefined; - optimizeFor?: FileOptions_OptimizeMode | undefined; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - */ - goPackage?: string | undefined; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - */ - ccGenericServices?: boolean | undefined; - javaGenericServices?: boolean | undefined; - pyGenericServices?: boolean | undefined; - phpGenericServices?: boolean | undefined; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - */ - deprecated?: boolean | undefined; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - */ - ccEnableArenas?: boolean | undefined; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - */ - objcClassPrefix?: string | undefined; - /** Namespace for generated classes; defaults to the package. */ - csharpNamespace?: string | undefined; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - */ - swiftPrefix?: string | undefined; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - */ - phpClassPrefix?: string | undefined; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - */ - phpNamespace?: string | undefined; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - */ - phpMetadataNamespace?: string | undefined; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - */ - rubyPackage?: string | undefined; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - */ - uninterpretedOption?: UninterpretedOption[] | undefined; + /** + * Sets the Java package where classes generated from this .proto will be + * placed. By default, the proto package is used, but this is often + * inappropriate because proto packages do not normally start with backwards + * domain names. + */ + javaPackage?: + | string + | undefined; + /** + * Controls the name of the wrapper Java class generated for the .proto file. + * That class will always contain the .proto file's getDescriptor() method as + * well as any top-level extensions defined in the .proto file. + * If java_multiple_files is disabled, then all the other classes from the + * .proto file will be nested inside the single wrapper outer class. + */ + javaOuterClassname?: + | string + | undefined; + /** + * If enabled, then the Java code generator will generate a separate .java + * file for each top-level message, enum, and service defined in the .proto + * file. Thus, these types will *not* be nested inside the wrapper class + * named by java_outer_classname. However, the wrapper class will still be + * generated to contain the file's getDescriptor() method as well as any + * top-level extensions defined in the file. + */ + javaMultipleFiles?: + | boolean + | undefined; + /** + * This option does nothing. + * + * @deprecated + */ + javaGenerateEqualsAndHash?: + | boolean + | undefined; + /** + * If set true, then the Java2 code generator will generate code that + * throws an exception whenever an attempt is made to assign a non-UTF-8 + * byte sequence to a string field. + * Message reflection will do the same. + * However, an extension field still accepts non-UTF-8 byte sequences. + * This option has no effect on when used with the lite runtime. + */ + javaStringCheckUtf8?: boolean | undefined; + optimizeFor?: + | FileOptions_OptimizeMode + | undefined; + /** + * Sets the Go package where structs generated from this .proto will be + * placed. If omitted, the Go package will be derived from the following: + * - The basename of the package import path, if provided. + * - Otherwise, the package statement in the .proto file, if present. + * - Otherwise, the basename of the .proto file, without extension. + */ + goPackage?: + | string + | undefined; + /** + * Should generic services be generated in each language? "Generic" services + * are not specific to any particular RPC system. They are generated by the + * main code generators in each language (without additional plugins). + * Generic services were the only kind of service generation supported by + * early versions of google.protobuf. + * + * Generic services are now considered deprecated in favor of using plugins + * that generate code specific to your particular RPC system. Therefore, + * these default to false. Old code which depends on generic services should + * explicitly set them to true. + */ + ccGenericServices?: boolean | undefined; + javaGenericServices?: boolean | undefined; + pyGenericServices?: boolean | undefined; + phpGenericServices?: + | boolean + | undefined; + /** + * Is this file deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for everything in the file, or it will be completely ignored; in the very + * least, this is a formalization for deprecating files. + */ + deprecated?: + | boolean + | undefined; + /** + * Enables the use of arenas for the proto messages in this file. This applies + * only to generated classes for C++. + */ + ccEnableArenas?: + | boolean + | undefined; + /** + * Sets the objective c class prefix which is prepended to all objective c + * generated classes from this .proto. There is no default. + */ + objcClassPrefix?: + | string + | undefined; + /** Namespace for generated classes; defaults to the package. */ + csharpNamespace?: + | string + | undefined; + /** + * By default Swift generators will take the proto package and CamelCase it + * replacing '.' with underscore and use that to prefix the types/symbols + * defined. When this options is provided, they will use this value instead + * to prefix the types/symbols defined. + */ + swiftPrefix?: + | string + | undefined; + /** + * Sets the php class prefix which is prepended to all php generated classes + * from this .proto. Default is empty. + */ + phpClassPrefix?: + | string + | undefined; + /** + * Use this option to change the namespace of php generated classes. Default + * is empty. When this option is empty, the package name will be used for + * determining the namespace. + */ + phpNamespace?: + | string + | undefined; + /** + * Use this option to change the namespace of php generated metadata classes. + * Default is empty. When this option is empty, the proto file name will be + * used for determining the namespace. + */ + phpMetadataNamespace?: + | string + | undefined; + /** + * Use this option to change the package of ruby generated classes. Default + * is empty. When this option is not set, the package name will be used for + * determining the ruby package. + */ + rubyPackage?: + | string + | undefined; + /** + * The parser stores options it doesn't recognize here. + * See the documentation for the "Options" section above. + */ + uninterpretedOption?: UninterpretedOption[] | undefined; } /** Generated classes can be optimized for speed or code size. */ export enum FileOptions_OptimizeMode { - /** SPEED - Generate complete code for parsing, serialization, */ - SPEED = 1, - /** CODE_SIZE - etc. */ - CODE_SIZE = 2, - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - LITE_RUNTIME = 3, - UNRECOGNIZED = -1, + /** SPEED - Generate complete code for parsing, serialization, */ + SPEED = 1, + /** CODE_SIZE - etc. */ + CODE_SIZE = 2, + /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ + LITE_RUNTIME = 3, + UNRECOGNIZED = -1, } -export function fileOptions_OptimizeModeFromJSON( - object: any, -): FileOptions_OptimizeMode { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - case -1: - case "UNRECOGNIZED": - default: - return FileOptions_OptimizeMode.UNRECOGNIZED; - } +export function fileOptions_OptimizeModeFromJSON(object: any): FileOptions_OptimizeMode { + switch (object) { + case 1: + case "SPEED": + return FileOptions_OptimizeMode.SPEED; + case 2: + case "CODE_SIZE": + return FileOptions_OptimizeMode.CODE_SIZE; + case 3: + case "LITE_RUNTIME": + return FileOptions_OptimizeMode.LITE_RUNTIME; + case -1: + case "UNRECOGNIZED": + default: + return FileOptions_OptimizeMode.UNRECOGNIZED; + } } -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode, -): string { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - case FileOptions_OptimizeMode.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } +export function fileOptions_OptimizeModeToJSON(object: FileOptions_OptimizeMode): string { + switch (object) { + case FileOptions_OptimizeMode.SPEED: + return "SPEED"; + case FileOptions_OptimizeMode.CODE_SIZE: + return "CODE_SIZE"; + case FileOptions_OptimizeMode.LITE_RUNTIME: + return "LITE_RUNTIME"; + case FileOptions_OptimizeMode.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } } export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - */ - messageSetWireFormat?: boolean | undefined; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - */ - noStandardDescriptorAccessor?: boolean | undefined; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - */ - deprecated?: boolean | undefined; - /** - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - */ - mapEntry?: boolean | undefined; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption?: UninterpretedOption[] | undefined; + /** + * Set true to use the old proto1 MessageSet wire format for extensions. + * This is provided for backwards-compatibility with the MessageSet wire + * format. You should not use this for any other reason: It's less + * efficient, has fewer features, and is more complicated. + * + * The message must be defined exactly as follows: + * message Foo { + * option message_set_wire_format = true; + * extensions 4 to max; + * } + * Note that the message cannot have any defined fields; MessageSets only + * have extensions. + * + * All extensions of your type must be singular messages; e.g. they cannot + * be int32s, enums, or repeated messages. + * + * Because this is an option, the above two restrictions are not enforced by + * the protocol compiler. + */ + messageSetWireFormat?: + | boolean + | undefined; + /** + * Disables the generation of the standard "descriptor()" accessor, which can + * conflict with a field of the same name. This is meant to make migration + * from proto1 easier; new code should avoid fields named "descriptor". + */ + noStandardDescriptorAccessor?: + | boolean + | undefined; + /** + * Is this message deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for the message, or it will be completely ignored; in the very least, + * this is a formalization for deprecating messages. + */ + deprecated?: + | boolean + | undefined; + /** + * Whether the message is an automatically generated map entry type for the + * maps field. + * + * For maps fields: + * map map_field = 1; + * The parsed descriptor looks like: + * message MapFieldEntry { + * option map_entry = true; + * optional KeyType key = 1; + * optional ValueType value = 2; + * } + * repeated MapFieldEntry map_field = 1; + * + * Implementations may choose not to generate the map_entry=true message, but + * use a native map in the target language to hold the keys and values. + * The reflection APIs in such implementations still need to work as + * if the field is a repeated message field. + * + * NOTE: Do not set the option in .proto files. Always use the maps syntax + * instead. The option should only be implicitly set by the proto compiler + * parser. + */ + mapEntry?: + | boolean + | undefined; + /** The parser stores options it doesn't recognize here. See above. */ + uninterpretedOption?: UninterpretedOption[] | undefined; } export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! - */ - ctype?: FieldOptions_CType | undefined; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. - */ - packed?: boolean | undefined; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - */ - jstype?: FieldOptions_JSType | undefined; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - * - * As of 2021, lazy does no correctness checks on the byte stream during - * parsing. This may lead to crashes if and when an invalid byte stream is - * finally parsed upon access. - * - * TODO(b/211906113): Enable validation on lazy fields. - */ - lazy?: boolean | undefined; - /** - * unverified_lazy does no correctness checks on the byte stream. This should - * only be used where lazy with verification is prohibitive for performance - * reasons. - */ - unverifiedLazy?: boolean | undefined; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - */ - deprecated?: boolean | undefined; - /** For Google-internal migration only. Do not use. */ - weak?: boolean | undefined; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption?: UninterpretedOption[] | undefined; + /** + * The ctype option instructs the C++ code generator to use a different + * representation of the field than it normally would. See the specific + * options below. This option is not yet implemented in the open source + * release -- sorry, we'll try to include it in a future version! + */ + ctype?: + | FieldOptions_CType + | undefined; + /** + * The packed option can be enabled for repeated primitive fields to enable + * a more efficient representation on the wire. Rather than repeatedly + * writing the tag and type for each element, the entire array is encoded as + * a single length-delimited blob. In proto3, only explicit setting it to + * false will avoid using packed encoding. + */ + packed?: + | boolean + | undefined; + /** + * The jstype option determines the JavaScript type used for values of the + * field. The option is permitted only for 64 bit integral and fixed types + * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING + * is represented as JavaScript string, which avoids loss of precision that + * can happen when a large value is converted to a floating point JavaScript. + * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to + * use the JavaScript "number" type. The behavior of the default option + * JS_NORMAL is implementation dependent. + * + * This option is an enum to permit additional types to be added, e.g. + * goog.math.Integer. + */ + jstype?: + | FieldOptions_JSType + | undefined; + /** + * Should this field be parsed lazily? Lazy applies only to message-type + * fields. It means that when the outer message is initially parsed, the + * inner message's contents will not be parsed but instead stored in encoded + * form. The inner message will actually be parsed when it is first accessed. + * + * This is only a hint. Implementations are free to choose whether to use + * eager or lazy parsing regardless of the value of this option. However, + * setting this option true suggests that the protocol author believes that + * using lazy parsing on this field is worth the additional bookkeeping + * overhead typically needed to implement it. + * + * This option does not affect the public interface of any generated code; + * all method signatures remain the same. Furthermore, thread-safety of the + * interface is not affected by this option; const methods remain safe to + * call from multiple threads concurrently, while non-const methods continue + * to require exclusive access. + * + * Note that implementations may choose not to check required fields within + * a lazy sub-message. That is, calling IsInitialized() on the outer message + * may return true even if the inner message has missing required fields. + * This is necessary because otherwise the inner message would have to be + * parsed in order to perform the check, defeating the purpose of lazy + * parsing. An implementation which chooses not to check required fields + * must be consistent about it. That is, for any particular sub-message, the + * implementation must either *always* check its required fields, or *never* + * check its required fields, regardless of whether or not the message has + * been parsed. + * + * As of 2021, lazy does no correctness checks on the byte stream during + * parsing. This may lead to crashes if and when an invalid byte stream is + * finally parsed upon access. + * + * TODO(b/211906113): Enable validation on lazy fields. + */ + lazy?: + | boolean + | undefined; + /** + * unverified_lazy does no correctness checks on the byte stream. This should + * only be used where lazy with verification is prohibitive for performance + * reasons. + */ + unverifiedLazy?: + | boolean + | undefined; + /** + * Is this field deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for accessors, or it will be completely ignored; in the very least, this + * is a formalization for deprecating fields. + */ + deprecated?: + | boolean + | undefined; + /** For Google-internal migration only. Do not use. */ + weak?: + | boolean + | undefined; + /** The parser stores options it doesn't recognize here. See above. */ + uninterpretedOption?: UninterpretedOption[] | undefined; } export enum FieldOptions_CType { - /** STRING - Default mode. */ - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - UNRECOGNIZED = -1, + /** STRING - Default mode. */ + STRING = 0, + CORD = 1, + STRING_PIECE = 2, + UNRECOGNIZED = -1, } export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_CType.UNRECOGNIZED; - } + switch (object) { + case 0: + case "STRING": + return FieldOptions_CType.STRING; + case 1: + case "CORD": + return FieldOptions_CType.CORD; + case 2: + case "STRING_PIECE": + return FieldOptions_CType.STRING_PIECE; + case -1: + case "UNRECOGNIZED": + default: + return FieldOptions_CType.UNRECOGNIZED; + } } export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - case FieldOptions_CType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } + switch (object) { + case FieldOptions_CType.STRING: + return "STRING"; + case FieldOptions_CType.CORD: + return "CORD"; + case FieldOptions_CType.STRING_PIECE: + return "STRING_PIECE"; + case FieldOptions_CType.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } } export enum FieldOptions_JSType { - /** JS_NORMAL - Use the default type. */ - JS_NORMAL = 0, - /** JS_STRING - Use JavaScript strings. */ - JS_STRING = 1, - /** JS_NUMBER - Use JavaScript numbers. */ - JS_NUMBER = 2, - UNRECOGNIZED = -1, + /** JS_NORMAL - Use the default type. */ + JS_NORMAL = 0, + /** JS_STRING - Use JavaScript strings. */ + JS_STRING = 1, + /** JS_NUMBER - Use JavaScript numbers. */ + JS_NUMBER = 2, + UNRECOGNIZED = -1, } export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_JSType.UNRECOGNIZED; - } + switch (object) { + case 0: + case "JS_NORMAL": + return FieldOptions_JSType.JS_NORMAL; + case 1: + case "JS_STRING": + return FieldOptions_JSType.JS_STRING; + case 2: + case "JS_NUMBER": + return FieldOptions_JSType.JS_NUMBER; + case -1: + case "UNRECOGNIZED": + default: + return FieldOptions_JSType.UNRECOGNIZED; + } } export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - case FieldOptions_JSType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } + switch (object) { + case FieldOptions_JSType.JS_NORMAL: + return "JS_NORMAL"; + case FieldOptions_JSType.JS_STRING: + return "JS_STRING"; + case FieldOptions_JSType.JS_NUMBER: + return "JS_NUMBER"; + case FieldOptions_JSType.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } } export interface OneofOptions { - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption?: UninterpretedOption[] | undefined; + /** The parser stores options it doesn't recognize here. See above. */ + uninterpretedOption?: UninterpretedOption[] | undefined; } export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - */ - allowAlias?: boolean | undefined; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - */ - deprecated?: boolean | undefined; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption?: UninterpretedOption[] | undefined; + /** + * Set this option to true to allow mapping different tag names to the same + * value. + */ + allowAlias?: + | boolean + | undefined; + /** + * Is this enum deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for the enum, or it will be completely ignored; in the very least, this + * is a formalization for deprecating enums. + */ + deprecated?: + | boolean + | undefined; + /** The parser stores options it doesn't recognize here. See above. */ + uninterpretedOption?: UninterpretedOption[] | undefined; } export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - */ - deprecated?: boolean | undefined; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption?: UninterpretedOption[] | undefined; + /** + * Is this enum value deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for the enum value, or it will be completely ignored; in the very least, + * this is a formalization for deprecating enum values. + */ + deprecated?: + | boolean + | undefined; + /** The parser stores options it doesn't recognize here. See above. */ + uninterpretedOption?: UninterpretedOption[] | undefined; } export interface ServiceOptions { - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - */ - deprecated?: boolean | undefined; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption?: UninterpretedOption[] | undefined; + /** + * Is this service deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for the service, or it will be completely ignored; in the very least, + * this is a formalization for deprecating services. + */ + deprecated?: + | boolean + | undefined; + /** The parser stores options it doesn't recognize here. See above. */ + uninterpretedOption?: UninterpretedOption[] | undefined; } export interface MethodOptions { - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - */ - deprecated?: boolean | undefined; - idempotencyLevel?: MethodOptions_IdempotencyLevel | undefined; - /** The parser stores options it doesn't recognize here. See above. */ - uninterpretedOption?: UninterpretedOption[] | undefined; + /** + * Is this method deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for the method, or it will be completely ignored; in the very least, + * this is a formalization for deprecating methods. + */ + deprecated?: boolean | undefined; + idempotencyLevel?: + | MethodOptions_IdempotencyLevel + | undefined; + /** The parser stores options it doesn't recognize here. See above. */ + uninterpretedOption?: UninterpretedOption[] | undefined; } /** @@ -888,48 +986,44 @@ export interface MethodOptions { * methods, and PUT verb for idempotent methods instead of the default POST. */ export enum MethodOptions_IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - /** NO_SIDE_EFFECTS - implies idempotent */ - NO_SIDE_EFFECTS = 1, - /** IDEMPOTENT - idempotent, but may have side effects */ - IDEMPOTENT = 2, - UNRECOGNIZED = -1, + IDEMPOTENCY_UNKNOWN = 0, + /** NO_SIDE_EFFECTS - implies idempotent */ + NO_SIDE_EFFECTS = 1, + /** IDEMPOTENT - idempotent, but may have side effects */ + IDEMPOTENT = 2, + UNRECOGNIZED = -1, } -export function methodOptions_IdempotencyLevelFromJSON( - object: any, -): MethodOptions_IdempotencyLevel { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - case -1: - case "UNRECOGNIZED": - default: - return MethodOptions_IdempotencyLevel.UNRECOGNIZED; - } +export function methodOptions_IdempotencyLevelFromJSON(object: any): MethodOptions_IdempotencyLevel { + switch (object) { + case 0: + case "IDEMPOTENCY_UNKNOWN": + return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; + case 1: + case "NO_SIDE_EFFECTS": + return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; + case 2: + case "IDEMPOTENT": + return MethodOptions_IdempotencyLevel.IDEMPOTENT; + case -1: + case "UNRECOGNIZED": + default: + return MethodOptions_IdempotencyLevel.UNRECOGNIZED; + } } -export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel, -): string { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - case MethodOptions_IdempotencyLevel.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } +export function methodOptions_IdempotencyLevelToJSON(object: MethodOptions_IdempotencyLevel): string { + switch (object) { + case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: + return "IDEMPOTENCY_UNKNOWN"; + case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: + return "NO_SIDE_EFFECTS"; + case MethodOptions_IdempotencyLevel.IDEMPOTENT: + return "IDEMPOTENT"; + case MethodOptions_IdempotencyLevel.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } } /** @@ -941,29 +1035,31 @@ export function methodOptions_IdempotencyLevelToJSON( * in them. */ export interface UninterpretedOption { - name?: UninterpretedOption_NamePart[] | undefined; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - */ - identifierValue?: string | undefined; - positiveIntValue?: number | undefined; - negativeIntValue?: number | undefined; - doubleValue?: number | undefined; - stringValue?: Uint8Array | undefined; - aggregateValue?: string | undefined; + name?: + | UninterpretedOption_NamePart[] + | undefined; + /** + * The value of the uninterpreted option, in whatever type the tokenizer + * identified it as during parsing. Exactly one of these should be set. + */ + identifierValue?: string | undefined; + positiveIntValue?: number | undefined; + negativeIntValue?: number | undefined; + doubleValue?: number | undefined; + stringValue?: Uint8Array | undefined; + aggregateValue?: string | undefined; } /** * The name of the uninterpreted option. Each string represents a segment in * a dot-separated name. is_extension is true iff a segment represents an * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - * "foo.(bar.baz).qux". + * E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents + * "foo.(bar.baz).moo". */ export interface UninterpretedOption_NamePart { - namePart?: string | undefined; - isExtension?: boolean | undefined; + namePart?: string | undefined; + isExtension?: boolean | undefined; } /** @@ -971,141 +1067,145 @@ export interface UninterpretedOption_NamePart { * FileDescriptorProto was generated. */ export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location?: SourceCodeInfo_Location[] | undefined; + /** + * A Location identifies a piece of source code in a .proto file which + * corresponds to a particular definition. This information is intended + * to be useful to IDEs, code indexers, documentation generators, and similar + * tools. + * + * For example, say we have a file like: + * message Foo { + * optional string foo = 1; + * } + * Let's look at just the field definition: + * optional string foo = 1; + * ^ ^^ ^^ ^ ^^^ + * a bc de f ghi + * We have the following locations: + * span path represents + * [a,i) [ 4, 0, 2, 0 ] The whole field definition. + * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). + * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). + * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). + * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). + * + * Notes: + * - A location may refer to a repeated field itself (i.e. not to any + * particular index within it). This is used whenever a set of elements are + * logically enclosed in a single code segment. For example, an entire + * extend block (possibly containing multiple extension definitions) will + * have an outer location whose path refers to the "extensions" repeated + * field without an index. + * - Multiple locations may have the same path. This happens when a single + * logical declaration is spread out across multiple places. The most + * obvious example is the "extend" block again -- there may be multiple + * extend blocks in the same scope, each of which will have the same path. + * - A location's span is not always a subset of its parent's span. For + * example, the "extendee" of an extension declaration appears at the + * beginning of the "extend" block and is shared by all extensions within + * the block. + * - Just because a location's span is a subset of some other location's span + * does not mean that it is a descendant. For example, a "group" defines + * both a type and a field in a single declaration. Thus, the locations + * corresponding to the type and field and their components will overlap. + * - Code which tries to interpret locations should probably be designed to + * ignore those that it doesn't understand, as more types of locations could + * be recorded in the future. + */ + location?: SourceCodeInfo_Location[] | undefined; } export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition occurs. - * For example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - */ - path?: number[] | undefined; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - */ - span?: number[] | undefined; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to qux. - * // - * // Another line attached to qux. - * optional double qux = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to qux or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. * / - * /* Block comment attached to - * * grault. * / - * optional int32 grault = 6; - * - * // ignored detached comments. - */ - leadingComments?: string | undefined; - trailingComments?: string | undefined; - leadingDetachedComments?: string[] | undefined; + /** + * Identifies which part of the FileDescriptorProto was defined at this + * location. + * + * Each element is a field number or an index. They form a path from + * the root FileDescriptorProto to the place where the definition occurs. + * For example, this path: + * [ 4, 3, 2, 7, 1 ] + * refers to: + * file.message_type(3) // 4, 3 + * .field(7) // 2, 7 + * .name() // 1 + * This is because FileDescriptorProto.message_type has field number 4: + * repeated DescriptorProto message_type = 4; + * and DescriptorProto.field has field number 2: + * repeated FieldDescriptorProto field = 2; + * and FieldDescriptorProto.name has field number 1: + * optional string name = 1; + * + * Thus, the above path gives the location of a field name. If we removed + * the last element: + * [ 4, 3, 2, 7 ] + * this path refers to the whole field declaration (from the beginning + * of the label to the terminating semicolon). + */ + path?: + | number[] + | undefined; + /** + * Always has exactly three or four elements: start line, start column, + * end line (optional, otherwise assumed same as start line), end column. + * These are packed into a single field for efficiency. Note that line + * and column numbers are zero-based -- typically you will want to add + * 1 to each before displaying to a user. + */ + span?: + | number[] + | undefined; + /** + * If this SourceCodeInfo represents a complete declaration, these are any + * comments appearing before and after the declaration which appear to be + * attached to the declaration. + * + * A series of line comments appearing on consecutive lines, with no other + * tokens appearing on those lines, will be treated as a single comment. + * + * leading_detached_comments will keep paragraphs of comments that appear + * before (but not connected to) the current element. Each paragraph, + * separated by empty lines, will be one comment element in the repeated + * field. + * + * Only the comment content is provided; comment markers (e.g. //) are + * stripped out. For block comments, leading whitespace and an asterisk + * will be stripped from the beginning of each line other than the first. + * Newlines are included in the output. + * + * Examples: + * + * optional int32 foo = 1; // Comment attached to foo. + * // Comment attached to bar. + * optional int32 bar = 2; + * + * optional string baz = 3; + * // Comment attached to baz. + * // Another line attached to baz. + * + * // Comment attached to moo. + * // + * // Another line attached to moo. + * optional double moo = 4; + * + * // Detached comment for corge. This is not leading or trailing comments + * // to moo or corge because there are blank lines separating it from + * // both. + * + * // Detached comment for corge paragraph 2. + * + * optional string corge = 5; + * /* Block comment attached + * * to corge. Leading asterisks + * * will be removed. * / + * /* Block comment attached to + * * grault. * / + * optional int32 grault = 6; + * + * // ignored detached comments. + */ + leadingComments?: string | undefined; + trailingComments?: string | undefined; + leadingDetachedComments?: string[] | undefined; } /** @@ -1114,4371 +1214,3462 @@ export interface SourceCodeInfo_Location { * source file, but may contain references to different source .proto files. */ export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - */ - annotation?: GeneratedCodeInfo_Annotation[] | undefined; + /** + * An Annotation connects some span of text in generated code to an element + * of its generating .proto file. + */ + annotation?: GeneratedCodeInfo_Annotation[] | undefined; } export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - */ - path?: number[] | undefined; - /** Identifies the filesystem path to the original source .proto. */ - sourceFile?: string | undefined; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - */ - begin?: number | undefined; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified offset. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - */ - end?: number | undefined; + /** + * Identifies the element in the original source .proto file. This field + * is formatted the same as SourceCodeInfo.Location.path. + */ + path?: + | number[] + | undefined; + /** Identifies the filesystem path to the original source .proto. */ + sourceFile?: + | string + | undefined; + /** + * Identifies the starting offset in bytes in the generated code + * that relates to the identified object. + */ + begin?: + | number + | undefined; + /** + * Identifies the ending offset in bytes in the generated code that + * relates to the identified offset. The end offset should be one past + * the last relevant byte (so the length of the text = end - begin). + */ + end?: number | undefined; } function createBaseFileDescriptorSet(): FileDescriptorSet { - return { file: [] }; + return { file: [] }; } export const FileDescriptorSet = { - encode( - message: FileDescriptorSet, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.file !== undefined && message.file.length !== 0) { - for (const v of message.file) { - FileDescriptorProto.encode( - v!, - writer.uint32(10).fork(), - ).ldelim(); - } - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): FileDescriptorSet { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFileDescriptorSet(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.file!.push( - FileDescriptorProto.decode(reader, reader.uint32()), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): FileDescriptorSet { - return { - file: Array.isArray(object?.file) - ? object.file.map((e: any) => FileDescriptorProto.fromJSON(e)) - : [], - }; - }, - - toJSON(message: FileDescriptorSet): unknown { - const obj: any = {}; - if (message.file?.length) { - obj.file = message.file.map((e) => FileDescriptorProto.toJSON(e)); - } - return obj; - }, - - create(base?: DeepPartial): FileDescriptorSet { - return FileDescriptorSet.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): FileDescriptorSet { - const message = createBaseFileDescriptorSet(); - message.file = - object.file?.map((e) => FileDescriptorProto.fromPartial(e)) || []; - return message; - }, + encode(message: FileDescriptorSet, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.file !== undefined && message.file.length !== 0) { + for (const v of message.file) { + FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); + } + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): FileDescriptorSet { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseFileDescriptorSet(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.file!.push(FileDescriptorProto.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): FileDescriptorSet { + return { file: Array.isArray(object?.file) ? object.file.map((e: any) => FileDescriptorProto.fromJSON(e)) : [] }; + }, + + toJSON(message: FileDescriptorSet): unknown { + const obj: any = {}; + if (message.file?.length) { + obj.file = message.file.map((e) => FileDescriptorProto.toJSON(e)); + } + return obj; + }, + + create(base?: DeepPartial): FileDescriptorSet { + return FileDescriptorSet.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): FileDescriptorSet { + const message = createBaseFileDescriptorSet(); + message.file = object.file?.map((e) => FileDescriptorProto.fromPartial(e)) || []; + return message; + }, }; function createBaseFileDescriptorProto(): FileDescriptorProto { - return { - name: "", - package: "", - dependency: [], - publicDependency: [], - weakDependency: [], - messageType: [], - enumType: [], - service: [], - extension: [], - options: undefined, - sourceCodeInfo: undefined, - syntax: "", - }; + return { + name: "", + package: "", + dependency: [], + publicDependency: [], + weakDependency: [], + messageType: [], + enumType: [], + service: [], + extension: [], + options: undefined, + sourceCodeInfo: undefined, + syntax: "", + }; } export const FileDescriptorProto = { - encode( - message: FileDescriptorProto, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.name !== undefined && message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.package !== undefined && message.package !== "") { - writer.uint32(18).string(message.package); - } - if ( - message.dependency !== undefined && - message.dependency.length !== 0 - ) { - for (const v of message.dependency) { - writer.uint32(26).string(v!); - } - } - if ( - message.publicDependency !== undefined && - message.publicDependency.length !== 0 - ) { - writer.uint32(82).fork(); - for (const v of message.publicDependency) { - writer.int32(v); - } - writer.ldelim(); - } - if ( - message.weakDependency !== undefined && - message.weakDependency.length !== 0 - ) { - writer.uint32(90).fork(); - for (const v of message.weakDependency) { - writer.int32(v); - } - writer.ldelim(); - } - if ( - message.messageType !== undefined && - message.messageType.length !== 0 - ) { - for (const v of message.messageType) { - DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); - } - } - if (message.enumType !== undefined && message.enumType.length !== 0) { - for (const v of message.enumType) { - EnumDescriptorProto.encode( - v!, - writer.uint32(42).fork(), - ).ldelim(); - } - } - if (message.service !== undefined && message.service.length !== 0) { - for (const v of message.service) { - ServiceDescriptorProto.encode( - v!, - writer.uint32(50).fork(), - ).ldelim(); - } - } - if (message.extension !== undefined && message.extension.length !== 0) { - for (const v of message.extension) { - FieldDescriptorProto.encode( - v!, - writer.uint32(58).fork(), - ).ldelim(); - } - } - if (message.options !== undefined) { - FileOptions.encode( - message.options, - writer.uint32(66).fork(), - ).ldelim(); - } - if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode( - message.sourceCodeInfo, - writer.uint32(74).fork(), - ).ldelim(); - } - if (message.syntax !== undefined && message.syntax !== "") { - writer.uint32(98).string(message.syntax); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): FileDescriptorProto { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFileDescriptorProto(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.name = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.package = reader.string(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.dependency!.push(reader.string()); - continue; - case 10: - if (tag === 80) { - message.publicDependency!.push(reader.int32()); - - continue; - } - - if (tag === 82) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.publicDependency!.push(reader.int32()); - } - - continue; - } - - break; - case 11: - if (tag === 88) { - message.weakDependency!.push(reader.int32()); - - continue; - } - - if (tag === 90) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.weakDependency!.push(reader.int32()); - } - - continue; - } - - break; - case 4: - if (tag !== 34) { - break; - } - - message.messageType!.push( - DescriptorProto.decode(reader, reader.uint32()), - ); - continue; - case 5: - if (tag !== 42) { - break; - } - - message.enumType!.push( - EnumDescriptorProto.decode(reader, reader.uint32()), - ); - continue; - case 6: - if (tag !== 50) { - break; - } - - message.service!.push( - ServiceDescriptorProto.decode(reader, reader.uint32()), - ); - continue; - case 7: - if (tag !== 58) { - break; - } - - message.extension!.push( - FieldDescriptorProto.decode(reader, reader.uint32()), - ); - continue; - case 8: - if (tag !== 66) { - break; - } - - message.options = FileOptions.decode( - reader, - reader.uint32(), - ); - continue; - case 9: - if (tag !== 74) { - break; - } - - message.sourceCodeInfo = SourceCodeInfo.decode( - reader, - reader.uint32(), - ); - continue; - case 12: - if (tag !== 98) { - break; - } - - message.syntax = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): FileDescriptorProto { - return { - name: isSet(object.name) ? String(object.name) : "", - package: isSet(object.package) ? String(object.package) : "", - dependency: Array.isArray(object?.dependency) - ? object.dependency.map((e: any) => String(e)) - : [], - publicDependency: Array.isArray(object?.publicDependency) - ? object.publicDependency.map((e: any) => Number(e)) - : [], - weakDependency: Array.isArray(object?.weakDependency) - ? object.weakDependency.map((e: any) => Number(e)) - : [], - messageType: Array.isArray(object?.messageType) - ? object.messageType.map((e: any) => - DescriptorProto.fromJSON(e), - ) - : [], - enumType: Array.isArray(object?.enumType) - ? object.enumType.map((e: any) => - EnumDescriptorProto.fromJSON(e), - ) - : [], - service: Array.isArray(object?.service) - ? object.service.map((e: any) => - ServiceDescriptorProto.fromJSON(e), - ) - : [], - extension: Array.isArray(object?.extension) - ? object.extension.map((e: any) => - FieldDescriptorProto.fromJSON(e), - ) - : [], - options: isSet(object.options) - ? FileOptions.fromJSON(object.options) - : undefined, - sourceCodeInfo: isSet(object.sourceCodeInfo) - ? SourceCodeInfo.fromJSON(object.sourceCodeInfo) - : undefined, - syntax: isSet(object.syntax) ? String(object.syntax) : "", - }; - }, - - toJSON(message: FileDescriptorProto): unknown { - const obj: any = {}; - if (message.name !== undefined && message.name !== "") { - obj.name = message.name; - } - if (message.package !== undefined && message.package !== "") { - obj.package = message.package; - } - if (message.dependency?.length) { - obj.dependency = message.dependency; - } - if (message.publicDependency?.length) { - obj.publicDependency = message.publicDependency.map((e) => - Math.round(e), - ); - } - if (message.weakDependency?.length) { - obj.weakDependency = message.weakDependency.map((e) => - Math.round(e), - ); - } - if (message.messageType?.length) { - obj.messageType = message.messageType.map((e) => - DescriptorProto.toJSON(e), - ); - } - if (message.enumType?.length) { - obj.enumType = message.enumType.map((e) => - EnumDescriptorProto.toJSON(e), - ); - } - if (message.service?.length) { - obj.service = message.service.map((e) => - ServiceDescriptorProto.toJSON(e), - ); - } - if (message.extension?.length) { - obj.extension = message.extension.map((e) => - FieldDescriptorProto.toJSON(e), - ); - } - if (message.options !== undefined) { - obj.options = FileOptions.toJSON(message.options); - } - if (message.sourceCodeInfo !== undefined) { - obj.sourceCodeInfo = SourceCodeInfo.toJSON(message.sourceCodeInfo); - } - if (message.syntax !== undefined && message.syntax !== "") { - obj.syntax = message.syntax; - } - return obj; - }, - - create(base?: DeepPartial): FileDescriptorProto { - return FileDescriptorProto.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): FileDescriptorProto { - const message = createBaseFileDescriptorProto(); - message.name = object.name ?? ""; - message.package = object.package ?? ""; - message.dependency = object.dependency?.map((e) => e) || []; - message.publicDependency = object.publicDependency?.map((e) => e) || []; - message.weakDependency = object.weakDependency?.map((e) => e) || []; - message.messageType = - object.messageType?.map((e) => DescriptorProto.fromPartial(e)) || - []; - message.enumType = - object.enumType?.map((e) => EnumDescriptorProto.fromPartial(e)) || - []; - message.service = - object.service?.map((e) => ServiceDescriptorProto.fromPartial(e)) || - []; - message.extension = - object.extension?.map((e) => FieldDescriptorProto.fromPartial(e)) || - []; - message.options = - object.options !== undefined && object.options !== null - ? FileOptions.fromPartial(object.options) - : undefined; - message.sourceCodeInfo = - object.sourceCodeInfo !== undefined && - object.sourceCodeInfo !== null - ? SourceCodeInfo.fromPartial(object.sourceCodeInfo) - : undefined; - message.syntax = object.syntax ?? ""; - return message; - }, -}; - -function createBaseDescriptorProto(): DescriptorProto { - return { - name: "", - field: [], - extension: [], - nestedType: [], - enumType: [], - extensionRange: [], - oneofDecl: [], - options: undefined, - reservedRange: [], - reservedName: [], - }; -} + encode(message: FileDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.name !== undefined && message.name !== "") { + writer.uint32(10).string(message.name); + } + if (message.package !== undefined && message.package !== "") { + writer.uint32(18).string(message.package); + } + if (message.dependency !== undefined && message.dependency.length !== 0) { + for (const v of message.dependency) { + writer.uint32(26).string(v!); + } + } + if (message.publicDependency !== undefined && message.publicDependency.length !== 0) { + writer.uint32(82).fork(); + for (const v of message.publicDependency) { + writer.int32(v); + } + writer.ldelim(); + } + if (message.weakDependency !== undefined && message.weakDependency.length !== 0) { + writer.uint32(90).fork(); + for (const v of message.weakDependency) { + writer.int32(v); + } + writer.ldelim(); + } + if (message.messageType !== undefined && message.messageType.length !== 0) { + for (const v of message.messageType) { + DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); + } + } + if (message.enumType !== undefined && message.enumType.length !== 0) { + for (const v of message.enumType) { + EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); + } + } + if (message.service !== undefined && message.service.length !== 0) { + for (const v of message.service) { + ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); + } + } + if (message.extension !== undefined && message.extension.length !== 0) { + for (const v of message.extension) { + FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); + } + } + if (message.options !== undefined) { + FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); + } + if (message.sourceCodeInfo !== undefined) { + SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(74).fork()).ldelim(); + } + if (message.syntax !== undefined && message.syntax !== "") { + writer.uint32(98).string(message.syntax); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): FileDescriptorProto { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseFileDescriptorProto(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } -export const DescriptorProto = { - encode( - message: DescriptorProto, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.name !== undefined && message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.field !== undefined && message.field.length !== 0) { - for (const v of message.field) { - FieldDescriptorProto.encode( - v!, - writer.uint32(18).fork(), - ).ldelim(); - } - } - if (message.extension !== undefined && message.extension.length !== 0) { - for (const v of message.extension) { - FieldDescriptorProto.encode( - v!, - writer.uint32(50).fork(), - ).ldelim(); - } - } - if ( - message.nestedType !== undefined && - message.nestedType.length !== 0 - ) { - for (const v of message.nestedType) { - DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); - } - } - if (message.enumType !== undefined && message.enumType.length !== 0) { - for (const v of message.enumType) { - EnumDescriptorProto.encode( - v!, - writer.uint32(34).fork(), - ).ldelim(); - } - } - if ( - message.extensionRange !== undefined && - message.extensionRange.length !== 0 - ) { - for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork(), - ).ldelim(); - } - } - if (message.oneofDecl !== undefined && message.oneofDecl.length !== 0) { - for (const v of message.oneofDecl) { - OneofDescriptorProto.encode( - v!, - writer.uint32(66).fork(), - ).ldelim(); - } - } - if (message.options !== undefined) { - MessageOptions.encode( - message.options, - writer.uint32(58).fork(), - ).ldelim(); - } - if ( - message.reservedRange !== undefined && - message.reservedRange.length !== 0 - ) { - for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork(), - ).ldelim(); - } - } - if ( - message.reservedName !== undefined && - message.reservedName.length !== 0 - ) { - for (const v of message.reservedName) { - writer.uint32(82).string(v!); - } - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): DescriptorProto { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDescriptorProto(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.name = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.field!.push( - FieldDescriptorProto.decode(reader, reader.uint32()), - ); - continue; - case 6: - if (tag !== 50) { - break; - } - - message.extension!.push( - FieldDescriptorProto.decode(reader, reader.uint32()), - ); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.nestedType!.push( - DescriptorProto.decode(reader, reader.uint32()), - ); - continue; - case 4: - if (tag !== 34) { - break; - } - - message.enumType!.push( - EnumDescriptorProto.decode(reader, reader.uint32()), - ); - continue; - case 5: - if (tag !== 42) { - break; - } - - message.extensionRange!.push( - DescriptorProto_ExtensionRange.decode( - reader, - reader.uint32(), - ), - ); - continue; - case 8: - if (tag !== 66) { - break; - } - - message.oneofDecl!.push( - OneofDescriptorProto.decode(reader, reader.uint32()), - ); - continue; - case 7: - if (tag !== 58) { - break; - } - - message.options = MessageOptions.decode( - reader, - reader.uint32(), - ); - continue; - case 9: - if (tag !== 74) { - break; - } - - message.reservedRange!.push( - DescriptorProto_ReservedRange.decode( - reader, - reader.uint32(), - ), - ); - continue; - case 10: - if (tag !== 82) { - break; - } - - message.reservedName!.push(reader.string()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): DescriptorProto { - return { - name: isSet(object.name) ? String(object.name) : "", - field: Array.isArray(object?.field) - ? object.field.map((e: any) => FieldDescriptorProto.fromJSON(e)) - : [], - extension: Array.isArray(object?.extension) - ? object.extension.map((e: any) => - FieldDescriptorProto.fromJSON(e), - ) - : [], - nestedType: Array.isArray(object?.nestedType) - ? object.nestedType.map((e: any) => DescriptorProto.fromJSON(e)) - : [], - enumType: Array.isArray(object?.enumType) - ? object.enumType.map((e: any) => - EnumDescriptorProto.fromJSON(e), - ) - : [], - extensionRange: Array.isArray(object?.extensionRange) - ? object.extensionRange.map((e: any) => - DescriptorProto_ExtensionRange.fromJSON(e), - ) - : [], - oneofDecl: Array.isArray(object?.oneofDecl) - ? object.oneofDecl.map((e: any) => - OneofDescriptorProto.fromJSON(e), - ) - : [], - options: isSet(object.options) - ? MessageOptions.fromJSON(object.options) - : undefined, - reservedRange: Array.isArray(object?.reservedRange) - ? object.reservedRange.map((e: any) => - DescriptorProto_ReservedRange.fromJSON(e), - ) - : [], - reservedName: Array.isArray(object?.reservedName) - ? object.reservedName.map((e: any) => String(e)) - : [], - }; - }, - - toJSON(message: DescriptorProto): unknown { - const obj: any = {}; - if (message.name !== undefined && message.name !== "") { - obj.name = message.name; - } - if (message.field?.length) { - obj.field = message.field.map((e) => - FieldDescriptorProto.toJSON(e), - ); - } - if (message.extension?.length) { - obj.extension = message.extension.map((e) => - FieldDescriptorProto.toJSON(e), - ); - } - if (message.nestedType?.length) { - obj.nestedType = message.nestedType.map((e) => - DescriptorProto.toJSON(e), - ); - } - if (message.enumType?.length) { - obj.enumType = message.enumType.map((e) => - EnumDescriptorProto.toJSON(e), - ); - } - if (message.extensionRange?.length) { - obj.extensionRange = message.extensionRange.map((e) => - DescriptorProto_ExtensionRange.toJSON(e), - ); - } - if (message.oneofDecl?.length) { - obj.oneofDecl = message.oneofDecl.map((e) => - OneofDescriptorProto.toJSON(e), - ); - } - if (message.options !== undefined) { - obj.options = MessageOptions.toJSON(message.options); - } - if (message.reservedRange?.length) { - obj.reservedRange = message.reservedRange.map((e) => - DescriptorProto_ReservedRange.toJSON(e), - ); - } - if (message.reservedName?.length) { - obj.reservedName = message.reservedName; - } - return obj; - }, - - create(base?: DeepPartial): DescriptorProto { - return DescriptorProto.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): DescriptorProto { - const message = createBaseDescriptorProto(); - message.name = object.name ?? ""; - message.field = - object.field?.map((e) => FieldDescriptorProto.fromPartial(e)) || []; - message.extension = - object.extension?.map((e) => FieldDescriptorProto.fromPartial(e)) || - []; - message.nestedType = - object.nestedType?.map((e) => DescriptorProto.fromPartial(e)) || []; - message.enumType = - object.enumType?.map((e) => EnumDescriptorProto.fromPartial(e)) || - []; - message.extensionRange = - object.extensionRange?.map((e) => - DescriptorProto_ExtensionRange.fromPartial(e), - ) || []; - message.oneofDecl = - object.oneofDecl?.map((e) => OneofDescriptorProto.fromPartial(e)) || - []; - message.options = - object.options !== undefined && object.options !== null - ? MessageOptions.fromPartial(object.options) - : undefined; - message.reservedRange = - object.reservedRange?.map((e) => - DescriptorProto_ReservedRange.fromPartial(e), - ) || []; - message.reservedName = object.reservedName?.map((e) => e) || []; - return message; - }, -}; + message.name = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } -function createBaseDescriptorProto_ExtensionRange(): DescriptorProto_ExtensionRange { - return { start: 0, end: 0, options: undefined }; -} + message.package = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } -export const DescriptorProto_ExtensionRange = { - encode( - message: DescriptorProto_ExtensionRange, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.start !== undefined && message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== undefined && message.end !== 0) { - writer.uint32(16).int32(message.end); - } - if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork(), - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): DescriptorProto_ExtensionRange { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDescriptorProto_ExtensionRange(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.start = reader.int32(); - continue; - case 2: - if (tag !== 16) { - break; - } - - message.end = reader.int32(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32(), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ExtensionRange { - return { - start: isSet(object.start) ? Number(object.start) : 0, - end: isSet(object.end) ? Number(object.end) : 0, - options: isSet(object.options) - ? ExtensionRangeOptions.fromJSON(object.options) - : undefined, - }; - }, - - toJSON(message: DescriptorProto_ExtensionRange): unknown { - const obj: any = {}; - if (message.start !== undefined && message.start !== 0) { - obj.start = Math.round(message.start); - } - if (message.end !== undefined && message.end !== 0) { - obj.end = Math.round(message.end); - } - if (message.options !== undefined) { - obj.options = ExtensionRangeOptions.toJSON(message.options); - } - return obj; - }, - - create( - base?: DeepPartial, - ): DescriptorProto_ExtensionRange { - return DescriptorProto_ExtensionRange.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): DescriptorProto_ExtensionRange { - const message = createBaseDescriptorProto_ExtensionRange(); - message.start = object.start ?? 0; - message.end = object.end ?? 0; - message.options = - object.options !== undefined && object.options !== null - ? ExtensionRangeOptions.fromPartial(object.options) - : undefined; - return message; - }, -}; + message.dependency!.push(reader.string()); + continue; + case 10: + if (tag === 80) { + message.publicDependency!.push(reader.int32()); -function createBaseDescriptorProto_ReservedRange(): DescriptorProto_ReservedRange { - return { start: 0, end: 0 }; -} + continue; + } -export const DescriptorProto_ReservedRange = { - encode( - message: DescriptorProto_ReservedRange, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.start !== undefined && message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== undefined && message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): DescriptorProto_ReservedRange { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDescriptorProto_ReservedRange(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.start = reader.int32(); - continue; - case 2: - if (tag !== 16) { - break; - } - - message.end = reader.int32(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; + if (tag === 82) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + message.publicDependency!.push(reader.int32()); } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): DescriptorProto_ReservedRange { - return { - start: isSet(object.start) ? Number(object.start) : 0, - end: isSet(object.end) ? Number(object.end) : 0, - }; - }, - - toJSON(message: DescriptorProto_ReservedRange): unknown { - const obj: any = {}; - if (message.start !== undefined && message.start !== 0) { - obj.start = Math.round(message.start); - } - if (message.end !== undefined && message.end !== 0) { - obj.end = Math.round(message.end); - } - return obj; - }, - - create( - base?: DeepPartial, - ): DescriptorProto_ReservedRange { - return DescriptorProto_ReservedRange.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): DescriptorProto_ReservedRange { - const message = createBaseDescriptorProto_ReservedRange(); - message.start = object.start ?? 0; - message.end = object.end ?? 0; - return message; - }, -}; -function createBaseExtensionRangeOptions(): ExtensionRangeOptions { - return { uninterpretedOption: [] }; -} + continue; + } -export const ExtensionRangeOptions = { - encode( - message: ExtensionRangeOptions, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if ( - message.uninterpretedOption !== undefined && - message.uninterpretedOption.length !== 0 - ) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode( - v!, - writer.uint32(7994).fork(), - ).ldelim(); - } - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): ExtensionRangeOptions { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseExtensionRangeOptions(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - if (tag !== 7994) { - break; - } - - message.uninterpretedOption!.push( - UninterpretedOption.decode(reader, reader.uint32()), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): ExtensionRangeOptions { - return { - uninterpretedOption: Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e: any) => - UninterpretedOption.fromJSON(e), - ) - : [], - }; - }, - - toJSON(message: ExtensionRangeOptions): unknown { - const obj: any = {}; - if (message.uninterpretedOption?.length) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - UninterpretedOption.toJSON(e), - ); - } - return obj; - }, - - create(base?: DeepPartial): ExtensionRangeOptions { - return ExtensionRangeOptions.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): ExtensionRangeOptions { - const message = createBaseExtensionRangeOptions(); - message.uninterpretedOption = - object.uninterpretedOption?.map((e) => - UninterpretedOption.fromPartial(e), - ) || []; - return message; - }, -}; + break; + case 11: + if (tag === 88) { + message.weakDependency!.push(reader.int32()); -function createBaseFieldDescriptorProto(): FieldDescriptorProto { - return { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", - options: undefined, - proto3Optional: false, - }; -} + continue; + } -export const FieldDescriptorProto = { - encode( - message: FieldDescriptorProto, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.name !== undefined && message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== undefined && message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== undefined && message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== undefined && message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.typeName !== undefined && message.typeName !== "") { - writer.uint32(50).string(message.typeName); - } - if (message.extendee !== undefined && message.extendee !== "") { - writer.uint32(18).string(message.extendee); - } - if (message.defaultValue !== undefined && message.defaultValue !== "") { - writer.uint32(58).string(message.defaultValue); - } - if (message.oneofIndex !== undefined && message.oneofIndex !== 0) { - writer.uint32(72).int32(message.oneofIndex); - } - if (message.jsonName !== undefined && message.jsonName !== "") { - writer.uint32(82).string(message.jsonName); - } - if (message.options !== undefined) { - FieldOptions.encode( - message.options, - writer.uint32(66).fork(), - ).ldelim(); - } - if (message.proto3Optional === true) { - writer.uint32(136).bool(message.proto3Optional); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): FieldDescriptorProto { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFieldDescriptorProto(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.name = reader.string(); - continue; - case 3: - if (tag !== 24) { - break; - } - - message.number = reader.int32(); - continue; - case 4: - if (tag !== 32) { - break; - } - - message.label = reader.int32() as any; - continue; - case 5: - if (tag !== 40) { - break; - } - - message.type = reader.int32() as any; - continue; - case 6: - if (tag !== 50) { - break; - } - - message.typeName = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.extendee = reader.string(); - continue; - case 7: - if (tag !== 58) { - break; - } - - message.defaultValue = reader.string(); - continue; - case 9: - if (tag !== 72) { - break; - } - - message.oneofIndex = reader.int32(); - continue; - case 10: - if (tag !== 82) { - break; - } - - message.jsonName = reader.string(); - continue; - case 8: - if (tag !== 66) { - break; - } - - message.options = FieldOptions.decode( - reader, - reader.uint32(), - ); - continue; - case 17: - if (tag !== 136) { - break; - } - - message.proto3Optional = reader.bool(); - continue; + if (tag === 90) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + message.weakDependency!.push(reader.int32()); } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): FieldDescriptorProto { - return { - name: isSet(object.name) ? String(object.name) : "", - number: isSet(object.number) ? Number(object.number) : 0, - label: isSet(object.label) - ? fieldDescriptorProto_LabelFromJSON(object.label) - : 1, - type: isSet(object.type) - ? fieldDescriptorProto_TypeFromJSON(object.type) - : 1, - typeName: isSet(object.typeName) ? String(object.typeName) : "", - extendee: isSet(object.extendee) ? String(object.extendee) : "", - defaultValue: isSet(object.defaultValue) - ? String(object.defaultValue) - : "", - oneofIndex: isSet(object.oneofIndex) - ? Number(object.oneofIndex) - : 0, - jsonName: isSet(object.jsonName) ? String(object.jsonName) : "", - options: isSet(object.options) - ? FieldOptions.fromJSON(object.options) - : undefined, - proto3Optional: isSet(object.proto3Optional) - ? Boolean(object.proto3Optional) - : false, - }; - }, - - toJSON(message: FieldDescriptorProto): unknown { - const obj: any = {}; - if (message.name !== undefined && message.name !== "") { - obj.name = message.name; - } - if (message.number !== undefined && message.number !== 0) { - obj.number = Math.round(message.number); - } - if (message.label !== undefined && message.label !== 1) { - obj.label = fieldDescriptorProto_LabelToJSON(message.label); - } - if (message.type !== undefined && message.type !== 1) { - obj.type = fieldDescriptorProto_TypeToJSON(message.type); - } - if (message.typeName !== undefined && message.typeName !== "") { - obj.typeName = message.typeName; - } - if (message.extendee !== undefined && message.extendee !== "") { - obj.extendee = message.extendee; - } - if (message.defaultValue !== undefined && message.defaultValue !== "") { - obj.defaultValue = message.defaultValue; - } - if (message.oneofIndex !== undefined && message.oneofIndex !== 0) { - obj.oneofIndex = Math.round(message.oneofIndex); - } - if (message.jsonName !== undefined && message.jsonName !== "") { - obj.jsonName = message.jsonName; - } - if (message.options !== undefined) { - obj.options = FieldOptions.toJSON(message.options); - } - if (message.proto3Optional === true) { - obj.proto3Optional = message.proto3Optional; - } - return obj; - }, - - create(base?: DeepPartial): FieldDescriptorProto { - return FieldDescriptorProto.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): FieldDescriptorProto { - const message = createBaseFieldDescriptorProto(); - message.name = object.name ?? ""; - message.number = object.number ?? 0; - message.label = object.label ?? 1; - message.type = object.type ?? 1; - message.typeName = object.typeName ?? ""; - message.extendee = object.extendee ?? ""; - message.defaultValue = object.defaultValue ?? ""; - message.oneofIndex = object.oneofIndex ?? 0; - message.jsonName = object.jsonName ?? ""; - message.options = - object.options !== undefined && object.options !== null - ? FieldOptions.fromPartial(object.options) - : undefined; - message.proto3Optional = object.proto3Optional ?? false; - return message; - }, -}; -function createBaseOneofDescriptorProto(): OneofDescriptorProto { - return { name: "", options: undefined }; -} + continue; + } -export const OneofDescriptorProto = { - encode( - message: OneofDescriptorProto, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.name !== undefined && message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.options !== undefined) { - OneofOptions.encode( - message.options, - writer.uint32(18).fork(), - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): OneofDescriptorProto { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseOneofDescriptorProto(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.name = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.options = OneofOptions.decode( - reader, - reader.uint32(), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): OneofDescriptorProto { - return { - name: isSet(object.name) ? String(object.name) : "", - options: isSet(object.options) - ? OneofOptions.fromJSON(object.options) - : undefined, - }; - }, - - toJSON(message: OneofDescriptorProto): unknown { - const obj: any = {}; - if (message.name !== undefined && message.name !== "") { - obj.name = message.name; - } - if (message.options !== undefined) { - obj.options = OneofOptions.toJSON(message.options); - } - return obj; - }, - - create(base?: DeepPartial): OneofDescriptorProto { - return OneofDescriptorProto.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): OneofDescriptorProto { - const message = createBaseOneofDescriptorProto(); - message.name = object.name ?? ""; - message.options = - object.options !== undefined && object.options !== null - ? OneofOptions.fromPartial(object.options) - : undefined; - return message; - }, -}; + break; + case 4: + if (tag !== 34) { + break; + } -function createBaseEnumDescriptorProto(): EnumDescriptorProto { - return { - name: "", - value: [], - options: undefined, - reservedRange: [], - reservedName: [], - }; -} + message.messageType!.push(DescriptorProto.decode(reader, reader.uint32())); + continue; + case 5: + if (tag !== 42) { + break; + } -export const EnumDescriptorProto = { - encode( - message: EnumDescriptorProto, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.name !== undefined && message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.value !== undefined && message.value.length !== 0) { - for (const v of message.value) { - EnumValueDescriptorProto.encode( - v!, - writer.uint32(18).fork(), - ).ldelim(); - } - } - if (message.options !== undefined) { - EnumOptions.encode( - message.options, - writer.uint32(26).fork(), - ).ldelim(); - } - if ( - message.reservedRange !== undefined && - message.reservedRange.length !== 0 - ) { - for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork(), - ).ldelim(); - } - } - if ( - message.reservedName !== undefined && - message.reservedName.length !== 0 - ) { - for (const v of message.reservedName) { - writer.uint32(42).string(v!); - } - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): EnumDescriptorProto { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEnumDescriptorProto(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.name = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.value!.push( - EnumValueDescriptorProto.decode( - reader, - reader.uint32(), - ), - ); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.options = EnumOptions.decode( - reader, - reader.uint32(), - ); - continue; - case 4: - if (tag !== 34) { - break; - } - - message.reservedRange!.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32(), - ), - ); - continue; - case 5: - if (tag !== 42) { - break; - } - - message.reservedName!.push(reader.string()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto { - return { - name: isSet(object.name) ? String(object.name) : "", - value: Array.isArray(object?.value) - ? object.value.map((e: any) => - EnumValueDescriptorProto.fromJSON(e), - ) - : [], - options: isSet(object.options) - ? EnumOptions.fromJSON(object.options) - : undefined, - reservedRange: Array.isArray(object?.reservedRange) - ? object.reservedRange.map((e: any) => - EnumDescriptorProto_EnumReservedRange.fromJSON(e), - ) - : [], - reservedName: Array.isArray(object?.reservedName) - ? object.reservedName.map((e: any) => String(e)) - : [], - }; - }, - - toJSON(message: EnumDescriptorProto): unknown { - const obj: any = {}; - if (message.name !== undefined && message.name !== "") { - obj.name = message.name; - } - if (message.value?.length) { - obj.value = message.value.map((e) => - EnumValueDescriptorProto.toJSON(e), - ); - } - if (message.options !== undefined) { - obj.options = EnumOptions.toJSON(message.options); - } - if (message.reservedRange?.length) { - obj.reservedRange = message.reservedRange.map((e) => - EnumDescriptorProto_EnumReservedRange.toJSON(e), - ); - } - if (message.reservedName?.length) { - obj.reservedName = message.reservedName; - } - return obj; - }, - - create(base?: DeepPartial): EnumDescriptorProto { - return EnumDescriptorProto.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): EnumDescriptorProto { - const message = createBaseEnumDescriptorProto(); - message.name = object.name ?? ""; - message.value = - object.value?.map((e) => EnumValueDescriptorProto.fromPartial(e)) || - []; - message.options = - object.options !== undefined && object.options !== null - ? EnumOptions.fromPartial(object.options) - : undefined; - message.reservedRange = - object.reservedRange?.map((e) => - EnumDescriptorProto_EnumReservedRange.fromPartial(e), - ) || []; - message.reservedName = object.reservedName?.map((e) => e) || []; - return message; - }, -}; + message.enumType!.push(EnumDescriptorProto.decode(reader, reader.uint32())); + continue; + case 6: + if (tag !== 50) { + break; + } -function createBaseEnumDescriptorProto_EnumReservedRange(): EnumDescriptorProto_EnumReservedRange { - return { start: 0, end: 0 }; -} + message.service!.push(ServiceDescriptorProto.decode(reader, reader.uint32())); + continue; + case 7: + if (tag !== 58) { + break; + } -export const EnumDescriptorProto_EnumReservedRange = { - encode( - message: EnumDescriptorProto_EnumReservedRange, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.start !== undefined && message.start !== 0) { - writer.uint32(8).int32(message.start); - } - if (message.end !== undefined && message.end !== 0) { - writer.uint32(16).int32(message.end); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): EnumDescriptorProto_EnumReservedRange { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEnumDescriptorProto_EnumReservedRange(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.start = reader.int32(); - continue; - case 2: - if (tag !== 16) { - break; - } - - message.end = reader.int32(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { - return { - start: isSet(object.start) ? Number(object.start) : 0, - end: isSet(object.end) ? Number(object.end) : 0, - }; - }, - - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { - const obj: any = {}; - if (message.start !== undefined && message.start !== 0) { - obj.start = Math.round(message.start); - } - if (message.end !== undefined && message.end !== 0) { - obj.end = Math.round(message.end); - } - return obj; - }, - - create( - base?: DeepPartial, - ): EnumDescriptorProto_EnumReservedRange { - return EnumDescriptorProto_EnumReservedRange.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): EnumDescriptorProto_EnumReservedRange { - const message = createBaseEnumDescriptorProto_EnumReservedRange(); - message.start = object.start ?? 0; - message.end = object.end ?? 0; - return message; - }, -}; + message.extension!.push(FieldDescriptorProto.decode(reader, reader.uint32())); + continue; + case 8: + if (tag !== 66) { + break; + } -function createBaseEnumValueDescriptorProto(): EnumValueDescriptorProto { - return { name: "", number: 0, options: undefined }; -} + message.options = FileOptions.decode(reader, reader.uint32()); + continue; + case 9: + if (tag !== 74) { + break; + } -export const EnumValueDescriptorProto = { - encode( - message: EnumValueDescriptorProto, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.name !== undefined && message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== undefined && message.number !== 0) { - writer.uint32(16).int32(message.number); - } - if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork(), - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): EnumValueDescriptorProto { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEnumValueDescriptorProto(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.name = reader.string(); - continue; - case 2: - if (tag !== 16) { - break; - } - - message.number = reader.int32(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.options = EnumValueOptions.decode( - reader, - reader.uint32(), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): EnumValueDescriptorProto { - return { - name: isSet(object.name) ? String(object.name) : "", - number: isSet(object.number) ? Number(object.number) : 0, - options: isSet(object.options) - ? EnumValueOptions.fromJSON(object.options) - : undefined, - }; - }, - - toJSON(message: EnumValueDescriptorProto): unknown { - const obj: any = {}; - if (message.name !== undefined && message.name !== "") { - obj.name = message.name; - } - if (message.number !== undefined && message.number !== 0) { - obj.number = Math.round(message.number); - } - if (message.options !== undefined) { - obj.options = EnumValueOptions.toJSON(message.options); - } - return obj; - }, - - create( - base?: DeepPartial, - ): EnumValueDescriptorProto { - return EnumValueDescriptorProto.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): EnumValueDescriptorProto { - const message = createBaseEnumValueDescriptorProto(); - message.name = object.name ?? ""; - message.number = object.number ?? 0; - message.options = - object.options !== undefined && object.options !== null - ? EnumValueOptions.fromPartial(object.options) - : undefined; - return message; - }, + message.sourceCodeInfo = SourceCodeInfo.decode(reader, reader.uint32()); + continue; + case 12: + if (tag !== 98) { + break; + } + + message.syntax = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): FileDescriptorProto { + return { + name: isSet(object.name) ? String(object.name) : "", + package: isSet(object.package) ? String(object.package) : "", + dependency: Array.isArray(object?.dependency) ? object.dependency.map((e: any) => String(e)) : [], + publicDependency: Array.isArray(object?.publicDependency) + ? object.publicDependency.map((e: any) => Number(e)) + : [], + weakDependency: Array.isArray(object?.weakDependency) ? object.weakDependency.map((e: any) => Number(e)) : [], + messageType: Array.isArray(object?.messageType) + ? object.messageType.map((e: any) => DescriptorProto.fromJSON(e)) + : [], + enumType: Array.isArray(object?.enumType) ? object.enumType.map((e: any) => EnumDescriptorProto.fromJSON(e)) : [], + service: Array.isArray(object?.service) ? object.service.map((e: any) => ServiceDescriptorProto.fromJSON(e)) : [], + extension: Array.isArray(object?.extension) + ? object.extension.map((e: any) => FieldDescriptorProto.fromJSON(e)) + : [], + options: isSet(object.options) ? FileOptions.fromJSON(object.options) : undefined, + sourceCodeInfo: isSet(object.sourceCodeInfo) ? SourceCodeInfo.fromJSON(object.sourceCodeInfo) : undefined, + syntax: isSet(object.syntax) ? String(object.syntax) : "", + }; + }, + + toJSON(message: FileDescriptorProto): unknown { + const obj: any = {}; + if (message.name !== undefined && message.name !== "") { + obj.name = message.name; + } + if (message.package !== undefined && message.package !== "") { + obj.package = message.package; + } + if (message.dependency?.length) { + obj.dependency = message.dependency; + } + if (message.publicDependency?.length) { + obj.publicDependency = message.publicDependency.map((e) => Math.round(e)); + } + if (message.weakDependency?.length) { + obj.weakDependency = message.weakDependency.map((e) => Math.round(e)); + } + if (message.messageType?.length) { + obj.messageType = message.messageType.map((e) => DescriptorProto.toJSON(e)); + } + if (message.enumType?.length) { + obj.enumType = message.enumType.map((e) => EnumDescriptorProto.toJSON(e)); + } + if (message.service?.length) { + obj.service = message.service.map((e) => ServiceDescriptorProto.toJSON(e)); + } + if (message.extension?.length) { + obj.extension = message.extension.map((e) => FieldDescriptorProto.toJSON(e)); + } + if (message.options !== undefined) { + obj.options = FileOptions.toJSON(message.options); + } + if (message.sourceCodeInfo !== undefined) { + obj.sourceCodeInfo = SourceCodeInfo.toJSON(message.sourceCodeInfo); + } + if (message.syntax !== undefined && message.syntax !== "") { + obj.syntax = message.syntax; + } + return obj; + }, + + create(base?: DeepPartial): FileDescriptorProto { + return FileDescriptorProto.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): FileDescriptorProto { + const message = createBaseFileDescriptorProto(); + message.name = object.name ?? ""; + message.package = object.package ?? ""; + message.dependency = object.dependency?.map((e) => e) || []; + message.publicDependency = object.publicDependency?.map((e) => e) || []; + message.weakDependency = object.weakDependency?.map((e) => e) || []; + message.messageType = object.messageType?.map((e) => DescriptorProto.fromPartial(e)) || []; + message.enumType = object.enumType?.map((e) => EnumDescriptorProto.fromPartial(e)) || []; + message.service = object.service?.map((e) => ServiceDescriptorProto.fromPartial(e)) || []; + message.extension = object.extension?.map((e) => FieldDescriptorProto.fromPartial(e)) || []; + message.options = (object.options !== undefined && object.options !== null) + ? FileOptions.fromPartial(object.options) + : undefined; + message.sourceCodeInfo = (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) + ? SourceCodeInfo.fromPartial(object.sourceCodeInfo) + : undefined; + message.syntax = object.syntax ?? ""; + return message; + }, +}; + +function createBaseDescriptorProto(): DescriptorProto { + return { + name: "", + field: [], + extension: [], + nestedType: [], + enumType: [], + extensionRange: [], + oneofDecl: [], + options: undefined, + reservedRange: [], + reservedName: [], + }; +} + +export const DescriptorProto = { + encode(message: DescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.name !== undefined && message.name !== "") { + writer.uint32(10).string(message.name); + } + if (message.field !== undefined && message.field.length !== 0) { + for (const v of message.field) { + FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); + } + } + if (message.extension !== undefined && message.extension.length !== 0) { + for (const v of message.extension) { + FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); + } + } + if (message.nestedType !== undefined && message.nestedType.length !== 0) { + for (const v of message.nestedType) { + DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); + } + } + if (message.enumType !== undefined && message.enumType.length !== 0) { + for (const v of message.enumType) { + EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); + } + } + if (message.extensionRange !== undefined && message.extensionRange.length !== 0) { + for (const v of message.extensionRange) { + DescriptorProto_ExtensionRange.encode(v!, writer.uint32(42).fork()).ldelim(); + } + } + if (message.oneofDecl !== undefined && message.oneofDecl.length !== 0) { + for (const v of message.oneofDecl) { + OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); + } + } + if (message.options !== undefined) { + MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); + } + if (message.reservedRange !== undefined && message.reservedRange.length !== 0) { + for (const v of message.reservedRange) { + DescriptorProto_ReservedRange.encode(v!, writer.uint32(74).fork()).ldelim(); + } + } + if (message.reservedName !== undefined && message.reservedName.length !== 0) { + for (const v of message.reservedName) { + writer.uint32(82).string(v!); + } + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): DescriptorProto { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseDescriptorProto(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.name = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.field!.push(FieldDescriptorProto.decode(reader, reader.uint32())); + continue; + case 6: + if (tag !== 50) { + break; + } + + message.extension!.push(FieldDescriptorProto.decode(reader, reader.uint32())); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.nestedType!.push(DescriptorProto.decode(reader, reader.uint32())); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.enumType!.push(EnumDescriptorProto.decode(reader, reader.uint32())); + continue; + case 5: + if (tag !== 42) { + break; + } + + message.extensionRange!.push(DescriptorProto_ExtensionRange.decode(reader, reader.uint32())); + continue; + case 8: + if (tag !== 66) { + break; + } + + message.oneofDecl!.push(OneofDescriptorProto.decode(reader, reader.uint32())); + continue; + case 7: + if (tag !== 58) { + break; + } + + message.options = MessageOptions.decode(reader, reader.uint32()); + continue; + case 9: + if (tag !== 74) { + break; + } + + message.reservedRange!.push(DescriptorProto_ReservedRange.decode(reader, reader.uint32())); + continue; + case 10: + if (tag !== 82) { + break; + } + + message.reservedName!.push(reader.string()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): DescriptorProto { + return { + name: isSet(object.name) ? String(object.name) : "", + field: Array.isArray(object?.field) ? object.field.map((e: any) => FieldDescriptorProto.fromJSON(e)) : [], + extension: Array.isArray(object?.extension) + ? object.extension.map((e: any) => FieldDescriptorProto.fromJSON(e)) + : [], + nestedType: Array.isArray(object?.nestedType) + ? object.nestedType.map((e: any) => DescriptorProto.fromJSON(e)) + : [], + enumType: Array.isArray(object?.enumType) ? object.enumType.map((e: any) => EnumDescriptorProto.fromJSON(e)) : [], + extensionRange: Array.isArray(object?.extensionRange) + ? object.extensionRange.map((e: any) => DescriptorProto_ExtensionRange.fromJSON(e)) + : [], + oneofDecl: Array.isArray(object?.oneofDecl) + ? object.oneofDecl.map((e: any) => OneofDescriptorProto.fromJSON(e)) + : [], + options: isSet(object.options) ? MessageOptions.fromJSON(object.options) : undefined, + reservedRange: Array.isArray(object?.reservedRange) + ? object.reservedRange.map((e: any) => DescriptorProto_ReservedRange.fromJSON(e)) + : [], + reservedName: Array.isArray(object?.reservedName) ? object.reservedName.map((e: any) => String(e)) : [], + }; + }, + + toJSON(message: DescriptorProto): unknown { + const obj: any = {}; + if (message.name !== undefined && message.name !== "") { + obj.name = message.name; + } + if (message.field?.length) { + obj.field = message.field.map((e) => FieldDescriptorProto.toJSON(e)); + } + if (message.extension?.length) { + obj.extension = message.extension.map((e) => FieldDescriptorProto.toJSON(e)); + } + if (message.nestedType?.length) { + obj.nestedType = message.nestedType.map((e) => DescriptorProto.toJSON(e)); + } + if (message.enumType?.length) { + obj.enumType = message.enumType.map((e) => EnumDescriptorProto.toJSON(e)); + } + if (message.extensionRange?.length) { + obj.extensionRange = message.extensionRange.map((e) => DescriptorProto_ExtensionRange.toJSON(e)); + } + if (message.oneofDecl?.length) { + obj.oneofDecl = message.oneofDecl.map((e) => OneofDescriptorProto.toJSON(e)); + } + if (message.options !== undefined) { + obj.options = MessageOptions.toJSON(message.options); + } + if (message.reservedRange?.length) { + obj.reservedRange = message.reservedRange.map((e) => DescriptorProto_ReservedRange.toJSON(e)); + } + if (message.reservedName?.length) { + obj.reservedName = message.reservedName; + } + return obj; + }, + + create(base?: DeepPartial): DescriptorProto { + return DescriptorProto.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): DescriptorProto { + const message = createBaseDescriptorProto(); + message.name = object.name ?? ""; + message.field = object.field?.map((e) => FieldDescriptorProto.fromPartial(e)) || []; + message.extension = object.extension?.map((e) => FieldDescriptorProto.fromPartial(e)) || []; + message.nestedType = object.nestedType?.map((e) => DescriptorProto.fromPartial(e)) || []; + message.enumType = object.enumType?.map((e) => EnumDescriptorProto.fromPartial(e)) || []; + message.extensionRange = object.extensionRange?.map((e) => DescriptorProto_ExtensionRange.fromPartial(e)) || []; + message.oneofDecl = object.oneofDecl?.map((e) => OneofDescriptorProto.fromPartial(e)) || []; + message.options = (object.options !== undefined && object.options !== null) + ? MessageOptions.fromPartial(object.options) + : undefined; + message.reservedRange = object.reservedRange?.map((e) => DescriptorProto_ReservedRange.fromPartial(e)) || []; + message.reservedName = object.reservedName?.map((e) => e) || []; + return message; + }, +}; + +function createBaseDescriptorProto_ExtensionRange(): DescriptorProto_ExtensionRange { + return { start: 0, end: 0, options: undefined }; +} + +export const DescriptorProto_ExtensionRange = { + encode(message: DescriptorProto_ExtensionRange, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.start !== undefined && message.start !== 0) { + writer.uint32(8).int32(message.start); + } + if (message.end !== undefined && message.end !== 0) { + writer.uint32(16).int32(message.end); + } + if (message.options !== undefined) { + ExtensionRangeOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): DescriptorProto_ExtensionRange { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseDescriptorProto_ExtensionRange(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.start = reader.int32(); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.end = reader.int32(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.options = ExtensionRangeOptions.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): DescriptorProto_ExtensionRange { + return { + start: isSet(object.start) ? Number(object.start) : 0, + end: isSet(object.end) ? Number(object.end) : 0, + options: isSet(object.options) ? ExtensionRangeOptions.fromJSON(object.options) : undefined, + }; + }, + + toJSON(message: DescriptorProto_ExtensionRange): unknown { + const obj: any = {}; + if (message.start !== undefined && message.start !== 0) { + obj.start = Math.round(message.start); + } + if (message.end !== undefined && message.end !== 0) { + obj.end = Math.round(message.end); + } + if (message.options !== undefined) { + obj.options = ExtensionRangeOptions.toJSON(message.options); + } + return obj; + }, + + create(base?: DeepPartial): DescriptorProto_ExtensionRange { + return DescriptorProto_ExtensionRange.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): DescriptorProto_ExtensionRange { + const message = createBaseDescriptorProto_ExtensionRange(); + message.start = object.start ?? 0; + message.end = object.end ?? 0; + message.options = (object.options !== undefined && object.options !== null) + ? ExtensionRangeOptions.fromPartial(object.options) + : undefined; + return message; + }, +}; + +function createBaseDescriptorProto_ReservedRange(): DescriptorProto_ReservedRange { + return { start: 0, end: 0 }; +} + +export const DescriptorProto_ReservedRange = { + encode(message: DescriptorProto_ReservedRange, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.start !== undefined && message.start !== 0) { + writer.uint32(8).int32(message.start); + } + if (message.end !== undefined && message.end !== 0) { + writer.uint32(16).int32(message.end); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): DescriptorProto_ReservedRange { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseDescriptorProto_ReservedRange(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.start = reader.int32(); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.end = reader.int32(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): DescriptorProto_ReservedRange { + return { start: isSet(object.start) ? Number(object.start) : 0, end: isSet(object.end) ? Number(object.end) : 0 }; + }, + + toJSON(message: DescriptorProto_ReservedRange): unknown { + const obj: any = {}; + if (message.start !== undefined && message.start !== 0) { + obj.start = Math.round(message.start); + } + if (message.end !== undefined && message.end !== 0) { + obj.end = Math.round(message.end); + } + return obj; + }, + + create(base?: DeepPartial): DescriptorProto_ReservedRange { + return DescriptorProto_ReservedRange.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): DescriptorProto_ReservedRange { + const message = createBaseDescriptorProto_ReservedRange(); + message.start = object.start ?? 0; + message.end = object.end ?? 0; + return message; + }, +}; + +function createBaseExtensionRangeOptions(): ExtensionRangeOptions { + return { uninterpretedOption: [] }; +} + +export const ExtensionRangeOptions = { + encode(message: ExtensionRangeOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.uninterpretedOption !== undefined && message.uninterpretedOption.length !== 0) { + for (const v of message.uninterpretedOption) { + UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); + } + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ExtensionRangeOptions { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseExtensionRangeOptions(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 999: + if (tag !== 7994) { + break; + } + + message.uninterpretedOption!.push(UninterpretedOption.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): ExtensionRangeOptions { + return { + uninterpretedOption: Array.isArray(object?.uninterpretedOption) + ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) + : [], + }; + }, + + toJSON(message: ExtensionRangeOptions): unknown { + const obj: any = {}; + if (message.uninterpretedOption?.length) { + obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e)); + } + return obj; + }, + + create(base?: DeepPartial): ExtensionRangeOptions { + return ExtensionRangeOptions.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): ExtensionRangeOptions { + const message = createBaseExtensionRangeOptions(); + message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || []; + return message; + }, +}; + +function createBaseFieldDescriptorProto(): FieldDescriptorProto { + return { + name: "", + number: 0, + label: 1, + type: 1, + typeName: "", + extendee: "", + defaultValue: "", + oneofIndex: 0, + jsonName: "", + options: undefined, + proto3Optional: false, + }; +} + +export const FieldDescriptorProto = { + encode(message: FieldDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.name !== undefined && message.name !== "") { + writer.uint32(10).string(message.name); + } + if (message.number !== undefined && message.number !== 0) { + writer.uint32(24).int32(message.number); + } + if (message.label !== undefined && message.label !== 1) { + writer.uint32(32).int32(message.label); + } + if (message.type !== undefined && message.type !== 1) { + writer.uint32(40).int32(message.type); + } + if (message.typeName !== undefined && message.typeName !== "") { + writer.uint32(50).string(message.typeName); + } + if (message.extendee !== undefined && message.extendee !== "") { + writer.uint32(18).string(message.extendee); + } + if (message.defaultValue !== undefined && message.defaultValue !== "") { + writer.uint32(58).string(message.defaultValue); + } + if (message.oneofIndex !== undefined && message.oneofIndex !== 0) { + writer.uint32(72).int32(message.oneofIndex); + } + if (message.jsonName !== undefined && message.jsonName !== "") { + writer.uint32(82).string(message.jsonName); + } + if (message.options !== undefined) { + FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); + } + if (message.proto3Optional === true) { + writer.uint32(136).bool(message.proto3Optional); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): FieldDescriptorProto { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseFieldDescriptorProto(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.name = reader.string(); + continue; + case 3: + if (tag !== 24) { + break; + } + + message.number = reader.int32(); + continue; + case 4: + if (tag !== 32) { + break; + } + + message.label = reader.int32() as any; + continue; + case 5: + if (tag !== 40) { + break; + } + + message.type = reader.int32() as any; + continue; + case 6: + if (tag !== 50) { + break; + } + + message.typeName = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.extendee = reader.string(); + continue; + case 7: + if (tag !== 58) { + break; + } + + message.defaultValue = reader.string(); + continue; + case 9: + if (tag !== 72) { + break; + } + + message.oneofIndex = reader.int32(); + continue; + case 10: + if (tag !== 82) { + break; + } + + message.jsonName = reader.string(); + continue; + case 8: + if (tag !== 66) { + break; + } + + message.options = FieldOptions.decode(reader, reader.uint32()); + continue; + case 17: + if (tag !== 136) { + break; + } + + message.proto3Optional = reader.bool(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): FieldDescriptorProto { + return { + name: isSet(object.name) ? String(object.name) : "", + number: isSet(object.number) ? Number(object.number) : 0, + label: isSet(object.label) ? fieldDescriptorProto_LabelFromJSON(object.label) : 1, + type: isSet(object.type) ? fieldDescriptorProto_TypeFromJSON(object.type) : 1, + typeName: isSet(object.typeName) ? String(object.typeName) : "", + extendee: isSet(object.extendee) ? String(object.extendee) : "", + defaultValue: isSet(object.defaultValue) ? String(object.defaultValue) : "", + oneofIndex: isSet(object.oneofIndex) ? Number(object.oneofIndex) : 0, + jsonName: isSet(object.jsonName) ? String(object.jsonName) : "", + options: isSet(object.options) ? FieldOptions.fromJSON(object.options) : undefined, + proto3Optional: isSet(object.proto3Optional) ? Boolean(object.proto3Optional) : false, + }; + }, + + toJSON(message: FieldDescriptorProto): unknown { + const obj: any = {}; + if (message.name !== undefined && message.name !== "") { + obj.name = message.name; + } + if (message.number !== undefined && message.number !== 0) { + obj.number = Math.round(message.number); + } + if (message.label !== undefined && message.label !== 1) { + obj.label = fieldDescriptorProto_LabelToJSON(message.label); + } + if (message.type !== undefined && message.type !== 1) { + obj.type = fieldDescriptorProto_TypeToJSON(message.type); + } + if (message.typeName !== undefined && message.typeName !== "") { + obj.typeName = message.typeName; + } + if (message.extendee !== undefined && message.extendee !== "") { + obj.extendee = message.extendee; + } + if (message.defaultValue !== undefined && message.defaultValue !== "") { + obj.defaultValue = message.defaultValue; + } + if (message.oneofIndex !== undefined && message.oneofIndex !== 0) { + obj.oneofIndex = Math.round(message.oneofIndex); + } + if (message.jsonName !== undefined && message.jsonName !== "") { + obj.jsonName = message.jsonName; + } + if (message.options !== undefined) { + obj.options = FieldOptions.toJSON(message.options); + } + if (message.proto3Optional === true) { + obj.proto3Optional = message.proto3Optional; + } + return obj; + }, + + create(base?: DeepPartial): FieldDescriptorProto { + return FieldDescriptorProto.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): FieldDescriptorProto { + const message = createBaseFieldDescriptorProto(); + message.name = object.name ?? ""; + message.number = object.number ?? 0; + message.label = object.label ?? 1; + message.type = object.type ?? 1; + message.typeName = object.typeName ?? ""; + message.extendee = object.extendee ?? ""; + message.defaultValue = object.defaultValue ?? ""; + message.oneofIndex = object.oneofIndex ?? 0; + message.jsonName = object.jsonName ?? ""; + message.options = (object.options !== undefined && object.options !== null) + ? FieldOptions.fromPartial(object.options) + : undefined; + message.proto3Optional = object.proto3Optional ?? false; + return message; + }, +}; + +function createBaseOneofDescriptorProto(): OneofDescriptorProto { + return { name: "", options: undefined }; +} + +export const OneofDescriptorProto = { + encode(message: OneofDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.name !== undefined && message.name !== "") { + writer.uint32(10).string(message.name); + } + if (message.options !== undefined) { + OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): OneofDescriptorProto { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseOneofDescriptorProto(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.name = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.options = OneofOptions.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): OneofDescriptorProto { + return { + name: isSet(object.name) ? String(object.name) : "", + options: isSet(object.options) ? OneofOptions.fromJSON(object.options) : undefined, + }; + }, + + toJSON(message: OneofDescriptorProto): unknown { + const obj: any = {}; + if (message.name !== undefined && message.name !== "") { + obj.name = message.name; + } + if (message.options !== undefined) { + obj.options = OneofOptions.toJSON(message.options); + } + return obj; + }, + + create(base?: DeepPartial): OneofDescriptorProto { + return OneofDescriptorProto.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): OneofDescriptorProto { + const message = createBaseOneofDescriptorProto(); + message.name = object.name ?? ""; + message.options = (object.options !== undefined && object.options !== null) + ? OneofOptions.fromPartial(object.options) + : undefined; + return message; + }, +}; + +function createBaseEnumDescriptorProto(): EnumDescriptorProto { + return { name: "", value: [], options: undefined, reservedRange: [], reservedName: [] }; +} + +export const EnumDescriptorProto = { + encode(message: EnumDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.name !== undefined && message.name !== "") { + writer.uint32(10).string(message.name); + } + if (message.value !== undefined && message.value.length !== 0) { + for (const v of message.value) { + EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); + } + } + if (message.options !== undefined) { + EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); + } + if (message.reservedRange !== undefined && message.reservedRange.length !== 0) { + for (const v of message.reservedRange) { + EnumDescriptorProto_EnumReservedRange.encode(v!, writer.uint32(34).fork()).ldelim(); + } + } + if (message.reservedName !== undefined && message.reservedName.length !== 0) { + for (const v of message.reservedName) { + writer.uint32(42).string(v!); + } + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): EnumDescriptorProto { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseEnumDescriptorProto(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.name = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.value!.push(EnumValueDescriptorProto.decode(reader, reader.uint32())); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.options = EnumOptions.decode(reader, reader.uint32()); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.reservedRange!.push(EnumDescriptorProto_EnumReservedRange.decode(reader, reader.uint32())); + continue; + case 5: + if (tag !== 42) { + break; + } + + message.reservedName!.push(reader.string()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): EnumDescriptorProto { + return { + name: isSet(object.name) ? String(object.name) : "", + value: Array.isArray(object?.value) ? object.value.map((e: any) => EnumValueDescriptorProto.fromJSON(e)) : [], + options: isSet(object.options) ? EnumOptions.fromJSON(object.options) : undefined, + reservedRange: Array.isArray(object?.reservedRange) + ? object.reservedRange.map((e: any) => EnumDescriptorProto_EnumReservedRange.fromJSON(e)) + : [], + reservedName: Array.isArray(object?.reservedName) ? object.reservedName.map((e: any) => String(e)) : [], + }; + }, + + toJSON(message: EnumDescriptorProto): unknown { + const obj: any = {}; + if (message.name !== undefined && message.name !== "") { + obj.name = message.name; + } + if (message.value?.length) { + obj.value = message.value.map((e) => EnumValueDescriptorProto.toJSON(e)); + } + if (message.options !== undefined) { + obj.options = EnumOptions.toJSON(message.options); + } + if (message.reservedRange?.length) { + obj.reservedRange = message.reservedRange.map((e) => EnumDescriptorProto_EnumReservedRange.toJSON(e)); + } + if (message.reservedName?.length) { + obj.reservedName = message.reservedName; + } + return obj; + }, + + create(base?: DeepPartial): EnumDescriptorProto { + return EnumDescriptorProto.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): EnumDescriptorProto { + const message = createBaseEnumDescriptorProto(); + message.name = object.name ?? ""; + message.value = object.value?.map((e) => EnumValueDescriptorProto.fromPartial(e)) || []; + message.options = (object.options !== undefined && object.options !== null) + ? EnumOptions.fromPartial(object.options) + : undefined; + message.reservedRange = object.reservedRange?.map((e) => EnumDescriptorProto_EnumReservedRange.fromPartial(e)) || + []; + message.reservedName = object.reservedName?.map((e) => e) || []; + return message; + }, +}; + +function createBaseEnumDescriptorProto_EnumReservedRange(): EnumDescriptorProto_EnumReservedRange { + return { start: 0, end: 0 }; +} + +export const EnumDescriptorProto_EnumReservedRange = { + encode(message: EnumDescriptorProto_EnumReservedRange, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.start !== undefined && message.start !== 0) { + writer.uint32(8).int32(message.start); + } + if (message.end !== undefined && message.end !== 0) { + writer.uint32(16).int32(message.end); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): EnumDescriptorProto_EnumReservedRange { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseEnumDescriptorProto_EnumReservedRange(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.start = reader.int32(); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.end = reader.int32(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { + return { start: isSet(object.start) ? Number(object.start) : 0, end: isSet(object.end) ? Number(object.end) : 0 }; + }, + + toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { + const obj: any = {}; + if (message.start !== undefined && message.start !== 0) { + obj.start = Math.round(message.start); + } + if (message.end !== undefined && message.end !== 0) { + obj.end = Math.round(message.end); + } + return obj; + }, + + create(base?: DeepPartial): EnumDescriptorProto_EnumReservedRange { + return EnumDescriptorProto_EnumReservedRange.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): EnumDescriptorProto_EnumReservedRange { + const message = createBaseEnumDescriptorProto_EnumReservedRange(); + message.start = object.start ?? 0; + message.end = object.end ?? 0; + return message; + }, +}; + +function createBaseEnumValueDescriptorProto(): EnumValueDescriptorProto { + return { name: "", number: 0, options: undefined }; +} + +export const EnumValueDescriptorProto = { + encode(message: EnumValueDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.name !== undefined && message.name !== "") { + writer.uint32(10).string(message.name); + } + if (message.number !== undefined && message.number !== 0) { + writer.uint32(16).int32(message.number); + } + if (message.options !== undefined) { + EnumValueOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): EnumValueDescriptorProto { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseEnumValueDescriptorProto(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.name = reader.string(); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.number = reader.int32(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.options = EnumValueOptions.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): EnumValueDescriptorProto { + return { + name: isSet(object.name) ? String(object.name) : "", + number: isSet(object.number) ? Number(object.number) : 0, + options: isSet(object.options) ? EnumValueOptions.fromJSON(object.options) : undefined, + }; + }, + + toJSON(message: EnumValueDescriptorProto): unknown { + const obj: any = {}; + if (message.name !== undefined && message.name !== "") { + obj.name = message.name; + } + if (message.number !== undefined && message.number !== 0) { + obj.number = Math.round(message.number); + } + if (message.options !== undefined) { + obj.options = EnumValueOptions.toJSON(message.options); + } + return obj; + }, + + create(base?: DeepPartial): EnumValueDescriptorProto { + return EnumValueDescriptorProto.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): EnumValueDescriptorProto { + const message = createBaseEnumValueDescriptorProto(); + message.name = object.name ?? ""; + message.number = object.number ?? 0; + message.options = (object.options !== undefined && object.options !== null) + ? EnumValueOptions.fromPartial(object.options) + : undefined; + return message; + }, }; function createBaseServiceDescriptorProto(): ServiceDescriptorProto { - return { name: "", method: [], options: undefined }; + return { name: "", method: [], options: undefined }; } export const ServiceDescriptorProto = { - encode( - message: ServiceDescriptorProto, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.name !== undefined && message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.method !== undefined && message.method.length !== 0) { - for (const v of message.method) { - MethodDescriptorProto.encode( - v!, - writer.uint32(18).fork(), - ).ldelim(); - } - } - if (message.options !== undefined) { - ServiceOptions.encode( - message.options, - writer.uint32(26).fork(), - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): ServiceDescriptorProto { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseServiceDescriptorProto(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.name = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.method!.push( - MethodDescriptorProto.decode(reader, reader.uint32()), - ); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.options = ServiceOptions.decode( - reader, - reader.uint32(), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): ServiceDescriptorProto { - return { - name: isSet(object.name) ? String(object.name) : "", - method: Array.isArray(object?.method) - ? object.method.map((e: any) => - MethodDescriptorProto.fromJSON(e), - ) - : [], - options: isSet(object.options) - ? ServiceOptions.fromJSON(object.options) - : undefined, - }; - }, - - toJSON(message: ServiceDescriptorProto): unknown { - const obj: any = {}; - if (message.name !== undefined && message.name !== "") { - obj.name = message.name; - } - if (message.method?.length) { - obj.method = message.method.map((e) => - MethodDescriptorProto.toJSON(e), - ); - } - if (message.options !== undefined) { - obj.options = ServiceOptions.toJSON(message.options); - } - return obj; - }, - - create(base?: DeepPartial): ServiceDescriptorProto { - return ServiceDescriptorProto.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): ServiceDescriptorProto { - const message = createBaseServiceDescriptorProto(); - message.name = object.name ?? ""; - message.method = - object.method?.map((e) => MethodDescriptorProto.fromPartial(e)) || - []; - message.options = - object.options !== undefined && object.options !== null - ? ServiceOptions.fromPartial(object.options) - : undefined; - return message; - }, + encode(message: ServiceDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.name !== undefined && message.name !== "") { + writer.uint32(10).string(message.name); + } + if (message.method !== undefined && message.method.length !== 0) { + for (const v of message.method) { + MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); + } + } + if (message.options !== undefined) { + ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ServiceDescriptorProto { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseServiceDescriptorProto(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.name = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.method!.push(MethodDescriptorProto.decode(reader, reader.uint32())); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.options = ServiceOptions.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): ServiceDescriptorProto { + return { + name: isSet(object.name) ? String(object.name) : "", + method: Array.isArray(object?.method) ? object.method.map((e: any) => MethodDescriptorProto.fromJSON(e)) : [], + options: isSet(object.options) ? ServiceOptions.fromJSON(object.options) : undefined, + }; + }, + + toJSON(message: ServiceDescriptorProto): unknown { + const obj: any = {}; + if (message.name !== undefined && message.name !== "") { + obj.name = message.name; + } + if (message.method?.length) { + obj.method = message.method.map((e) => MethodDescriptorProto.toJSON(e)); + } + if (message.options !== undefined) { + obj.options = ServiceOptions.toJSON(message.options); + } + return obj; + }, + + create(base?: DeepPartial): ServiceDescriptorProto { + return ServiceDescriptorProto.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): ServiceDescriptorProto { + const message = createBaseServiceDescriptorProto(); + message.name = object.name ?? ""; + message.method = object.method?.map((e) => MethodDescriptorProto.fromPartial(e)) || []; + message.options = (object.options !== undefined && object.options !== null) + ? ServiceOptions.fromPartial(object.options) + : undefined; + return message; + }, +}; + +function createBaseMethodDescriptorProto(): MethodDescriptorProto { + return { + name: "", + inputType: "", + outputType: "", + options: undefined, + clientStreaming: false, + serverStreaming: false, + }; +} + +export const MethodDescriptorProto = { + encode(message: MethodDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.name !== undefined && message.name !== "") { + writer.uint32(10).string(message.name); + } + if (message.inputType !== undefined && message.inputType !== "") { + writer.uint32(18).string(message.inputType); + } + if (message.outputType !== undefined && message.outputType !== "") { + writer.uint32(26).string(message.outputType); + } + if (message.options !== undefined) { + MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); + } + if (message.clientStreaming === true) { + writer.uint32(40).bool(message.clientStreaming); + } + if (message.serverStreaming === true) { + writer.uint32(48).bool(message.serverStreaming); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): MethodDescriptorProto { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMethodDescriptorProto(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.name = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.inputType = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.outputType = reader.string(); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.options = MethodOptions.decode(reader, reader.uint32()); + continue; + case 5: + if (tag !== 40) { + break; + } + + message.clientStreaming = reader.bool(); + continue; + case 6: + if (tag !== 48) { + break; + } + + message.serverStreaming = reader.bool(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): MethodDescriptorProto { + return { + name: isSet(object.name) ? String(object.name) : "", + inputType: isSet(object.inputType) ? String(object.inputType) : "", + outputType: isSet(object.outputType) ? String(object.outputType) : "", + options: isSet(object.options) ? MethodOptions.fromJSON(object.options) : undefined, + clientStreaming: isSet(object.clientStreaming) ? Boolean(object.clientStreaming) : false, + serverStreaming: isSet(object.serverStreaming) ? Boolean(object.serverStreaming) : false, + }; + }, + + toJSON(message: MethodDescriptorProto): unknown { + const obj: any = {}; + if (message.name !== undefined && message.name !== "") { + obj.name = message.name; + } + if (message.inputType !== undefined && message.inputType !== "") { + obj.inputType = message.inputType; + } + if (message.outputType !== undefined && message.outputType !== "") { + obj.outputType = message.outputType; + } + if (message.options !== undefined) { + obj.options = MethodOptions.toJSON(message.options); + } + if (message.clientStreaming === true) { + obj.clientStreaming = message.clientStreaming; + } + if (message.serverStreaming === true) { + obj.serverStreaming = message.serverStreaming; + } + return obj; + }, + + create(base?: DeepPartial): MethodDescriptorProto { + return MethodDescriptorProto.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): MethodDescriptorProto { + const message = createBaseMethodDescriptorProto(); + message.name = object.name ?? ""; + message.inputType = object.inputType ?? ""; + message.outputType = object.outputType ?? ""; + message.options = (object.options !== undefined && object.options !== null) + ? MethodOptions.fromPartial(object.options) + : undefined; + message.clientStreaming = object.clientStreaming ?? false; + message.serverStreaming = object.serverStreaming ?? false; + return message; + }, +}; + +function createBaseFileOptions(): FileOptions { + return { + javaPackage: "", + javaOuterClassname: "", + javaMultipleFiles: false, + javaGenerateEqualsAndHash: false, + javaStringCheckUtf8: false, + optimizeFor: 1, + goPackage: "", + ccGenericServices: false, + javaGenericServices: false, + pyGenericServices: false, + phpGenericServices: false, + deprecated: false, + ccEnableArenas: false, + objcClassPrefix: "", + csharpNamespace: "", + swiftPrefix: "", + phpClassPrefix: "", + phpNamespace: "", + phpMetadataNamespace: "", + rubyPackage: "", + uninterpretedOption: [], + }; +} + +export const FileOptions = { + encode(message: FileOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.javaPackage !== undefined && message.javaPackage !== "") { + writer.uint32(10).string(message.javaPackage); + } + if (message.javaOuterClassname !== undefined && message.javaOuterClassname !== "") { + writer.uint32(66).string(message.javaOuterClassname); + } + if (message.javaMultipleFiles === true) { + writer.uint32(80).bool(message.javaMultipleFiles); + } + if (message.javaGenerateEqualsAndHash === true) { + writer.uint32(160).bool(message.javaGenerateEqualsAndHash); + } + if (message.javaStringCheckUtf8 === true) { + writer.uint32(216).bool(message.javaStringCheckUtf8); + } + if (message.optimizeFor !== undefined && message.optimizeFor !== 1) { + writer.uint32(72).int32(message.optimizeFor); + } + if (message.goPackage !== undefined && message.goPackage !== "") { + writer.uint32(90).string(message.goPackage); + } + if (message.ccGenericServices === true) { + writer.uint32(128).bool(message.ccGenericServices); + } + if (message.javaGenericServices === true) { + writer.uint32(136).bool(message.javaGenericServices); + } + if (message.pyGenericServices === true) { + writer.uint32(144).bool(message.pyGenericServices); + } + if (message.phpGenericServices === true) { + writer.uint32(336).bool(message.phpGenericServices); + } + if (message.deprecated === true) { + writer.uint32(184).bool(message.deprecated); + } + if (message.ccEnableArenas === true) { + writer.uint32(248).bool(message.ccEnableArenas); + } + if (message.objcClassPrefix !== undefined && message.objcClassPrefix !== "") { + writer.uint32(290).string(message.objcClassPrefix); + } + if (message.csharpNamespace !== undefined && message.csharpNamespace !== "") { + writer.uint32(298).string(message.csharpNamespace); + } + if (message.swiftPrefix !== undefined && message.swiftPrefix !== "") { + writer.uint32(314).string(message.swiftPrefix); + } + if (message.phpClassPrefix !== undefined && message.phpClassPrefix !== "") { + writer.uint32(322).string(message.phpClassPrefix); + } + if (message.phpNamespace !== undefined && message.phpNamespace !== "") { + writer.uint32(330).string(message.phpNamespace); + } + if (message.phpMetadataNamespace !== undefined && message.phpMetadataNamespace !== "") { + writer.uint32(354).string(message.phpMetadataNamespace); + } + if (message.rubyPackage !== undefined && message.rubyPackage !== "") { + writer.uint32(362).string(message.rubyPackage); + } + if (message.uninterpretedOption !== undefined && message.uninterpretedOption.length !== 0) { + for (const v of message.uninterpretedOption) { + UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); + } + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): FileOptions { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseFileOptions(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.javaPackage = reader.string(); + continue; + case 8: + if (tag !== 66) { + break; + } + + message.javaOuterClassname = reader.string(); + continue; + case 10: + if (tag !== 80) { + break; + } + + message.javaMultipleFiles = reader.bool(); + continue; + case 20: + if (tag !== 160) { + break; + } + + message.javaGenerateEqualsAndHash = reader.bool(); + continue; + case 27: + if (tag !== 216) { + break; + } + + message.javaStringCheckUtf8 = reader.bool(); + continue; + case 9: + if (tag !== 72) { + break; + } + + message.optimizeFor = reader.int32() as any; + continue; + case 11: + if (tag !== 90) { + break; + } + + message.goPackage = reader.string(); + continue; + case 16: + if (tag !== 128) { + break; + } + + message.ccGenericServices = reader.bool(); + continue; + case 17: + if (tag !== 136) { + break; + } + + message.javaGenericServices = reader.bool(); + continue; + case 18: + if (tag !== 144) { + break; + } + + message.pyGenericServices = reader.bool(); + continue; + case 42: + if (tag !== 336) { + break; + } + + message.phpGenericServices = reader.bool(); + continue; + case 23: + if (tag !== 184) { + break; + } + + message.deprecated = reader.bool(); + continue; + case 31: + if (tag !== 248) { + break; + } + + message.ccEnableArenas = reader.bool(); + continue; + case 36: + if (tag !== 290) { + break; + } + + message.objcClassPrefix = reader.string(); + continue; + case 37: + if (tag !== 298) { + break; + } + + message.csharpNamespace = reader.string(); + continue; + case 39: + if (tag !== 314) { + break; + } + + message.swiftPrefix = reader.string(); + continue; + case 40: + if (tag !== 322) { + break; + } + + message.phpClassPrefix = reader.string(); + continue; + case 41: + if (tag !== 330) { + break; + } + + message.phpNamespace = reader.string(); + continue; + case 44: + if (tag !== 354) { + break; + } + + message.phpMetadataNamespace = reader.string(); + continue; + case 45: + if (tag !== 362) { + break; + } + + message.rubyPackage = reader.string(); + continue; + case 999: + if (tag !== 7994) { + break; + } + + message.uninterpretedOption!.push(UninterpretedOption.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): FileOptions { + return { + javaPackage: isSet(object.javaPackage) ? String(object.javaPackage) : "", + javaOuterClassname: isSet(object.javaOuterClassname) ? String(object.javaOuterClassname) : "", + javaMultipleFiles: isSet(object.javaMultipleFiles) ? Boolean(object.javaMultipleFiles) : false, + javaGenerateEqualsAndHash: isSet(object.javaGenerateEqualsAndHash) + ? Boolean(object.javaGenerateEqualsAndHash) + : false, + javaStringCheckUtf8: isSet(object.javaStringCheckUtf8) ? Boolean(object.javaStringCheckUtf8) : false, + optimizeFor: isSet(object.optimizeFor) ? fileOptions_OptimizeModeFromJSON(object.optimizeFor) : 1, + goPackage: isSet(object.goPackage) ? String(object.goPackage) : "", + ccGenericServices: isSet(object.ccGenericServices) ? Boolean(object.ccGenericServices) : false, + javaGenericServices: isSet(object.javaGenericServices) ? Boolean(object.javaGenericServices) : false, + pyGenericServices: isSet(object.pyGenericServices) ? Boolean(object.pyGenericServices) : false, + phpGenericServices: isSet(object.phpGenericServices) ? Boolean(object.phpGenericServices) : false, + deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, + ccEnableArenas: isSet(object.ccEnableArenas) ? Boolean(object.ccEnableArenas) : false, + objcClassPrefix: isSet(object.objcClassPrefix) ? String(object.objcClassPrefix) : "", + csharpNamespace: isSet(object.csharpNamespace) ? String(object.csharpNamespace) : "", + swiftPrefix: isSet(object.swiftPrefix) ? String(object.swiftPrefix) : "", + phpClassPrefix: isSet(object.phpClassPrefix) ? String(object.phpClassPrefix) : "", + phpNamespace: isSet(object.phpNamespace) ? String(object.phpNamespace) : "", + phpMetadataNamespace: isSet(object.phpMetadataNamespace) ? String(object.phpMetadataNamespace) : "", + rubyPackage: isSet(object.rubyPackage) ? String(object.rubyPackage) : "", + uninterpretedOption: Array.isArray(object?.uninterpretedOption) + ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) + : [], + }; + }, + + toJSON(message: FileOptions): unknown { + const obj: any = {}; + if (message.javaPackage !== undefined && message.javaPackage !== "") { + obj.javaPackage = message.javaPackage; + } + if (message.javaOuterClassname !== undefined && message.javaOuterClassname !== "") { + obj.javaOuterClassname = message.javaOuterClassname; + } + if (message.javaMultipleFiles === true) { + obj.javaMultipleFiles = message.javaMultipleFiles; + } + if (message.javaGenerateEqualsAndHash === true) { + obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + } + if (message.javaStringCheckUtf8 === true) { + obj.javaStringCheckUtf8 = message.javaStringCheckUtf8; + } + if (message.optimizeFor !== undefined && message.optimizeFor !== 1) { + obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor); + } + if (message.goPackage !== undefined && message.goPackage !== "") { + obj.goPackage = message.goPackage; + } + if (message.ccGenericServices === true) { + obj.ccGenericServices = message.ccGenericServices; + } + if (message.javaGenericServices === true) { + obj.javaGenericServices = message.javaGenericServices; + } + if (message.pyGenericServices === true) { + obj.pyGenericServices = message.pyGenericServices; + } + if (message.phpGenericServices === true) { + obj.phpGenericServices = message.phpGenericServices; + } + if (message.deprecated === true) { + obj.deprecated = message.deprecated; + } + if (message.ccEnableArenas === true) { + obj.ccEnableArenas = message.ccEnableArenas; + } + if (message.objcClassPrefix !== undefined && message.objcClassPrefix !== "") { + obj.objcClassPrefix = message.objcClassPrefix; + } + if (message.csharpNamespace !== undefined && message.csharpNamespace !== "") { + obj.csharpNamespace = message.csharpNamespace; + } + if (message.swiftPrefix !== undefined && message.swiftPrefix !== "") { + obj.swiftPrefix = message.swiftPrefix; + } + if (message.phpClassPrefix !== undefined && message.phpClassPrefix !== "") { + obj.phpClassPrefix = message.phpClassPrefix; + } + if (message.phpNamespace !== undefined && message.phpNamespace !== "") { + obj.phpNamespace = message.phpNamespace; + } + if (message.phpMetadataNamespace !== undefined && message.phpMetadataNamespace !== "") { + obj.phpMetadataNamespace = message.phpMetadataNamespace; + } + if (message.rubyPackage !== undefined && message.rubyPackage !== "") { + obj.rubyPackage = message.rubyPackage; + } + if (message.uninterpretedOption?.length) { + obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e)); + } + return obj; + }, + + create(base?: DeepPartial): FileOptions { + return FileOptions.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): FileOptions { + const message = createBaseFileOptions(); + message.javaPackage = object.javaPackage ?? ""; + message.javaOuterClassname = object.javaOuterClassname ?? ""; + message.javaMultipleFiles = object.javaMultipleFiles ?? false; + message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash ?? false; + message.javaStringCheckUtf8 = object.javaStringCheckUtf8 ?? false; + message.optimizeFor = object.optimizeFor ?? 1; + message.goPackage = object.goPackage ?? ""; + message.ccGenericServices = object.ccGenericServices ?? false; + message.javaGenericServices = object.javaGenericServices ?? false; + message.pyGenericServices = object.pyGenericServices ?? false; + message.phpGenericServices = object.phpGenericServices ?? false; + message.deprecated = object.deprecated ?? false; + message.ccEnableArenas = object.ccEnableArenas ?? false; + message.objcClassPrefix = object.objcClassPrefix ?? ""; + message.csharpNamespace = object.csharpNamespace ?? ""; + message.swiftPrefix = object.swiftPrefix ?? ""; + message.phpClassPrefix = object.phpClassPrefix ?? ""; + message.phpNamespace = object.phpNamespace ?? ""; + message.phpMetadataNamespace = object.phpMetadataNamespace ?? ""; + message.rubyPackage = object.rubyPackage ?? ""; + message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || []; + return message; + }, +}; + +function createBaseMessageOptions(): MessageOptions { + return { + messageSetWireFormat: false, + noStandardDescriptorAccessor: false, + deprecated: false, + mapEntry: false, + uninterpretedOption: [], + }; +} + +export const MessageOptions = { + encode(message: MessageOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.messageSetWireFormat === true) { + writer.uint32(8).bool(message.messageSetWireFormat); + } + if (message.noStandardDescriptorAccessor === true) { + writer.uint32(16).bool(message.noStandardDescriptorAccessor); + } + if (message.deprecated === true) { + writer.uint32(24).bool(message.deprecated); + } + if (message.mapEntry === true) { + writer.uint32(56).bool(message.mapEntry); + } + if (message.uninterpretedOption !== undefined && message.uninterpretedOption.length !== 0) { + for (const v of message.uninterpretedOption) { + UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); + } + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): MessageOptions { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMessageOptions(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.messageSetWireFormat = reader.bool(); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.noStandardDescriptorAccessor = reader.bool(); + continue; + case 3: + if (tag !== 24) { + break; + } + + message.deprecated = reader.bool(); + continue; + case 7: + if (tag !== 56) { + break; + } + + message.mapEntry = reader.bool(); + continue; + case 999: + if (tag !== 7994) { + break; + } + + message.uninterpretedOption!.push(UninterpretedOption.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): MessageOptions { + return { + messageSetWireFormat: isSet(object.messageSetWireFormat) ? Boolean(object.messageSetWireFormat) : false, + noStandardDescriptorAccessor: isSet(object.noStandardDescriptorAccessor) + ? Boolean(object.noStandardDescriptorAccessor) + : false, + deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, + mapEntry: isSet(object.mapEntry) ? Boolean(object.mapEntry) : false, + uninterpretedOption: Array.isArray(object?.uninterpretedOption) + ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) + : [], + }; + }, + + toJSON(message: MessageOptions): unknown { + const obj: any = {}; + if (message.messageSetWireFormat === true) { + obj.messageSetWireFormat = message.messageSetWireFormat; + } + if (message.noStandardDescriptorAccessor === true) { + obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + } + if (message.deprecated === true) { + obj.deprecated = message.deprecated; + } + if (message.mapEntry === true) { + obj.mapEntry = message.mapEntry; + } + if (message.uninterpretedOption?.length) { + obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e)); + } + return obj; + }, + + create(base?: DeepPartial): MessageOptions { + return MessageOptions.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): MessageOptions { + const message = createBaseMessageOptions(); + message.messageSetWireFormat = object.messageSetWireFormat ?? false; + message.noStandardDescriptorAccessor = object.noStandardDescriptorAccessor ?? false; + message.deprecated = object.deprecated ?? false; + message.mapEntry = object.mapEntry ?? false; + message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || []; + return message; + }, }; -function createBaseMethodDescriptorProto(): MethodDescriptorProto { - return { - name: "", - inputType: "", - outputType: "", - options: undefined, - clientStreaming: false, - serverStreaming: false, - }; -} +function createBaseFieldOptions(): FieldOptions { + return { + ctype: 0, + packed: false, + jstype: 0, + lazy: false, + unverifiedLazy: false, + deprecated: false, + weak: false, + uninterpretedOption: [], + }; +} + +export const FieldOptions = { + encode(message: FieldOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.ctype !== undefined && message.ctype !== 0) { + writer.uint32(8).int32(message.ctype); + } + if (message.packed === true) { + writer.uint32(16).bool(message.packed); + } + if (message.jstype !== undefined && message.jstype !== 0) { + writer.uint32(48).int32(message.jstype); + } + if (message.lazy === true) { + writer.uint32(40).bool(message.lazy); + } + if (message.unverifiedLazy === true) { + writer.uint32(120).bool(message.unverifiedLazy); + } + if (message.deprecated === true) { + writer.uint32(24).bool(message.deprecated); + } + if (message.weak === true) { + writer.uint32(80).bool(message.weak); + } + if (message.uninterpretedOption !== undefined && message.uninterpretedOption.length !== 0) { + for (const v of message.uninterpretedOption) { + UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); + } + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): FieldOptions { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseFieldOptions(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.ctype = reader.int32() as any; + continue; + case 2: + if (tag !== 16) { + break; + } -export const MethodDescriptorProto = { - encode( - message: MethodDescriptorProto, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.name !== undefined && message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.inputType !== undefined && message.inputType !== "") { - writer.uint32(18).string(message.inputType); - } - if (message.outputType !== undefined && message.outputType !== "") { - writer.uint32(26).string(message.outputType); - } - if (message.options !== undefined) { - MethodOptions.encode( - message.options, - writer.uint32(34).fork(), - ).ldelim(); - } - if (message.clientStreaming === true) { - writer.uint32(40).bool(message.clientStreaming); - } - if (message.serverStreaming === true) { - writer.uint32(48).bool(message.serverStreaming); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MethodDescriptorProto { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMethodDescriptorProto(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.name = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.inputType = reader.string(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.outputType = reader.string(); - continue; - case 4: - if (tag !== 34) { - break; - } - - message.options = MethodOptions.decode( - reader, - reader.uint32(), - ); - continue; - case 5: - if (tag !== 40) { - break; - } - - message.clientStreaming = reader.bool(); - continue; - case 6: - if (tag !== 48) { - break; - } - - message.serverStreaming = reader.bool(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): MethodDescriptorProto { - return { - name: isSet(object.name) ? String(object.name) : "", - inputType: isSet(object.inputType) ? String(object.inputType) : "", - outputType: isSet(object.outputType) - ? String(object.outputType) - : "", - options: isSet(object.options) - ? MethodOptions.fromJSON(object.options) - : undefined, - clientStreaming: isSet(object.clientStreaming) - ? Boolean(object.clientStreaming) - : false, - serverStreaming: isSet(object.serverStreaming) - ? Boolean(object.serverStreaming) - : false, - }; - }, - - toJSON(message: MethodDescriptorProto): unknown { - const obj: any = {}; - if (message.name !== undefined && message.name !== "") { - obj.name = message.name; - } - if (message.inputType !== undefined && message.inputType !== "") { - obj.inputType = message.inputType; - } - if (message.outputType !== undefined && message.outputType !== "") { - obj.outputType = message.outputType; - } - if (message.options !== undefined) { - obj.options = MethodOptions.toJSON(message.options); - } - if (message.clientStreaming === true) { - obj.clientStreaming = message.clientStreaming; - } - if (message.serverStreaming === true) { - obj.serverStreaming = message.serverStreaming; - } - return obj; - }, - - create(base?: DeepPartial): MethodDescriptorProto { - return MethodDescriptorProto.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): MethodDescriptorProto { - const message = createBaseMethodDescriptorProto(); - message.name = object.name ?? ""; - message.inputType = object.inputType ?? ""; - message.outputType = object.outputType ?? ""; - message.options = - object.options !== undefined && object.options !== null - ? MethodOptions.fromPartial(object.options) - : undefined; - message.clientStreaming = object.clientStreaming ?? false; - message.serverStreaming = object.serverStreaming ?? false; - return message; - }, -}; + message.packed = reader.bool(); + continue; + case 6: + if (tag !== 48) { + break; + } -function createBaseFileOptions(): FileOptions { - return { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", - uninterpretedOption: [], - }; -} + message.jstype = reader.int32() as any; + continue; + case 5: + if (tag !== 40) { + break; + } -export const FileOptions = { - encode( - message: FileOptions, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.javaPackage !== undefined && message.javaPackage !== "") { - writer.uint32(10).string(message.javaPackage); - } - if ( - message.javaOuterClassname !== undefined && - message.javaOuterClassname !== "" - ) { - writer.uint32(66).string(message.javaOuterClassname); - } - if (message.javaMultipleFiles === true) { - writer.uint32(80).bool(message.javaMultipleFiles); - } - if (message.javaGenerateEqualsAndHash === true) { - writer.uint32(160).bool(message.javaGenerateEqualsAndHash); - } - if (message.javaStringCheckUtf8 === true) { - writer.uint32(216).bool(message.javaStringCheckUtf8); - } - if (message.optimizeFor !== undefined && message.optimizeFor !== 1) { - writer.uint32(72).int32(message.optimizeFor); - } - if (message.goPackage !== undefined && message.goPackage !== "") { - writer.uint32(90).string(message.goPackage); - } - if (message.ccGenericServices === true) { - writer.uint32(128).bool(message.ccGenericServices); - } - if (message.javaGenericServices === true) { - writer.uint32(136).bool(message.javaGenericServices); - } - if (message.pyGenericServices === true) { - writer.uint32(144).bool(message.pyGenericServices); - } - if (message.phpGenericServices === true) { - writer.uint32(336).bool(message.phpGenericServices); - } - if (message.deprecated === true) { - writer.uint32(184).bool(message.deprecated); - } - if (message.ccEnableArenas === true) { - writer.uint32(248).bool(message.ccEnableArenas); - } - if ( - message.objcClassPrefix !== undefined && - message.objcClassPrefix !== "" - ) { - writer.uint32(290).string(message.objcClassPrefix); - } - if ( - message.csharpNamespace !== undefined && - message.csharpNamespace !== "" - ) { - writer.uint32(298).string(message.csharpNamespace); - } - if (message.swiftPrefix !== undefined && message.swiftPrefix !== "") { - writer.uint32(314).string(message.swiftPrefix); - } - if ( - message.phpClassPrefix !== undefined && - message.phpClassPrefix !== "" - ) { - writer.uint32(322).string(message.phpClassPrefix); - } - if (message.phpNamespace !== undefined && message.phpNamespace !== "") { - writer.uint32(330).string(message.phpNamespace); - } - if ( - message.phpMetadataNamespace !== undefined && - message.phpMetadataNamespace !== "" - ) { - writer.uint32(354).string(message.phpMetadataNamespace); - } - if (message.rubyPackage !== undefined && message.rubyPackage !== "") { - writer.uint32(362).string(message.rubyPackage); - } - if ( - message.uninterpretedOption !== undefined && - message.uninterpretedOption.length !== 0 - ) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode( - v!, - writer.uint32(7994).fork(), - ).ldelim(); - } - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): FileOptions { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFileOptions(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.javaPackage = reader.string(); - continue; - case 8: - if (tag !== 66) { - break; - } - - message.javaOuterClassname = reader.string(); - continue; - case 10: - if (tag !== 80) { - break; - } - - message.javaMultipleFiles = reader.bool(); - continue; - case 20: - if (tag !== 160) { - break; - } - - message.javaGenerateEqualsAndHash = reader.bool(); - continue; - case 27: - if (tag !== 216) { - break; - } - - message.javaStringCheckUtf8 = reader.bool(); - continue; - case 9: - if (tag !== 72) { - break; - } - - message.optimizeFor = reader.int32() as any; - continue; - case 11: - if (tag !== 90) { - break; - } - - message.goPackage = reader.string(); - continue; - case 16: - if (tag !== 128) { - break; - } - - message.ccGenericServices = reader.bool(); - continue; - case 17: - if (tag !== 136) { - break; - } - - message.javaGenericServices = reader.bool(); - continue; - case 18: - if (tag !== 144) { - break; - } - - message.pyGenericServices = reader.bool(); - continue; - case 42: - if (tag !== 336) { - break; - } - - message.phpGenericServices = reader.bool(); - continue; - case 23: - if (tag !== 184) { - break; - } - - message.deprecated = reader.bool(); - continue; - case 31: - if (tag !== 248) { - break; - } - - message.ccEnableArenas = reader.bool(); - continue; - case 36: - if (tag !== 290) { - break; - } - - message.objcClassPrefix = reader.string(); - continue; - case 37: - if (tag !== 298) { - break; - } - - message.csharpNamespace = reader.string(); - continue; - case 39: - if (tag !== 314) { - break; - } - - message.swiftPrefix = reader.string(); - continue; - case 40: - if (tag !== 322) { - break; - } - - message.phpClassPrefix = reader.string(); - continue; - case 41: - if (tag !== 330) { - break; - } - - message.phpNamespace = reader.string(); - continue; - case 44: - if (tag !== 354) { - break; - } - - message.phpMetadataNamespace = reader.string(); - continue; - case 45: - if (tag !== 362) { - break; - } - - message.rubyPackage = reader.string(); - continue; - case 999: - if (tag !== 7994) { - break; - } - - message.uninterpretedOption!.push( - UninterpretedOption.decode(reader, reader.uint32()), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): FileOptions { - return { - javaPackage: isSet(object.javaPackage) - ? String(object.javaPackage) - : "", - javaOuterClassname: isSet(object.javaOuterClassname) - ? String(object.javaOuterClassname) - : "", - javaMultipleFiles: isSet(object.javaMultipleFiles) - ? Boolean(object.javaMultipleFiles) - : false, - javaGenerateEqualsAndHash: isSet(object.javaGenerateEqualsAndHash) - ? Boolean(object.javaGenerateEqualsAndHash) - : false, - javaStringCheckUtf8: isSet(object.javaStringCheckUtf8) - ? Boolean(object.javaStringCheckUtf8) - : false, - optimizeFor: isSet(object.optimizeFor) - ? fileOptions_OptimizeModeFromJSON(object.optimizeFor) - : 1, - goPackage: isSet(object.goPackage) ? String(object.goPackage) : "", - ccGenericServices: isSet(object.ccGenericServices) - ? Boolean(object.ccGenericServices) - : false, - javaGenericServices: isSet(object.javaGenericServices) - ? Boolean(object.javaGenericServices) - : false, - pyGenericServices: isSet(object.pyGenericServices) - ? Boolean(object.pyGenericServices) - : false, - phpGenericServices: isSet(object.phpGenericServices) - ? Boolean(object.phpGenericServices) - : false, - deprecated: isSet(object.deprecated) - ? Boolean(object.deprecated) - : false, - ccEnableArenas: isSet(object.ccEnableArenas) - ? Boolean(object.ccEnableArenas) - : false, - objcClassPrefix: isSet(object.objcClassPrefix) - ? String(object.objcClassPrefix) - : "", - csharpNamespace: isSet(object.csharpNamespace) - ? String(object.csharpNamespace) - : "", - swiftPrefix: isSet(object.swiftPrefix) - ? String(object.swiftPrefix) - : "", - phpClassPrefix: isSet(object.phpClassPrefix) - ? String(object.phpClassPrefix) - : "", - phpNamespace: isSet(object.phpNamespace) - ? String(object.phpNamespace) - : "", - phpMetadataNamespace: isSet(object.phpMetadataNamespace) - ? String(object.phpMetadataNamespace) - : "", - rubyPackage: isSet(object.rubyPackage) - ? String(object.rubyPackage) - : "", - uninterpretedOption: Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e: any) => - UninterpretedOption.fromJSON(e), - ) - : [], - }; - }, - - toJSON(message: FileOptions): unknown { - const obj: any = {}; - if (message.javaPackage !== undefined && message.javaPackage !== "") { - obj.javaPackage = message.javaPackage; - } - if ( - message.javaOuterClassname !== undefined && - message.javaOuterClassname !== "" - ) { - obj.javaOuterClassname = message.javaOuterClassname; - } - if (message.javaMultipleFiles === true) { - obj.javaMultipleFiles = message.javaMultipleFiles; - } - if (message.javaGenerateEqualsAndHash === true) { - obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; - } - if (message.javaStringCheckUtf8 === true) { - obj.javaStringCheckUtf8 = message.javaStringCheckUtf8; - } - if (message.optimizeFor !== undefined && message.optimizeFor !== 1) { - obj.optimizeFor = fileOptions_OptimizeModeToJSON( - message.optimizeFor, - ); - } - if (message.goPackage !== undefined && message.goPackage !== "") { - obj.goPackage = message.goPackage; - } - if (message.ccGenericServices === true) { - obj.ccGenericServices = message.ccGenericServices; - } - if (message.javaGenericServices === true) { - obj.javaGenericServices = message.javaGenericServices; - } - if (message.pyGenericServices === true) { - obj.pyGenericServices = message.pyGenericServices; - } - if (message.phpGenericServices === true) { - obj.phpGenericServices = message.phpGenericServices; - } - if (message.deprecated === true) { - obj.deprecated = message.deprecated; - } - if (message.ccEnableArenas === true) { - obj.ccEnableArenas = message.ccEnableArenas; - } - if ( - message.objcClassPrefix !== undefined && - message.objcClassPrefix !== "" - ) { - obj.objcClassPrefix = message.objcClassPrefix; - } - if ( - message.csharpNamespace !== undefined && - message.csharpNamespace !== "" - ) { - obj.csharpNamespace = message.csharpNamespace; - } - if (message.swiftPrefix !== undefined && message.swiftPrefix !== "") { - obj.swiftPrefix = message.swiftPrefix; - } - if ( - message.phpClassPrefix !== undefined && - message.phpClassPrefix !== "" - ) { - obj.phpClassPrefix = message.phpClassPrefix; - } - if (message.phpNamespace !== undefined && message.phpNamespace !== "") { - obj.phpNamespace = message.phpNamespace; - } - if ( - message.phpMetadataNamespace !== undefined && - message.phpMetadataNamespace !== "" - ) { - obj.phpMetadataNamespace = message.phpMetadataNamespace; - } - if (message.rubyPackage !== undefined && message.rubyPackage !== "") { - obj.rubyPackage = message.rubyPackage; - } - if (message.uninterpretedOption?.length) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - UninterpretedOption.toJSON(e), - ); - } - return obj; - }, - - create(base?: DeepPartial): FileOptions { - return FileOptions.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): FileOptions { - const message = createBaseFileOptions(); - message.javaPackage = object.javaPackage ?? ""; - message.javaOuterClassname = object.javaOuterClassname ?? ""; - message.javaMultipleFiles = object.javaMultipleFiles ?? false; - message.javaGenerateEqualsAndHash = - object.javaGenerateEqualsAndHash ?? false; - message.javaStringCheckUtf8 = object.javaStringCheckUtf8 ?? false; - message.optimizeFor = object.optimizeFor ?? 1; - message.goPackage = object.goPackage ?? ""; - message.ccGenericServices = object.ccGenericServices ?? false; - message.javaGenericServices = object.javaGenericServices ?? false; - message.pyGenericServices = object.pyGenericServices ?? false; - message.phpGenericServices = object.phpGenericServices ?? false; - message.deprecated = object.deprecated ?? false; - message.ccEnableArenas = object.ccEnableArenas ?? false; - message.objcClassPrefix = object.objcClassPrefix ?? ""; - message.csharpNamespace = object.csharpNamespace ?? ""; - message.swiftPrefix = object.swiftPrefix ?? ""; - message.phpClassPrefix = object.phpClassPrefix ?? ""; - message.phpNamespace = object.phpNamespace ?? ""; - message.phpMetadataNamespace = object.phpMetadataNamespace ?? ""; - message.rubyPackage = object.rubyPackage ?? ""; - message.uninterpretedOption = - object.uninterpretedOption?.map((e) => - UninterpretedOption.fromPartial(e), - ) || []; - return message; - }, -}; + message.lazy = reader.bool(); + continue; + case 15: + if (tag !== 120) { + break; + } -function createBaseMessageOptions(): MessageOptions { - return { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, - uninterpretedOption: [], - }; -} + message.unverifiedLazy = reader.bool(); + continue; + case 3: + if (tag !== 24) { + break; + } -export const MessageOptions = { - encode( - message: MessageOptions, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.messageSetWireFormat === true) { - writer.uint32(8).bool(message.messageSetWireFormat); - } - if (message.noStandardDescriptorAccessor === true) { - writer.uint32(16).bool(message.noStandardDescriptorAccessor); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.mapEntry === true) { - writer.uint32(56).bool(message.mapEntry); - } - if ( - message.uninterpretedOption !== undefined && - message.uninterpretedOption.length !== 0 - ) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode( - v!, - writer.uint32(7994).fork(), - ).ldelim(); - } - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MessageOptions { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMessageOptions(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.messageSetWireFormat = reader.bool(); - continue; - case 2: - if (tag !== 16) { - break; - } - - message.noStandardDescriptorAccessor = reader.bool(); - continue; - case 3: - if (tag !== 24) { - break; - } - - message.deprecated = reader.bool(); - continue; - case 7: - if (tag !== 56) { - break; - } - - message.mapEntry = reader.bool(); - continue; - case 999: - if (tag !== 7994) { - break; - } - - message.uninterpretedOption!.push( - UninterpretedOption.decode(reader, reader.uint32()), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): MessageOptions { - return { - messageSetWireFormat: isSet(object.messageSetWireFormat) - ? Boolean(object.messageSetWireFormat) - : false, - noStandardDescriptorAccessor: isSet( - object.noStandardDescriptorAccessor, - ) - ? Boolean(object.noStandardDescriptorAccessor) - : false, - deprecated: isSet(object.deprecated) - ? Boolean(object.deprecated) - : false, - mapEntry: isSet(object.mapEntry) ? Boolean(object.mapEntry) : false, - uninterpretedOption: Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e: any) => - UninterpretedOption.fromJSON(e), - ) - : [], - }; - }, - - toJSON(message: MessageOptions): unknown { - const obj: any = {}; - if (message.messageSetWireFormat === true) { - obj.messageSetWireFormat = message.messageSetWireFormat; - } - if (message.noStandardDescriptorAccessor === true) { - obj.noStandardDescriptorAccessor = - message.noStandardDescriptorAccessor; - } - if (message.deprecated === true) { - obj.deprecated = message.deprecated; - } - if (message.mapEntry === true) { - obj.mapEntry = message.mapEntry; - } - if (message.uninterpretedOption?.length) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - UninterpretedOption.toJSON(e), - ); - } - return obj; - }, - - create(base?: DeepPartial): MessageOptions { - return MessageOptions.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): MessageOptions { - const message = createBaseMessageOptions(); - message.messageSetWireFormat = object.messageSetWireFormat ?? false; - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor ?? false; - message.deprecated = object.deprecated ?? false; - message.mapEntry = object.mapEntry ?? false; - message.uninterpretedOption = - object.uninterpretedOption?.map((e) => - UninterpretedOption.fromPartial(e), - ) || []; - return message; - }, -}; + message.deprecated = reader.bool(); + continue; + case 10: + if (tag !== 80) { + break; + } + + message.weak = reader.bool(); + continue; + case 999: + if (tag !== 7994) { + break; + } + + message.uninterpretedOption!.push(UninterpretedOption.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, -function createBaseFieldOptions(): FieldOptions { + fromJSON(object: any): FieldOptions { return { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - unverifiedLazy: false, - deprecated: false, - weak: false, - uninterpretedOption: [], + ctype: isSet(object.ctype) ? fieldOptions_CTypeFromJSON(object.ctype) : 0, + packed: isSet(object.packed) ? Boolean(object.packed) : false, + jstype: isSet(object.jstype) ? fieldOptions_JSTypeFromJSON(object.jstype) : 0, + lazy: isSet(object.lazy) ? Boolean(object.lazy) : false, + unverifiedLazy: isSet(object.unverifiedLazy) ? Boolean(object.unverifiedLazy) : false, + deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, + weak: isSet(object.weak) ? Boolean(object.weak) : false, + uninterpretedOption: Array.isArray(object?.uninterpretedOption) + ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) + : [], }; -} + }, -export const FieldOptions = { - encode( - message: FieldOptions, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.ctype !== undefined && message.ctype !== 0) { - writer.uint32(8).int32(message.ctype); - } - if (message.packed === true) { - writer.uint32(16).bool(message.packed); - } - if (message.jstype !== undefined && message.jstype !== 0) { - writer.uint32(48).int32(message.jstype); - } - if (message.lazy === true) { - writer.uint32(40).bool(message.lazy); - } - if (message.unverifiedLazy === true) { - writer.uint32(120).bool(message.unverifiedLazy); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if (message.weak === true) { - writer.uint32(80).bool(message.weak); - } - if ( - message.uninterpretedOption !== undefined && - message.uninterpretedOption.length !== 0 - ) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode( - v!, - writer.uint32(7994).fork(), - ).ldelim(); - } - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): FieldOptions { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFieldOptions(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.ctype = reader.int32() as any; - continue; - case 2: - if (tag !== 16) { - break; - } - - message.packed = reader.bool(); - continue; - case 6: - if (tag !== 48) { - break; - } - - message.jstype = reader.int32() as any; - continue; - case 5: - if (tag !== 40) { - break; - } - - message.lazy = reader.bool(); - continue; - case 15: - if (tag !== 120) { - break; - } - - message.unverifiedLazy = reader.bool(); - continue; - case 3: - if (tag !== 24) { - break; - } - - message.deprecated = reader.bool(); - continue; - case 10: - if (tag !== 80) { - break; - } - - message.weak = reader.bool(); - continue; - case 999: - if (tag !== 7994) { - break; - } - - message.uninterpretedOption!.push( - UninterpretedOption.decode(reader, reader.uint32()), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): FieldOptions { - return { - ctype: isSet(object.ctype) - ? fieldOptions_CTypeFromJSON(object.ctype) - : 0, - packed: isSet(object.packed) ? Boolean(object.packed) : false, - jstype: isSet(object.jstype) - ? fieldOptions_JSTypeFromJSON(object.jstype) - : 0, - lazy: isSet(object.lazy) ? Boolean(object.lazy) : false, - unverifiedLazy: isSet(object.unverifiedLazy) - ? Boolean(object.unverifiedLazy) - : false, - deprecated: isSet(object.deprecated) - ? Boolean(object.deprecated) - : false, - weak: isSet(object.weak) ? Boolean(object.weak) : false, - uninterpretedOption: Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e: any) => - UninterpretedOption.fromJSON(e), - ) - : [], - }; - }, - - toJSON(message: FieldOptions): unknown { - const obj: any = {}; - if (message.ctype !== undefined && message.ctype !== 0) { - obj.ctype = fieldOptions_CTypeToJSON(message.ctype); - } - if (message.packed === true) { - obj.packed = message.packed; - } - if (message.jstype !== undefined && message.jstype !== 0) { - obj.jstype = fieldOptions_JSTypeToJSON(message.jstype); - } - if (message.lazy === true) { - obj.lazy = message.lazy; - } - if (message.unverifiedLazy === true) { - obj.unverifiedLazy = message.unverifiedLazy; - } - if (message.deprecated === true) { - obj.deprecated = message.deprecated; - } - if (message.weak === true) { - obj.weak = message.weak; - } - if (message.uninterpretedOption?.length) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - UninterpretedOption.toJSON(e), - ); - } - return obj; - }, - - create(base?: DeepPartial): FieldOptions { - return FieldOptions.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): FieldOptions { - const message = createBaseFieldOptions(); - message.ctype = object.ctype ?? 0; - message.packed = object.packed ?? false; - message.jstype = object.jstype ?? 0; - message.lazy = object.lazy ?? false; - message.unverifiedLazy = object.unverifiedLazy ?? false; - message.deprecated = object.deprecated ?? false; - message.weak = object.weak ?? false; - message.uninterpretedOption = - object.uninterpretedOption?.map((e) => - UninterpretedOption.fromPartial(e), - ) || []; - return message; - }, + toJSON(message: FieldOptions): unknown { + const obj: any = {}; + if (message.ctype !== undefined && message.ctype !== 0) { + obj.ctype = fieldOptions_CTypeToJSON(message.ctype); + } + if (message.packed === true) { + obj.packed = message.packed; + } + if (message.jstype !== undefined && message.jstype !== 0) { + obj.jstype = fieldOptions_JSTypeToJSON(message.jstype); + } + if (message.lazy === true) { + obj.lazy = message.lazy; + } + if (message.unverifiedLazy === true) { + obj.unverifiedLazy = message.unverifiedLazy; + } + if (message.deprecated === true) { + obj.deprecated = message.deprecated; + } + if (message.weak === true) { + obj.weak = message.weak; + } + if (message.uninterpretedOption?.length) { + obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e)); + } + return obj; + }, + + create(base?: DeepPartial): FieldOptions { + return FieldOptions.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): FieldOptions { + const message = createBaseFieldOptions(); + message.ctype = object.ctype ?? 0; + message.packed = object.packed ?? false; + message.jstype = object.jstype ?? 0; + message.lazy = object.lazy ?? false; + message.unverifiedLazy = object.unverifiedLazy ?? false; + message.deprecated = object.deprecated ?? false; + message.weak = object.weak ?? false; + message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || []; + return message; + }, }; function createBaseOneofOptions(): OneofOptions { - return { uninterpretedOption: [] }; + return { uninterpretedOption: [] }; } export const OneofOptions = { - encode( - message: OneofOptions, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if ( - message.uninterpretedOption !== undefined && - message.uninterpretedOption.length !== 0 - ) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode( - v!, - writer.uint32(7994).fork(), - ).ldelim(); - } - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): OneofOptions { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseOneofOptions(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - if (tag !== 7994) { - break; - } - - message.uninterpretedOption!.push( - UninterpretedOption.decode(reader, reader.uint32()), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): OneofOptions { - return { - uninterpretedOption: Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e: any) => - UninterpretedOption.fromJSON(e), - ) - : [], - }; - }, - - toJSON(message: OneofOptions): unknown { - const obj: any = {}; - if (message.uninterpretedOption?.length) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - UninterpretedOption.toJSON(e), - ); - } - return obj; - }, - - create(base?: DeepPartial): OneofOptions { - return OneofOptions.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): OneofOptions { - const message = createBaseOneofOptions(); - message.uninterpretedOption = - object.uninterpretedOption?.map((e) => - UninterpretedOption.fromPartial(e), - ) || []; - return message; - }, + encode(message: OneofOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.uninterpretedOption !== undefined && message.uninterpretedOption.length !== 0) { + for (const v of message.uninterpretedOption) { + UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); + } + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): OneofOptions { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseOneofOptions(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 999: + if (tag !== 7994) { + break; + } + + message.uninterpretedOption!.push(UninterpretedOption.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): OneofOptions { + return { + uninterpretedOption: Array.isArray(object?.uninterpretedOption) + ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) + : [], + }; + }, + + toJSON(message: OneofOptions): unknown { + const obj: any = {}; + if (message.uninterpretedOption?.length) { + obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e)); + } + return obj; + }, + + create(base?: DeepPartial): OneofOptions { + return OneofOptions.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): OneofOptions { + const message = createBaseOneofOptions(); + message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || []; + return message; + }, }; function createBaseEnumOptions(): EnumOptions { - return { allowAlias: false, deprecated: false, uninterpretedOption: [] }; + return { allowAlias: false, deprecated: false, uninterpretedOption: [] }; } export const EnumOptions = { - encode( - message: EnumOptions, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.allowAlias === true) { - writer.uint32(16).bool(message.allowAlias); - } - if (message.deprecated === true) { - writer.uint32(24).bool(message.deprecated); - } - if ( - message.uninterpretedOption !== undefined && - message.uninterpretedOption.length !== 0 - ) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode( - v!, - writer.uint32(7994).fork(), - ).ldelim(); - } - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): EnumOptions { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEnumOptions(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - if (tag !== 16) { - break; - } - - message.allowAlias = reader.bool(); - continue; - case 3: - if (tag !== 24) { - break; - } - - message.deprecated = reader.bool(); - continue; - case 999: - if (tag !== 7994) { - break; - } - - message.uninterpretedOption!.push( - UninterpretedOption.decode(reader, reader.uint32()), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): EnumOptions { - return { - allowAlias: isSet(object.allowAlias) - ? Boolean(object.allowAlias) - : false, - deprecated: isSet(object.deprecated) - ? Boolean(object.deprecated) - : false, - uninterpretedOption: Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e: any) => - UninterpretedOption.fromJSON(e), - ) - : [], - }; - }, - - toJSON(message: EnumOptions): unknown { - const obj: any = {}; - if (message.allowAlias === true) { - obj.allowAlias = message.allowAlias; - } - if (message.deprecated === true) { - obj.deprecated = message.deprecated; - } - if (message.uninterpretedOption?.length) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - UninterpretedOption.toJSON(e), - ); - } - return obj; - }, - - create(base?: DeepPartial): EnumOptions { - return EnumOptions.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): EnumOptions { - const message = createBaseEnumOptions(); - message.allowAlias = object.allowAlias ?? false; - message.deprecated = object.deprecated ?? false; - message.uninterpretedOption = - object.uninterpretedOption?.map((e) => - UninterpretedOption.fromPartial(e), - ) || []; - return message; - }, + encode(message: EnumOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.allowAlias === true) { + writer.uint32(16).bool(message.allowAlias); + } + if (message.deprecated === true) { + writer.uint32(24).bool(message.deprecated); + } + if (message.uninterpretedOption !== undefined && message.uninterpretedOption.length !== 0) { + for (const v of message.uninterpretedOption) { + UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); + } + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): EnumOptions { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseEnumOptions(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + if (tag !== 16) { + break; + } + + message.allowAlias = reader.bool(); + continue; + case 3: + if (tag !== 24) { + break; + } + + message.deprecated = reader.bool(); + continue; + case 999: + if (tag !== 7994) { + break; + } + + message.uninterpretedOption!.push(UninterpretedOption.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): EnumOptions { + return { + allowAlias: isSet(object.allowAlias) ? Boolean(object.allowAlias) : false, + deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, + uninterpretedOption: Array.isArray(object?.uninterpretedOption) + ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) + : [], + }; + }, + + toJSON(message: EnumOptions): unknown { + const obj: any = {}; + if (message.allowAlias === true) { + obj.allowAlias = message.allowAlias; + } + if (message.deprecated === true) { + obj.deprecated = message.deprecated; + } + if (message.uninterpretedOption?.length) { + obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e)); + } + return obj; + }, + + create(base?: DeepPartial): EnumOptions { + return EnumOptions.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): EnumOptions { + const message = createBaseEnumOptions(); + message.allowAlias = object.allowAlias ?? false; + message.deprecated = object.deprecated ?? false; + message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || []; + return message; + }, }; function createBaseEnumValueOptions(): EnumValueOptions { - return { deprecated: false, uninterpretedOption: [] }; + return { deprecated: false, uninterpretedOption: [] }; } export const EnumValueOptions = { - encode( - message: EnumValueOptions, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.deprecated === true) { - writer.uint32(8).bool(message.deprecated); - } - if ( - message.uninterpretedOption !== undefined && - message.uninterpretedOption.length !== 0 - ) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode( - v!, - writer.uint32(7994).fork(), - ).ldelim(); - } - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): EnumValueOptions { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEnumValueOptions(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.deprecated = reader.bool(); - continue; - case 999: - if (tag !== 7994) { - break; - } - - message.uninterpretedOption!.push( - UninterpretedOption.decode(reader, reader.uint32()), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): EnumValueOptions { - return { - deprecated: isSet(object.deprecated) - ? Boolean(object.deprecated) - : false, - uninterpretedOption: Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e: any) => - UninterpretedOption.fromJSON(e), - ) - : [], - }; - }, - - toJSON(message: EnumValueOptions): unknown { - const obj: any = {}; - if (message.deprecated === true) { - obj.deprecated = message.deprecated; - } - if (message.uninterpretedOption?.length) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - UninterpretedOption.toJSON(e), - ); - } - return obj; - }, - - create(base?: DeepPartial): EnumValueOptions { - return EnumValueOptions.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): EnumValueOptions { - const message = createBaseEnumValueOptions(); - message.deprecated = object.deprecated ?? false; - message.uninterpretedOption = - object.uninterpretedOption?.map((e) => - UninterpretedOption.fromPartial(e), - ) || []; - return message; - }, + encode(message: EnumValueOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.deprecated === true) { + writer.uint32(8).bool(message.deprecated); + } + if (message.uninterpretedOption !== undefined && message.uninterpretedOption.length !== 0) { + for (const v of message.uninterpretedOption) { + UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); + } + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): EnumValueOptions { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseEnumValueOptions(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.deprecated = reader.bool(); + continue; + case 999: + if (tag !== 7994) { + break; + } + + message.uninterpretedOption!.push(UninterpretedOption.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): EnumValueOptions { + return { + deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, + uninterpretedOption: Array.isArray(object?.uninterpretedOption) + ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) + : [], + }; + }, + + toJSON(message: EnumValueOptions): unknown { + const obj: any = {}; + if (message.deprecated === true) { + obj.deprecated = message.deprecated; + } + if (message.uninterpretedOption?.length) { + obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e)); + } + return obj; + }, + + create(base?: DeepPartial): EnumValueOptions { + return EnumValueOptions.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): EnumValueOptions { + const message = createBaseEnumValueOptions(); + message.deprecated = object.deprecated ?? false; + message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || []; + return message; + }, }; function createBaseServiceOptions(): ServiceOptions { - return { deprecated: false, uninterpretedOption: [] }; + return { deprecated: false, uninterpretedOption: [] }; } export const ServiceOptions = { - encode( - message: ServiceOptions, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if ( - message.uninterpretedOption !== undefined && - message.uninterpretedOption.length !== 0 - ) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode( - v!, - writer.uint32(7994).fork(), - ).ldelim(); - } - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): ServiceOptions { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseServiceOptions(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - if (tag !== 264) { - break; - } - - message.deprecated = reader.bool(); - continue; - case 999: - if (tag !== 7994) { - break; - } - - message.uninterpretedOption!.push( - UninterpretedOption.decode(reader, reader.uint32()), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): ServiceOptions { - return { - deprecated: isSet(object.deprecated) - ? Boolean(object.deprecated) - : false, - uninterpretedOption: Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e: any) => - UninterpretedOption.fromJSON(e), - ) - : [], - }; - }, - - toJSON(message: ServiceOptions): unknown { - const obj: any = {}; - if (message.deprecated === true) { - obj.deprecated = message.deprecated; - } - if (message.uninterpretedOption?.length) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - UninterpretedOption.toJSON(e), - ); - } - return obj; - }, - - create(base?: DeepPartial): ServiceOptions { - return ServiceOptions.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): ServiceOptions { - const message = createBaseServiceOptions(); - message.deprecated = object.deprecated ?? false; - message.uninterpretedOption = - object.uninterpretedOption?.map((e) => - UninterpretedOption.fromPartial(e), - ) || []; - return message; - }, + encode(message: ServiceOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.deprecated === true) { + writer.uint32(264).bool(message.deprecated); + } + if (message.uninterpretedOption !== undefined && message.uninterpretedOption.length !== 0) { + for (const v of message.uninterpretedOption) { + UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); + } + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ServiceOptions { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseServiceOptions(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + if (tag !== 264) { + break; + } + + message.deprecated = reader.bool(); + continue; + case 999: + if (tag !== 7994) { + break; + } + + message.uninterpretedOption!.push(UninterpretedOption.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): ServiceOptions { + return { + deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, + uninterpretedOption: Array.isArray(object?.uninterpretedOption) + ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) + : [], + }; + }, + + toJSON(message: ServiceOptions): unknown { + const obj: any = {}; + if (message.deprecated === true) { + obj.deprecated = message.deprecated; + } + if (message.uninterpretedOption?.length) { + obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e)); + } + return obj; + }, + + create(base?: DeepPartial): ServiceOptions { + return ServiceOptions.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): ServiceOptions { + const message = createBaseServiceOptions(); + message.deprecated = object.deprecated ?? false; + message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || []; + return message; + }, }; function createBaseMethodOptions(): MethodOptions { - return { deprecated: false, idempotencyLevel: 0, uninterpretedOption: [] }; + return { deprecated: false, idempotencyLevel: 0, uninterpretedOption: [] }; } export const MethodOptions = { - encode( - message: MethodOptions, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.deprecated === true) { - writer.uint32(264).bool(message.deprecated); - } - if ( - message.idempotencyLevel !== undefined && - message.idempotencyLevel !== 0 - ) { - writer.uint32(272).int32(message.idempotencyLevel); - } - if ( - message.uninterpretedOption !== undefined && - message.uninterpretedOption.length !== 0 - ) { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode( - v!, - writer.uint32(7994).fork(), - ).ldelim(); - } - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MethodOptions { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMethodOptions(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - if (tag !== 264) { - break; - } - - message.deprecated = reader.bool(); - continue; - case 34: - if (tag !== 272) { - break; - } - - message.idempotencyLevel = reader.int32() as any; - continue; - case 999: - if (tag !== 7994) { - break; - } - - message.uninterpretedOption!.push( - UninterpretedOption.decode(reader, reader.uint32()), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): MethodOptions { - return { - deprecated: isSet(object.deprecated) - ? Boolean(object.deprecated) - : false, - idempotencyLevel: isSet(object.idempotencyLevel) - ? methodOptions_IdempotencyLevelFromJSON( - object.idempotencyLevel, - ) - : 0, - uninterpretedOption: Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e: any) => - UninterpretedOption.fromJSON(e), - ) - : [], - }; - }, - - toJSON(message: MethodOptions): unknown { - const obj: any = {}; - if (message.deprecated === true) { - obj.deprecated = message.deprecated; - } - if ( - message.idempotencyLevel !== undefined && - message.idempotencyLevel !== 0 - ) { - obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON( - message.idempotencyLevel, - ); - } - if (message.uninterpretedOption?.length) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - UninterpretedOption.toJSON(e), - ); - } - return obj; - }, - - create(base?: DeepPartial): MethodOptions { - return MethodOptions.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): MethodOptions { - const message = createBaseMethodOptions(); - message.deprecated = object.deprecated ?? false; - message.idempotencyLevel = object.idempotencyLevel ?? 0; - message.uninterpretedOption = - object.uninterpretedOption?.map((e) => - UninterpretedOption.fromPartial(e), - ) || []; - return message; - }, -}; + encode(message: MethodOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.deprecated === true) { + writer.uint32(264).bool(message.deprecated); + } + if (message.idempotencyLevel !== undefined && message.idempotencyLevel !== 0) { + writer.uint32(272).int32(message.idempotencyLevel); + } + if (message.uninterpretedOption !== undefined && message.uninterpretedOption.length !== 0) { + for (const v of message.uninterpretedOption) { + UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); + } + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): MethodOptions { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMethodOptions(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + if (tag !== 264) { + break; + } + + message.deprecated = reader.bool(); + continue; + case 34: + if (tag !== 272) { + break; + } + + message.idempotencyLevel = reader.int32() as any; + continue; + case 999: + if (tag !== 7994) { + break; + } + + message.uninterpretedOption!.push(UninterpretedOption.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, -function createBaseUninterpretedOption(): UninterpretedOption { + fromJSON(object: any): MethodOptions { return { - name: [], - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - stringValue: new Uint8Array(0), - aggregateValue: "", + deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, + idempotencyLevel: isSet(object.idempotencyLevel) + ? methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel) + : 0, + uninterpretedOption: Array.isArray(object?.uninterpretedOption) + ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) + : [], }; + }, + + toJSON(message: MethodOptions): unknown { + const obj: any = {}; + if (message.deprecated === true) { + obj.deprecated = message.deprecated; + } + if (message.idempotencyLevel !== undefined && message.idempotencyLevel !== 0) { + obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel); + } + if (message.uninterpretedOption?.length) { + obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e)); + } + return obj; + }, + + create(base?: DeepPartial): MethodOptions { + return MethodOptions.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): MethodOptions { + const message = createBaseMethodOptions(); + message.deprecated = object.deprecated ?? false; + message.idempotencyLevel = object.idempotencyLevel ?? 0; + message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || []; + return message; + }, +}; + +function createBaseUninterpretedOption(): UninterpretedOption { + return { + name: [], + identifierValue: "", + positiveIntValue: 0, + negativeIntValue: 0, + doubleValue: 0, + stringValue: new Uint8Array(0), + aggregateValue: "", + }; } export const UninterpretedOption = { - encode( - message: UninterpretedOption, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.name !== undefined && message.name.length !== 0) { - for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork(), - ).ldelim(); - } - } - if ( - message.identifierValue !== undefined && - message.identifierValue !== "" - ) { - writer.uint32(26).string(message.identifierValue); - } - if ( - message.positiveIntValue !== undefined && - message.positiveIntValue !== 0 - ) { - writer.uint32(32).uint64(message.positiveIntValue); - } - if ( - message.negativeIntValue !== undefined && - message.negativeIntValue !== 0 - ) { - writer.uint32(40).int64(message.negativeIntValue); - } - if (message.doubleValue !== undefined && message.doubleValue !== 0) { - writer.uint32(49).double(message.doubleValue); - } - if ( - message.stringValue !== undefined && - message.stringValue.length !== 0 - ) { - writer.uint32(58).bytes(message.stringValue); - } - if ( - message.aggregateValue !== undefined && - message.aggregateValue !== "" - ) { - writer.uint32(66).string(message.aggregateValue); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): UninterpretedOption { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUninterpretedOption(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - if (tag !== 18) { - break; - } - - message.name!.push( - UninterpretedOption_NamePart.decode( - reader, - reader.uint32(), - ), - ); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.identifierValue = reader.string(); - continue; - case 4: - if (tag !== 32) { - break; - } - - message.positiveIntValue = longToNumber( - reader.uint64() as Long, - ); - continue; - case 5: - if (tag !== 40) { - break; - } - - message.negativeIntValue = longToNumber( - reader.int64() as Long, - ); - continue; - case 6: - if (tag !== 49) { - break; - } - - message.doubleValue = reader.double(); - continue; - case 7: - if (tag !== 58) { - break; - } - - message.stringValue = reader.bytes(); - continue; - case 8: - if (tag !== 66) { - break; - } - - message.aggregateValue = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): UninterpretedOption { - return { - name: Array.isArray(object?.name) - ? object.name.map((e: any) => - UninterpretedOption_NamePart.fromJSON(e), - ) - : [], - identifierValue: isSet(object.identifierValue) - ? String(object.identifierValue) - : "", - positiveIntValue: isSet(object.positiveIntValue) - ? Number(object.positiveIntValue) - : 0, - negativeIntValue: isSet(object.negativeIntValue) - ? Number(object.negativeIntValue) - : 0, - doubleValue: isSet(object.doubleValue) - ? Number(object.doubleValue) - : 0, - stringValue: isSet(object.stringValue) - ? bytesFromBase64(object.stringValue) - : new Uint8Array(0), - aggregateValue: isSet(object.aggregateValue) - ? String(object.aggregateValue) - : "", - }; - }, - - toJSON(message: UninterpretedOption): unknown { - const obj: any = {}; - if (message.name?.length) { - obj.name = message.name.map((e) => - UninterpretedOption_NamePart.toJSON(e), - ); - } - if ( - message.identifierValue !== undefined && - message.identifierValue !== "" - ) { - obj.identifierValue = message.identifierValue; - } - if ( - message.positiveIntValue !== undefined && - message.positiveIntValue !== 0 - ) { - obj.positiveIntValue = Math.round(message.positiveIntValue); - } - if ( - message.negativeIntValue !== undefined && - message.negativeIntValue !== 0 - ) { - obj.negativeIntValue = Math.round(message.negativeIntValue); - } - if (message.doubleValue !== undefined && message.doubleValue !== 0) { - obj.doubleValue = message.doubleValue; - } - if ( - message.stringValue !== undefined && - message.stringValue.length !== 0 - ) { - obj.stringValue = base64FromBytes(message.stringValue); - } - if ( - message.aggregateValue !== undefined && - message.aggregateValue !== "" - ) { - obj.aggregateValue = message.aggregateValue; - } - return obj; - }, - - create(base?: DeepPartial): UninterpretedOption { - return UninterpretedOption.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): UninterpretedOption { - const message = createBaseUninterpretedOption(); - message.name = - object.name?.map((e) => - UninterpretedOption_NamePart.fromPartial(e), - ) || []; - message.identifierValue = object.identifierValue ?? ""; - message.positiveIntValue = object.positiveIntValue ?? 0; - message.negativeIntValue = object.negativeIntValue ?? 0; - message.doubleValue = object.doubleValue ?? 0; - message.stringValue = object.stringValue ?? new Uint8Array(0); - message.aggregateValue = object.aggregateValue ?? ""; - return message; - }, + encode(message: UninterpretedOption, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.name !== undefined && message.name.length !== 0) { + for (const v of message.name) { + UninterpretedOption_NamePart.encode(v!, writer.uint32(18).fork()).ldelim(); + } + } + if (message.identifierValue !== undefined && message.identifierValue !== "") { + writer.uint32(26).string(message.identifierValue); + } + if (message.positiveIntValue !== undefined && message.positiveIntValue !== 0) { + writer.uint32(32).uint64(message.positiveIntValue); + } + if (message.negativeIntValue !== undefined && message.negativeIntValue !== 0) { + writer.uint32(40).int64(message.negativeIntValue); + } + if (message.doubleValue !== undefined && message.doubleValue !== 0) { + writer.uint32(49).double(message.doubleValue); + } + if (message.stringValue !== undefined && message.stringValue.length !== 0) { + writer.uint32(58).bytes(message.stringValue); + } + if (message.aggregateValue !== undefined && message.aggregateValue !== "") { + writer.uint32(66).string(message.aggregateValue); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): UninterpretedOption { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUninterpretedOption(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + if (tag !== 18) { + break; + } + + message.name!.push(UninterpretedOption_NamePart.decode(reader, reader.uint32())); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.identifierValue = reader.string(); + continue; + case 4: + if (tag !== 32) { + break; + } + + message.positiveIntValue = longToNumber(reader.uint64() as Long); + continue; + case 5: + if (tag !== 40) { + break; + } + + message.negativeIntValue = longToNumber(reader.int64() as Long); + continue; + case 6: + if (tag !== 49) { + break; + } + + message.doubleValue = reader.double(); + continue; + case 7: + if (tag !== 58) { + break; + } + + message.stringValue = reader.bytes(); + continue; + case 8: + if (tag !== 66) { + break; + } + + message.aggregateValue = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): UninterpretedOption { + return { + name: Array.isArray(object?.name) ? object.name.map((e: any) => UninterpretedOption_NamePart.fromJSON(e)) : [], + identifierValue: isSet(object.identifierValue) ? String(object.identifierValue) : "", + positiveIntValue: isSet(object.positiveIntValue) ? Number(object.positiveIntValue) : 0, + negativeIntValue: isSet(object.negativeIntValue) ? Number(object.negativeIntValue) : 0, + doubleValue: isSet(object.doubleValue) ? Number(object.doubleValue) : 0, + stringValue: isSet(object.stringValue) ? bytesFromBase64(object.stringValue) : new Uint8Array(0), + aggregateValue: isSet(object.aggregateValue) ? String(object.aggregateValue) : "", + }; + }, + + toJSON(message: UninterpretedOption): unknown { + const obj: any = {}; + if (message.name?.length) { + obj.name = message.name.map((e) => UninterpretedOption_NamePart.toJSON(e)); + } + if (message.identifierValue !== undefined && message.identifierValue !== "") { + obj.identifierValue = message.identifierValue; + } + if (message.positiveIntValue !== undefined && message.positiveIntValue !== 0) { + obj.positiveIntValue = Math.round(message.positiveIntValue); + } + if (message.negativeIntValue !== undefined && message.negativeIntValue !== 0) { + obj.negativeIntValue = Math.round(message.negativeIntValue); + } + if (message.doubleValue !== undefined && message.doubleValue !== 0) { + obj.doubleValue = message.doubleValue; + } + if (message.stringValue !== undefined && message.stringValue.length !== 0) { + obj.stringValue = base64FromBytes(message.stringValue); + } + if (message.aggregateValue !== undefined && message.aggregateValue !== "") { + obj.aggregateValue = message.aggregateValue; + } + return obj; + }, + + create(base?: DeepPartial): UninterpretedOption { + return UninterpretedOption.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): UninterpretedOption { + const message = createBaseUninterpretedOption(); + message.name = object.name?.map((e) => UninterpretedOption_NamePart.fromPartial(e)) || []; + message.identifierValue = object.identifierValue ?? ""; + message.positiveIntValue = object.positiveIntValue ?? 0; + message.negativeIntValue = object.negativeIntValue ?? 0; + message.doubleValue = object.doubleValue ?? 0; + message.stringValue = object.stringValue ?? new Uint8Array(0); + message.aggregateValue = object.aggregateValue ?? ""; + return message; + }, }; function createBaseUninterpretedOption_NamePart(): UninterpretedOption_NamePart { - return { namePart: "", isExtension: false }; + return { namePart: "", isExtension: false }; } export const UninterpretedOption_NamePart = { - encode( - message: UninterpretedOption_NamePart, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.namePart !== undefined && message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): UninterpretedOption_NamePart { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUninterpretedOption_NamePart(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.namePart = reader.string(); - continue; - case 2: - if (tag !== 16) { - break; - } - - message.isExtension = reader.bool(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): UninterpretedOption_NamePart { - return { - namePart: isSet(object.namePart) ? String(object.namePart) : "", - isExtension: isSet(object.isExtension) - ? Boolean(object.isExtension) - : false, - }; - }, - - toJSON(message: UninterpretedOption_NamePart): unknown { - const obj: any = {}; - if (message.namePart !== undefined && message.namePart !== "") { - obj.namePart = message.namePart; - } - if (message.isExtension === true) { - obj.isExtension = message.isExtension; - } - return obj; - }, - - create( - base?: DeepPartial, - ): UninterpretedOption_NamePart { - return UninterpretedOption_NamePart.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): UninterpretedOption_NamePart { - const message = createBaseUninterpretedOption_NamePart(); - message.namePart = object.namePart ?? ""; - message.isExtension = object.isExtension ?? false; - return message; - }, + encode(message: UninterpretedOption_NamePart, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.namePart !== undefined && message.namePart !== "") { + writer.uint32(10).string(message.namePart); + } + if (message.isExtension === true) { + writer.uint32(16).bool(message.isExtension); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): UninterpretedOption_NamePart { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUninterpretedOption_NamePart(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.namePart = reader.string(); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.isExtension = reader.bool(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): UninterpretedOption_NamePart { + return { + namePart: isSet(object.namePart) ? String(object.namePart) : "", + isExtension: isSet(object.isExtension) ? Boolean(object.isExtension) : false, + }; + }, + + toJSON(message: UninterpretedOption_NamePart): unknown { + const obj: any = {}; + if (message.namePart !== undefined && message.namePart !== "") { + obj.namePart = message.namePart; + } + if (message.isExtension === true) { + obj.isExtension = message.isExtension; + } + return obj; + }, + + create(base?: DeepPartial): UninterpretedOption_NamePart { + return UninterpretedOption_NamePart.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): UninterpretedOption_NamePart { + const message = createBaseUninterpretedOption_NamePart(); + message.namePart = object.namePart ?? ""; + message.isExtension = object.isExtension ?? false; + return message; + }, }; function createBaseSourceCodeInfo(): SourceCodeInfo { - return { location: [] }; + return { location: [] }; } export const SourceCodeInfo = { - encode( - message: SourceCodeInfo, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.location !== undefined && message.location.length !== 0) { - for (const v of message.location) { - SourceCodeInfo_Location.encode( - v!, - writer.uint32(10).fork(), - ).ldelim(); - } - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): SourceCodeInfo { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSourceCodeInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.location!.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo { - return { - location: Array.isArray(object?.location) - ? object.location.map((e: any) => - SourceCodeInfo_Location.fromJSON(e), - ) - : [], - }; - }, - - toJSON(message: SourceCodeInfo): unknown { - const obj: any = {}; - if (message.location?.length) { - obj.location = message.location.map((e) => - SourceCodeInfo_Location.toJSON(e), - ); - } - return obj; - }, - - create(base?: DeepPartial): SourceCodeInfo { - return SourceCodeInfo.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): SourceCodeInfo { - const message = createBaseSourceCodeInfo(); - message.location = - object.location?.map((e) => - SourceCodeInfo_Location.fromPartial(e), - ) || []; - return message; - }, -}; + encode(message: SourceCodeInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.location !== undefined && message.location.length !== 0) { + for (const v of message.location) { + SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); + } + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): SourceCodeInfo { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSourceCodeInfo(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.location!.push(SourceCodeInfo_Location.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, -function createBaseSourceCodeInfo_Location(): SourceCodeInfo_Location { + fromJSON(object: any): SourceCodeInfo { return { - path: [], - span: [], - leadingComments: "", - trailingComments: "", - leadingDetachedComments: [], + location: Array.isArray(object?.location) + ? object.location.map((e: any) => SourceCodeInfo_Location.fromJSON(e)) + : [], }; + }, + + toJSON(message: SourceCodeInfo): unknown { + const obj: any = {}; + if (message.location?.length) { + obj.location = message.location.map((e) => SourceCodeInfo_Location.toJSON(e)); + } + return obj; + }, + + create(base?: DeepPartial): SourceCodeInfo { + return SourceCodeInfo.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): SourceCodeInfo { + const message = createBaseSourceCodeInfo(); + message.location = object.location?.map((e) => SourceCodeInfo_Location.fromPartial(e)) || []; + return message; + }, +}; + +function createBaseSourceCodeInfo_Location(): SourceCodeInfo_Location { + return { path: [], span: [], leadingComments: "", trailingComments: "", leadingDetachedComments: [] }; } export const SourceCodeInfo_Location = { - encode( - message: SourceCodeInfo_Location, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.path !== undefined && message.path.length !== 0) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - } - if (message.span !== undefined && message.span.length !== 0) { - writer.uint32(18).fork(); - for (const v of message.span) { - writer.int32(v); - } - writer.ldelim(); - } - if ( - message.leadingComments !== undefined && - message.leadingComments !== "" - ) { - writer.uint32(26).string(message.leadingComments); - } - if ( - message.trailingComments !== undefined && - message.trailingComments !== "" - ) { - writer.uint32(34).string(message.trailingComments); - } - if ( - message.leadingDetachedComments !== undefined && - message.leadingDetachedComments.length !== 0 - ) { - for (const v of message.leadingDetachedComments) { - writer.uint32(50).string(v!); - } - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): SourceCodeInfo_Location { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSourceCodeInfo_Location(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag === 8) { - message.path!.push(reader.int32()); - - continue; - } - - if (tag === 10) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path!.push(reader.int32()); - } - - continue; - } - - break; - case 2: - if (tag === 16) { - message.span!.push(reader.int32()); - - continue; - } - - if (tag === 18) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.span!.push(reader.int32()); - } - - continue; - } - - break; - case 3: - if (tag !== 26) { - break; - } - - message.leadingComments = reader.string(); - continue; - case 4: - if (tag !== 34) { - break; - } - - message.trailingComments = reader.string(); - continue; - case 6: - if (tag !== 50) { - break; - } - - message.leadingDetachedComments!.push(reader.string()); - continue; + encode(message: SourceCodeInfo_Location, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.path !== undefined && message.path.length !== 0) { + writer.uint32(10).fork(); + for (const v of message.path) { + writer.int32(v); + } + writer.ldelim(); + } + if (message.span !== undefined && message.span.length !== 0) { + writer.uint32(18).fork(); + for (const v of message.span) { + writer.int32(v); + } + writer.ldelim(); + } + if (message.leadingComments !== undefined && message.leadingComments !== "") { + writer.uint32(26).string(message.leadingComments); + } + if (message.trailingComments !== undefined && message.trailingComments !== "") { + writer.uint32(34).string(message.trailingComments); + } + if (message.leadingDetachedComments !== undefined && message.leadingDetachedComments.length !== 0) { + for (const v of message.leadingDetachedComments) { + writer.uint32(50).string(v!); + } + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): SourceCodeInfo_Location { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSourceCodeInfo_Location(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag === 8) { + message.path!.push(reader.int32()); + + continue; + } + + if (tag === 10) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + message.path!.push(reader.int32()); } - if ((tag & 7) === 4 || tag === 0) { - break; + + continue; + } + + break; + case 2: + if (tag === 16) { + message.span!.push(reader.int32()); + + continue; + } + + if (tag === 18) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + message.span!.push(reader.int32()); } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): SourceCodeInfo_Location { - return { - path: Array.isArray(object?.path) - ? object.path.map((e: any) => Number(e)) - : [], - span: Array.isArray(object?.span) - ? object.span.map((e: any) => Number(e)) - : [], - leadingComments: isSet(object.leadingComments) - ? String(object.leadingComments) - : "", - trailingComments: isSet(object.trailingComments) - ? String(object.trailingComments) - : "", - leadingDetachedComments: Array.isArray( - object?.leadingDetachedComments, - ) - ? object.leadingDetachedComments.map((e: any) => String(e)) - : [], - }; - }, - - toJSON(message: SourceCodeInfo_Location): unknown { - const obj: any = {}; - if (message.path?.length) { - obj.path = message.path.map((e) => Math.round(e)); - } - if (message.span?.length) { - obj.span = message.span.map((e) => Math.round(e)); - } - if ( - message.leadingComments !== undefined && - message.leadingComments !== "" - ) { - obj.leadingComments = message.leadingComments; - } - if ( - message.trailingComments !== undefined && - message.trailingComments !== "" - ) { - obj.trailingComments = message.trailingComments; - } - if (message.leadingDetachedComments?.length) { - obj.leadingDetachedComments = message.leadingDetachedComments; - } - return obj; - }, - - create( - base?: DeepPartial, - ): SourceCodeInfo_Location { - return SourceCodeInfo_Location.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): SourceCodeInfo_Location { - const message = createBaseSourceCodeInfo_Location(); - message.path = object.path?.map((e) => e) || []; - message.span = object.span?.map((e) => e) || []; - message.leadingComments = object.leadingComments ?? ""; - message.trailingComments = object.trailingComments ?? ""; - message.leadingDetachedComments = - object.leadingDetachedComments?.map((e) => e) || []; - return message; - }, + + continue; + } + + break; + case 3: + if (tag !== 26) { + break; + } + + message.leadingComments = reader.string(); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.trailingComments = reader.string(); + continue; + case 6: + if (tag !== 50) { + break; + } + + message.leadingDetachedComments!.push(reader.string()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): SourceCodeInfo_Location { + return { + path: Array.isArray(object?.path) ? object.path.map((e: any) => Number(e)) : [], + span: Array.isArray(object?.span) ? object.span.map((e: any) => Number(e)) : [], + leadingComments: isSet(object.leadingComments) ? String(object.leadingComments) : "", + trailingComments: isSet(object.trailingComments) ? String(object.trailingComments) : "", + leadingDetachedComments: Array.isArray(object?.leadingDetachedComments) + ? object.leadingDetachedComments.map((e: any) => String(e)) + : [], + }; + }, + + toJSON(message: SourceCodeInfo_Location): unknown { + const obj: any = {}; + if (message.path?.length) { + obj.path = message.path.map((e) => Math.round(e)); + } + if (message.span?.length) { + obj.span = message.span.map((e) => Math.round(e)); + } + if (message.leadingComments !== undefined && message.leadingComments !== "") { + obj.leadingComments = message.leadingComments; + } + if (message.trailingComments !== undefined && message.trailingComments !== "") { + obj.trailingComments = message.trailingComments; + } + if (message.leadingDetachedComments?.length) { + obj.leadingDetachedComments = message.leadingDetachedComments; + } + return obj; + }, + + create(base?: DeepPartial): SourceCodeInfo_Location { + return SourceCodeInfo_Location.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): SourceCodeInfo_Location { + const message = createBaseSourceCodeInfo_Location(); + message.path = object.path?.map((e) => e) || []; + message.span = object.span?.map((e) => e) || []; + message.leadingComments = object.leadingComments ?? ""; + message.trailingComments = object.trailingComments ?? ""; + message.leadingDetachedComments = object.leadingDetachedComments?.map((e) => e) || []; + return message; + }, }; function createBaseGeneratedCodeInfo(): GeneratedCodeInfo { - return { annotation: [] }; + return { annotation: [] }; } export const GeneratedCodeInfo = { - encode( - message: GeneratedCodeInfo, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if ( - message.annotation !== undefined && - message.annotation.length !== 0 - ) { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork(), - ).ldelim(); - } - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGeneratedCodeInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.annotation!.push( - GeneratedCodeInfo_Annotation.decode( - reader, - reader.uint32(), - ), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo { - return { - annotation: Array.isArray(object?.annotation) - ? object.annotation.map((e: any) => - GeneratedCodeInfo_Annotation.fromJSON(e), - ) - : [], - }; - }, - - toJSON(message: GeneratedCodeInfo): unknown { - const obj: any = {}; - if (message.annotation?.length) { - obj.annotation = message.annotation.map((e) => - GeneratedCodeInfo_Annotation.toJSON(e), - ); - } - return obj; - }, - - create(base?: DeepPartial): GeneratedCodeInfo { - return GeneratedCodeInfo.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): GeneratedCodeInfo { - const message = createBaseGeneratedCodeInfo(); - message.annotation = - object.annotation?.map((e) => - GeneratedCodeInfo_Annotation.fromPartial(e), - ) || []; - return message; - }, + encode(message: GeneratedCodeInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.annotation !== undefined && message.annotation.length !== 0) { + for (const v of message.annotation) { + GeneratedCodeInfo_Annotation.encode(v!, writer.uint32(10).fork()).ldelim(); + } + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): GeneratedCodeInfo { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGeneratedCodeInfo(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.annotation!.push(GeneratedCodeInfo_Annotation.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): GeneratedCodeInfo { + return { + annotation: Array.isArray(object?.annotation) + ? object.annotation.map((e: any) => GeneratedCodeInfo_Annotation.fromJSON(e)) + : [], + }; + }, + + toJSON(message: GeneratedCodeInfo): unknown { + const obj: any = {}; + if (message.annotation?.length) { + obj.annotation = message.annotation.map((e) => GeneratedCodeInfo_Annotation.toJSON(e)); + } + return obj; + }, + + create(base?: DeepPartial): GeneratedCodeInfo { + return GeneratedCodeInfo.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): GeneratedCodeInfo { + const message = createBaseGeneratedCodeInfo(); + message.annotation = object.annotation?.map((e) => GeneratedCodeInfo_Annotation.fromPartial(e)) || []; + return message; + }, }; function createBaseGeneratedCodeInfo_Annotation(): GeneratedCodeInfo_Annotation { - return { path: [], sourceFile: "", begin: 0, end: 0 }; + return { path: [], sourceFile: "", begin: 0, end: 0 }; } export const GeneratedCodeInfo_Annotation = { - encode( - message: GeneratedCodeInfo_Annotation, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.path !== undefined && message.path.length !== 0) { - writer.uint32(10).fork(); - for (const v of message.path) { - writer.int32(v); - } - writer.ldelim(); - } - if (message.sourceFile !== undefined && message.sourceFile !== "") { - writer.uint32(18).string(message.sourceFile); - } - if (message.begin !== undefined && message.begin !== 0) { - writer.uint32(24).int32(message.begin); - } - if (message.end !== undefined && message.end !== 0) { - writer.uint32(32).int32(message.end); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): GeneratedCodeInfo_Annotation { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGeneratedCodeInfo_Annotation(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag === 8) { - message.path!.push(reader.int32()); - - continue; - } - - if (tag === 10) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.path!.push(reader.int32()); - } - - continue; - } - - break; - case 2: - if (tag !== 18) { - break; - } - - message.sourceFile = reader.string(); - continue; - case 3: - if (tag !== 24) { - break; - } - - message.begin = reader.int32(); - continue; - case 4: - if (tag !== 32) { - break; - } - - message.end = reader.int32(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; + encode(message: GeneratedCodeInfo_Annotation, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.path !== undefined && message.path.length !== 0) { + writer.uint32(10).fork(); + for (const v of message.path) { + writer.int32(v); + } + writer.ldelim(); + } + if (message.sourceFile !== undefined && message.sourceFile !== "") { + writer.uint32(18).string(message.sourceFile); + } + if (message.begin !== undefined && message.begin !== 0) { + writer.uint32(24).int32(message.begin); + } + if (message.end !== undefined && message.end !== 0) { + writer.uint32(32).int32(message.end); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): GeneratedCodeInfo_Annotation { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGeneratedCodeInfo_Annotation(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag === 8) { + message.path!.push(reader.int32()); + + continue; + } + + if (tag === 10) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + message.path!.push(reader.int32()); } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): GeneratedCodeInfo_Annotation { - return { - path: Array.isArray(object?.path) - ? object.path.map((e: any) => Number(e)) - : [], - sourceFile: isSet(object.sourceFile) - ? String(object.sourceFile) - : "", - begin: isSet(object.begin) ? Number(object.begin) : 0, - end: isSet(object.end) ? Number(object.end) : 0, - }; - }, - - toJSON(message: GeneratedCodeInfo_Annotation): unknown { - const obj: any = {}; - if (message.path?.length) { - obj.path = message.path.map((e) => Math.round(e)); - } - if (message.sourceFile !== undefined && message.sourceFile !== "") { - obj.sourceFile = message.sourceFile; - } - if (message.begin !== undefined && message.begin !== 0) { - obj.begin = Math.round(message.begin); - } - if (message.end !== undefined && message.end !== 0) { - obj.end = Math.round(message.end); - } - return obj; - }, - - create( - base?: DeepPartial, - ): GeneratedCodeInfo_Annotation { - return GeneratedCodeInfo_Annotation.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): GeneratedCodeInfo_Annotation { - const message = createBaseGeneratedCodeInfo_Annotation(); - message.path = object.path?.map((e) => e) || []; - message.sourceFile = object.sourceFile ?? ""; - message.begin = object.begin ?? 0; - message.end = object.end ?? 0; - return message; - }, + + continue; + } + + break; + case 2: + if (tag !== 18) { + break; + } + + message.sourceFile = reader.string(); + continue; + case 3: + if (tag !== 24) { + break; + } + + message.begin = reader.int32(); + continue; + case 4: + if (tag !== 32) { + break; + } + + message.end = reader.int32(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): GeneratedCodeInfo_Annotation { + return { + path: Array.isArray(object?.path) ? object.path.map((e: any) => Number(e)) : [], + sourceFile: isSet(object.sourceFile) ? String(object.sourceFile) : "", + begin: isSet(object.begin) ? Number(object.begin) : 0, + end: isSet(object.end) ? Number(object.end) : 0, + }; + }, + + toJSON(message: GeneratedCodeInfo_Annotation): unknown { + const obj: any = {}; + if (message.path?.length) { + obj.path = message.path.map((e) => Math.round(e)); + } + if (message.sourceFile !== undefined && message.sourceFile !== "") { + obj.sourceFile = message.sourceFile; + } + if (message.begin !== undefined && message.begin !== 0) { + obj.begin = Math.round(message.begin); + } + if (message.end !== undefined && message.end !== 0) { + obj.end = Math.round(message.end); + } + return obj; + }, + + create(base?: DeepPartial): GeneratedCodeInfo_Annotation { + return GeneratedCodeInfo_Annotation.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): GeneratedCodeInfo_Annotation { + const message = createBaseGeneratedCodeInfo_Annotation(); + message.path = object.path?.map((e) => e) || []; + message.sourceFile = object.sourceFile ?? ""; + message.begin = object.begin ?? 0; + message.end = object.end ?? 0; + return message; + }, }; declare const self: any | undefined; declare const window: any | undefined; declare const global: any | undefined; const tsProtoGlobalThis: any = (() => { - if (typeof globalThis !== "undefined") { - return globalThis; - } - if (typeof self !== "undefined") { - return self; - } - if (typeof window !== "undefined") { - return window; - } - if (typeof global !== "undefined") { - return global; - } - throw "Unable to locate global object"; + if (typeof globalThis !== "undefined") { + return globalThis; + } + if (typeof self !== "undefined") { + return self; + } + if (typeof window !== "undefined") { + return window; + } + if (typeof global !== "undefined") { + return global; + } + throw "Unable to locate global object"; })(); function bytesFromBase64(b64: string): Uint8Array { - if (tsProtoGlobalThis.Buffer) { - return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64")); - } else { - const bin = tsProtoGlobalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; + if (tsProtoGlobalThis.Buffer) { + return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64")); + } else { + const bin = tsProtoGlobalThis.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 (tsProtoGlobalThis.Buffer) { - return tsProtoGlobalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return tsProtoGlobalThis.btoa(bin.join("")); - } + if (tsProtoGlobalThis.Buffer) { + return tsProtoGlobalThis.Buffer.from(arr).toString("base64"); + } else { + const bin: string[] = []; + arr.forEach((byte) => { + bin.push(String.fromCharCode(byte)); + }); + return tsProtoGlobalThis.btoa(bin.join("")); + } } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new tsProtoGlobalThis.Error( - "Value is larger than Number.MAX_SAFE_INTEGER", - ); - } - return long.toNumber(); + if (long.gt(Number.MAX_SAFE_INTEGER)) { + throw new tsProtoGlobalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); + } + return long.toNumber(); } if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); + _m0.util.Long = Long as any; + _m0.configure(); } function isSet(value: any): boolean { - return value !== null && value !== undefined; + return value !== null && value !== undefined; } diff --git a/web/src/proto/sdk/options/v1/options.ts b/web/src/proto/sdk/options/v1/options.ts index 67e472b2f..fff219704 100644 --- a/web/src/proto/sdk/options/v1/options.ts +++ b/web/src/proto/sdk/options/v1/options.ts @@ -3,160 +3,133 @@ import _m0 from "protobufjs/minimal"; /** Configuration for Trinsic SDK Services */ export interface TrinsicOptions { - /** Trinsic API endpoint. Defaults to `prod.trinsic.cloud` */ - serverEndpoint?: string | undefined; - /** Trinsic API port; defaults to `443` */ - serverPort?: number | undefined; - /** Whether TLS is enabled between SDK and Trinsic API; defaults to `true` */ - serverUseTls?: boolean | undefined; - /** Authentication token for SDK calls; defaults to empty string (unauthenticated) */ - authToken?: string | undefined; + /** Trinsic API endpoint. Defaults to `prod.trinsic.cloud` */ + serverEndpoint?: + | string + | undefined; + /** Trinsic API port; defaults to `443` */ + serverPort?: + | number + | undefined; + /** Whether TLS is enabled between SDK and Trinsic API; defaults to `true` */ + serverUseTls?: + | boolean + | undefined; + /** Authentication token for SDK calls; defaults to empty string (unauthenticated) */ + authToken?: string | undefined; } function createBaseTrinsicOptions(): TrinsicOptions { - return { - serverEndpoint: "", - serverPort: 0, - serverUseTls: false, - authToken: "", - }; + return { serverEndpoint: "", serverPort: 0, serverUseTls: false, authToken: "" }; } export const TrinsicOptions = { - encode( - message: TrinsicOptions, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if ( - message.serverEndpoint !== undefined && - message.serverEndpoint !== "" - ) { - writer.uint32(10).string(message.serverEndpoint); - } - if (message.serverPort !== undefined && message.serverPort !== 0) { - writer.uint32(16).int32(message.serverPort); - } - if (message.serverUseTls === true) { - writer.uint32(24).bool(message.serverUseTls); - } - if (message.authToken !== undefined && message.authToken !== "") { - writer.uint32(34).string(message.authToken); - } - return writer; - }, + encode(message: TrinsicOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.serverEndpoint !== undefined && message.serverEndpoint !== "") { + writer.uint32(10).string(message.serverEndpoint); + } + if (message.serverPort !== undefined && message.serverPort !== 0) { + writer.uint32(16).int32(message.serverPort); + } + if (message.serverUseTls === true) { + writer.uint32(24).bool(message.serverUseTls); + } + if (message.authToken !== undefined && message.authToken !== "") { + writer.uint32(34).string(message.authToken); + } + return writer; + }, - decode(input: _m0.Reader | Uint8Array, length?: number): TrinsicOptions { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTrinsicOptions(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } + decode(input: _m0.Reader | Uint8Array, length?: number): TrinsicOptions { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTrinsicOptions(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - message.serverEndpoint = reader.string(); - continue; - case 2: - if (tag !== 16) { - break; - } + message.serverEndpoint = reader.string(); + continue; + case 2: + if (tag !== 16) { + break; + } - message.serverPort = reader.int32(); - continue; - case 3: - if (tag !== 24) { - break; - } + message.serverPort = reader.int32(); + continue; + case 3: + if (tag !== 24) { + break; + } - message.serverUseTls = reader.bool(); - continue; - case 4: - if (tag !== 34) { - break; - } + message.serverUseTls = reader.bool(); + continue; + case 4: + if (tag !== 34) { + break; + } - message.authToken = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + message.authToken = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - fromJSON(object: any): TrinsicOptions { - return { - serverEndpoint: isSet(object.serverEndpoint) - ? String(object.serverEndpoint) - : "", - serverPort: isSet(object.serverPort) - ? Number(object.serverPort) - : 0, - serverUseTls: isSet(object.serverUseTls) - ? Boolean(object.serverUseTls) - : false, - authToken: isSet(object.authToken) ? String(object.authToken) : "", - }; - }, + fromJSON(object: any): TrinsicOptions { + return { + serverEndpoint: isSet(object.serverEndpoint) ? String(object.serverEndpoint) : "", + serverPort: isSet(object.serverPort) ? Number(object.serverPort) : 0, + serverUseTls: isSet(object.serverUseTls) ? Boolean(object.serverUseTls) : false, + authToken: isSet(object.authToken) ? String(object.authToken) : "", + }; + }, - toJSON(message: TrinsicOptions): unknown { - const obj: any = {}; - if ( - message.serverEndpoint !== undefined && - message.serverEndpoint !== "" - ) { - obj.serverEndpoint = message.serverEndpoint; - } - if (message.serverPort !== undefined && message.serverPort !== 0) { - obj.serverPort = Math.round(message.serverPort); - } - if (message.serverUseTls === true) { - obj.serverUseTls = message.serverUseTls; - } - if (message.authToken !== undefined && message.authToken !== "") { - obj.authToken = message.authToken; - } - return obj; - }, + toJSON(message: TrinsicOptions): unknown { + const obj: any = {}; + if (message.serverEndpoint !== undefined && message.serverEndpoint !== "") { + obj.serverEndpoint = message.serverEndpoint; + } + if (message.serverPort !== undefined && message.serverPort !== 0) { + obj.serverPort = Math.round(message.serverPort); + } + if (message.serverUseTls === true) { + obj.serverUseTls = message.serverUseTls; + } + if (message.authToken !== undefined && message.authToken !== "") { + obj.authToken = message.authToken; + } + return obj; + }, - create(base?: DeepPartial): TrinsicOptions { - return TrinsicOptions.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): TrinsicOptions { - const message = createBaseTrinsicOptions(); - message.serverEndpoint = object.serverEndpoint ?? ""; - message.serverPort = object.serverPort ?? 0; - message.serverUseTls = object.serverUseTls ?? false; - message.authToken = object.authToken ?? ""; - return message; - }, + create(base?: DeepPartial): TrinsicOptions { + return TrinsicOptions.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): TrinsicOptions { + const message = createBaseTrinsicOptions(); + message.serverEndpoint = object.serverEndpoint ?? ""; + message.serverPort = object.serverPort ?? 0; + message.serverUseTls = object.serverUseTls ?? false; + message.authToken = object.authToken ?? ""; + return message; + }, }; -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; function isSet(value: any): boolean { - return value !== null && value !== undefined; + return value !== null && value !== undefined; } diff --git a/web/src/proto/services/account/v1/account.ts b/web/src/proto/services/account/v1/account.ts index 630e4a04a..e68092d2b 100644 --- a/web/src/proto/services/account/v1/account.ts +++ b/web/src/proto/services/account/v1/account.ts @@ -3,88 +3,94 @@ import _m0 from "protobufjs/minimal"; /** Confirmation method type for two-factor workflows */ export enum ConfirmationMethod { - /** None - No confirmation required */ - None = 0, - /** Email - Email confirmation required */ - Email = 1, - /** Sms - SMS confirmation required */ - Sms = 2, - /** ConnectedDevice - Confirmation from a connected device is required */ - ConnectedDevice = 3, - /** Other - Third-party method of confirmation is required */ - Other = 10, - UNRECOGNIZED = -1, + /** None - No confirmation required */ + None = 0, + /** Email - Email confirmation required */ + Email = 1, + /** Sms - SMS confirmation required */ + Sms = 2, + /** ConnectedDevice - Confirmation from a connected device is required */ + ConnectedDevice = 3, + /** Other - Third-party method of confirmation is required */ + Other = 10, + UNRECOGNIZED = -1, } export function confirmationMethodFromJSON(object: any): ConfirmationMethod { - switch (object) { - case 0: - case "None": - return ConfirmationMethod.None; - case 1: - case "Email": - return ConfirmationMethod.Email; - case 2: - case "Sms": - return ConfirmationMethod.Sms; - case 3: - case "ConnectedDevice": - return ConfirmationMethod.ConnectedDevice; - case 10: - case "Other": - return ConfirmationMethod.Other; - case -1: - case "UNRECOGNIZED": - default: - return ConfirmationMethod.UNRECOGNIZED; - } + switch (object) { + case 0: + case "None": + return ConfirmationMethod.None; + case 1: + case "Email": + return ConfirmationMethod.Email; + case 2: + case "Sms": + return ConfirmationMethod.Sms; + case 3: + case "ConnectedDevice": + return ConfirmationMethod.ConnectedDevice; + case 10: + case "Other": + return ConfirmationMethod.Other; + case -1: + case "UNRECOGNIZED": + default: + return ConfirmationMethod.UNRECOGNIZED; + } } export function confirmationMethodToJSON(object: ConfirmationMethod): string { - switch (object) { - case ConfirmationMethod.None: - return "None"; - case ConfirmationMethod.Email: - return "Email"; - case ConfirmationMethod.Sms: - return "Sms"; - case ConfirmationMethod.ConnectedDevice: - return "ConnectedDevice"; - case ConfirmationMethod.Other: - return "Other"; - case ConfirmationMethod.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } + switch (object) { + case ConfirmationMethod.None: + return "None"; + case ConfirmationMethod.Email: + return "Email"; + case ConfirmationMethod.Sms: + return "Sms"; + case ConfirmationMethod.ConnectedDevice: + return "ConnectedDevice"; + case ConfirmationMethod.Other: + return "Other"; + case ConfirmationMethod.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } } /** Account registration details */ export interface AccountDetails { - /** Account name */ - name?: string | undefined; - /** - * Email address of account. - * - * @deprecated - */ - email?: string | undefined; - /** - * SMS number including country code - * - * @deprecated - */ - sms?: string | undefined; + /** Account name */ + name?: + | string + | undefined; + /** + * Email address of account. + * + * @deprecated + */ + email?: + | string + | undefined; + /** + * SMS number including country code + * + * @deprecated + */ + sms?: string | undefined; } /** Token protection info */ export interface TokenProtection { - /** - * Indicates if token is protected using a PIN, - * security code, HSM secret, etc. - */ - enabled?: boolean | undefined; - /** The method used to protect the token */ - method?: ConfirmationMethod | undefined; + /** + * Indicates if token is protected using a PIN, + * security code, HSM secret, etc. + */ + enabled?: + | boolean + | undefined; + /** The method used to protect the token */ + method?: ConfirmationMethod | undefined; } /** @@ -92,1201 +98,1056 @@ export interface TokenProtection { * This information should be stored securely */ export interface AccountProfile { - /** - * The type of profile, used to differentiate between - * protocol schemes or versions - */ - profileType?: string | undefined; - /** Auth data containg information about the current device access */ - authData?: Uint8Array | undefined; - /** Secure token issued by server used to generate zero-knowledge proofs */ - authToken?: Uint8Array | undefined; - /** - * Token security information about the token. - * If token protection is enabled, implementations must supply - * protection secret before using the token for authentication. - */ - protection?: TokenProtection | undefined; + /** + * The type of profile, used to differentiate between + * protocol schemes or versions + */ + profileType?: + | string + | undefined; + /** Auth data containg information about the current device access */ + authData?: + | Uint8Array + | undefined; + /** Secure token issued by server used to generate zero-knowledge proofs */ + authToken?: + | Uint8Array + | undefined; + /** + * Token security information about the token. + * If token protection is enabled, implementations must supply + * protection secret before using the token for authentication. + */ + protection?: TokenProtection | undefined; } /** Request for information about the account used to make the request */ -export interface AccountInfoRequest {} +export interface AccountInfoRequest { +} /** Information about the account used to make the request */ export interface AccountInfoResponse { - /** - * The account details associated with - * the calling request context - */ - details?: AccountDetails | undefined; - /** The wallet ID associated with this account */ - walletId?: string | undefined; - /** The device ID associated with this account session */ - deviceId?: string | undefined; - /** The ecosystem ID within which this account resides */ - ecosystemId?: string | undefined; - /** - * The public DID associated with this account. - * This DID is used as the `issuer` when signing verifiable credentials - */ - publicDid?: string | undefined; - /** - * List of active authentication tokens for this wallet. - * This list does not contain the issued token, only metadata - * such as ID, description, and creation date. - */ - authTokens?: WalletAuthToken[] | undefined; + /** + * The account details associated with + * the calling request context + */ + details?: + | AccountDetails + | undefined; + /** The wallet ID associated with this account */ + walletId?: + | string + | undefined; + /** The device ID associated with this account session */ + deviceId?: + | string + | undefined; + /** The ecosystem ID within which this account resides */ + ecosystemId?: + | string + | undefined; + /** + * The public DID associated with this account. + * This DID is used as the `issuer` when signing verifiable credentials + */ + publicDid?: + | string + | undefined; + /** + * List of active authentication tokens for this wallet. + * This list does not contain the issued token, only metadata + * such as ID, description, and creation date. + */ + authTokens?: WalletAuthToken[] | undefined; } /** Request to begin login flow */ export interface LoginRequest { - /** Email address of account. If unspecified, an anonymous account will be created. */ - email?: string | undefined; - /** ID of Ecosystem to sign into. */ - ecosystemId?: string | undefined; + /** Email address of account. If unspecified, an anonymous account will be created. */ + email?: + | string + | undefined; + /** ID of Ecosystem to sign into. */ + ecosystemId?: string | undefined; } /** Response to `LoginRequest` */ export interface LoginResponse { - /** - * Random byte sequence unique to this login request. - * If present, two-factor confirmation of login is required. - * Must be sent back, unaltered, in `LoginConfirm`. - */ - challenge?: Uint8Array | undefined; - /** Account profile response. If present, no confirmation of login is required. */ - profile?: AccountProfile | undefined; + /** + * Random byte sequence unique to this login request. + * If present, two-factor confirmation of login is required. + * Must be sent back, unaltered, in `LoginConfirm`. + */ + challenge?: + | Uint8Array + | undefined; + /** Account profile response. If present, no confirmation of login is required. */ + profile?: AccountProfile | undefined; } /** Request to finalize login flow */ export interface LoginConfirmRequest { - /** Challenge received from `Login` */ - challenge?: Uint8Array | undefined; - /** - * Two-factor confirmation code sent to account email or phone, - * hashed using Blake3. Our SDKs will handle this hashing process for you. - */ - confirmationCodeHashed?: Uint8Array | undefined; + /** Challenge received from `Login` */ + challenge?: + | Uint8Array + | undefined; + /** + * Two-factor confirmation code sent to account email or phone, + * hashed using Blake3. Our SDKs will handle this hashing process for you. + */ + confirmationCodeHashed?: Uint8Array | undefined; } /** Response to `LoginConfirmRequest` */ export interface LoginConfirmResponse { - /** - * Profile response; must be unprotected using unhashed confirmation code. - * Our SDKs will handle this process for you, and return to you an authentication token string. - */ - profile?: AccountProfile | undefined; + /** + * Profile response; must be unprotected using unhashed confirmation code. + * Our SDKs will handle this process for you, and return to you an authentication token string. + */ + profile?: AccountProfile | undefined; } /** Information about authentication tokens for a wallet */ export interface WalletAuthToken { - /** - * Unique identifier for the token. - * This field will match the `DeviceId` in the WalletAuthData - */ - id?: string | undefined; - /** Device name/description */ - description?: string | undefined; - /** Date when the token was created in ISO 8601 format */ - dateCreated?: string | undefined; + /** + * Unique identifier for the token. + * This field will match the `DeviceId` in the WalletAuthData + */ + id?: + | string + | undefined; + /** Device name/description */ + description?: + | string + | undefined; + /** Date when the token was created in ISO 8601 format */ + dateCreated?: string | undefined; } function createBaseAccountDetails(): AccountDetails { - return { name: "", email: "", sms: "" }; + return { name: "", email: "", sms: "" }; } export const AccountDetails = { - encode( - message: AccountDetails, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.name !== undefined && message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.email !== undefined && message.email !== "") { - writer.uint32(18).string(message.email); - } - if (message.sms !== undefined && message.sms !== "") { - writer.uint32(26).string(message.sms); - } - return writer; - }, + encode(message: AccountDetails, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.name !== undefined && message.name !== "") { + writer.uint32(10).string(message.name); + } + if (message.email !== undefined && message.email !== "") { + writer.uint32(18).string(message.email); + } + if (message.sms !== undefined && message.sms !== "") { + writer.uint32(26).string(message.sms); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): AccountDetails { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAccountDetails(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - decode(input: _m0.Reader | Uint8Array, length?: number): AccountDetails { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAccountDetails(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.name = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.email = reader.string(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.sms = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + message.name = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } - fromJSON(object: any): AccountDetails { - return { - name: isSet(object.name) ? String(object.name) : "", - email: isSet(object.email) ? String(object.email) : "", - sms: isSet(object.sms) ? String(object.sms) : "", - }; - }, + message.email = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.sms = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: AccountDetails): unknown { - const obj: any = {}; - if (message.name !== undefined && message.name !== "") { - obj.name = message.name; - } - if (message.email !== undefined && message.email !== "") { - obj.email = message.email; - } - if (message.sms !== undefined && message.sms !== "") { - obj.sms = message.sms; - } - return obj; - }, + fromJSON(object: any): AccountDetails { + return { + name: isSet(object.name) ? String(object.name) : "", + email: isSet(object.email) ? String(object.email) : "", + sms: isSet(object.sms) ? String(object.sms) : "", + }; + }, - create(base?: DeepPartial): AccountDetails { - return AccountDetails.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): AccountDetails { - const message = createBaseAccountDetails(); - message.name = object.name ?? ""; - message.email = object.email ?? ""; - message.sms = object.sms ?? ""; - return message; - }, + toJSON(message: AccountDetails): unknown { + const obj: any = {}; + if (message.name !== undefined && message.name !== "") { + obj.name = message.name; + } + if (message.email !== undefined && message.email !== "") { + obj.email = message.email; + } + if (message.sms !== undefined && message.sms !== "") { + obj.sms = message.sms; + } + return obj; + }, + + create(base?: DeepPartial): AccountDetails { + return AccountDetails.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): AccountDetails { + const message = createBaseAccountDetails(); + message.name = object.name ?? ""; + message.email = object.email ?? ""; + message.sms = object.sms ?? ""; + return message; + }, }; function createBaseTokenProtection(): TokenProtection { - return { enabled: false, method: 0 }; + return { enabled: false, method: 0 }; } export const TokenProtection = { - encode( - message: TokenProtection, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.enabled === true) { - writer.uint32(8).bool(message.enabled); - } - if (message.method !== undefined && message.method !== 0) { - writer.uint32(16).int32(message.method); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): TokenProtection { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTokenProtection(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.enabled = reader.bool(); - continue; - case 2: - if (tag !== 16) { - break; - } - - message.method = reader.int32() as any; - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: TokenProtection, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.enabled === true) { + writer.uint32(8).bool(message.enabled); + } + if (message.method !== undefined && message.method !== 0) { + writer.uint32(16).int32(message.method); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): TokenProtection { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTokenProtection(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } - fromJSON(object: any): TokenProtection { - return { - enabled: isSet(object.enabled) ? Boolean(object.enabled) : false, - method: isSet(object.method) - ? confirmationMethodFromJSON(object.method) - : 0, - }; - }, + message.enabled = reader.bool(); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.method = reader.int32() as any; + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: TokenProtection): unknown { - const obj: any = {}; - if (message.enabled === true) { - obj.enabled = message.enabled; - } - if (message.method !== undefined && message.method !== 0) { - obj.method = confirmationMethodToJSON(message.method); - } - return obj; - }, + fromJSON(object: any): TokenProtection { + return { + enabled: isSet(object.enabled) ? Boolean(object.enabled) : false, + method: isSet(object.method) ? confirmationMethodFromJSON(object.method) : 0, + }; + }, - create(base?: DeepPartial): TokenProtection { - return TokenProtection.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): TokenProtection { - const message = createBaseTokenProtection(); - message.enabled = object.enabled ?? false; - message.method = object.method ?? 0; - return message; - }, + toJSON(message: TokenProtection): unknown { + const obj: any = {}; + if (message.enabled === true) { + obj.enabled = message.enabled; + } + if (message.method !== undefined && message.method !== 0) { + obj.method = confirmationMethodToJSON(message.method); + } + return obj; + }, + + create(base?: DeepPartial): TokenProtection { + return TokenProtection.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): TokenProtection { + const message = createBaseTokenProtection(); + message.enabled = object.enabled ?? false; + message.method = object.method ?? 0; + return message; + }, }; function createBaseAccountProfile(): AccountProfile { - return { - profileType: "", - authData: new Uint8Array(0), - authToken: new Uint8Array(0), - protection: undefined, - }; + return { profileType: "", authData: new Uint8Array(0), authToken: new Uint8Array(0), protection: undefined }; } export const AccountProfile = { - encode( - message: AccountProfile, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.profileType !== undefined && message.profileType !== "") { - writer.uint32(10).string(message.profileType); - } - if (message.authData !== undefined && message.authData.length !== 0) { - writer.uint32(18).bytes(message.authData); - } - if (message.authToken !== undefined && message.authToken.length !== 0) { - writer.uint32(26).bytes(message.authToken); - } - if (message.protection !== undefined) { - TokenProtection.encode( - message.protection, - writer.uint32(34).fork(), - ).ldelim(); - } - return writer; - }, + encode(message: AccountProfile, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.profileType !== undefined && message.profileType !== "") { + writer.uint32(10).string(message.profileType); + } + if (message.authData !== undefined && message.authData.length !== 0) { + writer.uint32(18).bytes(message.authData); + } + if (message.authToken !== undefined && message.authToken.length !== 0) { + writer.uint32(26).bytes(message.authToken); + } + if (message.protection !== undefined) { + TokenProtection.encode(message.protection, writer.uint32(34).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): AccountProfile { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAccountProfile(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - decode(input: _m0.Reader | Uint8Array, length?: number): AccountProfile { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAccountProfile(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.profileType = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.authData = reader.bytes(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.authToken = reader.bytes(); - continue; - case 4: - if (tag !== 34) { - break; - } - - message.protection = TokenProtection.decode( - reader, - reader.uint32(), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + message.profileType = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } - fromJSON(object: any): AccountProfile { - return { - profileType: isSet(object.profileType) - ? String(object.profileType) - : "", - authData: isSet(object.authData) - ? bytesFromBase64(object.authData) - : new Uint8Array(0), - authToken: isSet(object.authToken) - ? bytesFromBase64(object.authToken) - : new Uint8Array(0), - protection: isSet(object.protection) - ? TokenProtection.fromJSON(object.protection) - : undefined, - }; - }, + message.authData = reader.bytes(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.authToken = reader.bytes(); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.protection = TokenProtection.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: AccountProfile): unknown { - const obj: any = {}; - if (message.profileType !== undefined && message.profileType !== "") { - obj.profileType = message.profileType; - } - if (message.authData !== undefined && message.authData.length !== 0) { - obj.authData = base64FromBytes(message.authData); - } - if (message.authToken !== undefined && message.authToken.length !== 0) { - obj.authToken = base64FromBytes(message.authToken); - } - if (message.protection !== undefined) { - obj.protection = TokenProtection.toJSON(message.protection); - } - return obj; - }, + fromJSON(object: any): AccountProfile { + return { + profileType: isSet(object.profileType) ? String(object.profileType) : "", + authData: isSet(object.authData) ? bytesFromBase64(object.authData) : new Uint8Array(0), + authToken: isSet(object.authToken) ? bytesFromBase64(object.authToken) : new Uint8Array(0), + protection: isSet(object.protection) ? TokenProtection.fromJSON(object.protection) : undefined, + }; + }, - create(base?: DeepPartial): AccountProfile { - return AccountProfile.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): AccountProfile { - const message = createBaseAccountProfile(); - message.profileType = object.profileType ?? ""; - message.authData = object.authData ?? new Uint8Array(0); - message.authToken = object.authToken ?? new Uint8Array(0); - message.protection = - object.protection !== undefined && object.protection !== null - ? TokenProtection.fromPartial(object.protection) - : undefined; - return message; - }, + toJSON(message: AccountProfile): unknown { + const obj: any = {}; + if (message.profileType !== undefined && message.profileType !== "") { + obj.profileType = message.profileType; + } + if (message.authData !== undefined && message.authData.length !== 0) { + obj.authData = base64FromBytes(message.authData); + } + if (message.authToken !== undefined && message.authToken.length !== 0) { + obj.authToken = base64FromBytes(message.authToken); + } + if (message.protection !== undefined) { + obj.protection = TokenProtection.toJSON(message.protection); + } + return obj; + }, + + create(base?: DeepPartial): AccountProfile { + return AccountProfile.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): AccountProfile { + const message = createBaseAccountProfile(); + message.profileType = object.profileType ?? ""; + message.authData = object.authData ?? new Uint8Array(0); + message.authToken = object.authToken ?? new Uint8Array(0); + message.protection = (object.protection !== undefined && object.protection !== null) + ? TokenProtection.fromPartial(object.protection) + : undefined; + return message; + }, }; function createBaseAccountInfoRequest(): AccountInfoRequest { - return {}; + return {}; } export const AccountInfoRequest = { - encode( - _: AccountInfoRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): AccountInfoRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAccountInfoRequest(); - 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): AccountInfoRequest { - return {}; - }, - - toJSON(_: AccountInfoRequest): unknown { - const obj: any = {}; - return obj; - }, + encode(_: AccountInfoRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): AccountInfoRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAccountInfoRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - create(base?: DeepPartial): AccountInfoRequest { - return AccountInfoRequest.fromPartial(base ?? {}); - }, - fromPartial(_: DeepPartial): AccountInfoRequest { - const message = createBaseAccountInfoRequest(); - return message; - }, + fromJSON(_: any): AccountInfoRequest { + return {}; + }, + + toJSON(_: AccountInfoRequest): unknown { + const obj: any = {}; + return obj; + }, + + create(base?: DeepPartial): AccountInfoRequest { + return AccountInfoRequest.fromPartial(base ?? {}); + }, + fromPartial(_: DeepPartial): AccountInfoRequest { + const message = createBaseAccountInfoRequest(); + return message; + }, }; function createBaseAccountInfoResponse(): AccountInfoResponse { - return { - details: undefined, - walletId: "", - deviceId: "", - ecosystemId: "", - publicDid: "", - authTokens: [], - }; + return { details: undefined, walletId: "", deviceId: "", ecosystemId: "", publicDid: "", authTokens: [] }; } export const AccountInfoResponse = { - encode( - message: AccountInfoResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.details !== undefined) { - AccountDetails.encode( - message.details, - writer.uint32(10).fork(), - ).ldelim(); - } - if (message.walletId !== undefined && message.walletId !== "") { - writer.uint32(26).string(message.walletId); - } - if (message.deviceId !== undefined && message.deviceId !== "") { - writer.uint32(34).string(message.deviceId); - } - if (message.ecosystemId !== undefined && message.ecosystemId !== "") { - writer.uint32(42).string(message.ecosystemId); - } - if (message.publicDid !== undefined && message.publicDid !== "") { - writer.uint32(50).string(message.publicDid); - } - if ( - message.authTokens !== undefined && - message.authTokens.length !== 0 - ) { - for (const v of message.authTokens) { - WalletAuthToken.encode(v!, writer.uint32(66).fork()).ldelim(); - } - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): AccountInfoResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAccountInfoResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.details = AccountDetails.decode( - reader, - reader.uint32(), - ); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.walletId = reader.string(); - continue; - case 4: - if (tag !== 34) { - break; - } - - message.deviceId = reader.string(); - continue; - case 5: - if (tag !== 42) { - break; - } - - message.ecosystemId = reader.string(); - continue; - case 6: - if (tag !== 50) { - break; - } - - message.publicDid = reader.string(); - continue; - case 8: - if (tag !== 66) { - break; - } - - message.authTokens!.push( - WalletAuthToken.decode(reader, reader.uint32()), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: AccountInfoResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.details !== undefined) { + AccountDetails.encode(message.details, writer.uint32(10).fork()).ldelim(); + } + if (message.walletId !== undefined && message.walletId !== "") { + writer.uint32(26).string(message.walletId); + } + if (message.deviceId !== undefined && message.deviceId !== "") { + writer.uint32(34).string(message.deviceId); + } + if (message.ecosystemId !== undefined && message.ecosystemId !== "") { + writer.uint32(42).string(message.ecosystemId); + } + if (message.publicDid !== undefined && message.publicDid !== "") { + writer.uint32(50).string(message.publicDid); + } + if (message.authTokens !== undefined && message.authTokens.length !== 0) { + for (const v of message.authTokens) { + WalletAuthToken.encode(v!, writer.uint32(66).fork()).ldelim(); + } + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): AccountInfoResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAccountInfoResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - fromJSON(object: any): AccountInfoResponse { - return { - details: isSet(object.details) - ? AccountDetails.fromJSON(object.details) - : undefined, - walletId: isSet(object.walletId) ? String(object.walletId) : "", - deviceId: isSet(object.deviceId) ? String(object.deviceId) : "", - ecosystemId: isSet(object.ecosystemId) - ? String(object.ecosystemId) - : "", - publicDid: isSet(object.publicDid) ? String(object.publicDid) : "", - authTokens: Array.isArray(object?.authTokens) - ? object.authTokens.map((e: any) => WalletAuthToken.fromJSON(e)) - : [], - }; - }, + message.details = AccountDetails.decode(reader, reader.uint32()); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.walletId = reader.string(); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.deviceId = reader.string(); + continue; + case 5: + if (tag !== 42) { + break; + } + + message.ecosystemId = reader.string(); + continue; + case 6: + if (tag !== 50) { + break; + } + + message.publicDid = reader.string(); + continue; + case 8: + if (tag !== 66) { + break; + } + + message.authTokens!.push(WalletAuthToken.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: AccountInfoResponse): unknown { - const obj: any = {}; - if (message.details !== undefined) { - obj.details = AccountDetails.toJSON(message.details); - } - if (message.walletId !== undefined && message.walletId !== "") { - obj.walletId = message.walletId; - } - if (message.deviceId !== undefined && message.deviceId !== "") { - obj.deviceId = message.deviceId; - } - if (message.ecosystemId !== undefined && message.ecosystemId !== "") { - obj.ecosystemId = message.ecosystemId; - } - if (message.publicDid !== undefined && message.publicDid !== "") { - obj.publicDid = message.publicDid; - } - if (message.authTokens?.length) { - obj.authTokens = message.authTokens.map((e) => - WalletAuthToken.toJSON(e), - ); - } - return obj; - }, + fromJSON(object: any): AccountInfoResponse { + return { + details: isSet(object.details) ? AccountDetails.fromJSON(object.details) : undefined, + walletId: isSet(object.walletId) ? String(object.walletId) : "", + deviceId: isSet(object.deviceId) ? String(object.deviceId) : "", + ecosystemId: isSet(object.ecosystemId) ? String(object.ecosystemId) : "", + publicDid: isSet(object.publicDid) ? String(object.publicDid) : "", + authTokens: Array.isArray(object?.authTokens) + ? object.authTokens.map((e: any) => WalletAuthToken.fromJSON(e)) + : [], + }; + }, - create(base?: DeepPartial): AccountInfoResponse { - return AccountInfoResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): AccountInfoResponse { - const message = createBaseAccountInfoResponse(); - message.details = - object.details !== undefined && object.details !== null - ? AccountDetails.fromPartial(object.details) - : undefined; - message.walletId = object.walletId ?? ""; - message.deviceId = object.deviceId ?? ""; - message.ecosystemId = object.ecosystemId ?? ""; - message.publicDid = object.publicDid ?? ""; - message.authTokens = - object.authTokens?.map((e) => WalletAuthToken.fromPartial(e)) || []; - return message; - }, + toJSON(message: AccountInfoResponse): unknown { + const obj: any = {}; + if (message.details !== undefined) { + obj.details = AccountDetails.toJSON(message.details); + } + if (message.walletId !== undefined && message.walletId !== "") { + obj.walletId = message.walletId; + } + if (message.deviceId !== undefined && message.deviceId !== "") { + obj.deviceId = message.deviceId; + } + if (message.ecosystemId !== undefined && message.ecosystemId !== "") { + obj.ecosystemId = message.ecosystemId; + } + if (message.publicDid !== undefined && message.publicDid !== "") { + obj.publicDid = message.publicDid; + } + if (message.authTokens?.length) { + obj.authTokens = message.authTokens.map((e) => WalletAuthToken.toJSON(e)); + } + return obj; + }, + + create(base?: DeepPartial): AccountInfoResponse { + return AccountInfoResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): AccountInfoResponse { + const message = createBaseAccountInfoResponse(); + message.details = (object.details !== undefined && object.details !== null) + ? AccountDetails.fromPartial(object.details) + : undefined; + message.walletId = object.walletId ?? ""; + message.deviceId = object.deviceId ?? ""; + message.ecosystemId = object.ecosystemId ?? ""; + message.publicDid = object.publicDid ?? ""; + message.authTokens = object.authTokens?.map((e) => WalletAuthToken.fromPartial(e)) || []; + return message; + }, }; function createBaseLoginRequest(): LoginRequest { - return { email: "", ecosystemId: "" }; + return { email: "", ecosystemId: "" }; } export const LoginRequest = { - encode( - message: LoginRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.email !== undefined && message.email !== "") { - writer.uint32(10).string(message.email); - } - if (message.ecosystemId !== undefined && message.ecosystemId !== "") { - writer.uint32(26).string(message.ecosystemId); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): LoginRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLoginRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.email = reader.string(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.ecosystemId = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: LoginRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.email !== undefined && message.email !== "") { + writer.uint32(10).string(message.email); + } + if (message.ecosystemId !== undefined && message.ecosystemId !== "") { + writer.uint32(26).string(message.ecosystemId); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): LoginRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseLoginRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - fromJSON(object: any): LoginRequest { - return { - email: isSet(object.email) ? String(object.email) : "", - ecosystemId: isSet(object.ecosystemId) - ? String(object.ecosystemId) - : "", - }; - }, + message.email = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.ecosystemId = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: LoginRequest): unknown { - const obj: any = {}; - if (message.email !== undefined && message.email !== "") { - obj.email = message.email; - } - if (message.ecosystemId !== undefined && message.ecosystemId !== "") { - obj.ecosystemId = message.ecosystemId; - } - return obj; - }, + fromJSON(object: any): LoginRequest { + return { + email: isSet(object.email) ? String(object.email) : "", + ecosystemId: isSet(object.ecosystemId) ? String(object.ecosystemId) : "", + }; + }, - create(base?: DeepPartial): LoginRequest { - return LoginRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): LoginRequest { - const message = createBaseLoginRequest(); - message.email = object.email ?? ""; - message.ecosystemId = object.ecosystemId ?? ""; - return message; - }, + toJSON(message: LoginRequest): unknown { + const obj: any = {}; + if (message.email !== undefined && message.email !== "") { + obj.email = message.email; + } + if (message.ecosystemId !== undefined && message.ecosystemId !== "") { + obj.ecosystemId = message.ecosystemId; + } + return obj; + }, + + create(base?: DeepPartial): LoginRequest { + return LoginRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): LoginRequest { + const message = createBaseLoginRequest(); + message.email = object.email ?? ""; + message.ecosystemId = object.ecosystemId ?? ""; + return message; + }, }; function createBaseLoginResponse(): LoginResponse { - return { challenge: undefined, profile: undefined }; + return { challenge: undefined, profile: undefined }; } export const LoginResponse = { - encode( - message: LoginResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.challenge !== undefined) { - writer.uint32(10).bytes(message.challenge); - } - if (message.profile !== undefined) { - AccountProfile.encode( - message.profile, - writer.uint32(18).fork(), - ).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): LoginResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLoginResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.challenge = reader.bytes(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.profile = AccountProfile.decode( - reader, - reader.uint32(), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: LoginResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.challenge !== undefined) { + writer.uint32(10).bytes(message.challenge); + } + if (message.profile !== undefined) { + AccountProfile.encode(message.profile, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): LoginResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseLoginResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - fromJSON(object: any): LoginResponse { - return { - challenge: isSet(object.challenge) - ? bytesFromBase64(object.challenge) - : undefined, - profile: isSet(object.profile) - ? AccountProfile.fromJSON(object.profile) - : undefined, - }; - }, + message.challenge = reader.bytes(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.profile = AccountProfile.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: LoginResponse): unknown { - const obj: any = {}; - if (message.challenge !== undefined) { - obj.challenge = base64FromBytes(message.challenge); - } - if (message.profile !== undefined) { - obj.profile = AccountProfile.toJSON(message.profile); - } - return obj; - }, + fromJSON(object: any): LoginResponse { + return { + challenge: isSet(object.challenge) ? bytesFromBase64(object.challenge) : undefined, + profile: isSet(object.profile) ? AccountProfile.fromJSON(object.profile) : undefined, + }; + }, - create(base?: DeepPartial): LoginResponse { - return LoginResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): LoginResponse { - const message = createBaseLoginResponse(); - message.challenge = object.challenge ?? undefined; - message.profile = - object.profile !== undefined && object.profile !== null - ? AccountProfile.fromPartial(object.profile) - : undefined; - return message; - }, + toJSON(message: LoginResponse): unknown { + const obj: any = {}; + if (message.challenge !== undefined) { + obj.challenge = base64FromBytes(message.challenge); + } + if (message.profile !== undefined) { + obj.profile = AccountProfile.toJSON(message.profile); + } + return obj; + }, + + create(base?: DeepPartial): LoginResponse { + return LoginResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): LoginResponse { + const message = createBaseLoginResponse(); + message.challenge = object.challenge ?? undefined; + message.profile = (object.profile !== undefined && object.profile !== null) + ? AccountProfile.fromPartial(object.profile) + : undefined; + return message; + }, }; function createBaseLoginConfirmRequest(): LoginConfirmRequest { - return { - challenge: new Uint8Array(0), - confirmationCodeHashed: new Uint8Array(0), - }; + return { challenge: new Uint8Array(0), confirmationCodeHashed: new Uint8Array(0) }; } export const LoginConfirmRequest = { - encode( - message: LoginConfirmRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.challenge !== undefined && message.challenge.length !== 0) { - writer.uint32(10).bytes(message.challenge); - } - if ( - message.confirmationCodeHashed !== undefined && - message.confirmationCodeHashed.length !== 0 - ) { - writer.uint32(18).bytes(message.confirmationCodeHashed); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): LoginConfirmRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLoginConfirmRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.challenge = reader.bytes(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.confirmationCodeHashed = reader.bytes(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: LoginConfirmRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.challenge !== undefined && message.challenge.length !== 0) { + writer.uint32(10).bytes(message.challenge); + } + if (message.confirmationCodeHashed !== undefined && message.confirmationCodeHashed.length !== 0) { + writer.uint32(18).bytes(message.confirmationCodeHashed); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): LoginConfirmRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseLoginConfirmRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - fromJSON(object: any): LoginConfirmRequest { - return { - challenge: isSet(object.challenge) - ? bytesFromBase64(object.challenge) - : new Uint8Array(0), - confirmationCodeHashed: isSet(object.confirmationCodeHashed) - ? bytesFromBase64(object.confirmationCodeHashed) - : new Uint8Array(0), - }; - }, + message.challenge = reader.bytes(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.confirmationCodeHashed = reader.bytes(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: LoginConfirmRequest): unknown { - const obj: any = {}; - if (message.challenge !== undefined && message.challenge.length !== 0) { - obj.challenge = base64FromBytes(message.challenge); - } - if ( - message.confirmationCodeHashed !== undefined && - message.confirmationCodeHashed.length !== 0 - ) { - obj.confirmationCodeHashed = base64FromBytes( - message.confirmationCodeHashed, - ); - } - return obj; - }, + fromJSON(object: any): LoginConfirmRequest { + return { + challenge: isSet(object.challenge) ? bytesFromBase64(object.challenge) : new Uint8Array(0), + confirmationCodeHashed: isSet(object.confirmationCodeHashed) + ? bytesFromBase64(object.confirmationCodeHashed) + : new Uint8Array(0), + }; + }, - create(base?: DeepPartial): LoginConfirmRequest { - return LoginConfirmRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): LoginConfirmRequest { - const message = createBaseLoginConfirmRequest(); - message.challenge = object.challenge ?? new Uint8Array(0); - message.confirmationCodeHashed = - object.confirmationCodeHashed ?? new Uint8Array(0); - return message; - }, + toJSON(message: LoginConfirmRequest): unknown { + const obj: any = {}; + if (message.challenge !== undefined && message.challenge.length !== 0) { + obj.challenge = base64FromBytes(message.challenge); + } + if (message.confirmationCodeHashed !== undefined && message.confirmationCodeHashed.length !== 0) { + obj.confirmationCodeHashed = base64FromBytes(message.confirmationCodeHashed); + } + return obj; + }, + + create(base?: DeepPartial): LoginConfirmRequest { + return LoginConfirmRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): LoginConfirmRequest { + const message = createBaseLoginConfirmRequest(); + message.challenge = object.challenge ?? new Uint8Array(0); + message.confirmationCodeHashed = object.confirmationCodeHashed ?? new Uint8Array(0); + return message; + }, }; function createBaseLoginConfirmResponse(): LoginConfirmResponse { - return { profile: undefined }; + return { profile: undefined }; } export const LoginConfirmResponse = { - encode( - message: LoginConfirmResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.profile !== undefined) { - AccountProfile.encode( - message.profile, - writer.uint32(10).fork(), - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): LoginConfirmResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLoginConfirmResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.profile = AccountProfile.decode( - reader, - reader.uint32(), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): LoginConfirmResponse { - return { - profile: isSet(object.profile) - ? AccountProfile.fromJSON(object.profile) - : undefined, - }; - }, + encode(message: LoginConfirmResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.profile !== undefined) { + AccountProfile.encode(message.profile, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): LoginConfirmResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseLoginConfirmResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.profile = AccountProfile.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: LoginConfirmResponse): unknown { - const obj: any = {}; - if (message.profile !== undefined) { - obj.profile = AccountProfile.toJSON(message.profile); - } - return obj; - }, + fromJSON(object: any): LoginConfirmResponse { + return { profile: isSet(object.profile) ? AccountProfile.fromJSON(object.profile) : undefined }; + }, - create(base?: DeepPartial): LoginConfirmResponse { - return LoginConfirmResponse.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): LoginConfirmResponse { - const message = createBaseLoginConfirmResponse(); - message.profile = - object.profile !== undefined && object.profile !== null - ? AccountProfile.fromPartial(object.profile) - : undefined; - return message; - }, + toJSON(message: LoginConfirmResponse): unknown { + const obj: any = {}; + if (message.profile !== undefined) { + obj.profile = AccountProfile.toJSON(message.profile); + } + return obj; + }, + + create(base?: DeepPartial): LoginConfirmResponse { + return LoginConfirmResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): LoginConfirmResponse { + const message = createBaseLoginConfirmResponse(); + message.profile = (object.profile !== undefined && object.profile !== null) + ? AccountProfile.fromPartial(object.profile) + : undefined; + return message; + }, }; function createBaseWalletAuthToken(): WalletAuthToken { - return { id: "", description: undefined, dateCreated: "" }; + return { id: "", description: undefined, dateCreated: "" }; } export const WalletAuthToken = { - encode( - message: WalletAuthToken, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.id !== undefined && message.id !== "") { - writer.uint32(10).string(message.id); - } - if (message.description !== undefined) { - writer.uint32(18).string(message.description); - } - if (message.dateCreated !== undefined && message.dateCreated !== "") { - writer.uint32(26).string(message.dateCreated); - } - return writer; - }, + encode(message: WalletAuthToken, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.id !== undefined && message.id !== "") { + writer.uint32(10).string(message.id); + } + if (message.description !== undefined) { + writer.uint32(18).string(message.description); + } + if (message.dateCreated !== undefined && message.dateCreated !== "") { + writer.uint32(26).string(message.dateCreated); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): WalletAuthToken { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseWalletAuthToken(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - decode(input: _m0.Reader | Uint8Array, length?: number): WalletAuthToken { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseWalletAuthToken(); - 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.description = reader.string(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.dateCreated = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + message.id = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } - fromJSON(object: any): WalletAuthToken { - return { - id: isSet(object.id) ? String(object.id) : "", - description: isSet(object.description) - ? String(object.description) - : undefined, - dateCreated: isSet(object.dateCreated) - ? String(object.dateCreated) - : "", - }; - }, + message.description = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.dateCreated = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: WalletAuthToken): unknown { - const obj: any = {}; - if (message.id !== undefined && message.id !== "") { - obj.id = message.id; - } - if (message.description !== undefined) { - obj.description = message.description; - } - if (message.dateCreated !== undefined && message.dateCreated !== "") { - obj.dateCreated = message.dateCreated; - } - return obj; - }, + fromJSON(object: any): WalletAuthToken { + return { + id: isSet(object.id) ? String(object.id) : "", + description: isSet(object.description) ? String(object.description) : undefined, + dateCreated: isSet(object.dateCreated) ? String(object.dateCreated) : "", + }; + }, - create(base?: DeepPartial): WalletAuthToken { - return WalletAuthToken.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): WalletAuthToken { - const message = createBaseWalletAuthToken(); - message.id = object.id ?? ""; - message.description = object.description ?? undefined; - message.dateCreated = object.dateCreated ?? ""; - return message; - }, + toJSON(message: WalletAuthToken): unknown { + const obj: any = {}; + if (message.id !== undefined && message.id !== "") { + obj.id = message.id; + } + if (message.description !== undefined) { + obj.description = message.description; + } + if (message.dateCreated !== undefined && message.dateCreated !== "") { + obj.dateCreated = message.dateCreated; + } + return obj; + }, + + create(base?: DeepPartial): WalletAuthToken { + return WalletAuthToken.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): WalletAuthToken { + const message = createBaseWalletAuthToken(); + message.id = object.id ?? ""; + message.description = object.description ?? undefined; + message.dateCreated = object.dateCreated ?? ""; + return message; + }, }; export type AccountDefinition = typeof AccountDefinition; export const AccountDefinition = { - name: "Account", - fullName: "services.account.v1.Account", - methods: { - /** - * Begin login flow for specified account, creating one if it does not already exist - * - * @deprecated - */ - login: { - name: "Login", - requestType: LoginRequest, - requestStream: false, - responseType: LoginResponse, - responseStream: false, - options: { - _unknownFields: { - 480010: [ - new Uint8Array([2, 16, 1]), - new Uint8Array([2, 8, 1]), - ], - }, - }, - }, - /** - * Finalize login flow with two-factor confirmation code - * - * @deprecated - */ - loginConfirm: { - name: "LoginConfirm", - requestType: LoginConfirmRequest, - requestStream: false, - responseType: LoginConfirmResponse, - responseStream: false, - options: { - _unknownFields: { - 480010: [ - new Uint8Array([2, 8, 1]), - new Uint8Array([2, 16, 1]), - ], - }, - }, - }, - /** - * Get account information - * - * @deprecated - */ - info: { - name: "Info", - requestType: AccountInfoRequest, - requestStream: false, - responseType: AccountInfoResponse, - responseStream: false, - options: { - _unknownFields: { 480010: [new Uint8Array([2, 24, 1])] }, - }, - }, + name: "Account", + fullName: "services.account.v1.Account", + methods: { + /** + * Begin login flow for specified account, creating one if it does not already exist + * + * @deprecated + */ + login: { + name: "Login", + requestType: LoginRequest, + requestStream: false, + responseType: LoginResponse, + responseStream: false, + options: { _unknownFields: { 480010: [new Uint8Array([2, 16, 1]), new Uint8Array([2, 8, 1])] } }, + }, + /** + * Finalize login flow with two-factor confirmation code + * + * @deprecated + */ + loginConfirm: { + name: "LoginConfirm", + requestType: LoginConfirmRequest, + requestStream: false, + responseType: LoginConfirmResponse, + responseStream: false, + options: { _unknownFields: { 480010: [new Uint8Array([2, 8, 1]), new Uint8Array([2, 16, 1])] } }, + }, + /** + * Get account information + * + * @deprecated + */ + info: { + name: "Info", + requestType: AccountInfoRequest, + requestStream: false, + responseType: AccountInfoResponse, + responseStream: false, + options: { _unknownFields: { 480010: [new Uint8Array([2, 24, 1])] } }, }, + }, } as const; declare const self: any | undefined; declare const window: any | undefined; declare const global: any | undefined; const tsProtoGlobalThis: any = (() => { - if (typeof globalThis !== "undefined") { - return globalThis; - } - if (typeof self !== "undefined") { - return self; - } - if (typeof window !== "undefined") { - return window; - } - if (typeof global !== "undefined") { - return global; - } - throw "Unable to locate global object"; + if (typeof globalThis !== "undefined") { + return globalThis; + } + if (typeof self !== "undefined") { + return self; + } + if (typeof window !== "undefined") { + return window; + } + if (typeof global !== "undefined") { + return global; + } + throw "Unable to locate global object"; })(); function bytesFromBase64(b64: string): Uint8Array { - if (tsProtoGlobalThis.Buffer) { - return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64")); - } else { - const bin = tsProtoGlobalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; + if (tsProtoGlobalThis.Buffer) { + return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64")); + } else { + const bin = tsProtoGlobalThis.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 (tsProtoGlobalThis.Buffer) { - return tsProtoGlobalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return tsProtoGlobalThis.btoa(bin.join("")); - } + if (tsProtoGlobalThis.Buffer) { + return tsProtoGlobalThis.Buffer.from(arr).toString("base64"); + } else { + const bin: string[] = []; + arr.forEach((byte) => { + bin.push(String.fromCharCode(byte)); + }); + return tsProtoGlobalThis.btoa(bin.join("")); + } } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; function isSet(value: any): boolean { - return value !== null && value !== undefined; + return value !== null && value !== undefined; } diff --git a/web/src/proto/services/common/v1/common.ts b/web/src/proto/services/common/v1/common.ts index cdc04cd3c..0b81e97ff 100644 --- a/web/src/proto/services/common/v1/common.ts +++ b/web/src/proto/services/common/v1/common.ts @@ -3,60 +3,60 @@ import Long from "long"; import _m0 from "protobufjs/minimal"; export enum ResponseStatus { - SUCCESS = 0, - WALLET_ACCESS_DENIED = 10, - WALLET_EXISTS = 11, - ITEM_NOT_FOUND = 20, - SERIALIZATION_ERROR = 200, - UNKNOWN_ERROR = 100, - UNRECOGNIZED = -1, + SUCCESS = 0, + WALLET_ACCESS_DENIED = 10, + WALLET_EXISTS = 11, + ITEM_NOT_FOUND = 20, + SERIALIZATION_ERROR = 200, + UNKNOWN_ERROR = 100, + UNRECOGNIZED = -1, } export function responseStatusFromJSON(object: any): ResponseStatus { - switch (object) { - case 0: - case "SUCCESS": - return ResponseStatus.SUCCESS; - case 10: - case "WALLET_ACCESS_DENIED": - return ResponseStatus.WALLET_ACCESS_DENIED; - case 11: - case "WALLET_EXISTS": - return ResponseStatus.WALLET_EXISTS; - case 20: - case "ITEM_NOT_FOUND": - return ResponseStatus.ITEM_NOT_FOUND; - case 200: - case "SERIALIZATION_ERROR": - return ResponseStatus.SERIALIZATION_ERROR; - case 100: - case "UNKNOWN_ERROR": - return ResponseStatus.UNKNOWN_ERROR; - case -1: - case "UNRECOGNIZED": - default: - return ResponseStatus.UNRECOGNIZED; - } + switch (object) { + case 0: + case "SUCCESS": + return ResponseStatus.SUCCESS; + case 10: + case "WALLET_ACCESS_DENIED": + return ResponseStatus.WALLET_ACCESS_DENIED; + case 11: + case "WALLET_EXISTS": + return ResponseStatus.WALLET_EXISTS; + case 20: + case "ITEM_NOT_FOUND": + return ResponseStatus.ITEM_NOT_FOUND; + case 200: + case "SERIALIZATION_ERROR": + return ResponseStatus.SERIALIZATION_ERROR; + case 100: + case "UNKNOWN_ERROR": + return ResponseStatus.UNKNOWN_ERROR; + case -1: + case "UNRECOGNIZED": + default: + return ResponseStatus.UNRECOGNIZED; + } } export function responseStatusToJSON(object: ResponseStatus): string { - switch (object) { - case ResponseStatus.SUCCESS: - return "SUCCESS"; - case ResponseStatus.WALLET_ACCESS_DENIED: - return "WALLET_ACCESS_DENIED"; - case ResponseStatus.WALLET_EXISTS: - return "WALLET_EXISTS"; - case ResponseStatus.ITEM_NOT_FOUND: - return "ITEM_NOT_FOUND"; - case ResponseStatus.SERIALIZATION_ERROR: - return "SERIALIZATION_ERROR"; - case ResponseStatus.UNKNOWN_ERROR: - return "UNKNOWN_ERROR"; - case ResponseStatus.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } + switch (object) { + case ResponseStatus.SUCCESS: + return "SUCCESS"; + case ResponseStatus.WALLET_ACCESS_DENIED: + return "WALLET_ACCESS_DENIED"; + case ResponseStatus.WALLET_EXISTS: + return "WALLET_EXISTS"; + case ResponseStatus.ITEM_NOT_FOUND: + return "ITEM_NOT_FOUND"; + case ResponseStatus.SERIALIZATION_ERROR: + return "SERIALIZATION_ERROR"; + case ResponseStatus.UNKNOWN_ERROR: + return "UNKNOWN_ERROR"; + case ResponseStatus.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } } /** @@ -64,359 +64,315 @@ export function responseStatusToJSON(object: ResponseStatus): string { * https://docs.godiddy.com/en/supported-methods */ export enum SupportedDidMethod { - /** KEY - The did:key method -- all wallets use this by default */ - KEY = 0, - /** ION - The did:ion method -- Sidetree implementation on top of Bitcoin by Microsoft */ - ION = 1, - /** INDY - The did:sov method -- Hyperledger Indy based by Sovrin Foundation */ - INDY = 2, - UNRECOGNIZED = -1, + /** KEY - The did:key method -- all wallets use this by default */ + KEY = 0, + /** ION - The did:ion method -- Sidetree implementation on top of Bitcoin by Microsoft */ + ION = 1, + /** INDY - The did:sov method -- Hyperledger Indy based by Sovrin Foundation */ + INDY = 2, + UNRECOGNIZED = -1, } export function supportedDidMethodFromJSON(object: any): SupportedDidMethod { - switch (object) { - case 0: - case "KEY": - return SupportedDidMethod.KEY; - case 1: - case "ION": - return SupportedDidMethod.ION; - case 2: - case "INDY": - return SupportedDidMethod.INDY; - case -1: - case "UNRECOGNIZED": - default: - return SupportedDidMethod.UNRECOGNIZED; - } + switch (object) { + case 0: + case "KEY": + return SupportedDidMethod.KEY; + case 1: + case "ION": + return SupportedDidMethod.ION; + case 2: + case "INDY": + return SupportedDidMethod.INDY; + case -1: + case "UNRECOGNIZED": + default: + return SupportedDidMethod.UNRECOGNIZED; + } } export function supportedDidMethodToJSON(object: SupportedDidMethod): string { - switch (object) { - case SupportedDidMethod.KEY: - return "KEY"; - case SupportedDidMethod.ION: - return "ION"; - case SupportedDidMethod.INDY: - return "INDY"; - case SupportedDidMethod.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } + switch (object) { + case SupportedDidMethod.KEY: + return "KEY"; + case SupportedDidMethod.ION: + return "ION"; + case SupportedDidMethod.INDY: + return "INDY"; + case SupportedDidMethod.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } } /** Nonce used to generate an oberon proof */ export interface Nonce { - /** UTC unix millisecond timestamp the request was made */ - timestamp?: number | undefined; - /** blake3256 hash of the request body */ - requestHash?: Uint8Array | undefined; + /** UTC unix millisecond timestamp the request was made */ + timestamp?: + | number + | undefined; + /** blake3256 hash of the request body */ + requestHash?: Uint8Array | undefined; } export interface TrinsicClientOptions { - /** Trinsic API endpoint. Defaults to `prod.trinsic.cloud` */ - serverEndpoint?: string | undefined; - /** Trinsic API port; defaults to `443` */ - serverPort?: number | undefined; - /** Whether TLS is enabled between SDK and Trinsic API; defaults to `true` */ - serverUseTls?: boolean | undefined; - /** Authentication token for SDK calls; defaults to empty string (unauthenticated) */ - authToken?: string | undefined; + /** Trinsic API endpoint. Defaults to `prod.trinsic.cloud` */ + serverEndpoint?: + | string + | undefined; + /** Trinsic API port; defaults to `443` */ + serverPort?: + | number + | undefined; + /** Whether TLS is enabled between SDK and Trinsic API; defaults to `true` */ + serverUseTls?: + | boolean + | undefined; + /** Authentication token for SDK calls; defaults to empty string (unauthenticated) */ + authToken?: string | undefined; } function createBaseNonce(): Nonce { - return { timestamp: 0, requestHash: new Uint8Array(0) }; + return { timestamp: 0, requestHash: new Uint8Array(0) }; } export const Nonce = { - encode( - message: Nonce, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.timestamp !== undefined && message.timestamp !== 0) { - writer.uint32(8).int64(message.timestamp); - } - if ( - message.requestHash !== undefined && - message.requestHash.length !== 0 - ) { - writer.uint32(18).bytes(message.requestHash); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Nonce { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseNonce(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.timestamp = longToNumber(reader.int64() as Long); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.requestHash = reader.bytes(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): Nonce { - return { - timestamp: isSet(object.timestamp) ? Number(object.timestamp) : 0, - requestHash: isSet(object.requestHash) - ? bytesFromBase64(object.requestHash) - : new Uint8Array(0), - }; - }, - - toJSON(message: Nonce): unknown { - const obj: any = {}; - if (message.timestamp !== undefined && message.timestamp !== 0) { - obj.timestamp = Math.round(message.timestamp); - } - if ( - message.requestHash !== undefined && - message.requestHash.length !== 0 - ) { - obj.requestHash = base64FromBytes(message.requestHash); - } - return obj; - }, - - create(base?: DeepPartial): Nonce { - return Nonce.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): Nonce { - const message = createBaseNonce(); - message.timestamp = object.timestamp ?? 0; - message.requestHash = object.requestHash ?? new Uint8Array(0); - return message; - }, -}; + encode(message: Nonce, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.timestamp !== undefined && message.timestamp !== 0) { + writer.uint32(8).int64(message.timestamp); + } + if (message.requestHash !== undefined && message.requestHash.length !== 0) { + writer.uint32(18).bytes(message.requestHash); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Nonce { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseNonce(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } -function createBaseTrinsicClientOptions(): TrinsicClientOptions { + message.timestamp = longToNumber(reader.int64() as Long); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.requestHash = reader.bytes(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Nonce { return { - serverEndpoint: "", - serverPort: 0, - serverUseTls: false, - authToken: "", + timestamp: isSet(object.timestamp) ? Number(object.timestamp) : 0, + requestHash: isSet(object.requestHash) ? bytesFromBase64(object.requestHash) : new Uint8Array(0), }; + }, + + toJSON(message: Nonce): unknown { + const obj: any = {}; + if (message.timestamp !== undefined && message.timestamp !== 0) { + obj.timestamp = Math.round(message.timestamp); + } + if (message.requestHash !== undefined && message.requestHash.length !== 0) { + obj.requestHash = base64FromBytes(message.requestHash); + } + return obj; + }, + + create(base?: DeepPartial): Nonce { + return Nonce.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): Nonce { + const message = createBaseNonce(); + message.timestamp = object.timestamp ?? 0; + message.requestHash = object.requestHash ?? new Uint8Array(0); + return message; + }, +}; + +function createBaseTrinsicClientOptions(): TrinsicClientOptions { + return { serverEndpoint: "", serverPort: 0, serverUseTls: false, authToken: "" }; } export const TrinsicClientOptions = { - encode( - message: TrinsicClientOptions, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if ( - message.serverEndpoint !== undefined && - message.serverEndpoint !== "" - ) { - writer.uint32(10).string(message.serverEndpoint); - } - if (message.serverPort !== undefined && message.serverPort !== 0) { - writer.uint32(16).int32(message.serverPort); - } - if (message.serverUseTls === true) { - writer.uint32(24).bool(message.serverUseTls); - } - if (message.authToken !== undefined && message.authToken !== "") { - writer.uint32(34).string(message.authToken); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): TrinsicClientOptions { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTrinsicClientOptions(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.serverEndpoint = reader.string(); - continue; - case 2: - if (tag !== 16) { - break; - } - - message.serverPort = reader.int32(); - continue; - case 3: - if (tag !== 24) { - break; - } - - message.serverUseTls = reader.bool(); - continue; - case 4: - if (tag !== 34) { - break; - } - - message.authToken = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): TrinsicClientOptions { - return { - serverEndpoint: isSet(object.serverEndpoint) - ? String(object.serverEndpoint) - : "", - serverPort: isSet(object.serverPort) - ? Number(object.serverPort) - : 0, - serverUseTls: isSet(object.serverUseTls) - ? Boolean(object.serverUseTls) - : false, - authToken: isSet(object.authToken) ? String(object.authToken) : "", - }; - }, - - toJSON(message: TrinsicClientOptions): unknown { - const obj: any = {}; - if ( - message.serverEndpoint !== undefined && - message.serverEndpoint !== "" - ) { - obj.serverEndpoint = message.serverEndpoint; - } - if (message.serverPort !== undefined && message.serverPort !== 0) { - obj.serverPort = Math.round(message.serverPort); - } - if (message.serverUseTls === true) { - obj.serverUseTls = message.serverUseTls; - } - if (message.authToken !== undefined && message.authToken !== "") { - obj.authToken = message.authToken; - } - return obj; - }, - - create(base?: DeepPartial): TrinsicClientOptions { - return TrinsicClientOptions.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): TrinsicClientOptions { - const message = createBaseTrinsicClientOptions(); - message.serverEndpoint = object.serverEndpoint ?? ""; - message.serverPort = object.serverPort ?? 0; - message.serverUseTls = object.serverUseTls ?? false; - message.authToken = object.authToken ?? ""; - return message; - }, + encode(message: TrinsicClientOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.serverEndpoint !== undefined && message.serverEndpoint !== "") { + writer.uint32(10).string(message.serverEndpoint); + } + if (message.serverPort !== undefined && message.serverPort !== 0) { + writer.uint32(16).int32(message.serverPort); + } + if (message.serverUseTls === true) { + writer.uint32(24).bool(message.serverUseTls); + } + if (message.authToken !== undefined && message.authToken !== "") { + writer.uint32(34).string(message.authToken); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): TrinsicClientOptions { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTrinsicClientOptions(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.serverEndpoint = reader.string(); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.serverPort = reader.int32(); + continue; + case 3: + if (tag !== 24) { + break; + } + + message.serverUseTls = reader.bool(); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.authToken = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TrinsicClientOptions { + return { + serverEndpoint: isSet(object.serverEndpoint) ? String(object.serverEndpoint) : "", + serverPort: isSet(object.serverPort) ? Number(object.serverPort) : 0, + serverUseTls: isSet(object.serverUseTls) ? Boolean(object.serverUseTls) : false, + authToken: isSet(object.authToken) ? String(object.authToken) : "", + }; + }, + + toJSON(message: TrinsicClientOptions): unknown { + const obj: any = {}; + if (message.serverEndpoint !== undefined && message.serverEndpoint !== "") { + obj.serverEndpoint = message.serverEndpoint; + } + if (message.serverPort !== undefined && message.serverPort !== 0) { + obj.serverPort = Math.round(message.serverPort); + } + if (message.serverUseTls === true) { + obj.serverUseTls = message.serverUseTls; + } + if (message.authToken !== undefined && message.authToken !== "") { + obj.authToken = message.authToken; + } + return obj; + }, + + create(base?: DeepPartial): TrinsicClientOptions { + return TrinsicClientOptions.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): TrinsicClientOptions { + const message = createBaseTrinsicClientOptions(); + message.serverEndpoint = object.serverEndpoint ?? ""; + message.serverPort = object.serverPort ?? 0; + message.serverUseTls = object.serverUseTls ?? false; + message.authToken = object.authToken ?? ""; + return message; + }, }; declare const self: any | undefined; declare const window: any | undefined; declare const global: any | undefined; const tsProtoGlobalThis: any = (() => { - if (typeof globalThis !== "undefined") { - return globalThis; - } - if (typeof self !== "undefined") { - return self; - } - if (typeof window !== "undefined") { - return window; - } - if (typeof global !== "undefined") { - return global; - } - throw "Unable to locate global object"; + if (typeof globalThis !== "undefined") { + return globalThis; + } + if (typeof self !== "undefined") { + return self; + } + if (typeof window !== "undefined") { + return window; + } + if (typeof global !== "undefined") { + return global; + } + throw "Unable to locate global object"; })(); function bytesFromBase64(b64: string): Uint8Array { - if (tsProtoGlobalThis.Buffer) { - return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64")); - } else { - const bin = tsProtoGlobalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; + if (tsProtoGlobalThis.Buffer) { + return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64")); + } else { + const bin = tsProtoGlobalThis.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 (tsProtoGlobalThis.Buffer) { - return tsProtoGlobalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return tsProtoGlobalThis.btoa(bin.join("")); - } + if (tsProtoGlobalThis.Buffer) { + return tsProtoGlobalThis.Buffer.from(arr).toString("base64"); + } else { + const bin: string[] = []; + arr.forEach((byte) => { + bin.push(String.fromCharCode(byte)); + }); + return tsProtoGlobalThis.btoa(bin.join("")); + } } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new tsProtoGlobalThis.Error( - "Value is larger than Number.MAX_SAFE_INTEGER", - ); - } - return long.toNumber(); + if (long.gt(Number.MAX_SAFE_INTEGER)) { + throw new tsProtoGlobalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); + } + return long.toNumber(); } if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); + _m0.util.Long = Long as any; + _m0.configure(); } function isSet(value: any): boolean { - return value !== null && value !== undefined; + return value !== null && value !== undefined; } diff --git a/web/src/proto/services/connect/v1/connect.ts b/web/src/proto/services/connect/v1/connect.ts index d3b6aaa84..9492fb3c7 100644 --- a/web/src/proto/services/connect/v1/connect.ts +++ b/web/src/proto/services/connect/v1/connect.ts @@ -4,1314 +4,1153 @@ import _m0 from "protobufjs/minimal"; /** The type of verification to perform */ export enum VerificationType { - /** GOVERNMENT_ID - Government-issued ID (driver's license, passport, etc) */ - GOVERNMENT_ID = 0, - UNRECOGNIZED = -1, + /** GOVERNMENT_ID - Government-issued ID (driver's license, passport, etc) */ + GOVERNMENT_ID = 0, + UNRECOGNIZED = -1, } export function verificationTypeFromJSON(object: any): VerificationType { - switch (object) { - case 0: - case "GOVERNMENT_ID": - return VerificationType.GOVERNMENT_ID; - case -1: - case "UNRECOGNIZED": - default: - return VerificationType.UNRECOGNIZED; - } + switch (object) { + case 0: + case "GOVERNMENT_ID": + return VerificationType.GOVERNMENT_ID; + case -1: + case "UNRECOGNIZED": + default: + return VerificationType.UNRECOGNIZED; + } } export function verificationTypeToJSON(object: VerificationType): string { - switch (object) { - case VerificationType.GOVERNMENT_ID: - return "GOVERNMENT_ID"; - case VerificationType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } + switch (object) { + case VerificationType.GOVERNMENT_ID: + return "GOVERNMENT_ID"; + case VerificationType.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } } /** The states a VerificationSession can be in */ export enum IDVSessionState { - /** IDV_CREATED - Session has been created, but not yet shown to user */ - IDV_CREATED = 0, - /** - * IDV_INITIATED - Session has been shown to user (iframe / popup opened), but - * user has not yet logged in. - */ - IDV_INITIATED = 1, - /** IDV_AUTHENTICATING - User has entered their phone number, but not yet authenticated with the code sent via SMS */ - IDV_AUTHENTICATING = 2, - /** IDV_IN_PROGRESS - User has been authenticated and is performing identity verification */ - IDV_IN_PROGRESS = 3, - /** IDV_SUCCESS - Session was completed successfully and IDV data is available to RP */ - IDV_SUCCESS = 4, - /** IDV_USER_CANCELED - User explicitly canceled session / did not consent */ - IDV_USER_CANCELED = 5, - /** IDV_EXPIRED - Session was not completed within {X} timeframe from creation and expired */ - IDV_EXPIRED = 6, - /** IDV_RP_CANCELED - Relying Party canceled the session via the SDK */ - IDV_RP_CANCELED = 7, - /** IDV_FAILED - The user's identity was not deemed legitimate by the IDV */ - IDV_FAILED = 8, - UNRECOGNIZED = -1, + /** IDV_CREATED - Session has been created, but not yet shown to user */ + IDV_CREATED = 0, + /** + * IDV_INITIATED - Session has been shown to user (iframe / popup opened), but + * user has not yet logged in. + */ + IDV_INITIATED = 1, + /** IDV_AUTHENTICATING - User has entered their phone number, but not yet authenticated with the code sent via SMS */ + IDV_AUTHENTICATING = 2, + /** IDV_IN_PROGRESS - User has been authenticated and is performing identity verification */ + IDV_IN_PROGRESS = 3, + /** IDV_SUCCESS - Session was completed successfully and IDV data is available to RP */ + IDV_SUCCESS = 4, + /** IDV_USER_CANCELED - User explicitly canceled session / did not consent */ + IDV_USER_CANCELED = 5, + /** IDV_EXPIRED - Session was not completed within {X} timeframe from creation and expired */ + IDV_EXPIRED = 6, + /** IDV_RP_CANCELED - Relying Party canceled the session via the SDK */ + IDV_RP_CANCELED = 7, + /** IDV_FAILED - The user's identity was not deemed legitimate by the IDV */ + IDV_FAILED = 8, + UNRECOGNIZED = -1, } export function iDVSessionStateFromJSON(object: any): IDVSessionState { - switch (object) { - case 0: - case "IDV_CREATED": - return IDVSessionState.IDV_CREATED; - case 1: - case "IDV_INITIATED": - return IDVSessionState.IDV_INITIATED; - case 2: - case "IDV_AUTHENTICATING": - return IDVSessionState.IDV_AUTHENTICATING; - case 3: - case "IDV_IN_PROGRESS": - return IDVSessionState.IDV_IN_PROGRESS; - case 4: - case "IDV_SUCCESS": - return IDVSessionState.IDV_SUCCESS; - case 5: - case "IDV_USER_CANCELED": - return IDVSessionState.IDV_USER_CANCELED; - case 6: - case "IDV_EXPIRED": - return IDVSessionState.IDV_EXPIRED; - case 7: - case "IDV_RP_CANCELED": - return IDVSessionState.IDV_RP_CANCELED; - case 8: - case "IDV_FAILED": - return IDVSessionState.IDV_FAILED; - case -1: - case "UNRECOGNIZED": - default: - return IDVSessionState.UNRECOGNIZED; - } + switch (object) { + case 0: + case "IDV_CREATED": + return IDVSessionState.IDV_CREATED; + case 1: + case "IDV_INITIATED": + return IDVSessionState.IDV_INITIATED; + case 2: + case "IDV_AUTHENTICATING": + return IDVSessionState.IDV_AUTHENTICATING; + case 3: + case "IDV_IN_PROGRESS": + return IDVSessionState.IDV_IN_PROGRESS; + case 4: + case "IDV_SUCCESS": + return IDVSessionState.IDV_SUCCESS; + case 5: + case "IDV_USER_CANCELED": + return IDVSessionState.IDV_USER_CANCELED; + case 6: + case "IDV_EXPIRED": + return IDVSessionState.IDV_EXPIRED; + case 7: + case "IDV_RP_CANCELED": + return IDVSessionState.IDV_RP_CANCELED; + case 8: + case "IDV_FAILED": + return IDVSessionState.IDV_FAILED; + case -1: + case "UNRECOGNIZED": + default: + return IDVSessionState.UNRECOGNIZED; + } } export function iDVSessionStateToJSON(object: IDVSessionState): string { - switch (object) { - case IDVSessionState.IDV_CREATED: - return "IDV_CREATED"; - case IDVSessionState.IDV_INITIATED: - return "IDV_INITIATED"; - case IDVSessionState.IDV_AUTHENTICATING: - return "IDV_AUTHENTICATING"; - case IDVSessionState.IDV_IN_PROGRESS: - return "IDV_IN_PROGRESS"; - case IDVSessionState.IDV_SUCCESS: - return "IDV_SUCCESS"; - case IDVSessionState.IDV_USER_CANCELED: - return "IDV_USER_CANCELED"; - case IDVSessionState.IDV_EXPIRED: - return "IDV_EXPIRED"; - case IDVSessionState.IDV_RP_CANCELED: - return "IDV_RP_CANCELED"; - case IDVSessionState.IDV_FAILED: - return "IDV_FAILED"; - case IDVSessionState.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } + switch (object) { + case IDVSessionState.IDV_CREATED: + return "IDV_CREATED"; + case IDVSessionState.IDV_INITIATED: + return "IDV_INITIATED"; + case IDVSessionState.IDV_AUTHENTICATING: + return "IDV_AUTHENTICATING"; + case IDVSessionState.IDV_IN_PROGRESS: + return "IDV_IN_PROGRESS"; + case IDVSessionState.IDV_SUCCESS: + return "IDV_SUCCESS"; + case IDVSessionState.IDV_USER_CANCELED: + return "IDV_USER_CANCELED"; + case IDVSessionState.IDV_EXPIRED: + return "IDV_EXPIRED"; + case IDVSessionState.IDV_RP_CANCELED: + return "IDV_RP_CANCELED"; + case IDVSessionState.IDV_FAILED: + return "IDV_FAILED"; + case IDVSessionState.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } } /** The states an individual Verification can be in */ export enum VerificationState { - /** VERIFICATION_PENDING - This verification has not yet been performed in the flow */ - VERIFICATION_PENDING = 0, - /** VERIFICATION_STARTED - This verification has been started by the user, but not yet completed */ - VERIFICATION_STARTED = 1, - /** VERIFICATION_SUCCESS - This verification has been successfully completed */ - VERIFICATION_SUCCESS = 2, - /** VERIFICATION_FAILED - This verification has failed */ - VERIFICATION_FAILED = 3, - UNRECOGNIZED = -1, + /** VERIFICATION_PENDING - This verification has not yet been performed in the flow */ + VERIFICATION_PENDING = 0, + /** VERIFICATION_STARTED - This verification has been started by the user, but not yet completed */ + VERIFICATION_STARTED = 1, + /** VERIFICATION_SUCCESS - This verification has been successfully completed */ + VERIFICATION_SUCCESS = 2, + /** VERIFICATION_FAILED - This verification has failed */ + VERIFICATION_FAILED = 3, + UNRECOGNIZED = -1, } export function verificationStateFromJSON(object: any): VerificationState { - switch (object) { - case 0: - case "VERIFICATION_PENDING": - return VerificationState.VERIFICATION_PENDING; - case 1: - case "VERIFICATION_STARTED": - return VerificationState.VERIFICATION_STARTED; - case 2: - case "VERIFICATION_SUCCESS": - return VerificationState.VERIFICATION_SUCCESS; - case 3: - case "VERIFICATION_FAILED": - return VerificationState.VERIFICATION_FAILED; - case -1: - case "UNRECOGNIZED": - default: - return VerificationState.UNRECOGNIZED; - } + switch (object) { + case 0: + case "VERIFICATION_PENDING": + return VerificationState.VERIFICATION_PENDING; + case 1: + case "VERIFICATION_STARTED": + return VerificationState.VERIFICATION_STARTED; + case 2: + case "VERIFICATION_SUCCESS": + return VerificationState.VERIFICATION_SUCCESS; + case 3: + case "VERIFICATION_FAILED": + return VerificationState.VERIFICATION_FAILED; + case -1: + case "UNRECOGNIZED": + default: + return VerificationState.UNRECOGNIZED; + } } export function verificationStateToJSON(object: VerificationState): string { - switch (object) { - case VerificationState.VERIFICATION_PENDING: - return "VERIFICATION_PENDING"; - case VerificationState.VERIFICATION_STARTED: - return "VERIFICATION_STARTED"; - case VerificationState.VERIFICATION_SUCCESS: - return "VERIFICATION_SUCCESS"; - case VerificationState.VERIFICATION_FAILED: - return "VERIFICATION_FAILED"; - case VerificationState.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } + switch (object) { + case VerificationState.VERIFICATION_PENDING: + return "VERIFICATION_PENDING"; + case VerificationState.VERIFICATION_STARTED: + return "VERIFICATION_STARTED"; + case VerificationState.VERIFICATION_SUCCESS: + return "VERIFICATION_SUCCESS"; + case VerificationState.VERIFICATION_FAILED: + return "VERIFICATION_FAILED"; + case VerificationState.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } } /** An Identity Verification Session */ export interface IDVSession { - /** The ID of the IDVSession. */ - id?: string | undefined; - /** - * The Client Token for this IDVSession. This should be passed to your frontend to initiate - * the IDV flow using Trinsic's Web SDK. - */ - clientToken?: string | undefined; - /** State of the IDVSession */ - state?: IDVSessionState | undefined; - /** The actual Verifications to perform in this IDV flow */ - verifications?: { [key: string]: Verification } | undefined; - /** The resultant signed VP combining the results of all verifications */ - resultVp?: string | undefined; - /** The unix timestamp, in seconds, that this IDVSession was created */ - created?: number | undefined; - /** The unix timestamp, in seconds, that this IDVSession's `state` was last updated */ - updated?: number | undefined; + /** The ID of the IDVSession. */ + id?: + | string + | undefined; + /** + * The Client Token for this IDVSession. This should be passed to your frontend to initiate + * the IDV flow using Trinsic's Web SDK. + */ + clientToken?: + | string + | undefined; + /** State of the IDVSession */ + state?: + | IDVSessionState + | undefined; + /** The actual Verifications to perform in this IDV flow */ + verifications?: + | { [key: string]: Verification } + | undefined; + /** The resultant signed VP combining the results of all verifications */ + resultVp?: + | string + | undefined; + /** The unix timestamp, in seconds, that this IDVSession was created */ + created?: + | number + | undefined; + /** The unix timestamp, in seconds, that this IDVSession's `state` was last updated */ + updated?: number | undefined; } export interface IDVSession_VerificationsEntry { - key: string; - value?: Verification | undefined; + key: string; + value?: Verification | undefined; } /** A Verification that is part of an IDVSession */ export interface Verification { - /** The ID of the verification */ - id?: string | undefined; - /** The type of verification (driver's license, passport, proof of address, etc) */ - type?: VerificationType | undefined; - /** The state of the verification */ - state?: VerificationState | undefined; - /** - * Whether this was a reused (true) or fresh (false) verification. - * If `state` is not `VERIFICATION_SUCCESS`, this field is `false` and does not convey useful information. - */ - reused?: boolean | undefined; - /** - * The unix timestamp, in seconds, when this verification was begun - * by the user -- or `0` if not yet begun. - */ - begun?: number | undefined; - /** The unix timestamp, in seconds, when this verification last changed state -- o */ - updated?: number | undefined; + /** The ID of the verification */ + id?: + | string + | undefined; + /** The type of verification (driver's license, passport, proof of address, etc) */ + type?: + | VerificationType + | undefined; + /** The state of the verification */ + state?: + | VerificationState + | undefined; + /** + * Whether this was a reused (true) or fresh (false) verification. + * If `state` is not `VERIFICATION_SUCCESS`, this field is `false` and does not convey useful information. + */ + reused?: + | boolean + | undefined; + /** + * The unix timestamp, in seconds, when this verification was begun + * by the user -- or `0` if not yet begun. + */ + begun?: + | number + | undefined; + /** The unix timestamp, in seconds, when this verification last changed state -- o */ + updated?: number | undefined; } /** Request to create an Identity Verification Session */ export interface CreateSessionRequest { - /** Array of verifications to perform */ - verifications?: RequestedVerification[] | undefined; + /** Array of verifications to perform */ + verifications?: RequestedVerification[] | undefined; } /** A verification to perform in an IDV flow */ export interface RequestedVerification { - /** The type of verification to perform */ - type?: VerificationType | undefined; + /** The type of verification to perform */ + type?: VerificationType | undefined; } /** Response to `CreateIDVSessionRequest` */ export interface CreateSessionResponse { - /** The created IDVSession */ - session?: IDVSession | undefined; + /** The created IDVSession */ + session?: IDVSession | undefined; } /** Request to cancel an Identity Verification Session */ export interface CancelSessionRequest { - /** The ID of the IDVSession to cancel */ - idvSessionId?: string | undefined; + /** The ID of the IDVSession to cancel */ + idvSessionId?: string | undefined; } /** Response to `CancelIDVSessionRequest` */ export interface CancelSessionResponse { - /** The IDVSession in its current state after cancellation */ - session?: IDVSession | undefined; + /** The IDVSession in its current state after cancellation */ + session?: IDVSession | undefined; } /** Request to get an IDVSession */ export interface GetSessionRequest { - /** The ID of the IDVSession to get */ - idvSessionId?: string | undefined; + /** The ID of the IDVSession to get */ + idvSessionId?: string | undefined; } /** Response to `GetIDVSessionRequest` */ export interface GetSessionResponse { - /** The IDVSession */ - session?: IDVSession | undefined; + /** The IDVSession */ + session?: IDVSession | undefined; } function createBaseIDVSession(): IDVSession { - return { - id: "", - clientToken: "", - state: 0, - verifications: {}, - resultVp: undefined, - created: 0, - updated: 0, - }; + return { id: "", clientToken: "", state: 0, verifications: {}, resultVp: undefined, created: 0, updated: 0 }; } export const IDVSession = { - encode( - message: IDVSession, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.id !== undefined && message.id !== "") { - writer.uint32(10).string(message.id); - } - if (message.clientToken !== undefined && message.clientToken !== "") { - writer.uint32(18).string(message.clientToken); - } - if (message.state !== undefined && message.state !== 0) { - writer.uint32(24).int32(message.state); - } - Object.entries(message.verifications || {}).forEach(([key, value]) => { - IDVSession_VerificationsEntry.encode( - { key: key as any, value }, - writer.uint32(34).fork(), - ).ldelim(); - }); - if (message.resultVp !== undefined) { - writer.uint32(42).string(message.resultVp); - } - if (message.created !== undefined && message.created !== 0) { - writer.uint32(49).fixed64(message.created); - } - if (message.updated !== undefined && message.updated !== 0) { - writer.uint32(57).fixed64(message.updated); - } - return writer; - }, + encode(message: IDVSession, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.id !== undefined && message.id !== "") { + writer.uint32(10).string(message.id); + } + if (message.clientToken !== undefined && message.clientToken !== "") { + writer.uint32(18).string(message.clientToken); + } + if (message.state !== undefined && message.state !== 0) { + writer.uint32(24).int32(message.state); + } + Object.entries(message.verifications || {}).forEach(([key, value]) => { + IDVSession_VerificationsEntry.encode({ key: key as any, value }, writer.uint32(34).fork()).ldelim(); + }); + if (message.resultVp !== undefined) { + writer.uint32(42).string(message.resultVp); + } + if (message.created !== undefined && message.created !== 0) { + writer.uint32(49).fixed64(message.created); + } + if (message.updated !== undefined && message.updated !== 0) { + writer.uint32(57).fixed64(message.updated); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): IDVSession { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseIDVSession(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - decode(input: _m0.Reader | Uint8Array, length?: number): IDVSession { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseIDVSession(); - 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.clientToken = reader.string(); - continue; - case 3: - if (tag !== 24) { - break; - } - - message.state = reader.int32() as any; - continue; - case 4: - if (tag !== 34) { - break; - } - - const entry4 = IDVSession_VerificationsEntry.decode( - reader, - reader.uint32(), - ); - if (entry4.value !== undefined) { - message.verifications![entry4.key] = entry4.value; - } - continue; - case 5: - if (tag !== 42) { - break; - } - - message.resultVp = reader.string(); - continue; - case 6: - if (tag !== 49) { - break; - } - - message.created = longToNumber(reader.fixed64() as Long); - continue; - case 7: - if (tag !== 57) { - break; - } - - message.updated = longToNumber(reader.fixed64() as Long); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + message.id = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } - fromJSON(object: any): IDVSession { - return { - id: isSet(object.id) ? String(object.id) : "", - clientToken: isSet(object.clientToken) - ? String(object.clientToken) - : "", - state: isSet(object.state) - ? iDVSessionStateFromJSON(object.state) - : 0, - verifications: isObject(object.verifications) - ? Object.entries(object.verifications).reduce<{ - [key: string]: Verification; - }>((acc, [key, value]) => { - acc[key] = Verification.fromJSON(value); - return acc; - }, {}) - : {}, - resultVp: isSet(object.resultVp) - ? String(object.resultVp) - : undefined, - created: isSet(object.created) ? Number(object.created) : 0, - updated: isSet(object.updated) ? Number(object.updated) : 0, - }; - }, + message.clientToken = reader.string(); + continue; + case 3: + if (tag !== 24) { + break; + } - toJSON(message: IDVSession): unknown { - const obj: any = {}; - if (message.id !== undefined && message.id !== "") { - obj.id = message.id; - } - if (message.clientToken !== undefined && message.clientToken !== "") { - obj.clientToken = message.clientToken; - } - if (message.state !== undefined && message.state !== 0) { - obj.state = iDVSessionStateToJSON(message.state); - } - if (message.verifications) { - const entries = Object.entries(message.verifications); - if (entries.length > 0) { - obj.verifications = {}; - entries.forEach(([k, v]) => { - obj.verifications[k] = Verification.toJSON(v); - }); - } - } - if (message.resultVp !== undefined) { - obj.resultVp = message.resultVp; - } - if (message.created !== undefined && message.created !== 0) { - obj.created = Math.round(message.created); - } - if (message.updated !== undefined && message.updated !== 0) { - obj.updated = Math.round(message.updated); - } - return obj; - }, + message.state = reader.int32() as any; + continue; + case 4: + if (tag !== 34) { + break; + } + + const entry4 = IDVSession_VerificationsEntry.decode(reader, reader.uint32()); + if (entry4.value !== undefined) { + message.verifications![entry4.key] = entry4.value; + } + continue; + case 5: + if (tag !== 42) { + break; + } - create(base?: DeepPartial): IDVSession { - return IDVSession.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): IDVSession { - const message = createBaseIDVSession(); - message.id = object.id ?? ""; - message.clientToken = object.clientToken ?? ""; - message.state = object.state ?? 0; - message.verifications = Object.entries( - object.verifications ?? {}, - ).reduce<{ [key: string]: Verification }>((acc, [key, value]) => { - if (value !== undefined) { - acc[key] = Verification.fromPartial(value); - } - return acc; - }, {}); - message.resultVp = object.resultVp ?? undefined; - message.created = object.created ?? 0; - message.updated = object.updated ?? 0; - return message; - }, + message.resultVp = reader.string(); + continue; + case 6: + if (tag !== 49) { + break; + } + + message.created = longToNumber(reader.fixed64() as Long); + continue; + case 7: + if (tag !== 57) { + break; + } + + message.updated = longToNumber(reader.fixed64() as Long); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): IDVSession { + return { + id: isSet(object.id) ? String(object.id) : "", + clientToken: isSet(object.clientToken) ? String(object.clientToken) : "", + state: isSet(object.state) ? iDVSessionStateFromJSON(object.state) : 0, + verifications: isObject(object.verifications) + ? Object.entries(object.verifications).reduce<{ [key: string]: Verification }>((acc, [key, value]) => { + acc[key] = Verification.fromJSON(value); + return acc; + }, {}) + : {}, + resultVp: isSet(object.resultVp) ? String(object.resultVp) : undefined, + created: isSet(object.created) ? Number(object.created) : 0, + updated: isSet(object.updated) ? Number(object.updated) : 0, + }; + }, + + toJSON(message: IDVSession): unknown { + const obj: any = {}; + if (message.id !== undefined && message.id !== "") { + obj.id = message.id; + } + if (message.clientToken !== undefined && message.clientToken !== "") { + obj.clientToken = message.clientToken; + } + if (message.state !== undefined && message.state !== 0) { + obj.state = iDVSessionStateToJSON(message.state); + } + if (message.verifications) { + const entries = Object.entries(message.verifications); + if (entries.length > 0) { + obj.verifications = {}; + entries.forEach(([k, v]) => { + obj.verifications[k] = Verification.toJSON(v); + }); + } + } + if (message.resultVp !== undefined) { + obj.resultVp = message.resultVp; + } + if (message.created !== undefined && message.created !== 0) { + obj.created = Math.round(message.created); + } + if (message.updated !== undefined && message.updated !== 0) { + obj.updated = Math.round(message.updated); + } + return obj; + }, + + create(base?: DeepPartial): IDVSession { + return IDVSession.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): IDVSession { + const message = createBaseIDVSession(); + message.id = object.id ?? ""; + message.clientToken = object.clientToken ?? ""; + message.state = object.state ?? 0; + message.verifications = Object.entries(object.verifications ?? {}).reduce<{ [key: string]: Verification }>( + (acc, [key, value]) => { + if (value !== undefined) { + acc[key] = Verification.fromPartial(value); + } + return acc; + }, + {}, + ); + message.resultVp = object.resultVp ?? undefined; + message.created = object.created ?? 0; + message.updated = object.updated ?? 0; + return message; + }, }; function createBaseIDVSession_VerificationsEntry(): IDVSession_VerificationsEntry { - return { key: "", value: undefined }; + return { key: "", value: undefined }; } export const IDVSession_VerificationsEntry = { - encode( - message: IDVSession_VerificationsEntry, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.value !== undefined) { - Verification.encode( - message.value, - writer.uint32(18).fork(), - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): IDVSession_VerificationsEntry { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseIDVSession_VerificationsEntry(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.key = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.value = Verification.decode( - reader, - reader.uint32(), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: IDVSession_VerificationsEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.key !== "") { + writer.uint32(10).string(message.key); + } + if (message.value !== undefined) { + Verification.encode(message.value, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): IDVSession_VerificationsEntry { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseIDVSession_VerificationsEntry(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - fromJSON(object: any): IDVSession_VerificationsEntry { - return { - key: isSet(object.key) ? String(object.key) : "", - value: isSet(object.value) - ? Verification.fromJSON(object.value) - : undefined, - }; - }, + message.key = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.value = Verification.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: IDVSession_VerificationsEntry): unknown { - const obj: any = {}; - if (message.key !== "") { - obj.key = message.key; - } - if (message.value !== undefined) { - obj.value = Verification.toJSON(message.value); - } - return obj; - }, + fromJSON(object: any): IDVSession_VerificationsEntry { + return { + key: isSet(object.key) ? String(object.key) : "", + value: isSet(object.value) ? Verification.fromJSON(object.value) : undefined, + }; + }, - create( - base?: DeepPartial, - ): IDVSession_VerificationsEntry { - return IDVSession_VerificationsEntry.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): IDVSession_VerificationsEntry { - const message = createBaseIDVSession_VerificationsEntry(); - message.key = object.key ?? ""; - message.value = - object.value !== undefined && object.value !== null - ? Verification.fromPartial(object.value) - : undefined; - return message; - }, + toJSON(message: IDVSession_VerificationsEntry): unknown { + const obj: any = {}; + if (message.key !== "") { + obj.key = message.key; + } + if (message.value !== undefined) { + obj.value = Verification.toJSON(message.value); + } + return obj; + }, + + create(base?: DeepPartial): IDVSession_VerificationsEntry { + return IDVSession_VerificationsEntry.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): IDVSession_VerificationsEntry { + const message = createBaseIDVSession_VerificationsEntry(); + message.key = object.key ?? ""; + message.value = (object.value !== undefined && object.value !== null) + ? Verification.fromPartial(object.value) + : undefined; + return message; + }, }; function createBaseVerification(): Verification { - return { id: "", type: 0, state: 0, reused: false, begun: 0, updated: 0 }; + return { id: "", type: 0, state: 0, reused: false, begun: 0, updated: 0 }; } export const Verification = { - encode( - message: Verification, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.id !== undefined && message.id !== "") { - writer.uint32(10).string(message.id); - } - if (message.type !== undefined && message.type !== 0) { - writer.uint32(16).int32(message.type); - } - if (message.state !== undefined && message.state !== 0) { - writer.uint32(24).int32(message.state); - } - if (message.reused === true) { - writer.uint32(32).bool(message.reused); - } - if (message.begun !== undefined && message.begun !== 0) { - writer.uint32(41).fixed64(message.begun); - } - if (message.updated !== undefined && message.updated !== 0) { - writer.uint32(49).fixed64(message.updated); - } - return writer; - }, + encode(message: Verification, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.id !== undefined && message.id !== "") { + writer.uint32(10).string(message.id); + } + if (message.type !== undefined && message.type !== 0) { + writer.uint32(16).int32(message.type); + } + if (message.state !== undefined && message.state !== 0) { + writer.uint32(24).int32(message.state); + } + if (message.reused === true) { + writer.uint32(32).bool(message.reused); + } + if (message.begun !== undefined && message.begun !== 0) { + writer.uint32(41).fixed64(message.begun); + } + if (message.updated !== undefined && message.updated !== 0) { + writer.uint32(49).fixed64(message.updated); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Verification { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseVerification(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - decode(input: _m0.Reader | Uint8Array, length?: number): Verification { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseVerification(); - 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 !== 16) { - break; - } - - message.type = reader.int32() as any; - continue; - case 3: - if (tag !== 24) { - break; - } - - message.state = reader.int32() as any; - continue; - case 4: - if (tag !== 32) { - break; - } - - message.reused = reader.bool(); - continue; - case 5: - if (tag !== 41) { - break; - } - - message.begun = longToNumber(reader.fixed64() as Long); - continue; - case 6: - if (tag !== 49) { - break; - } - - message.updated = longToNumber(reader.fixed64() as Long); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + message.id = reader.string(); + continue; + case 2: + if (tag !== 16) { + break; + } - fromJSON(object: any): Verification { - return { - id: isSet(object.id) ? String(object.id) : "", - type: isSet(object.type) - ? verificationTypeFromJSON(object.type) - : 0, - state: isSet(object.state) - ? verificationStateFromJSON(object.state) - : 0, - reused: isSet(object.reused) ? Boolean(object.reused) : false, - begun: isSet(object.begun) ? Number(object.begun) : 0, - updated: isSet(object.updated) ? Number(object.updated) : 0, - }; - }, + message.type = reader.int32() as any; + continue; + case 3: + if (tag !== 24) { + break; + } - toJSON(message: Verification): unknown { - const obj: any = {}; - if (message.id !== undefined && message.id !== "") { - obj.id = message.id; - } - if (message.type !== undefined && message.type !== 0) { - obj.type = verificationTypeToJSON(message.type); - } - if (message.state !== undefined && message.state !== 0) { - obj.state = verificationStateToJSON(message.state); - } - if (message.reused === true) { - obj.reused = message.reused; - } - if (message.begun !== undefined && message.begun !== 0) { - obj.begun = Math.round(message.begun); - } - if (message.updated !== undefined && message.updated !== 0) { - obj.updated = Math.round(message.updated); - } - return obj; - }, + message.state = reader.int32() as any; + continue; + case 4: + if (tag !== 32) { + break; + } - create(base?: DeepPartial): Verification { - return Verification.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): Verification { - const message = createBaseVerification(); - message.id = object.id ?? ""; - message.type = object.type ?? 0; - message.state = object.state ?? 0; - message.reused = object.reused ?? false; - message.begun = object.begun ?? 0; - message.updated = object.updated ?? 0; - return message; - }, + message.reused = reader.bool(); + continue; + case 5: + if (tag !== 41) { + break; + } + + message.begun = longToNumber(reader.fixed64() as Long); + continue; + case 6: + if (tag !== 49) { + break; + } + + message.updated = longToNumber(reader.fixed64() as Long); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Verification { + return { + id: isSet(object.id) ? String(object.id) : "", + type: isSet(object.type) ? verificationTypeFromJSON(object.type) : 0, + state: isSet(object.state) ? verificationStateFromJSON(object.state) : 0, + reused: isSet(object.reused) ? Boolean(object.reused) : false, + begun: isSet(object.begun) ? Number(object.begun) : 0, + updated: isSet(object.updated) ? Number(object.updated) : 0, + }; + }, + + toJSON(message: Verification): unknown { + const obj: any = {}; + if (message.id !== undefined && message.id !== "") { + obj.id = message.id; + } + if (message.type !== undefined && message.type !== 0) { + obj.type = verificationTypeToJSON(message.type); + } + if (message.state !== undefined && message.state !== 0) { + obj.state = verificationStateToJSON(message.state); + } + if (message.reused === true) { + obj.reused = message.reused; + } + if (message.begun !== undefined && message.begun !== 0) { + obj.begun = Math.round(message.begun); + } + if (message.updated !== undefined && message.updated !== 0) { + obj.updated = Math.round(message.updated); + } + return obj; + }, + + create(base?: DeepPartial): Verification { + return Verification.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): Verification { + const message = createBaseVerification(); + message.id = object.id ?? ""; + message.type = object.type ?? 0; + message.state = object.state ?? 0; + message.reused = object.reused ?? false; + message.begun = object.begun ?? 0; + message.updated = object.updated ?? 0; + return message; + }, }; function createBaseCreateSessionRequest(): CreateSessionRequest { - return { verifications: [] }; + return { verifications: [] }; } export const CreateSessionRequest = { - encode( - message: CreateSessionRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if ( - message.verifications !== undefined && - message.verifications.length !== 0 - ) { - for (const v of message.verifications) { - RequestedVerification.encode( - v!, - writer.uint32(10).fork(), - ).ldelim(); - } - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): CreateSessionRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCreateSessionRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.verifications!.push( - RequestedVerification.decode(reader, reader.uint32()), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): CreateSessionRequest { - return { - verifications: Array.isArray(object?.verifications) - ? object.verifications.map((e: any) => - RequestedVerification.fromJSON(e), - ) - : [], - }; - }, + encode(message: CreateSessionRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.verifications !== undefined && message.verifications.length !== 0) { + for (const v of message.verifications) { + RequestedVerification.encode(v!, writer.uint32(10).fork()).ldelim(); + } + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): CreateSessionRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCreateSessionRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.verifications!.push(RequestedVerification.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: CreateSessionRequest): unknown { - const obj: any = {}; - if (message.verifications?.length) { - obj.verifications = message.verifications.map((e) => - RequestedVerification.toJSON(e), - ); - } - return obj; - }, + fromJSON(object: any): CreateSessionRequest { + return { + verifications: Array.isArray(object?.verifications) + ? object.verifications.map((e: any) => RequestedVerification.fromJSON(e)) + : [], + }; + }, - create(base?: DeepPartial): CreateSessionRequest { - return CreateSessionRequest.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): CreateSessionRequest { - const message = createBaseCreateSessionRequest(); - message.verifications = - object.verifications?.map((e) => - RequestedVerification.fromPartial(e), - ) || []; - return message; - }, + toJSON(message: CreateSessionRequest): unknown { + const obj: any = {}; + if (message.verifications?.length) { + obj.verifications = message.verifications.map((e) => RequestedVerification.toJSON(e)); + } + return obj; + }, + + create(base?: DeepPartial): CreateSessionRequest { + return CreateSessionRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): CreateSessionRequest { + const message = createBaseCreateSessionRequest(); + message.verifications = object.verifications?.map((e) => RequestedVerification.fromPartial(e)) || []; + return message; + }, }; function createBaseRequestedVerification(): RequestedVerification { - return { type: 0 }; + return { type: 0 }; } export const RequestedVerification = { - encode( - message: RequestedVerification, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.type !== undefined && message.type !== 0) { - writer.uint32(8).int32(message.type); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): RequestedVerification { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRequestedVerification(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.type = reader.int32() as any; - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: RequestedVerification, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.type !== undefined && message.type !== 0) { + writer.uint32(8).int32(message.type); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): RequestedVerification { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseRequestedVerification(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.type = reader.int32() as any; + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - fromJSON(object: any): RequestedVerification { - return { - type: isSet(object.type) - ? verificationTypeFromJSON(object.type) - : 0, - }; - }, + fromJSON(object: any): RequestedVerification { + return { type: isSet(object.type) ? verificationTypeFromJSON(object.type) : 0 }; + }, - toJSON(message: RequestedVerification): unknown { - const obj: any = {}; - if (message.type !== undefined && message.type !== 0) { - obj.type = verificationTypeToJSON(message.type); - } - return obj; - }, - - create(base?: DeepPartial): RequestedVerification { - return RequestedVerification.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): RequestedVerification { - const message = createBaseRequestedVerification(); - message.type = object.type ?? 0; - return message; - }, + toJSON(message: RequestedVerification): unknown { + const obj: any = {}; + if (message.type !== undefined && message.type !== 0) { + obj.type = verificationTypeToJSON(message.type); + } + return obj; + }, + + create(base?: DeepPartial): RequestedVerification { + return RequestedVerification.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): RequestedVerification { + const message = createBaseRequestedVerification(); + message.type = object.type ?? 0; + return message; + }, }; function createBaseCreateSessionResponse(): CreateSessionResponse { - return { session: undefined }; + return { session: undefined }; } export const CreateSessionResponse = { - encode( - message: CreateSessionResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.session !== undefined) { - IDVSession.encode( - message.session, - writer.uint32(10).fork(), - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): CreateSessionResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCreateSessionResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.session = IDVSession.decode( - reader, - reader.uint32(), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): CreateSessionResponse { - return { - session: isSet(object.session) - ? IDVSession.fromJSON(object.session) - : undefined, - }; - }, + encode(message: CreateSessionResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.session !== undefined) { + IDVSession.encode(message.session, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): CreateSessionResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCreateSessionResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.session = IDVSession.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: CreateSessionResponse): unknown { - const obj: any = {}; - if (message.session !== undefined) { - obj.session = IDVSession.toJSON(message.session); - } - return obj; - }, + fromJSON(object: any): CreateSessionResponse { + return { session: isSet(object.session) ? IDVSession.fromJSON(object.session) : undefined }; + }, - create(base?: DeepPartial): CreateSessionResponse { - return CreateSessionResponse.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): CreateSessionResponse { - const message = createBaseCreateSessionResponse(); - message.session = - object.session !== undefined && object.session !== null - ? IDVSession.fromPartial(object.session) - : undefined; - return message; - }, + toJSON(message: CreateSessionResponse): unknown { + const obj: any = {}; + if (message.session !== undefined) { + obj.session = IDVSession.toJSON(message.session); + } + return obj; + }, + + create(base?: DeepPartial): CreateSessionResponse { + return CreateSessionResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): CreateSessionResponse { + const message = createBaseCreateSessionResponse(); + message.session = (object.session !== undefined && object.session !== null) + ? IDVSession.fromPartial(object.session) + : undefined; + return message; + }, }; function createBaseCancelSessionRequest(): CancelSessionRequest { - return { idvSessionId: "" }; + return { idvSessionId: "" }; } export const CancelSessionRequest = { - encode( - message: CancelSessionRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.idvSessionId !== undefined && message.idvSessionId !== "") { - writer.uint32(10).string(message.idvSessionId); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): CancelSessionRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCancelSessionRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.idvSessionId = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: CancelSessionRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.idvSessionId !== undefined && message.idvSessionId !== "") { + writer.uint32(10).string(message.idvSessionId); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): CancelSessionRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCancelSessionRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.idvSessionId = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - fromJSON(object: any): CancelSessionRequest { - return { - idvSessionId: isSet(object.idvSessionId) - ? String(object.idvSessionId) - : "", - }; - }, + fromJSON(object: any): CancelSessionRequest { + return { idvSessionId: isSet(object.idvSessionId) ? String(object.idvSessionId) : "" }; + }, - toJSON(message: CancelSessionRequest): unknown { - const obj: any = {}; - if (message.idvSessionId !== undefined && message.idvSessionId !== "") { - obj.idvSessionId = message.idvSessionId; - } - return obj; - }, - - create(base?: DeepPartial): CancelSessionRequest { - return CancelSessionRequest.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): CancelSessionRequest { - const message = createBaseCancelSessionRequest(); - message.idvSessionId = object.idvSessionId ?? ""; - return message; - }, + toJSON(message: CancelSessionRequest): unknown { + const obj: any = {}; + if (message.idvSessionId !== undefined && message.idvSessionId !== "") { + obj.idvSessionId = message.idvSessionId; + } + return obj; + }, + + create(base?: DeepPartial): CancelSessionRequest { + return CancelSessionRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): CancelSessionRequest { + const message = createBaseCancelSessionRequest(); + message.idvSessionId = object.idvSessionId ?? ""; + return message; + }, }; function createBaseCancelSessionResponse(): CancelSessionResponse { - return { session: undefined }; + return { session: undefined }; } export const CancelSessionResponse = { - encode( - message: CancelSessionResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.session !== undefined) { - IDVSession.encode( - message.session, - writer.uint32(10).fork(), - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): CancelSessionResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCancelSessionResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.session = IDVSession.decode( - reader, - reader.uint32(), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): CancelSessionResponse { - return { - session: isSet(object.session) - ? IDVSession.fromJSON(object.session) - : undefined, - }; - }, + encode(message: CancelSessionResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.session !== undefined) { + IDVSession.encode(message.session, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): CancelSessionResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCancelSessionResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.session = IDVSession.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: CancelSessionResponse): unknown { - const obj: any = {}; - if (message.session !== undefined) { - obj.session = IDVSession.toJSON(message.session); - } - return obj; - }, + fromJSON(object: any): CancelSessionResponse { + return { session: isSet(object.session) ? IDVSession.fromJSON(object.session) : undefined }; + }, - create(base?: DeepPartial): CancelSessionResponse { - return CancelSessionResponse.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): CancelSessionResponse { - const message = createBaseCancelSessionResponse(); - message.session = - object.session !== undefined && object.session !== null - ? IDVSession.fromPartial(object.session) - : undefined; - return message; - }, + toJSON(message: CancelSessionResponse): unknown { + const obj: any = {}; + if (message.session !== undefined) { + obj.session = IDVSession.toJSON(message.session); + } + return obj; + }, + + create(base?: DeepPartial): CancelSessionResponse { + return CancelSessionResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): CancelSessionResponse { + const message = createBaseCancelSessionResponse(); + message.session = (object.session !== undefined && object.session !== null) + ? IDVSession.fromPartial(object.session) + : undefined; + return message; + }, }; function createBaseGetSessionRequest(): GetSessionRequest { - return { idvSessionId: "" }; + return { idvSessionId: "" }; } export const GetSessionRequest = { - encode( - message: GetSessionRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.idvSessionId !== undefined && message.idvSessionId !== "") { - writer.uint32(10).string(message.idvSessionId); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): GetSessionRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetSessionRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.idvSessionId = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): GetSessionRequest { - return { - idvSessionId: isSet(object.idvSessionId) - ? String(object.idvSessionId) - : "", - }; - }, + encode(message: GetSessionRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.idvSessionId !== undefined && message.idvSessionId !== "") { + writer.uint32(10).string(message.idvSessionId); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): GetSessionRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGetSessionRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.idvSessionId = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: GetSessionRequest): unknown { - const obj: any = {}; - if (message.idvSessionId !== undefined && message.idvSessionId !== "") { - obj.idvSessionId = message.idvSessionId; - } - return obj; - }, + fromJSON(object: any): GetSessionRequest { + return { idvSessionId: isSet(object.idvSessionId) ? String(object.idvSessionId) : "" }; + }, - create(base?: DeepPartial): GetSessionRequest { - return GetSessionRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): GetSessionRequest { - const message = createBaseGetSessionRequest(); - message.idvSessionId = object.idvSessionId ?? ""; - return message; - }, + toJSON(message: GetSessionRequest): unknown { + const obj: any = {}; + if (message.idvSessionId !== undefined && message.idvSessionId !== "") { + obj.idvSessionId = message.idvSessionId; + } + return obj; + }, + + create(base?: DeepPartial): GetSessionRequest { + return GetSessionRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): GetSessionRequest { + const message = createBaseGetSessionRequest(); + message.idvSessionId = object.idvSessionId ?? ""; + return message; + }, }; function createBaseGetSessionResponse(): GetSessionResponse { - return { session: undefined }; + return { session: undefined }; } export const GetSessionResponse = { - encode( - message: GetSessionResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.session !== undefined) { - IDVSession.encode( - message.session, - writer.uint32(10).fork(), - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): GetSessionResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetSessionResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.session = IDVSession.decode( - reader, - reader.uint32(), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: GetSessionResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.session !== undefined) { + IDVSession.encode(message.session, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): GetSessionResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGetSessionResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.session = IDVSession.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - fromJSON(object: any): GetSessionResponse { - return { - session: isSet(object.session) - ? IDVSession.fromJSON(object.session) - : undefined, - }; - }, + fromJSON(object: any): GetSessionResponse { + return { session: isSet(object.session) ? IDVSession.fromJSON(object.session) : undefined }; + }, - toJSON(message: GetSessionResponse): unknown { - const obj: any = {}; - if (message.session !== undefined) { - obj.session = IDVSession.toJSON(message.session); - } - return obj; - }, - - create(base?: DeepPartial): GetSessionResponse { - return GetSessionResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): GetSessionResponse { - const message = createBaseGetSessionResponse(); - message.session = - object.session !== undefined && object.session !== null - ? IDVSession.fromPartial(object.session) - : undefined; - return message; - }, + toJSON(message: GetSessionResponse): unknown { + const obj: any = {}; + if (message.session !== undefined) { + obj.session = IDVSession.toJSON(message.session); + } + return obj; + }, + + create(base?: DeepPartial): GetSessionResponse { + return GetSessionResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): GetSessionResponse { + const message = createBaseGetSessionResponse(); + message.session = (object.session !== undefined && object.session !== null) + ? IDVSession.fromPartial(object.session) + : undefined; + return message; + }, }; /** The Connect service provides access to Trinsic Connect, a reusable identity verification service. */ export type ConnectDefinition = typeof ConnectDefinition; export const ConnectDefinition = { - name: "Connect", - fullName: "services.connect.v1.Connect", - methods: { - /** Create an IDVSession */ - createSession: { - name: "CreateSession", - requestType: CreateSessionRequest, - requestStream: false, - responseType: CreateSessionResponse, - responseStream: false, - options: {}, - }, - /** Cancel an IDVSession */ - cancelSession: { - name: "CancelSession", - requestType: CancelSessionRequest, - requestStream: false, - responseType: CancelSessionResponse, - responseStream: false, - options: {}, - }, - /** Get an IDVSession */ - getSession: { - name: "GetSession", - requestType: GetSessionRequest, - requestStream: false, - responseType: GetSessionResponse, - responseStream: false, - options: {}, - }, + name: "Connect", + fullName: "services.connect.v1.Connect", + methods: { + /** Create an IDVSession */ + createSession: { + name: "CreateSession", + requestType: CreateSessionRequest, + requestStream: false, + responseType: CreateSessionResponse, + responseStream: false, + options: {}, + }, + /** Cancel an IDVSession */ + cancelSession: { + name: "CancelSession", + requestType: CancelSessionRequest, + requestStream: false, + responseType: CancelSessionResponse, + responseStream: false, + options: {}, }, + /** Get an IDVSession */ + getSession: { + name: "GetSession", + requestType: GetSessionRequest, + requestStream: false, + responseType: GetSessionResponse, + responseStream: false, + options: {}, + }, + }, } as const; declare const self: any | undefined; declare const window: any | undefined; declare const global: any | undefined; const tsProtoGlobalThis: any = (() => { - if (typeof globalThis !== "undefined") { - return globalThis; - } - if (typeof self !== "undefined") { - return self; - } - if (typeof window !== "undefined") { - return window; - } - if (typeof global !== "undefined") { - return global; - } - throw "Unable to locate global object"; + if (typeof globalThis !== "undefined") { + return globalThis; + } + if (typeof self !== "undefined") { + return self; + } + if (typeof window !== "undefined") { + return window; + } + if (typeof global !== "undefined") { + return global; + } + throw "Unable to locate global object"; })(); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new tsProtoGlobalThis.Error( - "Value is larger than Number.MAX_SAFE_INTEGER", - ); - } - return long.toNumber(); + if (long.gt(Number.MAX_SAFE_INTEGER)) { + throw new tsProtoGlobalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); + } + return long.toNumber(); } if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); + _m0.util.Long = Long as any; + _m0.configure(); } function isObject(value: any): boolean { - return typeof value === "object" && value !== null; + return typeof value === "object" && value !== null; } function isSet(value: any): boolean { - return value !== null && value !== undefined; + return value !== null && value !== undefined; } diff --git a/web/src/proto/services/file-management/v1/file-management.ts b/web/src/proto/services/file-management/v1/file-management.ts index 383652140..299ce4033 100644 --- a/web/src/proto/services/file-management/v1/file-management.ts +++ b/web/src/proto/services/file-management/v1/file-management.ts @@ -4,1181 +4,1053 @@ import _m0 from "protobufjs/minimal"; /** Contains information about a file stored in Trinsic's CDN */ export interface File { - /** ID of file, generated randomly by Trinsic on upload */ - id?: string | undefined; - /** Wallet ID of uploader */ - uploaderId?: string | undefined; - /** Size, in bytes, of file */ - size?: number | undefined; - /** Uploader-provided MIME type of file */ - mimeType?: string | undefined; - /** ISO 8601 timestamp of when file was uploaded to Trinsic */ - uploaded?: string | undefined; - /** CDN URL of file */ - url?: string | undefined; + /** ID of file, generated randomly by Trinsic on upload */ + id?: + | string + | undefined; + /** Wallet ID of uploader */ + uploaderId?: + | string + | undefined; + /** Size, in bytes, of file */ + size?: + | number + | undefined; + /** Uploader-provided MIME type of file */ + mimeType?: + | string + | undefined; + /** ISO 8601 timestamp of when file was uploaded to Trinsic */ + uploaded?: + | string + | undefined; + /** CDN URL of file */ + url?: string | undefined; } /** Represents aggregate statistics of all files uploaded by a single issuer */ export interface StorageStats { - /** Number of files uploaded by this account */ - numFiles?: number | undefined; - /** Sum total size of all files, in bytes */ - totalSize?: number | undefined; + /** Number of files uploaded by this account */ + numFiles?: + | number + | undefined; + /** Sum total size of all files, in bytes */ + totalSize?: number | undefined; } /** Request to upload a file to Trinsic's CDN */ export interface UploadFileRequest { - /** Raw content of file */ - contents?: Uint8Array | undefined; - /** MIME type describing file contents */ - mimeType?: string | undefined; + /** Raw content of file */ + contents?: + | Uint8Array + | undefined; + /** MIME type describing file contents */ + mimeType?: string | undefined; } /** Response to `UploadFileRequest` */ export interface UploadFileResponse { - /** Information about newly-uploaded file */ - uploadedFile?: File | undefined; + /** Information about newly-uploaded file */ + uploadedFile?: File | undefined; } /** Request to fetch information about a stored file */ export interface GetFileRequest { - /** ID of file to fetch */ - id?: string | undefined; + /** ID of file to fetch */ + id?: string | undefined; } /** Response to `GetFileRequest` */ export interface GetFileResponse { - /** File specified by `id` parameter of `GetFileRequest`. */ - file?: File | undefined; + /** File specified by `id` parameter of `GetFileRequest`. */ + file?: File | undefined; } /** Request to delete a file from Trinsic's CDN by ID */ export interface DeleteFileRequest { - /** ID of file to delete */ - id?: string | undefined; + /** ID of file to delete */ + id?: string | undefined; } /** Response to `DeleteFileRequest`. Empty payload. */ -export interface DeleteFileResponse {} +export interface DeleteFileResponse { +} /** Request to list files */ export interface ListFilesRequest { - /** Query to search with. If not specified, will return the most recent 100 files. */ - query?: string | undefined; - /** - * Token provided by previous `ListFilesRequest` - * if more data is available for query - */ - continuationToken?: string | undefined; + /** Query to search with. If not specified, will return the most recent 100 files. */ + query?: + | string + | undefined; + /** + * Token provided by previous `ListFilesRequest` + * if more data is available for query + */ + continuationToken?: string | undefined; } /** Response to `ListFilesRequest` */ export interface ListFilesResponse { - /** Files found by query */ - files?: File[] | undefined; - /** Whether more results are available for this query via `continuation_token` */ - hasMoreResults?: boolean | undefined; - /** Token to fetch next set of results via `ListFilesRequest` */ - continuationToken?: string | undefined; + /** Files found by query */ + files?: + | File[] + | undefined; + /** Whether more results are available for this query via `continuation_token` */ + hasMoreResults?: + | boolean + | undefined; + /** Token to fetch next set of results via `ListFilesRequest` */ + continuationToken?: string | undefined; } /** Request to get statistics about files uploaded by this account */ -export interface GetStorageStatsRequest {} +export interface GetStorageStatsRequest { +} /** Response to `GetStorageStatsRequest` */ export interface GetStorageStatsResponse { - /** Statistics about files uploaded by the calling account */ - stats?: StorageStats | undefined; + /** Statistics about files uploaded by the calling account */ + stats?: StorageStats | undefined; } function createBaseFile(): File { - return { - id: "", - uploaderId: "", - size: 0, - mimeType: "", - uploaded: "", - url: "", - }; + return { id: "", uploaderId: "", size: 0, mimeType: "", uploaded: "", url: "" }; } export const File = { - encode( - message: File, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.id !== undefined && message.id !== "") { - writer.uint32(10).string(message.id); - } - if (message.uploaderId !== undefined && message.uploaderId !== "") { - writer.uint32(18).string(message.uploaderId); - } - if (message.size !== undefined && message.size !== 0) { - writer.uint32(24).uint32(message.size); - } - if (message.mimeType !== undefined && message.mimeType !== "") { - writer.uint32(34).string(message.mimeType); - } - if (message.uploaded !== undefined && message.uploaded !== "") { - writer.uint32(42).string(message.uploaded); - } - if (message.url !== undefined && message.url !== "") { - writer.uint32(50).string(message.url); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): File { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFile(); - 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.uploaderId = reader.string(); - continue; - case 3: - if (tag !== 24) { - break; - } - - message.size = reader.uint32(); - continue; - case 4: - if (tag !== 34) { - break; - } - - message.mimeType = reader.string(); - continue; - case 5: - if (tag !== 42) { - break; - } - - message.uploaded = reader.string(); - continue; - case 6: - if (tag !== 50) { - break; - } - - message.url = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): File { - return { - id: isSet(object.id) ? String(object.id) : "", - uploaderId: isSet(object.uploaderId) - ? String(object.uploaderId) - : "", - size: isSet(object.size) ? Number(object.size) : 0, - mimeType: isSet(object.mimeType) ? String(object.mimeType) : "", - uploaded: isSet(object.uploaded) ? String(object.uploaded) : "", - url: isSet(object.url) ? String(object.url) : "", - }; - }, + encode(message: File, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.id !== undefined && message.id !== "") { + writer.uint32(10).string(message.id); + } + if (message.uploaderId !== undefined && message.uploaderId !== "") { + writer.uint32(18).string(message.uploaderId); + } + if (message.size !== undefined && message.size !== 0) { + writer.uint32(24).uint32(message.size); + } + if (message.mimeType !== undefined && message.mimeType !== "") { + writer.uint32(34).string(message.mimeType); + } + if (message.uploaded !== undefined && message.uploaded !== "") { + writer.uint32(42).string(message.uploaded); + } + if (message.url !== undefined && message.url !== "") { + writer.uint32(50).string(message.url); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): File { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseFile(); + 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.uploaderId = reader.string(); + continue; + case 3: + if (tag !== 24) { + break; + } + + message.size = reader.uint32(); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.mimeType = reader.string(); + continue; + case 5: + if (tag !== 42) { + break; + } + + message.uploaded = reader.string(); + continue; + case 6: + if (tag !== 50) { + break; + } + + message.url = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: File): unknown { - const obj: any = {}; - if (message.id !== undefined && message.id !== "") { - obj.id = message.id; - } - if (message.uploaderId !== undefined && message.uploaderId !== "") { - obj.uploaderId = message.uploaderId; - } - if (message.size !== undefined && message.size !== 0) { - obj.size = Math.round(message.size); - } - if (message.mimeType !== undefined && message.mimeType !== "") { - obj.mimeType = message.mimeType; - } - if (message.uploaded !== undefined && message.uploaded !== "") { - obj.uploaded = message.uploaded; - } - if (message.url !== undefined && message.url !== "") { - obj.url = message.url; - } - return obj; - }, + fromJSON(object: any): File { + return { + id: isSet(object.id) ? String(object.id) : "", + uploaderId: isSet(object.uploaderId) ? String(object.uploaderId) : "", + size: isSet(object.size) ? Number(object.size) : 0, + mimeType: isSet(object.mimeType) ? String(object.mimeType) : "", + uploaded: isSet(object.uploaded) ? String(object.uploaded) : "", + url: isSet(object.url) ? String(object.url) : "", + }; + }, - create(base?: DeepPartial): File { - return File.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): File { - const message = createBaseFile(); - message.id = object.id ?? ""; - message.uploaderId = object.uploaderId ?? ""; - message.size = object.size ?? 0; - message.mimeType = object.mimeType ?? ""; - message.uploaded = object.uploaded ?? ""; - message.url = object.url ?? ""; - return message; - }, + toJSON(message: File): unknown { + const obj: any = {}; + if (message.id !== undefined && message.id !== "") { + obj.id = message.id; + } + if (message.uploaderId !== undefined && message.uploaderId !== "") { + obj.uploaderId = message.uploaderId; + } + if (message.size !== undefined && message.size !== 0) { + obj.size = Math.round(message.size); + } + if (message.mimeType !== undefined && message.mimeType !== "") { + obj.mimeType = message.mimeType; + } + if (message.uploaded !== undefined && message.uploaded !== "") { + obj.uploaded = message.uploaded; + } + if (message.url !== undefined && message.url !== "") { + obj.url = message.url; + } + return obj; + }, + + create(base?: DeepPartial): File { + return File.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): File { + const message = createBaseFile(); + message.id = object.id ?? ""; + message.uploaderId = object.uploaderId ?? ""; + message.size = object.size ?? 0; + message.mimeType = object.mimeType ?? ""; + message.uploaded = object.uploaded ?? ""; + message.url = object.url ?? ""; + return message; + }, }; function createBaseStorageStats(): StorageStats { - return { numFiles: 0, totalSize: 0 }; + return { numFiles: 0, totalSize: 0 }; } export const StorageStats = { - encode( - message: StorageStats, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.numFiles !== undefined && message.numFiles !== 0) { - writer.uint32(8).uint32(message.numFiles); - } - if (message.totalSize !== undefined && message.totalSize !== 0) { - writer.uint32(16).uint64(message.totalSize); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): StorageStats { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseStorageStats(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.numFiles = reader.uint32(); - continue; - case 2: - if (tag !== 16) { - break; - } - - message.totalSize = longToNumber(reader.uint64() as Long); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): StorageStats { - return { - numFiles: isSet(object.numFiles) ? Number(object.numFiles) : 0, - totalSize: isSet(object.totalSize) ? Number(object.totalSize) : 0, - }; - }, + encode(message: StorageStats, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.numFiles !== undefined && message.numFiles !== 0) { + writer.uint32(8).uint32(message.numFiles); + } + if (message.totalSize !== undefined && message.totalSize !== 0) { + writer.uint32(16).uint64(message.totalSize); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): StorageStats { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseStorageStats(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.numFiles = reader.uint32(); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.totalSize = longToNumber(reader.uint64() as Long); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: StorageStats): unknown { - const obj: any = {}; - if (message.numFiles !== undefined && message.numFiles !== 0) { - obj.numFiles = Math.round(message.numFiles); - } - if (message.totalSize !== undefined && message.totalSize !== 0) { - obj.totalSize = Math.round(message.totalSize); - } - return obj; - }, + fromJSON(object: any): StorageStats { + return { + numFiles: isSet(object.numFiles) ? Number(object.numFiles) : 0, + totalSize: isSet(object.totalSize) ? Number(object.totalSize) : 0, + }; + }, - create(base?: DeepPartial): StorageStats { - return StorageStats.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): StorageStats { - const message = createBaseStorageStats(); - message.numFiles = object.numFiles ?? 0; - message.totalSize = object.totalSize ?? 0; - return message; - }, + toJSON(message: StorageStats): unknown { + const obj: any = {}; + if (message.numFiles !== undefined && message.numFiles !== 0) { + obj.numFiles = Math.round(message.numFiles); + } + if (message.totalSize !== undefined && message.totalSize !== 0) { + obj.totalSize = Math.round(message.totalSize); + } + return obj; + }, + + create(base?: DeepPartial): StorageStats { + return StorageStats.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): StorageStats { + const message = createBaseStorageStats(); + message.numFiles = object.numFiles ?? 0; + message.totalSize = object.totalSize ?? 0; + return message; + }, }; function createBaseUploadFileRequest(): UploadFileRequest { - return { contents: new Uint8Array(0), mimeType: "" }; + return { contents: new Uint8Array(0), mimeType: "" }; } export const UploadFileRequest = { - encode( - message: UploadFileRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.contents !== undefined && message.contents.length !== 0) { - writer.uint32(10).bytes(message.contents); - } - if (message.mimeType !== undefined && message.mimeType !== "") { - writer.uint32(18).string(message.mimeType); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): UploadFileRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUploadFileRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.contents = reader.bytes(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.mimeType = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): UploadFileRequest { - return { - contents: isSet(object.contents) - ? bytesFromBase64(object.contents) - : new Uint8Array(0), - mimeType: isSet(object.mimeType) ? String(object.mimeType) : "", - }; - }, + encode(message: UploadFileRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.contents !== undefined && message.contents.length !== 0) { + writer.uint32(10).bytes(message.contents); + } + if (message.mimeType !== undefined && message.mimeType !== "") { + writer.uint32(18).string(message.mimeType); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): UploadFileRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUploadFileRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.contents = reader.bytes(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.mimeType = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: UploadFileRequest): unknown { - const obj: any = {}; - if (message.contents !== undefined && message.contents.length !== 0) { - obj.contents = base64FromBytes(message.contents); - } - if (message.mimeType !== undefined && message.mimeType !== "") { - obj.mimeType = message.mimeType; - } - return obj; - }, + fromJSON(object: any): UploadFileRequest { + return { + contents: isSet(object.contents) ? bytesFromBase64(object.contents) : new Uint8Array(0), + mimeType: isSet(object.mimeType) ? String(object.mimeType) : "", + }; + }, - create(base?: DeepPartial): UploadFileRequest { - return UploadFileRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): UploadFileRequest { - const message = createBaseUploadFileRequest(); - message.contents = object.contents ?? new Uint8Array(0); - message.mimeType = object.mimeType ?? ""; - return message; - }, + toJSON(message: UploadFileRequest): unknown { + const obj: any = {}; + if (message.contents !== undefined && message.contents.length !== 0) { + obj.contents = base64FromBytes(message.contents); + } + if (message.mimeType !== undefined && message.mimeType !== "") { + obj.mimeType = message.mimeType; + } + return obj; + }, + + create(base?: DeepPartial): UploadFileRequest { + return UploadFileRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): UploadFileRequest { + const message = createBaseUploadFileRequest(); + message.contents = object.contents ?? new Uint8Array(0); + message.mimeType = object.mimeType ?? ""; + return message; + }, }; function createBaseUploadFileResponse(): UploadFileResponse { - return { uploadedFile: undefined }; + return { uploadedFile: undefined }; } export const UploadFileResponse = { - encode( - message: UploadFileResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.uploadedFile !== undefined) { - File.encode( - message.uploadedFile, - writer.uint32(10).fork(), - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): UploadFileResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUploadFileResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.uploadedFile = File.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): UploadFileResponse { - return { - uploadedFile: isSet(object.uploadedFile) - ? File.fromJSON(object.uploadedFile) - : undefined, - }; - }, + encode(message: UploadFileResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.uploadedFile !== undefined) { + File.encode(message.uploadedFile, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): UploadFileResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUploadFileResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.uploadedFile = File.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: UploadFileResponse): unknown { - const obj: any = {}; - if (message.uploadedFile !== undefined) { - obj.uploadedFile = File.toJSON(message.uploadedFile); - } - return obj; - }, + fromJSON(object: any): UploadFileResponse { + return { uploadedFile: isSet(object.uploadedFile) ? File.fromJSON(object.uploadedFile) : undefined }; + }, - create(base?: DeepPartial): UploadFileResponse { - return UploadFileResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): UploadFileResponse { - const message = createBaseUploadFileResponse(); - message.uploadedFile = - object.uploadedFile !== undefined && object.uploadedFile !== null - ? File.fromPartial(object.uploadedFile) - : undefined; - return message; - }, + toJSON(message: UploadFileResponse): unknown { + const obj: any = {}; + if (message.uploadedFile !== undefined) { + obj.uploadedFile = File.toJSON(message.uploadedFile); + } + return obj; + }, + + create(base?: DeepPartial): UploadFileResponse { + return UploadFileResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): UploadFileResponse { + const message = createBaseUploadFileResponse(); + message.uploadedFile = (object.uploadedFile !== undefined && object.uploadedFile !== null) + ? File.fromPartial(object.uploadedFile) + : undefined; + return message; + }, }; function createBaseGetFileRequest(): GetFileRequest { - return { id: "" }; + return { id: "" }; } export const GetFileRequest = { - encode( - message: GetFileRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.id !== undefined && message.id !== "") { - writer.uint32(10).string(message.id); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): GetFileRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetFileRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.id = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): GetFileRequest { - return { id: isSet(object.id) ? String(object.id) : "" }; - }, + encode(message: GetFileRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.id !== undefined && message.id !== "") { + writer.uint32(10).string(message.id); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): GetFileRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGetFileRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.id = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: GetFileRequest): unknown { - const obj: any = {}; - if (message.id !== undefined && message.id !== "") { - obj.id = message.id; - } - return obj; - }, + fromJSON(object: any): GetFileRequest { + return { id: isSet(object.id) ? String(object.id) : "" }; + }, - create(base?: DeepPartial): GetFileRequest { - return GetFileRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): GetFileRequest { - const message = createBaseGetFileRequest(); - message.id = object.id ?? ""; - return message; - }, + toJSON(message: GetFileRequest): unknown { + const obj: any = {}; + if (message.id !== undefined && message.id !== "") { + obj.id = message.id; + } + return obj; + }, + + create(base?: DeepPartial): GetFileRequest { + return GetFileRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): GetFileRequest { + const message = createBaseGetFileRequest(); + message.id = object.id ?? ""; + return message; + }, }; function createBaseGetFileResponse(): GetFileResponse { - return { file: undefined }; + return { file: undefined }; } export const GetFileResponse = { - encode( - message: GetFileResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.file !== undefined) { - File.encode(message.file, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): GetFileResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetFileResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.file = File.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): GetFileResponse { - return { - file: isSet(object.file) ? File.fromJSON(object.file) : undefined, - }; - }, + encode(message: GetFileResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.file !== undefined) { + File.encode(message.file, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): GetFileResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGetFileResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.file = File.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: GetFileResponse): unknown { - const obj: any = {}; - if (message.file !== undefined) { - obj.file = File.toJSON(message.file); - } - return obj; - }, + fromJSON(object: any): GetFileResponse { + return { file: isSet(object.file) ? File.fromJSON(object.file) : undefined }; + }, - create(base?: DeepPartial): GetFileResponse { - return GetFileResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): GetFileResponse { - const message = createBaseGetFileResponse(); - message.file = - object.file !== undefined && object.file !== null - ? File.fromPartial(object.file) - : undefined; - return message; - }, + toJSON(message: GetFileResponse): unknown { + const obj: any = {}; + if (message.file !== undefined) { + obj.file = File.toJSON(message.file); + } + return obj; + }, + + create(base?: DeepPartial): GetFileResponse { + return GetFileResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): GetFileResponse { + const message = createBaseGetFileResponse(); + message.file = (object.file !== undefined && object.file !== null) ? File.fromPartial(object.file) : undefined; + return message; + }, }; function createBaseDeleteFileRequest(): DeleteFileRequest { - return { id: "" }; + return { id: "" }; } export const DeleteFileRequest = { - encode( - message: DeleteFileRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.id !== undefined && message.id !== "") { - writer.uint32(10).string(message.id); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): DeleteFileRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDeleteFileRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.id = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): DeleteFileRequest { - return { id: isSet(object.id) ? String(object.id) : "" }; - }, + encode(message: DeleteFileRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.id !== undefined && message.id !== "") { + writer.uint32(10).string(message.id); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): DeleteFileRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseDeleteFileRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.id = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: DeleteFileRequest): unknown { - const obj: any = {}; - if (message.id !== undefined && message.id !== "") { - obj.id = message.id; - } - return obj; - }, + fromJSON(object: any): DeleteFileRequest { + return { id: isSet(object.id) ? String(object.id) : "" }; + }, - create(base?: DeepPartial): DeleteFileRequest { - return DeleteFileRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): DeleteFileRequest { - const message = createBaseDeleteFileRequest(); - message.id = object.id ?? ""; - return message; - }, + toJSON(message: DeleteFileRequest): unknown { + const obj: any = {}; + if (message.id !== undefined && message.id !== "") { + obj.id = message.id; + } + return obj; + }, + + create(base?: DeepPartial): DeleteFileRequest { + return DeleteFileRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): DeleteFileRequest { + const message = createBaseDeleteFileRequest(); + message.id = object.id ?? ""; + return message; + }, }; function createBaseDeleteFileResponse(): DeleteFileResponse { - return {}; + return {}; } export const DeleteFileResponse = { - encode( - _: DeleteFileResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): DeleteFileResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDeleteFileResponse(); - 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): DeleteFileResponse { - return {}; - }, - - toJSON(_: DeleteFileResponse): unknown { - const obj: any = {}; - return obj; - }, + encode(_: DeleteFileResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): DeleteFileResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseDeleteFileResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - create(base?: DeepPartial): DeleteFileResponse { - return DeleteFileResponse.fromPartial(base ?? {}); - }, - fromPartial(_: DeepPartial): DeleteFileResponse { - const message = createBaseDeleteFileResponse(); - return message; - }, + fromJSON(_: any): DeleteFileResponse { + return {}; + }, + + toJSON(_: DeleteFileResponse): unknown { + const obj: any = {}; + return obj; + }, + + create(base?: DeepPartial): DeleteFileResponse { + return DeleteFileResponse.fromPartial(base ?? {}); + }, + fromPartial(_: DeepPartial): DeleteFileResponse { + const message = createBaseDeleteFileResponse(); + return message; + }, }; function createBaseListFilesRequest(): ListFilesRequest { - return { query: "", continuationToken: "" }; + return { query: "", continuationToken: "" }; } export const ListFilesRequest = { - encode( - message: ListFilesRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.query !== undefined && message.query !== "") { - writer.uint32(10).string(message.query); - } - if ( - message.continuationToken !== undefined && - message.continuationToken !== "" - ) { - writer.uint32(18).string(message.continuationToken); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): ListFilesRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseListFilesRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.query = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.continuationToken = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): ListFilesRequest { - return { - query: isSet(object.query) ? String(object.query) : "", - continuationToken: isSet(object.continuationToken) - ? String(object.continuationToken) - : "", - }; - }, + encode(message: ListFilesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.query !== undefined && message.query !== "") { + writer.uint32(10).string(message.query); + } + if (message.continuationToken !== undefined && message.continuationToken !== "") { + writer.uint32(18).string(message.continuationToken); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ListFilesRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseListFilesRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.query = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.continuationToken = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: ListFilesRequest): unknown { - const obj: any = {}; - if (message.query !== undefined && message.query !== "") { - obj.query = message.query; - } - if ( - message.continuationToken !== undefined && - message.continuationToken !== "" - ) { - obj.continuationToken = message.continuationToken; - } - return obj; - }, + fromJSON(object: any): ListFilesRequest { + return { + query: isSet(object.query) ? String(object.query) : "", + continuationToken: isSet(object.continuationToken) ? String(object.continuationToken) : "", + }; + }, - create(base?: DeepPartial): ListFilesRequest { - return ListFilesRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): ListFilesRequest { - const message = createBaseListFilesRequest(); - message.query = object.query ?? ""; - message.continuationToken = object.continuationToken ?? ""; - return message; - }, + toJSON(message: ListFilesRequest): unknown { + const obj: any = {}; + if (message.query !== undefined && message.query !== "") { + obj.query = message.query; + } + if (message.continuationToken !== undefined && message.continuationToken !== "") { + obj.continuationToken = message.continuationToken; + } + return obj; + }, + + create(base?: DeepPartial): ListFilesRequest { + return ListFilesRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): ListFilesRequest { + const message = createBaseListFilesRequest(); + message.query = object.query ?? ""; + message.continuationToken = object.continuationToken ?? ""; + return message; + }, }; function createBaseListFilesResponse(): ListFilesResponse { - return { files: [], hasMoreResults: false, continuationToken: "" }; + return { files: [], hasMoreResults: false, continuationToken: "" }; } export const ListFilesResponse = { - encode( - message: ListFilesResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.files !== undefined && message.files.length !== 0) { - for (const v of message.files) { - File.encode(v!, writer.uint32(10).fork()).ldelim(); - } - } - if (message.hasMoreResults === true) { - writer.uint32(16).bool(message.hasMoreResults); - } - if ( - message.continuationToken !== undefined && - message.continuationToken !== "" - ) { - writer.uint32(26).string(message.continuationToken); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): ListFilesResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseListFilesResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.files!.push(File.decode(reader, reader.uint32())); - continue; - case 2: - if (tag !== 16) { - break; - } - - message.hasMoreResults = reader.bool(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.continuationToken = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): ListFilesResponse { - return { - files: Array.isArray(object?.files) - ? object.files.map((e: any) => File.fromJSON(e)) - : [], - hasMoreResults: isSet(object.hasMoreResults) - ? Boolean(object.hasMoreResults) - : false, - continuationToken: isSet(object.continuationToken) - ? String(object.continuationToken) - : "", - }; - }, + encode(message: ListFilesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.files !== undefined && message.files.length !== 0) { + for (const v of message.files) { + File.encode(v!, writer.uint32(10).fork()).ldelim(); + } + } + if (message.hasMoreResults === true) { + writer.uint32(16).bool(message.hasMoreResults); + } + if (message.continuationToken !== undefined && message.continuationToken !== "") { + writer.uint32(26).string(message.continuationToken); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ListFilesResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseListFilesResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.files!.push(File.decode(reader, reader.uint32())); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.hasMoreResults = reader.bool(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.continuationToken = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: ListFilesResponse): unknown { - const obj: any = {}; - if (message.files?.length) { - obj.files = message.files.map((e) => File.toJSON(e)); - } - if (message.hasMoreResults === true) { - obj.hasMoreResults = message.hasMoreResults; - } - if ( - message.continuationToken !== undefined && - message.continuationToken !== "" - ) { - obj.continuationToken = message.continuationToken; - } - return obj; - }, + fromJSON(object: any): ListFilesResponse { + return { + files: Array.isArray(object?.files) ? object.files.map((e: any) => File.fromJSON(e)) : [], + hasMoreResults: isSet(object.hasMoreResults) ? Boolean(object.hasMoreResults) : false, + continuationToken: isSet(object.continuationToken) ? String(object.continuationToken) : "", + }; + }, - create(base?: DeepPartial): ListFilesResponse { - return ListFilesResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): ListFilesResponse { - const message = createBaseListFilesResponse(); - message.files = object.files?.map((e) => File.fromPartial(e)) || []; - message.hasMoreResults = object.hasMoreResults ?? false; - message.continuationToken = object.continuationToken ?? ""; - return message; - }, + toJSON(message: ListFilesResponse): unknown { + const obj: any = {}; + if (message.files?.length) { + obj.files = message.files.map((e) => File.toJSON(e)); + } + if (message.hasMoreResults === true) { + obj.hasMoreResults = message.hasMoreResults; + } + if (message.continuationToken !== undefined && message.continuationToken !== "") { + obj.continuationToken = message.continuationToken; + } + return obj; + }, + + create(base?: DeepPartial): ListFilesResponse { + return ListFilesResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): ListFilesResponse { + const message = createBaseListFilesResponse(); + message.files = object.files?.map((e) => File.fromPartial(e)) || []; + message.hasMoreResults = object.hasMoreResults ?? false; + message.continuationToken = object.continuationToken ?? ""; + return message; + }, }; function createBaseGetStorageStatsRequest(): GetStorageStatsRequest { - return {}; + return {}; } export const GetStorageStatsRequest = { - encode( - _: GetStorageStatsRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): GetStorageStatsRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetStorageStatsRequest(); - 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): GetStorageStatsRequest { - return {}; - }, - - toJSON(_: GetStorageStatsRequest): unknown { - const obj: any = {}; - return obj; - }, + encode(_: GetStorageStatsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): GetStorageStatsRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGetStorageStatsRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - create(base?: DeepPartial): GetStorageStatsRequest { - return GetStorageStatsRequest.fromPartial(base ?? {}); - }, - fromPartial( - _: DeepPartial, - ): GetStorageStatsRequest { - const message = createBaseGetStorageStatsRequest(); - return message; - }, + fromJSON(_: any): GetStorageStatsRequest { + return {}; + }, + + toJSON(_: GetStorageStatsRequest): unknown { + const obj: any = {}; + return obj; + }, + + create(base?: DeepPartial): GetStorageStatsRequest { + return GetStorageStatsRequest.fromPartial(base ?? {}); + }, + fromPartial(_: DeepPartial): GetStorageStatsRequest { + const message = createBaseGetStorageStatsRequest(); + return message; + }, }; function createBaseGetStorageStatsResponse(): GetStorageStatsResponse { - return { stats: undefined }; + return { stats: undefined }; } export const GetStorageStatsResponse = { - encode( - message: GetStorageStatsResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.stats !== undefined) { - StorageStats.encode( - message.stats, - writer.uint32(10).fork(), - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): GetStorageStatsResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetStorageStatsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.stats = StorageStats.decode( - reader, - reader.uint32(), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): GetStorageStatsResponse { - return { - stats: isSet(object.stats) - ? StorageStats.fromJSON(object.stats) - : undefined, - }; - }, + encode(message: GetStorageStatsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.stats !== undefined) { + StorageStats.encode(message.stats, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): GetStorageStatsResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGetStorageStatsResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.stats = StorageStats.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: GetStorageStatsResponse): unknown { - const obj: any = {}; - if (message.stats !== undefined) { - obj.stats = StorageStats.toJSON(message.stats); - } - return obj; - }, + fromJSON(object: any): GetStorageStatsResponse { + return { stats: isSet(object.stats) ? StorageStats.fromJSON(object.stats) : undefined }; + }, - create( - base?: DeepPartial, - ): GetStorageStatsResponse { - return GetStorageStatsResponse.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): GetStorageStatsResponse { - const message = createBaseGetStorageStatsResponse(); - message.stats = - object.stats !== undefined && object.stats !== null - ? StorageStats.fromPartial(object.stats) - : undefined; - return message; - }, + toJSON(message: GetStorageStatsResponse): unknown { + const obj: any = {}; + if (message.stats !== undefined) { + obj.stats = StorageStats.toJSON(message.stats); + } + return obj; + }, + + create(base?: DeepPartial): GetStorageStatsResponse { + return GetStorageStatsResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): GetStorageStatsResponse { + const message = createBaseGetStorageStatsResponse(); + message.stats = (object.stats !== undefined && object.stats !== null) + ? StorageStats.fromPartial(object.stats) + : undefined; + return message; + }, }; export type FileManagementDefinition = typeof FileManagementDefinition; export const FileManagementDefinition = { - name: "FileManagement", - fullName: "services.filemanagement.v1.FileManagement", - methods: { - /** Upload a file to Trinsic's CDN */ - uploadFile: { - name: "UploadFile", - requestType: UploadFileRequest, - requestStream: false, - responseType: UploadFileResponse, - responseStream: false, - options: { - _unknownFields: { 480010: [new Uint8Array([4, 34, 2, 8, 1])] }, - }, - }, - /** Fetch information about a file by its ID */ - getFile: { - name: "GetFile", - requestType: GetFileRequest, - requestStream: false, - responseType: GetFileResponse, - responseStream: false, - options: { - _unknownFields: { 480010: [new Uint8Array([4, 34, 2, 8, 1])] }, - }, - }, - /** Delete a file by its ID */ - deleteFile: { - name: "DeleteFile", - requestType: DeleteFileRequest, - requestStream: false, - responseType: DeleteFileResponse, - responseStream: false, - options: { - _unknownFields: { 480010: [new Uint8Array([4, 34, 2, 8, 1])] }, - }, - }, - /** List files the calling account has uploaded */ - listFiles: { - name: "ListFiles", - requestType: ListFilesRequest, - requestStream: false, - responseType: ListFilesResponse, - responseStream: false, - options: { - _unknownFields: { 480010: [new Uint8Array([4, 34, 2, 8, 1])] }, - }, - }, - /** Get statistics about files uploaded by the calling account */ - getStorageStats: { - name: "GetStorageStats", - requestType: GetStorageStatsRequest, - requestStream: false, - responseType: GetStorageStatsResponse, - responseStream: false, - options: { - _unknownFields: { - 480010: [ - new Uint8Array([4, 34, 2, 8, 1]), - new Uint8Array([2, 24, 1]), - ], - }, - }, - }, - }, + name: "FileManagement", + fullName: "services.filemanagement.v1.FileManagement", + methods: { + /** Upload a file to Trinsic's CDN */ + uploadFile: { + name: "UploadFile", + requestType: UploadFileRequest, + requestStream: false, + responseType: UploadFileResponse, + responseStream: false, + options: { _unknownFields: { 480010: [new Uint8Array([4, 34, 2, 8, 1])] } }, + }, + /** Fetch information about a file by its ID */ + getFile: { + name: "GetFile", + requestType: GetFileRequest, + requestStream: false, + responseType: GetFileResponse, + responseStream: false, + options: { _unknownFields: { 480010: [new Uint8Array([4, 34, 2, 8, 1])] } }, + }, + /** Delete a file by its ID */ + deleteFile: { + name: "DeleteFile", + requestType: DeleteFileRequest, + requestStream: false, + responseType: DeleteFileResponse, + responseStream: false, + options: { _unknownFields: { 480010: [new Uint8Array([4, 34, 2, 8, 1])] } }, + }, + /** List files the calling account has uploaded */ + listFiles: { + name: "ListFiles", + requestType: ListFilesRequest, + requestStream: false, + responseType: ListFilesResponse, + responseStream: false, + options: { _unknownFields: { 480010: [new Uint8Array([4, 34, 2, 8, 1])] } }, + }, + /** Get statistics about files uploaded by the calling account */ + getStorageStats: { + name: "GetStorageStats", + requestType: GetStorageStatsRequest, + requestStream: false, + responseType: GetStorageStatsResponse, + responseStream: false, + options: { _unknownFields: { 480010: [new Uint8Array([4, 34, 2, 8, 1]), new Uint8Array([2, 24, 1])] } }, + }, + }, } as const; declare const self: any | undefined; declare const window: any | undefined; declare const global: any | undefined; const tsProtoGlobalThis: any = (() => { - if (typeof globalThis !== "undefined") { - return globalThis; - } - if (typeof self !== "undefined") { - return self; - } - if (typeof window !== "undefined") { - return window; - } - if (typeof global !== "undefined") { - return global; - } - throw "Unable to locate global object"; + if (typeof globalThis !== "undefined") { + return globalThis; + } + if (typeof self !== "undefined") { + return self; + } + if (typeof window !== "undefined") { + return window; + } + if (typeof global !== "undefined") { + return global; + } + throw "Unable to locate global object"; })(); function bytesFromBase64(b64: string): Uint8Array { - if (tsProtoGlobalThis.Buffer) { - return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64")); - } else { - const bin = tsProtoGlobalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; + if (tsProtoGlobalThis.Buffer) { + return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64")); + } else { + const bin = tsProtoGlobalThis.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 (tsProtoGlobalThis.Buffer) { - return tsProtoGlobalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return tsProtoGlobalThis.btoa(bin.join("")); - } + if (tsProtoGlobalThis.Buffer) { + return tsProtoGlobalThis.Buffer.from(arr).toString("base64"); + } else { + const bin: string[] = []; + arr.forEach((byte) => { + bin.push(String.fromCharCode(byte)); + }); + return tsProtoGlobalThis.btoa(bin.join("")); + } } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new tsProtoGlobalThis.Error( - "Value is larger than Number.MAX_SAFE_INTEGER", - ); - } - return long.toNumber(); + if (long.gt(Number.MAX_SAFE_INTEGER)) { + throw new tsProtoGlobalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); + } + return long.toNumber(); } if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); + _m0.util.Long = Long as any; + _m0.configure(); } function isSet(value: any): boolean { - return value !== null && value !== undefined; + return value !== null && value !== undefined; } diff --git a/web/src/proto/services/options/field-options.ts b/web/src/proto/services/options/field-options.ts index 33648c61a..5f21a77a5 100644 --- a/web/src/proto/services/options/field-options.ts +++ b/web/src/proto/services/options/field-options.ts @@ -2,286 +2,248 @@ import _m0 from "protobufjs/minimal"; export interface AnnotationOption { - /** Is this annotation active */ - active?: boolean | undefined; - /** Custom annotation message to provide */ - message?: string | undefined; + /** Is this annotation active */ + active?: + | boolean + | undefined; + /** Custom annotation message to provide */ + message?: string | undefined; } export interface SdkTemplateOption { - /** - * Whether the service endpoint allows anonymous (no auth token necessary) authentication - * This is used by the `protoc-gen-trinsic-sdk` plugin for metadata. - */ - anonymous?: boolean | undefined; - /** - * Whether the SDK template generator should ignore this method. This method will - * be wrapped manually. - */ - ignore?: boolean | undefined; - /** - * Whether the SDK template generator should generate this method without arguments, eg - * ProviderService.GetEcosystemInfo() where the request object is empty - */ - noArguments?: boolean | undefined; - /** This endpoint is experimental. Consider it in beta, so documentation may be incomplete or incorrect. */ - experimental?: AnnotationOption | undefined; - /** This endpoint is deprecated. It will be removed in the future. */ - deprecated?: AnnotationOption | undefined; + /** + * Whether the service endpoint allows anonymous (no auth token necessary) authentication + * This is used by the `protoc-gen-trinsic-sdk` plugin for metadata. + */ + anonymous?: + | boolean + | undefined; + /** + * Whether the SDK template generator should ignore this method. This method will + * be wrapped manually. + */ + ignore?: + | boolean + | undefined; + /** + * Whether the SDK template generator should generate this method without arguments, eg + * ProviderService.GetEcosystemInfo() where the request object is empty + */ + noArguments?: + | boolean + | undefined; + /** This endpoint is experimental. Consider it in beta, so documentation may be incomplete or incorrect. */ + experimental?: + | AnnotationOption + | undefined; + /** This endpoint is deprecated. It will be removed in the future. */ + deprecated?: AnnotationOption | undefined; } function createBaseAnnotationOption(): AnnotationOption { - return { active: false, message: "" }; + return { active: false, message: "" }; } export const AnnotationOption = { - encode( - message: AnnotationOption, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.active === true) { - writer.uint32(8).bool(message.active); - } - if (message.message !== undefined && message.message !== "") { - writer.uint32(18).string(message.message); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): AnnotationOption { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAnnotationOption(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.active = reader.bool(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.message = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): AnnotationOption { - return { - active: isSet(object.active) ? Boolean(object.active) : false, - message: isSet(object.message) ? String(object.message) : "", - }; - }, - - toJSON(message: AnnotationOption): unknown { - const obj: any = {}; - if (message.active === true) { - obj.active = message.active; - } - if (message.message !== undefined && message.message !== "") { - obj.message = message.message; - } - return obj; - }, - - create(base?: DeepPartial): AnnotationOption { - return AnnotationOption.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): AnnotationOption { - const message = createBaseAnnotationOption(); - message.active = object.active ?? false; - message.message = object.message ?? ""; - return message; - }, + encode(message: AnnotationOption, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.active === true) { + writer.uint32(8).bool(message.active); + } + if (message.message !== undefined && message.message !== "") { + writer.uint32(18).string(message.message); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): AnnotationOption { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAnnotationOption(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.active = reader.bool(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.message = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): AnnotationOption { + return { + active: isSet(object.active) ? Boolean(object.active) : false, + message: isSet(object.message) ? String(object.message) : "", + }; + }, + + toJSON(message: AnnotationOption): unknown { + const obj: any = {}; + if (message.active === true) { + obj.active = message.active; + } + if (message.message !== undefined && message.message !== "") { + obj.message = message.message; + } + return obj; + }, + + create(base?: DeepPartial): AnnotationOption { + return AnnotationOption.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): AnnotationOption { + const message = createBaseAnnotationOption(); + message.active = object.active ?? false; + message.message = object.message ?? ""; + return message; + }, }; function createBaseSdkTemplateOption(): SdkTemplateOption { - return { - anonymous: false, - ignore: false, - noArguments: false, - experimental: undefined, - deprecated: undefined, - }; + return { anonymous: false, ignore: false, noArguments: false, experimental: undefined, deprecated: undefined }; } export const SdkTemplateOption = { - encode( - message: SdkTemplateOption, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.anonymous === true) { - writer.uint32(8).bool(message.anonymous); - } - if (message.ignore === true) { - writer.uint32(16).bool(message.ignore); - } - if (message.noArguments === true) { - writer.uint32(24).bool(message.noArguments); - } - if (message.experimental !== undefined) { - AnnotationOption.encode( - message.experimental, - writer.uint32(34).fork(), - ).ldelim(); - } - if (message.deprecated !== undefined) { - AnnotationOption.encode( - message.deprecated, - writer.uint32(42).fork(), - ).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): SdkTemplateOption { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSdkTemplateOption(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.anonymous = reader.bool(); - continue; - case 2: - if (tag !== 16) { - break; - } - - message.ignore = reader.bool(); - continue; - case 3: - if (tag !== 24) { - break; - } - - message.noArguments = reader.bool(); - continue; - case 4: - if (tag !== 34) { - break; - } - - message.experimental = AnnotationOption.decode( - reader, - reader.uint32(), - ); - continue; - case 5: - if (tag !== 42) { - break; - } - - message.deprecated = AnnotationOption.decode( - reader, - reader.uint32(), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): SdkTemplateOption { - return { - anonymous: isSet(object.anonymous) - ? Boolean(object.anonymous) - : false, - ignore: isSet(object.ignore) ? Boolean(object.ignore) : false, - noArguments: isSet(object.noArguments) - ? Boolean(object.noArguments) - : false, - experimental: isSet(object.experimental) - ? AnnotationOption.fromJSON(object.experimental) - : undefined, - deprecated: isSet(object.deprecated) - ? AnnotationOption.fromJSON(object.deprecated) - : undefined, - }; - }, - - toJSON(message: SdkTemplateOption): unknown { - const obj: any = {}; - if (message.anonymous === true) { - obj.anonymous = message.anonymous; - } - if (message.ignore === true) { - obj.ignore = message.ignore; - } - if (message.noArguments === true) { - obj.noArguments = message.noArguments; - } - if (message.experimental !== undefined) { - obj.experimental = AnnotationOption.toJSON(message.experimental); - } - if (message.deprecated !== undefined) { - obj.deprecated = AnnotationOption.toJSON(message.deprecated); - } - return obj; - }, - - create(base?: DeepPartial): SdkTemplateOption { - return SdkTemplateOption.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): SdkTemplateOption { - const message = createBaseSdkTemplateOption(); - message.anonymous = object.anonymous ?? false; - message.ignore = object.ignore ?? false; - message.noArguments = object.noArguments ?? false; - message.experimental = - object.experimental !== undefined && object.experimental !== null - ? AnnotationOption.fromPartial(object.experimental) - : undefined; - message.deprecated = - object.deprecated !== undefined && object.deprecated !== null - ? AnnotationOption.fromPartial(object.deprecated) - : undefined; - return message; - }, + encode(message: SdkTemplateOption, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.anonymous === true) { + writer.uint32(8).bool(message.anonymous); + } + if (message.ignore === true) { + writer.uint32(16).bool(message.ignore); + } + if (message.noArguments === true) { + writer.uint32(24).bool(message.noArguments); + } + if (message.experimental !== undefined) { + AnnotationOption.encode(message.experimental, writer.uint32(34).fork()).ldelim(); + } + if (message.deprecated !== undefined) { + AnnotationOption.encode(message.deprecated, writer.uint32(42).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): SdkTemplateOption { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSdkTemplateOption(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.anonymous = reader.bool(); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.ignore = reader.bool(); + continue; + case 3: + if (tag !== 24) { + break; + } + + message.noArguments = reader.bool(); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.experimental = AnnotationOption.decode(reader, reader.uint32()); + continue; + case 5: + if (tag !== 42) { + break; + } + + message.deprecated = AnnotationOption.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): SdkTemplateOption { + return { + anonymous: isSet(object.anonymous) ? Boolean(object.anonymous) : false, + ignore: isSet(object.ignore) ? Boolean(object.ignore) : false, + noArguments: isSet(object.noArguments) ? Boolean(object.noArguments) : false, + experimental: isSet(object.experimental) ? AnnotationOption.fromJSON(object.experimental) : undefined, + deprecated: isSet(object.deprecated) ? AnnotationOption.fromJSON(object.deprecated) : undefined, + }; + }, + + toJSON(message: SdkTemplateOption): unknown { + const obj: any = {}; + if (message.anonymous === true) { + obj.anonymous = message.anonymous; + } + if (message.ignore === true) { + obj.ignore = message.ignore; + } + if (message.noArguments === true) { + obj.noArguments = message.noArguments; + } + if (message.experimental !== undefined) { + obj.experimental = AnnotationOption.toJSON(message.experimental); + } + if (message.deprecated !== undefined) { + obj.deprecated = AnnotationOption.toJSON(message.deprecated); + } + return obj; + }, + + create(base?: DeepPartial): SdkTemplateOption { + return SdkTemplateOption.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): SdkTemplateOption { + const message = createBaseSdkTemplateOption(); + message.anonymous = object.anonymous ?? false; + message.ignore = object.ignore ?? false; + message.noArguments = object.noArguments ?? false; + message.experimental = (object.experimental !== undefined && object.experimental !== null) + ? AnnotationOption.fromPartial(object.experimental) + : undefined; + message.deprecated = (object.deprecated !== undefined && object.deprecated !== null) + ? AnnotationOption.fromPartial(object.deprecated) + : undefined; + return message; + }, }; -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; function isSet(value: any): boolean { - return value !== null && value !== undefined; + return value !== null && value !== undefined; } diff --git a/web/src/proto/services/provider/v1/access-management.ts b/web/src/proto/services/provider/v1/access-management.ts index 93f98752e..f798ca8d9 100644 --- a/web/src/proto/services/provider/v1/access-management.ts +++ b/web/src/proto/services/provider/v1/access-management.ts @@ -3,735 +3,642 @@ import _m0 from "protobufjs/minimal"; /** Role management */ export interface AddRoleAssignmentRequest { - /** Role to assign */ - role?: string | undefined; - /** - * Email address of account to assign role. - * Mutually exclusive with `walletId` and `didUri`. - */ - email?: string | undefined; - /** - * Wallet ID of account to assign role to. - * Mutually exclusive with `email` and `didUri`. - */ - walletId?: string | undefined; - /** - * DID URI of the account to assign role. - * Mutually exclusive with `email` and `walletId`. - */ - didUri?: string | undefined; + /** Role to assign */ + role?: + | string + | undefined; + /** + * Email address of account to assign role. + * Mutually exclusive with `walletId` and `didUri`. + */ + email?: + | string + | undefined; + /** + * Wallet ID of account to assign role to. + * Mutually exclusive with `email` and `didUri`. + */ + walletId?: + | string + | undefined; + /** + * DID URI of the account to assign role. + * Mutually exclusive with `email` and `walletId`. + */ + didUri?: string | undefined; } -export interface AddRoleAssignmentResponse {} +export interface AddRoleAssignmentResponse { +} export interface RemoveRoleAssignmentRequest { - /** Role to unassign */ - role?: string | undefined; - /** - * Email address of account to unassign role. - * Mutually exclusive with `walletId` and `didUri`. - */ - email?: string | undefined; - /** - * Wallet ID of account to unassign role. - * Mutually exclusive with `email` and `didUri`. - */ - walletId?: string | undefined; - /** - * DID URI of the account to unassign role. - * Mutually exclusive with `email` and `walletId`. - */ - didUri?: string | undefined; + /** Role to unassign */ + role?: + | string + | undefined; + /** + * Email address of account to unassign role. + * Mutually exclusive with `walletId` and `didUri`. + */ + email?: + | string + | undefined; + /** + * Wallet ID of account to unassign role. + * Mutually exclusive with `email` and `didUri`. + */ + walletId?: + | string + | undefined; + /** + * DID URI of the account to unassign role. + * Mutually exclusive with `email` and `walletId`. + */ + didUri?: string | undefined; } -export interface RemoveRoleAssignmentResponse {} +export interface RemoveRoleAssignmentResponse { +} /** Request to fetch the list of roles assigned to the current account */ export interface ListRoleAssignmentsRequest { - /** - * Email address of account to list roles. - * Mutually exclusive with `walletId` and `didUri`. - */ - email?: string | undefined; - /** - * Wallet ID of account to list roles. - * Mutually exclusive with `email` and `didUri`. - */ - walletId?: string | undefined; - /** - * DID URI of the account to list roles. - * Mutually exclusive with `email` and `walletId`. - */ - didUri?: string | undefined; + /** + * Email address of account to list roles. + * Mutually exclusive with `walletId` and `didUri`. + */ + email?: + | string + | undefined; + /** + * Wallet ID of account to list roles. + * Mutually exclusive with `email` and `didUri`. + */ + walletId?: + | string + | undefined; + /** + * DID URI of the account to list roles. + * Mutually exclusive with `email` and `walletId`. + */ + didUri?: string | undefined; } export interface ListRoleAssignmentsResponse { - /** List of roles */ - roles?: string[] | undefined; + /** List of roles */ + roles?: string[] | undefined; } /** Request to fetch the available roles in the current ecosystem */ -export interface ListAvailableRolesRequest {} +export interface ListAvailableRolesRequest { +} export interface ListAvailableRolesResponse { - /** List of roles */ - roles?: string[] | undefined; + /** List of roles */ + roles?: string[] | undefined; } function createBaseAddRoleAssignmentRequest(): AddRoleAssignmentRequest { - return { - role: "", - email: undefined, - walletId: undefined, - didUri: undefined, - }; + return { role: "", email: undefined, walletId: undefined, didUri: undefined }; } export const AddRoleAssignmentRequest = { - encode( - message: AddRoleAssignmentRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.role !== undefined && message.role !== "") { - writer.uint32(10).string(message.role); - } - if (message.email !== undefined) { - writer.uint32(18).string(message.email); - } - if (message.walletId !== undefined) { - writer.uint32(26).string(message.walletId); - } - if (message.didUri !== undefined) { - writer.uint32(34).string(message.didUri); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): AddRoleAssignmentRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAddRoleAssignmentRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.role = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.email = reader.string(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.walletId = reader.string(); - continue; - case 4: - if (tag !== 34) { - break; - } - - message.didUri = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): AddRoleAssignmentRequest { - return { - role: isSet(object.role) ? String(object.role) : "", - email: isSet(object.email) ? String(object.email) : undefined, - walletId: isSet(object.walletId) - ? String(object.walletId) - : undefined, - didUri: isSet(object.didUri) ? String(object.didUri) : undefined, - }; - }, - - toJSON(message: AddRoleAssignmentRequest): unknown { - const obj: any = {}; - if (message.role !== undefined && message.role !== "") { - obj.role = message.role; - } - if (message.email !== undefined) { - obj.email = message.email; - } - if (message.walletId !== undefined) { - obj.walletId = message.walletId; - } - if (message.didUri !== undefined) { - obj.didUri = message.didUri; - } - return obj; - }, - - create( - base?: DeepPartial, - ): AddRoleAssignmentRequest { - return AddRoleAssignmentRequest.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): AddRoleAssignmentRequest { - const message = createBaseAddRoleAssignmentRequest(); - message.role = object.role ?? ""; - message.email = object.email ?? undefined; - message.walletId = object.walletId ?? undefined; - message.didUri = object.didUri ?? undefined; - return message; - }, + encode(message: AddRoleAssignmentRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.role !== undefined && message.role !== "") { + writer.uint32(10).string(message.role); + } + if (message.email !== undefined) { + writer.uint32(18).string(message.email); + } + if (message.walletId !== undefined) { + writer.uint32(26).string(message.walletId); + } + if (message.didUri !== undefined) { + writer.uint32(34).string(message.didUri); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): AddRoleAssignmentRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAddRoleAssignmentRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.role = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.email = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.walletId = reader.string(); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.didUri = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): AddRoleAssignmentRequest { + return { + role: isSet(object.role) ? String(object.role) : "", + email: isSet(object.email) ? String(object.email) : undefined, + walletId: isSet(object.walletId) ? String(object.walletId) : undefined, + didUri: isSet(object.didUri) ? String(object.didUri) : undefined, + }; + }, + + toJSON(message: AddRoleAssignmentRequest): unknown { + const obj: any = {}; + if (message.role !== undefined && message.role !== "") { + obj.role = message.role; + } + if (message.email !== undefined) { + obj.email = message.email; + } + if (message.walletId !== undefined) { + obj.walletId = message.walletId; + } + if (message.didUri !== undefined) { + obj.didUri = message.didUri; + } + return obj; + }, + + create(base?: DeepPartial): AddRoleAssignmentRequest { + return AddRoleAssignmentRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): AddRoleAssignmentRequest { + const message = createBaseAddRoleAssignmentRequest(); + message.role = object.role ?? ""; + message.email = object.email ?? undefined; + message.walletId = object.walletId ?? undefined; + message.didUri = object.didUri ?? undefined; + return message; + }, }; function createBaseAddRoleAssignmentResponse(): AddRoleAssignmentResponse { - return {}; + return {}; } export const AddRoleAssignmentResponse = { - encode( - _: AddRoleAssignmentResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): AddRoleAssignmentResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAddRoleAssignmentResponse(); - 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): AddRoleAssignmentResponse { - return {}; - }, - - toJSON(_: AddRoleAssignmentResponse): unknown { - const obj: any = {}; - return obj; - }, - - create( - base?: DeepPartial, - ): AddRoleAssignmentResponse { - return AddRoleAssignmentResponse.fromPartial(base ?? {}); - }, - fromPartial( - _: DeepPartial, - ): AddRoleAssignmentResponse { - const message = createBaseAddRoleAssignmentResponse(); - return message; - }, + encode(_: AddRoleAssignmentResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): AddRoleAssignmentResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAddRoleAssignmentResponse(); + 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): AddRoleAssignmentResponse { + return {}; + }, + + toJSON(_: AddRoleAssignmentResponse): unknown { + const obj: any = {}; + return obj; + }, + + create(base?: DeepPartial): AddRoleAssignmentResponse { + return AddRoleAssignmentResponse.fromPartial(base ?? {}); + }, + fromPartial(_: DeepPartial): AddRoleAssignmentResponse { + const message = createBaseAddRoleAssignmentResponse(); + return message; + }, }; function createBaseRemoveRoleAssignmentRequest(): RemoveRoleAssignmentRequest { - return { - role: "", - email: undefined, - walletId: undefined, - didUri: undefined, - }; + return { role: "", email: undefined, walletId: undefined, didUri: undefined }; } export const RemoveRoleAssignmentRequest = { - encode( - message: RemoveRoleAssignmentRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.role !== undefined && message.role !== "") { - writer.uint32(10).string(message.role); - } - if (message.email !== undefined) { - writer.uint32(18).string(message.email); - } - if (message.walletId !== undefined) { - writer.uint32(26).string(message.walletId); - } - if (message.didUri !== undefined) { - writer.uint32(34).string(message.didUri); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): RemoveRoleAssignmentRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRemoveRoleAssignmentRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.role = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.email = reader.string(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.walletId = reader.string(); - continue; - case 4: - if (tag !== 34) { - break; - } - - message.didUri = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): RemoveRoleAssignmentRequest { - return { - role: isSet(object.role) ? String(object.role) : "", - email: isSet(object.email) ? String(object.email) : undefined, - walletId: isSet(object.walletId) - ? String(object.walletId) - : undefined, - didUri: isSet(object.didUri) ? String(object.didUri) : undefined, - }; - }, - - toJSON(message: RemoveRoleAssignmentRequest): unknown { - const obj: any = {}; - if (message.role !== undefined && message.role !== "") { - obj.role = message.role; - } - if (message.email !== undefined) { - obj.email = message.email; - } - if (message.walletId !== undefined) { - obj.walletId = message.walletId; - } - if (message.didUri !== undefined) { - obj.didUri = message.didUri; - } - return obj; - }, - - create( - base?: DeepPartial, - ): RemoveRoleAssignmentRequest { - return RemoveRoleAssignmentRequest.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): RemoveRoleAssignmentRequest { - const message = createBaseRemoveRoleAssignmentRequest(); - message.role = object.role ?? ""; - message.email = object.email ?? undefined; - message.walletId = object.walletId ?? undefined; - message.didUri = object.didUri ?? undefined; - return message; - }, + encode(message: RemoveRoleAssignmentRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.role !== undefined && message.role !== "") { + writer.uint32(10).string(message.role); + } + if (message.email !== undefined) { + writer.uint32(18).string(message.email); + } + if (message.walletId !== undefined) { + writer.uint32(26).string(message.walletId); + } + if (message.didUri !== undefined) { + writer.uint32(34).string(message.didUri); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): RemoveRoleAssignmentRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseRemoveRoleAssignmentRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.role = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.email = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.walletId = reader.string(); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.didUri = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): RemoveRoleAssignmentRequest { + return { + role: isSet(object.role) ? String(object.role) : "", + email: isSet(object.email) ? String(object.email) : undefined, + walletId: isSet(object.walletId) ? String(object.walletId) : undefined, + didUri: isSet(object.didUri) ? String(object.didUri) : undefined, + }; + }, + + toJSON(message: RemoveRoleAssignmentRequest): unknown { + const obj: any = {}; + if (message.role !== undefined && message.role !== "") { + obj.role = message.role; + } + if (message.email !== undefined) { + obj.email = message.email; + } + if (message.walletId !== undefined) { + obj.walletId = message.walletId; + } + if (message.didUri !== undefined) { + obj.didUri = message.didUri; + } + return obj; + }, + + create(base?: DeepPartial): RemoveRoleAssignmentRequest { + return RemoveRoleAssignmentRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): RemoveRoleAssignmentRequest { + const message = createBaseRemoveRoleAssignmentRequest(); + message.role = object.role ?? ""; + message.email = object.email ?? undefined; + message.walletId = object.walletId ?? undefined; + message.didUri = object.didUri ?? undefined; + return message; + }, }; function createBaseRemoveRoleAssignmentResponse(): RemoveRoleAssignmentResponse { - return {}; + return {}; } export const RemoveRoleAssignmentResponse = { - encode( - _: RemoveRoleAssignmentResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): RemoveRoleAssignmentResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRemoveRoleAssignmentResponse(); - 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): RemoveRoleAssignmentResponse { - return {}; - }, - - toJSON(_: RemoveRoleAssignmentResponse): unknown { - const obj: any = {}; - return obj; - }, - - create( - base?: DeepPartial, - ): RemoveRoleAssignmentResponse { - return RemoveRoleAssignmentResponse.fromPartial(base ?? {}); - }, - fromPartial( - _: DeepPartial, - ): RemoveRoleAssignmentResponse { - const message = createBaseRemoveRoleAssignmentResponse(); - return message; - }, + encode(_: RemoveRoleAssignmentResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): RemoveRoleAssignmentResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseRemoveRoleAssignmentResponse(); + 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): RemoveRoleAssignmentResponse { + return {}; + }, + + toJSON(_: RemoveRoleAssignmentResponse): unknown { + const obj: any = {}; + return obj; + }, + + create(base?: DeepPartial): RemoveRoleAssignmentResponse { + return RemoveRoleAssignmentResponse.fromPartial(base ?? {}); + }, + fromPartial(_: DeepPartial): RemoveRoleAssignmentResponse { + const message = createBaseRemoveRoleAssignmentResponse(); + return message; + }, }; function createBaseListRoleAssignmentsRequest(): ListRoleAssignmentsRequest { - return { email: undefined, walletId: undefined, didUri: undefined }; + return { email: undefined, walletId: undefined, didUri: undefined }; } export const ListRoleAssignmentsRequest = { - encode( - message: ListRoleAssignmentsRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.email !== undefined) { - writer.uint32(18).string(message.email); - } - if (message.walletId !== undefined) { - writer.uint32(26).string(message.walletId); - } - if (message.didUri !== undefined) { - writer.uint32(34).string(message.didUri); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): ListRoleAssignmentsRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseListRoleAssignmentsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - if (tag !== 18) { - break; - } - - message.email = reader.string(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.walletId = reader.string(); - continue; - case 4: - if (tag !== 34) { - break; - } - - message.didUri = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): ListRoleAssignmentsRequest { - return { - email: isSet(object.email) ? String(object.email) : undefined, - walletId: isSet(object.walletId) - ? String(object.walletId) - : undefined, - didUri: isSet(object.didUri) ? String(object.didUri) : undefined, - }; - }, - - toJSON(message: ListRoleAssignmentsRequest): unknown { - const obj: any = {}; - if (message.email !== undefined) { - obj.email = message.email; - } - if (message.walletId !== undefined) { - obj.walletId = message.walletId; - } - if (message.didUri !== undefined) { - obj.didUri = message.didUri; - } - return obj; - }, - - create( - base?: DeepPartial, - ): ListRoleAssignmentsRequest { - return ListRoleAssignmentsRequest.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): ListRoleAssignmentsRequest { - const message = createBaseListRoleAssignmentsRequest(); - message.email = object.email ?? undefined; - message.walletId = object.walletId ?? undefined; - message.didUri = object.didUri ?? undefined; - return message; - }, + encode(message: ListRoleAssignmentsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.email !== undefined) { + writer.uint32(18).string(message.email); + } + if (message.walletId !== undefined) { + writer.uint32(26).string(message.walletId); + } + if (message.didUri !== undefined) { + writer.uint32(34).string(message.didUri); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ListRoleAssignmentsRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseListRoleAssignmentsRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + if (tag !== 18) { + break; + } + + message.email = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.walletId = reader.string(); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.didUri = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): ListRoleAssignmentsRequest { + return { + email: isSet(object.email) ? String(object.email) : undefined, + walletId: isSet(object.walletId) ? String(object.walletId) : undefined, + didUri: isSet(object.didUri) ? String(object.didUri) : undefined, + }; + }, + + toJSON(message: ListRoleAssignmentsRequest): unknown { + const obj: any = {}; + if (message.email !== undefined) { + obj.email = message.email; + } + if (message.walletId !== undefined) { + obj.walletId = message.walletId; + } + if (message.didUri !== undefined) { + obj.didUri = message.didUri; + } + return obj; + }, + + create(base?: DeepPartial): ListRoleAssignmentsRequest { + return ListRoleAssignmentsRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): ListRoleAssignmentsRequest { + const message = createBaseListRoleAssignmentsRequest(); + message.email = object.email ?? undefined; + message.walletId = object.walletId ?? undefined; + message.didUri = object.didUri ?? undefined; + return message; + }, }; function createBaseListRoleAssignmentsResponse(): ListRoleAssignmentsResponse { - return { roles: [] }; + return { roles: [] }; } export const ListRoleAssignmentsResponse = { - encode( - message: ListRoleAssignmentsResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.roles !== undefined && message.roles.length !== 0) { - for (const v of message.roles) { - writer.uint32(10).string(v!); - } - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): ListRoleAssignmentsResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseListRoleAssignmentsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.roles!.push(reader.string()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): ListRoleAssignmentsResponse { - return { - roles: Array.isArray(object?.roles) - ? object.roles.map((e: any) => String(e)) - : [], - }; - }, - - toJSON(message: ListRoleAssignmentsResponse): unknown { - const obj: any = {}; - if (message.roles?.length) { - obj.roles = message.roles; - } - return obj; - }, - - create( - base?: DeepPartial, - ): ListRoleAssignmentsResponse { - return ListRoleAssignmentsResponse.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): ListRoleAssignmentsResponse { - const message = createBaseListRoleAssignmentsResponse(); - message.roles = object.roles?.map((e) => e) || []; - return message; - }, + encode(message: ListRoleAssignmentsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.roles !== undefined && message.roles.length !== 0) { + for (const v of message.roles) { + writer.uint32(10).string(v!); + } + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ListRoleAssignmentsResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseListRoleAssignmentsResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.roles!.push(reader.string()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): ListRoleAssignmentsResponse { + return { roles: Array.isArray(object?.roles) ? object.roles.map((e: any) => String(e)) : [] }; + }, + + toJSON(message: ListRoleAssignmentsResponse): unknown { + const obj: any = {}; + if (message.roles?.length) { + obj.roles = message.roles; + } + return obj; + }, + + create(base?: DeepPartial): ListRoleAssignmentsResponse { + return ListRoleAssignmentsResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): ListRoleAssignmentsResponse { + const message = createBaseListRoleAssignmentsResponse(); + message.roles = object.roles?.map((e) => e) || []; + return message; + }, }; function createBaseListAvailableRolesRequest(): ListAvailableRolesRequest { - return {}; + return {}; } export const ListAvailableRolesRequest = { - encode( - _: ListAvailableRolesRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): ListAvailableRolesRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseListAvailableRolesRequest(); - 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): ListAvailableRolesRequest { - return {}; - }, - - toJSON(_: ListAvailableRolesRequest): unknown { - const obj: any = {}; - return obj; - }, - - create( - base?: DeepPartial, - ): ListAvailableRolesRequest { - return ListAvailableRolesRequest.fromPartial(base ?? {}); - }, - fromPartial( - _: DeepPartial, - ): ListAvailableRolesRequest { - const message = createBaseListAvailableRolesRequest(); - return message; - }, + encode(_: ListAvailableRolesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ListAvailableRolesRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseListAvailableRolesRequest(); + 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): ListAvailableRolesRequest { + return {}; + }, + + toJSON(_: ListAvailableRolesRequest): unknown { + const obj: any = {}; + return obj; + }, + + create(base?: DeepPartial): ListAvailableRolesRequest { + return ListAvailableRolesRequest.fromPartial(base ?? {}); + }, + fromPartial(_: DeepPartial): ListAvailableRolesRequest { + const message = createBaseListAvailableRolesRequest(); + return message; + }, }; function createBaseListAvailableRolesResponse(): ListAvailableRolesResponse { - return { roles: [] }; + return { roles: [] }; } export const ListAvailableRolesResponse = { - encode( - message: ListAvailableRolesResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.roles !== undefined && message.roles.length !== 0) { - for (const v of message.roles) { - writer.uint32(10).string(v!); - } - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): ListAvailableRolesResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseListAvailableRolesResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.roles!.push(reader.string()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): ListAvailableRolesResponse { - return { - roles: Array.isArray(object?.roles) - ? object.roles.map((e: any) => String(e)) - : [], - }; - }, - - toJSON(message: ListAvailableRolesResponse): unknown { - const obj: any = {}; - if (message.roles?.length) { - obj.roles = message.roles; - } - return obj; - }, - - create( - base?: DeepPartial, - ): ListAvailableRolesResponse { - return ListAvailableRolesResponse.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): ListAvailableRolesResponse { - const message = createBaseListAvailableRolesResponse(); - message.roles = object.roles?.map((e) => e) || []; - return message; - }, + encode(message: ListAvailableRolesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.roles !== undefined && message.roles.length !== 0) { + for (const v of message.roles) { + writer.uint32(10).string(v!); + } + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ListAvailableRolesResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseListAvailableRolesResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.roles!.push(reader.string()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): ListAvailableRolesResponse { + return { roles: Array.isArray(object?.roles) ? object.roles.map((e: any) => String(e)) : [] }; + }, + + toJSON(message: ListAvailableRolesResponse): unknown { + const obj: any = {}; + if (message.roles?.length) { + obj.roles = message.roles; + } + return obj; + }, + + create(base?: DeepPartial): ListAvailableRolesResponse { + return ListAvailableRolesResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): ListAvailableRolesResponse { + const message = createBaseListAvailableRolesResponse(); + message.roles = object.roles?.map((e) => e) || []; + return message; + }, }; /** @@ -740,80 +647,55 @@ export const ListAvailableRolesResponse = { */ export type AccessManagementDefinition = typeof AccessManagementDefinition; export const AccessManagementDefinition = { - name: "AccessManagement", - fullName: "services.provider.v1.AccessManagement", - methods: { - /** Adds a role assignment to an account */ - addRoleAssignment: { - name: "AddRoleAssignment", - requestType: AddRoleAssignmentRequest, - requestStream: false, - responseType: AddRoleAssignmentResponse, - responseStream: false, - options: { - _unknownFields: { 480010: [new Uint8Array([4, 34, 2, 8, 1])] }, - }, - }, - /** Removes a role assignment from the account */ - removeRoleAssignment: { - name: "RemoveRoleAssignment", - requestType: RemoveRoleAssignmentRequest, - requestStream: false, - responseType: RemoveRoleAssignmentResponse, - responseStream: false, - options: { - _unknownFields: { 480010: [new Uint8Array([4, 34, 2, 8, 1])] }, - }, - }, - /** List the role assignments for the given account */ - listRoleAssignments: { - name: "ListRoleAssignments", - requestType: ListRoleAssignmentsRequest, - requestStream: false, - responseType: ListRoleAssignmentsResponse, - responseStream: false, - options: { - _unknownFields: { 480010: [new Uint8Array([4, 34, 2, 8, 1])] }, - }, - }, - /** List the roles available in the ecosystem */ - listAvailableRoles: { - name: "ListAvailableRoles", - requestType: ListAvailableRolesRequest, - requestStream: false, - responseType: ListAvailableRolesResponse, - responseStream: false, - options: { - _unknownFields: { - 480010: [ - new Uint8Array([4, 34, 2, 8, 1]), - new Uint8Array([2, 16, 1]), - ], - }, - }, - }, - }, + name: "AccessManagement", + fullName: "services.provider.v1.AccessManagement", + methods: { + /** Adds a role assignment to an account */ + addRoleAssignment: { + name: "AddRoleAssignment", + requestType: AddRoleAssignmentRequest, + requestStream: false, + responseType: AddRoleAssignmentResponse, + responseStream: false, + options: { _unknownFields: { 480010: [new Uint8Array([4, 34, 2, 8, 1])] } }, + }, + /** Removes a role assignment from the account */ + removeRoleAssignment: { + name: "RemoveRoleAssignment", + requestType: RemoveRoleAssignmentRequest, + requestStream: false, + responseType: RemoveRoleAssignmentResponse, + responseStream: false, + options: { _unknownFields: { 480010: [new Uint8Array([4, 34, 2, 8, 1])] } }, + }, + /** List the role assignments for the given account */ + listRoleAssignments: { + name: "ListRoleAssignments", + requestType: ListRoleAssignmentsRequest, + requestStream: false, + responseType: ListRoleAssignmentsResponse, + responseStream: false, + options: { _unknownFields: { 480010: [new Uint8Array([4, 34, 2, 8, 1])] } }, + }, + /** List the roles available in the ecosystem */ + listAvailableRoles: { + name: "ListAvailableRoles", + requestType: ListAvailableRolesRequest, + requestStream: false, + responseType: ListAvailableRolesResponse, + responseStream: false, + options: { _unknownFields: { 480010: [new Uint8Array([4, 34, 2, 8, 1]), new Uint8Array([2, 16, 1])] } }, + }, + }, } as const; -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; function isSet(value: any): boolean { - return value !== null && value !== undefined; + return value !== null && value !== undefined; } diff --git a/web/src/proto/services/provider/v1/provider.ts b/web/src/proto/services/provider/v1/provider.ts index 9715d6a95..49dee8a70 100644 --- a/web/src/proto/services/provider/v1/provider.ts +++ b/web/src/proto/services/provider/v1/provider.ts @@ -1,124 +1,136 @@ /* eslint-disable */ import _m0 from "protobufjs/minimal"; import { - AccountDetails, - AccountProfile, - ConfirmationMethod, - confirmationMethodFromJSON, - confirmationMethodToJSON, - WalletAuthToken, + AccountDetails, + AccountProfile, + ConfirmationMethod, + confirmationMethodFromJSON, + confirmationMethodToJSON, + WalletAuthToken, } from "../../account/v1/account"; -import { - SupportedDidMethod, - supportedDidMethodFromJSON, - supportedDidMethodToJSON, -} from "../../common/v1/common"; +import { SupportedDidMethod, supportedDidMethodFromJSON, supportedDidMethodToJSON } from "../../common/v1/common"; export enum IdentityProvider { - /** Unknown - Identity provider is unknown */ - Unknown = 0, - /** Email - Identity provider is email */ - Email = 1, - /** Phone - Identity provider is phone */ - Phone = 2, - /** Passkey - Identity provider is passkey (WebAuthn) -- for Trinsic internal use only */ - Passkey = 3, - UNRECOGNIZED = -1, + /** Unknown - Identity provider is unknown */ + Unknown = 0, + /** Email - Identity provider is email */ + Email = 1, + /** Phone - Identity provider is phone */ + Phone = 2, + /** Passkey - Identity provider is passkey (WebAuthn) -- for Trinsic internal use only */ + Passkey = 3, + UNRECOGNIZED = -1, } export function identityProviderFromJSON(object: any): IdentityProvider { - switch (object) { - case 0: - case "Unknown": - return IdentityProvider.Unknown; - case 1: - case "Email": - return IdentityProvider.Email; - case 2: - case "Phone": - return IdentityProvider.Phone; - case 3: - case "Passkey": - return IdentityProvider.Passkey; - case -1: - case "UNRECOGNIZED": - default: - return IdentityProvider.UNRECOGNIZED; - } + switch (object) { + case 0: + case "Unknown": + return IdentityProvider.Unknown; + case 1: + case "Email": + return IdentityProvider.Email; + case 2: + case "Phone": + return IdentityProvider.Phone; + case 3: + case "Passkey": + return IdentityProvider.Passkey; + case -1: + case "UNRECOGNIZED": + default: + return IdentityProvider.UNRECOGNIZED; + } } export function identityProviderToJSON(object: IdentityProvider): string { - switch (object) { - case IdentityProvider.Unknown: - return "Unknown"; - case IdentityProvider.Email: - return "Email"; - case IdentityProvider.Phone: - return "Phone"; - case IdentityProvider.Passkey: - return "Passkey"; - case IdentityProvider.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } + switch (object) { + case IdentityProvider.Unknown: + return "Unknown"; + case IdentityProvider.Email: + return "Email"; + case IdentityProvider.Phone: + return "Phone"; + case IdentityProvider.Passkey: + return "Passkey"; + case IdentityProvider.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } } /** Details of an ecosystem */ export interface Ecosystem { - /** URN of the ecosystem */ - id?: string | undefined; - /** Globally unique name for the ecosystem */ - name?: string | undefined; - /** Ecosystem description */ - description?: string | undefined; + /** URN of the ecosystem */ + id?: + | string + | undefined; + /** Globally unique name for the ecosystem */ + name?: + | string + | undefined; + /** Ecosystem description */ + description?: string | undefined; } /** Request to create an ecosystem */ export interface CreateEcosystemRequest { - /** - * Globally unique name for the Ecosystem. This name will be - * part of the ecosystem-specific URLs and namespaces. - * Allowed characters are lowercase letters, numbers, underscore and hyphen. - * If not passed, ecosystem name will be auto-generated. - */ - name?: string | undefined; - /** Ecosystem description */ - description?: string | undefined; - /** The account details of the owner of the ecosystem */ - details?: AccountDetails | undefined; - /** New domain URL */ - domain?: string | undefined; + /** + * Globally unique name for the Ecosystem. This name will be + * part of the ecosystem-specific URLs and namespaces. + * Allowed characters are lowercase letters, numbers, underscore and hyphen. + * If not passed, ecosystem name will be auto-generated. + */ + name?: + | string + | undefined; + /** Ecosystem description */ + description?: + | string + | undefined; + /** The account details of the owner of the ecosystem */ + details?: + | AccountDetails + | undefined; + /** New domain URL */ + domain?: string | undefined; } /** Response to `CreateEcosystemRequest` */ export interface CreateEcosystemResponse { - /** Details of the created ecosystem */ - ecosystem?: Ecosystem | undefined; - /** Account profile for auth of the owner of the ecosystem */ - profile?: AccountProfile | undefined; - /** Indicates if confirmation of account is required. */ - confirmationMethod?: ConfirmationMethod | undefined; + /** Details of the created ecosystem */ + ecosystem?: + | Ecosystem + | undefined; + /** Account profile for auth of the owner of the ecosystem */ + profile?: + | AccountProfile + | undefined; + /** Indicates if confirmation of account is required. */ + confirmationMethod?: ConfirmationMethod | undefined; } /** Request to fetch information about an ecosystem */ -export interface EcosystemInfoRequest {} +export interface EcosystemInfoRequest { +} /** Response to `InfoRequest` */ export interface EcosystemInfoResponse { - /** Ecosystem corresponding to current ecosystem in the account token */ - ecosystem?: Ecosystem | undefined; + /** Ecosystem corresponding to current ecosystem in the account token */ + ecosystem?: Ecosystem | undefined; } /** * Request to fetch the Trinsic public key used * to verify authentication token validity */ -export interface GetOberonKeyRequest {} +export interface GetOberonKeyRequest { +} /** Response to `GetOberonKeyRequest` */ export interface GetOberonKeyResponse { - /** Oberon Public Key as RAW base64-url encoded string */ - key?: string | undefined; + /** Oberon Public Key as RAW base64-url encoded string */ + key?: string | undefined; } /** @@ -127,7 +139,8 @@ export interface GetOberonKeyResponse { * * @deprecated */ -export interface RetrieveDomainVerificationRecordRequest {} +export interface RetrieveDomainVerificationRecordRequest { +} /** * The below display can be removed only once the Dashboard is updating this itself - currently it uses this request @@ -136,10 +149,12 @@ export interface RetrieveDomainVerificationRecordRequest {} * @deprecated */ export interface RetrieveDomainVerificationRecordResponse { - /** TXT record name to use for domain verification */ - verificationRecordName?: string | undefined; - /** TXT code for domain verification */ - verificationRecordValue?: string | undefined; + /** TXT record name to use for domain verification */ + verificationRecordName?: + | string + | undefined; + /** TXT code for domain verification */ + verificationRecordValue?: string | undefined; } /** @@ -148,7 +163,8 @@ export interface RetrieveDomainVerificationRecordResponse { * * @deprecated */ -export interface RefreshDomainVerificationStatusRequest {} +export interface RefreshDomainVerificationStatusRequest { +} /** * The below display can be removed only once the Dashboard is updating this itself - currently it uses this request @@ -157,2149 +173,1829 @@ export interface RefreshDomainVerificationStatusRequest {} * @deprecated */ export interface RefreshDomainVerificationStatusResponse { - /** Domain URL verified */ - domain?: string | undefined; - /** Specifies if the above `domain` was successfully verified */ - domainVerified?: boolean | undefined; + /** Domain URL verified */ + domain?: + | string + | undefined; + /** Specifies if the above `domain` was successfully verified */ + domainVerified?: boolean | undefined; } /** Search for issuers/holders/verifiers */ export interface SearchWalletConfigurationsRequest { - /** SQL filter to execute. `SELECT * FROM c WHERE [**queryFilter**]` */ - queryFilter?: string | undefined; - /** - * Token provided by previous `SearchResponse` - * if more data is available for query - */ - continuationToken?: string | undefined; + /** SQL filter to execute. `SELECT * FROM c WHERE [**queryFilter**]` */ + queryFilter?: + | string + | undefined; + /** + * Token provided by previous `SearchResponse` + * if more data is available for query + */ + continuationToken?: string | undefined; } export interface SearchWalletConfigurationResponse { - /** Results matching the search query */ - results?: WalletConfiguration[] | undefined; - /** Whether more results are available for this query via `continuation_token` */ - hasMoreResults?: boolean | undefined; - /** Token to fetch next set of results via `SearchRequest` */ - continuationToken?: string | undefined; + /** Results matching the search query */ + results?: + | WalletConfiguration[] + | undefined; + /** Whether more results are available for this query via `continuation_token` */ + hasMoreResults?: + | boolean + | undefined; + /** Token to fetch next set of results via `SearchRequest` */ + continuationToken?: string | undefined; } /** Strongly typed information about wallet configurations */ export interface WalletConfiguration { - /** Name/description of the wallet */ - name?: string | undefined; - /** - * Deprecated and will be removed on August 1, 2023 -- use external_identities. - * This field is set to the first email address present in `external_identities`, if any. - * - * @deprecated - */ - email?: string | undefined; - /** - * Deprecated -- use external_identities - * - * @deprecated - */ - sms?: string | undefined; - walletId?: string | undefined; - /** The DID of the wallet */ - publicDid?: string | undefined; - configType?: string | undefined; - /** - * List of active authentication tokens for this wallet. - * This list does not contain the issued token, only metadata - * such as ID, description, and creation date. - */ - authTokens?: WalletAuthToken[] | undefined; - /** - * List of external identity IDs (email addresses, phone numbers, etc.) associated with this wallet. - * This is deprecated; use `external_identities` instead. - * - * @deprecated - */ - externalIdentityIds?: string[] | undefined; - /** Ecosystem in which this wallet is contained. */ - ecosystemId?: string | undefined; - description?: string | undefined; - /** List of external identities associated with this wallet. */ - externalIdentities?: WalletExternalIdentity[] | undefined; + /** Name/description of the wallet */ + name?: + | string + | undefined; + /** + * Deprecated and will be removed on August 1, 2023 -- use external_identities. + * This field is set to the first email address present in `external_identities`, if any. + * + * @deprecated + */ + email?: + | string + | undefined; + /** + * Deprecated -- use external_identities + * + * @deprecated + */ + sms?: string | undefined; + walletId?: + | string + | undefined; + /** The DID of the wallet */ + publicDid?: string | undefined; + configType?: + | string + | undefined; + /** + * List of active authentication tokens for this wallet. + * This list does not contain the issued token, only metadata + * such as ID, description, and creation date. + */ + authTokens?: + | WalletAuthToken[] + | undefined; + /** + * List of external identity IDs (email addresses, phone numbers, etc.) associated with this wallet. + * This is deprecated; use `external_identities` instead. + * + * @deprecated + */ + externalIdentityIds?: + | string[] + | undefined; + /** Ecosystem in which this wallet is contained. */ + ecosystemId?: string | undefined; + description?: + | string + | undefined; + /** List of external identities associated with this wallet. */ + externalIdentities?: WalletExternalIdentity[] | undefined; } /** An external identity (email address, phone number, etc.) associated with a wallet for authentication purposes. */ export interface WalletExternalIdentity { - /** The type of this identity (whether this identity is an email address, phone number, etc.) */ - provider?: IdentityProvider | undefined; - /** The actual email address/phone number/etc. for this identity */ - id?: string | undefined; + /** The type of this identity (whether this identity is an email address, phone number, etc.) */ + provider?: + | IdentityProvider + | undefined; + /** The actual email address/phone number/etc. for this identity */ + id?: string | undefined; } /** Options for creation of DID on the ION network */ export interface IonOptions { - /** ION network on which DID should be published */ - network?: IonOptions_IonNetwork | undefined; + /** ION network on which DID should be published */ + network?: IonOptions_IonNetwork | undefined; } export enum IonOptions_IonNetwork { - TestNet = 0, - MainNet = 1, - UNRECOGNIZED = -1, + TestNet = 0, + MainNet = 1, + UNRECOGNIZED = -1, } -export function ionOptions_IonNetworkFromJSON( - object: any, -): IonOptions_IonNetwork { - switch (object) { - case 0: - case "TestNet": - return IonOptions_IonNetwork.TestNet; - case 1: - case "MainNet": - return IonOptions_IonNetwork.MainNet; - case -1: - case "UNRECOGNIZED": - default: - return IonOptions_IonNetwork.UNRECOGNIZED; - } +export function ionOptions_IonNetworkFromJSON(object: any): IonOptions_IonNetwork { + switch (object) { + case 0: + case "TestNet": + return IonOptions_IonNetwork.TestNet; + case 1: + case "MainNet": + return IonOptions_IonNetwork.MainNet; + case -1: + case "UNRECOGNIZED": + default: + return IonOptions_IonNetwork.UNRECOGNIZED; + } } -export function ionOptions_IonNetworkToJSON( - object: IonOptions_IonNetwork, -): string { - switch (object) { - case IonOptions_IonNetwork.TestNet: - return "TestNet"; - case IonOptions_IonNetwork.MainNet: - return "MainNet"; - case IonOptions_IonNetwork.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } +export function ionOptions_IonNetworkToJSON(object: IonOptions_IonNetwork): string { + switch (object) { + case IonOptions_IonNetwork.TestNet: + return "TestNet"; + case IonOptions_IonNetwork.MainNet: + return "MainNet"; + case IonOptions_IonNetwork.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } } /** Options for creation of DID on the SOV network */ export interface IndyOptions { - /** SOV network on which DID should be published */ - network?: IndyOptions_IndyNetwork | undefined; + /** SOV network on which DID should be published */ + network?: IndyOptions_IndyNetwork | undefined; } export enum IndyOptions_IndyNetwork { - Danube = 0, - SovrinBuilder = 1, - SovrinStaging = 2, - Sovrin = 3, - IdUnionTest = 4, - IdUnion = 5, - IndicioTest = 6, - IndicioDemo = 7, - Indicio = 8, - UNRECOGNIZED = -1, + Danube = 0, + SovrinBuilder = 1, + SovrinStaging = 2, + Sovrin = 3, + IdUnionTest = 4, + IdUnion = 5, + IndicioTest = 6, + IndicioDemo = 7, + Indicio = 8, + UNRECOGNIZED = -1, } -export function indyOptions_IndyNetworkFromJSON( - object: any, -): IndyOptions_IndyNetwork { - switch (object) { - case 0: - case "Danube": - return IndyOptions_IndyNetwork.Danube; - case 1: - case "SovrinBuilder": - return IndyOptions_IndyNetwork.SovrinBuilder; - case 2: - case "SovrinStaging": - return IndyOptions_IndyNetwork.SovrinStaging; - case 3: - case "Sovrin": - return IndyOptions_IndyNetwork.Sovrin; - case 4: - case "IdUnionTest": - return IndyOptions_IndyNetwork.IdUnionTest; - case 5: - case "IdUnion": - return IndyOptions_IndyNetwork.IdUnion; - case 6: - case "IndicioTest": - return IndyOptions_IndyNetwork.IndicioTest; - case 7: - case "IndicioDemo": - return IndyOptions_IndyNetwork.IndicioDemo; - case 8: - case "Indicio": - return IndyOptions_IndyNetwork.Indicio; - case -1: - case "UNRECOGNIZED": - default: - return IndyOptions_IndyNetwork.UNRECOGNIZED; - } +export function indyOptions_IndyNetworkFromJSON(object: any): IndyOptions_IndyNetwork { + switch (object) { + case 0: + case "Danube": + return IndyOptions_IndyNetwork.Danube; + case 1: + case "SovrinBuilder": + return IndyOptions_IndyNetwork.SovrinBuilder; + case 2: + case "SovrinStaging": + return IndyOptions_IndyNetwork.SovrinStaging; + case 3: + case "Sovrin": + return IndyOptions_IndyNetwork.Sovrin; + case 4: + case "IdUnionTest": + return IndyOptions_IndyNetwork.IdUnionTest; + case 5: + case "IdUnion": + return IndyOptions_IndyNetwork.IdUnion; + case 6: + case "IndicioTest": + return IndyOptions_IndyNetwork.IndicioTest; + case 7: + case "IndicioDemo": + return IndyOptions_IndyNetwork.IndicioDemo; + case 8: + case "Indicio": + return IndyOptions_IndyNetwork.Indicio; + case -1: + case "UNRECOGNIZED": + default: + return IndyOptions_IndyNetwork.UNRECOGNIZED; + } } -export function indyOptions_IndyNetworkToJSON( - object: IndyOptions_IndyNetwork, -): string { - switch (object) { - case IndyOptions_IndyNetwork.Danube: - return "Danube"; - case IndyOptions_IndyNetwork.SovrinBuilder: - return "SovrinBuilder"; - case IndyOptions_IndyNetwork.SovrinStaging: - return "SovrinStaging"; - case IndyOptions_IndyNetwork.Sovrin: - return "Sovrin"; - case IndyOptions_IndyNetwork.IdUnionTest: - return "IdUnionTest"; - case IndyOptions_IndyNetwork.IdUnion: - return "IdUnion"; - case IndyOptions_IndyNetwork.IndicioTest: - return "IndicioTest"; - case IndyOptions_IndyNetwork.IndicioDemo: - return "IndicioDemo"; - case IndyOptions_IndyNetwork.Indicio: - return "Indicio"; - case IndyOptions_IndyNetwork.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } +export function indyOptions_IndyNetworkToJSON(object: IndyOptions_IndyNetwork): string { + switch (object) { + case IndyOptions_IndyNetwork.Danube: + return "Danube"; + case IndyOptions_IndyNetwork.SovrinBuilder: + return "SovrinBuilder"; + case IndyOptions_IndyNetwork.SovrinStaging: + return "SovrinStaging"; + case IndyOptions_IndyNetwork.Sovrin: + return "Sovrin"; + case IndyOptions_IndyNetwork.IdUnionTest: + return "IdUnionTest"; + case IndyOptions_IndyNetwork.IdUnion: + return "IdUnion"; + case IndyOptions_IndyNetwork.IndicioTest: + return "IndicioTest"; + case IndyOptions_IndyNetwork.IndicioDemo: + return "IndicioDemo"; + case IndyOptions_IndyNetwork.Indicio: + return "Indicio"; + case IndyOptions_IndyNetwork.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } } /** Request to upgrade a wallet */ export interface UpgradeDidRequest { - /** - * Email address of account to upgrade. - * Mutually exclusive with `walletId` and `didUri`. - */ - email?: string | undefined; - /** - * Wallet ID of account to upgrade. - * Mutually exclusive with `email` and `didUri`. - */ - walletId?: string | undefined; - /** - * DID URI of the account to upgrade. - * Mutually exclusive with `email` and `walletId`. - */ - didUri?: string | undefined; - /** DID Method to which wallet should be upgraded */ - method?: SupportedDidMethod | undefined; - /** Configuration for creation of DID on ION network */ - ionOptions?: IonOptions | undefined; - /** Configuration for creation of DID on INDY network */ - indyOptions?: IndyOptions | undefined; + /** + * Email address of account to upgrade. + * Mutually exclusive with `walletId` and `didUri`. + */ + email?: + | string + | undefined; + /** + * Wallet ID of account to upgrade. + * Mutually exclusive with `email` and `didUri`. + */ + walletId?: + | string + | undefined; + /** + * DID URI of the account to upgrade. + * Mutually exclusive with `email` and `walletId`. + */ + didUri?: + | string + | undefined; + /** DID Method to which wallet should be upgraded */ + method?: + | SupportedDidMethod + | undefined; + /** Configuration for creation of DID on ION network */ + ionOptions?: + | IonOptions + | undefined; + /** Configuration for creation of DID on INDY network */ + indyOptions?: IndyOptions | undefined; } /** Response to `UpgradeDIDRequest` */ export interface UpgradeDidResponse { - /** New DID of wallet */ - did?: string | undefined; + /** New DID of wallet */ + did?: string | undefined; } function createBaseEcosystem(): Ecosystem { - return { id: "", name: "", description: "" }; + return { id: "", name: "", description: "" }; } export const Ecosystem = { - encode( - message: Ecosystem, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.id !== undefined && message.id !== "") { - writer.uint32(10).string(message.id); - } - if (message.name !== undefined && message.name !== "") { - writer.uint32(18).string(message.name); - } - if (message.description !== undefined && message.description !== "") { - writer.uint32(26).string(message.description); - } - return writer; - }, + encode(message: Ecosystem, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.id !== undefined && message.id !== "") { + writer.uint32(10).string(message.id); + } + if (message.name !== undefined && message.name !== "") { + writer.uint32(18).string(message.name); + } + if (message.description !== undefined && message.description !== "") { + writer.uint32(26).string(message.description); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Ecosystem { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseEcosystem(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - decode(input: _m0.Reader | Uint8Array, length?: number): Ecosystem { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEcosystem(); - 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.name = reader.string(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.description = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + message.id = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } - fromJSON(object: any): Ecosystem { - return { - id: isSet(object.id) ? String(object.id) : "", - name: isSet(object.name) ? String(object.name) : "", - description: isSet(object.description) - ? String(object.description) - : "", - }; - }, + message.name = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.description = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: Ecosystem): unknown { - const obj: any = {}; - if (message.id !== undefined && message.id !== "") { - obj.id = message.id; - } - if (message.name !== undefined && message.name !== "") { - obj.name = message.name; - } - if (message.description !== undefined && message.description !== "") { - obj.description = message.description; - } - return obj; - }, + fromJSON(object: any): Ecosystem { + return { + id: isSet(object.id) ? String(object.id) : "", + name: isSet(object.name) ? String(object.name) : "", + description: isSet(object.description) ? String(object.description) : "", + }; + }, - create(base?: DeepPartial): Ecosystem { - return Ecosystem.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): Ecosystem { - const message = createBaseEcosystem(); - message.id = object.id ?? ""; - message.name = object.name ?? ""; - message.description = object.description ?? ""; - return message; - }, + toJSON(message: Ecosystem): unknown { + const obj: any = {}; + if (message.id !== undefined && message.id !== "") { + obj.id = message.id; + } + if (message.name !== undefined && message.name !== "") { + obj.name = message.name; + } + if (message.description !== undefined && message.description !== "") { + obj.description = message.description; + } + return obj; + }, + + create(base?: DeepPartial): Ecosystem { + return Ecosystem.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): Ecosystem { + const message = createBaseEcosystem(); + message.id = object.id ?? ""; + message.name = object.name ?? ""; + message.description = object.description ?? ""; + return message; + }, }; function createBaseCreateEcosystemRequest(): CreateEcosystemRequest { - return { name: "", description: "", details: undefined, domain: "" }; + return { name: "", description: "", details: undefined, domain: "" }; } export const CreateEcosystemRequest = { - encode( - message: CreateEcosystemRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.name !== undefined && message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.description !== undefined && message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.details !== undefined) { - AccountDetails.encode( - message.details, - writer.uint32(34).fork(), - ).ldelim(); - } - if (message.domain !== undefined && message.domain !== "") { - writer.uint32(42).string(message.domain); - } - return writer; - }, + encode(message: CreateEcosystemRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.name !== undefined && message.name !== "") { + writer.uint32(10).string(message.name); + } + if (message.description !== undefined && message.description !== "") { + writer.uint32(18).string(message.description); + } + if (message.details !== undefined) { + AccountDetails.encode(message.details, writer.uint32(34).fork()).ldelim(); + } + if (message.domain !== undefined && message.domain !== "") { + writer.uint32(42).string(message.domain); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): CreateEcosystemRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCreateEcosystemRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): CreateEcosystemRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCreateEcosystemRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.name = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.description = reader.string(); - continue; - case 4: - if (tag !== 34) { - break; - } - - message.details = AccountDetails.decode( - reader, - reader.uint32(), - ); - continue; - case 5: - if (tag !== 42) { - break; - } - - message.domain = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + message.name = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } - fromJSON(object: any): CreateEcosystemRequest { - return { - name: isSet(object.name) ? String(object.name) : "", - description: isSet(object.description) - ? String(object.description) - : "", - details: isSet(object.details) - ? AccountDetails.fromJSON(object.details) - : undefined, - domain: isSet(object.domain) ? String(object.domain) : "", - }; - }, + message.description = reader.string(); + continue; + case 4: + if (tag !== 34) { + break; + } - toJSON(message: CreateEcosystemRequest): unknown { - const obj: any = {}; - if (message.name !== undefined && message.name !== "") { - obj.name = message.name; - } - if (message.description !== undefined && message.description !== "") { - obj.description = message.description; - } - if (message.details !== undefined) { - obj.details = AccountDetails.toJSON(message.details); - } - if (message.domain !== undefined && message.domain !== "") { - obj.domain = message.domain; - } - return obj; - }, + message.details = AccountDetails.decode(reader, reader.uint32()); + continue; + case 5: + if (tag !== 42) { + break; + } + + message.domain = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - create(base?: DeepPartial): CreateEcosystemRequest { - return CreateEcosystemRequest.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): CreateEcosystemRequest { - const message = createBaseCreateEcosystemRequest(); - message.name = object.name ?? ""; - message.description = object.description ?? ""; - message.details = - object.details !== undefined && object.details !== null - ? AccountDetails.fromPartial(object.details) - : undefined; - message.domain = object.domain ?? ""; - return message; - }, + fromJSON(object: any): CreateEcosystemRequest { + return { + name: isSet(object.name) ? String(object.name) : "", + description: isSet(object.description) ? String(object.description) : "", + details: isSet(object.details) ? AccountDetails.fromJSON(object.details) : undefined, + domain: isSet(object.domain) ? String(object.domain) : "", + }; + }, + + toJSON(message: CreateEcosystemRequest): unknown { + const obj: any = {}; + if (message.name !== undefined && message.name !== "") { + obj.name = message.name; + } + if (message.description !== undefined && message.description !== "") { + obj.description = message.description; + } + if (message.details !== undefined) { + obj.details = AccountDetails.toJSON(message.details); + } + if (message.domain !== undefined && message.domain !== "") { + obj.domain = message.domain; + } + return obj; + }, + + create(base?: DeepPartial): CreateEcosystemRequest { + return CreateEcosystemRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): CreateEcosystemRequest { + const message = createBaseCreateEcosystemRequest(); + message.name = object.name ?? ""; + message.description = object.description ?? ""; + message.details = (object.details !== undefined && object.details !== null) + ? AccountDetails.fromPartial(object.details) + : undefined; + message.domain = object.domain ?? ""; + return message; + }, }; function createBaseCreateEcosystemResponse(): CreateEcosystemResponse { - return { ecosystem: undefined, profile: undefined, confirmationMethod: 0 }; + return { ecosystem: undefined, profile: undefined, confirmationMethod: 0 }; } export const CreateEcosystemResponse = { - encode( - message: CreateEcosystemResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.ecosystem !== undefined) { - Ecosystem.encode( - message.ecosystem, - writer.uint32(10).fork(), - ).ldelim(); - } - if (message.profile !== undefined) { - AccountProfile.encode( - message.profile, - writer.uint32(18).fork(), - ).ldelim(); - } - if ( - message.confirmationMethod !== undefined && - message.confirmationMethod !== 0 - ) { - writer.uint32(24).int32(message.confirmationMethod); - } - return writer; - }, + encode(message: CreateEcosystemResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.ecosystem !== undefined) { + Ecosystem.encode(message.ecosystem, writer.uint32(10).fork()).ldelim(); + } + if (message.profile !== undefined) { + AccountProfile.encode(message.profile, writer.uint32(18).fork()).ldelim(); + } + if (message.confirmationMethod !== undefined && message.confirmationMethod !== 0) { + writer.uint32(24).int32(message.confirmationMethod); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): CreateEcosystemResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCreateEcosystemResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): CreateEcosystemResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCreateEcosystemResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.ecosystem = Ecosystem.decode( - reader, - reader.uint32(), - ); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.profile = AccountProfile.decode( - reader, - reader.uint32(), - ); - continue; - case 3: - if (tag !== 24) { - break; - } - - message.confirmationMethod = reader.int32() as any; - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + message.ecosystem = Ecosystem.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 18) { + break; + } - fromJSON(object: any): CreateEcosystemResponse { - return { - ecosystem: isSet(object.ecosystem) - ? Ecosystem.fromJSON(object.ecosystem) - : undefined, - profile: isSet(object.profile) - ? AccountProfile.fromJSON(object.profile) - : undefined, - confirmationMethod: isSet(object.confirmationMethod) - ? confirmationMethodFromJSON(object.confirmationMethod) - : 0, - }; - }, + message.profile = AccountProfile.decode(reader, reader.uint32()); + continue; + case 3: + if (tag !== 24) { + break; + } + + message.confirmationMethod = reader.int32() as any; + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: CreateEcosystemResponse): unknown { - const obj: any = {}; - if (message.ecosystem !== undefined) { - obj.ecosystem = Ecosystem.toJSON(message.ecosystem); - } - if (message.profile !== undefined) { - obj.profile = AccountProfile.toJSON(message.profile); - } - if ( - message.confirmationMethod !== undefined && - message.confirmationMethod !== 0 - ) { - obj.confirmationMethod = confirmationMethodToJSON( - message.confirmationMethod, - ); - } - return obj; - }, + fromJSON(object: any): CreateEcosystemResponse { + return { + ecosystem: isSet(object.ecosystem) ? Ecosystem.fromJSON(object.ecosystem) : undefined, + profile: isSet(object.profile) ? AccountProfile.fromJSON(object.profile) : undefined, + confirmationMethod: isSet(object.confirmationMethod) ? confirmationMethodFromJSON(object.confirmationMethod) : 0, + }; + }, - create( - base?: DeepPartial, - ): CreateEcosystemResponse { - return CreateEcosystemResponse.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): CreateEcosystemResponse { - const message = createBaseCreateEcosystemResponse(); - message.ecosystem = - object.ecosystem !== undefined && object.ecosystem !== null - ? Ecosystem.fromPartial(object.ecosystem) - : undefined; - message.profile = - object.profile !== undefined && object.profile !== null - ? AccountProfile.fromPartial(object.profile) - : undefined; - message.confirmationMethod = object.confirmationMethod ?? 0; - return message; - }, + toJSON(message: CreateEcosystemResponse): unknown { + const obj: any = {}; + if (message.ecosystem !== undefined) { + obj.ecosystem = Ecosystem.toJSON(message.ecosystem); + } + if (message.profile !== undefined) { + obj.profile = AccountProfile.toJSON(message.profile); + } + if (message.confirmationMethod !== undefined && message.confirmationMethod !== 0) { + obj.confirmationMethod = confirmationMethodToJSON(message.confirmationMethod); + } + return obj; + }, + + create(base?: DeepPartial): CreateEcosystemResponse { + return CreateEcosystemResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): CreateEcosystemResponse { + const message = createBaseCreateEcosystemResponse(); + message.ecosystem = (object.ecosystem !== undefined && object.ecosystem !== null) + ? Ecosystem.fromPartial(object.ecosystem) + : undefined; + message.profile = (object.profile !== undefined && object.profile !== null) + ? AccountProfile.fromPartial(object.profile) + : undefined; + message.confirmationMethod = object.confirmationMethod ?? 0; + return message; + }, }; function createBaseEcosystemInfoRequest(): EcosystemInfoRequest { - return {}; + return {}; } export const EcosystemInfoRequest = { - encode( - _: EcosystemInfoRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): EcosystemInfoRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEcosystemInfoRequest(); - 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): EcosystemInfoRequest { - return {}; - }, - - toJSON(_: EcosystemInfoRequest): unknown { - const obj: any = {}; - return obj; - }, + encode(_: EcosystemInfoRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): EcosystemInfoRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseEcosystemInfoRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - create(base?: DeepPartial): EcosystemInfoRequest { - return EcosystemInfoRequest.fromPartial(base ?? {}); - }, - fromPartial(_: DeepPartial): EcosystemInfoRequest { - const message = createBaseEcosystemInfoRequest(); - return message; - }, + fromJSON(_: any): EcosystemInfoRequest { + return {}; + }, + + toJSON(_: EcosystemInfoRequest): unknown { + const obj: any = {}; + return obj; + }, + + create(base?: DeepPartial): EcosystemInfoRequest { + return EcosystemInfoRequest.fromPartial(base ?? {}); + }, + fromPartial(_: DeepPartial): EcosystemInfoRequest { + const message = createBaseEcosystemInfoRequest(); + return message; + }, }; function createBaseEcosystemInfoResponse(): EcosystemInfoResponse { - return { ecosystem: undefined }; + return { ecosystem: undefined }; } export const EcosystemInfoResponse = { - encode( - message: EcosystemInfoResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.ecosystem !== undefined) { - Ecosystem.encode( - message.ecosystem, - writer.uint32(10).fork(), - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): EcosystemInfoResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEcosystemInfoResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.ecosystem = Ecosystem.decode( - reader, - reader.uint32(), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): EcosystemInfoResponse { - return { - ecosystem: isSet(object.ecosystem) - ? Ecosystem.fromJSON(object.ecosystem) - : undefined, - }; - }, + encode(message: EcosystemInfoResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.ecosystem !== undefined) { + Ecosystem.encode(message.ecosystem, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): EcosystemInfoResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseEcosystemInfoResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.ecosystem = Ecosystem.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: EcosystemInfoResponse): unknown { - const obj: any = {}; - if (message.ecosystem !== undefined) { - obj.ecosystem = Ecosystem.toJSON(message.ecosystem); - } - return obj; - }, + fromJSON(object: any): EcosystemInfoResponse { + return { ecosystem: isSet(object.ecosystem) ? Ecosystem.fromJSON(object.ecosystem) : undefined }; + }, - create(base?: DeepPartial): EcosystemInfoResponse { - return EcosystemInfoResponse.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): EcosystemInfoResponse { - const message = createBaseEcosystemInfoResponse(); - message.ecosystem = - object.ecosystem !== undefined && object.ecosystem !== null - ? Ecosystem.fromPartial(object.ecosystem) - : undefined; - return message; - }, + toJSON(message: EcosystemInfoResponse): unknown { + const obj: any = {}; + if (message.ecosystem !== undefined) { + obj.ecosystem = Ecosystem.toJSON(message.ecosystem); + } + return obj; + }, + + create(base?: DeepPartial): EcosystemInfoResponse { + return EcosystemInfoResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): EcosystemInfoResponse { + const message = createBaseEcosystemInfoResponse(); + message.ecosystem = (object.ecosystem !== undefined && object.ecosystem !== null) + ? Ecosystem.fromPartial(object.ecosystem) + : undefined; + return message; + }, }; function createBaseGetOberonKeyRequest(): GetOberonKeyRequest { - return {}; + return {}; } export const GetOberonKeyRequest = { - encode( - _: GetOberonKeyRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): GetOberonKeyRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetOberonKeyRequest(); - 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): GetOberonKeyRequest { - return {}; - }, - - toJSON(_: GetOberonKeyRequest): unknown { - const obj: any = {}; - return obj; - }, + encode(_: GetOberonKeyRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): GetOberonKeyRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGetOberonKeyRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - create(base?: DeepPartial): GetOberonKeyRequest { - return GetOberonKeyRequest.fromPartial(base ?? {}); - }, - fromPartial(_: DeepPartial): GetOberonKeyRequest { - const message = createBaseGetOberonKeyRequest(); - return message; - }, + fromJSON(_: any): GetOberonKeyRequest { + return {}; + }, + + toJSON(_: GetOberonKeyRequest): unknown { + const obj: any = {}; + return obj; + }, + + create(base?: DeepPartial): GetOberonKeyRequest { + return GetOberonKeyRequest.fromPartial(base ?? {}); + }, + fromPartial(_: DeepPartial): GetOberonKeyRequest { + const message = createBaseGetOberonKeyRequest(); + return message; + }, }; function createBaseGetOberonKeyResponse(): GetOberonKeyResponse { - return { key: "" }; + return { key: "" }; } export const GetOberonKeyResponse = { - encode( - message: GetOberonKeyResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.key !== undefined && message.key !== "") { - writer.uint32(10).string(message.key); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): GetOberonKeyResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetOberonKeyResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.key = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): GetOberonKeyResponse { - return { key: isSet(object.key) ? String(object.key) : "" }; - }, + encode(message: GetOberonKeyResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.key !== undefined && message.key !== "") { + writer.uint32(10).string(message.key); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): GetOberonKeyResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGetOberonKeyResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.key = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: GetOberonKeyResponse): unknown { - const obj: any = {}; - if (message.key !== undefined && message.key !== "") { - obj.key = message.key; - } - return obj; - }, + fromJSON(object: any): GetOberonKeyResponse { + return { key: isSet(object.key) ? String(object.key) : "" }; + }, - create(base?: DeepPartial): GetOberonKeyResponse { - return GetOberonKeyResponse.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): GetOberonKeyResponse { - const message = createBaseGetOberonKeyResponse(); - message.key = object.key ?? ""; - return message; - }, + toJSON(message: GetOberonKeyResponse): unknown { + const obj: any = {}; + if (message.key !== undefined && message.key !== "") { + obj.key = message.key; + } + return obj; + }, + + create(base?: DeepPartial): GetOberonKeyResponse { + return GetOberonKeyResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): GetOberonKeyResponse { + const message = createBaseGetOberonKeyResponse(); + message.key = object.key ?? ""; + return message; + }, }; function createBaseRetrieveDomainVerificationRecordRequest(): RetrieveDomainVerificationRecordRequest { - return {}; + return {}; } export const RetrieveDomainVerificationRecordRequest = { - encode( - _: RetrieveDomainVerificationRecordRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): RetrieveDomainVerificationRecordRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRetrieveDomainVerificationRecordRequest(); - 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): RetrieveDomainVerificationRecordRequest { - return {}; - }, - - toJSON(_: RetrieveDomainVerificationRecordRequest): unknown { - const obj: any = {}; - return obj; - }, + encode(_: RetrieveDomainVerificationRecordRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): RetrieveDomainVerificationRecordRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseRetrieveDomainVerificationRecordRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - create( - base?: DeepPartial, - ): RetrieveDomainVerificationRecordRequest { - return RetrieveDomainVerificationRecordRequest.fromPartial(base ?? {}); - }, - fromPartial( - _: DeepPartial, - ): RetrieveDomainVerificationRecordRequest { - const message = createBaseRetrieveDomainVerificationRecordRequest(); - return message; - }, + fromJSON(_: any): RetrieveDomainVerificationRecordRequest { + return {}; + }, + + toJSON(_: RetrieveDomainVerificationRecordRequest): unknown { + const obj: any = {}; + return obj; + }, + + create(base?: DeepPartial): RetrieveDomainVerificationRecordRequest { + return RetrieveDomainVerificationRecordRequest.fromPartial(base ?? {}); + }, + fromPartial(_: DeepPartial): RetrieveDomainVerificationRecordRequest { + const message = createBaseRetrieveDomainVerificationRecordRequest(); + return message; + }, }; function createBaseRetrieveDomainVerificationRecordResponse(): RetrieveDomainVerificationRecordResponse { - return { verificationRecordName: "", verificationRecordValue: "" }; + return { verificationRecordName: "", verificationRecordValue: "" }; } export const RetrieveDomainVerificationRecordResponse = { - encode( - message: RetrieveDomainVerificationRecordResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if ( - message.verificationRecordName !== undefined && - message.verificationRecordName !== "" - ) { - writer.uint32(10).string(message.verificationRecordName); - } - if ( - message.verificationRecordValue !== undefined && - message.verificationRecordValue !== "" - ) { - writer.uint32(18).string(message.verificationRecordValue); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): RetrieveDomainVerificationRecordResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRetrieveDomainVerificationRecordResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.verificationRecordName = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.verificationRecordValue = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: RetrieveDomainVerificationRecordResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.verificationRecordName !== undefined && message.verificationRecordName !== "") { + writer.uint32(10).string(message.verificationRecordName); + } + if (message.verificationRecordValue !== undefined && message.verificationRecordValue !== "") { + writer.uint32(18).string(message.verificationRecordValue); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): RetrieveDomainVerificationRecordResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseRetrieveDomainVerificationRecordResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - fromJSON(object: any): RetrieveDomainVerificationRecordResponse { - return { - verificationRecordName: isSet(object.verificationRecordName) - ? String(object.verificationRecordName) - : "", - verificationRecordValue: isSet(object.verificationRecordValue) - ? String(object.verificationRecordValue) - : "", - }; - }, + message.verificationRecordName = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.verificationRecordValue = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: RetrieveDomainVerificationRecordResponse): unknown { - const obj: any = {}; - if ( - message.verificationRecordName !== undefined && - message.verificationRecordName !== "" - ) { - obj.verificationRecordName = message.verificationRecordName; - } - if ( - message.verificationRecordValue !== undefined && - message.verificationRecordValue !== "" - ) { - obj.verificationRecordValue = message.verificationRecordValue; - } - return obj; - }, + fromJSON(object: any): RetrieveDomainVerificationRecordResponse { + return { + verificationRecordName: isSet(object.verificationRecordName) ? String(object.verificationRecordName) : "", + verificationRecordValue: isSet(object.verificationRecordValue) ? String(object.verificationRecordValue) : "", + }; + }, - create( - base?: DeepPartial, - ): RetrieveDomainVerificationRecordResponse { - return RetrieveDomainVerificationRecordResponse.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): RetrieveDomainVerificationRecordResponse { - const message = createBaseRetrieveDomainVerificationRecordResponse(); - message.verificationRecordName = object.verificationRecordName ?? ""; - message.verificationRecordValue = object.verificationRecordValue ?? ""; - return message; - }, + toJSON(message: RetrieveDomainVerificationRecordResponse): unknown { + const obj: any = {}; + if (message.verificationRecordName !== undefined && message.verificationRecordName !== "") { + obj.verificationRecordName = message.verificationRecordName; + } + if (message.verificationRecordValue !== undefined && message.verificationRecordValue !== "") { + obj.verificationRecordValue = message.verificationRecordValue; + } + return obj; + }, + + create(base?: DeepPartial): RetrieveDomainVerificationRecordResponse { + return RetrieveDomainVerificationRecordResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): RetrieveDomainVerificationRecordResponse { + const message = createBaseRetrieveDomainVerificationRecordResponse(); + message.verificationRecordName = object.verificationRecordName ?? ""; + message.verificationRecordValue = object.verificationRecordValue ?? ""; + return message; + }, }; function createBaseRefreshDomainVerificationStatusRequest(): RefreshDomainVerificationStatusRequest { - return {}; + return {}; } export const RefreshDomainVerificationStatusRequest = { - encode( - _: RefreshDomainVerificationStatusRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): RefreshDomainVerificationStatusRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRefreshDomainVerificationStatusRequest(); - 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): RefreshDomainVerificationStatusRequest { - return {}; - }, - - toJSON(_: RefreshDomainVerificationStatusRequest): unknown { - const obj: any = {}; - return obj; - }, + encode(_: RefreshDomainVerificationStatusRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): RefreshDomainVerificationStatusRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseRefreshDomainVerificationStatusRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - create( - base?: DeepPartial, - ): RefreshDomainVerificationStatusRequest { - return RefreshDomainVerificationStatusRequest.fromPartial(base ?? {}); - }, - fromPartial( - _: DeepPartial, - ): RefreshDomainVerificationStatusRequest { - const message = createBaseRefreshDomainVerificationStatusRequest(); - return message; - }, + fromJSON(_: any): RefreshDomainVerificationStatusRequest { + return {}; + }, + + toJSON(_: RefreshDomainVerificationStatusRequest): unknown { + const obj: any = {}; + return obj; + }, + + create(base?: DeepPartial): RefreshDomainVerificationStatusRequest { + return RefreshDomainVerificationStatusRequest.fromPartial(base ?? {}); + }, + fromPartial(_: DeepPartial): RefreshDomainVerificationStatusRequest { + const message = createBaseRefreshDomainVerificationStatusRequest(); + return message; + }, }; function createBaseRefreshDomainVerificationStatusResponse(): RefreshDomainVerificationStatusResponse { - return { domain: "", domainVerified: false }; + return { domain: "", domainVerified: false }; } export const RefreshDomainVerificationStatusResponse = { - encode( - message: RefreshDomainVerificationStatusResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.domain !== undefined && message.domain !== "") { - writer.uint32(10).string(message.domain); - } - if (message.domainVerified === true) { - writer.uint32(16).bool(message.domainVerified); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): RefreshDomainVerificationStatusResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRefreshDomainVerificationStatusResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.domain = reader.string(); - continue; - case 2: - if (tag !== 16) { - break; - } - - message.domainVerified = reader.bool(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: RefreshDomainVerificationStatusResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.domain !== undefined && message.domain !== "") { + writer.uint32(10).string(message.domain); + } + if (message.domainVerified === true) { + writer.uint32(16).bool(message.domainVerified); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): RefreshDomainVerificationStatusResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseRefreshDomainVerificationStatusResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - fromJSON(object: any): RefreshDomainVerificationStatusResponse { - return { - domain: isSet(object.domain) ? String(object.domain) : "", - domainVerified: isSet(object.domainVerified) - ? Boolean(object.domainVerified) - : false, - }; - }, + message.domain = reader.string(); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.domainVerified = reader.bool(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: RefreshDomainVerificationStatusResponse): unknown { - const obj: any = {}; - if (message.domain !== undefined && message.domain !== "") { - obj.domain = message.domain; - } - if (message.domainVerified === true) { - obj.domainVerified = message.domainVerified; - } - return obj; - }, + fromJSON(object: any): RefreshDomainVerificationStatusResponse { + return { + domain: isSet(object.domain) ? String(object.domain) : "", + domainVerified: isSet(object.domainVerified) ? Boolean(object.domainVerified) : false, + }; + }, - create( - base?: DeepPartial, - ): RefreshDomainVerificationStatusResponse { - return RefreshDomainVerificationStatusResponse.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): RefreshDomainVerificationStatusResponse { - const message = createBaseRefreshDomainVerificationStatusResponse(); - message.domain = object.domain ?? ""; - message.domainVerified = object.domainVerified ?? false; - return message; - }, + toJSON(message: RefreshDomainVerificationStatusResponse): unknown { + const obj: any = {}; + if (message.domain !== undefined && message.domain !== "") { + obj.domain = message.domain; + } + if (message.domainVerified === true) { + obj.domainVerified = message.domainVerified; + } + return obj; + }, + + create(base?: DeepPartial): RefreshDomainVerificationStatusResponse { + return RefreshDomainVerificationStatusResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): RefreshDomainVerificationStatusResponse { + const message = createBaseRefreshDomainVerificationStatusResponse(); + message.domain = object.domain ?? ""; + message.domainVerified = object.domainVerified ?? false; + return message; + }, }; function createBaseSearchWalletConfigurationsRequest(): SearchWalletConfigurationsRequest { - return { queryFilter: "", continuationToken: "" }; + return { queryFilter: "", continuationToken: "" }; } export const SearchWalletConfigurationsRequest = { - encode( - message: SearchWalletConfigurationsRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.queryFilter !== undefined && message.queryFilter !== "") { - writer.uint32(10).string(message.queryFilter); - } - if ( - message.continuationToken !== undefined && - message.continuationToken !== "" - ) { - writer.uint32(18).string(message.continuationToken); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): SearchWalletConfigurationsRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSearchWalletConfigurationsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.queryFilter = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.continuationToken = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: SearchWalletConfigurationsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.queryFilter !== undefined && message.queryFilter !== "") { + writer.uint32(10).string(message.queryFilter); + } + if (message.continuationToken !== undefined && message.continuationToken !== "") { + writer.uint32(18).string(message.continuationToken); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): SearchWalletConfigurationsRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSearchWalletConfigurationsRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - fromJSON(object: any): SearchWalletConfigurationsRequest { - return { - queryFilter: isSet(object.queryFilter) - ? String(object.queryFilter) - : "", - continuationToken: isSet(object.continuationToken) - ? String(object.continuationToken) - : "", - }; - }, + message.queryFilter = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.continuationToken = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: SearchWalletConfigurationsRequest): unknown { - const obj: any = {}; - if (message.queryFilter !== undefined && message.queryFilter !== "") { - obj.queryFilter = message.queryFilter; - } - if ( - message.continuationToken !== undefined && - message.continuationToken !== "" - ) { - obj.continuationToken = message.continuationToken; - } - return obj; - }, + fromJSON(object: any): SearchWalletConfigurationsRequest { + return { + queryFilter: isSet(object.queryFilter) ? String(object.queryFilter) : "", + continuationToken: isSet(object.continuationToken) ? String(object.continuationToken) : "", + }; + }, - create( - base?: DeepPartial, - ): SearchWalletConfigurationsRequest { - return SearchWalletConfigurationsRequest.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): SearchWalletConfigurationsRequest { - const message = createBaseSearchWalletConfigurationsRequest(); - message.queryFilter = object.queryFilter ?? ""; - message.continuationToken = object.continuationToken ?? ""; - return message; - }, + toJSON(message: SearchWalletConfigurationsRequest): unknown { + const obj: any = {}; + if (message.queryFilter !== undefined && message.queryFilter !== "") { + obj.queryFilter = message.queryFilter; + } + if (message.continuationToken !== undefined && message.continuationToken !== "") { + obj.continuationToken = message.continuationToken; + } + return obj; + }, + + create(base?: DeepPartial): SearchWalletConfigurationsRequest { + return SearchWalletConfigurationsRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): SearchWalletConfigurationsRequest { + const message = createBaseSearchWalletConfigurationsRequest(); + message.queryFilter = object.queryFilter ?? ""; + message.continuationToken = object.continuationToken ?? ""; + return message; + }, }; function createBaseSearchWalletConfigurationResponse(): SearchWalletConfigurationResponse { - return { results: [], hasMoreResults: false, continuationToken: "" }; + return { results: [], hasMoreResults: false, continuationToken: "" }; } export const SearchWalletConfigurationResponse = { - encode( - message: SearchWalletConfigurationResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.results !== undefined && message.results.length !== 0) { - for (const v of message.results) { - WalletConfiguration.encode( - v!, - writer.uint32(10).fork(), - ).ldelim(); - } - } - if (message.hasMoreResults === true) { - writer.uint32(16).bool(message.hasMoreResults); - } - if ( - message.continuationToken !== undefined && - message.continuationToken !== "" - ) { - writer.uint32(34).string(message.continuationToken); - } - return writer; - }, + encode(message: SearchWalletConfigurationResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.results !== undefined && message.results.length !== 0) { + for (const v of message.results) { + WalletConfiguration.encode(v!, writer.uint32(10).fork()).ldelim(); + } + } + if (message.hasMoreResults === true) { + writer.uint32(16).bool(message.hasMoreResults); + } + if (message.continuationToken !== undefined && message.continuationToken !== "") { + writer.uint32(34).string(message.continuationToken); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): SearchWalletConfigurationResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSearchWalletConfigurationResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): SearchWalletConfigurationResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSearchWalletConfigurationResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.results!.push( - WalletConfiguration.decode(reader, reader.uint32()), - ); - continue; - case 2: - if (tag !== 16) { - break; - } - - message.hasMoreResults = reader.bool(); - continue; - case 4: - if (tag !== 34) { - break; - } - - message.continuationToken = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + message.results!.push(WalletConfiguration.decode(reader, reader.uint32())); + continue; + case 2: + if (tag !== 16) { + break; + } - fromJSON(object: any): SearchWalletConfigurationResponse { - return { - results: Array.isArray(object?.results) - ? object.results.map((e: any) => - WalletConfiguration.fromJSON(e), - ) - : [], - hasMoreResults: isSet(object.hasMoreResults) - ? Boolean(object.hasMoreResults) - : false, - continuationToken: isSet(object.continuationToken) - ? String(object.continuationToken) - : "", - }; - }, + message.hasMoreResults = reader.bool(); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.continuationToken = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: SearchWalletConfigurationResponse): unknown { - const obj: any = {}; - if (message.results?.length) { - obj.results = message.results.map((e) => - WalletConfiguration.toJSON(e), - ); - } - if (message.hasMoreResults === true) { - obj.hasMoreResults = message.hasMoreResults; - } - if ( - message.continuationToken !== undefined && - message.continuationToken !== "" - ) { - obj.continuationToken = message.continuationToken; - } - return obj; - }, + fromJSON(object: any): SearchWalletConfigurationResponse { + return { + results: Array.isArray(object?.results) ? object.results.map((e: any) => WalletConfiguration.fromJSON(e)) : [], + hasMoreResults: isSet(object.hasMoreResults) ? Boolean(object.hasMoreResults) : false, + continuationToken: isSet(object.continuationToken) ? String(object.continuationToken) : "", + }; + }, - create( - base?: DeepPartial, - ): SearchWalletConfigurationResponse { - return SearchWalletConfigurationResponse.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): SearchWalletConfigurationResponse { - const message = createBaseSearchWalletConfigurationResponse(); - message.results = - object.results?.map((e) => WalletConfiguration.fromPartial(e)) || - []; - message.hasMoreResults = object.hasMoreResults ?? false; - message.continuationToken = object.continuationToken ?? ""; - return message; - }, + toJSON(message: SearchWalletConfigurationResponse): unknown { + const obj: any = {}; + if (message.results?.length) { + obj.results = message.results.map((e) => WalletConfiguration.toJSON(e)); + } + if (message.hasMoreResults === true) { + obj.hasMoreResults = message.hasMoreResults; + } + if (message.continuationToken !== undefined && message.continuationToken !== "") { + obj.continuationToken = message.continuationToken; + } + return obj; + }, + + create(base?: DeepPartial): SearchWalletConfigurationResponse { + return SearchWalletConfigurationResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): SearchWalletConfigurationResponse { + const message = createBaseSearchWalletConfigurationResponse(); + message.results = object.results?.map((e) => WalletConfiguration.fromPartial(e)) || []; + message.hasMoreResults = object.hasMoreResults ?? false; + message.continuationToken = object.continuationToken ?? ""; + return message; + }, }; function createBaseWalletConfiguration(): WalletConfiguration { - return { - name: "", - email: "", - sms: "", - walletId: "", - publicDid: "", - configType: "", - authTokens: [], - externalIdentityIds: [], - ecosystemId: "", - description: "", - externalIdentities: [], - }; + return { + name: "", + email: "", + sms: "", + walletId: "", + publicDid: "", + configType: "", + authTokens: [], + externalIdentityIds: [], + ecosystemId: "", + description: "", + externalIdentities: [], + }; } export const WalletConfiguration = { - encode( - message: WalletConfiguration, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.name !== undefined && message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.email !== undefined && message.email !== "") { - writer.uint32(18).string(message.email); - } - if (message.sms !== undefined && message.sms !== "") { - writer.uint32(26).string(message.sms); - } - if (message.walletId !== undefined && message.walletId !== "") { - writer.uint32(34).string(message.walletId); - } - if (message.publicDid !== undefined && message.publicDid !== "") { - writer.uint32(42).string(message.publicDid); - } - if (message.configType !== undefined && message.configType !== "") { - writer.uint32(50).string(message.configType); - } - if ( - message.authTokens !== undefined && - message.authTokens.length !== 0 - ) { - for (const v of message.authTokens) { - WalletAuthToken.encode(v!, writer.uint32(58).fork()).ldelim(); - } - } - if ( - message.externalIdentityIds !== undefined && - message.externalIdentityIds.length !== 0 - ) { - for (const v of message.externalIdentityIds) { - writer.uint32(66).string(v!); - } - } - if (message.ecosystemId !== undefined && message.ecosystemId !== "") { - writer.uint32(74).string(message.ecosystemId); - } - if (message.description !== undefined && message.description !== "") { - writer.uint32(82).string(message.description); - } - if ( - message.externalIdentities !== undefined && - message.externalIdentities.length !== 0 - ) { - for (const v of message.externalIdentities) { - WalletExternalIdentity.encode( - v!, - writer.uint32(90).fork(), - ).ldelim(); - } - } - return writer; - }, + encode(message: WalletConfiguration, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.name !== undefined && message.name !== "") { + writer.uint32(10).string(message.name); + } + if (message.email !== undefined && message.email !== "") { + writer.uint32(18).string(message.email); + } + if (message.sms !== undefined && message.sms !== "") { + writer.uint32(26).string(message.sms); + } + if (message.walletId !== undefined && message.walletId !== "") { + writer.uint32(34).string(message.walletId); + } + if (message.publicDid !== undefined && message.publicDid !== "") { + writer.uint32(42).string(message.publicDid); + } + if (message.configType !== undefined && message.configType !== "") { + writer.uint32(50).string(message.configType); + } + if (message.authTokens !== undefined && message.authTokens.length !== 0) { + for (const v of message.authTokens) { + WalletAuthToken.encode(v!, writer.uint32(58).fork()).ldelim(); + } + } + if (message.externalIdentityIds !== undefined && message.externalIdentityIds.length !== 0) { + for (const v of message.externalIdentityIds) { + writer.uint32(66).string(v!); + } + } + if (message.ecosystemId !== undefined && message.ecosystemId !== "") { + writer.uint32(74).string(message.ecosystemId); + } + if (message.description !== undefined && message.description !== "") { + writer.uint32(82).string(message.description); + } + if (message.externalIdentities !== undefined && message.externalIdentities.length !== 0) { + for (const v of message.externalIdentities) { + WalletExternalIdentity.encode(v!, writer.uint32(90).fork()).ldelim(); + } + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): WalletConfiguration { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseWalletConfiguration(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): WalletConfiguration { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseWalletConfiguration(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.name = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.email = reader.string(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.sms = reader.string(); - continue; - case 4: - if (tag !== 34) { - break; - } - - message.walletId = reader.string(); - continue; - case 5: - if (tag !== 42) { - break; - } - - message.publicDid = reader.string(); - continue; - case 6: - if (tag !== 50) { - break; - } - - message.configType = reader.string(); - continue; - case 7: - if (tag !== 58) { - break; - } - - message.authTokens!.push( - WalletAuthToken.decode(reader, reader.uint32()), - ); - continue; - case 8: - if (tag !== 66) { - break; - } - - message.externalIdentityIds!.push(reader.string()); - continue; - case 9: - if (tag !== 74) { - break; - } - - message.ecosystemId = reader.string(); - continue; - case 10: - if (tag !== 82) { - break; - } - - message.description = reader.string(); - continue; - case 11: - if (tag !== 90) { - break; - } - - message.externalIdentities!.push( - WalletExternalIdentity.decode(reader, reader.uint32()), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + message.name = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } - fromJSON(object: any): WalletConfiguration { - return { - name: isSet(object.name) ? String(object.name) : "", - email: isSet(object.email) ? String(object.email) : "", - sms: isSet(object.sms) ? String(object.sms) : "", - walletId: isSet(object.walletId) ? String(object.walletId) : "", - publicDid: isSet(object.publicDid) ? String(object.publicDid) : "", - configType: isSet(object.configType) - ? String(object.configType) - : "", - authTokens: Array.isArray(object?.authTokens) - ? object.authTokens.map((e: any) => WalletAuthToken.fromJSON(e)) - : [], - externalIdentityIds: Array.isArray(object?.externalIdentityIds) - ? object.externalIdentityIds.map((e: any) => String(e)) - : [], - ecosystemId: isSet(object.ecosystemId) - ? String(object.ecosystemId) - : "", - description: isSet(object.description) - ? String(object.description) - : "", - externalIdentities: Array.isArray(object?.externalIdentities) - ? object.externalIdentities.map((e: any) => - WalletExternalIdentity.fromJSON(e), - ) - : [], - }; - }, + message.email = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } - toJSON(message: WalletConfiguration): unknown { - const obj: any = {}; - if (message.name !== undefined && message.name !== "") { - obj.name = message.name; - } - if (message.email !== undefined && message.email !== "") { - obj.email = message.email; - } - if (message.sms !== undefined && message.sms !== "") { - obj.sms = message.sms; - } - if (message.walletId !== undefined && message.walletId !== "") { - obj.walletId = message.walletId; - } - if (message.publicDid !== undefined && message.publicDid !== "") { - obj.publicDid = message.publicDid; - } - if (message.configType !== undefined && message.configType !== "") { - obj.configType = message.configType; - } - if (message.authTokens?.length) { - obj.authTokens = message.authTokens.map((e) => - WalletAuthToken.toJSON(e), - ); - } - if (message.externalIdentityIds?.length) { - obj.externalIdentityIds = message.externalIdentityIds; - } - if (message.ecosystemId !== undefined && message.ecosystemId !== "") { - obj.ecosystemId = message.ecosystemId; - } - if (message.description !== undefined && message.description !== "") { - obj.description = message.description; - } - if (message.externalIdentities?.length) { - obj.externalIdentities = message.externalIdentities.map((e) => - WalletExternalIdentity.toJSON(e), - ); - } - return obj; - }, + message.sms = reader.string(); + continue; + case 4: + if (tag !== 34) { + break; + } - create(base?: DeepPartial): WalletConfiguration { - return WalletConfiguration.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): WalletConfiguration { - const message = createBaseWalletConfiguration(); - message.name = object.name ?? ""; - message.email = object.email ?? ""; - message.sms = object.sms ?? ""; - message.walletId = object.walletId ?? ""; - message.publicDid = object.publicDid ?? ""; - message.configType = object.configType ?? ""; - message.authTokens = - object.authTokens?.map((e) => WalletAuthToken.fromPartial(e)) || []; - message.externalIdentityIds = - object.externalIdentityIds?.map((e) => e) || []; - message.ecosystemId = object.ecosystemId ?? ""; - message.description = object.description ?? ""; - message.externalIdentities = - object.externalIdentities?.map((e) => - WalletExternalIdentity.fromPartial(e), - ) || []; - return message; - }, + message.walletId = reader.string(); + continue; + case 5: + if (tag !== 42) { + break; + } + + message.publicDid = reader.string(); + continue; + case 6: + if (tag !== 50) { + break; + } + + message.configType = reader.string(); + continue; + case 7: + if (tag !== 58) { + break; + } + + message.authTokens!.push(WalletAuthToken.decode(reader, reader.uint32())); + continue; + case 8: + if (tag !== 66) { + break; + } + + message.externalIdentityIds!.push(reader.string()); + continue; + case 9: + if (tag !== 74) { + break; + } + + message.ecosystemId = reader.string(); + continue; + case 10: + if (tag !== 82) { + break; + } + + message.description = reader.string(); + continue; + case 11: + if (tag !== 90) { + break; + } + + message.externalIdentities!.push(WalletExternalIdentity.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): WalletConfiguration { + return { + name: isSet(object.name) ? String(object.name) : "", + email: isSet(object.email) ? String(object.email) : "", + sms: isSet(object.sms) ? String(object.sms) : "", + walletId: isSet(object.walletId) ? String(object.walletId) : "", + publicDid: isSet(object.publicDid) ? String(object.publicDid) : "", + configType: isSet(object.configType) ? String(object.configType) : "", + authTokens: Array.isArray(object?.authTokens) + ? object.authTokens.map((e: any) => WalletAuthToken.fromJSON(e)) + : [], + externalIdentityIds: Array.isArray(object?.externalIdentityIds) + ? object.externalIdentityIds.map((e: any) => String(e)) + : [], + ecosystemId: isSet(object.ecosystemId) ? String(object.ecosystemId) : "", + description: isSet(object.description) ? String(object.description) : "", + externalIdentities: Array.isArray(object?.externalIdentities) + ? object.externalIdentities.map((e: any) => WalletExternalIdentity.fromJSON(e)) + : [], + }; + }, + + toJSON(message: WalletConfiguration): unknown { + const obj: any = {}; + if (message.name !== undefined && message.name !== "") { + obj.name = message.name; + } + if (message.email !== undefined && message.email !== "") { + obj.email = message.email; + } + if (message.sms !== undefined && message.sms !== "") { + obj.sms = message.sms; + } + if (message.walletId !== undefined && message.walletId !== "") { + obj.walletId = message.walletId; + } + if (message.publicDid !== undefined && message.publicDid !== "") { + obj.publicDid = message.publicDid; + } + if (message.configType !== undefined && message.configType !== "") { + obj.configType = message.configType; + } + if (message.authTokens?.length) { + obj.authTokens = message.authTokens.map((e) => WalletAuthToken.toJSON(e)); + } + if (message.externalIdentityIds?.length) { + obj.externalIdentityIds = message.externalIdentityIds; + } + if (message.ecosystemId !== undefined && message.ecosystemId !== "") { + obj.ecosystemId = message.ecosystemId; + } + if (message.description !== undefined && message.description !== "") { + obj.description = message.description; + } + if (message.externalIdentities?.length) { + obj.externalIdentities = message.externalIdentities.map((e) => WalletExternalIdentity.toJSON(e)); + } + return obj; + }, + + create(base?: DeepPartial): WalletConfiguration { + return WalletConfiguration.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): WalletConfiguration { + const message = createBaseWalletConfiguration(); + message.name = object.name ?? ""; + message.email = object.email ?? ""; + message.sms = object.sms ?? ""; + message.walletId = object.walletId ?? ""; + message.publicDid = object.publicDid ?? ""; + message.configType = object.configType ?? ""; + message.authTokens = object.authTokens?.map((e) => WalletAuthToken.fromPartial(e)) || []; + message.externalIdentityIds = object.externalIdentityIds?.map((e) => e) || []; + message.ecosystemId = object.ecosystemId ?? ""; + message.description = object.description ?? ""; + message.externalIdentities = object.externalIdentities?.map((e) => WalletExternalIdentity.fromPartial(e)) || []; + return message; + }, }; function createBaseWalletExternalIdentity(): WalletExternalIdentity { - return { provider: 0, id: "" }; + return { provider: 0, id: "" }; } export const WalletExternalIdentity = { - encode( - message: WalletExternalIdentity, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.provider !== undefined && message.provider !== 0) { - writer.uint32(8).int32(message.provider); - } - if (message.id !== undefined && message.id !== "") { - writer.uint32(18).string(message.id); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): WalletExternalIdentity { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseWalletExternalIdentity(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.provider = reader.int32() as any; - continue; - case 2: - if (tag !== 18) { - break; - } - - message.id = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: WalletExternalIdentity, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.provider !== undefined && message.provider !== 0) { + writer.uint32(8).int32(message.provider); + } + if (message.id !== undefined && message.id !== "") { + writer.uint32(18).string(message.id); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): WalletExternalIdentity { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseWalletExternalIdentity(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } - fromJSON(object: any): WalletExternalIdentity { - return { - provider: isSet(object.provider) - ? identityProviderFromJSON(object.provider) - : 0, - id: isSet(object.id) ? String(object.id) : "", - }; - }, + message.provider = reader.int32() as any; + continue; + case 2: + if (tag !== 18) { + break; + } + + message.id = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: WalletExternalIdentity): unknown { - const obj: any = {}; - if (message.provider !== undefined && message.provider !== 0) { - obj.provider = identityProviderToJSON(message.provider); - } - if (message.id !== undefined && message.id !== "") { - obj.id = message.id; - } - return obj; - }, + fromJSON(object: any): WalletExternalIdentity { + return { + provider: isSet(object.provider) ? identityProviderFromJSON(object.provider) : 0, + id: isSet(object.id) ? String(object.id) : "", + }; + }, - create(base?: DeepPartial): WalletExternalIdentity { - return WalletExternalIdentity.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): WalletExternalIdentity { - const message = createBaseWalletExternalIdentity(); - message.provider = object.provider ?? 0; - message.id = object.id ?? ""; - return message; - }, + toJSON(message: WalletExternalIdentity): unknown { + const obj: any = {}; + if (message.provider !== undefined && message.provider !== 0) { + obj.provider = identityProviderToJSON(message.provider); + } + if (message.id !== undefined && message.id !== "") { + obj.id = message.id; + } + return obj; + }, + + create(base?: DeepPartial): WalletExternalIdentity { + return WalletExternalIdentity.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): WalletExternalIdentity { + const message = createBaseWalletExternalIdentity(); + message.provider = object.provider ?? 0; + message.id = object.id ?? ""; + return message; + }, }; function createBaseIonOptions(): IonOptions { - return { network: 0 }; + return { network: 0 }; } export const IonOptions = { - encode( - message: IonOptions, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.network !== undefined && message.network !== 0) { - writer.uint32(8).int32(message.network); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): IonOptions { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseIonOptions(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.network = reader.int32() as any; - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): IonOptions { - return { - network: isSet(object.network) - ? ionOptions_IonNetworkFromJSON(object.network) - : 0, - }; - }, + encode(message: IonOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.network !== undefined && message.network !== 0) { + writer.uint32(8).int32(message.network); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): IonOptions { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseIonOptions(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.network = reader.int32() as any; + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: IonOptions): unknown { - const obj: any = {}; - if (message.network !== undefined && message.network !== 0) { - obj.network = ionOptions_IonNetworkToJSON(message.network); - } - return obj; - }, + fromJSON(object: any): IonOptions { + return { network: isSet(object.network) ? ionOptions_IonNetworkFromJSON(object.network) : 0 }; + }, - create(base?: DeepPartial): IonOptions { - return IonOptions.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): IonOptions { - const message = createBaseIonOptions(); - message.network = object.network ?? 0; - return message; - }, + toJSON(message: IonOptions): unknown { + const obj: any = {}; + if (message.network !== undefined && message.network !== 0) { + obj.network = ionOptions_IonNetworkToJSON(message.network); + } + return obj; + }, + + create(base?: DeepPartial): IonOptions { + return IonOptions.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): IonOptions { + const message = createBaseIonOptions(); + message.network = object.network ?? 0; + return message; + }, }; function createBaseIndyOptions(): IndyOptions { - return { network: 0 }; + return { network: 0 }; } export const IndyOptions = { - encode( - message: IndyOptions, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.network !== undefined && message.network !== 0) { - writer.uint32(8).int32(message.network); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): IndyOptions { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseIndyOptions(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.network = reader.int32() as any; - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): IndyOptions { - return { - network: isSet(object.network) - ? indyOptions_IndyNetworkFromJSON(object.network) - : 0, - }; - }, + encode(message: IndyOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.network !== undefined && message.network !== 0) { + writer.uint32(8).int32(message.network); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): IndyOptions { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseIndyOptions(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.network = reader.int32() as any; + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: IndyOptions): unknown { - const obj: any = {}; - if (message.network !== undefined && message.network !== 0) { - obj.network = indyOptions_IndyNetworkToJSON(message.network); - } - return obj; - }, + fromJSON(object: any): IndyOptions { + return { network: isSet(object.network) ? indyOptions_IndyNetworkFromJSON(object.network) : 0 }; + }, - create(base?: DeepPartial): IndyOptions { - return IndyOptions.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): IndyOptions { - const message = createBaseIndyOptions(); - message.network = object.network ?? 0; - return message; - }, + toJSON(message: IndyOptions): unknown { + const obj: any = {}; + if (message.network !== undefined && message.network !== 0) { + obj.network = indyOptions_IndyNetworkToJSON(message.network); + } + return obj; + }, + + create(base?: DeepPartial): IndyOptions { + return IndyOptions.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): IndyOptions { + const message = createBaseIndyOptions(); + message.network = object.network ?? 0; + return message; + }, }; function createBaseUpgradeDidRequest(): UpgradeDidRequest { - return { - email: undefined, - walletId: undefined, - didUri: undefined, - method: 0, - ionOptions: undefined, - indyOptions: undefined, - }; + return { + email: undefined, + walletId: undefined, + didUri: undefined, + method: 0, + ionOptions: undefined, + indyOptions: undefined, + }; } export const UpgradeDidRequest = { - encode( - message: UpgradeDidRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.email !== undefined) { - writer.uint32(10).string(message.email); - } - if (message.walletId !== undefined) { - writer.uint32(18).string(message.walletId); - } - if (message.didUri !== undefined) { - writer.uint32(50).string(message.didUri); - } - if (message.method !== undefined && message.method !== 0) { - writer.uint32(24).int32(message.method); - } - if (message.ionOptions !== undefined) { - IonOptions.encode( - message.ionOptions, - writer.uint32(34).fork(), - ).ldelim(); - } - if (message.indyOptions !== undefined) { - IndyOptions.encode( - message.indyOptions, - writer.uint32(42).fork(), - ).ldelim(); - } - return writer; - }, + encode(message: UpgradeDidRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.email !== undefined) { + writer.uint32(10).string(message.email); + } + if (message.walletId !== undefined) { + writer.uint32(18).string(message.walletId); + } + if (message.didUri !== undefined) { + writer.uint32(50).string(message.didUri); + } + if (message.method !== undefined && message.method !== 0) { + writer.uint32(24).int32(message.method); + } + if (message.ionOptions !== undefined) { + IonOptions.encode(message.ionOptions, writer.uint32(34).fork()).ldelim(); + } + if (message.indyOptions !== undefined) { + IndyOptions.encode(message.indyOptions, writer.uint32(42).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): UpgradeDidRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUpgradeDidRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - decode(input: _m0.Reader | Uint8Array, length?: number): UpgradeDidRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpgradeDidRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.email = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.walletId = reader.string(); - continue; - case 6: - if (tag !== 50) { - break; - } - - message.didUri = reader.string(); - continue; - case 3: - if (tag !== 24) { - break; - } - - message.method = reader.int32() as any; - continue; - case 4: - if (tag !== 34) { - break; - } - - message.ionOptions = IonOptions.decode( - reader, - reader.uint32(), - ); - continue; - case 5: - if (tag !== 42) { - break; - } - - message.indyOptions = IndyOptions.decode( - reader, - reader.uint32(), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + message.email = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } - fromJSON(object: any): UpgradeDidRequest { - return { - email: isSet(object.email) ? String(object.email) : undefined, - walletId: isSet(object.walletId) - ? String(object.walletId) - : undefined, - didUri: isSet(object.didUri) ? String(object.didUri) : undefined, - method: isSet(object.method) - ? supportedDidMethodFromJSON(object.method) - : 0, - ionOptions: isSet(object.ionOptions) - ? IonOptions.fromJSON(object.ionOptions) - : undefined, - indyOptions: isSet(object.indyOptions) - ? IndyOptions.fromJSON(object.indyOptions) - : undefined, - }; - }, + message.walletId = reader.string(); + continue; + case 6: + if (tag !== 50) { + break; + } - toJSON(message: UpgradeDidRequest): unknown { - const obj: any = {}; - if (message.email !== undefined) { - obj.email = message.email; - } - if (message.walletId !== undefined) { - obj.walletId = message.walletId; - } - if (message.didUri !== undefined) { - obj.didUri = message.didUri; - } - if (message.method !== undefined && message.method !== 0) { - obj.method = supportedDidMethodToJSON(message.method); - } - if (message.ionOptions !== undefined) { - obj.ionOptions = IonOptions.toJSON(message.ionOptions); - } - if (message.indyOptions !== undefined) { - obj.indyOptions = IndyOptions.toJSON(message.indyOptions); - } - return obj; - }, + message.didUri = reader.string(); + continue; + case 3: + if (tag !== 24) { + break; + } - create(base?: DeepPartial): UpgradeDidRequest { - return UpgradeDidRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): UpgradeDidRequest { - const message = createBaseUpgradeDidRequest(); - message.email = object.email ?? undefined; - message.walletId = object.walletId ?? undefined; - message.didUri = object.didUri ?? undefined; - message.method = object.method ?? 0; - message.ionOptions = - object.ionOptions !== undefined && object.ionOptions !== null - ? IonOptions.fromPartial(object.ionOptions) - : undefined; - message.indyOptions = - object.indyOptions !== undefined && object.indyOptions !== null - ? IndyOptions.fromPartial(object.indyOptions) - : undefined; - return message; - }, + message.method = reader.int32() as any; + continue; + case 4: + if (tag !== 34) { + break; + } + + message.ionOptions = IonOptions.decode(reader, reader.uint32()); + continue; + case 5: + if (tag !== 42) { + break; + } + + message.indyOptions = IndyOptions.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): UpgradeDidRequest { + return { + email: isSet(object.email) ? String(object.email) : undefined, + walletId: isSet(object.walletId) ? String(object.walletId) : undefined, + didUri: isSet(object.didUri) ? String(object.didUri) : undefined, + method: isSet(object.method) ? supportedDidMethodFromJSON(object.method) : 0, + ionOptions: isSet(object.ionOptions) ? IonOptions.fromJSON(object.ionOptions) : undefined, + indyOptions: isSet(object.indyOptions) ? IndyOptions.fromJSON(object.indyOptions) : undefined, + }; + }, + + toJSON(message: UpgradeDidRequest): unknown { + const obj: any = {}; + if (message.email !== undefined) { + obj.email = message.email; + } + if (message.walletId !== undefined) { + obj.walletId = message.walletId; + } + if (message.didUri !== undefined) { + obj.didUri = message.didUri; + } + if (message.method !== undefined && message.method !== 0) { + obj.method = supportedDidMethodToJSON(message.method); + } + if (message.ionOptions !== undefined) { + obj.ionOptions = IonOptions.toJSON(message.ionOptions); + } + if (message.indyOptions !== undefined) { + obj.indyOptions = IndyOptions.toJSON(message.indyOptions); + } + return obj; + }, + + create(base?: DeepPartial): UpgradeDidRequest { + return UpgradeDidRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): UpgradeDidRequest { + const message = createBaseUpgradeDidRequest(); + message.email = object.email ?? undefined; + message.walletId = object.walletId ?? undefined; + message.didUri = object.didUri ?? undefined; + message.method = object.method ?? 0; + message.ionOptions = (object.ionOptions !== undefined && object.ionOptions !== null) + ? IonOptions.fromPartial(object.ionOptions) + : undefined; + message.indyOptions = (object.indyOptions !== undefined && object.indyOptions !== null) + ? IndyOptions.fromPartial(object.indyOptions) + : undefined; + return message; + }, }; function createBaseUpgradeDidResponse(): UpgradeDidResponse { - return { did: "" }; + return { did: "" }; } export const UpgradeDidResponse = { - encode( - message: UpgradeDidResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.did !== undefined && message.did !== "") { - writer.uint32(10).string(message.did); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): UpgradeDidResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpgradeDidResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.did = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): UpgradeDidResponse { - return { did: isSet(object.did) ? String(object.did) : "" }; - }, + encode(message: UpgradeDidResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.did !== undefined && message.did !== "") { + writer.uint32(10).string(message.did); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): UpgradeDidResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUpgradeDidResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.did = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: UpgradeDidResponse): unknown { - const obj: any = {}; - if (message.did !== undefined && message.did !== "") { - obj.did = message.did; - } - return obj; - }, + fromJSON(object: any): UpgradeDidResponse { + return { did: isSet(object.did) ? String(object.did) : "" }; + }, - create(base?: DeepPartial): UpgradeDidResponse { - return UpgradeDidResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): UpgradeDidResponse { - const message = createBaseUpgradeDidResponse(); - message.did = object.did ?? ""; - return message; - }, + toJSON(message: UpgradeDidResponse): unknown { + const obj: any = {}; + if (message.did !== undefined && message.did !== "") { + obj.did = message.did; + } + return obj; + }, + + create(base?: DeepPartial): UpgradeDidResponse { + return UpgradeDidResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): UpgradeDidResponse { + const message = createBaseUpgradeDidResponse(); + message.did = object.did ?? ""; + return message; + }, }; export type ProviderDefinition = typeof ProviderDefinition; export const ProviderDefinition = { - name: "Provider", - fullName: "services.provider.v1.Provider", - methods: { - /** Create new ecosystem and assign the authenticated user as owner */ - createEcosystem: { - name: "CreateEcosystem", - requestType: CreateEcosystemRequest, - requestStream: false, - responseType: CreateEcosystemResponse, - responseStream: false, - options: { - _unknownFields: { 480010: [new Uint8Array([2, 16, 1])] }, - }, - }, - /** Returns the public key being used to create/verify oberon tokens */ - getOberonKey: { - name: "GetOberonKey", - requestType: GetOberonKeyRequest, - requestStream: false, - responseType: GetOberonKeyResponse, - responseStream: false, - options: { - _unknownFields: { - 480010: [ - new Uint8Array([2, 8, 1]), - new Uint8Array([2, 24, 1]), - ], - }, - }, - }, - /** Upgrade a wallet's DID from `did:key` to another method */ - upgradeDID: { - name: "UpgradeDID", - requestType: UpgradeDidRequest, - requestStream: false, - responseType: UpgradeDidResponse, - responseStream: false, - options: {}, - }, - /** Search for issuers/providers/verifiers in the current ecosystem */ - searchWalletConfigurations: { - name: "SearchWalletConfigurations", - requestType: SearchWalletConfigurationsRequest, - requestStream: false, - responseType: SearchWalletConfigurationResponse, - responseStream: false, - options: {}, - }, - }, + name: "Provider", + fullName: "services.provider.v1.Provider", + methods: { + /** Create new ecosystem and assign the authenticated user as owner */ + createEcosystem: { + name: "CreateEcosystem", + requestType: CreateEcosystemRequest, + requestStream: false, + responseType: CreateEcosystemResponse, + responseStream: false, + options: { _unknownFields: { 480010: [new Uint8Array([2, 16, 1])] } }, + }, + /** Returns the public key being used to create/verify oberon tokens */ + getOberonKey: { + name: "GetOberonKey", + requestType: GetOberonKeyRequest, + requestStream: false, + responseType: GetOberonKeyResponse, + responseStream: false, + options: { _unknownFields: { 480010: [new Uint8Array([2, 8, 1]), new Uint8Array([2, 24, 1])] } }, + }, + /** Upgrade a wallet's DID from `did:key` to another method */ + upgradeDID: { + name: "UpgradeDID", + requestType: UpgradeDidRequest, + requestStream: false, + responseType: UpgradeDidResponse, + responseStream: false, + options: {}, + }, + /** Search for issuers/providers/verifiers in the current ecosystem */ + searchWalletConfigurations: { + name: "SearchWalletConfigurations", + requestType: SearchWalletConfigurationsRequest, + requestStream: false, + responseType: SearchWalletConfigurationResponse, + responseStream: false, + options: {}, + }, + }, } as const; -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; function isSet(value: any): boolean { - return value !== null && value !== undefined; + return value !== null && value !== undefined; } diff --git a/web/src/proto/services/trust-registry/v1/trust-registry.ts b/web/src/proto/services/trust-registry/v1/trust-registry.ts index e685c0958..a10e4016d 100644 --- a/web/src/proto/services/trust-registry/v1/trust-registry.ts +++ b/web/src/proto/services/trust-registry/v1/trust-registry.ts @@ -3,59 +3,59 @@ import Long from "long"; import _m0 from "protobufjs/minimal"; export enum RegistrationStatus { - /** CURRENT - Member is currently authorized, as of the time of the query */ - CURRENT = 0, - /** EXPIRED - Member's authorization has expired */ - EXPIRED = 1, - /** TERMINATED - Member has voluntarily ceased Issuer role under the specific EGF */ - TERMINATED = 2, - /** REVOKED - Member authority under specific EGF was terminated by the governing authority */ - REVOKED = 3, - /** NOT_FOUND - Member is not associated with given credential schema in the EGF */ - NOT_FOUND = 10, - UNRECOGNIZED = -1, + /** CURRENT - Member is currently authorized, as of the time of the query */ + CURRENT = 0, + /** EXPIRED - Member's authorization has expired */ + EXPIRED = 1, + /** TERMINATED - Member has voluntarily ceased Issuer role under the specific EGF */ + TERMINATED = 2, + /** REVOKED - Member authority under specific EGF was terminated by the governing authority */ + REVOKED = 3, + /** NOT_FOUND - Member is not associated with given credential schema in the EGF */ + NOT_FOUND = 10, + UNRECOGNIZED = -1, } export function registrationStatusFromJSON(object: any): RegistrationStatus { - switch (object) { - case 0: - case "CURRENT": - return RegistrationStatus.CURRENT; - case 1: - case "EXPIRED": - return RegistrationStatus.EXPIRED; - case 2: - case "TERMINATED": - return RegistrationStatus.TERMINATED; - case 3: - case "REVOKED": - return RegistrationStatus.REVOKED; - case 10: - case "NOT_FOUND": - return RegistrationStatus.NOT_FOUND; - case -1: - case "UNRECOGNIZED": - default: - return RegistrationStatus.UNRECOGNIZED; - } + switch (object) { + case 0: + case "CURRENT": + return RegistrationStatus.CURRENT; + case 1: + case "EXPIRED": + return RegistrationStatus.EXPIRED; + case 2: + case "TERMINATED": + return RegistrationStatus.TERMINATED; + case 3: + case "REVOKED": + return RegistrationStatus.REVOKED; + case 10: + case "NOT_FOUND": + return RegistrationStatus.NOT_FOUND; + case -1: + case "UNRECOGNIZED": + default: + return RegistrationStatus.UNRECOGNIZED; + } } export function registrationStatusToJSON(object: RegistrationStatus): string { - switch (object) { - case RegistrationStatus.CURRENT: - return "CURRENT"; - case RegistrationStatus.EXPIRED: - return "EXPIRED"; - case RegistrationStatus.TERMINATED: - return "TERMINATED"; - case RegistrationStatus.REVOKED: - return "REVOKED"; - case RegistrationStatus.NOT_FOUND: - return "NOT_FOUND"; - case RegistrationStatus.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } + switch (object) { + case RegistrationStatus.CURRENT: + return "CURRENT"; + case RegistrationStatus.EXPIRED: + return "EXPIRED"; + case RegistrationStatus.TERMINATED: + return "TERMINATED"; + case RegistrationStatus.REVOKED: + return "REVOKED"; + case RegistrationStatus.NOT_FOUND: + return "NOT_FOUND"; + case RegistrationStatus.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } } /** @@ -63,1391 +63,1192 @@ export function registrationStatusToJSON(object: RegistrationStatus): string { * Only one of `did_uri`, `wallet_id`, or `email` may be specified. */ export interface RegisterMemberRequest { - /** DID URI of member to register */ - didUri?: string | undefined; - /** Trinsic Wallet ID of member to register */ - walletId?: string | undefined; - /** Email address of member to register. Must be associated with an existing Trinsic account. */ - email?: string | undefined; - /** URI of credential schema to register member as authorized issuer of */ - schemaUri?: string | undefined; - /** Unix Timestamp member is valid from. Member will not be considered valid before this timestamp. */ - validFromUtc?: number | undefined; - /** Unix Timestamp member is valid until. Member will not be considered valid after this timestamp. */ - validUntilUtc?: number | undefined; + /** DID URI of member to register */ + didUri?: + | string + | undefined; + /** Trinsic Wallet ID of member to register */ + walletId?: + | string + | undefined; + /** Email address of member to register. Must be associated with an existing Trinsic account. */ + email?: + | string + | undefined; + /** URI of credential schema to register member as authorized issuer of */ + schemaUri?: + | string + | undefined; + /** Unix Timestamp member is valid from. Member will not be considered valid before this timestamp. */ + validFromUtc?: + | number + | undefined; + /** Unix Timestamp member is valid until. Member will not be considered valid after this timestamp. */ + validUntilUtc?: number | undefined; } /** Response to `RegisterMemberRequest` */ -export interface RegisterMemberResponse {} +export interface RegisterMemberResponse { +} /** * Request to unregister a member as a valid issuer of a specific credential schema. * Only one of `did_uri`, `wallet_id`, or `email` may be specified. */ export interface UnregisterMemberRequest { - /** DID URI of member to unregister */ - didUri?: string | undefined; - /** Trinsic Wallet ID of member to unregister */ - walletId?: string | undefined; - /** Email address of member to unregister. Must be associated with an existing Trinsic account. */ - email?: string | undefined; - /** URI of credential schema to unregister member as authorized issuer of */ - schemaUri?: string | undefined; + /** DID URI of member to unregister */ + didUri?: + | string + | undefined; + /** Trinsic Wallet ID of member to unregister */ + walletId?: + | string + | undefined; + /** Email address of member to unregister. Must be associated with an existing Trinsic account. */ + email?: + | string + | undefined; + /** URI of credential schema to unregister member as authorized issuer of */ + schemaUri?: string | undefined; } /** Response to `UnregisterMemberRequest` */ -export interface UnregisterMemberResponse {} +export interface UnregisterMemberResponse { +} /** Request to fetch member status in governance framework for a specific credential schema. */ export interface GetMemberAuthorizationStatusRequest { - /** DID URI of member */ - didUri?: string | undefined; - /** URI of credential schema associated with member */ - schemaUri?: string | undefined; + /** DID URI of member */ + didUri?: + | string + | undefined; + /** URI of credential schema associated with member */ + schemaUri?: string | undefined; } /** Response to `GetMemberAuthorizationStatusRequest` */ export interface GetMemberAuthorizationStatusResponse { - /** Status of member for given credential schema */ - status?: RegistrationStatus | undefined; + /** Status of member for given credential schema */ + status?: RegistrationStatus | undefined; } export interface ListAuthorizedMembersRequest { - /** id of schema that needs to be checked */ - schemaUri?: string | undefined; - /** Token to fetch next set of results, from previous `ListAuthorizedMembersResponse` */ - continuationToken?: string | undefined; + /** id of schema that needs to be checked */ + schemaUri?: + | string + | undefined; + /** Token to fetch next set of results, from previous `ListAuthorizedMembersResponse` */ + continuationToken?: string | undefined; } /** Response to `ListAuthorizedMembersRequest` */ export interface ListAuthorizedMembersResponse { - /** JSON string containing array of resultant objects */ - authorizedMembers?: AuthorizedMember[] | undefined; - /** Whether more data is available to fetch for query */ - hasMoreResults?: boolean | undefined; - /** Token to fetch next set of results via `ListAuthorizedMembersRequest` */ - continuationToken?: string | undefined; + /** JSON string containing array of resultant objects */ + authorizedMembers?: + | AuthorizedMember[] + | undefined; + /** Whether more data is available to fetch for query */ + hasMoreResults?: + | boolean + | undefined; + /** Token to fetch next set of results via `ListAuthorizedMembersRequest` */ + continuationToken?: string | undefined; } export interface AuthorizedMember { - did?: string | undefined; - authorizedMemberSchemas?: AuthorizedMemberSchema[] | undefined; + did?: string | undefined; + authorizedMemberSchemas?: AuthorizedMemberSchema[] | undefined; } export interface AuthorizedMemberSchema { - schemaUri?: string | undefined; - status?: string | undefined; - statusDetails?: string | undefined; - validFrom?: number | undefined; - validUntil?: number | undefined; + schemaUri?: string | undefined; + status?: string | undefined; + statusDetails?: string | undefined; + validFrom?: number | undefined; + validUntil?: number | undefined; } /** Request to get a member of the governance framework */ export interface GetMemberRequest { - /** DID URI of member to get */ - didUri?: string | undefined; - /** Trinsic Wallet ID of member to get */ - walletId?: string | undefined; - /** Email address of member to get. Must be associated with an existing Trinsic account. */ - email?: string | undefined; + /** DID URI of member to get */ + didUri?: + | string + | undefined; + /** Trinsic Wallet ID of member to get */ + walletId?: + | string + | undefined; + /** Email address of member to get. Must be associated with an existing Trinsic account. */ + email?: string | undefined; } /** Response to `GetMemberAuthorizationStatusRequest` */ export interface GetMemberResponse { - /** Member for given did in given framework */ - authorizedMember?: AuthorizedMember | undefined; + /** Member for given did in given framework */ + authorizedMember?: AuthorizedMember | undefined; } function createBaseRegisterMemberRequest(): RegisterMemberRequest { - return { - didUri: undefined, - walletId: undefined, - email: undefined, - schemaUri: "", - validFromUtc: 0, - validUntilUtc: 0, - }; + return { didUri: undefined, walletId: undefined, email: undefined, schemaUri: "", validFromUtc: 0, validUntilUtc: 0 }; } export const RegisterMemberRequest = { - encode( - message: RegisterMemberRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.didUri !== undefined) { - writer.uint32(10).string(message.didUri); - } - if (message.walletId !== undefined) { - writer.uint32(26).string(message.walletId); - } - if (message.email !== undefined) { - writer.uint32(34).string(message.email); - } - if (message.schemaUri !== undefined && message.schemaUri !== "") { - writer.uint32(82).string(message.schemaUri); - } - if (message.validFromUtc !== undefined && message.validFromUtc !== 0) { - writer.uint32(88).uint64(message.validFromUtc); - } - if ( - message.validUntilUtc !== undefined && - message.validUntilUtc !== 0 - ) { - writer.uint32(96).uint64(message.validUntilUtc); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): RegisterMemberRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRegisterMemberRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.didUri = reader.string(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.walletId = reader.string(); - continue; - case 4: - if (tag !== 34) { - break; - } - - message.email = reader.string(); - continue; - case 10: - if (tag !== 82) { - break; - } - - message.schemaUri = reader.string(); - continue; - case 11: - if (tag !== 88) { - break; - } - - message.validFromUtc = longToNumber( - reader.uint64() as Long, - ); - continue; - case 12: - if (tag !== 96) { - break; - } - - message.validUntilUtc = longToNumber( - reader.uint64() as Long, - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: RegisterMemberRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.didUri !== undefined) { + writer.uint32(10).string(message.didUri); + } + if (message.walletId !== undefined) { + writer.uint32(26).string(message.walletId); + } + if (message.email !== undefined) { + writer.uint32(34).string(message.email); + } + if (message.schemaUri !== undefined && message.schemaUri !== "") { + writer.uint32(82).string(message.schemaUri); + } + if (message.validFromUtc !== undefined && message.validFromUtc !== 0) { + writer.uint32(88).uint64(message.validFromUtc); + } + if (message.validUntilUtc !== undefined && message.validUntilUtc !== 0) { + writer.uint32(96).uint64(message.validUntilUtc); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): RegisterMemberRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseRegisterMemberRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - fromJSON(object: any): RegisterMemberRequest { - return { - didUri: isSet(object.didUri) ? String(object.didUri) : undefined, - walletId: isSet(object.walletId) - ? String(object.walletId) - : undefined, - email: isSet(object.email) ? String(object.email) : undefined, - schemaUri: isSet(object.schemaUri) ? String(object.schemaUri) : "", - validFromUtc: isSet(object.validFromUtc) - ? Number(object.validFromUtc) - : 0, - validUntilUtc: isSet(object.validUntilUtc) - ? Number(object.validUntilUtc) - : 0, - }; - }, + message.didUri = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.walletId = reader.string(); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.email = reader.string(); + continue; + case 10: + if (tag !== 82) { + break; + } + + message.schemaUri = reader.string(); + continue; + case 11: + if (tag !== 88) { + break; + } + + message.validFromUtc = longToNumber(reader.uint64() as Long); + continue; + case 12: + if (tag !== 96) { + break; + } + + message.validUntilUtc = longToNumber(reader.uint64() as Long); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: RegisterMemberRequest): unknown { - const obj: any = {}; - if (message.didUri !== undefined) { - obj.didUri = message.didUri; - } - if (message.walletId !== undefined) { - obj.walletId = message.walletId; - } - if (message.email !== undefined) { - obj.email = message.email; - } - if (message.schemaUri !== undefined && message.schemaUri !== "") { - obj.schemaUri = message.schemaUri; - } - if (message.validFromUtc !== undefined && message.validFromUtc !== 0) { - obj.validFromUtc = Math.round(message.validFromUtc); - } - if ( - message.validUntilUtc !== undefined && - message.validUntilUtc !== 0 - ) { - obj.validUntilUtc = Math.round(message.validUntilUtc); - } - return obj; - }, + fromJSON(object: any): RegisterMemberRequest { + return { + didUri: isSet(object.didUri) ? String(object.didUri) : undefined, + walletId: isSet(object.walletId) ? String(object.walletId) : undefined, + email: isSet(object.email) ? String(object.email) : undefined, + schemaUri: isSet(object.schemaUri) ? String(object.schemaUri) : "", + validFromUtc: isSet(object.validFromUtc) ? Number(object.validFromUtc) : 0, + validUntilUtc: isSet(object.validUntilUtc) ? Number(object.validUntilUtc) : 0, + }; + }, - create(base?: DeepPartial): RegisterMemberRequest { - return RegisterMemberRequest.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): RegisterMemberRequest { - const message = createBaseRegisterMemberRequest(); - message.didUri = object.didUri ?? undefined; - message.walletId = object.walletId ?? undefined; - message.email = object.email ?? undefined; - message.schemaUri = object.schemaUri ?? ""; - message.validFromUtc = object.validFromUtc ?? 0; - message.validUntilUtc = object.validUntilUtc ?? 0; - return message; - }, + toJSON(message: RegisterMemberRequest): unknown { + const obj: any = {}; + if (message.didUri !== undefined) { + obj.didUri = message.didUri; + } + if (message.walletId !== undefined) { + obj.walletId = message.walletId; + } + if (message.email !== undefined) { + obj.email = message.email; + } + if (message.schemaUri !== undefined && message.schemaUri !== "") { + obj.schemaUri = message.schemaUri; + } + if (message.validFromUtc !== undefined && message.validFromUtc !== 0) { + obj.validFromUtc = Math.round(message.validFromUtc); + } + if (message.validUntilUtc !== undefined && message.validUntilUtc !== 0) { + obj.validUntilUtc = Math.round(message.validUntilUtc); + } + return obj; + }, + + create(base?: DeepPartial): RegisterMemberRequest { + return RegisterMemberRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): RegisterMemberRequest { + const message = createBaseRegisterMemberRequest(); + message.didUri = object.didUri ?? undefined; + message.walletId = object.walletId ?? undefined; + message.email = object.email ?? undefined; + message.schemaUri = object.schemaUri ?? ""; + message.validFromUtc = object.validFromUtc ?? 0; + message.validUntilUtc = object.validUntilUtc ?? 0; + return message; + }, }; function createBaseRegisterMemberResponse(): RegisterMemberResponse { - return {}; + return {}; } export const RegisterMemberResponse = { - encode( - _: RegisterMemberResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): RegisterMemberResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRegisterMemberResponse(); - 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): RegisterMemberResponse { - return {}; - }, - - toJSON(_: RegisterMemberResponse): unknown { - const obj: any = {}; - return obj; - }, + encode(_: RegisterMemberResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): RegisterMemberResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseRegisterMemberResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - create(base?: DeepPartial): RegisterMemberResponse { - return RegisterMemberResponse.fromPartial(base ?? {}); - }, - fromPartial( - _: DeepPartial, - ): RegisterMemberResponse { - const message = createBaseRegisterMemberResponse(); - return message; - }, + fromJSON(_: any): RegisterMemberResponse { + return {}; + }, + + toJSON(_: RegisterMemberResponse): unknown { + const obj: any = {}; + return obj; + }, + + create(base?: DeepPartial): RegisterMemberResponse { + return RegisterMemberResponse.fromPartial(base ?? {}); + }, + fromPartial(_: DeepPartial): RegisterMemberResponse { + const message = createBaseRegisterMemberResponse(); + return message; + }, }; function createBaseUnregisterMemberRequest(): UnregisterMemberRequest { - return { - didUri: undefined, - walletId: undefined, - email: undefined, - schemaUri: "", - }; + return { didUri: undefined, walletId: undefined, email: undefined, schemaUri: "" }; } export const UnregisterMemberRequest = { - encode( - message: UnregisterMemberRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.didUri !== undefined) { - writer.uint32(10).string(message.didUri); - } - if (message.walletId !== undefined) { - writer.uint32(26).string(message.walletId); - } - if (message.email !== undefined) { - writer.uint32(34).string(message.email); - } - if (message.schemaUri !== undefined && message.schemaUri !== "") { - writer.uint32(82).string(message.schemaUri); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): UnregisterMemberRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUnregisterMemberRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.didUri = reader.string(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.walletId = reader.string(); - continue; - case 4: - if (tag !== 34) { - break; - } - - message.email = reader.string(); - continue; - case 10: - if (tag !== 82) { - break; - } - - message.schemaUri = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: UnregisterMemberRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.didUri !== undefined) { + writer.uint32(10).string(message.didUri); + } + if (message.walletId !== undefined) { + writer.uint32(26).string(message.walletId); + } + if (message.email !== undefined) { + writer.uint32(34).string(message.email); + } + if (message.schemaUri !== undefined && message.schemaUri !== "") { + writer.uint32(82).string(message.schemaUri); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): UnregisterMemberRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUnregisterMemberRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - fromJSON(object: any): UnregisterMemberRequest { - return { - didUri: isSet(object.didUri) ? String(object.didUri) : undefined, - walletId: isSet(object.walletId) - ? String(object.walletId) - : undefined, - email: isSet(object.email) ? String(object.email) : undefined, - schemaUri: isSet(object.schemaUri) ? String(object.schemaUri) : "", - }; - }, + message.didUri = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.walletId = reader.string(); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.email = reader.string(); + continue; + case 10: + if (tag !== 82) { + break; + } + + message.schemaUri = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: UnregisterMemberRequest): unknown { - const obj: any = {}; - if (message.didUri !== undefined) { - obj.didUri = message.didUri; - } - if (message.walletId !== undefined) { - obj.walletId = message.walletId; - } - if (message.email !== undefined) { - obj.email = message.email; - } - if (message.schemaUri !== undefined && message.schemaUri !== "") { - obj.schemaUri = message.schemaUri; - } - return obj; - }, + fromJSON(object: any): UnregisterMemberRequest { + return { + didUri: isSet(object.didUri) ? String(object.didUri) : undefined, + walletId: isSet(object.walletId) ? String(object.walletId) : undefined, + email: isSet(object.email) ? String(object.email) : undefined, + schemaUri: isSet(object.schemaUri) ? String(object.schemaUri) : "", + }; + }, - create( - base?: DeepPartial, - ): UnregisterMemberRequest { - return UnregisterMemberRequest.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): UnregisterMemberRequest { - const message = createBaseUnregisterMemberRequest(); - message.didUri = object.didUri ?? undefined; - message.walletId = object.walletId ?? undefined; - message.email = object.email ?? undefined; - message.schemaUri = object.schemaUri ?? ""; - return message; - }, + toJSON(message: UnregisterMemberRequest): unknown { + const obj: any = {}; + if (message.didUri !== undefined) { + obj.didUri = message.didUri; + } + if (message.walletId !== undefined) { + obj.walletId = message.walletId; + } + if (message.email !== undefined) { + obj.email = message.email; + } + if (message.schemaUri !== undefined && message.schemaUri !== "") { + obj.schemaUri = message.schemaUri; + } + return obj; + }, + + create(base?: DeepPartial): UnregisterMemberRequest { + return UnregisterMemberRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): UnregisterMemberRequest { + const message = createBaseUnregisterMemberRequest(); + message.didUri = object.didUri ?? undefined; + message.walletId = object.walletId ?? undefined; + message.email = object.email ?? undefined; + message.schemaUri = object.schemaUri ?? ""; + return message; + }, }; function createBaseUnregisterMemberResponse(): UnregisterMemberResponse { - return {}; + return {}; } export const UnregisterMemberResponse = { - encode( - _: UnregisterMemberResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): UnregisterMemberResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUnregisterMemberResponse(); - 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): UnregisterMemberResponse { - return {}; - }, - - toJSON(_: UnregisterMemberResponse): unknown { - const obj: any = {}; - return obj; - }, + encode(_: UnregisterMemberResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): UnregisterMemberResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUnregisterMemberResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - create( - base?: DeepPartial, - ): UnregisterMemberResponse { - return UnregisterMemberResponse.fromPartial(base ?? {}); - }, - fromPartial( - _: DeepPartial, - ): UnregisterMemberResponse { - const message = createBaseUnregisterMemberResponse(); - return message; - }, + fromJSON(_: any): UnregisterMemberResponse { + return {}; + }, + + toJSON(_: UnregisterMemberResponse): unknown { + const obj: any = {}; + return obj; + }, + + create(base?: DeepPartial): UnregisterMemberResponse { + return UnregisterMemberResponse.fromPartial(base ?? {}); + }, + fromPartial(_: DeepPartial): UnregisterMemberResponse { + const message = createBaseUnregisterMemberResponse(); + return message; + }, }; function createBaseGetMemberAuthorizationStatusRequest(): GetMemberAuthorizationStatusRequest { - return { didUri: "", schemaUri: "" }; + return { didUri: "", schemaUri: "" }; } export const GetMemberAuthorizationStatusRequest = { - encode( - message: GetMemberAuthorizationStatusRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.didUri !== undefined && message.didUri !== "") { - writer.uint32(10).string(message.didUri); - } - if (message.schemaUri !== undefined && message.schemaUri !== "") { - writer.uint32(18).string(message.schemaUri); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): GetMemberAuthorizationStatusRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetMemberAuthorizationStatusRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.didUri = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.schemaUri = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: GetMemberAuthorizationStatusRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.didUri !== undefined && message.didUri !== "") { + writer.uint32(10).string(message.didUri); + } + if (message.schemaUri !== undefined && message.schemaUri !== "") { + writer.uint32(18).string(message.schemaUri); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): GetMemberAuthorizationStatusRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGetMemberAuthorizationStatusRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - fromJSON(object: any): GetMemberAuthorizationStatusRequest { - return { - didUri: isSet(object.didUri) ? String(object.didUri) : "", - schemaUri: isSet(object.schemaUri) ? String(object.schemaUri) : "", - }; - }, + message.didUri = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.schemaUri = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: GetMemberAuthorizationStatusRequest): unknown { - const obj: any = {}; - if (message.didUri !== undefined && message.didUri !== "") { - obj.didUri = message.didUri; - } - if (message.schemaUri !== undefined && message.schemaUri !== "") { - obj.schemaUri = message.schemaUri; - } - return obj; - }, + fromJSON(object: any): GetMemberAuthorizationStatusRequest { + return { + didUri: isSet(object.didUri) ? String(object.didUri) : "", + schemaUri: isSet(object.schemaUri) ? String(object.schemaUri) : "", + }; + }, - create( - base?: DeepPartial, - ): GetMemberAuthorizationStatusRequest { - return GetMemberAuthorizationStatusRequest.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): GetMemberAuthorizationStatusRequest { - const message = createBaseGetMemberAuthorizationStatusRequest(); - message.didUri = object.didUri ?? ""; - message.schemaUri = object.schemaUri ?? ""; - return message; - }, + toJSON(message: GetMemberAuthorizationStatusRequest): unknown { + const obj: any = {}; + if (message.didUri !== undefined && message.didUri !== "") { + obj.didUri = message.didUri; + } + if (message.schemaUri !== undefined && message.schemaUri !== "") { + obj.schemaUri = message.schemaUri; + } + return obj; + }, + + create(base?: DeepPartial): GetMemberAuthorizationStatusRequest { + return GetMemberAuthorizationStatusRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): GetMemberAuthorizationStatusRequest { + const message = createBaseGetMemberAuthorizationStatusRequest(); + message.didUri = object.didUri ?? ""; + message.schemaUri = object.schemaUri ?? ""; + return message; + }, }; function createBaseGetMemberAuthorizationStatusResponse(): GetMemberAuthorizationStatusResponse { - return { status: 0 }; + return { status: 0 }; } export const GetMemberAuthorizationStatusResponse = { - encode( - message: GetMemberAuthorizationStatusResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.status !== undefined && message.status !== 0) { - writer.uint32(8).int32(message.status); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): GetMemberAuthorizationStatusResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetMemberAuthorizationStatusResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.status = reader.int32() as any; - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): GetMemberAuthorizationStatusResponse { - return { - status: isSet(object.status) - ? registrationStatusFromJSON(object.status) - : 0, - }; - }, + encode(message: GetMemberAuthorizationStatusResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.status !== undefined && message.status !== 0) { + writer.uint32(8).int32(message.status); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): GetMemberAuthorizationStatusResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGetMemberAuthorizationStatusResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.status = reader.int32() as any; + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: GetMemberAuthorizationStatusResponse): unknown { - const obj: any = {}; - if (message.status !== undefined && message.status !== 0) { - obj.status = registrationStatusToJSON(message.status); - } - return obj; - }, + fromJSON(object: any): GetMemberAuthorizationStatusResponse { + return { status: isSet(object.status) ? registrationStatusFromJSON(object.status) : 0 }; + }, - create( - base?: DeepPartial, - ): GetMemberAuthorizationStatusResponse { - return GetMemberAuthorizationStatusResponse.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): GetMemberAuthorizationStatusResponse { - const message = createBaseGetMemberAuthorizationStatusResponse(); - message.status = object.status ?? 0; - return message; - }, + toJSON(message: GetMemberAuthorizationStatusResponse): unknown { + const obj: any = {}; + if (message.status !== undefined && message.status !== 0) { + obj.status = registrationStatusToJSON(message.status); + } + return obj; + }, + + create(base?: DeepPartial): GetMemberAuthorizationStatusResponse { + return GetMemberAuthorizationStatusResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): GetMemberAuthorizationStatusResponse { + const message = createBaseGetMemberAuthorizationStatusResponse(); + message.status = object.status ?? 0; + return message; + }, }; function createBaseListAuthorizedMembersRequest(): ListAuthorizedMembersRequest { - return { schemaUri: undefined, continuationToken: undefined }; + return { schemaUri: undefined, continuationToken: undefined }; } export const ListAuthorizedMembersRequest = { - encode( - message: ListAuthorizedMembersRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.schemaUri !== undefined) { - writer.uint32(10).string(message.schemaUri); - } - if (message.continuationToken !== undefined) { - writer.uint32(18).string(message.continuationToken); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): ListAuthorizedMembersRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseListAuthorizedMembersRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.schemaUri = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.continuationToken = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: ListAuthorizedMembersRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.schemaUri !== undefined) { + writer.uint32(10).string(message.schemaUri); + } + if (message.continuationToken !== undefined) { + writer.uint32(18).string(message.continuationToken); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ListAuthorizedMembersRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseListAuthorizedMembersRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - fromJSON(object: any): ListAuthorizedMembersRequest { - return { - schemaUri: isSet(object.schemaUri) - ? String(object.schemaUri) - : undefined, - continuationToken: isSet(object.continuationToken) - ? String(object.continuationToken) - : undefined, - }; - }, + message.schemaUri = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.continuationToken = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: ListAuthorizedMembersRequest): unknown { - const obj: any = {}; - if (message.schemaUri !== undefined) { - obj.schemaUri = message.schemaUri; - } - if (message.continuationToken !== undefined) { - obj.continuationToken = message.continuationToken; - } - return obj; - }, + fromJSON(object: any): ListAuthorizedMembersRequest { + return { + schemaUri: isSet(object.schemaUri) ? String(object.schemaUri) : undefined, + continuationToken: isSet(object.continuationToken) ? String(object.continuationToken) : undefined, + }; + }, - create( - base?: DeepPartial, - ): ListAuthorizedMembersRequest { - return ListAuthorizedMembersRequest.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): ListAuthorizedMembersRequest { - const message = createBaseListAuthorizedMembersRequest(); - message.schemaUri = object.schemaUri ?? undefined; - message.continuationToken = object.continuationToken ?? undefined; - return message; - }, + toJSON(message: ListAuthorizedMembersRequest): unknown { + const obj: any = {}; + if (message.schemaUri !== undefined) { + obj.schemaUri = message.schemaUri; + } + if (message.continuationToken !== undefined) { + obj.continuationToken = message.continuationToken; + } + return obj; + }, + + create(base?: DeepPartial): ListAuthorizedMembersRequest { + return ListAuthorizedMembersRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): ListAuthorizedMembersRequest { + const message = createBaseListAuthorizedMembersRequest(); + message.schemaUri = object.schemaUri ?? undefined; + message.continuationToken = object.continuationToken ?? undefined; + return message; + }, }; function createBaseListAuthorizedMembersResponse(): ListAuthorizedMembersResponse { - return { - authorizedMembers: [], - hasMoreResults: false, - continuationToken: "", - }; + return { authorizedMembers: [], hasMoreResults: false, continuationToken: "" }; } export const ListAuthorizedMembersResponse = { - encode( - message: ListAuthorizedMembersResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if ( - message.authorizedMembers !== undefined && - message.authorizedMembers.length !== 0 - ) { - for (const v of message.authorizedMembers) { - AuthorizedMember.encode(v!, writer.uint32(10).fork()).ldelim(); - } - } - if (message.hasMoreResults === true) { - writer.uint32(16).bool(message.hasMoreResults); - } - if ( - message.continuationToken !== undefined && - message.continuationToken !== "" - ) { - writer.uint32(26).string(message.continuationToken); - } - return writer; - }, + encode(message: ListAuthorizedMembersResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.authorizedMembers !== undefined && message.authorizedMembers.length !== 0) { + for (const v of message.authorizedMembers) { + AuthorizedMember.encode(v!, writer.uint32(10).fork()).ldelim(); + } + } + if (message.hasMoreResults === true) { + writer.uint32(16).bool(message.hasMoreResults); + } + if (message.continuationToken !== undefined && message.continuationToken !== "") { + writer.uint32(26).string(message.continuationToken); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ListAuthorizedMembersResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseListAuthorizedMembersResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): ListAuthorizedMembersResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseListAuthorizedMembersResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.authorizedMembers!.push( - AuthorizedMember.decode(reader, reader.uint32()), - ); - continue; - case 2: - if (tag !== 16) { - break; - } - - message.hasMoreResults = reader.bool(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.continuationToken = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + message.authorizedMembers!.push(AuthorizedMember.decode(reader, reader.uint32())); + continue; + case 2: + if (tag !== 16) { + break; + } - fromJSON(object: any): ListAuthorizedMembersResponse { - return { - authorizedMembers: Array.isArray(object?.authorizedMembers) - ? object.authorizedMembers.map((e: any) => - AuthorizedMember.fromJSON(e), - ) - : [], - hasMoreResults: isSet(object.hasMoreResults) - ? Boolean(object.hasMoreResults) - : false, - continuationToken: isSet(object.continuationToken) - ? String(object.continuationToken) - : "", - }; - }, + message.hasMoreResults = reader.bool(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.continuationToken = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: ListAuthorizedMembersResponse): unknown { - const obj: any = {}; - if (message.authorizedMembers?.length) { - obj.authorizedMembers = message.authorizedMembers.map((e) => - AuthorizedMember.toJSON(e), - ); - } - if (message.hasMoreResults === true) { - obj.hasMoreResults = message.hasMoreResults; - } - if ( - message.continuationToken !== undefined && - message.continuationToken !== "" - ) { - obj.continuationToken = message.continuationToken; - } - return obj; - }, + fromJSON(object: any): ListAuthorizedMembersResponse { + return { + authorizedMembers: Array.isArray(object?.authorizedMembers) + ? object.authorizedMembers.map((e: any) => AuthorizedMember.fromJSON(e)) + : [], + hasMoreResults: isSet(object.hasMoreResults) ? Boolean(object.hasMoreResults) : false, + continuationToken: isSet(object.continuationToken) ? String(object.continuationToken) : "", + }; + }, - create( - base?: DeepPartial, - ): ListAuthorizedMembersResponse { - return ListAuthorizedMembersResponse.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): ListAuthorizedMembersResponse { - const message = createBaseListAuthorizedMembersResponse(); - message.authorizedMembers = - object.authorizedMembers?.map((e) => - AuthorizedMember.fromPartial(e), - ) || []; - message.hasMoreResults = object.hasMoreResults ?? false; - message.continuationToken = object.continuationToken ?? ""; - return message; - }, + toJSON(message: ListAuthorizedMembersResponse): unknown { + const obj: any = {}; + if (message.authorizedMembers?.length) { + obj.authorizedMembers = message.authorizedMembers.map((e) => AuthorizedMember.toJSON(e)); + } + if (message.hasMoreResults === true) { + obj.hasMoreResults = message.hasMoreResults; + } + if (message.continuationToken !== undefined && message.continuationToken !== "") { + obj.continuationToken = message.continuationToken; + } + return obj; + }, + + create(base?: DeepPartial): ListAuthorizedMembersResponse { + return ListAuthorizedMembersResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): ListAuthorizedMembersResponse { + const message = createBaseListAuthorizedMembersResponse(); + message.authorizedMembers = object.authorizedMembers?.map((e) => AuthorizedMember.fromPartial(e)) || []; + message.hasMoreResults = object.hasMoreResults ?? false; + message.continuationToken = object.continuationToken ?? ""; + return message; + }, }; function createBaseAuthorizedMember(): AuthorizedMember { - return { did: "", authorizedMemberSchemas: [] }; + return { did: "", authorizedMemberSchemas: [] }; } export const AuthorizedMember = { - encode( - message: AuthorizedMember, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.did !== undefined && message.did !== "") { - writer.uint32(10).string(message.did); - } - if ( - message.authorizedMemberSchemas !== undefined && - message.authorizedMemberSchemas.length !== 0 - ) { - for (const v of message.authorizedMemberSchemas) { - AuthorizedMemberSchema.encode( - v!, - writer.uint32(18).fork(), - ).ldelim(); - } - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): AuthorizedMember { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAuthorizedMember(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.did = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.authorizedMemberSchemas!.push( - AuthorizedMemberSchema.decode(reader, reader.uint32()), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: AuthorizedMember, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.did !== undefined && message.did !== "") { + writer.uint32(10).string(message.did); + } + if (message.authorizedMemberSchemas !== undefined && message.authorizedMemberSchemas.length !== 0) { + for (const v of message.authorizedMemberSchemas) { + AuthorizedMemberSchema.encode(v!, writer.uint32(18).fork()).ldelim(); + } + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): AuthorizedMember { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAuthorizedMember(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - fromJSON(object: any): AuthorizedMember { - return { - did: isSet(object.did) ? String(object.did) : "", - authorizedMemberSchemas: Array.isArray( - object?.authorizedMemberSchemas, - ) - ? object.authorizedMemberSchemas.map((e: any) => - AuthorizedMemberSchema.fromJSON(e), - ) - : [], - }; - }, + message.did = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.authorizedMemberSchemas!.push(AuthorizedMemberSchema.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: AuthorizedMember): unknown { - const obj: any = {}; - if (message.did !== undefined && message.did !== "") { - obj.did = message.did; - } - if (message.authorizedMemberSchemas?.length) { - obj.authorizedMemberSchemas = message.authorizedMemberSchemas.map( - (e) => AuthorizedMemberSchema.toJSON(e), - ); - } - return obj; - }, + fromJSON(object: any): AuthorizedMember { + return { + did: isSet(object.did) ? String(object.did) : "", + authorizedMemberSchemas: Array.isArray(object?.authorizedMemberSchemas) + ? object.authorizedMemberSchemas.map((e: any) => AuthorizedMemberSchema.fromJSON(e)) + : [], + }; + }, - create(base?: DeepPartial): AuthorizedMember { - return AuthorizedMember.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): AuthorizedMember { - const message = createBaseAuthorizedMember(); - message.did = object.did ?? ""; - message.authorizedMemberSchemas = - object.authorizedMemberSchemas?.map((e) => - AuthorizedMemberSchema.fromPartial(e), - ) || []; - return message; - }, + toJSON(message: AuthorizedMember): unknown { + const obj: any = {}; + if (message.did !== undefined && message.did !== "") { + obj.did = message.did; + } + if (message.authorizedMemberSchemas?.length) { + obj.authorizedMemberSchemas = message.authorizedMemberSchemas.map((e) => AuthorizedMemberSchema.toJSON(e)); + } + return obj; + }, + + create(base?: DeepPartial): AuthorizedMember { + return AuthorizedMember.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): AuthorizedMember { + const message = createBaseAuthorizedMember(); + message.did = object.did ?? ""; + message.authorizedMemberSchemas = + object.authorizedMemberSchemas?.map((e) => AuthorizedMemberSchema.fromPartial(e)) || []; + return message; + }, }; function createBaseAuthorizedMemberSchema(): AuthorizedMemberSchema { - return { - schemaUri: "", - status: "", - statusDetails: "", - validFrom: 0, - validUntil: 0, - }; + return { schemaUri: "", status: "", statusDetails: "", validFrom: 0, validUntil: 0 }; } export const AuthorizedMemberSchema = { - encode( - message: AuthorizedMemberSchema, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.schemaUri !== undefined && message.schemaUri !== "") { - writer.uint32(10).string(message.schemaUri); - } - if (message.status !== undefined && message.status !== "") { - writer.uint32(18).string(message.status); - } - if ( - message.statusDetails !== undefined && - message.statusDetails !== "" - ) { - writer.uint32(26).string(message.statusDetails); - } - if (message.validFrom !== undefined && message.validFrom !== 0) { - writer.uint32(32).uint64(message.validFrom); - } - if (message.validUntil !== undefined && message.validUntil !== 0) { - writer.uint32(40).uint64(message.validUntil); - } - return writer; - }, + encode(message: AuthorizedMemberSchema, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.schemaUri !== undefined && message.schemaUri !== "") { + writer.uint32(10).string(message.schemaUri); + } + if (message.status !== undefined && message.status !== "") { + writer.uint32(18).string(message.status); + } + if (message.statusDetails !== undefined && message.statusDetails !== "") { + writer.uint32(26).string(message.statusDetails); + } + if (message.validFrom !== undefined && message.validFrom !== 0) { + writer.uint32(32).uint64(message.validFrom); + } + if (message.validUntil !== undefined && message.validUntil !== 0) { + writer.uint32(40).uint64(message.validUntil); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): AuthorizedMemberSchema { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAuthorizedMemberSchema(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): AuthorizedMemberSchema { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAuthorizedMemberSchema(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.schemaUri = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.status = reader.string(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.statusDetails = reader.string(); - continue; - case 4: - if (tag !== 32) { - break; - } - - message.validFrom = longToNumber(reader.uint64() as Long); - continue; - case 5: - if (tag !== 40) { - break; - } - - message.validUntil = longToNumber(reader.uint64() as Long); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + message.schemaUri = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } - fromJSON(object: any): AuthorizedMemberSchema { - return { - schemaUri: isSet(object.schemaUri) ? String(object.schemaUri) : "", - status: isSet(object.status) ? String(object.status) : "", - statusDetails: isSet(object.statusDetails) - ? String(object.statusDetails) - : "", - validFrom: isSet(object.validFrom) ? Number(object.validFrom) : 0, - validUntil: isSet(object.validUntil) - ? Number(object.validUntil) - : 0, - }; - }, + message.status = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.statusDetails = reader.string(); + continue; + case 4: + if (tag !== 32) { + break; + } + + message.validFrom = longToNumber(reader.uint64() as Long); + continue; + case 5: + if (tag !== 40) { + break; + } + + message.validUntil = longToNumber(reader.uint64() as Long); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: AuthorizedMemberSchema): unknown { - const obj: any = {}; - if (message.schemaUri !== undefined && message.schemaUri !== "") { - obj.schemaUri = message.schemaUri; - } - if (message.status !== undefined && message.status !== "") { - obj.status = message.status; - } - if ( - message.statusDetails !== undefined && - message.statusDetails !== "" - ) { - obj.statusDetails = message.statusDetails; - } - if (message.validFrom !== undefined && message.validFrom !== 0) { - obj.validFrom = Math.round(message.validFrom); - } - if (message.validUntil !== undefined && message.validUntil !== 0) { - obj.validUntil = Math.round(message.validUntil); - } - return obj; - }, + fromJSON(object: any): AuthorizedMemberSchema { + return { + schemaUri: isSet(object.schemaUri) ? String(object.schemaUri) : "", + status: isSet(object.status) ? String(object.status) : "", + statusDetails: isSet(object.statusDetails) ? String(object.statusDetails) : "", + validFrom: isSet(object.validFrom) ? Number(object.validFrom) : 0, + validUntil: isSet(object.validUntil) ? Number(object.validUntil) : 0, + }; + }, - create(base?: DeepPartial): AuthorizedMemberSchema { - return AuthorizedMemberSchema.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): AuthorizedMemberSchema { - const message = createBaseAuthorizedMemberSchema(); - message.schemaUri = object.schemaUri ?? ""; - message.status = object.status ?? ""; - message.statusDetails = object.statusDetails ?? ""; - message.validFrom = object.validFrom ?? 0; - message.validUntil = object.validUntil ?? 0; - return message; - }, + toJSON(message: AuthorizedMemberSchema): unknown { + const obj: any = {}; + if (message.schemaUri !== undefined && message.schemaUri !== "") { + obj.schemaUri = message.schemaUri; + } + if (message.status !== undefined && message.status !== "") { + obj.status = message.status; + } + if (message.statusDetails !== undefined && message.statusDetails !== "") { + obj.statusDetails = message.statusDetails; + } + if (message.validFrom !== undefined && message.validFrom !== 0) { + obj.validFrom = Math.round(message.validFrom); + } + if (message.validUntil !== undefined && message.validUntil !== 0) { + obj.validUntil = Math.round(message.validUntil); + } + return obj; + }, + + create(base?: DeepPartial): AuthorizedMemberSchema { + return AuthorizedMemberSchema.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): AuthorizedMemberSchema { + const message = createBaseAuthorizedMemberSchema(); + message.schemaUri = object.schemaUri ?? ""; + message.status = object.status ?? ""; + message.statusDetails = object.statusDetails ?? ""; + message.validFrom = object.validFrom ?? 0; + message.validUntil = object.validUntil ?? 0; + return message; + }, }; function createBaseGetMemberRequest(): GetMemberRequest { - return { didUri: undefined, walletId: undefined, email: undefined }; + return { didUri: undefined, walletId: undefined, email: undefined }; } export const GetMemberRequest = { - encode( - message: GetMemberRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.didUri !== undefined) { - writer.uint32(10).string(message.didUri); - } - if (message.walletId !== undefined) { - writer.uint32(26).string(message.walletId); - } - if (message.email !== undefined) { - writer.uint32(34).string(message.email); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): GetMemberRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetMemberRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.didUri = reader.string(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.walletId = reader.string(); - continue; - case 4: - if (tag !== 34) { - break; - } - - message.email = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: GetMemberRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.didUri !== undefined) { + writer.uint32(10).string(message.didUri); + } + if (message.walletId !== undefined) { + writer.uint32(26).string(message.walletId); + } + if (message.email !== undefined) { + writer.uint32(34).string(message.email); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): GetMemberRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGetMemberRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - fromJSON(object: any): GetMemberRequest { - return { - didUri: isSet(object.didUri) ? String(object.didUri) : undefined, - walletId: isSet(object.walletId) - ? String(object.walletId) - : undefined, - email: isSet(object.email) ? String(object.email) : undefined, - }; - }, + message.didUri = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.walletId = reader.string(); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.email = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: GetMemberRequest): unknown { - const obj: any = {}; - if (message.didUri !== undefined) { - obj.didUri = message.didUri; - } - if (message.walletId !== undefined) { - obj.walletId = message.walletId; - } - if (message.email !== undefined) { - obj.email = message.email; - } - return obj; - }, + fromJSON(object: any): GetMemberRequest { + return { + didUri: isSet(object.didUri) ? String(object.didUri) : undefined, + walletId: isSet(object.walletId) ? String(object.walletId) : undefined, + email: isSet(object.email) ? String(object.email) : undefined, + }; + }, - create(base?: DeepPartial): GetMemberRequest { - return GetMemberRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): GetMemberRequest { - const message = createBaseGetMemberRequest(); - message.didUri = object.didUri ?? undefined; - message.walletId = object.walletId ?? undefined; - message.email = object.email ?? undefined; - return message; - }, + toJSON(message: GetMemberRequest): unknown { + const obj: any = {}; + if (message.didUri !== undefined) { + obj.didUri = message.didUri; + } + if (message.walletId !== undefined) { + obj.walletId = message.walletId; + } + if (message.email !== undefined) { + obj.email = message.email; + } + return obj; + }, + + create(base?: DeepPartial): GetMemberRequest { + return GetMemberRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): GetMemberRequest { + const message = createBaseGetMemberRequest(); + message.didUri = object.didUri ?? undefined; + message.walletId = object.walletId ?? undefined; + message.email = object.email ?? undefined; + return message; + }, }; function createBaseGetMemberResponse(): GetMemberResponse { - return { authorizedMember: undefined }; + return { authorizedMember: undefined }; } export const GetMemberResponse = { - encode( - message: GetMemberResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.authorizedMember !== undefined) { - AuthorizedMember.encode( - message.authorizedMember, - writer.uint32(10).fork(), - ).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): GetMemberResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetMemberResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.authorizedMember = AuthorizedMember.decode( - reader, - reader.uint32(), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): GetMemberResponse { - return { - authorizedMember: isSet(object.authorizedMember) - ? AuthorizedMember.fromJSON(object.authorizedMember) - : undefined, - }; - }, + encode(message: GetMemberResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.authorizedMember !== undefined) { + AuthorizedMember.encode(message.authorizedMember, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): GetMemberResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGetMemberResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.authorizedMember = AuthorizedMember.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: GetMemberResponse): unknown { - const obj: any = {}; - if (message.authorizedMember !== undefined) { - obj.authorizedMember = AuthorizedMember.toJSON( - message.authorizedMember, - ); - } - return obj; - }, + fromJSON(object: any): GetMemberResponse { + return { + authorizedMember: isSet(object.authorizedMember) ? AuthorizedMember.fromJSON(object.authorizedMember) : undefined, + }; + }, - create(base?: DeepPartial): GetMemberResponse { - return GetMemberResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): GetMemberResponse { - const message = createBaseGetMemberResponse(); - message.authorizedMember = - object.authorizedMember !== undefined && - object.authorizedMember !== null - ? AuthorizedMember.fromPartial(object.authorizedMember) - : undefined; - return message; - }, + toJSON(message: GetMemberResponse): unknown { + const obj: any = {}; + if (message.authorizedMember !== undefined) { + obj.authorizedMember = AuthorizedMember.toJSON(message.authorizedMember); + } + return obj; + }, + + create(base?: DeepPartial): GetMemberResponse { + return GetMemberResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): GetMemberResponse { + const message = createBaseGetMemberResponse(); + message.authorizedMember = (object.authorizedMember !== undefined && object.authorizedMember !== null) + ? AuthorizedMember.fromPartial(object.authorizedMember) + : undefined; + return message; + }, }; export type TrustRegistryDefinition = typeof TrustRegistryDefinition; export const TrustRegistryDefinition = { - name: "TrustRegistry", - fullName: "services.trustregistry.v1.TrustRegistry", - methods: { - /** Register an authoritative issuer for a credential schema */ - registerMember: { - name: "RegisterMember", - requestType: RegisterMemberRequest, - requestStream: false, - responseType: RegisterMemberResponse, - responseStream: false, - options: {}, - }, - /** Removes an authoritative issuer for a credential schema from the trust registry */ - unregisterMember: { - name: "UnregisterMember", - requestType: UnregisterMemberRequest, - requestStream: false, - responseType: UnregisterMemberResponse, - responseStream: false, - options: {}, - }, - /** Fetch the status of a member for a given credential schema in a trust registry */ - getMemberAuthorizationStatus: { - name: "GetMemberAuthorizationStatus", - requestType: GetMemberAuthorizationStatusRequest, - requestStream: false, - responseType: GetMemberAuthorizationStatusResponse, - responseStream: false, - options: {}, - }, - /** Fetch the ecosystem's authorized issuers and the respective templates against which it can issue */ - listAuthorizedMembers: { - name: "ListAuthorizedMembers", - requestType: ListAuthorizedMembersRequest, - requestStream: false, - responseType: ListAuthorizedMembersResponse, - responseStream: false, - options: {}, - }, - /** Get member for a given did in a trust registry */ - getMember: { - name: "GetMember", - requestType: GetMemberRequest, - requestStream: false, - responseType: GetMemberResponse, - responseStream: false, - options: {}, - }, - }, + name: "TrustRegistry", + fullName: "services.trustregistry.v1.TrustRegistry", + methods: { + /** Register an authoritative issuer for a credential schema */ + registerMember: { + name: "RegisterMember", + requestType: RegisterMemberRequest, + requestStream: false, + responseType: RegisterMemberResponse, + responseStream: false, + options: {}, + }, + /** Removes an authoritative issuer for a credential schema from the trust registry */ + unregisterMember: { + name: "UnregisterMember", + requestType: UnregisterMemberRequest, + requestStream: false, + responseType: UnregisterMemberResponse, + responseStream: false, + options: {}, + }, + /** Fetch the status of a member for a given credential schema in a trust registry */ + getMemberAuthorizationStatus: { + name: "GetMemberAuthorizationStatus", + requestType: GetMemberAuthorizationStatusRequest, + requestStream: false, + responseType: GetMemberAuthorizationStatusResponse, + responseStream: false, + options: {}, + }, + /** Fetch the ecosystem's authorized issuers and the respective templates against which it can issue */ + listAuthorizedMembers: { + name: "ListAuthorizedMembers", + requestType: ListAuthorizedMembersRequest, + requestStream: false, + responseType: ListAuthorizedMembersResponse, + responseStream: false, + options: {}, + }, + /** Get member for a given did in a trust registry */ + getMember: { + name: "GetMember", + requestType: GetMemberRequest, + requestStream: false, + responseType: GetMemberResponse, + responseStream: false, + options: {}, + }, + }, } as const; declare const self: any | undefined; declare const window: any | undefined; declare const global: any | undefined; const tsProtoGlobalThis: any = (() => { - if (typeof globalThis !== "undefined") { - return globalThis; - } - if (typeof self !== "undefined") { - return self; - } - if (typeof window !== "undefined") { - return window; - } - if (typeof global !== "undefined") { - return global; - } - throw "Unable to locate global object"; + if (typeof globalThis !== "undefined") { + return globalThis; + } + if (typeof self !== "undefined") { + return self; + } + if (typeof window !== "undefined") { + return window; + } + if (typeof global !== "undefined") { + return global; + } + throw "Unable to locate global object"; })(); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new tsProtoGlobalThis.Error( - "Value is larger than Number.MAX_SAFE_INTEGER", - ); - } - return long.toNumber(); + if (long.gt(Number.MAX_SAFE_INTEGER)) { + throw new tsProtoGlobalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); + } + return long.toNumber(); } if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); + _m0.util.Long = Long as any; + _m0.configure(); } function isSet(value: any): boolean { - return value !== null && value !== undefined; + return value !== null && value !== undefined; } diff --git a/web/src/proto/services/universal-wallet/v1/universal-wallet.ts b/web/src/proto/services/universal-wallet/v1/universal-wallet.ts index 439c756c0..92e04b4da 100644 --- a/web/src/proto/services/universal-wallet/v1/universal-wallet.ts +++ b/web/src/proto/services/universal-wallet/v1/universal-wallet.ts @@ -1,3490 +1,3062 @@ /* eslint-disable */ import _m0 from "protobufjs/minimal"; import { - IdentityProvider, - identityProviderFromJSON, - identityProviderToJSON, - WalletConfiguration, + IdentityProvider, + identityProviderFromJSON, + identityProviderToJSON, + WalletConfiguration, } from "../../provider/v1/provider"; /** Request to search items in wallet */ export interface SearchRequest { - /** SQL Query to execute against items in wallet */ - query?: string | undefined; - /** - * Token provided by previous `SearchResponse` - * if more data is available for query - */ - continuationToken?: string | undefined; + /** SQL Query to execute against items in wallet */ + query?: + | string + | undefined; + /** + * Token provided by previous `SearchResponse` + * if more data is available for query + */ + continuationToken?: string | undefined; } /** Response to `SearchRequest` */ export interface SearchResponse { - /** Array of query results, as JSON strings */ - items?: string[] | undefined; - /** Whether more results are available for this query via `continuation_token` */ - hasMoreResults?: boolean | undefined; - /** Token to fetch next set of results via `SearchRequest` */ - continuationToken?: string | undefined; + /** Array of query results, as JSON strings */ + items?: + | string[] + | undefined; + /** Whether more results are available for this query via `continuation_token` */ + hasMoreResults?: + | boolean + | undefined; + /** Token to fetch next set of results via `SearchRequest` */ + continuationToken?: string | undefined; } /** Request to fetch an item from wallet */ export interface GetItemRequest { - /** ID of item in wallet */ - itemId?: string | undefined; + /** ID of item in wallet */ + itemId?: string | undefined; } /** Response to `GetItemRequest` */ export interface GetItemResponse { - /** Item data as a JSON string */ - itemJson?: string | undefined; - /** Type of item specified when item was inserted into wallet */ - itemType?: string | undefined; + /** Item data as a JSON string */ + itemJson?: + | string + | undefined; + /** Type of item specified when item was inserted into wallet */ + itemType?: string | undefined; } /** Request to update item in wallet */ export interface UpdateItemRequest { - /** ID of item in wallet */ - itemId?: string | undefined; - /** Item type (ex. "VerifiableCredential") */ - itemType?: string | undefined; + /** ID of item in wallet */ + itemId?: + | string + | undefined; + /** Item type (ex. "VerifiableCredential") */ + itemType?: string | undefined; } /** Response to `UpdateItemRequest` */ -export interface UpdateItemResponse {} +export interface UpdateItemResponse { +} /** Request to insert a JSON document into a wallet */ export interface InsertItemRequest { - /** Document to insert; must be stringified JSON */ - itemJson?: string | undefined; - /** Item type (ex. "VerifiableCredential") */ - itemType?: string | undefined; + /** Document to insert; must be stringified JSON */ + itemJson?: + | string + | undefined; + /** Item type (ex. "VerifiableCredential") */ + itemType?: string | undefined; } /** Response to `InsertItemRequest` */ export interface InsertItemResponse { - /** ID of item inserted into wallet */ - itemId?: string | undefined; + /** ID of item inserted into wallet */ + itemId?: string | undefined; } /** Request to delete an item in a wallet */ export interface DeleteItemRequest { - /** ID of item to delete */ - itemId?: string | undefined; + /** ID of item to delete */ + itemId?: string | undefined; } /** Response to `DeleteItemRequest` */ -export interface DeleteItemResponse {} +export interface DeleteItemResponse { +} /** Request to delete a wallet */ export interface DeleteWalletRequest { - /** - * Email address of account to delete. - * Mutually exclusive with `walletId` and `didUri`. - */ - email?: string | undefined; - /** - * Wallet ID of account to delete. - * Mutually exclusive with `email` and `didUri`. - */ - walletId?: string | undefined; - /** - * DID URI of the account to delete. - * Mutually exclusive with `email` and `walletId`. - */ - didUri?: string | undefined; + /** + * Email address of account to delete. + * Mutually exclusive with `walletId` and `didUri`. + */ + email?: + | string + | undefined; + /** + * Wallet ID of account to delete. + * Mutually exclusive with `email` and `didUri`. + */ + walletId?: + | string + | undefined; + /** + * DID URI of the account to delete. + * Mutually exclusive with `email` and `walletId`. + */ + didUri?: string | undefined; } /** Response to `DeleteWalletRequest`. Empty payload. */ -export interface DeleteWalletResponse {} +export interface DeleteWalletResponse { +} export interface CreateWalletRequest { - /** Ecosystem ID of the wallet to create */ - ecosystemId?: string | undefined; - /** - * Wallet name or description. - * Use this field to add vendor specific information about this wallet, - * such as email, phone, internal ID, or anything you'd like to associate - * with this wallet. This field is searchable. - */ - description?: string | undefined; - /** - * Optional identity to add to the wallet (email or sms). - * Use this field when inviting participants into an ecosystem. - * If this field is set, an auth token will not be sent in the response. - */ - identity?: CreateWalletRequest_ExternalIdentity | undefined; + /** Ecosystem ID of the wallet to create */ + ecosystemId?: + | string + | undefined; + /** + * Wallet name or description. + * Use this field to add vendor specific information about this wallet, + * such as email, phone, internal ID, or anything you'd like to associate + * with this wallet. This field is searchable. + */ + description?: + | string + | undefined; + /** + * Optional identity to add to the wallet (email or sms). + * Use this field when inviting participants into an ecosystem. + * If this field is set, an auth token will not be sent in the response. + */ + identity?: CreateWalletRequest_ExternalIdentity | undefined; } export interface CreateWalletRequest_ExternalIdentity { - /** - * The user identity to add to the wallet - * This can be an email address or phone number (formatted as +[country code][phone number]) - */ - identity?: string | undefined; - /** The type of identity provider, like EMAIL or PHONE */ - provider?: IdentityProvider | undefined; + /** + * The user identity to add to the wallet + * This can be an email address or phone number (formatted as +[country code][phone number]) + */ + identity?: + | string + | undefined; + /** The type of identity provider, like EMAIL or PHONE */ + provider?: IdentityProvider | undefined; } export interface CreateWalletResponse { - /** Auth token for the newly created wallet */ - authToken?: string | undefined; - /** Token ID of the newly generated token */ - tokenId?: string | undefined; - /** Wallet configuration */ - wallet?: WalletConfiguration | undefined; + /** Auth token for the newly created wallet */ + authToken?: + | string + | undefined; + /** Token ID of the newly generated token */ + tokenId?: + | string + | undefined; + /** Wallet configuration */ + wallet?: WalletConfiguration | undefined; } export interface GenerateAuthTokenRequest { - walletId?: string | undefined; - tokenDescription?: string | undefined; + walletId?: string | undefined; + tokenDescription?: string | undefined; } export interface GenerateAuthTokenResponse { - tokenId?: string | undefined; - authToken?: string | undefined; + tokenId?: string | undefined; + authToken?: string | undefined; } /** Request to retrieve wallet information about a given wallet identified by its wallet ID */ export interface GetWalletInfoRequest { - /** Wallet ID of the wallet to retrieve */ - walletId?: string | undefined; + /** Wallet ID of the wallet to retrieve */ + walletId?: string | undefined; } /** Response to `GetWalletInfoRequest` */ export interface GetWalletInfoResponse { - /** Wallet configuration */ - wallet?: WalletConfiguration | undefined; + /** Wallet configuration */ + wallet?: WalletConfiguration | undefined; } /** Request to retrieve wallet information about the currently authenticated wallet */ -export interface GetMyInfoRequest {} +export interface GetMyInfoRequest { +} /** Response to `GetMyInfoRequest` */ export interface GetMyInfoResponse { - /** Wallet configuration */ - wallet?: WalletConfiguration | undefined; + /** Wallet configuration */ + wallet?: WalletConfiguration | undefined; } /** Request to revoke a previously issued auth token */ export interface RevokeAuthTokenRequest { - /** Wallet ID of the wallet to from which to revoke the token */ - walletId?: string | undefined; - /** Token ID of the token to revoke */ - tokenId?: string | undefined; + /** Wallet ID of the wallet to from which to revoke the token */ + walletId?: + | string + | undefined; + /** Token ID of the token to revoke */ + tokenId?: string | undefined; } -export interface RevokeAuthTokenResponse {} +export interface RevokeAuthTokenResponse { +} export interface ListWalletsRequest { - filter?: string | undefined; + filter?: string | undefined; } export interface ListWalletsResponse { - wallets?: WalletConfiguration[] | undefined; + wallets?: WalletConfiguration[] | undefined; } export interface AddExternalIdentityInitRequest { - /** - * The user identity to add to the wallet - * This can be an email address or phone number (formatted as +[country code][phone number]) - */ - identity?: string | undefined; - /** The type of identity provider, like EMAIL or PHONE */ - provider?: IdentityProvider | undefined; + /** + * The user identity to add to the wallet + * This can be an email address or phone number (formatted as +[country code][phone number]) + */ + identity?: + | string + | undefined; + /** The type of identity provider, like EMAIL or PHONE */ + provider?: IdentityProvider | undefined; } export interface AddExternalIdentityInitResponse { - /** Challenge or reference to the challenge to be used in the `AddExternalIdentityConfirm` endpoint */ - challenge?: string | undefined; + /** Challenge or reference to the challenge to be used in the `AddExternalIdentityConfirm` endpoint */ + challenge?: string | undefined; } export interface AddExternalIdentityConfirmRequest { - /** The challenge received from the `AddExternalIdentityInit` endpoint */ - challenge?: string | undefined; - /** - * The response to the challenge. If using Email or Phone, - * this is the OTP code sent to the user's email or phone - */ - response?: string | undefined; + /** The challenge received from the `AddExternalIdentityInit` endpoint */ + challenge?: + | string + | undefined; + /** + * The response to the challenge. If using Email or Phone, + * this is the OTP code sent to the user's email or phone + */ + response?: string | undefined; } -export interface AddExternalIdentityConfirmResponse {} +export interface AddExternalIdentityConfirmResponse { +} export interface RemoveExternalIdentityRequest { - /** - * The user identity to remove from the wallet - * This can be an email address or phone number (formatted as +[country code][phone number]) - */ - identity?: string | undefined; + /** + * The user identity to remove from the wallet + * This can be an email address or phone number (formatted as +[country code][phone number]) + */ + identity?: string | undefined; } -export interface RemoveExternalIdentityResponse {} +export interface RemoveExternalIdentityResponse { +} export interface AuthenticateInitRequest { - /** Identity to add to the wallet */ - identity?: string | undefined; - /** Identity provider */ - provider?: IdentityProvider | undefined; - /** Ecosystem ID to which the wallet belongs */ - ecosystemId?: string | undefined; + /** Identity to add to the wallet */ + identity?: + | string + | undefined; + /** Identity provider */ + provider?: + | IdentityProvider + | undefined; + /** Ecosystem ID to which the wallet belongs */ + ecosystemId?: string | undefined; } export interface AuthenticateInitResponse { - /** - * The challenge received from the `AcquireAuthTokenInit` endpoint - * Pass this challenge back to the `AcquireAuthTokenConfirm` endpoint - */ - challenge?: string | undefined; + /** + * The challenge received from the `AcquireAuthTokenInit` endpoint + * Pass this challenge back to the `AcquireAuthTokenConfirm` endpoint + */ + challenge?: string | undefined; } export interface AuthenticateResendCodeRequest { - /** Challenge for the code you want resent. */ - challenge?: string | undefined; + /** Challenge for the code you want resent. */ + challenge?: string | undefined; } -export interface AuthenticateResendCodeResponse {} +export interface AuthenticateResendCodeResponse { +} export interface AuthenticateConfirmRequest { - /** The challenge received from the `AcquireAuthTokenInit` endpoint */ - challenge?: string | undefined; - /** - * The response to the challenge. If using Email or Phone, - * this is the OTP code sent to the user's email or phone - */ - response?: string | undefined; + /** The challenge received from the `AcquireAuthTokenInit` endpoint */ + challenge?: + | string + | undefined; + /** + * The response to the challenge. If using Email or Phone, + * this is the OTP code sent to the user's email or phone + */ + response?: string | undefined; } export interface AuthenticateConfirmResponse { - /** Auth token for the wallet */ - authToken?: string | undefined; + /** Auth token for the wallet */ + authToken?: string | undefined; } /** Request to list templates by */ export interface ListByVerificationTemplateRequest { - /** ID of verification template to list matching credentials */ - verificationTemplateId?: string | undefined; - /** - * Token provided by previous `ListCredentialTemplatesResponse` - * if more data is available for query - */ - continuationToken?: string | undefined; + /** ID of verification template to list matching credentials */ + verificationTemplateId?: + | string + | undefined; + /** + * Token provided by previous `ListCredentialTemplatesResponse` + * if more data is available for query + */ + continuationToken?: string | undefined; } /** Response to `ListByVerificationTemplateRequest` */ export interface ListByVerificationTemplateResponse { - /** Array of query results, as JSON strings */ - items?: string[] | undefined; - /** Whether more results are available for this query via `continuation_token` */ - hasMoreResults?: boolean | undefined; - /** Token to fetch next set of results via `ListByVerificationTemplateRequest` */ - continuationToken?: string | undefined; + /** Array of query results, as JSON strings */ + items?: + | string[] + | undefined; + /** Whether more results are available for this query via `continuation_token` */ + hasMoreResults?: + | boolean + | undefined; + /** Token to fetch next set of results via `ListByVerificationTemplateRequest` */ + continuationToken?: string | undefined; } function createBaseSearchRequest(): SearchRequest { - return { query: "", continuationToken: "" }; + return { query: "", continuationToken: "" }; } export const SearchRequest = { - encode( - message: SearchRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.query !== undefined && message.query !== "") { - writer.uint32(10).string(message.query); - } - if ( - message.continuationToken !== undefined && - message.continuationToken !== "" - ) { - writer.uint32(18).string(message.continuationToken); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): SearchRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSearchRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.query = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.continuationToken = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): SearchRequest { - return { - query: isSet(object.query) ? String(object.query) : "", - continuationToken: isSet(object.continuationToken) - ? String(object.continuationToken) - : "", - }; - }, - - toJSON(message: SearchRequest): unknown { - const obj: any = {}; - if (message.query !== undefined && message.query !== "") { - obj.query = message.query; - } - if ( - message.continuationToken !== undefined && - message.continuationToken !== "" - ) { - obj.continuationToken = message.continuationToken; - } - return obj; - }, - - create(base?: DeepPartial): SearchRequest { - return SearchRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): SearchRequest { - const message = createBaseSearchRequest(); - message.query = object.query ?? ""; - message.continuationToken = object.continuationToken ?? ""; - return message; - }, + encode(message: SearchRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.query !== undefined && message.query !== "") { + writer.uint32(10).string(message.query); + } + if (message.continuationToken !== undefined && message.continuationToken !== "") { + writer.uint32(18).string(message.continuationToken); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): SearchRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSearchRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.query = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.continuationToken = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): SearchRequest { + return { + query: isSet(object.query) ? String(object.query) : "", + continuationToken: isSet(object.continuationToken) ? String(object.continuationToken) : "", + }; + }, + + toJSON(message: SearchRequest): unknown { + const obj: any = {}; + if (message.query !== undefined && message.query !== "") { + obj.query = message.query; + } + if (message.continuationToken !== undefined && message.continuationToken !== "") { + obj.continuationToken = message.continuationToken; + } + return obj; + }, + + create(base?: DeepPartial): SearchRequest { + return SearchRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): SearchRequest { + const message = createBaseSearchRequest(); + message.query = object.query ?? ""; + message.continuationToken = object.continuationToken ?? ""; + return message; + }, }; function createBaseSearchResponse(): SearchResponse { - return { items: [], hasMoreResults: false, continuationToken: "" }; + return { items: [], hasMoreResults: false, continuationToken: "" }; } export const SearchResponse = { - encode( - message: SearchResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.items !== undefined && message.items.length !== 0) { - for (const v of message.items) { - writer.uint32(10).string(v!); - } - } - if (message.hasMoreResults === true) { - writer.uint32(16).bool(message.hasMoreResults); - } - if ( - message.continuationToken !== undefined && - message.continuationToken !== "" - ) { - writer.uint32(34).string(message.continuationToken); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): SearchResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSearchResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.items!.push(reader.string()); - continue; - case 2: - if (tag !== 16) { - break; - } - - message.hasMoreResults = reader.bool(); - continue; - case 4: - if (tag !== 34) { - break; - } - - message.continuationToken = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): SearchResponse { - return { - items: Array.isArray(object?.items) - ? object.items.map((e: any) => String(e)) - : [], - hasMoreResults: isSet(object.hasMoreResults) - ? Boolean(object.hasMoreResults) - : false, - continuationToken: isSet(object.continuationToken) - ? String(object.continuationToken) - : "", - }; - }, - - toJSON(message: SearchResponse): unknown { - const obj: any = {}; - if (message.items?.length) { - obj.items = message.items; - } - if (message.hasMoreResults === true) { - obj.hasMoreResults = message.hasMoreResults; - } - if ( - message.continuationToken !== undefined && - message.continuationToken !== "" - ) { - obj.continuationToken = message.continuationToken; - } - return obj; - }, - - create(base?: DeepPartial): SearchResponse { - return SearchResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): SearchResponse { - const message = createBaseSearchResponse(); - message.items = object.items?.map((e) => e) || []; - message.hasMoreResults = object.hasMoreResults ?? false; - message.continuationToken = object.continuationToken ?? ""; - return message; - }, + encode(message: SearchResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.items !== undefined && message.items.length !== 0) { + for (const v of message.items) { + writer.uint32(10).string(v!); + } + } + if (message.hasMoreResults === true) { + writer.uint32(16).bool(message.hasMoreResults); + } + if (message.continuationToken !== undefined && message.continuationToken !== "") { + writer.uint32(34).string(message.continuationToken); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): SearchResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSearchResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.items!.push(reader.string()); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.hasMoreResults = reader.bool(); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.continuationToken = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): SearchResponse { + return { + items: Array.isArray(object?.items) ? object.items.map((e: any) => String(e)) : [], + hasMoreResults: isSet(object.hasMoreResults) ? Boolean(object.hasMoreResults) : false, + continuationToken: isSet(object.continuationToken) ? String(object.continuationToken) : "", + }; + }, + + toJSON(message: SearchResponse): unknown { + const obj: any = {}; + if (message.items?.length) { + obj.items = message.items; + } + if (message.hasMoreResults === true) { + obj.hasMoreResults = message.hasMoreResults; + } + if (message.continuationToken !== undefined && message.continuationToken !== "") { + obj.continuationToken = message.continuationToken; + } + return obj; + }, + + create(base?: DeepPartial): SearchResponse { + return SearchResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): SearchResponse { + const message = createBaseSearchResponse(); + message.items = object.items?.map((e) => e) || []; + message.hasMoreResults = object.hasMoreResults ?? false; + message.continuationToken = object.continuationToken ?? ""; + return message; + }, }; function createBaseGetItemRequest(): GetItemRequest { - return { itemId: "" }; + return { itemId: "" }; } export const GetItemRequest = { - encode( - message: GetItemRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.itemId !== undefined && message.itemId !== "") { - writer.uint32(10).string(message.itemId); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): GetItemRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetItemRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.itemId = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): GetItemRequest { - return { itemId: isSet(object.itemId) ? String(object.itemId) : "" }; - }, - - toJSON(message: GetItemRequest): unknown { - const obj: any = {}; - if (message.itemId !== undefined && message.itemId !== "") { - obj.itemId = message.itemId; - } - return obj; - }, - - create(base?: DeepPartial): GetItemRequest { - return GetItemRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): GetItemRequest { - const message = createBaseGetItemRequest(); - message.itemId = object.itemId ?? ""; - return message; - }, + encode(message: GetItemRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.itemId !== undefined && message.itemId !== "") { + writer.uint32(10).string(message.itemId); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): GetItemRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGetItemRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.itemId = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): GetItemRequest { + return { itemId: isSet(object.itemId) ? String(object.itemId) : "" }; + }, + + toJSON(message: GetItemRequest): unknown { + const obj: any = {}; + if (message.itemId !== undefined && message.itemId !== "") { + obj.itemId = message.itemId; + } + return obj; + }, + + create(base?: DeepPartial): GetItemRequest { + return GetItemRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): GetItemRequest { + const message = createBaseGetItemRequest(); + message.itemId = object.itemId ?? ""; + return message; + }, }; function createBaseGetItemResponse(): GetItemResponse { - return { itemJson: "", itemType: "" }; + return { itemJson: "", itemType: "" }; } export const GetItemResponse = { - encode( - message: GetItemResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.itemJson !== undefined && message.itemJson !== "") { - writer.uint32(10).string(message.itemJson); - } - if (message.itemType !== undefined && message.itemType !== "") { - writer.uint32(18).string(message.itemType); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): GetItemResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetItemResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.itemJson = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.itemType = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): GetItemResponse { - return { - itemJson: isSet(object.itemJson) ? String(object.itemJson) : "", - itemType: isSet(object.itemType) ? String(object.itemType) : "", - }; - }, - - toJSON(message: GetItemResponse): unknown { - const obj: any = {}; - if (message.itemJson !== undefined && message.itemJson !== "") { - obj.itemJson = message.itemJson; - } - if (message.itemType !== undefined && message.itemType !== "") { - obj.itemType = message.itemType; - } - return obj; - }, - - create(base?: DeepPartial): GetItemResponse { - return GetItemResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): GetItemResponse { - const message = createBaseGetItemResponse(); - message.itemJson = object.itemJson ?? ""; - message.itemType = object.itemType ?? ""; - return message; - }, + encode(message: GetItemResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.itemJson !== undefined && message.itemJson !== "") { + writer.uint32(10).string(message.itemJson); + } + if (message.itemType !== undefined && message.itemType !== "") { + writer.uint32(18).string(message.itemType); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): GetItemResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGetItemResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.itemJson = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.itemType = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): GetItemResponse { + return { + itemJson: isSet(object.itemJson) ? String(object.itemJson) : "", + itemType: isSet(object.itemType) ? String(object.itemType) : "", + }; + }, + + toJSON(message: GetItemResponse): unknown { + const obj: any = {}; + if (message.itemJson !== undefined && message.itemJson !== "") { + obj.itemJson = message.itemJson; + } + if (message.itemType !== undefined && message.itemType !== "") { + obj.itemType = message.itemType; + } + return obj; + }, + + create(base?: DeepPartial): GetItemResponse { + return GetItemResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): GetItemResponse { + const message = createBaseGetItemResponse(); + message.itemJson = object.itemJson ?? ""; + message.itemType = object.itemType ?? ""; + return message; + }, }; function createBaseUpdateItemRequest(): UpdateItemRequest { - return { itemId: "", itemType: "" }; + return { itemId: "", itemType: "" }; } export const UpdateItemRequest = { - encode( - message: UpdateItemRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.itemId !== undefined && message.itemId !== "") { - writer.uint32(10).string(message.itemId); - } - if (message.itemType !== undefined && message.itemType !== "") { - writer.uint32(18).string(message.itemType); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateItemRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateItemRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.itemId = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.itemType = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): UpdateItemRequest { - return { - itemId: isSet(object.itemId) ? String(object.itemId) : "", - itemType: isSet(object.itemType) ? String(object.itemType) : "", - }; - }, - - toJSON(message: UpdateItemRequest): unknown { - const obj: any = {}; - if (message.itemId !== undefined && message.itemId !== "") { - obj.itemId = message.itemId; - } - if (message.itemType !== undefined && message.itemType !== "") { - obj.itemType = message.itemType; - } - return obj; - }, - - create(base?: DeepPartial): UpdateItemRequest { - return UpdateItemRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): UpdateItemRequest { - const message = createBaseUpdateItemRequest(); - message.itemId = object.itemId ?? ""; - message.itemType = object.itemType ?? ""; - return message; - }, + encode(message: UpdateItemRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.itemId !== undefined && message.itemId !== "") { + writer.uint32(10).string(message.itemId); + } + if (message.itemType !== undefined && message.itemType !== "") { + writer.uint32(18).string(message.itemType); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): UpdateItemRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUpdateItemRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.itemId = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.itemType = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): UpdateItemRequest { + return { + itemId: isSet(object.itemId) ? String(object.itemId) : "", + itemType: isSet(object.itemType) ? String(object.itemType) : "", + }; + }, + + toJSON(message: UpdateItemRequest): unknown { + const obj: any = {}; + if (message.itemId !== undefined && message.itemId !== "") { + obj.itemId = message.itemId; + } + if (message.itemType !== undefined && message.itemType !== "") { + obj.itemType = message.itemType; + } + return obj; + }, + + create(base?: DeepPartial): UpdateItemRequest { + return UpdateItemRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): UpdateItemRequest { + const message = createBaseUpdateItemRequest(); + message.itemId = object.itemId ?? ""; + message.itemType = object.itemType ?? ""; + return message; + }, }; function createBaseUpdateItemResponse(): UpdateItemResponse { - return {}; + return {}; } export const UpdateItemResponse = { - encode( - _: UpdateItemResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): UpdateItemResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateItemResponse(); - 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): UpdateItemResponse { - return {}; - }, - - toJSON(_: UpdateItemResponse): unknown { - const obj: any = {}; - return obj; - }, - - create(base?: DeepPartial): UpdateItemResponse { - return UpdateItemResponse.fromPartial(base ?? {}); - }, - fromPartial(_: DeepPartial): UpdateItemResponse { - const message = createBaseUpdateItemResponse(); - return message; - }, + encode(_: UpdateItemResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): UpdateItemResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUpdateItemResponse(); + 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): UpdateItemResponse { + return {}; + }, + + toJSON(_: UpdateItemResponse): unknown { + const obj: any = {}; + return obj; + }, + + create(base?: DeepPartial): UpdateItemResponse { + return UpdateItemResponse.fromPartial(base ?? {}); + }, + fromPartial(_: DeepPartial): UpdateItemResponse { + const message = createBaseUpdateItemResponse(); + return message; + }, }; function createBaseInsertItemRequest(): InsertItemRequest { - return { itemJson: "", itemType: "" }; + return { itemJson: "", itemType: "" }; } export const InsertItemRequest = { - encode( - message: InsertItemRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.itemJson !== undefined && message.itemJson !== "") { - writer.uint32(10).string(message.itemJson); - } - if (message.itemType !== undefined && message.itemType !== "") { - writer.uint32(18).string(message.itemType); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): InsertItemRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseInsertItemRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.itemJson = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.itemType = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): InsertItemRequest { - return { - itemJson: isSet(object.itemJson) ? String(object.itemJson) : "", - itemType: isSet(object.itemType) ? String(object.itemType) : "", - }; - }, - - toJSON(message: InsertItemRequest): unknown { - const obj: any = {}; - if (message.itemJson !== undefined && message.itemJson !== "") { - obj.itemJson = message.itemJson; - } - if (message.itemType !== undefined && message.itemType !== "") { - obj.itemType = message.itemType; - } - return obj; - }, - - create(base?: DeepPartial): InsertItemRequest { - return InsertItemRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): InsertItemRequest { - const message = createBaseInsertItemRequest(); - message.itemJson = object.itemJson ?? ""; - message.itemType = object.itemType ?? ""; - return message; - }, + encode(message: InsertItemRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.itemJson !== undefined && message.itemJson !== "") { + writer.uint32(10).string(message.itemJson); + } + if (message.itemType !== undefined && message.itemType !== "") { + writer.uint32(18).string(message.itemType); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): InsertItemRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseInsertItemRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.itemJson = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.itemType = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): InsertItemRequest { + return { + itemJson: isSet(object.itemJson) ? String(object.itemJson) : "", + itemType: isSet(object.itemType) ? String(object.itemType) : "", + }; + }, + + toJSON(message: InsertItemRequest): unknown { + const obj: any = {}; + if (message.itemJson !== undefined && message.itemJson !== "") { + obj.itemJson = message.itemJson; + } + if (message.itemType !== undefined && message.itemType !== "") { + obj.itemType = message.itemType; + } + return obj; + }, + + create(base?: DeepPartial): InsertItemRequest { + return InsertItemRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): InsertItemRequest { + const message = createBaseInsertItemRequest(); + message.itemJson = object.itemJson ?? ""; + message.itemType = object.itemType ?? ""; + return message; + }, }; function createBaseInsertItemResponse(): InsertItemResponse { - return { itemId: "" }; + return { itemId: "" }; } export const InsertItemResponse = { - encode( - message: InsertItemResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.itemId !== undefined && message.itemId !== "") { - writer.uint32(18).string(message.itemId); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): InsertItemResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseInsertItemResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - if (tag !== 18) { - break; - } - - message.itemId = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): InsertItemResponse { - return { itemId: isSet(object.itemId) ? String(object.itemId) : "" }; - }, - - toJSON(message: InsertItemResponse): unknown { - const obj: any = {}; - if (message.itemId !== undefined && message.itemId !== "") { - obj.itemId = message.itemId; - } - return obj; - }, - - create(base?: DeepPartial): InsertItemResponse { - return InsertItemResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): InsertItemResponse { - const message = createBaseInsertItemResponse(); - message.itemId = object.itemId ?? ""; - return message; - }, + encode(message: InsertItemResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.itemId !== undefined && message.itemId !== "") { + writer.uint32(18).string(message.itemId); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): InsertItemResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseInsertItemResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + if (tag !== 18) { + break; + } + + message.itemId = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): InsertItemResponse { + return { itemId: isSet(object.itemId) ? String(object.itemId) : "" }; + }, + + toJSON(message: InsertItemResponse): unknown { + const obj: any = {}; + if (message.itemId !== undefined && message.itemId !== "") { + obj.itemId = message.itemId; + } + return obj; + }, + + create(base?: DeepPartial): InsertItemResponse { + return InsertItemResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): InsertItemResponse { + const message = createBaseInsertItemResponse(); + message.itemId = object.itemId ?? ""; + return message; + }, }; function createBaseDeleteItemRequest(): DeleteItemRequest { - return { itemId: "" }; + return { itemId: "" }; } export const DeleteItemRequest = { - encode( - message: DeleteItemRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.itemId !== undefined && message.itemId !== "") { - writer.uint32(10).string(message.itemId); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): DeleteItemRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDeleteItemRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.itemId = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): DeleteItemRequest { - return { itemId: isSet(object.itemId) ? String(object.itemId) : "" }; - }, - - toJSON(message: DeleteItemRequest): unknown { - const obj: any = {}; - if (message.itemId !== undefined && message.itemId !== "") { - obj.itemId = message.itemId; - } - return obj; - }, - - create(base?: DeepPartial): DeleteItemRequest { - return DeleteItemRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): DeleteItemRequest { - const message = createBaseDeleteItemRequest(); - message.itemId = object.itemId ?? ""; - return message; - }, + encode(message: DeleteItemRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.itemId !== undefined && message.itemId !== "") { + writer.uint32(10).string(message.itemId); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): DeleteItemRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseDeleteItemRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.itemId = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): DeleteItemRequest { + return { itemId: isSet(object.itemId) ? String(object.itemId) : "" }; + }, + + toJSON(message: DeleteItemRequest): unknown { + const obj: any = {}; + if (message.itemId !== undefined && message.itemId !== "") { + obj.itemId = message.itemId; + } + return obj; + }, + + create(base?: DeepPartial): DeleteItemRequest { + return DeleteItemRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): DeleteItemRequest { + const message = createBaseDeleteItemRequest(); + message.itemId = object.itemId ?? ""; + return message; + }, }; function createBaseDeleteItemResponse(): DeleteItemResponse { - return {}; + return {}; } export const DeleteItemResponse = { - encode( - _: DeleteItemResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): DeleteItemResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDeleteItemResponse(); - 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): DeleteItemResponse { - return {}; - }, - - toJSON(_: DeleteItemResponse): unknown { - const obj: any = {}; - return obj; - }, - - create(base?: DeepPartial): DeleteItemResponse { - return DeleteItemResponse.fromPartial(base ?? {}); - }, - fromPartial(_: DeepPartial): DeleteItemResponse { - const message = createBaseDeleteItemResponse(); - return message; - }, + encode(_: DeleteItemResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): DeleteItemResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseDeleteItemResponse(); + 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): DeleteItemResponse { + return {}; + }, + + toJSON(_: DeleteItemResponse): unknown { + const obj: any = {}; + return obj; + }, + + create(base?: DeepPartial): DeleteItemResponse { + return DeleteItemResponse.fromPartial(base ?? {}); + }, + fromPartial(_: DeepPartial): DeleteItemResponse { + const message = createBaseDeleteItemResponse(); + return message; + }, }; function createBaseDeleteWalletRequest(): DeleteWalletRequest { - return { email: undefined, walletId: undefined, didUri: undefined }; + return { email: undefined, walletId: undefined, didUri: undefined }; } export const DeleteWalletRequest = { - encode( - message: DeleteWalletRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.email !== undefined) { - writer.uint32(10).string(message.email); - } - if (message.walletId !== undefined) { - writer.uint32(18).string(message.walletId); - } - if (message.didUri !== undefined) { - writer.uint32(34).string(message.didUri); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): DeleteWalletRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDeleteWalletRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.email = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.walletId = reader.string(); - continue; - case 4: - if (tag !== 34) { - break; - } - - message.didUri = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): DeleteWalletRequest { - return { - email: isSet(object.email) ? String(object.email) : undefined, - walletId: isSet(object.walletId) - ? String(object.walletId) - : undefined, - didUri: isSet(object.didUri) ? String(object.didUri) : undefined, - }; - }, - - toJSON(message: DeleteWalletRequest): unknown { - const obj: any = {}; - if (message.email !== undefined) { - obj.email = message.email; - } - if (message.walletId !== undefined) { - obj.walletId = message.walletId; - } - if (message.didUri !== undefined) { - obj.didUri = message.didUri; - } - return obj; - }, - - create(base?: DeepPartial): DeleteWalletRequest { - return DeleteWalletRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): DeleteWalletRequest { - const message = createBaseDeleteWalletRequest(); - message.email = object.email ?? undefined; - message.walletId = object.walletId ?? undefined; - message.didUri = object.didUri ?? undefined; - return message; - }, + encode(message: DeleteWalletRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.email !== undefined) { + writer.uint32(10).string(message.email); + } + if (message.walletId !== undefined) { + writer.uint32(18).string(message.walletId); + } + if (message.didUri !== undefined) { + writer.uint32(34).string(message.didUri); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): DeleteWalletRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseDeleteWalletRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.email = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.walletId = reader.string(); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.didUri = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): DeleteWalletRequest { + return { + email: isSet(object.email) ? String(object.email) : undefined, + walletId: isSet(object.walletId) ? String(object.walletId) : undefined, + didUri: isSet(object.didUri) ? String(object.didUri) : undefined, + }; + }, + + toJSON(message: DeleteWalletRequest): unknown { + const obj: any = {}; + if (message.email !== undefined) { + obj.email = message.email; + } + if (message.walletId !== undefined) { + obj.walletId = message.walletId; + } + if (message.didUri !== undefined) { + obj.didUri = message.didUri; + } + return obj; + }, + + create(base?: DeepPartial): DeleteWalletRequest { + return DeleteWalletRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): DeleteWalletRequest { + const message = createBaseDeleteWalletRequest(); + message.email = object.email ?? undefined; + message.walletId = object.walletId ?? undefined; + message.didUri = object.didUri ?? undefined; + return message; + }, }; function createBaseDeleteWalletResponse(): DeleteWalletResponse { - return {}; + return {}; } export const DeleteWalletResponse = { - encode( - _: DeleteWalletResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): DeleteWalletResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDeleteWalletResponse(); - 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): DeleteWalletResponse { - return {}; - }, - - toJSON(_: DeleteWalletResponse): unknown { - const obj: any = {}; - return obj; - }, - - create(base?: DeepPartial): DeleteWalletResponse { - return DeleteWalletResponse.fromPartial(base ?? {}); - }, - fromPartial(_: DeepPartial): DeleteWalletResponse { - const message = createBaseDeleteWalletResponse(); - return message; - }, + encode(_: DeleteWalletResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): DeleteWalletResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseDeleteWalletResponse(); + 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): DeleteWalletResponse { + return {}; + }, + + toJSON(_: DeleteWalletResponse): unknown { + const obj: any = {}; + return obj; + }, + + create(base?: DeepPartial): DeleteWalletResponse { + return DeleteWalletResponse.fromPartial(base ?? {}); + }, + fromPartial(_: DeepPartial): DeleteWalletResponse { + const message = createBaseDeleteWalletResponse(); + return message; + }, }; function createBaseCreateWalletRequest(): CreateWalletRequest { - return { ecosystemId: "", description: undefined, identity: undefined }; + return { ecosystemId: "", description: undefined, identity: undefined }; } export const CreateWalletRequest = { - encode( - message: CreateWalletRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.ecosystemId !== undefined && message.ecosystemId !== "") { - writer.uint32(10).string(message.ecosystemId); - } - if (message.description !== undefined) { - writer.uint32(18).string(message.description); - } - if (message.identity !== undefined) { - CreateWalletRequest_ExternalIdentity.encode( - message.identity, - writer.uint32(26).fork(), - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): CreateWalletRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCreateWalletRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.ecosystemId = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.description = reader.string(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.identity = - CreateWalletRequest_ExternalIdentity.decode( - reader, - reader.uint32(), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): CreateWalletRequest { - return { - ecosystemId: isSet(object.ecosystemId) - ? String(object.ecosystemId) - : "", - description: isSet(object.description) - ? String(object.description) - : undefined, - identity: isSet(object.identity) - ? CreateWalletRequest_ExternalIdentity.fromJSON(object.identity) - : undefined, - }; - }, - - toJSON(message: CreateWalletRequest): unknown { - const obj: any = {}; - if (message.ecosystemId !== undefined && message.ecosystemId !== "") { - obj.ecosystemId = message.ecosystemId; - } - if (message.description !== undefined) { - obj.description = message.description; - } - if (message.identity !== undefined) { - obj.identity = CreateWalletRequest_ExternalIdentity.toJSON( - message.identity, - ); - } - return obj; - }, - - create(base?: DeepPartial): CreateWalletRequest { - return CreateWalletRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): CreateWalletRequest { - const message = createBaseCreateWalletRequest(); - message.ecosystemId = object.ecosystemId ?? ""; - message.description = object.description ?? undefined; - message.identity = - object.identity !== undefined && object.identity !== null - ? CreateWalletRequest_ExternalIdentity.fromPartial( - object.identity, - ) - : undefined; - return message; - }, + encode(message: CreateWalletRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.ecosystemId !== undefined && message.ecosystemId !== "") { + writer.uint32(10).string(message.ecosystemId); + } + if (message.description !== undefined) { + writer.uint32(18).string(message.description); + } + if (message.identity !== undefined) { + CreateWalletRequest_ExternalIdentity.encode(message.identity, writer.uint32(26).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): CreateWalletRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCreateWalletRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.ecosystemId = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.description = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.identity = CreateWalletRequest_ExternalIdentity.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): CreateWalletRequest { + return { + ecosystemId: isSet(object.ecosystemId) ? String(object.ecosystemId) : "", + description: isSet(object.description) ? String(object.description) : undefined, + identity: isSet(object.identity) ? CreateWalletRequest_ExternalIdentity.fromJSON(object.identity) : undefined, + }; + }, + + toJSON(message: CreateWalletRequest): unknown { + const obj: any = {}; + if (message.ecosystemId !== undefined && message.ecosystemId !== "") { + obj.ecosystemId = message.ecosystemId; + } + if (message.description !== undefined) { + obj.description = message.description; + } + if (message.identity !== undefined) { + obj.identity = CreateWalletRequest_ExternalIdentity.toJSON(message.identity); + } + return obj; + }, + + create(base?: DeepPartial): CreateWalletRequest { + return CreateWalletRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): CreateWalletRequest { + const message = createBaseCreateWalletRequest(); + message.ecosystemId = object.ecosystemId ?? ""; + message.description = object.description ?? undefined; + message.identity = (object.identity !== undefined && object.identity !== null) + ? CreateWalletRequest_ExternalIdentity.fromPartial(object.identity) + : undefined; + return message; + }, }; function createBaseCreateWalletRequest_ExternalIdentity(): CreateWalletRequest_ExternalIdentity { - return { identity: "", provider: 0 }; + return { identity: "", provider: 0 }; } export const CreateWalletRequest_ExternalIdentity = { - encode( - message: CreateWalletRequest_ExternalIdentity, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.identity !== undefined && message.identity !== "") { - writer.uint32(10).string(message.identity); - } - if (message.provider !== undefined && message.provider !== 0) { - writer.uint32(16).int32(message.provider); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): CreateWalletRequest_ExternalIdentity { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCreateWalletRequest_ExternalIdentity(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.identity = reader.string(); - continue; - case 2: - if (tag !== 16) { - break; - } - - message.provider = reader.int32() as any; - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): CreateWalletRequest_ExternalIdentity { - return { - identity: isSet(object.identity) ? String(object.identity) : "", - provider: isSet(object.provider) - ? identityProviderFromJSON(object.provider) - : 0, - }; - }, - - toJSON(message: CreateWalletRequest_ExternalIdentity): unknown { - const obj: any = {}; - if (message.identity !== undefined && message.identity !== "") { - obj.identity = message.identity; - } - if (message.provider !== undefined && message.provider !== 0) { - obj.provider = identityProviderToJSON(message.provider); - } - return obj; - }, - - create( - base?: DeepPartial, - ): CreateWalletRequest_ExternalIdentity { - return CreateWalletRequest_ExternalIdentity.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): CreateWalletRequest_ExternalIdentity { - const message = createBaseCreateWalletRequest_ExternalIdentity(); - message.identity = object.identity ?? ""; - message.provider = object.provider ?? 0; - return message; - }, + encode(message: CreateWalletRequest_ExternalIdentity, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.identity !== undefined && message.identity !== "") { + writer.uint32(10).string(message.identity); + } + if (message.provider !== undefined && message.provider !== 0) { + writer.uint32(16).int32(message.provider); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): CreateWalletRequest_ExternalIdentity { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCreateWalletRequest_ExternalIdentity(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.identity = reader.string(); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.provider = reader.int32() as any; + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): CreateWalletRequest_ExternalIdentity { + return { + identity: isSet(object.identity) ? String(object.identity) : "", + provider: isSet(object.provider) ? identityProviderFromJSON(object.provider) : 0, + }; + }, + + toJSON(message: CreateWalletRequest_ExternalIdentity): unknown { + const obj: any = {}; + if (message.identity !== undefined && message.identity !== "") { + obj.identity = message.identity; + } + if (message.provider !== undefined && message.provider !== 0) { + obj.provider = identityProviderToJSON(message.provider); + } + return obj; + }, + + create(base?: DeepPartial): CreateWalletRequest_ExternalIdentity { + return CreateWalletRequest_ExternalIdentity.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): CreateWalletRequest_ExternalIdentity { + const message = createBaseCreateWalletRequest_ExternalIdentity(); + message.identity = object.identity ?? ""; + message.provider = object.provider ?? 0; + return message; + }, }; function createBaseCreateWalletResponse(): CreateWalletResponse { - return { authToken: "", tokenId: "", wallet: undefined }; + return { authToken: "", tokenId: "", wallet: undefined }; } export const CreateWalletResponse = { - encode( - message: CreateWalletResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.authToken !== undefined && message.authToken !== "") { - writer.uint32(18).string(message.authToken); - } - if (message.tokenId !== undefined && message.tokenId !== "") { - writer.uint32(26).string(message.tokenId); - } - if (message.wallet !== undefined) { - WalletConfiguration.encode( - message.wallet, - writer.uint32(34).fork(), - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): CreateWalletResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCreateWalletResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - if (tag !== 18) { - break; - } - - message.authToken = reader.string(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.tokenId = reader.string(); - continue; - case 4: - if (tag !== 34) { - break; - } - - message.wallet = WalletConfiguration.decode( - reader, - reader.uint32(), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): CreateWalletResponse { - return { - authToken: isSet(object.authToken) ? String(object.authToken) : "", - tokenId: isSet(object.tokenId) ? String(object.tokenId) : "", - wallet: isSet(object.wallet) - ? WalletConfiguration.fromJSON(object.wallet) - : undefined, - }; - }, - - toJSON(message: CreateWalletResponse): unknown { - const obj: any = {}; - if (message.authToken !== undefined && message.authToken !== "") { - obj.authToken = message.authToken; - } - if (message.tokenId !== undefined && message.tokenId !== "") { - obj.tokenId = message.tokenId; - } - if (message.wallet !== undefined) { - obj.wallet = WalletConfiguration.toJSON(message.wallet); - } - return obj; - }, - - create(base?: DeepPartial): CreateWalletResponse { - return CreateWalletResponse.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): CreateWalletResponse { - const message = createBaseCreateWalletResponse(); - message.authToken = object.authToken ?? ""; - message.tokenId = object.tokenId ?? ""; - message.wallet = - object.wallet !== undefined && object.wallet !== null - ? WalletConfiguration.fromPartial(object.wallet) - : undefined; - return message; - }, + encode(message: CreateWalletResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.authToken !== undefined && message.authToken !== "") { + writer.uint32(18).string(message.authToken); + } + if (message.tokenId !== undefined && message.tokenId !== "") { + writer.uint32(26).string(message.tokenId); + } + if (message.wallet !== undefined) { + WalletConfiguration.encode(message.wallet, writer.uint32(34).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): CreateWalletResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCreateWalletResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + if (tag !== 18) { + break; + } + + message.authToken = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.tokenId = reader.string(); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.wallet = WalletConfiguration.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): CreateWalletResponse { + return { + authToken: isSet(object.authToken) ? String(object.authToken) : "", + tokenId: isSet(object.tokenId) ? String(object.tokenId) : "", + wallet: isSet(object.wallet) ? WalletConfiguration.fromJSON(object.wallet) : undefined, + }; + }, + + toJSON(message: CreateWalletResponse): unknown { + const obj: any = {}; + if (message.authToken !== undefined && message.authToken !== "") { + obj.authToken = message.authToken; + } + if (message.tokenId !== undefined && message.tokenId !== "") { + obj.tokenId = message.tokenId; + } + if (message.wallet !== undefined) { + obj.wallet = WalletConfiguration.toJSON(message.wallet); + } + return obj; + }, + + create(base?: DeepPartial): CreateWalletResponse { + return CreateWalletResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): CreateWalletResponse { + const message = createBaseCreateWalletResponse(); + message.authToken = object.authToken ?? ""; + message.tokenId = object.tokenId ?? ""; + message.wallet = (object.wallet !== undefined && object.wallet !== null) + ? WalletConfiguration.fromPartial(object.wallet) + : undefined; + return message; + }, }; function createBaseGenerateAuthTokenRequest(): GenerateAuthTokenRequest { - return { walletId: "", tokenDescription: "" }; + return { walletId: "", tokenDescription: "" }; } export const GenerateAuthTokenRequest = { - encode( - message: GenerateAuthTokenRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.walletId !== undefined && message.walletId !== "") { - writer.uint32(10).string(message.walletId); - } - if ( - message.tokenDescription !== undefined && - message.tokenDescription !== "" - ) { - writer.uint32(18).string(message.tokenDescription); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): GenerateAuthTokenRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenerateAuthTokenRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.walletId = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.tokenDescription = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): GenerateAuthTokenRequest { - return { - walletId: isSet(object.walletId) ? String(object.walletId) : "", - tokenDescription: isSet(object.tokenDescription) - ? String(object.tokenDescription) - : "", - }; - }, - - toJSON(message: GenerateAuthTokenRequest): unknown { - const obj: any = {}; - if (message.walletId !== undefined && message.walletId !== "") { - obj.walletId = message.walletId; - } - if ( - message.tokenDescription !== undefined && - message.tokenDescription !== "" - ) { - obj.tokenDescription = message.tokenDescription; - } - return obj; - }, - - create( - base?: DeepPartial, - ): GenerateAuthTokenRequest { - return GenerateAuthTokenRequest.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): GenerateAuthTokenRequest { - const message = createBaseGenerateAuthTokenRequest(); - message.walletId = object.walletId ?? ""; - message.tokenDescription = object.tokenDescription ?? ""; - return message; - }, + encode(message: GenerateAuthTokenRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.walletId !== undefined && message.walletId !== "") { + writer.uint32(10).string(message.walletId); + } + if (message.tokenDescription !== undefined && message.tokenDescription !== "") { + writer.uint32(18).string(message.tokenDescription); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): GenerateAuthTokenRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGenerateAuthTokenRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.walletId = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.tokenDescription = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): GenerateAuthTokenRequest { + return { + walletId: isSet(object.walletId) ? String(object.walletId) : "", + tokenDescription: isSet(object.tokenDescription) ? String(object.tokenDescription) : "", + }; + }, + + toJSON(message: GenerateAuthTokenRequest): unknown { + const obj: any = {}; + if (message.walletId !== undefined && message.walletId !== "") { + obj.walletId = message.walletId; + } + if (message.tokenDescription !== undefined && message.tokenDescription !== "") { + obj.tokenDescription = message.tokenDescription; + } + return obj; + }, + + create(base?: DeepPartial): GenerateAuthTokenRequest { + return GenerateAuthTokenRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): GenerateAuthTokenRequest { + const message = createBaseGenerateAuthTokenRequest(); + message.walletId = object.walletId ?? ""; + message.tokenDescription = object.tokenDescription ?? ""; + return message; + }, }; function createBaseGenerateAuthTokenResponse(): GenerateAuthTokenResponse { - return { tokenId: "", authToken: "" }; + return { tokenId: "", authToken: "" }; } export const GenerateAuthTokenResponse = { - encode( - message: GenerateAuthTokenResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.tokenId !== undefined && message.tokenId !== "") { - writer.uint32(10).string(message.tokenId); - } - if (message.authToken !== undefined && message.authToken !== "") { - writer.uint32(18).string(message.authToken); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): GenerateAuthTokenResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenerateAuthTokenResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.tokenId = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.authToken = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): GenerateAuthTokenResponse { - return { - tokenId: isSet(object.tokenId) ? String(object.tokenId) : "", - authToken: isSet(object.authToken) ? String(object.authToken) : "", - }; - }, - - toJSON(message: GenerateAuthTokenResponse): unknown { - const obj: any = {}; - if (message.tokenId !== undefined && message.tokenId !== "") { - obj.tokenId = message.tokenId; - } - if (message.authToken !== undefined && message.authToken !== "") { - obj.authToken = message.authToken; - } - return obj; - }, - - create( - base?: DeepPartial, - ): GenerateAuthTokenResponse { - return GenerateAuthTokenResponse.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): GenerateAuthTokenResponse { - const message = createBaseGenerateAuthTokenResponse(); - message.tokenId = object.tokenId ?? ""; - message.authToken = object.authToken ?? ""; - return message; - }, + encode(message: GenerateAuthTokenResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.tokenId !== undefined && message.tokenId !== "") { + writer.uint32(10).string(message.tokenId); + } + if (message.authToken !== undefined && message.authToken !== "") { + writer.uint32(18).string(message.authToken); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): GenerateAuthTokenResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGenerateAuthTokenResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.tokenId = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.authToken = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): GenerateAuthTokenResponse { + return { + tokenId: isSet(object.tokenId) ? String(object.tokenId) : "", + authToken: isSet(object.authToken) ? String(object.authToken) : "", + }; + }, + + toJSON(message: GenerateAuthTokenResponse): unknown { + const obj: any = {}; + if (message.tokenId !== undefined && message.tokenId !== "") { + obj.tokenId = message.tokenId; + } + if (message.authToken !== undefined && message.authToken !== "") { + obj.authToken = message.authToken; + } + return obj; + }, + + create(base?: DeepPartial): GenerateAuthTokenResponse { + return GenerateAuthTokenResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): GenerateAuthTokenResponse { + const message = createBaseGenerateAuthTokenResponse(); + message.tokenId = object.tokenId ?? ""; + message.authToken = object.authToken ?? ""; + return message; + }, }; function createBaseGetWalletInfoRequest(): GetWalletInfoRequest { - return { walletId: "" }; + return { walletId: "" }; } export const GetWalletInfoRequest = { - encode( - message: GetWalletInfoRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.walletId !== undefined && message.walletId !== "") { - writer.uint32(10).string(message.walletId); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): GetWalletInfoRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetWalletInfoRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.walletId = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): GetWalletInfoRequest { - return { - walletId: isSet(object.walletId) ? String(object.walletId) : "", - }; - }, - - toJSON(message: GetWalletInfoRequest): unknown { - const obj: any = {}; - if (message.walletId !== undefined && message.walletId !== "") { - obj.walletId = message.walletId; - } - return obj; - }, - - create(base?: DeepPartial): GetWalletInfoRequest { - return GetWalletInfoRequest.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): GetWalletInfoRequest { - const message = createBaseGetWalletInfoRequest(); - message.walletId = object.walletId ?? ""; - return message; - }, + encode(message: GetWalletInfoRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.walletId !== undefined && message.walletId !== "") { + writer.uint32(10).string(message.walletId); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): GetWalletInfoRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGetWalletInfoRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.walletId = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): GetWalletInfoRequest { + return { walletId: isSet(object.walletId) ? String(object.walletId) : "" }; + }, + + toJSON(message: GetWalletInfoRequest): unknown { + const obj: any = {}; + if (message.walletId !== undefined && message.walletId !== "") { + obj.walletId = message.walletId; + } + return obj; + }, + + create(base?: DeepPartial): GetWalletInfoRequest { + return GetWalletInfoRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): GetWalletInfoRequest { + const message = createBaseGetWalletInfoRequest(); + message.walletId = object.walletId ?? ""; + return message; + }, }; function createBaseGetWalletInfoResponse(): GetWalletInfoResponse { - return { wallet: undefined }; + return { wallet: undefined }; } export const GetWalletInfoResponse = { - encode( - message: GetWalletInfoResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.wallet !== undefined) { - WalletConfiguration.encode( - message.wallet, - writer.uint32(10).fork(), - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): GetWalletInfoResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetWalletInfoResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.wallet = WalletConfiguration.decode( - reader, - reader.uint32(), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): GetWalletInfoResponse { - return { - wallet: isSet(object.wallet) - ? WalletConfiguration.fromJSON(object.wallet) - : undefined, - }; - }, - - toJSON(message: GetWalletInfoResponse): unknown { - const obj: any = {}; - if (message.wallet !== undefined) { - obj.wallet = WalletConfiguration.toJSON(message.wallet); - } - return obj; - }, - - create(base?: DeepPartial): GetWalletInfoResponse { - return GetWalletInfoResponse.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): GetWalletInfoResponse { - const message = createBaseGetWalletInfoResponse(); - message.wallet = - object.wallet !== undefined && object.wallet !== null - ? WalletConfiguration.fromPartial(object.wallet) - : undefined; - return message; - }, + encode(message: GetWalletInfoResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.wallet !== undefined) { + WalletConfiguration.encode(message.wallet, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): GetWalletInfoResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGetWalletInfoResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.wallet = WalletConfiguration.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): GetWalletInfoResponse { + return { wallet: isSet(object.wallet) ? WalletConfiguration.fromJSON(object.wallet) : undefined }; + }, + + toJSON(message: GetWalletInfoResponse): unknown { + const obj: any = {}; + if (message.wallet !== undefined) { + obj.wallet = WalletConfiguration.toJSON(message.wallet); + } + return obj; + }, + + create(base?: DeepPartial): GetWalletInfoResponse { + return GetWalletInfoResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): GetWalletInfoResponse { + const message = createBaseGetWalletInfoResponse(); + message.wallet = (object.wallet !== undefined && object.wallet !== null) + ? WalletConfiguration.fromPartial(object.wallet) + : undefined; + return message; + }, }; function createBaseGetMyInfoRequest(): GetMyInfoRequest { - return {}; + return {}; } export const GetMyInfoRequest = { - encode( - _: GetMyInfoRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): GetMyInfoRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetMyInfoRequest(); - 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): GetMyInfoRequest { - return {}; - }, - - toJSON(_: GetMyInfoRequest): unknown { - const obj: any = {}; - return obj; - }, - - create(base?: DeepPartial): GetMyInfoRequest { - return GetMyInfoRequest.fromPartial(base ?? {}); - }, - fromPartial(_: DeepPartial): GetMyInfoRequest { - const message = createBaseGetMyInfoRequest(); - return message; - }, + encode(_: GetMyInfoRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): GetMyInfoRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGetMyInfoRequest(); + 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): GetMyInfoRequest { + return {}; + }, + + toJSON(_: GetMyInfoRequest): unknown { + const obj: any = {}; + return obj; + }, + + create(base?: DeepPartial): GetMyInfoRequest { + return GetMyInfoRequest.fromPartial(base ?? {}); + }, + fromPartial(_: DeepPartial): GetMyInfoRequest { + const message = createBaseGetMyInfoRequest(); + return message; + }, }; function createBaseGetMyInfoResponse(): GetMyInfoResponse { - return { wallet: undefined }; + return { wallet: undefined }; } export const GetMyInfoResponse = { - encode( - message: GetMyInfoResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.wallet !== undefined) { - WalletConfiguration.encode( - message.wallet, - writer.uint32(10).fork(), - ).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): GetMyInfoResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetMyInfoResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.wallet = WalletConfiguration.decode( - reader, - reader.uint32(), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): GetMyInfoResponse { - return { - wallet: isSet(object.wallet) - ? WalletConfiguration.fromJSON(object.wallet) - : undefined, - }; - }, - - toJSON(message: GetMyInfoResponse): unknown { - const obj: any = {}; - if (message.wallet !== undefined) { - obj.wallet = WalletConfiguration.toJSON(message.wallet); - } - return obj; - }, - - create(base?: DeepPartial): GetMyInfoResponse { - return GetMyInfoResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): GetMyInfoResponse { - const message = createBaseGetMyInfoResponse(); - message.wallet = - object.wallet !== undefined && object.wallet !== null - ? WalletConfiguration.fromPartial(object.wallet) - : undefined; - return message; - }, + encode(message: GetMyInfoResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.wallet !== undefined) { + WalletConfiguration.encode(message.wallet, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): GetMyInfoResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGetMyInfoResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.wallet = WalletConfiguration.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): GetMyInfoResponse { + return { wallet: isSet(object.wallet) ? WalletConfiguration.fromJSON(object.wallet) : undefined }; + }, + + toJSON(message: GetMyInfoResponse): unknown { + const obj: any = {}; + if (message.wallet !== undefined) { + obj.wallet = WalletConfiguration.toJSON(message.wallet); + } + return obj; + }, + + create(base?: DeepPartial): GetMyInfoResponse { + return GetMyInfoResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): GetMyInfoResponse { + const message = createBaseGetMyInfoResponse(); + message.wallet = (object.wallet !== undefined && object.wallet !== null) + ? WalletConfiguration.fromPartial(object.wallet) + : undefined; + return message; + }, }; function createBaseRevokeAuthTokenRequest(): RevokeAuthTokenRequest { - return { walletId: "", tokenId: "" }; + return { walletId: "", tokenId: "" }; } export const RevokeAuthTokenRequest = { - encode( - message: RevokeAuthTokenRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.walletId !== undefined && message.walletId !== "") { - writer.uint32(10).string(message.walletId); - } - if (message.tokenId !== undefined && message.tokenId !== "") { - writer.uint32(18).string(message.tokenId); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): RevokeAuthTokenRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRevokeAuthTokenRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.walletId = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.tokenId = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): RevokeAuthTokenRequest { - return { - walletId: isSet(object.walletId) ? String(object.walletId) : "", - tokenId: isSet(object.tokenId) ? String(object.tokenId) : "", - }; - }, - - toJSON(message: RevokeAuthTokenRequest): unknown { - const obj: any = {}; - if (message.walletId !== undefined && message.walletId !== "") { - obj.walletId = message.walletId; - } - if (message.tokenId !== undefined && message.tokenId !== "") { - obj.tokenId = message.tokenId; - } - return obj; - }, - - create(base?: DeepPartial): RevokeAuthTokenRequest { - return RevokeAuthTokenRequest.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): RevokeAuthTokenRequest { - const message = createBaseRevokeAuthTokenRequest(); - message.walletId = object.walletId ?? ""; - message.tokenId = object.tokenId ?? ""; - return message; - }, + encode(message: RevokeAuthTokenRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.walletId !== undefined && message.walletId !== "") { + writer.uint32(10).string(message.walletId); + } + if (message.tokenId !== undefined && message.tokenId !== "") { + writer.uint32(18).string(message.tokenId); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): RevokeAuthTokenRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseRevokeAuthTokenRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.walletId = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.tokenId = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): RevokeAuthTokenRequest { + return { + walletId: isSet(object.walletId) ? String(object.walletId) : "", + tokenId: isSet(object.tokenId) ? String(object.tokenId) : "", + }; + }, + + toJSON(message: RevokeAuthTokenRequest): unknown { + const obj: any = {}; + if (message.walletId !== undefined && message.walletId !== "") { + obj.walletId = message.walletId; + } + if (message.tokenId !== undefined && message.tokenId !== "") { + obj.tokenId = message.tokenId; + } + return obj; + }, + + create(base?: DeepPartial): RevokeAuthTokenRequest { + return RevokeAuthTokenRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): RevokeAuthTokenRequest { + const message = createBaseRevokeAuthTokenRequest(); + message.walletId = object.walletId ?? ""; + message.tokenId = object.tokenId ?? ""; + return message; + }, }; function createBaseRevokeAuthTokenResponse(): RevokeAuthTokenResponse { - return {}; + return {}; } export const RevokeAuthTokenResponse = { - encode( - _: RevokeAuthTokenResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): RevokeAuthTokenResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRevokeAuthTokenResponse(); - 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): RevokeAuthTokenResponse { - return {}; - }, - - toJSON(_: RevokeAuthTokenResponse): unknown { - const obj: any = {}; - return obj; - }, - - create( - base?: DeepPartial, - ): RevokeAuthTokenResponse { - return RevokeAuthTokenResponse.fromPartial(base ?? {}); - }, - fromPartial( - _: DeepPartial, - ): RevokeAuthTokenResponse { - const message = createBaseRevokeAuthTokenResponse(); - return message; - }, + encode(_: RevokeAuthTokenResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): RevokeAuthTokenResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseRevokeAuthTokenResponse(); + 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): RevokeAuthTokenResponse { + return {}; + }, + + toJSON(_: RevokeAuthTokenResponse): unknown { + const obj: any = {}; + return obj; + }, + + create(base?: DeepPartial): RevokeAuthTokenResponse { + return RevokeAuthTokenResponse.fromPartial(base ?? {}); + }, + fromPartial(_: DeepPartial): RevokeAuthTokenResponse { + const message = createBaseRevokeAuthTokenResponse(); + return message; + }, }; function createBaseListWalletsRequest(): ListWalletsRequest { - return { filter: "" }; + return { filter: "" }; } export const ListWalletsRequest = { - encode( - message: ListWalletsRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.filter !== undefined && message.filter !== "") { - writer.uint32(10).string(message.filter); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): ListWalletsRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseListWalletsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.filter = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): ListWalletsRequest { - return { filter: isSet(object.filter) ? String(object.filter) : "" }; - }, - - toJSON(message: ListWalletsRequest): unknown { - const obj: any = {}; - if (message.filter !== undefined && message.filter !== "") { - obj.filter = message.filter; - } - return obj; - }, - - create(base?: DeepPartial): ListWalletsRequest { - return ListWalletsRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): ListWalletsRequest { - const message = createBaseListWalletsRequest(); - message.filter = object.filter ?? ""; - return message; - }, + encode(message: ListWalletsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.filter !== undefined && message.filter !== "") { + writer.uint32(10).string(message.filter); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ListWalletsRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseListWalletsRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.filter = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): ListWalletsRequest { + return { filter: isSet(object.filter) ? String(object.filter) : "" }; + }, + + toJSON(message: ListWalletsRequest): unknown { + const obj: any = {}; + if (message.filter !== undefined && message.filter !== "") { + obj.filter = message.filter; + } + return obj; + }, + + create(base?: DeepPartial): ListWalletsRequest { + return ListWalletsRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): ListWalletsRequest { + const message = createBaseListWalletsRequest(); + message.filter = object.filter ?? ""; + return message; + }, }; function createBaseListWalletsResponse(): ListWalletsResponse { - return { wallets: [] }; + return { wallets: [] }; } export const ListWalletsResponse = { - encode( - message: ListWalletsResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.wallets !== undefined && message.wallets.length !== 0) { - for (const v of message.wallets) { - WalletConfiguration.encode( - v!, - writer.uint32(10).fork(), - ).ldelim(); - } - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): ListWalletsResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseListWalletsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.wallets!.push( - WalletConfiguration.decode(reader, reader.uint32()), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): ListWalletsResponse { - return { - wallets: Array.isArray(object?.wallets) - ? object.wallets.map((e: any) => - WalletConfiguration.fromJSON(e), - ) - : [], - }; - }, - - toJSON(message: ListWalletsResponse): unknown { - const obj: any = {}; - if (message.wallets?.length) { - obj.wallets = message.wallets.map((e) => - WalletConfiguration.toJSON(e), - ); - } - return obj; - }, - - create(base?: DeepPartial): ListWalletsResponse { - return ListWalletsResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): ListWalletsResponse { - const message = createBaseListWalletsResponse(); - message.wallets = - object.wallets?.map((e) => WalletConfiguration.fromPartial(e)) || - []; - return message; - }, + encode(message: ListWalletsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.wallets !== undefined && message.wallets.length !== 0) { + for (const v of message.wallets) { + WalletConfiguration.encode(v!, writer.uint32(10).fork()).ldelim(); + } + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ListWalletsResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseListWalletsResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.wallets!.push(WalletConfiguration.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): ListWalletsResponse { + return { + wallets: Array.isArray(object?.wallets) ? object.wallets.map((e: any) => WalletConfiguration.fromJSON(e)) : [], + }; + }, + + toJSON(message: ListWalletsResponse): unknown { + const obj: any = {}; + if (message.wallets?.length) { + obj.wallets = message.wallets.map((e) => WalletConfiguration.toJSON(e)); + } + return obj; + }, + + create(base?: DeepPartial): ListWalletsResponse { + return ListWalletsResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): ListWalletsResponse { + const message = createBaseListWalletsResponse(); + message.wallets = object.wallets?.map((e) => WalletConfiguration.fromPartial(e)) || []; + return message; + }, }; function createBaseAddExternalIdentityInitRequest(): AddExternalIdentityInitRequest { - return { identity: "", provider: 0 }; + return { identity: "", provider: 0 }; } export const AddExternalIdentityInitRequest = { - encode( - message: AddExternalIdentityInitRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.identity !== undefined && message.identity !== "") { - writer.uint32(10).string(message.identity); - } - if (message.provider !== undefined && message.provider !== 0) { - writer.uint32(16).int32(message.provider); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): AddExternalIdentityInitRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAddExternalIdentityInitRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.identity = reader.string(); - continue; - case 2: - if (tag !== 16) { - break; - } - - message.provider = reader.int32() as any; - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): AddExternalIdentityInitRequest { - return { - identity: isSet(object.identity) ? String(object.identity) : "", - provider: isSet(object.provider) - ? identityProviderFromJSON(object.provider) - : 0, - }; - }, - - toJSON(message: AddExternalIdentityInitRequest): unknown { - const obj: any = {}; - if (message.identity !== undefined && message.identity !== "") { - obj.identity = message.identity; - } - if (message.provider !== undefined && message.provider !== 0) { - obj.provider = identityProviderToJSON(message.provider); - } - return obj; - }, - - create( - base?: DeepPartial, - ): AddExternalIdentityInitRequest { - return AddExternalIdentityInitRequest.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): AddExternalIdentityInitRequest { - const message = createBaseAddExternalIdentityInitRequest(); - message.identity = object.identity ?? ""; - message.provider = object.provider ?? 0; - return message; - }, + encode(message: AddExternalIdentityInitRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.identity !== undefined && message.identity !== "") { + writer.uint32(10).string(message.identity); + } + if (message.provider !== undefined && message.provider !== 0) { + writer.uint32(16).int32(message.provider); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): AddExternalIdentityInitRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAddExternalIdentityInitRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.identity = reader.string(); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.provider = reader.int32() as any; + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): AddExternalIdentityInitRequest { + return { + identity: isSet(object.identity) ? String(object.identity) : "", + provider: isSet(object.provider) ? identityProviderFromJSON(object.provider) : 0, + }; + }, + + toJSON(message: AddExternalIdentityInitRequest): unknown { + const obj: any = {}; + if (message.identity !== undefined && message.identity !== "") { + obj.identity = message.identity; + } + if (message.provider !== undefined && message.provider !== 0) { + obj.provider = identityProviderToJSON(message.provider); + } + return obj; + }, + + create(base?: DeepPartial): AddExternalIdentityInitRequest { + return AddExternalIdentityInitRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): AddExternalIdentityInitRequest { + const message = createBaseAddExternalIdentityInitRequest(); + message.identity = object.identity ?? ""; + message.provider = object.provider ?? 0; + return message; + }, }; function createBaseAddExternalIdentityInitResponse(): AddExternalIdentityInitResponse { - return { challenge: "" }; + return { challenge: "" }; } export const AddExternalIdentityInitResponse = { - encode( - message: AddExternalIdentityInitResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.challenge !== undefined && message.challenge !== "") { - writer.uint32(10).string(message.challenge); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): AddExternalIdentityInitResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAddExternalIdentityInitResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.challenge = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): AddExternalIdentityInitResponse { - return { - challenge: isSet(object.challenge) ? String(object.challenge) : "", - }; - }, - - toJSON(message: AddExternalIdentityInitResponse): unknown { - const obj: any = {}; - if (message.challenge !== undefined && message.challenge !== "") { - obj.challenge = message.challenge; - } - return obj; - }, - - create( - base?: DeepPartial, - ): AddExternalIdentityInitResponse { - return AddExternalIdentityInitResponse.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): AddExternalIdentityInitResponse { - const message = createBaseAddExternalIdentityInitResponse(); - message.challenge = object.challenge ?? ""; - return message; - }, + encode(message: AddExternalIdentityInitResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.challenge !== undefined && message.challenge !== "") { + writer.uint32(10).string(message.challenge); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): AddExternalIdentityInitResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAddExternalIdentityInitResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.challenge = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): AddExternalIdentityInitResponse { + return { challenge: isSet(object.challenge) ? String(object.challenge) : "" }; + }, + + toJSON(message: AddExternalIdentityInitResponse): unknown { + const obj: any = {}; + if (message.challenge !== undefined && message.challenge !== "") { + obj.challenge = message.challenge; + } + return obj; + }, + + create(base?: DeepPartial): AddExternalIdentityInitResponse { + return AddExternalIdentityInitResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): AddExternalIdentityInitResponse { + const message = createBaseAddExternalIdentityInitResponse(); + message.challenge = object.challenge ?? ""; + return message; + }, }; function createBaseAddExternalIdentityConfirmRequest(): AddExternalIdentityConfirmRequest { - return { challenge: "", response: "" }; + return { challenge: "", response: "" }; } export const AddExternalIdentityConfirmRequest = { - encode( - message: AddExternalIdentityConfirmRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.challenge !== undefined && message.challenge !== "") { - writer.uint32(10).string(message.challenge); - } - if (message.response !== undefined && message.response !== "") { - writer.uint32(18).string(message.response); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): AddExternalIdentityConfirmRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAddExternalIdentityConfirmRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.challenge = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.response = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): AddExternalIdentityConfirmRequest { - return { - challenge: isSet(object.challenge) ? String(object.challenge) : "", - response: isSet(object.response) ? String(object.response) : "", - }; - }, - - toJSON(message: AddExternalIdentityConfirmRequest): unknown { - const obj: any = {}; - if (message.challenge !== undefined && message.challenge !== "") { - obj.challenge = message.challenge; - } - if (message.response !== undefined && message.response !== "") { - obj.response = message.response; - } - return obj; - }, - - create( - base?: DeepPartial, - ): AddExternalIdentityConfirmRequest { - return AddExternalIdentityConfirmRequest.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): AddExternalIdentityConfirmRequest { - const message = createBaseAddExternalIdentityConfirmRequest(); - message.challenge = object.challenge ?? ""; - message.response = object.response ?? ""; - return message; - }, + encode(message: AddExternalIdentityConfirmRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.challenge !== undefined && message.challenge !== "") { + writer.uint32(10).string(message.challenge); + } + if (message.response !== undefined && message.response !== "") { + writer.uint32(18).string(message.response); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): AddExternalIdentityConfirmRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAddExternalIdentityConfirmRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.challenge = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.response = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): AddExternalIdentityConfirmRequest { + return { + challenge: isSet(object.challenge) ? String(object.challenge) : "", + response: isSet(object.response) ? String(object.response) : "", + }; + }, + + toJSON(message: AddExternalIdentityConfirmRequest): unknown { + const obj: any = {}; + if (message.challenge !== undefined && message.challenge !== "") { + obj.challenge = message.challenge; + } + if (message.response !== undefined && message.response !== "") { + obj.response = message.response; + } + return obj; + }, + + create(base?: DeepPartial): AddExternalIdentityConfirmRequest { + return AddExternalIdentityConfirmRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): AddExternalIdentityConfirmRequest { + const message = createBaseAddExternalIdentityConfirmRequest(); + message.challenge = object.challenge ?? ""; + message.response = object.response ?? ""; + return message; + }, }; function createBaseAddExternalIdentityConfirmResponse(): AddExternalIdentityConfirmResponse { - return {}; + return {}; } export const AddExternalIdentityConfirmResponse = { - encode( - _: AddExternalIdentityConfirmResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): AddExternalIdentityConfirmResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAddExternalIdentityConfirmResponse(); - 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): AddExternalIdentityConfirmResponse { - return {}; - }, - - toJSON(_: AddExternalIdentityConfirmResponse): unknown { - const obj: any = {}; - return obj; - }, - - create( - base?: DeepPartial, - ): AddExternalIdentityConfirmResponse { - return AddExternalIdentityConfirmResponse.fromPartial(base ?? {}); - }, - fromPartial( - _: DeepPartial, - ): AddExternalIdentityConfirmResponse { - const message = createBaseAddExternalIdentityConfirmResponse(); - return message; - }, + encode(_: AddExternalIdentityConfirmResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): AddExternalIdentityConfirmResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAddExternalIdentityConfirmResponse(); + 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): AddExternalIdentityConfirmResponse { + return {}; + }, + + toJSON(_: AddExternalIdentityConfirmResponse): unknown { + const obj: any = {}; + return obj; + }, + + create(base?: DeepPartial): AddExternalIdentityConfirmResponse { + return AddExternalIdentityConfirmResponse.fromPartial(base ?? {}); + }, + fromPartial(_: DeepPartial): AddExternalIdentityConfirmResponse { + const message = createBaseAddExternalIdentityConfirmResponse(); + return message; + }, }; function createBaseRemoveExternalIdentityRequest(): RemoveExternalIdentityRequest { - return { identity: "" }; + return { identity: "" }; } export const RemoveExternalIdentityRequest = { - encode( - message: RemoveExternalIdentityRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.identity !== undefined && message.identity !== "") { - writer.uint32(10).string(message.identity); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): RemoveExternalIdentityRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRemoveExternalIdentityRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.identity = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): RemoveExternalIdentityRequest { - return { - identity: isSet(object.identity) ? String(object.identity) : "", - }; - }, - - toJSON(message: RemoveExternalIdentityRequest): unknown { - const obj: any = {}; - if (message.identity !== undefined && message.identity !== "") { - obj.identity = message.identity; - } - return obj; - }, - - create( - base?: DeepPartial, - ): RemoveExternalIdentityRequest { - return RemoveExternalIdentityRequest.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): RemoveExternalIdentityRequest { - const message = createBaseRemoveExternalIdentityRequest(); - message.identity = object.identity ?? ""; - return message; - }, + encode(message: RemoveExternalIdentityRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.identity !== undefined && message.identity !== "") { + writer.uint32(10).string(message.identity); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): RemoveExternalIdentityRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseRemoveExternalIdentityRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.identity = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): RemoveExternalIdentityRequest { + return { identity: isSet(object.identity) ? String(object.identity) : "" }; + }, + + toJSON(message: RemoveExternalIdentityRequest): unknown { + const obj: any = {}; + if (message.identity !== undefined && message.identity !== "") { + obj.identity = message.identity; + } + return obj; + }, + + create(base?: DeepPartial): RemoveExternalIdentityRequest { + return RemoveExternalIdentityRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): RemoveExternalIdentityRequest { + const message = createBaseRemoveExternalIdentityRequest(); + message.identity = object.identity ?? ""; + return message; + }, }; function createBaseRemoveExternalIdentityResponse(): RemoveExternalIdentityResponse { - return {}; + return {}; } export const RemoveExternalIdentityResponse = { - encode( - _: RemoveExternalIdentityResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): RemoveExternalIdentityResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRemoveExternalIdentityResponse(); - 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): RemoveExternalIdentityResponse { - return {}; - }, - - toJSON(_: RemoveExternalIdentityResponse): unknown { - const obj: any = {}; - return obj; - }, - - create( - base?: DeepPartial, - ): RemoveExternalIdentityResponse { - return RemoveExternalIdentityResponse.fromPartial(base ?? {}); - }, - fromPartial( - _: DeepPartial, - ): RemoveExternalIdentityResponse { - const message = createBaseRemoveExternalIdentityResponse(); - return message; - }, + encode(_: RemoveExternalIdentityResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): RemoveExternalIdentityResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseRemoveExternalIdentityResponse(); + 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): RemoveExternalIdentityResponse { + return {}; + }, + + toJSON(_: RemoveExternalIdentityResponse): unknown { + const obj: any = {}; + return obj; + }, + + create(base?: DeepPartial): RemoveExternalIdentityResponse { + return RemoveExternalIdentityResponse.fromPartial(base ?? {}); + }, + fromPartial(_: DeepPartial): RemoveExternalIdentityResponse { + const message = createBaseRemoveExternalIdentityResponse(); + return message; + }, }; function createBaseAuthenticateInitRequest(): AuthenticateInitRequest { - return { identity: "", provider: 0, ecosystemId: "" }; + return { identity: "", provider: 0, ecosystemId: "" }; } export const AuthenticateInitRequest = { - encode( - message: AuthenticateInitRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.identity !== undefined && message.identity !== "") { - writer.uint32(10).string(message.identity); - } - if (message.provider !== undefined && message.provider !== 0) { - writer.uint32(16).int32(message.provider); - } - if (message.ecosystemId !== undefined && message.ecosystemId !== "") { - writer.uint32(26).string(message.ecosystemId); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): AuthenticateInitRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAuthenticateInitRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.identity = reader.string(); - continue; - case 2: - if (tag !== 16) { - break; - } - - message.provider = reader.int32() as any; - continue; - case 3: - if (tag !== 26) { - break; - } - - message.ecosystemId = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): AuthenticateInitRequest { - return { - identity: isSet(object.identity) ? String(object.identity) : "", - provider: isSet(object.provider) - ? identityProviderFromJSON(object.provider) - : 0, - ecosystemId: isSet(object.ecosystemId) - ? String(object.ecosystemId) - : "", - }; - }, - - toJSON(message: AuthenticateInitRequest): unknown { - const obj: any = {}; - if (message.identity !== undefined && message.identity !== "") { - obj.identity = message.identity; - } - if (message.provider !== undefined && message.provider !== 0) { - obj.provider = identityProviderToJSON(message.provider); - } - if (message.ecosystemId !== undefined && message.ecosystemId !== "") { - obj.ecosystemId = message.ecosystemId; - } - return obj; - }, - - create( - base?: DeepPartial, - ): AuthenticateInitRequest { - return AuthenticateInitRequest.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): AuthenticateInitRequest { - const message = createBaseAuthenticateInitRequest(); - message.identity = object.identity ?? ""; - message.provider = object.provider ?? 0; - message.ecosystemId = object.ecosystemId ?? ""; - return message; - }, + encode(message: AuthenticateInitRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.identity !== undefined && message.identity !== "") { + writer.uint32(10).string(message.identity); + } + if (message.provider !== undefined && message.provider !== 0) { + writer.uint32(16).int32(message.provider); + } + if (message.ecosystemId !== undefined && message.ecosystemId !== "") { + writer.uint32(26).string(message.ecosystemId); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): AuthenticateInitRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAuthenticateInitRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.identity = reader.string(); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.provider = reader.int32() as any; + continue; + case 3: + if (tag !== 26) { + break; + } + + message.ecosystemId = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): AuthenticateInitRequest { + return { + identity: isSet(object.identity) ? String(object.identity) : "", + provider: isSet(object.provider) ? identityProviderFromJSON(object.provider) : 0, + ecosystemId: isSet(object.ecosystemId) ? String(object.ecosystemId) : "", + }; + }, + + toJSON(message: AuthenticateInitRequest): unknown { + const obj: any = {}; + if (message.identity !== undefined && message.identity !== "") { + obj.identity = message.identity; + } + if (message.provider !== undefined && message.provider !== 0) { + obj.provider = identityProviderToJSON(message.provider); + } + if (message.ecosystemId !== undefined && message.ecosystemId !== "") { + obj.ecosystemId = message.ecosystemId; + } + return obj; + }, + + create(base?: DeepPartial): AuthenticateInitRequest { + return AuthenticateInitRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): AuthenticateInitRequest { + const message = createBaseAuthenticateInitRequest(); + message.identity = object.identity ?? ""; + message.provider = object.provider ?? 0; + message.ecosystemId = object.ecosystemId ?? ""; + return message; + }, }; function createBaseAuthenticateInitResponse(): AuthenticateInitResponse { - return { challenge: "" }; + return { challenge: "" }; } export const AuthenticateInitResponse = { - encode( - message: AuthenticateInitResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.challenge !== undefined && message.challenge !== "") { - writer.uint32(10).string(message.challenge); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): AuthenticateInitResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAuthenticateInitResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.challenge = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): AuthenticateInitResponse { - return { - challenge: isSet(object.challenge) ? String(object.challenge) : "", - }; - }, - - toJSON(message: AuthenticateInitResponse): unknown { - const obj: any = {}; - if (message.challenge !== undefined && message.challenge !== "") { - obj.challenge = message.challenge; - } - return obj; - }, - - create( - base?: DeepPartial, - ): AuthenticateInitResponse { - return AuthenticateInitResponse.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): AuthenticateInitResponse { - const message = createBaseAuthenticateInitResponse(); - message.challenge = object.challenge ?? ""; - return message; - }, + encode(message: AuthenticateInitResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.challenge !== undefined && message.challenge !== "") { + writer.uint32(10).string(message.challenge); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): AuthenticateInitResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAuthenticateInitResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.challenge = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): AuthenticateInitResponse { + return { challenge: isSet(object.challenge) ? String(object.challenge) : "" }; + }, + + toJSON(message: AuthenticateInitResponse): unknown { + const obj: any = {}; + if (message.challenge !== undefined && message.challenge !== "") { + obj.challenge = message.challenge; + } + return obj; + }, + + create(base?: DeepPartial): AuthenticateInitResponse { + return AuthenticateInitResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): AuthenticateInitResponse { + const message = createBaseAuthenticateInitResponse(); + message.challenge = object.challenge ?? ""; + return message; + }, }; function createBaseAuthenticateResendCodeRequest(): AuthenticateResendCodeRequest { - return { challenge: "" }; + return { challenge: "" }; } export const AuthenticateResendCodeRequest = { - encode( - message: AuthenticateResendCodeRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.challenge !== undefined && message.challenge !== "") { - writer.uint32(10).string(message.challenge); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): AuthenticateResendCodeRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAuthenticateResendCodeRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.challenge = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): AuthenticateResendCodeRequest { - return { - challenge: isSet(object.challenge) ? String(object.challenge) : "", - }; - }, - - toJSON(message: AuthenticateResendCodeRequest): unknown { - const obj: any = {}; - if (message.challenge !== undefined && message.challenge !== "") { - obj.challenge = message.challenge; - } - return obj; - }, - - create( - base?: DeepPartial, - ): AuthenticateResendCodeRequest { - return AuthenticateResendCodeRequest.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): AuthenticateResendCodeRequest { - const message = createBaseAuthenticateResendCodeRequest(); - message.challenge = object.challenge ?? ""; - return message; - }, + encode(message: AuthenticateResendCodeRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.challenge !== undefined && message.challenge !== "") { + writer.uint32(10).string(message.challenge); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): AuthenticateResendCodeRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAuthenticateResendCodeRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.challenge = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): AuthenticateResendCodeRequest { + return { challenge: isSet(object.challenge) ? String(object.challenge) : "" }; + }, + + toJSON(message: AuthenticateResendCodeRequest): unknown { + const obj: any = {}; + if (message.challenge !== undefined && message.challenge !== "") { + obj.challenge = message.challenge; + } + return obj; + }, + + create(base?: DeepPartial): AuthenticateResendCodeRequest { + return AuthenticateResendCodeRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): AuthenticateResendCodeRequest { + const message = createBaseAuthenticateResendCodeRequest(); + message.challenge = object.challenge ?? ""; + return message; + }, }; function createBaseAuthenticateResendCodeResponse(): AuthenticateResendCodeResponse { - return {}; + return {}; } export const AuthenticateResendCodeResponse = { - encode( - _: AuthenticateResendCodeResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): AuthenticateResendCodeResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAuthenticateResendCodeResponse(); - 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): AuthenticateResendCodeResponse { - return {}; - }, - - toJSON(_: AuthenticateResendCodeResponse): unknown { - const obj: any = {}; - return obj; - }, - - create( - base?: DeepPartial, - ): AuthenticateResendCodeResponse { - return AuthenticateResendCodeResponse.fromPartial(base ?? {}); - }, - fromPartial( - _: DeepPartial, - ): AuthenticateResendCodeResponse { - const message = createBaseAuthenticateResendCodeResponse(); - return message; - }, + encode(_: AuthenticateResendCodeResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): AuthenticateResendCodeResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAuthenticateResendCodeResponse(); + 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): AuthenticateResendCodeResponse { + return {}; + }, + + toJSON(_: AuthenticateResendCodeResponse): unknown { + const obj: any = {}; + return obj; + }, + + create(base?: DeepPartial): AuthenticateResendCodeResponse { + return AuthenticateResendCodeResponse.fromPartial(base ?? {}); + }, + fromPartial(_: DeepPartial): AuthenticateResendCodeResponse { + const message = createBaseAuthenticateResendCodeResponse(); + return message; + }, }; function createBaseAuthenticateConfirmRequest(): AuthenticateConfirmRequest { - return { challenge: "", response: "" }; + return { challenge: "", response: "" }; } export const AuthenticateConfirmRequest = { - encode( - message: AuthenticateConfirmRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.challenge !== undefined && message.challenge !== "") { - writer.uint32(10).string(message.challenge); - } - if (message.response !== undefined && message.response !== "") { - writer.uint32(18).string(message.response); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): AuthenticateConfirmRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAuthenticateConfirmRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.challenge = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.response = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): AuthenticateConfirmRequest { - return { - challenge: isSet(object.challenge) ? String(object.challenge) : "", - response: isSet(object.response) ? String(object.response) : "", - }; - }, - - toJSON(message: AuthenticateConfirmRequest): unknown { - const obj: any = {}; - if (message.challenge !== undefined && message.challenge !== "") { - obj.challenge = message.challenge; - } - if (message.response !== undefined && message.response !== "") { - obj.response = message.response; - } - return obj; - }, - - create( - base?: DeepPartial, - ): AuthenticateConfirmRequest { - return AuthenticateConfirmRequest.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): AuthenticateConfirmRequest { - const message = createBaseAuthenticateConfirmRequest(); - message.challenge = object.challenge ?? ""; - message.response = object.response ?? ""; - return message; - }, + encode(message: AuthenticateConfirmRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.challenge !== undefined && message.challenge !== "") { + writer.uint32(10).string(message.challenge); + } + if (message.response !== undefined && message.response !== "") { + writer.uint32(18).string(message.response); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): AuthenticateConfirmRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAuthenticateConfirmRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.challenge = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.response = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): AuthenticateConfirmRequest { + return { + challenge: isSet(object.challenge) ? String(object.challenge) : "", + response: isSet(object.response) ? String(object.response) : "", + }; + }, + + toJSON(message: AuthenticateConfirmRequest): unknown { + const obj: any = {}; + if (message.challenge !== undefined && message.challenge !== "") { + obj.challenge = message.challenge; + } + if (message.response !== undefined && message.response !== "") { + obj.response = message.response; + } + return obj; + }, + + create(base?: DeepPartial): AuthenticateConfirmRequest { + return AuthenticateConfirmRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): AuthenticateConfirmRequest { + const message = createBaseAuthenticateConfirmRequest(); + message.challenge = object.challenge ?? ""; + message.response = object.response ?? ""; + return message; + }, }; function createBaseAuthenticateConfirmResponse(): AuthenticateConfirmResponse { - return { authToken: "" }; + return { authToken: "" }; } export const AuthenticateConfirmResponse = { - encode( - message: AuthenticateConfirmResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.authToken !== undefined && message.authToken !== "") { - writer.uint32(10).string(message.authToken); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): AuthenticateConfirmResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAuthenticateConfirmResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.authToken = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): AuthenticateConfirmResponse { - return { - authToken: isSet(object.authToken) ? String(object.authToken) : "", - }; - }, - - toJSON(message: AuthenticateConfirmResponse): unknown { - const obj: any = {}; - if (message.authToken !== undefined && message.authToken !== "") { - obj.authToken = message.authToken; - } - return obj; - }, - - create( - base?: DeepPartial, - ): AuthenticateConfirmResponse { - return AuthenticateConfirmResponse.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): AuthenticateConfirmResponse { - const message = createBaseAuthenticateConfirmResponse(); - message.authToken = object.authToken ?? ""; - return message; - }, + encode(message: AuthenticateConfirmResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.authToken !== undefined && message.authToken !== "") { + writer.uint32(10).string(message.authToken); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): AuthenticateConfirmResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAuthenticateConfirmResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.authToken = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): AuthenticateConfirmResponse { + return { authToken: isSet(object.authToken) ? String(object.authToken) : "" }; + }, + + toJSON(message: AuthenticateConfirmResponse): unknown { + const obj: any = {}; + if (message.authToken !== undefined && message.authToken !== "") { + obj.authToken = message.authToken; + } + return obj; + }, + + create(base?: DeepPartial): AuthenticateConfirmResponse { + return AuthenticateConfirmResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): AuthenticateConfirmResponse { + const message = createBaseAuthenticateConfirmResponse(); + message.authToken = object.authToken ?? ""; + return message; + }, }; function createBaseListByVerificationTemplateRequest(): ListByVerificationTemplateRequest { - return { verificationTemplateId: "", continuationToken: "" }; + return { verificationTemplateId: "", continuationToken: "" }; } export const ListByVerificationTemplateRequest = { - encode( - message: ListByVerificationTemplateRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if ( - message.verificationTemplateId !== undefined && - message.verificationTemplateId !== "" - ) { - writer.uint32(10).string(message.verificationTemplateId); - } - if ( - message.continuationToken !== undefined && - message.continuationToken !== "" - ) { - writer.uint32(18).string(message.continuationToken); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): ListByVerificationTemplateRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseListByVerificationTemplateRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.verificationTemplateId = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.continuationToken = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): ListByVerificationTemplateRequest { - return { - verificationTemplateId: isSet(object.verificationTemplateId) - ? String(object.verificationTemplateId) - : "", - continuationToken: isSet(object.continuationToken) - ? String(object.continuationToken) - : "", - }; - }, - - toJSON(message: ListByVerificationTemplateRequest): unknown { - const obj: any = {}; - if ( - message.verificationTemplateId !== undefined && - message.verificationTemplateId !== "" - ) { - obj.verificationTemplateId = message.verificationTemplateId; - } - if ( - message.continuationToken !== undefined && - message.continuationToken !== "" - ) { - obj.continuationToken = message.continuationToken; - } - return obj; - }, - - create( - base?: DeepPartial, - ): ListByVerificationTemplateRequest { - return ListByVerificationTemplateRequest.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): ListByVerificationTemplateRequest { - const message = createBaseListByVerificationTemplateRequest(); - message.verificationTemplateId = object.verificationTemplateId ?? ""; - message.continuationToken = object.continuationToken ?? ""; - return message; - }, + encode(message: ListByVerificationTemplateRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.verificationTemplateId !== undefined && message.verificationTemplateId !== "") { + writer.uint32(10).string(message.verificationTemplateId); + } + if (message.continuationToken !== undefined && message.continuationToken !== "") { + writer.uint32(18).string(message.continuationToken); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ListByVerificationTemplateRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseListByVerificationTemplateRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.verificationTemplateId = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.continuationToken = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): ListByVerificationTemplateRequest { + return { + verificationTemplateId: isSet(object.verificationTemplateId) ? String(object.verificationTemplateId) : "", + continuationToken: isSet(object.continuationToken) ? String(object.continuationToken) : "", + }; + }, + + toJSON(message: ListByVerificationTemplateRequest): unknown { + const obj: any = {}; + if (message.verificationTemplateId !== undefined && message.verificationTemplateId !== "") { + obj.verificationTemplateId = message.verificationTemplateId; + } + if (message.continuationToken !== undefined && message.continuationToken !== "") { + obj.continuationToken = message.continuationToken; + } + return obj; + }, + + create(base?: DeepPartial): ListByVerificationTemplateRequest { + return ListByVerificationTemplateRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): ListByVerificationTemplateRequest { + const message = createBaseListByVerificationTemplateRequest(); + message.verificationTemplateId = object.verificationTemplateId ?? ""; + message.continuationToken = object.continuationToken ?? ""; + return message; + }, }; function createBaseListByVerificationTemplateResponse(): ListByVerificationTemplateResponse { - return { items: [], hasMoreResults: false, continuationToken: "" }; + return { items: [], hasMoreResults: false, continuationToken: "" }; } export const ListByVerificationTemplateResponse = { - encode( - message: ListByVerificationTemplateResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.items !== undefined && message.items.length !== 0) { - for (const v of message.items) { - writer.uint32(10).string(v!); - } - } - if (message.hasMoreResults === true) { - writer.uint32(16).bool(message.hasMoreResults); - } - if ( - message.continuationToken !== undefined && - message.continuationToken !== "" - ) { - writer.uint32(26).string(message.continuationToken); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): ListByVerificationTemplateResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseListByVerificationTemplateResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.items!.push(reader.string()); - continue; - case 2: - if (tag !== 16) { - break; - } - - message.hasMoreResults = reader.bool(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.continuationToken = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): ListByVerificationTemplateResponse { - return { - items: Array.isArray(object?.items) - ? object.items.map((e: any) => String(e)) - : [], - hasMoreResults: isSet(object.hasMoreResults) - ? Boolean(object.hasMoreResults) - : false, - continuationToken: isSet(object.continuationToken) - ? String(object.continuationToken) - : "", - }; - }, - - toJSON(message: ListByVerificationTemplateResponse): unknown { - const obj: any = {}; - if (message.items?.length) { - obj.items = message.items; - } - if (message.hasMoreResults === true) { - obj.hasMoreResults = message.hasMoreResults; - } - if ( - message.continuationToken !== undefined && - message.continuationToken !== "" - ) { - obj.continuationToken = message.continuationToken; - } - return obj; - }, - - create( - base?: DeepPartial, - ): ListByVerificationTemplateResponse { - return ListByVerificationTemplateResponse.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): ListByVerificationTemplateResponse { - const message = createBaseListByVerificationTemplateResponse(); - message.items = object.items?.map((e) => e) || []; - message.hasMoreResults = object.hasMoreResults ?? false; - message.continuationToken = object.continuationToken ?? ""; - return message; - }, + encode(message: ListByVerificationTemplateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.items !== undefined && message.items.length !== 0) { + for (const v of message.items) { + writer.uint32(10).string(v!); + } + } + if (message.hasMoreResults === true) { + writer.uint32(16).bool(message.hasMoreResults); + } + if (message.continuationToken !== undefined && message.continuationToken !== "") { + writer.uint32(26).string(message.continuationToken); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ListByVerificationTemplateResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseListByVerificationTemplateResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.items!.push(reader.string()); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.hasMoreResults = reader.bool(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.continuationToken = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): ListByVerificationTemplateResponse { + return { + items: Array.isArray(object?.items) ? object.items.map((e: any) => String(e)) : [], + hasMoreResults: isSet(object.hasMoreResults) ? Boolean(object.hasMoreResults) : false, + continuationToken: isSet(object.continuationToken) ? String(object.continuationToken) : "", + }; + }, + + toJSON(message: ListByVerificationTemplateResponse): unknown { + const obj: any = {}; + if (message.items?.length) { + obj.items = message.items; + } + if (message.hasMoreResults === true) { + obj.hasMoreResults = message.hasMoreResults; + } + if (message.continuationToken !== undefined && message.continuationToken !== "") { + obj.continuationToken = message.continuationToken; + } + return obj; + }, + + create(base?: DeepPartial): ListByVerificationTemplateResponse { + return ListByVerificationTemplateResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): ListByVerificationTemplateResponse { + const message = createBaseListByVerificationTemplateResponse(); + message.items = object.items?.map((e) => e) || []; + message.hasMoreResults = object.hasMoreResults ?? false; + message.continuationToken = object.continuationToken ?? ""; + return message; + }, }; /** Service for managing wallets */ export type UniversalWalletDefinition = typeof UniversalWalletDefinition; export const UniversalWalletDefinition = { - name: "UniversalWallet", - fullName: "services.universalwallet.v1.UniversalWallet", - methods: { - /** Retrieve an item from the wallet with a given item identifier */ - getItem: { - name: "GetItem", - requestType: GetItemRequest, - requestStream: false, - responseType: GetItemResponse, - responseStream: false, - options: {}, - }, - /** Search the wallet using a SQL syntax */ - search: { - name: "Search", - requestType: SearchRequest, - requestStream: false, - responseType: SearchResponse, - responseStream: false, - options: {}, - }, - /** Insert an item into the wallet */ - insertItem: { - name: "InsertItem", - requestType: InsertItemRequest, - requestStream: false, - responseType: InsertItemResponse, - responseStream: false, - options: {}, - }, - /** Update an item in the wallet */ - updateItem: { - name: "UpdateItem", - requestType: UpdateItemRequest, - requestStream: false, - responseType: UpdateItemResponse, - responseStream: false, - options: {}, - }, - /** Delete an item from the wallet permanently */ - deleteItem: { - name: "DeleteItem", - requestType: DeleteItemRequest, - requestStream: false, - responseType: DeleteItemResponse, - responseStream: false, - options: {}, - }, - /** Delete a wallet and its credentials */ - deleteWallet: { - name: "DeleteWallet", - requestType: DeleteWalletRequest, - requestStream: false, - responseType: DeleteWalletResponse, - responseStream: false, - options: {}, - }, - /** Create a new wallet and generate an auth token for access */ - createWallet: { - name: "CreateWallet", - requestType: CreateWalletRequest, - requestStream: false, - responseType: CreateWalletResponse, - responseStream: false, - options: {}, - }, - /** Retrieve wallet details and configuration */ - getWalletInfo: { - name: "GetWalletInfo", - requestType: GetWalletInfoRequest, - requestStream: false, - responseType: GetWalletInfoResponse, - responseStream: false, - options: {}, - }, - /** Retrieve wallet details and configuration about the currently authenticated wallet */ - getMyInfo: { - name: "GetMyInfo", - requestType: GetMyInfoRequest, - requestStream: false, - responseType: GetMyInfoResponse, - responseStream: false, - options: { - _unknownFields: { 480010: [new Uint8Array([2, 24, 1])] }, - }, - }, - /** - * Generate new token for a given wallet and add it to the collection of known auth tokens. - * This endpoint requires authentication and will return a new token ID and auth token. - * Use this endpoint if you want to authorize another device, without having to share your - * existing auth token. - */ - generateAuthToken: { - name: "GenerateAuthToken", - requestType: GenerateAuthTokenRequest, - requestStream: false, - responseType: GenerateAuthTokenResponse, - responseStream: false, - options: {}, - }, - /** - * Revokes a previously issued auth token and updates the collection of known auth tokens. - * This endpoint requires authentication. - */ - revokeAuthToken: { - name: "RevokeAuthToken", - requestType: RevokeAuthTokenRequest, - requestStream: false, - responseType: RevokeAuthTokenResponse, - responseStream: false, - options: {}, - }, - /** - * Add new external identity to the current wallet, such as email, sms, ethereum address, etc. - * This identity ownership must be confirmed using `AddIdentityConfirm` via OTP, signature, etc. - */ - addExternalIdentityInit: { - name: "AddExternalIdentityInit", - requestType: AddExternalIdentityInitRequest, - requestStream: false, - responseType: AddExternalIdentityInitResponse, - responseStream: false, - options: {}, - }, - /** Confirm identity added to the current wallet using `AddExternalIdentityInit` */ - addExternalIdentityConfirm: { - name: "AddExternalIdentityConfirm", - requestType: AddExternalIdentityConfirmRequest, - requestStream: false, - responseType: AddExternalIdentityConfirmResponse, - responseStream: false, - options: {}, - }, - /** Remove an external identity from the current wallet */ - removeExternalIdentity: { - name: "RemoveExternalIdentity", - requestType: RemoveExternalIdentityRequest, - requestStream: false, - responseType: RemoveExternalIdentityResponse, - responseStream: false, - options: {}, - }, - /** - * Sign-in to an already existing wallet, using an identity added that was previously registered - * This endpoint does not require authentication, and will return a challenge to be signed or verified - */ - authenticateInit: { - name: "AuthenticateInit", - requestType: AuthenticateInitRequest, - requestStream: false, - responseType: AuthenticateInitResponse, - responseStream: false, - options: {}, - }, - /** Confirm sign-in to an already existing wallet and return authentication token */ - authenticateConfirm: { - name: "AuthenticateConfirm", - requestType: AuthenticateConfirmRequest, - requestStream: false, - responseType: AuthenticateConfirmResponse, - responseStream: false, - options: {}, - }, - /** Resend previous authentication code */ - authenticateResendCode: { - name: "AuthenticateResendCode", - requestType: AuthenticateResendCodeRequest, - requestStream: false, - responseType: AuthenticateResendCodeResponse, - responseStream: false, - options: {}, - }, - /** List all wallets in the ecosystem */ - listWallets: { - name: "ListWallets", - requestType: ListWalletsRequest, - requestStream: false, - responseType: ListWalletsResponse, - responseStream: false, - options: {}, - }, - /** List credentials which match a given verification template */ - listByVerificationTemplate: { - name: "ListByVerificationTemplate", - requestType: ListByVerificationTemplateRequest, - requestStream: false, - responseType: ListByVerificationTemplateResponse, - responseStream: false, - options: {}, - }, + name: "UniversalWallet", + fullName: "services.universalwallet.v1.UniversalWallet", + methods: { + /** Retrieve an item from the wallet with a given item identifier */ + getItem: { + name: "GetItem", + requestType: GetItemRequest, + requestStream: false, + responseType: GetItemResponse, + responseStream: false, + options: {}, + }, + /** Search the wallet using a SQL syntax */ + search: { + name: "Search", + requestType: SearchRequest, + requestStream: false, + responseType: SearchResponse, + responseStream: false, + options: {}, + }, + /** Insert an item into the wallet */ + insertItem: { + name: "InsertItem", + requestType: InsertItemRequest, + requestStream: false, + responseType: InsertItemResponse, + responseStream: false, + options: {}, + }, + /** Update an item in the wallet */ + updateItem: { + name: "UpdateItem", + requestType: UpdateItemRequest, + requestStream: false, + responseType: UpdateItemResponse, + responseStream: false, + options: {}, + }, + /** Delete an item from the wallet permanently */ + deleteItem: { + name: "DeleteItem", + requestType: DeleteItemRequest, + requestStream: false, + responseType: DeleteItemResponse, + responseStream: false, + options: {}, + }, + /** Delete a wallet and its credentials */ + deleteWallet: { + name: "DeleteWallet", + requestType: DeleteWalletRequest, + requestStream: false, + responseType: DeleteWalletResponse, + responseStream: false, + options: {}, + }, + /** Create a new wallet and generate an auth token for access */ + createWallet: { + name: "CreateWallet", + requestType: CreateWalletRequest, + requestStream: false, + responseType: CreateWalletResponse, + responseStream: false, + options: {}, + }, + /** Retrieve wallet details and configuration */ + getWalletInfo: { + name: "GetWalletInfo", + requestType: GetWalletInfoRequest, + requestStream: false, + responseType: GetWalletInfoResponse, + responseStream: false, + options: {}, + }, + /** Retrieve wallet details and configuration about the currently authenticated wallet */ + getMyInfo: { + name: "GetMyInfo", + requestType: GetMyInfoRequest, + requestStream: false, + responseType: GetMyInfoResponse, + responseStream: false, + options: { _unknownFields: { 480010: [new Uint8Array([2, 24, 1])] } }, + }, + /** + * Generate new token for a given wallet and add it to the collection of known auth tokens. + * This endpoint requires authentication and will return a new token ID and auth token. + * Use this endpoint if you want to authorize another device, without having to share your + * existing auth token. + */ + generateAuthToken: { + name: "GenerateAuthToken", + requestType: GenerateAuthTokenRequest, + requestStream: false, + responseType: GenerateAuthTokenResponse, + responseStream: false, + options: {}, }, + /** + * Revokes a previously issued auth token and updates the collection of known auth tokens. + * This endpoint requires authentication. + */ + revokeAuthToken: { + name: "RevokeAuthToken", + requestType: RevokeAuthTokenRequest, + requestStream: false, + responseType: RevokeAuthTokenResponse, + responseStream: false, + options: {}, + }, + /** + * Add new external identity to the current wallet, such as email, sms, ethereum address, etc. + * This identity ownership must be confirmed using `AddIdentityConfirm` via OTP, signature, etc. + */ + addExternalIdentityInit: { + name: "AddExternalIdentityInit", + requestType: AddExternalIdentityInitRequest, + requestStream: false, + responseType: AddExternalIdentityInitResponse, + responseStream: false, + options: {}, + }, + /** Confirm identity added to the current wallet using `AddExternalIdentityInit` */ + addExternalIdentityConfirm: { + name: "AddExternalIdentityConfirm", + requestType: AddExternalIdentityConfirmRequest, + requestStream: false, + responseType: AddExternalIdentityConfirmResponse, + responseStream: false, + options: {}, + }, + /** Remove an external identity from the current wallet */ + removeExternalIdentity: { + name: "RemoveExternalIdentity", + requestType: RemoveExternalIdentityRequest, + requestStream: false, + responseType: RemoveExternalIdentityResponse, + responseStream: false, + options: {}, + }, + /** + * Sign-in to an already existing wallet, using an identity added that was previously registered + * This endpoint does not require authentication, and will return a challenge to be signed or verified + */ + authenticateInit: { + name: "AuthenticateInit", + requestType: AuthenticateInitRequest, + requestStream: false, + responseType: AuthenticateInitResponse, + responseStream: false, + options: {}, + }, + /** Confirm sign-in to an already existing wallet and return authentication token */ + authenticateConfirm: { + name: "AuthenticateConfirm", + requestType: AuthenticateConfirmRequest, + requestStream: false, + responseType: AuthenticateConfirmResponse, + responseStream: false, + options: {}, + }, + /** Resend previous authentication code */ + authenticateResendCode: { + name: "AuthenticateResendCode", + requestType: AuthenticateResendCodeRequest, + requestStream: false, + responseType: AuthenticateResendCodeResponse, + responseStream: false, + options: {}, + }, + /** List all wallets in the ecosystem */ + listWallets: { + name: "ListWallets", + requestType: ListWalletsRequest, + requestStream: false, + responseType: ListWalletsResponse, + responseStream: false, + options: {}, + }, + /** List credentials which match a given verification template */ + listByVerificationTemplate: { + name: "ListByVerificationTemplate", + requestType: ListByVerificationTemplateRequest, + requestStream: false, + responseType: ListByVerificationTemplateResponse, + responseStream: false, + options: {}, + }, + }, } as const; -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; function isSet(value: any): boolean { - return value !== null && value !== undefined; + return value !== null && value !== undefined; } diff --git a/web/src/proto/services/verifiable-credentials/templates/v1/templates.ts b/web/src/proto/services/verifiable-credentials/templates/v1/templates.ts index 31064e0bc..11f1ac00b 100644 --- a/web/src/proto/services/verifiable-credentials/templates/v1/templates.ts +++ b/web/src/proto/services/verifiable-credentials/templates/v1/templates.ts @@ -3,5255 +3,4509 @@ import _m0 from "protobufjs/minimal"; /** Valid types for credential fields */ export enum FieldType { - STRING = 0, - NUMBER = 1, - BOOL = 2, - DATETIME = 4, - URI = 5, - UNRECOGNIZED = -1, + STRING = 0, + NUMBER = 1, + BOOL = 2, + DATETIME = 4, + URI = 5, + UNRECOGNIZED = -1, } export function fieldTypeFromJSON(object: any): FieldType { - switch (object) { - case 0: - case "STRING": - return FieldType.STRING; - case 1: - case "NUMBER": - return FieldType.NUMBER; - case 2: - case "BOOL": - return FieldType.BOOL; - case 4: - case "DATETIME": - return FieldType.DATETIME; - case 5: - case "URI": - return FieldType.URI; - case -1: - case "UNRECOGNIZED": - default: - return FieldType.UNRECOGNIZED; - } + switch (object) { + case 0: + case "STRING": + return FieldType.STRING; + case 1: + case "NUMBER": + return FieldType.NUMBER; + case 2: + case "BOOL": + return FieldType.BOOL; + case 4: + case "DATETIME": + return FieldType.DATETIME; + case 5: + case "URI": + return FieldType.URI; + case -1: + case "UNRECOGNIZED": + default: + return FieldType.UNRECOGNIZED; + } } export function fieldTypeToJSON(object: FieldType): string { - switch (object) { - case FieldType.STRING: - return "STRING"; - case FieldType.NUMBER: - return "NUMBER"; - case FieldType.BOOL: - return "BOOL"; - case FieldType.DATETIME: - return "DATETIME"; - case FieldType.URI: - return "URI"; - case FieldType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } + switch (object) { + case FieldType.STRING: + return "STRING"; + case FieldType.NUMBER: + return "NUMBER"; + case FieldType.BOOL: + return "BOOL"; + case FieldType.DATETIME: + return "DATETIME"; + case FieldType.URI: + return "URI"; + case FieldType.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } } /** How to display a URI value when rendering a credential. */ export enum UriRenderMethod { - /** TEXT - Display URI as text */ - TEXT = 0, - /** LINK - Display URI as a clickable link */ - LINK = 1, - /** INLINE_IMAGE - Display URI as an inline image. Only takes effect if the template field's MIME Type is an image type. */ - INLINE_IMAGE = 2, - UNRECOGNIZED = -1, + /** TEXT - Display URI as text */ + TEXT = 0, + /** LINK - Display URI as a clickable link */ + LINK = 1, + /** INLINE_IMAGE - Display URI as an inline image. Only takes effect if the template field's MIME Type is an image type. */ + INLINE_IMAGE = 2, + UNRECOGNIZED = -1, } export function uriRenderMethodFromJSON(object: any): UriRenderMethod { - switch (object) { - case 0: - case "TEXT": - return UriRenderMethod.TEXT; - case 1: - case "LINK": - return UriRenderMethod.LINK; - case 2: - case "INLINE_IMAGE": - return UriRenderMethod.INLINE_IMAGE; - case -1: - case "UNRECOGNIZED": - default: - return UriRenderMethod.UNRECOGNIZED; - } + switch (object) { + case 0: + case "TEXT": + return UriRenderMethod.TEXT; + case 1: + case "LINK": + return UriRenderMethod.LINK; + case 2: + case "INLINE_IMAGE": + return UriRenderMethod.INLINE_IMAGE; + case -1: + case "UNRECOGNIZED": + default: + return UriRenderMethod.UNRECOGNIZED; + } } export function uriRenderMethodToJSON(object: UriRenderMethod): string { - switch (object) { - case UriRenderMethod.TEXT: - return "TEXT"; - case UriRenderMethod.LINK: - return "LINK"; - case UriRenderMethod.INLINE_IMAGE: - return "INLINE_IMAGE"; - case UriRenderMethod.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } + switch (object) { + case UriRenderMethod.TEXT: + return "TEXT"; + case UriRenderMethod.LINK: + return "LINK"; + case UriRenderMethod.INLINE_IMAGE: + return "INLINE_IMAGE"; + case UriRenderMethod.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } } export enum VerificationShareType { - OPTIONAL = 0, - REQUIRED = 1, - UNRECOGNIZED = -1, + OPTIONAL = 0, + REQUIRED = 1, + UNRECOGNIZED = -1, } -export function verificationShareTypeFromJSON( - object: any, -): VerificationShareType { - switch (object) { - case 0: - case "OPTIONAL": - return VerificationShareType.OPTIONAL; - case 1: - case "REQUIRED": - return VerificationShareType.REQUIRED; - case -1: - case "UNRECOGNIZED": - default: - return VerificationShareType.UNRECOGNIZED; - } +export function verificationShareTypeFromJSON(object: any): VerificationShareType { + switch (object) { + case 0: + case "OPTIONAL": + return VerificationShareType.OPTIONAL; + case 1: + case "REQUIRED": + return VerificationShareType.REQUIRED; + case -1: + case "UNRECOGNIZED": + default: + return VerificationShareType.UNRECOGNIZED; + } } -export function verificationShareTypeToJSON( - object: VerificationShareType, -): string { - switch (object) { - case VerificationShareType.OPTIONAL: - return "OPTIONAL"; - case VerificationShareType.REQUIRED: - return "REQUIRED"; - case VerificationShareType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } +export function verificationShareTypeToJSON(object: VerificationShareType): string { + switch (object) { + case VerificationShareType.OPTIONAL: + return "OPTIONAL"; + case VerificationShareType.REQUIRED: + return "REQUIRED"; + case VerificationShareType.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } } /** Request to fetch a template by ID */ export interface GetCredentialTemplateRequest { - /** ID of template to fetch */ - id?: string | undefined; + /** ID of template to fetch */ + id?: string | undefined; } /** Response to `GetCredentialTemplateRequest` */ export interface GetCredentialTemplateResponse { - /** Template fetched by ID */ - template?: TemplateData | undefined; + /** Template fetched by ID */ + template?: TemplateData | undefined; } /** Request to search templates using a SQL query */ export interface SearchCredentialTemplatesRequest { - /** SQL query to execute. Example: `SELECT * FROM c WHERE c.name = 'Diploma'` */ - query?: string | undefined; - /** - * Token provided by previous `SearchCredentialTemplatesResponse` - * if more data is available for query - */ - continuationToken?: string | undefined; + /** SQL query to execute. Example: `SELECT * FROM c WHERE c.name = 'Diploma'` */ + query?: + | string + | undefined; + /** + * Token provided by previous `SearchCredentialTemplatesResponse` + * if more data is available for query + */ + continuationToken?: string | undefined; } /** Response to `SearchCredentialTemplatesRequest` */ export interface SearchCredentialTemplatesResponse { - /** Raw JSON data returned from query */ - itemsJson?: string | undefined; - /** Whether more results are available for this query via `continuation_token` */ - hasMoreResults?: boolean | undefined; - /** Token to fetch next set of results via `SearchCredentialTemplatesRequest` */ - continuationToken?: string | undefined; + /** Raw JSON data returned from query */ + itemsJson?: + | string + | undefined; + /** Whether more results are available for this query via `continuation_token` */ + hasMoreResults?: + | boolean + | undefined; + /** Token to fetch next set of results via `SearchCredentialTemplatesRequest` */ + continuationToken?: string | undefined; } /** Request to list templates using a SQL query */ export interface ListCredentialTemplatesRequest { - /** SQL query to execute. Example: `SELECT * FROM c WHERE c.name = 'Diploma'` */ - query?: string | undefined; - /** - * Token provided by previous `ListCredentialTemplatesResponse` - * if more data is available for query - */ - continuationToken?: string | undefined; + /** SQL query to execute. Example: `SELECT * FROM c WHERE c.name = 'Diploma'` */ + query?: + | string + | undefined; + /** + * Token provided by previous `ListCredentialTemplatesResponse` + * if more data is available for query + */ + continuationToken?: string | undefined; } /** Response to `ListCredentialTemplatesRequest` */ export interface ListCredentialTemplatesResponse { - /** Templates found by query */ - templates?: TemplateData[] | undefined; - /** Whether more results are available for this query via `continuation_token` */ - hasMoreResults?: boolean | undefined; - /** Token to fetch next set of results via `ListCredentialTemplatesRequest` */ - continuationToken?: string | undefined; + /** Templates found by query */ + templates?: + | TemplateData[] + | undefined; + /** Whether more results are available for this query via `continuation_token` */ + hasMoreResults?: + | boolean + | undefined; + /** Token to fetch next set of results via `ListCredentialTemplatesRequest` */ + continuationToken?: string | undefined; } /** Request to delete a template by ID */ export interface DeleteCredentialTemplateRequest { - /** ID of template to delete */ - id?: string | undefined; + /** ID of template to delete */ + id?: string | undefined; } /** Response to `DeleteCredentialTemplateRequest` */ -export interface DeleteCredentialTemplateResponse {} +export interface DeleteCredentialTemplateResponse { +} /** Request to create a new template */ export interface CreateCredentialTemplateRequest { - /** Name of new template. Must be a unique identifier within its ecosystem. */ - name?: string | undefined; - /** Fields which compose the template */ - fields?: { [key: string]: TemplateField } | undefined; - /** - * Whether credentials may be issued against this template which have fields - * not specified in `fields` - */ - allowAdditionalFields?: boolean | undefined; - /** Human-readable name of template */ - title?: string | undefined; - /** Human-readable description of template */ - description?: string | undefined; - /** - * Optional map describing how to order and categorize the fields within the template. The key of this map is the field `name`. - * If not provided, this will be auto-generated. - */ - fieldOrdering?: { [key: string]: FieldOrdering } | undefined; - /** Options for rendering the template in Apple Wallet */ - appleWalletOptions?: AppleWalletOptions | undefined; + /** Name of new template. Must be a unique identifier within its ecosystem. */ + name?: + | string + | undefined; + /** Fields which compose the template */ + fields?: + | { [key: string]: TemplateField } + | undefined; + /** + * Whether credentials may be issued against this template which have fields + * not specified in `fields` + */ + allowAdditionalFields?: + | boolean + | undefined; + /** Human-readable name of template */ + title?: + | string + | undefined; + /** Human-readable description of template */ + description?: + | string + | undefined; + /** + * Optional map describing how to order and categorize the fields within the template. The key of this map is the field `name`. + * If not provided, this will be auto-generated. + */ + fieldOrdering?: + | { [key: string]: FieldOrdering } + | undefined; + /** Options for rendering the template in Apple Wallet */ + appleWalletOptions?: AppleWalletOptions | undefined; } export interface CreateCredentialTemplateRequest_FieldsEntry { - key: string; - value?: TemplateField | undefined; + key: string; + value?: TemplateField | undefined; } export interface CreateCredentialTemplateRequest_FieldOrderingEntry { - key: string; - value?: FieldOrdering | undefined; + key: string; + value?: FieldOrdering | undefined; } /** Response to `CreateCredentialTemplateRequest` */ export interface CreateCredentialTemplateResponse { - /** Created template */ - data?: TemplateData | undefined; + /** Created template */ + data?: TemplateData | undefined; } /** Request to update display information for a template */ export interface UpdateCredentialTemplateRequest { - /** ID of Template to update */ - id?: string | undefined; - /** New human-readable title of Template */ - title?: string | undefined; - /** New human-readable description of Template */ - description?: string | undefined; - /** Fields to update within the Template */ - fields?: { [key: string]: TemplateFieldPatch } | undefined; - /** New field ordering options. See documentation for template creation for usage information. */ - fieldOrdering?: { [key: string]: FieldOrdering } | undefined; - /** New Apple Wallet configuration */ - appleWalletOptions?: AppleWalletOptions | undefined; + /** ID of Template to update */ + id?: + | string + | undefined; + /** New human-readable title of Template */ + title?: + | string + | undefined; + /** New human-readable description of Template */ + description?: + | string + | undefined; + /** Fields to update within the Template */ + fields?: + | { [key: string]: TemplateFieldPatch } + | undefined; + /** New field ordering options. See documentation for template creation for usage information. */ + fieldOrdering?: + | { [key: string]: FieldOrdering } + | undefined; + /** New Apple Wallet configuration */ + appleWalletOptions?: AppleWalletOptions | undefined; } export interface UpdateCredentialTemplateRequest_FieldsEntry { - key: string; - value?: TemplateFieldPatch | undefined; + key: string; + value?: TemplateFieldPatch | undefined; } export interface UpdateCredentialTemplateRequest_FieldOrderingEntry { - key: string; - value?: FieldOrdering | undefined; + key: string; + value?: FieldOrdering | undefined; } /** Response to `UpdateCredentialTemplateRequest` */ export interface UpdateCredentialTemplateResponse { - /** The Template after the update has been applied */ - updatedTemplate?: TemplateData | undefined; + /** The Template after the update has been applied */ + updatedTemplate?: TemplateData | undefined; } /** Credential Template */ export interface TemplateData { - /** Template ID */ - id?: string | undefined; - /** Template name */ - name?: string | undefined; - /** Template version number */ - version?: number | undefined; - /** Fields defined for the template */ - fields?: { [key: string]: TemplateField } | undefined; - /** - * Whether credentials issued against this template may - * contain fields not defined by template - */ - allowAdditionalFields?: boolean | undefined; - /** URI pointing to template JSON schema document */ - schemaUri?: string | undefined; - /** ID of ecosystem in which template resides */ - ecosystemId?: string | undefined; - /** Template type (`VerifiableCredential`) */ - type?: string | undefined; - /** ID of template creator */ - createdBy?: string | undefined; - /** Date when template was created as ISO 8601 utc string */ - dateCreated?: string | undefined; - /** Human-readable template title */ - title?: string | undefined; - /** Human-readable template description */ - description?: string | undefined; - /** Map describing how to order and categorize the fields within the template. The key of this map is the field `name`. */ - fieldOrdering?: { [key: string]: FieldOrdering } | undefined; - /** Options for rendering the template in Apple Wallet */ - appleWalletOptions?: AppleWalletOptions | undefined; + /** Template ID */ + id?: + | string + | undefined; + /** Template name */ + name?: + | string + | undefined; + /** Template version number */ + version?: + | number + | undefined; + /** Fields defined for the template */ + fields?: + | { [key: string]: TemplateField } + | undefined; + /** + * Whether credentials issued against this template may + * contain fields not defined by template + */ + allowAdditionalFields?: + | boolean + | undefined; + /** URI pointing to template JSON schema document */ + schemaUri?: + | string + | undefined; + /** ID of ecosystem in which template resides */ + ecosystemId?: + | string + | undefined; + /** Template type (`VerifiableCredential`) */ + type?: + | string + | undefined; + /** ID of template creator */ + createdBy?: + | string + | undefined; + /** Date when template was created as ISO 8601 utc string */ + dateCreated?: + | string + | undefined; + /** Human-readable template title */ + title?: + | string + | undefined; + /** Human-readable template description */ + description?: + | string + | undefined; + /** Map describing how to order and categorize the fields within the template. The key of this map is the field `name`. */ + fieldOrdering?: + | { [key: string]: FieldOrdering } + | undefined; + /** Options for rendering the template in Apple Wallet */ + appleWalletOptions?: AppleWalletOptions | undefined; } export interface TemplateData_FieldsEntry { - key: string; - value?: TemplateField | undefined; + key: string; + value?: TemplateField | undefined; } export interface TemplateData_FieldOrderingEntry { - key: string; - value?: FieldOrdering | undefined; + key: string; + value?: FieldOrdering | undefined; } /** Configuration options for Apple Wallet when */ export interface AppleWalletOptions { - /** Background color, in hex format, of credential when stored in an Apple Wallet. */ - backgroundColor?: string | undefined; - /** Foreground color, in hex format, of credential when stored in an Apple Wallet. */ - foregroundColor?: string | undefined; - /** Label color, in hex format, of credential when stored in an Apple Wallet. */ - labelColor?: string | undefined; - /** The ID of the template field which should be used as the primary field of a credential. */ - primaryField?: string | undefined; - /** The secondary fields of the credential. This is a mapping between the order of a secondary field (0 or 1) and the field name. */ - secondaryFields?: string[] | undefined; - /** The auxiliary fields of the credential. This is a mapping between the order of an auxiliary field (0 or 1) and the field name. */ - auxiliaryFields?: string[] | undefined; + /** Background color, in hex format, of credential when stored in an Apple Wallet. */ + backgroundColor?: + | string + | undefined; + /** Foreground color, in hex format, of credential when stored in an Apple Wallet. */ + foregroundColor?: + | string + | undefined; + /** Label color, in hex format, of credential when stored in an Apple Wallet. */ + labelColor?: + | string + | undefined; + /** The ID of the template field which should be used as the primary field of a credential. */ + primaryField?: + | string + | undefined; + /** The secondary fields of the credential. This is a mapping between the order of a secondary field (0 or 1) and the field name. */ + secondaryFields?: + | string[] + | undefined; + /** The auxiliary fields of the credential. This is a mapping between the order of an auxiliary field (0 or 1) and the field name. */ + auxiliaryFields?: string[] | undefined; } /** Ordering information for a template field */ export interface FieldOrdering { - /** - * The order of the field; must be unique within the Template. Fields are sorted by order ascending when displaying a credential. - * Field orders must be contiguous from `0` to the number of fields minus 1. - */ - order?: number | undefined; - /** - * The human-readable name of the section this field appears in; used to group together fields when displaying a credential. - * Sections must be contiguous with respect to `order`. - */ - section?: string | undefined; + /** + * The order of the field; must be unique within the Template. Fields are sorted by order ascending when displaying a credential. + * Field orders must be contiguous from `0` to the number of fields minus 1. + */ + order?: + | number + | undefined; + /** + * The human-readable name of the section this field appears in; used to group together fields when displaying a credential. + * Sections must be contiguous with respect to `order`. + */ + section?: string | undefined; } /** A field defined in a template */ export interface TemplateField { - /** Human-readable name of the field */ - title?: string | undefined; - /** Human-readable description of the field */ - description?: string | undefined; - /** Whether this field may be omitted when a credential is issued against the template */ - optional?: boolean | undefined; - /** The type of the field */ - type?: FieldType | undefined; - /** How to deal with this URI field when rendering credential. Only use if `type` is `URI`. */ - uriData?: UriFieldData | undefined; + /** Human-readable name of the field */ + title?: + | string + | undefined; + /** Human-readable description of the field */ + description?: + | string + | undefined; + /** Whether this field may be omitted when a credential is issued against the template */ + optional?: + | boolean + | undefined; + /** The type of the field */ + type?: + | FieldType + | undefined; + /** How to deal with this URI field when rendering credential. Only use if `type` is `URI`. */ + uriData?: UriFieldData | undefined; } /** A patch to apply to an existing template field */ export interface TemplateFieldPatch { - /** Human-readable name of the field */ - title?: string | undefined; - /** Human-readable description of the field */ - description?: string | undefined; - /** How to deal with this URI field when rendering credential. Only use if `type` is `URI`. */ - uriData?: UriFieldData | undefined; + /** Human-readable name of the field */ + title?: + | string + | undefined; + /** Human-readable description of the field */ + description?: + | string + | undefined; + /** How to deal with this URI field when rendering credential. Only use if `type` is `URI`. */ + uriData?: UriFieldData | undefined; } /** Data pertaining to a URI Field */ export interface UriFieldData { - /** - * Expected MIME Type of content pointed to by URI. Can be generic (eg, "image/") or specific ("image/png"). - * Defaults to "application/octet-stream". - */ - mimeType?: string | undefined; - /** How to display the URI value when rendering a credential. */ - renderMethod?: UriRenderMethod | undefined; + /** + * Expected MIME Type of content pointed to by URI. Can be generic (eg, "image/") or specific ("image/png"). + * Defaults to "application/octet-stream". + */ + mimeType?: + | string + | undefined; + /** How to display the URI value when rendering a credential. */ + renderMethod?: UriRenderMethod | undefined; } /** Request to fetch a template by ID */ export interface GetVerificationTemplateRequest { - /** ID of template to fetch */ - id?: string | undefined; + /** ID of template to fetch */ + id?: string | undefined; } /** Response to `GetCredentialTemplateRequest` */ export interface GetVerificationTemplateResponse { - /** Template fetched by ID */ - template?: VerificationTemplateData | undefined; + /** Template fetched by ID */ + template?: VerificationTemplateData | undefined; } export interface CreateVerificationTemplateRequest { - /** Name of new template. Must be a unique identifier within its ecosystem. */ - name?: string | undefined; - /** Fields which will be required in the verification proof template */ - fields?: { [key: string]: VerificationTemplateField } | undefined; - /** Source credential template, used for verifying that the specified `fields` are present in the credential template */ - credentialTemplateId?: string | undefined; - /** Human-readable name of template */ - title?: string | undefined; - /** Human-readable description of template */ - description?: string | undefined; + /** Name of new template. Must be a unique identifier within its ecosystem. */ + name?: + | string + | undefined; + /** Fields which will be required in the verification proof template */ + fields?: + | { [key: string]: VerificationTemplateField } + | undefined; + /** Source credential template, used for verifying that the specified `fields` are present in the credential template */ + credentialTemplateId?: + | string + | undefined; + /** Human-readable name of template */ + title?: + | string + | undefined; + /** Human-readable description of template */ + description?: string | undefined; } export interface CreateVerificationTemplateRequest_FieldsEntry { - key: string; - value?: VerificationTemplateField | undefined; + key: string; + value?: VerificationTemplateField | undefined; } export interface CreateVerificationTemplateResponse { - data?: VerificationTemplateData | undefined; + data?: VerificationTemplateData | undefined; } export interface UpdateVerificationTemplateRequest { - /** ID of Template to update */ - id?: string | undefined; - /** New human-readable title of Template */ - title?: string | undefined; - /** New human-readable description of Template */ - description?: string | undefined; - /** Fields to update within the Template */ - fields?: { [key: string]: VerificationTemplateFieldPatch } | undefined; + /** ID of Template to update */ + id?: + | string + | undefined; + /** New human-readable title of Template */ + title?: + | string + | undefined; + /** New human-readable description of Template */ + description?: + | string + | undefined; + /** Fields to update within the Template */ + fields?: { [key: string]: VerificationTemplateFieldPatch } | undefined; } export interface UpdateVerificationTemplateRequest_FieldsEntry { - key: string; - value?: VerificationTemplateFieldPatch | undefined; + key: string; + value?: VerificationTemplateFieldPatch | undefined; } export interface UpdateVerificationTemplateResponse { - template?: VerificationTemplateData | undefined; + template?: VerificationTemplateData | undefined; } export interface DeleteVerificationTemplateRequest { - verificationTemplateId?: string | undefined; + verificationTemplateId?: string | undefined; } /** This space intentionally left blank */ -export interface DeleteVerificationTemplateResponse {} +export interface DeleteVerificationTemplateResponse { +} /** Verification Template */ export interface VerificationTemplateData { - /** Template ID */ - id?: string | undefined; - /** Template name */ - name?: string | undefined; - /** Template version number */ - version?: number | undefined; - /** Fields defined for the template */ - fields?: { [key: string]: VerificationTemplateField } | undefined; - /** Source credential template, used for verifying that the specified `fields` are present in the credential template */ - credentialTemplateId?: string | undefined; - /** ID of ecosystem in which template resides */ - ecosystemId?: string | undefined; - /** Template type (`VerificationTemplate`) */ - type?: string | undefined; - /** ID of template creator */ - createdBy?: string | undefined; - /** Date when template was created as ISO 8601 utc string */ - dateCreated?: string | undefined; - /** Human-readable template title */ - title?: string | undefined; - /** Human-readable template description */ - description?: string | undefined; + /** Template ID */ + id?: + | string + | undefined; + /** Template name */ + name?: + | string + | undefined; + /** Template version number */ + version?: + | number + | undefined; + /** Fields defined for the template */ + fields?: + | { [key: string]: VerificationTemplateField } + | undefined; + /** Source credential template, used for verifying that the specified `fields` are present in the credential template */ + credentialTemplateId?: + | string + | undefined; + /** ID of ecosystem in which template resides */ + ecosystemId?: + | string + | undefined; + /** Template type (`VerificationTemplate`) */ + type?: + | string + | undefined; + /** ID of template creator */ + createdBy?: + | string + | undefined; + /** Date when template was created as ISO 8601 utc string */ + dateCreated?: + | string + | undefined; + /** Human-readable template title */ + title?: + | string + | undefined; + /** Human-readable template description */ + description?: string | undefined; } export interface VerificationTemplateData_FieldsEntry { - key: string; - value?: VerificationTemplateField | undefined; + key: string; + value?: VerificationTemplateField | undefined; } /** Request to list templates using a SQL query */ export interface ListVerificationTemplatesRequest { - /** SQL query to execute. Example: `SELECT * FROM c WHERE c.name = 'Diploma'` */ - query?: string | undefined; - /** - * Token provided by previous `ListCredentialTemplatesResponse` - * if more data is available for query - */ - continuationToken?: string | undefined; + /** SQL query to execute. Example: `SELECT * FROM c WHERE c.name = 'Diploma'` */ + query?: + | string + | undefined; + /** + * Token provided by previous `ListCredentialTemplatesResponse` + * if more data is available for query + */ + continuationToken?: string | undefined; } export interface ListVerificationTemplatesResponse { - /** Templates found by query */ - templates?: VerificationTemplateData[] | undefined; - /** Whether more results are available for this query via `continuation_token` */ - hasMoreResults?: boolean | undefined; - /** Token to fetch next set of results via `ListVerificationTemplatesRequest` */ - continuationToken?: string | undefined; + /** Templates found by query */ + templates?: + | VerificationTemplateData[] + | undefined; + /** Whether more results are available for this query via `continuation_token` */ + hasMoreResults?: + | boolean + | undefined; + /** Token to fetch next set of results via `ListVerificationTemplatesRequest` */ + continuationToken?: string | undefined; } /** A field defined in a template */ export interface VerificationTemplateField { - /** Whether this field may be omitted on proof creation */ - fieldShareType?: VerificationShareType | undefined; - /** User-facing explanation of what is done with this data */ - usagePolicy?: string | undefined; + /** Whether this field may be omitted on proof creation */ + fieldShareType?: + | VerificationShareType + | undefined; + /** User-facing explanation of what is done with this data */ + usagePolicy?: string | undefined; } /** A patch to apply to an existing template field */ export interface VerificationTemplateFieldPatch { - /** Human-readable name of the field */ - fieldShareType?: VerificationShareType | undefined; - /** User-facing explanation of what is done with this data */ - usagePolicy?: string | undefined; + /** Human-readable name of the field */ + fieldShareType?: + | VerificationShareType + | undefined; + /** User-facing explanation of what is done with this data */ + usagePolicy?: string | undefined; } function createBaseGetCredentialTemplateRequest(): GetCredentialTemplateRequest { - return { id: "" }; + return { id: "" }; } export const GetCredentialTemplateRequest = { - encode( - message: GetCredentialTemplateRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.id !== undefined && message.id !== "") { - writer.uint32(10).string(message.id); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): GetCredentialTemplateRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetCredentialTemplateRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.id = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): GetCredentialTemplateRequest { - return { id: isSet(object.id) ? String(object.id) : "" }; - }, + encode(message: GetCredentialTemplateRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.id !== undefined && message.id !== "") { + writer.uint32(10).string(message.id); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): GetCredentialTemplateRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGetCredentialTemplateRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.id = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: GetCredentialTemplateRequest): unknown { - const obj: any = {}; - if (message.id !== undefined && message.id !== "") { - obj.id = message.id; - } - return obj; - }, + fromJSON(object: any): GetCredentialTemplateRequest { + return { id: isSet(object.id) ? String(object.id) : "" }; + }, - create( - base?: DeepPartial, - ): GetCredentialTemplateRequest { - return GetCredentialTemplateRequest.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): GetCredentialTemplateRequest { - const message = createBaseGetCredentialTemplateRequest(); - message.id = object.id ?? ""; - return message; - }, + toJSON(message: GetCredentialTemplateRequest): unknown { + const obj: any = {}; + if (message.id !== undefined && message.id !== "") { + obj.id = message.id; + } + return obj; + }, + + create(base?: DeepPartial): GetCredentialTemplateRequest { + return GetCredentialTemplateRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): GetCredentialTemplateRequest { + const message = createBaseGetCredentialTemplateRequest(); + message.id = object.id ?? ""; + return message; + }, }; function createBaseGetCredentialTemplateResponse(): GetCredentialTemplateResponse { - return { template: undefined }; + return { template: undefined }; } export const GetCredentialTemplateResponse = { - encode( - message: GetCredentialTemplateResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.template !== undefined) { - TemplateData.encode( - message.template, - writer.uint32(10).fork(), - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): GetCredentialTemplateResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetCredentialTemplateResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.template = TemplateData.decode( - reader, - reader.uint32(), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): GetCredentialTemplateResponse { - return { - template: isSet(object.template) - ? TemplateData.fromJSON(object.template) - : undefined, - }; - }, + encode(message: GetCredentialTemplateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.template !== undefined) { + TemplateData.encode(message.template, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): GetCredentialTemplateResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGetCredentialTemplateResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.template = TemplateData.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: GetCredentialTemplateResponse): unknown { - const obj: any = {}; - if (message.template !== undefined) { - obj.template = TemplateData.toJSON(message.template); - } - return obj; - }, + fromJSON(object: any): GetCredentialTemplateResponse { + return { template: isSet(object.template) ? TemplateData.fromJSON(object.template) : undefined }; + }, - create( - base?: DeepPartial, - ): GetCredentialTemplateResponse { - return GetCredentialTemplateResponse.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): GetCredentialTemplateResponse { - const message = createBaseGetCredentialTemplateResponse(); - message.template = - object.template !== undefined && object.template !== null - ? TemplateData.fromPartial(object.template) - : undefined; - return message; - }, + toJSON(message: GetCredentialTemplateResponse): unknown { + const obj: any = {}; + if (message.template !== undefined) { + obj.template = TemplateData.toJSON(message.template); + } + return obj; + }, + + create(base?: DeepPartial): GetCredentialTemplateResponse { + return GetCredentialTemplateResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): GetCredentialTemplateResponse { + const message = createBaseGetCredentialTemplateResponse(); + message.template = (object.template !== undefined && object.template !== null) + ? TemplateData.fromPartial(object.template) + : undefined; + return message; + }, }; function createBaseSearchCredentialTemplatesRequest(): SearchCredentialTemplatesRequest { - return { query: "", continuationToken: "" }; + return { query: "", continuationToken: "" }; } export const SearchCredentialTemplatesRequest = { - encode( - message: SearchCredentialTemplatesRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.query !== undefined && message.query !== "") { - writer.uint32(10).string(message.query); - } - if ( - message.continuationToken !== undefined && - message.continuationToken !== "" - ) { - writer.uint32(18).string(message.continuationToken); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): SearchCredentialTemplatesRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSearchCredentialTemplatesRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.query = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.continuationToken = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: SearchCredentialTemplatesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.query !== undefined && message.query !== "") { + writer.uint32(10).string(message.query); + } + if (message.continuationToken !== undefined && message.continuationToken !== "") { + writer.uint32(18).string(message.continuationToken); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): SearchCredentialTemplatesRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSearchCredentialTemplatesRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - fromJSON(object: any): SearchCredentialTemplatesRequest { - return { - query: isSet(object.query) ? String(object.query) : "", - continuationToken: isSet(object.continuationToken) - ? String(object.continuationToken) - : "", - }; - }, + message.query = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.continuationToken = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: SearchCredentialTemplatesRequest): unknown { - const obj: any = {}; - if (message.query !== undefined && message.query !== "") { - obj.query = message.query; - } - if ( - message.continuationToken !== undefined && - message.continuationToken !== "" - ) { - obj.continuationToken = message.continuationToken; - } - return obj; - }, + fromJSON(object: any): SearchCredentialTemplatesRequest { + return { + query: isSet(object.query) ? String(object.query) : "", + continuationToken: isSet(object.continuationToken) ? String(object.continuationToken) : "", + }; + }, - create( - base?: DeepPartial, - ): SearchCredentialTemplatesRequest { - return SearchCredentialTemplatesRequest.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): SearchCredentialTemplatesRequest { - const message = createBaseSearchCredentialTemplatesRequest(); - message.query = object.query ?? ""; - message.continuationToken = object.continuationToken ?? ""; - return message; - }, + toJSON(message: SearchCredentialTemplatesRequest): unknown { + const obj: any = {}; + if (message.query !== undefined && message.query !== "") { + obj.query = message.query; + } + if (message.continuationToken !== undefined && message.continuationToken !== "") { + obj.continuationToken = message.continuationToken; + } + return obj; + }, + + create(base?: DeepPartial): SearchCredentialTemplatesRequest { + return SearchCredentialTemplatesRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): SearchCredentialTemplatesRequest { + const message = createBaseSearchCredentialTemplatesRequest(); + message.query = object.query ?? ""; + message.continuationToken = object.continuationToken ?? ""; + return message; + }, }; function createBaseSearchCredentialTemplatesResponse(): SearchCredentialTemplatesResponse { - return { itemsJson: "", hasMoreResults: false, continuationToken: "" }; + return { itemsJson: "", hasMoreResults: false, continuationToken: "" }; } export const SearchCredentialTemplatesResponse = { - encode( - message: SearchCredentialTemplatesResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.itemsJson !== undefined && message.itemsJson !== "") { - writer.uint32(10).string(message.itemsJson); - } - if (message.hasMoreResults === true) { - writer.uint32(16).bool(message.hasMoreResults); - } - if ( - message.continuationToken !== undefined && - message.continuationToken !== "" - ) { - writer.uint32(34).string(message.continuationToken); - } - return writer; - }, + encode(message: SearchCredentialTemplatesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.itemsJson !== undefined && message.itemsJson !== "") { + writer.uint32(10).string(message.itemsJson); + } + if (message.hasMoreResults === true) { + writer.uint32(16).bool(message.hasMoreResults); + } + if (message.continuationToken !== undefined && message.continuationToken !== "") { + writer.uint32(34).string(message.continuationToken); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): SearchCredentialTemplatesResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSearchCredentialTemplatesResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): SearchCredentialTemplatesResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSearchCredentialTemplatesResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.itemsJson = reader.string(); - continue; - case 2: - if (tag !== 16) { - break; - } - - message.hasMoreResults = reader.bool(); - continue; - case 4: - if (tag !== 34) { - break; - } - - message.continuationToken = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + message.itemsJson = reader.string(); + continue; + case 2: + if (tag !== 16) { + break; + } - fromJSON(object: any): SearchCredentialTemplatesResponse { - return { - itemsJson: isSet(object.itemsJson) ? String(object.itemsJson) : "", - hasMoreResults: isSet(object.hasMoreResults) - ? Boolean(object.hasMoreResults) - : false, - continuationToken: isSet(object.continuationToken) - ? String(object.continuationToken) - : "", - }; - }, + message.hasMoreResults = reader.bool(); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.continuationToken = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: SearchCredentialTemplatesResponse): unknown { - const obj: any = {}; - if (message.itemsJson !== undefined && message.itemsJson !== "") { - obj.itemsJson = message.itemsJson; - } - if (message.hasMoreResults === true) { - obj.hasMoreResults = message.hasMoreResults; - } - if ( - message.continuationToken !== undefined && - message.continuationToken !== "" - ) { - obj.continuationToken = message.continuationToken; - } - return obj; - }, + fromJSON(object: any): SearchCredentialTemplatesResponse { + return { + itemsJson: isSet(object.itemsJson) ? String(object.itemsJson) : "", + hasMoreResults: isSet(object.hasMoreResults) ? Boolean(object.hasMoreResults) : false, + continuationToken: isSet(object.continuationToken) ? String(object.continuationToken) : "", + }; + }, - create( - base?: DeepPartial, - ): SearchCredentialTemplatesResponse { - return SearchCredentialTemplatesResponse.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): SearchCredentialTemplatesResponse { - const message = createBaseSearchCredentialTemplatesResponse(); - message.itemsJson = object.itemsJson ?? ""; - message.hasMoreResults = object.hasMoreResults ?? false; - message.continuationToken = object.continuationToken ?? ""; - return message; - }, + toJSON(message: SearchCredentialTemplatesResponse): unknown { + const obj: any = {}; + if (message.itemsJson !== undefined && message.itemsJson !== "") { + obj.itemsJson = message.itemsJson; + } + if (message.hasMoreResults === true) { + obj.hasMoreResults = message.hasMoreResults; + } + if (message.continuationToken !== undefined && message.continuationToken !== "") { + obj.continuationToken = message.continuationToken; + } + return obj; + }, + + create(base?: DeepPartial): SearchCredentialTemplatesResponse { + return SearchCredentialTemplatesResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): SearchCredentialTemplatesResponse { + const message = createBaseSearchCredentialTemplatesResponse(); + message.itemsJson = object.itemsJson ?? ""; + message.hasMoreResults = object.hasMoreResults ?? false; + message.continuationToken = object.continuationToken ?? ""; + return message; + }, }; function createBaseListCredentialTemplatesRequest(): ListCredentialTemplatesRequest { - return { query: "", continuationToken: "" }; + return { query: "", continuationToken: "" }; } export const ListCredentialTemplatesRequest = { - encode( - message: ListCredentialTemplatesRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.query !== undefined && message.query !== "") { - writer.uint32(10).string(message.query); - } - if ( - message.continuationToken !== undefined && - message.continuationToken !== "" - ) { - writer.uint32(18).string(message.continuationToken); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): ListCredentialTemplatesRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseListCredentialTemplatesRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.query = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.continuationToken = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: ListCredentialTemplatesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.query !== undefined && message.query !== "") { + writer.uint32(10).string(message.query); + } + if (message.continuationToken !== undefined && message.continuationToken !== "") { + writer.uint32(18).string(message.continuationToken); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ListCredentialTemplatesRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseListCredentialTemplatesRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - fromJSON(object: any): ListCredentialTemplatesRequest { - return { - query: isSet(object.query) ? String(object.query) : "", - continuationToken: isSet(object.continuationToken) - ? String(object.continuationToken) - : "", - }; - }, + message.query = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.continuationToken = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: ListCredentialTemplatesRequest): unknown { - const obj: any = {}; - if (message.query !== undefined && message.query !== "") { - obj.query = message.query; - } - if ( - message.continuationToken !== undefined && - message.continuationToken !== "" - ) { - obj.continuationToken = message.continuationToken; - } - return obj; - }, + fromJSON(object: any): ListCredentialTemplatesRequest { + return { + query: isSet(object.query) ? String(object.query) : "", + continuationToken: isSet(object.continuationToken) ? String(object.continuationToken) : "", + }; + }, - create( - base?: DeepPartial, - ): ListCredentialTemplatesRequest { - return ListCredentialTemplatesRequest.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): ListCredentialTemplatesRequest { - const message = createBaseListCredentialTemplatesRequest(); - message.query = object.query ?? ""; - message.continuationToken = object.continuationToken ?? ""; - return message; - }, + toJSON(message: ListCredentialTemplatesRequest): unknown { + const obj: any = {}; + if (message.query !== undefined && message.query !== "") { + obj.query = message.query; + } + if (message.continuationToken !== undefined && message.continuationToken !== "") { + obj.continuationToken = message.continuationToken; + } + return obj; + }, + + create(base?: DeepPartial): ListCredentialTemplatesRequest { + return ListCredentialTemplatesRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): ListCredentialTemplatesRequest { + const message = createBaseListCredentialTemplatesRequest(); + message.query = object.query ?? ""; + message.continuationToken = object.continuationToken ?? ""; + return message; + }, }; function createBaseListCredentialTemplatesResponse(): ListCredentialTemplatesResponse { - return { templates: [], hasMoreResults: false, continuationToken: "" }; + return { templates: [], hasMoreResults: false, continuationToken: "" }; } export const ListCredentialTemplatesResponse = { - encode( - message: ListCredentialTemplatesResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.templates !== undefined && message.templates.length !== 0) { - for (const v of message.templates) { - TemplateData.encode(v!, writer.uint32(10).fork()).ldelim(); - } - } - if (message.hasMoreResults === true) { - writer.uint32(16).bool(message.hasMoreResults); - } - if ( - message.continuationToken !== undefined && - message.continuationToken !== "" - ) { - writer.uint32(26).string(message.continuationToken); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): ListCredentialTemplatesResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseListCredentialTemplatesResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.templates!.push( - TemplateData.decode(reader, reader.uint32()), - ); - continue; - case 2: - if (tag !== 16) { - break; - } - - message.hasMoreResults = reader.bool(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.continuationToken = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: ListCredentialTemplatesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.templates !== undefined && message.templates.length !== 0) { + for (const v of message.templates) { + TemplateData.encode(v!, writer.uint32(10).fork()).ldelim(); + } + } + if (message.hasMoreResults === true) { + writer.uint32(16).bool(message.hasMoreResults); + } + if (message.continuationToken !== undefined && message.continuationToken !== "") { + writer.uint32(26).string(message.continuationToken); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ListCredentialTemplatesResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseListCredentialTemplatesResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - fromJSON(object: any): ListCredentialTemplatesResponse { - return { - templates: Array.isArray(object?.templates) - ? object.templates.map((e: any) => TemplateData.fromJSON(e)) - : [], - hasMoreResults: isSet(object.hasMoreResults) - ? Boolean(object.hasMoreResults) - : false, - continuationToken: isSet(object.continuationToken) - ? String(object.continuationToken) - : "", - }; - }, + message.templates!.push(TemplateData.decode(reader, reader.uint32())); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.hasMoreResults = reader.bool(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.continuationToken = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: ListCredentialTemplatesResponse): unknown { - const obj: any = {}; - if (message.templates?.length) { - obj.templates = message.templates.map((e) => - TemplateData.toJSON(e), - ); - } - if (message.hasMoreResults === true) { - obj.hasMoreResults = message.hasMoreResults; - } - if ( - message.continuationToken !== undefined && - message.continuationToken !== "" - ) { - obj.continuationToken = message.continuationToken; - } - return obj; - }, + fromJSON(object: any): ListCredentialTemplatesResponse { + return { + templates: Array.isArray(object?.templates) ? object.templates.map((e: any) => TemplateData.fromJSON(e)) : [], + hasMoreResults: isSet(object.hasMoreResults) ? Boolean(object.hasMoreResults) : false, + continuationToken: isSet(object.continuationToken) ? String(object.continuationToken) : "", + }; + }, - create( - base?: DeepPartial, - ): ListCredentialTemplatesResponse { - return ListCredentialTemplatesResponse.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): ListCredentialTemplatesResponse { - const message = createBaseListCredentialTemplatesResponse(); - message.templates = - object.templates?.map((e) => TemplateData.fromPartial(e)) || []; - message.hasMoreResults = object.hasMoreResults ?? false; - message.continuationToken = object.continuationToken ?? ""; - return message; - }, + toJSON(message: ListCredentialTemplatesResponse): unknown { + const obj: any = {}; + if (message.templates?.length) { + obj.templates = message.templates.map((e) => TemplateData.toJSON(e)); + } + if (message.hasMoreResults === true) { + obj.hasMoreResults = message.hasMoreResults; + } + if (message.continuationToken !== undefined && message.continuationToken !== "") { + obj.continuationToken = message.continuationToken; + } + return obj; + }, + + create(base?: DeepPartial): ListCredentialTemplatesResponse { + return ListCredentialTemplatesResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): ListCredentialTemplatesResponse { + const message = createBaseListCredentialTemplatesResponse(); + message.templates = object.templates?.map((e) => TemplateData.fromPartial(e)) || []; + message.hasMoreResults = object.hasMoreResults ?? false; + message.continuationToken = object.continuationToken ?? ""; + return message; + }, }; function createBaseDeleteCredentialTemplateRequest(): DeleteCredentialTemplateRequest { - return { id: "" }; + return { id: "" }; } export const DeleteCredentialTemplateRequest = { - encode( - message: DeleteCredentialTemplateRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.id !== undefined && message.id !== "") { - writer.uint32(10).string(message.id); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): DeleteCredentialTemplateRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDeleteCredentialTemplateRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.id = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): DeleteCredentialTemplateRequest { - return { id: isSet(object.id) ? String(object.id) : "" }; - }, + encode(message: DeleteCredentialTemplateRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.id !== undefined && message.id !== "") { + writer.uint32(10).string(message.id); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): DeleteCredentialTemplateRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseDeleteCredentialTemplateRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.id = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: DeleteCredentialTemplateRequest): unknown { - const obj: any = {}; - if (message.id !== undefined && message.id !== "") { - obj.id = message.id; - } - return obj; - }, + fromJSON(object: any): DeleteCredentialTemplateRequest { + return { id: isSet(object.id) ? String(object.id) : "" }; + }, - create( - base?: DeepPartial, - ): DeleteCredentialTemplateRequest { - return DeleteCredentialTemplateRequest.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): DeleteCredentialTemplateRequest { - const message = createBaseDeleteCredentialTemplateRequest(); - message.id = object.id ?? ""; - return message; - }, + toJSON(message: DeleteCredentialTemplateRequest): unknown { + const obj: any = {}; + if (message.id !== undefined && message.id !== "") { + obj.id = message.id; + } + return obj; + }, + + create(base?: DeepPartial): DeleteCredentialTemplateRequest { + return DeleteCredentialTemplateRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): DeleteCredentialTemplateRequest { + const message = createBaseDeleteCredentialTemplateRequest(); + message.id = object.id ?? ""; + return message; + }, }; function createBaseDeleteCredentialTemplateResponse(): DeleteCredentialTemplateResponse { - return {}; + return {}; } export const DeleteCredentialTemplateResponse = { - encode( - _: DeleteCredentialTemplateResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): DeleteCredentialTemplateResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDeleteCredentialTemplateResponse(); - 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): DeleteCredentialTemplateResponse { - return {}; - }, - - toJSON(_: DeleteCredentialTemplateResponse): unknown { - const obj: any = {}; - return obj; - }, + encode(_: DeleteCredentialTemplateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): DeleteCredentialTemplateResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseDeleteCredentialTemplateResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - create( - base?: DeepPartial, - ): DeleteCredentialTemplateResponse { - return DeleteCredentialTemplateResponse.fromPartial(base ?? {}); - }, - fromPartial( - _: DeepPartial, - ): DeleteCredentialTemplateResponse { - const message = createBaseDeleteCredentialTemplateResponse(); - return message; - }, + fromJSON(_: any): DeleteCredentialTemplateResponse { + return {}; + }, + + toJSON(_: DeleteCredentialTemplateResponse): unknown { + const obj: any = {}; + return obj; + }, + + create(base?: DeepPartial): DeleteCredentialTemplateResponse { + return DeleteCredentialTemplateResponse.fromPartial(base ?? {}); + }, + fromPartial(_: DeepPartial): DeleteCredentialTemplateResponse { + const message = createBaseDeleteCredentialTemplateResponse(); + return message; + }, }; function createBaseCreateCredentialTemplateRequest(): CreateCredentialTemplateRequest { - return { - name: "", - fields: {}, - allowAdditionalFields: false, - title: "", - description: "", - fieldOrdering: {}, - appleWalletOptions: undefined, - }; + return { + name: "", + fields: {}, + allowAdditionalFields: false, + title: "", + description: "", + fieldOrdering: {}, + appleWalletOptions: undefined, + }; } export const CreateCredentialTemplateRequest = { - encode( - message: CreateCredentialTemplateRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.name !== undefined && message.name !== "") { - writer.uint32(10).string(message.name); - } - Object.entries(message.fields || {}).forEach(([key, value]) => { - CreateCredentialTemplateRequest_FieldsEntry.encode( - { key: key as any, value }, - writer.uint32(18).fork(), - ).ldelim(); - }); - if (message.allowAdditionalFields === true) { - writer.uint32(24).bool(message.allowAdditionalFields); - } - if (message.title !== undefined && message.title !== "") { - writer.uint32(34).string(message.title); - } - if (message.description !== undefined && message.description !== "") { - writer.uint32(42).string(message.description); - } - Object.entries(message.fieldOrdering || {}).forEach(([key, value]) => { - CreateCredentialTemplateRequest_FieldOrderingEntry.encode( - { key: key as any, value }, - writer.uint32(50).fork(), - ).ldelim(); - }); - if (message.appleWalletOptions !== undefined) { - AppleWalletOptions.encode( - message.appleWalletOptions, - writer.uint32(58).fork(), - ).ldelim(); - } - return writer; - }, + encode(message: CreateCredentialTemplateRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.name !== undefined && message.name !== "") { + writer.uint32(10).string(message.name); + } + Object.entries(message.fields || {}).forEach(([key, value]) => { + CreateCredentialTemplateRequest_FieldsEntry.encode({ key: key as any, value }, writer.uint32(18).fork()).ldelim(); + }); + if (message.allowAdditionalFields === true) { + writer.uint32(24).bool(message.allowAdditionalFields); + } + if (message.title !== undefined && message.title !== "") { + writer.uint32(34).string(message.title); + } + if (message.description !== undefined && message.description !== "") { + writer.uint32(42).string(message.description); + } + Object.entries(message.fieldOrdering || {}).forEach(([key, value]) => { + CreateCredentialTemplateRequest_FieldOrderingEntry.encode({ key: key as any, value }, writer.uint32(50).fork()) + .ldelim(); + }); + if (message.appleWalletOptions !== undefined) { + AppleWalletOptions.encode(message.appleWalletOptions, writer.uint32(58).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): CreateCredentialTemplateRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCreateCredentialTemplateRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): CreateCredentialTemplateRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCreateCredentialTemplateRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.name = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - const entry2 = - CreateCredentialTemplateRequest_FieldsEntry.decode( - reader, - reader.uint32(), - ); - if (entry2.value !== undefined) { - message.fields![entry2.key] = entry2.value; - } - continue; - case 3: - if (tag !== 24) { - break; - } - - message.allowAdditionalFields = reader.bool(); - continue; - case 4: - if (tag !== 34) { - break; - } - - message.title = reader.string(); - continue; - case 5: - if (tag !== 42) { - break; - } - - message.description = reader.string(); - continue; - case 6: - if (tag !== 50) { - break; - } - - const entry6 = - CreateCredentialTemplateRequest_FieldOrderingEntry.decode( - reader, - reader.uint32(), - ); - if (entry6.value !== undefined) { - message.fieldOrdering![entry6.key] = entry6.value; - } - continue; - case 7: - if (tag !== 58) { - break; - } - - message.appleWalletOptions = AppleWalletOptions.decode( - reader, - reader.uint32(), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + message.name = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + const entry2 = CreateCredentialTemplateRequest_FieldsEntry.decode(reader, reader.uint32()); + if (entry2.value !== undefined) { + message.fields![entry2.key] = entry2.value; + } + continue; + case 3: + if (tag !== 24) { + break; + } + + message.allowAdditionalFields = reader.bool(); + continue; + case 4: + if (tag !== 34) { + break; + } - fromJSON(object: any): CreateCredentialTemplateRequest { - return { - name: isSet(object.name) ? String(object.name) : "", - fields: isObject(object.fields) - ? Object.entries(object.fields).reduce<{ - [key: string]: TemplateField; - }>((acc, [key, value]) => { - acc[key] = TemplateField.fromJSON(value); - return acc; - }, {}) - : {}, - allowAdditionalFields: isSet(object.allowAdditionalFields) - ? Boolean(object.allowAdditionalFields) - : false, - title: isSet(object.title) ? String(object.title) : "", - description: isSet(object.description) - ? String(object.description) - : "", - fieldOrdering: isObject(object.fieldOrdering) - ? Object.entries(object.fieldOrdering).reduce<{ - [key: string]: FieldOrdering; - }>((acc, [key, value]) => { - acc[key] = FieldOrdering.fromJSON(value); - return acc; - }, {}) - : {}, - appleWalletOptions: isSet(object.appleWalletOptions) - ? AppleWalletOptions.fromJSON(object.appleWalletOptions) - : undefined, - }; - }, + message.title = reader.string(); + continue; + case 5: + if (tag !== 42) { + break; + } + + message.description = reader.string(); + continue; + case 6: + if (tag !== 50) { + break; + } + + const entry6 = CreateCredentialTemplateRequest_FieldOrderingEntry.decode(reader, reader.uint32()); + if (entry6.value !== undefined) { + message.fieldOrdering![entry6.key] = entry6.value; + } + continue; + case 7: + if (tag !== 58) { + break; + } + + message.appleWalletOptions = AppleWalletOptions.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: CreateCredentialTemplateRequest): unknown { - const obj: any = {}; - if (message.name !== undefined && message.name !== "") { - obj.name = message.name; - } - if (message.fields) { - const entries = Object.entries(message.fields); - if (entries.length > 0) { - obj.fields = {}; - entries.forEach(([k, v]) => { - obj.fields[k] = TemplateField.toJSON(v); - }); - } - } - if (message.allowAdditionalFields === true) { - obj.allowAdditionalFields = message.allowAdditionalFields; - } - if (message.title !== undefined && message.title !== "") { - obj.title = message.title; - } - if (message.description !== undefined && message.description !== "") { - obj.description = message.description; - } - if (message.fieldOrdering) { - const entries = Object.entries(message.fieldOrdering); - if (entries.length > 0) { - obj.fieldOrdering = {}; - entries.forEach(([k, v]) => { - obj.fieldOrdering[k] = FieldOrdering.toJSON(v); - }); - } - } - if (message.appleWalletOptions !== undefined) { - obj.appleWalletOptions = AppleWalletOptions.toJSON( - message.appleWalletOptions, - ); - } - return obj; - }, + fromJSON(object: any): CreateCredentialTemplateRequest { + return { + name: isSet(object.name) ? String(object.name) : "", + fields: isObject(object.fields) + ? Object.entries(object.fields).reduce<{ [key: string]: TemplateField }>((acc, [key, value]) => { + acc[key] = TemplateField.fromJSON(value); + return acc; + }, {}) + : {}, + allowAdditionalFields: isSet(object.allowAdditionalFields) ? Boolean(object.allowAdditionalFields) : false, + title: isSet(object.title) ? String(object.title) : "", + description: isSet(object.description) ? String(object.description) : "", + fieldOrdering: isObject(object.fieldOrdering) + ? Object.entries(object.fieldOrdering).reduce<{ [key: string]: FieldOrdering }>((acc, [key, value]) => { + acc[key] = FieldOrdering.fromJSON(value); + return acc; + }, {}) + : {}, + appleWalletOptions: isSet(object.appleWalletOptions) + ? AppleWalletOptions.fromJSON(object.appleWalletOptions) + : undefined, + }; + }, - create( - base?: DeepPartial, - ): CreateCredentialTemplateRequest { - return CreateCredentialTemplateRequest.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): CreateCredentialTemplateRequest { - const message = createBaseCreateCredentialTemplateRequest(); - message.name = object.name ?? ""; - message.fields = Object.entries(object.fields ?? {}).reduce<{ - [key: string]: TemplateField; - }>((acc, [key, value]) => { - if (value !== undefined) { - acc[key] = TemplateField.fromPartial(value); - } - return acc; - }, {}); - message.allowAdditionalFields = object.allowAdditionalFields ?? false; - message.title = object.title ?? ""; - message.description = object.description ?? ""; - message.fieldOrdering = Object.entries( - object.fieldOrdering ?? {}, - ).reduce<{ [key: string]: FieldOrdering }>((acc, [key, value]) => { - if (value !== undefined) { - acc[key] = FieldOrdering.fromPartial(value); - } - return acc; - }, {}); - message.appleWalletOptions = - object.appleWalletOptions !== undefined && - object.appleWalletOptions !== null - ? AppleWalletOptions.fromPartial(object.appleWalletOptions) - : undefined; - return message; - }, + toJSON(message: CreateCredentialTemplateRequest): unknown { + const obj: any = {}; + if (message.name !== undefined && message.name !== "") { + obj.name = message.name; + } + if (message.fields) { + const entries = Object.entries(message.fields); + if (entries.length > 0) { + obj.fields = {}; + entries.forEach(([k, v]) => { + obj.fields[k] = TemplateField.toJSON(v); + }); + } + } + if (message.allowAdditionalFields === true) { + obj.allowAdditionalFields = message.allowAdditionalFields; + } + if (message.title !== undefined && message.title !== "") { + obj.title = message.title; + } + if (message.description !== undefined && message.description !== "") { + obj.description = message.description; + } + if (message.fieldOrdering) { + const entries = Object.entries(message.fieldOrdering); + if (entries.length > 0) { + obj.fieldOrdering = {}; + entries.forEach(([k, v]) => { + obj.fieldOrdering[k] = FieldOrdering.toJSON(v); + }); + } + } + if (message.appleWalletOptions !== undefined) { + obj.appleWalletOptions = AppleWalletOptions.toJSON(message.appleWalletOptions); + } + return obj; + }, + + create(base?: DeepPartial): CreateCredentialTemplateRequest { + return CreateCredentialTemplateRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): CreateCredentialTemplateRequest { + const message = createBaseCreateCredentialTemplateRequest(); + message.name = object.name ?? ""; + message.fields = Object.entries(object.fields ?? {}).reduce<{ [key: string]: TemplateField }>( + (acc, [key, value]) => { + if (value !== undefined) { + acc[key] = TemplateField.fromPartial(value); + } + return acc; + }, + {}, + ); + message.allowAdditionalFields = object.allowAdditionalFields ?? false; + message.title = object.title ?? ""; + message.description = object.description ?? ""; + message.fieldOrdering = Object.entries(object.fieldOrdering ?? {}).reduce<{ [key: string]: FieldOrdering }>( + (acc, [key, value]) => { + if (value !== undefined) { + acc[key] = FieldOrdering.fromPartial(value); + } + return acc; + }, + {}, + ); + message.appleWalletOptions = (object.appleWalletOptions !== undefined && object.appleWalletOptions !== null) + ? AppleWalletOptions.fromPartial(object.appleWalletOptions) + : undefined; + return message; + }, }; function createBaseCreateCredentialTemplateRequest_FieldsEntry(): CreateCredentialTemplateRequest_FieldsEntry { - return { key: "", value: undefined }; + return { key: "", value: undefined }; } export const CreateCredentialTemplateRequest_FieldsEntry = { - encode( - message: CreateCredentialTemplateRequest_FieldsEntry, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.value !== undefined) { - TemplateField.encode( - message.value, - writer.uint32(18).fork(), - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): CreateCredentialTemplateRequest_FieldsEntry { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCreateCredentialTemplateRequest_FieldsEntry(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.key = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.value = TemplateField.decode( - reader, - reader.uint32(), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: CreateCredentialTemplateRequest_FieldsEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.key !== "") { + writer.uint32(10).string(message.key); + } + if (message.value !== undefined) { + TemplateField.encode(message.value, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): CreateCredentialTemplateRequest_FieldsEntry { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCreateCredentialTemplateRequest_FieldsEntry(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - fromJSON(object: any): CreateCredentialTemplateRequest_FieldsEntry { - return { - key: isSet(object.key) ? String(object.key) : "", - value: isSet(object.value) - ? TemplateField.fromJSON(object.value) - : undefined, - }; - }, + message.key = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.value = TemplateField.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: CreateCredentialTemplateRequest_FieldsEntry): unknown { - const obj: any = {}; - if (message.key !== "") { - obj.key = message.key; - } - if (message.value !== undefined) { - obj.value = TemplateField.toJSON(message.value); - } - return obj; - }, + fromJSON(object: any): CreateCredentialTemplateRequest_FieldsEntry { + return { + key: isSet(object.key) ? String(object.key) : "", + value: isSet(object.value) ? TemplateField.fromJSON(object.value) : undefined, + }; + }, - create( - base?: DeepPartial, - ): CreateCredentialTemplateRequest_FieldsEntry { - return CreateCredentialTemplateRequest_FieldsEntry.fromPartial( - base ?? {}, - ); - }, - fromPartial( - object: DeepPartial, - ): CreateCredentialTemplateRequest_FieldsEntry { - const message = createBaseCreateCredentialTemplateRequest_FieldsEntry(); - message.key = object.key ?? ""; - message.value = - object.value !== undefined && object.value !== null - ? TemplateField.fromPartial(object.value) - : undefined; - return message; - }, + toJSON(message: CreateCredentialTemplateRequest_FieldsEntry): unknown { + const obj: any = {}; + if (message.key !== "") { + obj.key = message.key; + } + if (message.value !== undefined) { + obj.value = TemplateField.toJSON(message.value); + } + return obj; + }, + + create(base?: DeepPartial): CreateCredentialTemplateRequest_FieldsEntry { + return CreateCredentialTemplateRequest_FieldsEntry.fromPartial(base ?? {}); + }, + fromPartial( + object: DeepPartial, + ): CreateCredentialTemplateRequest_FieldsEntry { + const message = createBaseCreateCredentialTemplateRequest_FieldsEntry(); + message.key = object.key ?? ""; + message.value = (object.value !== undefined && object.value !== null) + ? TemplateField.fromPartial(object.value) + : undefined; + return message; + }, }; function createBaseCreateCredentialTemplateRequest_FieldOrderingEntry(): CreateCredentialTemplateRequest_FieldOrderingEntry { - return { key: "", value: undefined }; + return { key: "", value: undefined }; } export const CreateCredentialTemplateRequest_FieldOrderingEntry = { - encode( - message: CreateCredentialTemplateRequest_FieldOrderingEntry, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.value !== undefined) { - FieldOrdering.encode( - message.value, - writer.uint32(18).fork(), - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): CreateCredentialTemplateRequest_FieldOrderingEntry { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = - createBaseCreateCredentialTemplateRequest_FieldOrderingEntry(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.key = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.value = FieldOrdering.decode( - reader, - reader.uint32(), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode( + message: CreateCredentialTemplateRequest_FieldOrderingEntry, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.key !== "") { + writer.uint32(10).string(message.key); + } + if (message.value !== undefined) { + FieldOrdering.encode(message.value, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): CreateCredentialTemplateRequest_FieldOrderingEntry { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCreateCredentialTemplateRequest_FieldOrderingEntry(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - fromJSON(object: any): CreateCredentialTemplateRequest_FieldOrderingEntry { - return { - key: isSet(object.key) ? String(object.key) : "", - value: isSet(object.value) - ? FieldOrdering.fromJSON(object.value) - : undefined, - }; - }, + message.key = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.value = FieldOrdering.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON( - message: CreateCredentialTemplateRequest_FieldOrderingEntry, - ): unknown { - const obj: any = {}; - if (message.key !== "") { - obj.key = message.key; - } - if (message.value !== undefined) { - obj.value = FieldOrdering.toJSON(message.value); - } - return obj; - }, + fromJSON(object: any): CreateCredentialTemplateRequest_FieldOrderingEntry { + return { + key: isSet(object.key) ? String(object.key) : "", + value: isSet(object.value) ? FieldOrdering.fromJSON(object.value) : undefined, + }; + }, - create( - base?: DeepPartial, - ): CreateCredentialTemplateRequest_FieldOrderingEntry { - return CreateCredentialTemplateRequest_FieldOrderingEntry.fromPartial( - base ?? {}, - ); - }, - fromPartial( - object: DeepPartial, - ): CreateCredentialTemplateRequest_FieldOrderingEntry { - const message = - createBaseCreateCredentialTemplateRequest_FieldOrderingEntry(); - message.key = object.key ?? ""; - message.value = - object.value !== undefined && object.value !== null - ? FieldOrdering.fromPartial(object.value) - : undefined; - return message; - }, + toJSON(message: CreateCredentialTemplateRequest_FieldOrderingEntry): unknown { + const obj: any = {}; + if (message.key !== "") { + obj.key = message.key; + } + if (message.value !== undefined) { + obj.value = FieldOrdering.toJSON(message.value); + } + return obj; + }, + + create( + base?: DeepPartial, + ): CreateCredentialTemplateRequest_FieldOrderingEntry { + return CreateCredentialTemplateRequest_FieldOrderingEntry.fromPartial(base ?? {}); + }, + fromPartial( + object: DeepPartial, + ): CreateCredentialTemplateRequest_FieldOrderingEntry { + const message = createBaseCreateCredentialTemplateRequest_FieldOrderingEntry(); + message.key = object.key ?? ""; + message.value = (object.value !== undefined && object.value !== null) + ? FieldOrdering.fromPartial(object.value) + : undefined; + return message; + }, }; function createBaseCreateCredentialTemplateResponse(): CreateCredentialTemplateResponse { - return { data: undefined }; + return { data: undefined }; } export const CreateCredentialTemplateResponse = { - encode( - message: CreateCredentialTemplateResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.data !== undefined) { - TemplateData.encode( - message.data, - writer.uint32(10).fork(), - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): CreateCredentialTemplateResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCreateCredentialTemplateResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.data = TemplateData.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): CreateCredentialTemplateResponse { - return { - data: isSet(object.data) - ? TemplateData.fromJSON(object.data) - : undefined, - }; - }, + encode(message: CreateCredentialTemplateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.data !== undefined) { + TemplateData.encode(message.data, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): CreateCredentialTemplateResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCreateCredentialTemplateResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.data = TemplateData.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: CreateCredentialTemplateResponse): unknown { - const obj: any = {}; - if (message.data !== undefined) { - obj.data = TemplateData.toJSON(message.data); - } - return obj; - }, + fromJSON(object: any): CreateCredentialTemplateResponse { + return { data: isSet(object.data) ? TemplateData.fromJSON(object.data) : undefined }; + }, - create( - base?: DeepPartial, - ): CreateCredentialTemplateResponse { - return CreateCredentialTemplateResponse.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): CreateCredentialTemplateResponse { - const message = createBaseCreateCredentialTemplateResponse(); - message.data = - object.data !== undefined && object.data !== null - ? TemplateData.fromPartial(object.data) - : undefined; - return message; - }, + toJSON(message: CreateCredentialTemplateResponse): unknown { + const obj: any = {}; + if (message.data !== undefined) { + obj.data = TemplateData.toJSON(message.data); + } + return obj; + }, + + create(base?: DeepPartial): CreateCredentialTemplateResponse { + return CreateCredentialTemplateResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): CreateCredentialTemplateResponse { + const message = createBaseCreateCredentialTemplateResponse(); + message.data = (object.data !== undefined && object.data !== null) + ? TemplateData.fromPartial(object.data) + : undefined; + return message; + }, }; function createBaseUpdateCredentialTemplateRequest(): UpdateCredentialTemplateRequest { - return { - id: "", - title: undefined, - description: undefined, - fields: {}, - fieldOrdering: {}, - appleWalletOptions: undefined, - }; + return { + id: "", + title: undefined, + description: undefined, + fields: {}, + fieldOrdering: {}, + appleWalletOptions: undefined, + }; } export const UpdateCredentialTemplateRequest = { - encode( - message: UpdateCredentialTemplateRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.id !== undefined && message.id !== "") { - writer.uint32(10).string(message.id); - } - if (message.title !== undefined) { - writer.uint32(18).string(message.title); - } - if (message.description !== undefined) { - writer.uint32(26).string(message.description); - } - Object.entries(message.fields || {}).forEach(([key, value]) => { - UpdateCredentialTemplateRequest_FieldsEntry.encode( - { key: key as any, value }, - writer.uint32(34).fork(), - ).ldelim(); - }); - Object.entries(message.fieldOrdering || {}).forEach(([key, value]) => { - UpdateCredentialTemplateRequest_FieldOrderingEntry.encode( - { key: key as any, value }, - writer.uint32(42).fork(), - ).ldelim(); - }); - if (message.appleWalletOptions !== undefined) { - AppleWalletOptions.encode( - message.appleWalletOptions, - writer.uint32(50).fork(), - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): UpdateCredentialTemplateRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateCredentialTemplateRequest(); - 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.title = reader.string(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.description = reader.string(); - continue; - case 4: - if (tag !== 34) { - break; - } - - const entry4 = - UpdateCredentialTemplateRequest_FieldsEntry.decode( - reader, - reader.uint32(), - ); - if (entry4.value !== undefined) { - message.fields![entry4.key] = entry4.value; - } - continue; - case 5: - if (tag !== 42) { - break; - } - - const entry5 = - UpdateCredentialTemplateRequest_FieldOrderingEntry.decode( - reader, - reader.uint32(), - ); - if (entry5.value !== undefined) { - message.fieldOrdering![entry5.key] = entry5.value; - } - continue; - case 6: - if (tag !== 50) { - break; - } - - message.appleWalletOptions = AppleWalletOptions.decode( - reader, - reader.uint32(), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: UpdateCredentialTemplateRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.id !== undefined && message.id !== "") { + writer.uint32(10).string(message.id); + } + if (message.title !== undefined) { + writer.uint32(18).string(message.title); + } + if (message.description !== undefined) { + writer.uint32(26).string(message.description); + } + Object.entries(message.fields || {}).forEach(([key, value]) => { + UpdateCredentialTemplateRequest_FieldsEntry.encode({ key: key as any, value }, writer.uint32(34).fork()).ldelim(); + }); + Object.entries(message.fieldOrdering || {}).forEach(([key, value]) => { + UpdateCredentialTemplateRequest_FieldOrderingEntry.encode({ key: key as any, value }, writer.uint32(42).fork()) + .ldelim(); + }); + if (message.appleWalletOptions !== undefined) { + AppleWalletOptions.encode(message.appleWalletOptions, writer.uint32(50).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): UpdateCredentialTemplateRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUpdateCredentialTemplateRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - fromJSON(object: any): UpdateCredentialTemplateRequest { - return { - id: isSet(object.id) ? String(object.id) : "", - title: isSet(object.title) ? String(object.title) : undefined, - description: isSet(object.description) - ? String(object.description) - : undefined, - fields: isObject(object.fields) - ? Object.entries(object.fields).reduce<{ - [key: string]: TemplateFieldPatch; - }>((acc, [key, value]) => { - acc[key] = TemplateFieldPatch.fromJSON(value); - return acc; - }, {}) - : {}, - fieldOrdering: isObject(object.fieldOrdering) - ? Object.entries(object.fieldOrdering).reduce<{ - [key: string]: FieldOrdering; - }>((acc, [key, value]) => { - acc[key] = FieldOrdering.fromJSON(value); - return acc; - }, {}) - : {}, - appleWalletOptions: isSet(object.appleWalletOptions) - ? AppleWalletOptions.fromJSON(object.appleWalletOptions) - : undefined, - }; - }, + message.id = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.title = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.description = reader.string(); + continue; + case 4: + if (tag !== 34) { + break; + } + + const entry4 = UpdateCredentialTemplateRequest_FieldsEntry.decode(reader, reader.uint32()); + if (entry4.value !== undefined) { + message.fields![entry4.key] = entry4.value; + } + continue; + case 5: + if (tag !== 42) { + break; + } + + const entry5 = UpdateCredentialTemplateRequest_FieldOrderingEntry.decode(reader, reader.uint32()); + if (entry5.value !== undefined) { + message.fieldOrdering![entry5.key] = entry5.value; + } + continue; + case 6: + if (tag !== 50) { + break; + } + + message.appleWalletOptions = AppleWalletOptions.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: UpdateCredentialTemplateRequest): unknown { - const obj: any = {}; - if (message.id !== undefined && message.id !== "") { - obj.id = message.id; - } - if (message.title !== undefined) { - obj.title = message.title; - } - if (message.description !== undefined) { - obj.description = message.description; - } - if (message.fields) { - const entries = Object.entries(message.fields); - if (entries.length > 0) { - obj.fields = {}; - entries.forEach(([k, v]) => { - obj.fields[k] = TemplateFieldPatch.toJSON(v); - }); - } - } - if (message.fieldOrdering) { - const entries = Object.entries(message.fieldOrdering); - if (entries.length > 0) { - obj.fieldOrdering = {}; - entries.forEach(([k, v]) => { - obj.fieldOrdering[k] = FieldOrdering.toJSON(v); - }); - } - } - if (message.appleWalletOptions !== undefined) { - obj.appleWalletOptions = AppleWalletOptions.toJSON( - message.appleWalletOptions, - ); - } - return obj; - }, + fromJSON(object: any): UpdateCredentialTemplateRequest { + return { + id: isSet(object.id) ? String(object.id) : "", + title: isSet(object.title) ? String(object.title) : undefined, + description: isSet(object.description) ? String(object.description) : undefined, + fields: isObject(object.fields) + ? Object.entries(object.fields).reduce<{ [key: string]: TemplateFieldPatch }>((acc, [key, value]) => { + acc[key] = TemplateFieldPatch.fromJSON(value); + return acc; + }, {}) + : {}, + fieldOrdering: isObject(object.fieldOrdering) + ? Object.entries(object.fieldOrdering).reduce<{ [key: string]: FieldOrdering }>((acc, [key, value]) => { + acc[key] = FieldOrdering.fromJSON(value); + return acc; + }, {}) + : {}, + appleWalletOptions: isSet(object.appleWalletOptions) + ? AppleWalletOptions.fromJSON(object.appleWalletOptions) + : undefined, + }; + }, - create( - base?: DeepPartial, - ): UpdateCredentialTemplateRequest { - return UpdateCredentialTemplateRequest.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): UpdateCredentialTemplateRequest { - const message = createBaseUpdateCredentialTemplateRequest(); - message.id = object.id ?? ""; - message.title = object.title ?? undefined; - message.description = object.description ?? undefined; - message.fields = Object.entries(object.fields ?? {}).reduce<{ - [key: string]: TemplateFieldPatch; - }>((acc, [key, value]) => { - if (value !== undefined) { - acc[key] = TemplateFieldPatch.fromPartial(value); - } - return acc; - }, {}); - message.fieldOrdering = Object.entries( - object.fieldOrdering ?? {}, - ).reduce<{ [key: string]: FieldOrdering }>((acc, [key, value]) => { - if (value !== undefined) { - acc[key] = FieldOrdering.fromPartial(value); - } - return acc; - }, {}); - message.appleWalletOptions = - object.appleWalletOptions !== undefined && - object.appleWalletOptions !== null - ? AppleWalletOptions.fromPartial(object.appleWalletOptions) - : undefined; - return message; - }, + toJSON(message: UpdateCredentialTemplateRequest): unknown { + const obj: any = {}; + if (message.id !== undefined && message.id !== "") { + obj.id = message.id; + } + if (message.title !== undefined) { + obj.title = message.title; + } + if (message.description !== undefined) { + obj.description = message.description; + } + if (message.fields) { + const entries = Object.entries(message.fields); + if (entries.length > 0) { + obj.fields = {}; + entries.forEach(([k, v]) => { + obj.fields[k] = TemplateFieldPatch.toJSON(v); + }); + } + } + if (message.fieldOrdering) { + const entries = Object.entries(message.fieldOrdering); + if (entries.length > 0) { + obj.fieldOrdering = {}; + entries.forEach(([k, v]) => { + obj.fieldOrdering[k] = FieldOrdering.toJSON(v); + }); + } + } + if (message.appleWalletOptions !== undefined) { + obj.appleWalletOptions = AppleWalletOptions.toJSON(message.appleWalletOptions); + } + return obj; + }, + + create(base?: DeepPartial): UpdateCredentialTemplateRequest { + return UpdateCredentialTemplateRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): UpdateCredentialTemplateRequest { + const message = createBaseUpdateCredentialTemplateRequest(); + message.id = object.id ?? ""; + message.title = object.title ?? undefined; + message.description = object.description ?? undefined; + message.fields = Object.entries(object.fields ?? {}).reduce<{ [key: string]: TemplateFieldPatch }>( + (acc, [key, value]) => { + if (value !== undefined) { + acc[key] = TemplateFieldPatch.fromPartial(value); + } + return acc; + }, + {}, + ); + message.fieldOrdering = Object.entries(object.fieldOrdering ?? {}).reduce<{ [key: string]: FieldOrdering }>( + (acc, [key, value]) => { + if (value !== undefined) { + acc[key] = FieldOrdering.fromPartial(value); + } + return acc; + }, + {}, + ); + message.appleWalletOptions = (object.appleWalletOptions !== undefined && object.appleWalletOptions !== null) + ? AppleWalletOptions.fromPartial(object.appleWalletOptions) + : undefined; + return message; + }, }; function createBaseUpdateCredentialTemplateRequest_FieldsEntry(): UpdateCredentialTemplateRequest_FieldsEntry { - return { key: "", value: undefined }; + return { key: "", value: undefined }; } export const UpdateCredentialTemplateRequest_FieldsEntry = { - encode( - message: UpdateCredentialTemplateRequest_FieldsEntry, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.value !== undefined) { - TemplateFieldPatch.encode( - message.value, - writer.uint32(18).fork(), - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): UpdateCredentialTemplateRequest_FieldsEntry { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateCredentialTemplateRequest_FieldsEntry(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.key = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.value = TemplateFieldPatch.decode( - reader, - reader.uint32(), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: UpdateCredentialTemplateRequest_FieldsEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.key !== "") { + writer.uint32(10).string(message.key); + } + if (message.value !== undefined) { + TemplateFieldPatch.encode(message.value, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): UpdateCredentialTemplateRequest_FieldsEntry { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUpdateCredentialTemplateRequest_FieldsEntry(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - fromJSON(object: any): UpdateCredentialTemplateRequest_FieldsEntry { - return { - key: isSet(object.key) ? String(object.key) : "", - value: isSet(object.value) - ? TemplateFieldPatch.fromJSON(object.value) - : undefined, - }; - }, + message.key = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.value = TemplateFieldPatch.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: UpdateCredentialTemplateRequest_FieldsEntry): unknown { - const obj: any = {}; - if (message.key !== "") { - obj.key = message.key; - } - if (message.value !== undefined) { - obj.value = TemplateFieldPatch.toJSON(message.value); - } - return obj; - }, + fromJSON(object: any): UpdateCredentialTemplateRequest_FieldsEntry { + return { + key: isSet(object.key) ? String(object.key) : "", + value: isSet(object.value) ? TemplateFieldPatch.fromJSON(object.value) : undefined, + }; + }, - create( - base?: DeepPartial, - ): UpdateCredentialTemplateRequest_FieldsEntry { - return UpdateCredentialTemplateRequest_FieldsEntry.fromPartial( - base ?? {}, - ); - }, - fromPartial( - object: DeepPartial, - ): UpdateCredentialTemplateRequest_FieldsEntry { - const message = createBaseUpdateCredentialTemplateRequest_FieldsEntry(); - message.key = object.key ?? ""; - message.value = - object.value !== undefined && object.value !== null - ? TemplateFieldPatch.fromPartial(object.value) - : undefined; - return message; - }, + toJSON(message: UpdateCredentialTemplateRequest_FieldsEntry): unknown { + const obj: any = {}; + if (message.key !== "") { + obj.key = message.key; + } + if (message.value !== undefined) { + obj.value = TemplateFieldPatch.toJSON(message.value); + } + return obj; + }, + + create(base?: DeepPartial): UpdateCredentialTemplateRequest_FieldsEntry { + return UpdateCredentialTemplateRequest_FieldsEntry.fromPartial(base ?? {}); + }, + fromPartial( + object: DeepPartial, + ): UpdateCredentialTemplateRequest_FieldsEntry { + const message = createBaseUpdateCredentialTemplateRequest_FieldsEntry(); + message.key = object.key ?? ""; + message.value = (object.value !== undefined && object.value !== null) + ? TemplateFieldPatch.fromPartial(object.value) + : undefined; + return message; + }, }; function createBaseUpdateCredentialTemplateRequest_FieldOrderingEntry(): UpdateCredentialTemplateRequest_FieldOrderingEntry { - return { key: "", value: undefined }; + return { key: "", value: undefined }; } export const UpdateCredentialTemplateRequest_FieldOrderingEntry = { - encode( - message: UpdateCredentialTemplateRequest_FieldOrderingEntry, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.value !== undefined) { - FieldOrdering.encode( - message.value, - writer.uint32(18).fork(), - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): UpdateCredentialTemplateRequest_FieldOrderingEntry { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = - createBaseUpdateCredentialTemplateRequest_FieldOrderingEntry(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.key = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.value = FieldOrdering.decode( - reader, - reader.uint32(), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode( + message: UpdateCredentialTemplateRequest_FieldOrderingEntry, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.key !== "") { + writer.uint32(10).string(message.key); + } + if (message.value !== undefined) { + FieldOrdering.encode(message.value, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): UpdateCredentialTemplateRequest_FieldOrderingEntry { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUpdateCredentialTemplateRequest_FieldOrderingEntry(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - fromJSON(object: any): UpdateCredentialTemplateRequest_FieldOrderingEntry { - return { - key: isSet(object.key) ? String(object.key) : "", - value: isSet(object.value) - ? FieldOrdering.fromJSON(object.value) - : undefined, - }; - }, + message.key = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.value = FieldOrdering.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON( - message: UpdateCredentialTemplateRequest_FieldOrderingEntry, - ): unknown { - const obj: any = {}; - if (message.key !== "") { - obj.key = message.key; - } - if (message.value !== undefined) { - obj.value = FieldOrdering.toJSON(message.value); - } - return obj; - }, + fromJSON(object: any): UpdateCredentialTemplateRequest_FieldOrderingEntry { + return { + key: isSet(object.key) ? String(object.key) : "", + value: isSet(object.value) ? FieldOrdering.fromJSON(object.value) : undefined, + }; + }, - create( - base?: DeepPartial, - ): UpdateCredentialTemplateRequest_FieldOrderingEntry { - return UpdateCredentialTemplateRequest_FieldOrderingEntry.fromPartial( - base ?? {}, - ); - }, - fromPartial( - object: DeepPartial, - ): UpdateCredentialTemplateRequest_FieldOrderingEntry { - const message = - createBaseUpdateCredentialTemplateRequest_FieldOrderingEntry(); - message.key = object.key ?? ""; - message.value = - object.value !== undefined && object.value !== null - ? FieldOrdering.fromPartial(object.value) - : undefined; - return message; - }, + toJSON(message: UpdateCredentialTemplateRequest_FieldOrderingEntry): unknown { + const obj: any = {}; + if (message.key !== "") { + obj.key = message.key; + } + if (message.value !== undefined) { + obj.value = FieldOrdering.toJSON(message.value); + } + return obj; + }, + + create( + base?: DeepPartial, + ): UpdateCredentialTemplateRequest_FieldOrderingEntry { + return UpdateCredentialTemplateRequest_FieldOrderingEntry.fromPartial(base ?? {}); + }, + fromPartial( + object: DeepPartial, + ): UpdateCredentialTemplateRequest_FieldOrderingEntry { + const message = createBaseUpdateCredentialTemplateRequest_FieldOrderingEntry(); + message.key = object.key ?? ""; + message.value = (object.value !== undefined && object.value !== null) + ? FieldOrdering.fromPartial(object.value) + : undefined; + return message; + }, }; function createBaseUpdateCredentialTemplateResponse(): UpdateCredentialTemplateResponse { - return { updatedTemplate: undefined }; + return { updatedTemplate: undefined }; } export const UpdateCredentialTemplateResponse = { - encode( - message: UpdateCredentialTemplateResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.updatedTemplate !== undefined) { - TemplateData.encode( - message.updatedTemplate, - writer.uint32(10).fork(), - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): UpdateCredentialTemplateResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateCredentialTemplateResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.updatedTemplate = TemplateData.decode( - reader, - reader.uint32(), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): UpdateCredentialTemplateResponse { - return { - updatedTemplate: isSet(object.updatedTemplate) - ? TemplateData.fromJSON(object.updatedTemplate) - : undefined, - }; - }, + encode(message: UpdateCredentialTemplateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.updatedTemplate !== undefined) { + TemplateData.encode(message.updatedTemplate, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): UpdateCredentialTemplateResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUpdateCredentialTemplateResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.updatedTemplate = TemplateData.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: UpdateCredentialTemplateResponse): unknown { - const obj: any = {}; - if (message.updatedTemplate !== undefined) { - obj.updatedTemplate = TemplateData.toJSON(message.updatedTemplate); - } - return obj; - }, + fromJSON(object: any): UpdateCredentialTemplateResponse { + return { + updatedTemplate: isSet(object.updatedTemplate) ? TemplateData.fromJSON(object.updatedTemplate) : undefined, + }; + }, - create( - base?: DeepPartial, - ): UpdateCredentialTemplateResponse { - return UpdateCredentialTemplateResponse.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): UpdateCredentialTemplateResponse { - const message = createBaseUpdateCredentialTemplateResponse(); - message.updatedTemplate = - object.updatedTemplate !== undefined && - object.updatedTemplate !== null - ? TemplateData.fromPartial(object.updatedTemplate) - : undefined; - return message; - }, + toJSON(message: UpdateCredentialTemplateResponse): unknown { + const obj: any = {}; + if (message.updatedTemplate !== undefined) { + obj.updatedTemplate = TemplateData.toJSON(message.updatedTemplate); + } + return obj; + }, + + create(base?: DeepPartial): UpdateCredentialTemplateResponse { + return UpdateCredentialTemplateResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): UpdateCredentialTemplateResponse { + const message = createBaseUpdateCredentialTemplateResponse(); + message.updatedTemplate = (object.updatedTemplate !== undefined && object.updatedTemplate !== null) + ? TemplateData.fromPartial(object.updatedTemplate) + : undefined; + return message; + }, }; function createBaseTemplateData(): TemplateData { - return { - id: "", - name: "", - version: 0, - fields: {}, - allowAdditionalFields: false, - schemaUri: "", - ecosystemId: "", - type: "", - createdBy: "", - dateCreated: "", - title: "", - description: "", - fieldOrdering: {}, - appleWalletOptions: undefined, - }; + return { + id: "", + name: "", + version: 0, + fields: {}, + allowAdditionalFields: false, + schemaUri: "", + ecosystemId: "", + type: "", + createdBy: "", + dateCreated: "", + title: "", + description: "", + fieldOrdering: {}, + appleWalletOptions: undefined, + }; } export const TemplateData = { - encode( - message: TemplateData, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.id !== undefined && message.id !== "") { - writer.uint32(10).string(message.id); - } - if (message.name !== undefined && message.name !== "") { - writer.uint32(18).string(message.name); - } - if (message.version !== undefined && message.version !== 0) { - writer.uint32(24).int32(message.version); - } - Object.entries(message.fields || {}).forEach(([key, value]) => { - TemplateData_FieldsEntry.encode( - { key: key as any, value }, - writer.uint32(34).fork(), - ).ldelim(); - }); - if (message.allowAdditionalFields === true) { - writer.uint32(40).bool(message.allowAdditionalFields); - } - if (message.schemaUri !== undefined && message.schemaUri !== "") { - writer.uint32(50).string(message.schemaUri); - } - if (message.ecosystemId !== undefined && message.ecosystemId !== "") { - writer.uint32(66).string(message.ecosystemId); - } - if (message.type !== undefined && message.type !== "") { - writer.uint32(74).string(message.type); - } - if (message.createdBy !== undefined && message.createdBy !== "") { - writer.uint32(82).string(message.createdBy); - } - if (message.dateCreated !== undefined && message.dateCreated !== "") { - writer.uint32(90).string(message.dateCreated); - } - if (message.title !== undefined && message.title !== "") { - writer.uint32(98).string(message.title); - } - if (message.description !== undefined && message.description !== "") { - writer.uint32(106).string(message.description); - } - Object.entries(message.fieldOrdering || {}).forEach(([key, value]) => { - TemplateData_FieldOrderingEntry.encode( - { key: key as any, value }, - writer.uint32(114).fork(), - ).ldelim(); - }); - if (message.appleWalletOptions !== undefined) { - AppleWalletOptions.encode( - message.appleWalletOptions, - writer.uint32(122).fork(), - ).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): TemplateData { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTemplateData(); - 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.name = reader.string(); - continue; - case 3: - if (tag !== 24) { - break; - } - - message.version = reader.int32(); - continue; - case 4: - if (tag !== 34) { - break; - } - - const entry4 = TemplateData_FieldsEntry.decode( - reader, - reader.uint32(), - ); - if (entry4.value !== undefined) { - message.fields![entry4.key] = entry4.value; - } - continue; - case 5: - if (tag !== 40) { - break; - } - - message.allowAdditionalFields = reader.bool(); - continue; - case 6: - if (tag !== 50) { - break; - } - - message.schemaUri = reader.string(); - continue; - case 8: - if (tag !== 66) { - break; - } - - message.ecosystemId = reader.string(); - continue; - case 9: - if (tag !== 74) { - break; - } - - message.type = reader.string(); - continue; - case 10: - if (tag !== 82) { - break; - } - - message.createdBy = reader.string(); - continue; - case 11: - if (tag !== 90) { - break; - } - - message.dateCreated = reader.string(); - continue; - case 12: - if (tag !== 98) { - break; - } - - message.title = reader.string(); - continue; - case 13: - if (tag !== 106) { - break; - } - - message.description = reader.string(); - continue; - case 14: - if (tag !== 114) { - break; - } - - const entry14 = TemplateData_FieldOrderingEntry.decode( - reader, - reader.uint32(), - ); - if (entry14.value !== undefined) { - message.fieldOrdering![entry14.key] = entry14.value; - } - continue; - case 15: - if (tag !== 122) { - break; - } - - message.appleWalletOptions = AppleWalletOptions.decode( - reader, - reader.uint32(), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: TemplateData, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.id !== undefined && message.id !== "") { + writer.uint32(10).string(message.id); + } + if (message.name !== undefined && message.name !== "") { + writer.uint32(18).string(message.name); + } + if (message.version !== undefined && message.version !== 0) { + writer.uint32(24).int32(message.version); + } + Object.entries(message.fields || {}).forEach(([key, value]) => { + TemplateData_FieldsEntry.encode({ key: key as any, value }, writer.uint32(34).fork()).ldelim(); + }); + if (message.allowAdditionalFields === true) { + writer.uint32(40).bool(message.allowAdditionalFields); + } + if (message.schemaUri !== undefined && message.schemaUri !== "") { + writer.uint32(50).string(message.schemaUri); + } + if (message.ecosystemId !== undefined && message.ecosystemId !== "") { + writer.uint32(66).string(message.ecosystemId); + } + if (message.type !== undefined && message.type !== "") { + writer.uint32(74).string(message.type); + } + if (message.createdBy !== undefined && message.createdBy !== "") { + writer.uint32(82).string(message.createdBy); + } + if (message.dateCreated !== undefined && message.dateCreated !== "") { + writer.uint32(90).string(message.dateCreated); + } + if (message.title !== undefined && message.title !== "") { + writer.uint32(98).string(message.title); + } + if (message.description !== undefined && message.description !== "") { + writer.uint32(106).string(message.description); + } + Object.entries(message.fieldOrdering || {}).forEach(([key, value]) => { + TemplateData_FieldOrderingEntry.encode({ key: key as any, value }, writer.uint32(114).fork()).ldelim(); + }); + if (message.appleWalletOptions !== undefined) { + AppleWalletOptions.encode(message.appleWalletOptions, writer.uint32(122).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): TemplateData { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTemplateData(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - fromJSON(object: any): TemplateData { - return { - id: isSet(object.id) ? String(object.id) : "", - name: isSet(object.name) ? String(object.name) : "", - version: isSet(object.version) ? Number(object.version) : 0, - fields: isObject(object.fields) - ? Object.entries(object.fields).reduce<{ - [key: string]: TemplateField; - }>((acc, [key, value]) => { - acc[key] = TemplateField.fromJSON(value); - return acc; - }, {}) - : {}, - allowAdditionalFields: isSet(object.allowAdditionalFields) - ? Boolean(object.allowAdditionalFields) - : false, - schemaUri: isSet(object.schemaUri) ? String(object.schemaUri) : "", - ecosystemId: isSet(object.ecosystemId) - ? String(object.ecosystemId) - : "", - type: isSet(object.type) ? String(object.type) : "", - createdBy: isSet(object.createdBy) ? String(object.createdBy) : "", - dateCreated: isSet(object.dateCreated) - ? String(object.dateCreated) - : "", - title: isSet(object.title) ? String(object.title) : "", - description: isSet(object.description) - ? String(object.description) - : "", - fieldOrdering: isObject(object.fieldOrdering) - ? Object.entries(object.fieldOrdering).reduce<{ - [key: string]: FieldOrdering; - }>((acc, [key, value]) => { - acc[key] = FieldOrdering.fromJSON(value); - return acc; - }, {}) - : {}, - appleWalletOptions: isSet(object.appleWalletOptions) - ? AppleWalletOptions.fromJSON(object.appleWalletOptions) - : undefined, - }; - }, + message.id = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.name = reader.string(); + continue; + case 3: + if (tag !== 24) { + break; + } + + message.version = reader.int32(); + continue; + case 4: + if (tag !== 34) { + break; + } + + const entry4 = TemplateData_FieldsEntry.decode(reader, reader.uint32()); + if (entry4.value !== undefined) { + message.fields![entry4.key] = entry4.value; + } + continue; + case 5: + if (tag !== 40) { + break; + } + + message.allowAdditionalFields = reader.bool(); + continue; + case 6: + if (tag !== 50) { + break; + } + + message.schemaUri = reader.string(); + continue; + case 8: + if (tag !== 66) { + break; + } + + message.ecosystemId = reader.string(); + continue; + case 9: + if (tag !== 74) { + break; + } + + message.type = reader.string(); + continue; + case 10: + if (tag !== 82) { + break; + } + + message.createdBy = reader.string(); + continue; + case 11: + if (tag !== 90) { + break; + } + + message.dateCreated = reader.string(); + continue; + case 12: + if (tag !== 98) { + break; + } + + message.title = reader.string(); + continue; + case 13: + if (tag !== 106) { + break; + } + + message.description = reader.string(); + continue; + case 14: + if (tag !== 114) { + break; + } + + const entry14 = TemplateData_FieldOrderingEntry.decode(reader, reader.uint32()); + if (entry14.value !== undefined) { + message.fieldOrdering![entry14.key] = entry14.value; + } + continue; + case 15: + if (tag !== 122) { + break; + } + + message.appleWalletOptions = AppleWalletOptions.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: TemplateData): unknown { - const obj: any = {}; - if (message.id !== undefined && message.id !== "") { - obj.id = message.id; - } - if (message.name !== undefined && message.name !== "") { - obj.name = message.name; - } - if (message.version !== undefined && message.version !== 0) { - obj.version = Math.round(message.version); - } - if (message.fields) { - const entries = Object.entries(message.fields); - if (entries.length > 0) { - obj.fields = {}; - entries.forEach(([k, v]) => { - obj.fields[k] = TemplateField.toJSON(v); - }); - } - } - if (message.allowAdditionalFields === true) { - obj.allowAdditionalFields = message.allowAdditionalFields; - } - if (message.schemaUri !== undefined && message.schemaUri !== "") { - obj.schemaUri = message.schemaUri; - } - if (message.ecosystemId !== undefined && message.ecosystemId !== "") { - obj.ecosystemId = message.ecosystemId; - } - if (message.type !== undefined && message.type !== "") { - obj.type = message.type; - } - if (message.createdBy !== undefined && message.createdBy !== "") { - obj.createdBy = message.createdBy; - } - if (message.dateCreated !== undefined && message.dateCreated !== "") { - obj.dateCreated = message.dateCreated; - } - if (message.title !== undefined && message.title !== "") { - obj.title = message.title; - } - if (message.description !== undefined && message.description !== "") { - obj.description = message.description; - } - if (message.fieldOrdering) { - const entries = Object.entries(message.fieldOrdering); - if (entries.length > 0) { - obj.fieldOrdering = {}; - entries.forEach(([k, v]) => { - obj.fieldOrdering[k] = FieldOrdering.toJSON(v); - }); - } - } - if (message.appleWalletOptions !== undefined) { - obj.appleWalletOptions = AppleWalletOptions.toJSON( - message.appleWalletOptions, - ); - } - return obj; - }, + fromJSON(object: any): TemplateData { + return { + id: isSet(object.id) ? String(object.id) : "", + name: isSet(object.name) ? String(object.name) : "", + version: isSet(object.version) ? Number(object.version) : 0, + fields: isObject(object.fields) + ? Object.entries(object.fields).reduce<{ [key: string]: TemplateField }>((acc, [key, value]) => { + acc[key] = TemplateField.fromJSON(value); + return acc; + }, {}) + : {}, + allowAdditionalFields: isSet(object.allowAdditionalFields) ? Boolean(object.allowAdditionalFields) : false, + schemaUri: isSet(object.schemaUri) ? String(object.schemaUri) : "", + ecosystemId: isSet(object.ecosystemId) ? String(object.ecosystemId) : "", + type: isSet(object.type) ? String(object.type) : "", + createdBy: isSet(object.createdBy) ? String(object.createdBy) : "", + dateCreated: isSet(object.dateCreated) ? String(object.dateCreated) : "", + title: isSet(object.title) ? String(object.title) : "", + description: isSet(object.description) ? String(object.description) : "", + fieldOrdering: isObject(object.fieldOrdering) + ? Object.entries(object.fieldOrdering).reduce<{ [key: string]: FieldOrdering }>((acc, [key, value]) => { + acc[key] = FieldOrdering.fromJSON(value); + return acc; + }, {}) + : {}, + appleWalletOptions: isSet(object.appleWalletOptions) + ? AppleWalletOptions.fromJSON(object.appleWalletOptions) + : undefined, + }; + }, - create(base?: DeepPartial): TemplateData { - return TemplateData.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): TemplateData { - const message = createBaseTemplateData(); - message.id = object.id ?? ""; - message.name = object.name ?? ""; - message.version = object.version ?? 0; - message.fields = Object.entries(object.fields ?? {}).reduce<{ - [key: string]: TemplateField; - }>((acc, [key, value]) => { - if (value !== undefined) { - acc[key] = TemplateField.fromPartial(value); - } - return acc; - }, {}); - message.allowAdditionalFields = object.allowAdditionalFields ?? false; - message.schemaUri = object.schemaUri ?? ""; - message.ecosystemId = object.ecosystemId ?? ""; - message.type = object.type ?? ""; - message.createdBy = object.createdBy ?? ""; - message.dateCreated = object.dateCreated ?? ""; - message.title = object.title ?? ""; - message.description = object.description ?? ""; - message.fieldOrdering = Object.entries( - object.fieldOrdering ?? {}, - ).reduce<{ [key: string]: FieldOrdering }>((acc, [key, value]) => { - if (value !== undefined) { - acc[key] = FieldOrdering.fromPartial(value); - } - return acc; - }, {}); - message.appleWalletOptions = - object.appleWalletOptions !== undefined && - object.appleWalletOptions !== null - ? AppleWalletOptions.fromPartial(object.appleWalletOptions) - : undefined; - return message; - }, + toJSON(message: TemplateData): unknown { + const obj: any = {}; + if (message.id !== undefined && message.id !== "") { + obj.id = message.id; + } + if (message.name !== undefined && message.name !== "") { + obj.name = message.name; + } + if (message.version !== undefined && message.version !== 0) { + obj.version = Math.round(message.version); + } + if (message.fields) { + const entries = Object.entries(message.fields); + if (entries.length > 0) { + obj.fields = {}; + entries.forEach(([k, v]) => { + obj.fields[k] = TemplateField.toJSON(v); + }); + } + } + if (message.allowAdditionalFields === true) { + obj.allowAdditionalFields = message.allowAdditionalFields; + } + if (message.schemaUri !== undefined && message.schemaUri !== "") { + obj.schemaUri = message.schemaUri; + } + if (message.ecosystemId !== undefined && message.ecosystemId !== "") { + obj.ecosystemId = message.ecosystemId; + } + if (message.type !== undefined && message.type !== "") { + obj.type = message.type; + } + if (message.createdBy !== undefined && message.createdBy !== "") { + obj.createdBy = message.createdBy; + } + if (message.dateCreated !== undefined && message.dateCreated !== "") { + obj.dateCreated = message.dateCreated; + } + if (message.title !== undefined && message.title !== "") { + obj.title = message.title; + } + if (message.description !== undefined && message.description !== "") { + obj.description = message.description; + } + if (message.fieldOrdering) { + const entries = Object.entries(message.fieldOrdering); + if (entries.length > 0) { + obj.fieldOrdering = {}; + entries.forEach(([k, v]) => { + obj.fieldOrdering[k] = FieldOrdering.toJSON(v); + }); + } + } + if (message.appleWalletOptions !== undefined) { + obj.appleWalletOptions = AppleWalletOptions.toJSON(message.appleWalletOptions); + } + return obj; + }, + + create(base?: DeepPartial): TemplateData { + return TemplateData.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): TemplateData { + const message = createBaseTemplateData(); + message.id = object.id ?? ""; + message.name = object.name ?? ""; + message.version = object.version ?? 0; + message.fields = Object.entries(object.fields ?? {}).reduce<{ [key: string]: TemplateField }>( + (acc, [key, value]) => { + if (value !== undefined) { + acc[key] = TemplateField.fromPartial(value); + } + return acc; + }, + {}, + ); + message.allowAdditionalFields = object.allowAdditionalFields ?? false; + message.schemaUri = object.schemaUri ?? ""; + message.ecosystemId = object.ecosystemId ?? ""; + message.type = object.type ?? ""; + message.createdBy = object.createdBy ?? ""; + message.dateCreated = object.dateCreated ?? ""; + message.title = object.title ?? ""; + message.description = object.description ?? ""; + message.fieldOrdering = Object.entries(object.fieldOrdering ?? {}).reduce<{ [key: string]: FieldOrdering }>( + (acc, [key, value]) => { + if (value !== undefined) { + acc[key] = FieldOrdering.fromPartial(value); + } + return acc; + }, + {}, + ); + message.appleWalletOptions = (object.appleWalletOptions !== undefined && object.appleWalletOptions !== null) + ? AppleWalletOptions.fromPartial(object.appleWalletOptions) + : undefined; + return message; + }, }; function createBaseTemplateData_FieldsEntry(): TemplateData_FieldsEntry { - return { key: "", value: undefined }; + return { key: "", value: undefined }; } export const TemplateData_FieldsEntry = { - encode( - message: TemplateData_FieldsEntry, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.value !== undefined) { - TemplateField.encode( - message.value, - writer.uint32(18).fork(), - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): TemplateData_FieldsEntry { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTemplateData_FieldsEntry(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.key = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.value = TemplateField.decode( - reader, - reader.uint32(), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: TemplateData_FieldsEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.key !== "") { + writer.uint32(10).string(message.key); + } + if (message.value !== undefined) { + TemplateField.encode(message.value, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): TemplateData_FieldsEntry { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTemplateData_FieldsEntry(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - fromJSON(object: any): TemplateData_FieldsEntry { - return { - key: isSet(object.key) ? String(object.key) : "", - value: isSet(object.value) - ? TemplateField.fromJSON(object.value) - : undefined, - }; - }, + message.key = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.value = TemplateField.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: TemplateData_FieldsEntry): unknown { - const obj: any = {}; - if (message.key !== "") { - obj.key = message.key; - } - if (message.value !== undefined) { - obj.value = TemplateField.toJSON(message.value); - } - return obj; - }, + fromJSON(object: any): TemplateData_FieldsEntry { + return { + key: isSet(object.key) ? String(object.key) : "", + value: isSet(object.value) ? TemplateField.fromJSON(object.value) : undefined, + }; + }, - create( - base?: DeepPartial, - ): TemplateData_FieldsEntry { - return TemplateData_FieldsEntry.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): TemplateData_FieldsEntry { - const message = createBaseTemplateData_FieldsEntry(); - message.key = object.key ?? ""; - message.value = - object.value !== undefined && object.value !== null - ? TemplateField.fromPartial(object.value) - : undefined; - return message; - }, + toJSON(message: TemplateData_FieldsEntry): unknown { + const obj: any = {}; + if (message.key !== "") { + obj.key = message.key; + } + if (message.value !== undefined) { + obj.value = TemplateField.toJSON(message.value); + } + return obj; + }, + + create(base?: DeepPartial): TemplateData_FieldsEntry { + return TemplateData_FieldsEntry.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): TemplateData_FieldsEntry { + const message = createBaseTemplateData_FieldsEntry(); + message.key = object.key ?? ""; + message.value = (object.value !== undefined && object.value !== null) + ? TemplateField.fromPartial(object.value) + : undefined; + return message; + }, }; function createBaseTemplateData_FieldOrderingEntry(): TemplateData_FieldOrderingEntry { - return { key: "", value: undefined }; + return { key: "", value: undefined }; } export const TemplateData_FieldOrderingEntry = { - encode( - message: TemplateData_FieldOrderingEntry, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.value !== undefined) { - FieldOrdering.encode( - message.value, - writer.uint32(18).fork(), - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): TemplateData_FieldOrderingEntry { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTemplateData_FieldOrderingEntry(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.key = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.value = FieldOrdering.decode( - reader, - reader.uint32(), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: TemplateData_FieldOrderingEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.key !== "") { + writer.uint32(10).string(message.key); + } + if (message.value !== undefined) { + FieldOrdering.encode(message.value, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): TemplateData_FieldOrderingEntry { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTemplateData_FieldOrderingEntry(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - fromJSON(object: any): TemplateData_FieldOrderingEntry { - return { - key: isSet(object.key) ? String(object.key) : "", - value: isSet(object.value) - ? FieldOrdering.fromJSON(object.value) - : undefined, - }; - }, + message.key = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.value = FieldOrdering.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: TemplateData_FieldOrderingEntry): unknown { - const obj: any = {}; - if (message.key !== "") { - obj.key = message.key; - } - if (message.value !== undefined) { - obj.value = FieldOrdering.toJSON(message.value); - } - return obj; - }, + fromJSON(object: any): TemplateData_FieldOrderingEntry { + return { + key: isSet(object.key) ? String(object.key) : "", + value: isSet(object.value) ? FieldOrdering.fromJSON(object.value) : undefined, + }; + }, - create( - base?: DeepPartial, - ): TemplateData_FieldOrderingEntry { - return TemplateData_FieldOrderingEntry.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): TemplateData_FieldOrderingEntry { - const message = createBaseTemplateData_FieldOrderingEntry(); - message.key = object.key ?? ""; - message.value = - object.value !== undefined && object.value !== null - ? FieldOrdering.fromPartial(object.value) - : undefined; - return message; - }, + toJSON(message: TemplateData_FieldOrderingEntry): unknown { + const obj: any = {}; + if (message.key !== "") { + obj.key = message.key; + } + if (message.value !== undefined) { + obj.value = FieldOrdering.toJSON(message.value); + } + return obj; + }, + + create(base?: DeepPartial): TemplateData_FieldOrderingEntry { + return TemplateData_FieldOrderingEntry.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): TemplateData_FieldOrderingEntry { + const message = createBaseTemplateData_FieldOrderingEntry(); + message.key = object.key ?? ""; + message.value = (object.value !== undefined && object.value !== null) + ? FieldOrdering.fromPartial(object.value) + : undefined; + return message; + }, }; function createBaseAppleWalletOptions(): AppleWalletOptions { - return { - backgroundColor: "", - foregroundColor: "", - labelColor: "", - primaryField: "", - secondaryFields: [], - auxiliaryFields: [], - }; + return { + backgroundColor: "", + foregroundColor: "", + labelColor: "", + primaryField: "", + secondaryFields: [], + auxiliaryFields: [], + }; } export const AppleWalletOptions = { - encode( - message: AppleWalletOptions, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if ( - message.backgroundColor !== undefined && - message.backgroundColor !== "" - ) { - writer.uint32(10).string(message.backgroundColor); - } - if ( - message.foregroundColor !== undefined && - message.foregroundColor !== "" - ) { - writer.uint32(18).string(message.foregroundColor); - } - if (message.labelColor !== undefined && message.labelColor !== "") { - writer.uint32(26).string(message.labelColor); - } - if (message.primaryField !== undefined && message.primaryField !== "") { - writer.uint32(34).string(message.primaryField); - } - if ( - message.secondaryFields !== undefined && - message.secondaryFields.length !== 0 - ) { - for (const v of message.secondaryFields) { - writer.uint32(42).string(v!); - } - } - if ( - message.auxiliaryFields !== undefined && - message.auxiliaryFields.length !== 0 - ) { - for (const v of message.auxiliaryFields) { - writer.uint32(50).string(v!); - } - } - return writer; - }, + encode(message: AppleWalletOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.backgroundColor !== undefined && message.backgroundColor !== "") { + writer.uint32(10).string(message.backgroundColor); + } + if (message.foregroundColor !== undefined && message.foregroundColor !== "") { + writer.uint32(18).string(message.foregroundColor); + } + if (message.labelColor !== undefined && message.labelColor !== "") { + writer.uint32(26).string(message.labelColor); + } + if (message.primaryField !== undefined && message.primaryField !== "") { + writer.uint32(34).string(message.primaryField); + } + if (message.secondaryFields !== undefined && message.secondaryFields.length !== 0) { + for (const v of message.secondaryFields) { + writer.uint32(42).string(v!); + } + } + if (message.auxiliaryFields !== undefined && message.auxiliaryFields.length !== 0) { + for (const v of message.auxiliaryFields) { + writer.uint32(50).string(v!); + } + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): AppleWalletOptions { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAppleWalletOptions(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): AppleWalletOptions { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAppleWalletOptions(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.backgroundColor = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.foregroundColor = reader.string(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.labelColor = reader.string(); - continue; - case 4: - if (tag !== 34) { - break; - } - - message.primaryField = reader.string(); - continue; - case 5: - if (tag !== 42) { - break; - } - - message.secondaryFields!.push(reader.string()); - continue; - case 6: - if (tag !== 50) { - break; - } - - message.auxiliaryFields!.push(reader.string()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + message.backgroundColor = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.foregroundColor = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.labelColor = reader.string(); + continue; + case 4: + if (tag !== 34) { + break; + } - fromJSON(object: any): AppleWalletOptions { - return { - backgroundColor: isSet(object.backgroundColor) - ? String(object.backgroundColor) - : "", - foregroundColor: isSet(object.foregroundColor) - ? String(object.foregroundColor) - : "", - labelColor: isSet(object.labelColor) - ? String(object.labelColor) - : "", - primaryField: isSet(object.primaryField) - ? String(object.primaryField) - : "", - secondaryFields: Array.isArray(object?.secondaryFields) - ? object.secondaryFields.map((e: any) => String(e)) - : [], - auxiliaryFields: Array.isArray(object?.auxiliaryFields) - ? object.auxiliaryFields.map((e: any) => String(e)) - : [], - }; - }, + message.primaryField = reader.string(); + continue; + case 5: + if (tag !== 42) { + break; + } + + message.secondaryFields!.push(reader.string()); + continue; + case 6: + if (tag !== 50) { + break; + } + + message.auxiliaryFields!.push(reader.string()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: AppleWalletOptions): unknown { - const obj: any = {}; - if ( - message.backgroundColor !== undefined && - message.backgroundColor !== "" - ) { - obj.backgroundColor = message.backgroundColor; - } - if ( - message.foregroundColor !== undefined && - message.foregroundColor !== "" - ) { - obj.foregroundColor = message.foregroundColor; - } - if (message.labelColor !== undefined && message.labelColor !== "") { - obj.labelColor = message.labelColor; - } - if (message.primaryField !== undefined && message.primaryField !== "") { - obj.primaryField = message.primaryField; - } - if (message.secondaryFields?.length) { - obj.secondaryFields = message.secondaryFields; - } - if (message.auxiliaryFields?.length) { - obj.auxiliaryFields = message.auxiliaryFields; - } - return obj; - }, + fromJSON(object: any): AppleWalletOptions { + return { + backgroundColor: isSet(object.backgroundColor) ? String(object.backgroundColor) : "", + foregroundColor: isSet(object.foregroundColor) ? String(object.foregroundColor) : "", + labelColor: isSet(object.labelColor) ? String(object.labelColor) : "", + primaryField: isSet(object.primaryField) ? String(object.primaryField) : "", + secondaryFields: Array.isArray(object?.secondaryFields) ? object.secondaryFields.map((e: any) => String(e)) : [], + auxiliaryFields: Array.isArray(object?.auxiliaryFields) ? object.auxiliaryFields.map((e: any) => String(e)) : [], + }; + }, - create(base?: DeepPartial): AppleWalletOptions { - return AppleWalletOptions.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): AppleWalletOptions { - const message = createBaseAppleWalletOptions(); - message.backgroundColor = object.backgroundColor ?? ""; - message.foregroundColor = object.foregroundColor ?? ""; - message.labelColor = object.labelColor ?? ""; - message.primaryField = object.primaryField ?? ""; - message.secondaryFields = object.secondaryFields?.map((e) => e) || []; - message.auxiliaryFields = object.auxiliaryFields?.map((e) => e) || []; - return message; - }, + toJSON(message: AppleWalletOptions): unknown { + const obj: any = {}; + if (message.backgroundColor !== undefined && message.backgroundColor !== "") { + obj.backgroundColor = message.backgroundColor; + } + if (message.foregroundColor !== undefined && message.foregroundColor !== "") { + obj.foregroundColor = message.foregroundColor; + } + if (message.labelColor !== undefined && message.labelColor !== "") { + obj.labelColor = message.labelColor; + } + if (message.primaryField !== undefined && message.primaryField !== "") { + obj.primaryField = message.primaryField; + } + if (message.secondaryFields?.length) { + obj.secondaryFields = message.secondaryFields; + } + if (message.auxiliaryFields?.length) { + obj.auxiliaryFields = message.auxiliaryFields; + } + return obj; + }, + + create(base?: DeepPartial): AppleWalletOptions { + return AppleWalletOptions.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): AppleWalletOptions { + const message = createBaseAppleWalletOptions(); + message.backgroundColor = object.backgroundColor ?? ""; + message.foregroundColor = object.foregroundColor ?? ""; + message.labelColor = object.labelColor ?? ""; + message.primaryField = object.primaryField ?? ""; + message.secondaryFields = object.secondaryFields?.map((e) => e) || []; + message.auxiliaryFields = object.auxiliaryFields?.map((e) => e) || []; + return message; + }, }; function createBaseFieldOrdering(): FieldOrdering { - return { order: 0, section: "" }; + return { order: 0, section: "" }; } export const FieldOrdering = { - encode( - message: FieldOrdering, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.order !== undefined && message.order !== 0) { - writer.uint32(8).int32(message.order); - } - if (message.section !== undefined && message.section !== "") { - writer.uint32(18).string(message.section); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): FieldOrdering { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFieldOrdering(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.order = reader.int32(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.section = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: FieldOrdering, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.order !== undefined && message.order !== 0) { + writer.uint32(8).int32(message.order); + } + if (message.section !== undefined && message.section !== "") { + writer.uint32(18).string(message.section); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): FieldOrdering { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseFieldOrdering(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } - fromJSON(object: any): FieldOrdering { - return { - order: isSet(object.order) ? Number(object.order) : 0, - section: isSet(object.section) ? String(object.section) : "", - }; - }, + message.order = reader.int32(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.section = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: FieldOrdering): unknown { - const obj: any = {}; - if (message.order !== undefined && message.order !== 0) { - obj.order = Math.round(message.order); - } - if (message.section !== undefined && message.section !== "") { - obj.section = message.section; - } - return obj; - }, + fromJSON(object: any): FieldOrdering { + return { + order: isSet(object.order) ? Number(object.order) : 0, + section: isSet(object.section) ? String(object.section) : "", + }; + }, - create(base?: DeepPartial): FieldOrdering { - return FieldOrdering.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): FieldOrdering { - const message = createBaseFieldOrdering(); - message.order = object.order ?? 0; - message.section = object.section ?? ""; - return message; - }, + toJSON(message: FieldOrdering): unknown { + const obj: any = {}; + if (message.order !== undefined && message.order !== 0) { + obj.order = Math.round(message.order); + } + if (message.section !== undefined && message.section !== "") { + obj.section = message.section; + } + return obj; + }, + + create(base?: DeepPartial): FieldOrdering { + return FieldOrdering.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): FieldOrdering { + const message = createBaseFieldOrdering(); + message.order = object.order ?? 0; + message.section = object.section ?? ""; + return message; + }, }; function createBaseTemplateField(): TemplateField { - return { - title: "", - description: "", - optional: false, - type: 0, - uriData: undefined, - }; + return { title: "", description: "", optional: false, type: 0, uriData: undefined }; } export const TemplateField = { - encode( - message: TemplateField, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.title !== undefined && message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== undefined && message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.optional === true) { - writer.uint32(24).bool(message.optional); - } - if (message.type !== undefined && message.type !== 0) { - writer.uint32(32).int32(message.type); - } - if (message.uriData !== undefined) { - UriFieldData.encode( - message.uriData, - writer.uint32(50).fork(), - ).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): TemplateField { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTemplateField(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.title = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.description = reader.string(); - continue; - case 3: - if (tag !== 24) { - break; - } - - message.optional = reader.bool(); - continue; - case 4: - if (tag !== 32) { - break; - } - - message.type = reader.int32() as any; - continue; - case 6: - if (tag !== 50) { - break; - } - - message.uriData = UriFieldData.decode( - reader, - reader.uint32(), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: TemplateField, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.title !== undefined && message.title !== "") { + writer.uint32(10).string(message.title); + } + if (message.description !== undefined && message.description !== "") { + writer.uint32(18).string(message.description); + } + if (message.optional === true) { + writer.uint32(24).bool(message.optional); + } + if (message.type !== undefined && message.type !== 0) { + writer.uint32(32).int32(message.type); + } + if (message.uriData !== undefined) { + UriFieldData.encode(message.uriData, writer.uint32(50).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): TemplateField { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTemplateField(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - fromJSON(object: any): TemplateField { - return { - title: isSet(object.title) ? String(object.title) : "", - description: isSet(object.description) - ? String(object.description) - : "", - optional: isSet(object.optional) ? Boolean(object.optional) : false, - type: isSet(object.type) ? fieldTypeFromJSON(object.type) : 0, - uriData: isSet(object.uriData) - ? UriFieldData.fromJSON(object.uriData) - : undefined, - }; - }, + message.title = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.description = reader.string(); + continue; + case 3: + if (tag !== 24) { + break; + } + + message.optional = reader.bool(); + continue; + case 4: + if (tag !== 32) { + break; + } + + message.type = reader.int32() as any; + continue; + case 6: + if (tag !== 50) { + break; + } + + message.uriData = UriFieldData.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: TemplateField): unknown { - const obj: any = {}; - if (message.title !== undefined && message.title !== "") { - obj.title = message.title; - } - if (message.description !== undefined && message.description !== "") { - obj.description = message.description; - } - if (message.optional === true) { - obj.optional = message.optional; - } - if (message.type !== undefined && message.type !== 0) { - obj.type = fieldTypeToJSON(message.type); - } - if (message.uriData !== undefined) { - obj.uriData = UriFieldData.toJSON(message.uriData); - } - return obj; - }, + fromJSON(object: any): TemplateField { + return { + title: isSet(object.title) ? String(object.title) : "", + description: isSet(object.description) ? String(object.description) : "", + optional: isSet(object.optional) ? Boolean(object.optional) : false, + type: isSet(object.type) ? fieldTypeFromJSON(object.type) : 0, + uriData: isSet(object.uriData) ? UriFieldData.fromJSON(object.uriData) : undefined, + }; + }, - create(base?: DeepPartial): TemplateField { - return TemplateField.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): TemplateField { - const message = createBaseTemplateField(); - message.title = object.title ?? ""; - message.description = object.description ?? ""; - message.optional = object.optional ?? false; - message.type = object.type ?? 0; - message.uriData = - object.uriData !== undefined && object.uriData !== null - ? UriFieldData.fromPartial(object.uriData) - : undefined; - return message; - }, + toJSON(message: TemplateField): unknown { + const obj: any = {}; + if (message.title !== undefined && message.title !== "") { + obj.title = message.title; + } + if (message.description !== undefined && message.description !== "") { + obj.description = message.description; + } + if (message.optional === true) { + obj.optional = message.optional; + } + if (message.type !== undefined && message.type !== 0) { + obj.type = fieldTypeToJSON(message.type); + } + if (message.uriData !== undefined) { + obj.uriData = UriFieldData.toJSON(message.uriData); + } + return obj; + }, + + create(base?: DeepPartial): TemplateField { + return TemplateField.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): TemplateField { + const message = createBaseTemplateField(); + message.title = object.title ?? ""; + message.description = object.description ?? ""; + message.optional = object.optional ?? false; + message.type = object.type ?? 0; + message.uriData = (object.uriData !== undefined && object.uriData !== null) + ? UriFieldData.fromPartial(object.uriData) + : undefined; + return message; + }, }; function createBaseTemplateFieldPatch(): TemplateFieldPatch { - return { title: undefined, description: undefined, uriData: undefined }; + return { title: undefined, description: undefined, uriData: undefined }; } export const TemplateFieldPatch = { - encode( - message: TemplateFieldPatch, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.title !== undefined) { - writer.uint32(10).string(message.title); - } - if (message.description !== undefined) { - writer.uint32(18).string(message.description); - } - if (message.uriData !== undefined) { - UriFieldData.encode( - message.uriData, - writer.uint32(26).fork(), - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): TemplateFieldPatch { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTemplateFieldPatch(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.title = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.description = reader.string(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.uriData = UriFieldData.decode( - reader, - reader.uint32(), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: TemplateFieldPatch, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.title !== undefined) { + writer.uint32(10).string(message.title); + } + if (message.description !== undefined) { + writer.uint32(18).string(message.description); + } + if (message.uriData !== undefined) { + UriFieldData.encode(message.uriData, writer.uint32(26).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): TemplateFieldPatch { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTemplateFieldPatch(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - fromJSON(object: any): TemplateFieldPatch { - return { - title: isSet(object.title) ? String(object.title) : undefined, - description: isSet(object.description) - ? String(object.description) - : undefined, - uriData: isSet(object.uriData) - ? UriFieldData.fromJSON(object.uriData) - : undefined, - }; - }, + message.title = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.description = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.uriData = UriFieldData.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: TemplateFieldPatch): unknown { - const obj: any = {}; - if (message.title !== undefined) { - obj.title = message.title; - } - if (message.description !== undefined) { - obj.description = message.description; - } - if (message.uriData !== undefined) { - obj.uriData = UriFieldData.toJSON(message.uriData); - } - return obj; - }, + fromJSON(object: any): TemplateFieldPatch { + return { + title: isSet(object.title) ? String(object.title) : undefined, + description: isSet(object.description) ? String(object.description) : undefined, + uriData: isSet(object.uriData) ? UriFieldData.fromJSON(object.uriData) : undefined, + }; + }, - create(base?: DeepPartial): TemplateFieldPatch { - return TemplateFieldPatch.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): TemplateFieldPatch { - const message = createBaseTemplateFieldPatch(); - message.title = object.title ?? undefined; - message.description = object.description ?? undefined; - message.uriData = - object.uriData !== undefined && object.uriData !== null - ? UriFieldData.fromPartial(object.uriData) - : undefined; - return message; - }, + toJSON(message: TemplateFieldPatch): unknown { + const obj: any = {}; + if (message.title !== undefined) { + obj.title = message.title; + } + if (message.description !== undefined) { + obj.description = message.description; + } + if (message.uriData !== undefined) { + obj.uriData = UriFieldData.toJSON(message.uriData); + } + return obj; + }, + + create(base?: DeepPartial): TemplateFieldPatch { + return TemplateFieldPatch.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): TemplateFieldPatch { + const message = createBaseTemplateFieldPatch(); + message.title = object.title ?? undefined; + message.description = object.description ?? undefined; + message.uriData = (object.uriData !== undefined && object.uriData !== null) + ? UriFieldData.fromPartial(object.uriData) + : undefined; + return message; + }, }; function createBaseUriFieldData(): UriFieldData { - return { mimeType: "", renderMethod: 0 }; + return { mimeType: "", renderMethod: 0 }; } export const UriFieldData = { - encode( - message: UriFieldData, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.mimeType !== undefined && message.mimeType !== "") { - writer.uint32(10).string(message.mimeType); - } - if (message.renderMethod !== undefined && message.renderMethod !== 0) { - writer.uint32(16).int32(message.renderMethod); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): UriFieldData { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUriFieldData(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.mimeType = reader.string(); - continue; - case 2: - if (tag !== 16) { - break; - } - - message.renderMethod = reader.int32() as any; - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: UriFieldData, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.mimeType !== undefined && message.mimeType !== "") { + writer.uint32(10).string(message.mimeType); + } + if (message.renderMethod !== undefined && message.renderMethod !== 0) { + writer.uint32(16).int32(message.renderMethod); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): UriFieldData { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUriFieldData(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - fromJSON(object: any): UriFieldData { - return { - mimeType: isSet(object.mimeType) ? String(object.mimeType) : "", - renderMethod: isSet(object.renderMethod) - ? uriRenderMethodFromJSON(object.renderMethod) - : 0, - }; - }, + message.mimeType = reader.string(); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.renderMethod = reader.int32() as any; + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: UriFieldData): unknown { - const obj: any = {}; - if (message.mimeType !== undefined && message.mimeType !== "") { - obj.mimeType = message.mimeType; - } - if (message.renderMethod !== undefined && message.renderMethod !== 0) { - obj.renderMethod = uriRenderMethodToJSON(message.renderMethod); - } - return obj; - }, + fromJSON(object: any): UriFieldData { + return { + mimeType: isSet(object.mimeType) ? String(object.mimeType) : "", + renderMethod: isSet(object.renderMethod) ? uriRenderMethodFromJSON(object.renderMethod) : 0, + }; + }, - create(base?: DeepPartial): UriFieldData { - return UriFieldData.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): UriFieldData { - const message = createBaseUriFieldData(); - message.mimeType = object.mimeType ?? ""; - message.renderMethod = object.renderMethod ?? 0; - return message; - }, + toJSON(message: UriFieldData): unknown { + const obj: any = {}; + if (message.mimeType !== undefined && message.mimeType !== "") { + obj.mimeType = message.mimeType; + } + if (message.renderMethod !== undefined && message.renderMethod !== 0) { + obj.renderMethod = uriRenderMethodToJSON(message.renderMethod); + } + return obj; + }, + + create(base?: DeepPartial): UriFieldData { + return UriFieldData.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): UriFieldData { + const message = createBaseUriFieldData(); + message.mimeType = object.mimeType ?? ""; + message.renderMethod = object.renderMethod ?? 0; + return message; + }, }; function createBaseGetVerificationTemplateRequest(): GetVerificationTemplateRequest { - return { id: "" }; + return { id: "" }; } export const GetVerificationTemplateRequest = { - encode( - message: GetVerificationTemplateRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.id !== undefined && message.id !== "") { - writer.uint32(10).string(message.id); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): GetVerificationTemplateRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetVerificationTemplateRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.id = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): GetVerificationTemplateRequest { - return { id: isSet(object.id) ? String(object.id) : "" }; - }, + encode(message: GetVerificationTemplateRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.id !== undefined && message.id !== "") { + writer.uint32(10).string(message.id); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): GetVerificationTemplateRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGetVerificationTemplateRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.id = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: GetVerificationTemplateRequest): unknown { - const obj: any = {}; - if (message.id !== undefined && message.id !== "") { - obj.id = message.id; - } - return obj; - }, + fromJSON(object: any): GetVerificationTemplateRequest { + return { id: isSet(object.id) ? String(object.id) : "" }; + }, - create( - base?: DeepPartial, - ): GetVerificationTemplateRequest { - return GetVerificationTemplateRequest.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): GetVerificationTemplateRequest { - const message = createBaseGetVerificationTemplateRequest(); - message.id = object.id ?? ""; - return message; - }, + toJSON(message: GetVerificationTemplateRequest): unknown { + const obj: any = {}; + if (message.id !== undefined && message.id !== "") { + obj.id = message.id; + } + return obj; + }, + + create(base?: DeepPartial): GetVerificationTemplateRequest { + return GetVerificationTemplateRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): GetVerificationTemplateRequest { + const message = createBaseGetVerificationTemplateRequest(); + message.id = object.id ?? ""; + return message; + }, }; function createBaseGetVerificationTemplateResponse(): GetVerificationTemplateResponse { - return { template: undefined }; + return { template: undefined }; } export const GetVerificationTemplateResponse = { - encode( - message: GetVerificationTemplateResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.template !== undefined) { - VerificationTemplateData.encode( - message.template, - writer.uint32(10).fork(), - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): GetVerificationTemplateResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetVerificationTemplateResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.template = VerificationTemplateData.decode( - reader, - reader.uint32(), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): GetVerificationTemplateResponse { - return { - template: isSet(object.template) - ? VerificationTemplateData.fromJSON(object.template) - : undefined, - }; - }, + encode(message: GetVerificationTemplateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.template !== undefined) { + VerificationTemplateData.encode(message.template, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): GetVerificationTemplateResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGetVerificationTemplateResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.template = VerificationTemplateData.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: GetVerificationTemplateResponse): unknown { - const obj: any = {}; - if (message.template !== undefined) { - obj.template = VerificationTemplateData.toJSON(message.template); - } - return obj; - }, + fromJSON(object: any): GetVerificationTemplateResponse { + return { template: isSet(object.template) ? VerificationTemplateData.fromJSON(object.template) : undefined }; + }, - create( - base?: DeepPartial, - ): GetVerificationTemplateResponse { - return GetVerificationTemplateResponse.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): GetVerificationTemplateResponse { - const message = createBaseGetVerificationTemplateResponse(); - message.template = - object.template !== undefined && object.template !== null - ? VerificationTemplateData.fromPartial(object.template) - : undefined; - return message; - }, + toJSON(message: GetVerificationTemplateResponse): unknown { + const obj: any = {}; + if (message.template !== undefined) { + obj.template = VerificationTemplateData.toJSON(message.template); + } + return obj; + }, + + create(base?: DeepPartial): GetVerificationTemplateResponse { + return GetVerificationTemplateResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): GetVerificationTemplateResponse { + const message = createBaseGetVerificationTemplateResponse(); + message.template = (object.template !== undefined && object.template !== null) + ? VerificationTemplateData.fromPartial(object.template) + : undefined; + return message; + }, }; function createBaseCreateVerificationTemplateRequest(): CreateVerificationTemplateRequest { - return { - name: "", - fields: {}, - credentialTemplateId: "", - title: "", - description: "", - }; + return { name: "", fields: {}, credentialTemplateId: "", title: "", description: "" }; } export const CreateVerificationTemplateRequest = { - encode( - message: CreateVerificationTemplateRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.name !== undefined && message.name !== "") { - writer.uint32(10).string(message.name); - } - Object.entries(message.fields || {}).forEach(([key, value]) => { - CreateVerificationTemplateRequest_FieldsEntry.encode( - { key: key as any, value }, - writer.uint32(18).fork(), - ).ldelim(); - }); - if ( - message.credentialTemplateId !== undefined && - message.credentialTemplateId !== "" - ) { - writer.uint32(26).string(message.credentialTemplateId); - } - if (message.title !== undefined && message.title !== "") { - writer.uint32(34).string(message.title); - } - if (message.description !== undefined && message.description !== "") { - writer.uint32(42).string(message.description); - } - return writer; - }, + encode(message: CreateVerificationTemplateRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.name !== undefined && message.name !== "") { + writer.uint32(10).string(message.name); + } + Object.entries(message.fields || {}).forEach(([key, value]) => { + CreateVerificationTemplateRequest_FieldsEntry.encode({ key: key as any, value }, writer.uint32(18).fork()) + .ldelim(); + }); + if (message.credentialTemplateId !== undefined && message.credentialTemplateId !== "") { + writer.uint32(26).string(message.credentialTemplateId); + } + if (message.title !== undefined && message.title !== "") { + writer.uint32(34).string(message.title); + } + if (message.description !== undefined && message.description !== "") { + writer.uint32(42).string(message.description); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): CreateVerificationTemplateRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCreateVerificationTemplateRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): CreateVerificationTemplateRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCreateVerificationTemplateRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.name = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - const entry2 = - CreateVerificationTemplateRequest_FieldsEntry.decode( - reader, - reader.uint32(), - ); - if (entry2.value !== undefined) { - message.fields![entry2.key] = entry2.value; - } - continue; - case 3: - if (tag !== 26) { - break; - } - - message.credentialTemplateId = reader.string(); - continue; - case 4: - if (tag !== 34) { - break; - } - - message.title = reader.string(); - continue; - case 5: - if (tag !== 42) { - break; - } - - message.description = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + message.name = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + const entry2 = CreateVerificationTemplateRequest_FieldsEntry.decode(reader, reader.uint32()); + if (entry2.value !== undefined) { + message.fields![entry2.key] = entry2.value; + } + continue; + case 3: + if (tag !== 26) { + break; + } + + message.credentialTemplateId = reader.string(); + continue; + case 4: + if (tag !== 34) { + break; + } - fromJSON(object: any): CreateVerificationTemplateRequest { - return { - name: isSet(object.name) ? String(object.name) : "", - fields: isObject(object.fields) - ? Object.entries(object.fields).reduce<{ - [key: string]: VerificationTemplateField; - }>((acc, [key, value]) => { - acc[key] = VerificationTemplateField.fromJSON(value); - return acc; - }, {}) - : {}, - credentialTemplateId: isSet(object.credentialTemplateId) - ? String(object.credentialTemplateId) - : "", - title: isSet(object.title) ? String(object.title) : "", - description: isSet(object.description) - ? String(object.description) - : "", - }; - }, + message.title = reader.string(); + continue; + case 5: + if (tag !== 42) { + break; + } + + message.description = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: CreateVerificationTemplateRequest): unknown { - const obj: any = {}; - if (message.name !== undefined && message.name !== "") { - obj.name = message.name; - } - if (message.fields) { - const entries = Object.entries(message.fields); - if (entries.length > 0) { - obj.fields = {}; - entries.forEach(([k, v]) => { - obj.fields[k] = VerificationTemplateField.toJSON(v); - }); - } - } - if ( - message.credentialTemplateId !== undefined && - message.credentialTemplateId !== "" - ) { - obj.credentialTemplateId = message.credentialTemplateId; - } - if (message.title !== undefined && message.title !== "") { - obj.title = message.title; - } - if (message.description !== undefined && message.description !== "") { - obj.description = message.description; - } - return obj; - }, + fromJSON(object: any): CreateVerificationTemplateRequest { + return { + name: isSet(object.name) ? String(object.name) : "", + fields: isObject(object.fields) + ? Object.entries(object.fields).reduce<{ [key: string]: VerificationTemplateField }>((acc, [key, value]) => { + acc[key] = VerificationTemplateField.fromJSON(value); + return acc; + }, {}) + : {}, + credentialTemplateId: isSet(object.credentialTemplateId) ? String(object.credentialTemplateId) : "", + title: isSet(object.title) ? String(object.title) : "", + description: isSet(object.description) ? String(object.description) : "", + }; + }, - create( - base?: DeepPartial, - ): CreateVerificationTemplateRequest { - return CreateVerificationTemplateRequest.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): CreateVerificationTemplateRequest { - const message = createBaseCreateVerificationTemplateRequest(); - message.name = object.name ?? ""; - message.fields = Object.entries(object.fields ?? {}).reduce<{ - [key: string]: VerificationTemplateField; - }>((acc, [key, value]) => { - if (value !== undefined) { - acc[key] = VerificationTemplateField.fromPartial(value); - } - return acc; - }, {}); - message.credentialTemplateId = object.credentialTemplateId ?? ""; - message.title = object.title ?? ""; - message.description = object.description ?? ""; - return message; - }, + toJSON(message: CreateVerificationTemplateRequest): unknown { + const obj: any = {}; + if (message.name !== undefined && message.name !== "") { + obj.name = message.name; + } + if (message.fields) { + const entries = Object.entries(message.fields); + if (entries.length > 0) { + obj.fields = {}; + entries.forEach(([k, v]) => { + obj.fields[k] = VerificationTemplateField.toJSON(v); + }); + } + } + if (message.credentialTemplateId !== undefined && message.credentialTemplateId !== "") { + obj.credentialTemplateId = message.credentialTemplateId; + } + if (message.title !== undefined && message.title !== "") { + obj.title = message.title; + } + if (message.description !== undefined && message.description !== "") { + obj.description = message.description; + } + return obj; + }, + + create(base?: DeepPartial): CreateVerificationTemplateRequest { + return CreateVerificationTemplateRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): CreateVerificationTemplateRequest { + const message = createBaseCreateVerificationTemplateRequest(); + message.name = object.name ?? ""; + message.fields = Object.entries(object.fields ?? {}).reduce<{ [key: string]: VerificationTemplateField }>( + (acc, [key, value]) => { + if (value !== undefined) { + acc[key] = VerificationTemplateField.fromPartial(value); + } + return acc; + }, + {}, + ); + message.credentialTemplateId = object.credentialTemplateId ?? ""; + message.title = object.title ?? ""; + message.description = object.description ?? ""; + return message; + }, }; function createBaseCreateVerificationTemplateRequest_FieldsEntry(): CreateVerificationTemplateRequest_FieldsEntry { - return { key: "", value: undefined }; + return { key: "", value: undefined }; } export const CreateVerificationTemplateRequest_FieldsEntry = { - encode( - message: CreateVerificationTemplateRequest_FieldsEntry, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.value !== undefined) { - VerificationTemplateField.encode( - message.value, - writer.uint32(18).fork(), - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): CreateVerificationTemplateRequest_FieldsEntry { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = - createBaseCreateVerificationTemplateRequest_FieldsEntry(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.key = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.value = VerificationTemplateField.decode( - reader, - reader.uint32(), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: CreateVerificationTemplateRequest_FieldsEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.key !== "") { + writer.uint32(10).string(message.key); + } + if (message.value !== undefined) { + VerificationTemplateField.encode(message.value, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): CreateVerificationTemplateRequest_FieldsEntry { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCreateVerificationTemplateRequest_FieldsEntry(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - fromJSON(object: any): CreateVerificationTemplateRequest_FieldsEntry { - return { - key: isSet(object.key) ? String(object.key) : "", - value: isSet(object.value) - ? VerificationTemplateField.fromJSON(object.value) - : undefined, - }; - }, + message.key = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.value = VerificationTemplateField.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: CreateVerificationTemplateRequest_FieldsEntry): unknown { - const obj: any = {}; - if (message.key !== "") { - obj.key = message.key; - } - if (message.value !== undefined) { - obj.value = VerificationTemplateField.toJSON(message.value); - } - return obj; - }, + fromJSON(object: any): CreateVerificationTemplateRequest_FieldsEntry { + return { + key: isSet(object.key) ? String(object.key) : "", + value: isSet(object.value) ? VerificationTemplateField.fromJSON(object.value) : undefined, + }; + }, - create( - base?: DeepPartial, - ): CreateVerificationTemplateRequest_FieldsEntry { - return CreateVerificationTemplateRequest_FieldsEntry.fromPartial( - base ?? {}, - ); - }, - fromPartial( - object: DeepPartial, - ): CreateVerificationTemplateRequest_FieldsEntry { - const message = - createBaseCreateVerificationTemplateRequest_FieldsEntry(); - message.key = object.key ?? ""; - message.value = - object.value !== undefined && object.value !== null - ? VerificationTemplateField.fromPartial(object.value) - : undefined; - return message; - }, + toJSON(message: CreateVerificationTemplateRequest_FieldsEntry): unknown { + const obj: any = {}; + if (message.key !== "") { + obj.key = message.key; + } + if (message.value !== undefined) { + obj.value = VerificationTemplateField.toJSON(message.value); + } + return obj; + }, + + create( + base?: DeepPartial, + ): CreateVerificationTemplateRequest_FieldsEntry { + return CreateVerificationTemplateRequest_FieldsEntry.fromPartial(base ?? {}); + }, + fromPartial( + object: DeepPartial, + ): CreateVerificationTemplateRequest_FieldsEntry { + const message = createBaseCreateVerificationTemplateRequest_FieldsEntry(); + message.key = object.key ?? ""; + message.value = (object.value !== undefined && object.value !== null) + ? VerificationTemplateField.fromPartial(object.value) + : undefined; + return message; + }, }; function createBaseCreateVerificationTemplateResponse(): CreateVerificationTemplateResponse { - return { data: undefined }; + return { data: undefined }; } export const CreateVerificationTemplateResponse = { - encode( - message: CreateVerificationTemplateResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.data !== undefined) { - VerificationTemplateData.encode( - message.data, - writer.uint32(10).fork(), - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): CreateVerificationTemplateResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCreateVerificationTemplateResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.data = VerificationTemplateData.decode( - reader, - reader.uint32(), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): CreateVerificationTemplateResponse { - return { - data: isSet(object.data) - ? VerificationTemplateData.fromJSON(object.data) - : undefined, - }; - }, + encode(message: CreateVerificationTemplateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.data !== undefined) { + VerificationTemplateData.encode(message.data, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): CreateVerificationTemplateResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCreateVerificationTemplateResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.data = VerificationTemplateData.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: CreateVerificationTemplateResponse): unknown { - const obj: any = {}; - if (message.data !== undefined) { - obj.data = VerificationTemplateData.toJSON(message.data); - } - return obj; - }, + fromJSON(object: any): CreateVerificationTemplateResponse { + return { data: isSet(object.data) ? VerificationTemplateData.fromJSON(object.data) : undefined }; + }, - create( - base?: DeepPartial, - ): CreateVerificationTemplateResponse { - return CreateVerificationTemplateResponse.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): CreateVerificationTemplateResponse { - const message = createBaseCreateVerificationTemplateResponse(); - message.data = - object.data !== undefined && object.data !== null - ? VerificationTemplateData.fromPartial(object.data) - : undefined; - return message; - }, + toJSON(message: CreateVerificationTemplateResponse): unknown { + const obj: any = {}; + if (message.data !== undefined) { + obj.data = VerificationTemplateData.toJSON(message.data); + } + return obj; + }, + + create(base?: DeepPartial): CreateVerificationTemplateResponse { + return CreateVerificationTemplateResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): CreateVerificationTemplateResponse { + const message = createBaseCreateVerificationTemplateResponse(); + message.data = (object.data !== undefined && object.data !== null) + ? VerificationTemplateData.fromPartial(object.data) + : undefined; + return message; + }, }; function createBaseUpdateVerificationTemplateRequest(): UpdateVerificationTemplateRequest { - return { id: "", title: undefined, description: undefined, fields: {} }; + return { id: "", title: undefined, description: undefined, fields: {} }; } export const UpdateVerificationTemplateRequest = { - encode( - message: UpdateVerificationTemplateRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.id !== undefined && message.id !== "") { - writer.uint32(10).string(message.id); - } - if (message.title !== undefined) { - writer.uint32(18).string(message.title); - } - if (message.description !== undefined) { - writer.uint32(26).string(message.description); - } - Object.entries(message.fields || {}).forEach(([key, value]) => { - UpdateVerificationTemplateRequest_FieldsEntry.encode( - { key: key as any, value }, - writer.uint32(34).fork(), - ).ldelim(); - }); - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): UpdateVerificationTemplateRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateVerificationTemplateRequest(); - 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.title = reader.string(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.description = reader.string(); - continue; - case 4: - if (tag !== 34) { - break; - } - - const entry4 = - UpdateVerificationTemplateRequest_FieldsEntry.decode( - reader, - reader.uint32(), - ); - if (entry4.value !== undefined) { - message.fields![entry4.key] = entry4.value; - } - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): UpdateVerificationTemplateRequest { - return { - id: isSet(object.id) ? String(object.id) : "", - title: isSet(object.title) ? String(object.title) : undefined, - description: isSet(object.description) - ? String(object.description) - : undefined, - fields: isObject(object.fields) - ? Object.entries(object.fields).reduce<{ - [key: string]: VerificationTemplateFieldPatch; - }>((acc, [key, value]) => { - acc[key] = VerificationTemplateFieldPatch.fromJSON(value); - return acc; - }, {}) - : {}, - }; - }, - - toJSON(message: UpdateVerificationTemplateRequest): unknown { - const obj: any = {}; - if (message.id !== undefined && message.id !== "") { - obj.id = message.id; - } - if (message.title !== undefined) { - obj.title = message.title; - } - if (message.description !== undefined) { - obj.description = message.description; - } - if (message.fields) { - const entries = Object.entries(message.fields); - if (entries.length > 0) { - obj.fields = {}; - entries.forEach(([k, v]) => { - obj.fields[k] = VerificationTemplateFieldPatch.toJSON(v); - }); - } - } - return obj; - }, + encode(message: UpdateVerificationTemplateRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.id !== undefined && message.id !== "") { + writer.uint32(10).string(message.id); + } + if (message.title !== undefined) { + writer.uint32(18).string(message.title); + } + if (message.description !== undefined) { + writer.uint32(26).string(message.description); + } + Object.entries(message.fields || {}).forEach(([key, value]) => { + UpdateVerificationTemplateRequest_FieldsEntry.encode({ key: key as any, value }, writer.uint32(34).fork()) + .ldelim(); + }); + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): UpdateVerificationTemplateRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUpdateVerificationTemplateRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - create( - base?: DeepPartial, - ): UpdateVerificationTemplateRequest { - return UpdateVerificationTemplateRequest.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): UpdateVerificationTemplateRequest { - const message = createBaseUpdateVerificationTemplateRequest(); - message.id = object.id ?? ""; - message.title = object.title ?? undefined; - message.description = object.description ?? undefined; - message.fields = Object.entries(object.fields ?? {}).reduce<{ - [key: string]: VerificationTemplateFieldPatch; - }>((acc, [key, value]) => { - if (value !== undefined) { - acc[key] = VerificationTemplateFieldPatch.fromPartial(value); - } + message.id = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.title = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.description = reader.string(); + continue; + case 4: + if (tag !== 34) { + break; + } + + const entry4 = UpdateVerificationTemplateRequest_FieldsEntry.decode(reader, reader.uint32()); + if (entry4.value !== undefined) { + message.fields![entry4.key] = entry4.value; + } + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): UpdateVerificationTemplateRequest { + return { + id: isSet(object.id) ? String(object.id) : "", + title: isSet(object.title) ? String(object.title) : undefined, + description: isSet(object.description) ? String(object.description) : undefined, + fields: isObject(object.fields) + ? Object.entries(object.fields).reduce<{ [key: string]: VerificationTemplateFieldPatch }>( + (acc, [key, value]) => { + acc[key] = VerificationTemplateFieldPatch.fromJSON(value); return acc; - }, {}); - return message; - }, + }, + {}, + ) + : {}, + }; + }, + + toJSON(message: UpdateVerificationTemplateRequest): unknown { + const obj: any = {}; + if (message.id !== undefined && message.id !== "") { + obj.id = message.id; + } + if (message.title !== undefined) { + obj.title = message.title; + } + if (message.description !== undefined) { + obj.description = message.description; + } + if (message.fields) { + const entries = Object.entries(message.fields); + if (entries.length > 0) { + obj.fields = {}; + entries.forEach(([k, v]) => { + obj.fields[k] = VerificationTemplateFieldPatch.toJSON(v); + }); + } + } + return obj; + }, + + create(base?: DeepPartial): UpdateVerificationTemplateRequest { + return UpdateVerificationTemplateRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): UpdateVerificationTemplateRequest { + const message = createBaseUpdateVerificationTemplateRequest(); + message.id = object.id ?? ""; + message.title = object.title ?? undefined; + message.description = object.description ?? undefined; + message.fields = Object.entries(object.fields ?? {}).reduce<{ [key: string]: VerificationTemplateFieldPatch }>( + (acc, [key, value]) => { + if (value !== undefined) { + acc[key] = VerificationTemplateFieldPatch.fromPartial(value); + } + return acc; + }, + {}, + ); + return message; + }, }; function createBaseUpdateVerificationTemplateRequest_FieldsEntry(): UpdateVerificationTemplateRequest_FieldsEntry { - return { key: "", value: undefined }; + return { key: "", value: undefined }; } export const UpdateVerificationTemplateRequest_FieldsEntry = { - encode( - message: UpdateVerificationTemplateRequest_FieldsEntry, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.value !== undefined) { - VerificationTemplateFieldPatch.encode( - message.value, - writer.uint32(18).fork(), - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): UpdateVerificationTemplateRequest_FieldsEntry { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = - createBaseUpdateVerificationTemplateRequest_FieldsEntry(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.key = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.value = VerificationTemplateFieldPatch.decode( - reader, - reader.uint32(), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: UpdateVerificationTemplateRequest_FieldsEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.key !== "") { + writer.uint32(10).string(message.key); + } + if (message.value !== undefined) { + VerificationTemplateFieldPatch.encode(message.value, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): UpdateVerificationTemplateRequest_FieldsEntry { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUpdateVerificationTemplateRequest_FieldsEntry(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - fromJSON(object: any): UpdateVerificationTemplateRequest_FieldsEntry { - return { - key: isSet(object.key) ? String(object.key) : "", - value: isSet(object.value) - ? VerificationTemplateFieldPatch.fromJSON(object.value) - : undefined, - }; - }, + message.key = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.value = VerificationTemplateFieldPatch.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: UpdateVerificationTemplateRequest_FieldsEntry): unknown { - const obj: any = {}; - if (message.key !== "") { - obj.key = message.key; - } - if (message.value !== undefined) { - obj.value = VerificationTemplateFieldPatch.toJSON(message.value); - } - return obj; - }, + fromJSON(object: any): UpdateVerificationTemplateRequest_FieldsEntry { + return { + key: isSet(object.key) ? String(object.key) : "", + value: isSet(object.value) ? VerificationTemplateFieldPatch.fromJSON(object.value) : undefined, + }; + }, - create( - base?: DeepPartial, - ): UpdateVerificationTemplateRequest_FieldsEntry { - return UpdateVerificationTemplateRequest_FieldsEntry.fromPartial( - base ?? {}, - ); - }, - fromPartial( - object: DeepPartial, - ): UpdateVerificationTemplateRequest_FieldsEntry { - const message = - createBaseUpdateVerificationTemplateRequest_FieldsEntry(); - message.key = object.key ?? ""; - message.value = - object.value !== undefined && object.value !== null - ? VerificationTemplateFieldPatch.fromPartial(object.value) - : undefined; - return message; - }, + toJSON(message: UpdateVerificationTemplateRequest_FieldsEntry): unknown { + const obj: any = {}; + if (message.key !== "") { + obj.key = message.key; + } + if (message.value !== undefined) { + obj.value = VerificationTemplateFieldPatch.toJSON(message.value); + } + return obj; + }, + + create( + base?: DeepPartial, + ): UpdateVerificationTemplateRequest_FieldsEntry { + return UpdateVerificationTemplateRequest_FieldsEntry.fromPartial(base ?? {}); + }, + fromPartial( + object: DeepPartial, + ): UpdateVerificationTemplateRequest_FieldsEntry { + const message = createBaseUpdateVerificationTemplateRequest_FieldsEntry(); + message.key = object.key ?? ""; + message.value = (object.value !== undefined && object.value !== null) + ? VerificationTemplateFieldPatch.fromPartial(object.value) + : undefined; + return message; + }, }; function createBaseUpdateVerificationTemplateResponse(): UpdateVerificationTemplateResponse { - return { template: undefined }; + return { template: undefined }; } export const UpdateVerificationTemplateResponse = { - encode( - message: UpdateVerificationTemplateResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.template !== undefined) { - VerificationTemplateData.encode( - message.template, - writer.uint32(10).fork(), - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): UpdateVerificationTemplateResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateVerificationTemplateResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.template = VerificationTemplateData.decode( - reader, - reader.uint32(), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): UpdateVerificationTemplateResponse { - return { - template: isSet(object.template) - ? VerificationTemplateData.fromJSON(object.template) - : undefined, - }; - }, + encode(message: UpdateVerificationTemplateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.template !== undefined) { + VerificationTemplateData.encode(message.template, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): UpdateVerificationTemplateResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUpdateVerificationTemplateResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.template = VerificationTemplateData.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: UpdateVerificationTemplateResponse): unknown { - const obj: any = {}; - if (message.template !== undefined) { - obj.template = VerificationTemplateData.toJSON(message.template); - } - return obj; - }, + fromJSON(object: any): UpdateVerificationTemplateResponse { + return { template: isSet(object.template) ? VerificationTemplateData.fromJSON(object.template) : undefined }; + }, - create( - base?: DeepPartial, - ): UpdateVerificationTemplateResponse { - return UpdateVerificationTemplateResponse.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): UpdateVerificationTemplateResponse { - const message = createBaseUpdateVerificationTemplateResponse(); - message.template = - object.template !== undefined && object.template !== null - ? VerificationTemplateData.fromPartial(object.template) - : undefined; - return message; - }, + toJSON(message: UpdateVerificationTemplateResponse): unknown { + const obj: any = {}; + if (message.template !== undefined) { + obj.template = VerificationTemplateData.toJSON(message.template); + } + return obj; + }, + + create(base?: DeepPartial): UpdateVerificationTemplateResponse { + return UpdateVerificationTemplateResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): UpdateVerificationTemplateResponse { + const message = createBaseUpdateVerificationTemplateResponse(); + message.template = (object.template !== undefined && object.template !== null) + ? VerificationTemplateData.fromPartial(object.template) + : undefined; + return message; + }, }; function createBaseDeleteVerificationTemplateRequest(): DeleteVerificationTemplateRequest { - return { verificationTemplateId: "" }; + return { verificationTemplateId: "" }; } export const DeleteVerificationTemplateRequest = { - encode( - message: DeleteVerificationTemplateRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if ( - message.verificationTemplateId !== undefined && - message.verificationTemplateId !== "" - ) { - writer.uint32(10).string(message.verificationTemplateId); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): DeleteVerificationTemplateRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDeleteVerificationTemplateRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.verificationTemplateId = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): DeleteVerificationTemplateRequest { - return { - verificationTemplateId: isSet(object.verificationTemplateId) - ? String(object.verificationTemplateId) - : "", - }; - }, + encode(message: DeleteVerificationTemplateRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.verificationTemplateId !== undefined && message.verificationTemplateId !== "") { + writer.uint32(10).string(message.verificationTemplateId); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): DeleteVerificationTemplateRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseDeleteVerificationTemplateRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.verificationTemplateId = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: DeleteVerificationTemplateRequest): unknown { - const obj: any = {}; - if ( - message.verificationTemplateId !== undefined && - message.verificationTemplateId !== "" - ) { - obj.verificationTemplateId = message.verificationTemplateId; - } - return obj; - }, + fromJSON(object: any): DeleteVerificationTemplateRequest { + return { + verificationTemplateId: isSet(object.verificationTemplateId) ? String(object.verificationTemplateId) : "", + }; + }, - create( - base?: DeepPartial, - ): DeleteVerificationTemplateRequest { - return DeleteVerificationTemplateRequest.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): DeleteVerificationTemplateRequest { - const message = createBaseDeleteVerificationTemplateRequest(); - message.verificationTemplateId = object.verificationTemplateId ?? ""; - return message; - }, + toJSON(message: DeleteVerificationTemplateRequest): unknown { + const obj: any = {}; + if (message.verificationTemplateId !== undefined && message.verificationTemplateId !== "") { + obj.verificationTemplateId = message.verificationTemplateId; + } + return obj; + }, + + create(base?: DeepPartial): DeleteVerificationTemplateRequest { + return DeleteVerificationTemplateRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): DeleteVerificationTemplateRequest { + const message = createBaseDeleteVerificationTemplateRequest(); + message.verificationTemplateId = object.verificationTemplateId ?? ""; + return message; + }, }; function createBaseDeleteVerificationTemplateResponse(): DeleteVerificationTemplateResponse { - return {}; + return {}; } export const DeleteVerificationTemplateResponse = { - encode( - _: DeleteVerificationTemplateResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): DeleteVerificationTemplateResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDeleteVerificationTemplateResponse(); - 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): DeleteVerificationTemplateResponse { - return {}; - }, - - toJSON(_: DeleteVerificationTemplateResponse): unknown { - const obj: any = {}; - return obj; - }, + encode(_: DeleteVerificationTemplateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): DeleteVerificationTemplateResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseDeleteVerificationTemplateResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - create( - base?: DeepPartial, - ): DeleteVerificationTemplateResponse { - return DeleteVerificationTemplateResponse.fromPartial(base ?? {}); - }, - fromPartial( - _: DeepPartial, - ): DeleteVerificationTemplateResponse { - const message = createBaseDeleteVerificationTemplateResponse(); - return message; - }, + fromJSON(_: any): DeleteVerificationTemplateResponse { + return {}; + }, + + toJSON(_: DeleteVerificationTemplateResponse): unknown { + const obj: any = {}; + return obj; + }, + + create(base?: DeepPartial): DeleteVerificationTemplateResponse { + return DeleteVerificationTemplateResponse.fromPartial(base ?? {}); + }, + fromPartial(_: DeepPartial): DeleteVerificationTemplateResponse { + const message = createBaseDeleteVerificationTemplateResponse(); + return message; + }, }; function createBaseVerificationTemplateData(): VerificationTemplateData { - return { - id: "", - name: "", - version: 0, - fields: {}, - credentialTemplateId: "", - ecosystemId: "", - type: "", - createdBy: "", - dateCreated: "", - title: "", - description: "", - }; + return { + id: "", + name: "", + version: 0, + fields: {}, + credentialTemplateId: "", + ecosystemId: "", + type: "", + createdBy: "", + dateCreated: "", + title: "", + description: "", + }; } export const VerificationTemplateData = { - encode( - message: VerificationTemplateData, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.id !== undefined && message.id !== "") { - writer.uint32(10).string(message.id); - } - if (message.name !== undefined && message.name !== "") { - writer.uint32(18).string(message.name); - } - if (message.version !== undefined && message.version !== 0) { - writer.uint32(24).int32(message.version); - } - Object.entries(message.fields || {}).forEach(([key, value]) => { - VerificationTemplateData_FieldsEntry.encode( - { key: key as any, value }, - writer.uint32(34).fork(), - ).ldelim(); - }); - if ( - message.credentialTemplateId !== undefined && - message.credentialTemplateId !== "" - ) { - writer.uint32(42).string(message.credentialTemplateId); - } - if (message.ecosystemId !== undefined && message.ecosystemId !== "") { - writer.uint32(66).string(message.ecosystemId); - } - if (message.type !== undefined && message.type !== "") { - writer.uint32(74).string(message.type); - } - if (message.createdBy !== undefined && message.createdBy !== "") { - writer.uint32(82).string(message.createdBy); - } - if (message.dateCreated !== undefined && message.dateCreated !== "") { - writer.uint32(90).string(message.dateCreated); - } - if (message.title !== undefined && message.title !== "") { - writer.uint32(98).string(message.title); - } - if (message.description !== undefined && message.description !== "") { - writer.uint32(106).string(message.description); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): VerificationTemplateData { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseVerificationTemplateData(); - 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.name = reader.string(); - continue; - case 3: - if (tag !== 24) { - break; - } - - message.version = reader.int32(); - continue; - case 4: - if (tag !== 34) { - break; - } - - const entry4 = VerificationTemplateData_FieldsEntry.decode( - reader, - reader.uint32(), - ); - if (entry4.value !== undefined) { - message.fields![entry4.key] = entry4.value; - } - continue; - case 5: - if (tag !== 42) { - break; - } - - message.credentialTemplateId = reader.string(); - continue; - case 8: - if (tag !== 66) { - break; - } - - message.ecosystemId = reader.string(); - continue; - case 9: - if (tag !== 74) { - break; - } - - message.type = reader.string(); - continue; - case 10: - if (tag !== 82) { - break; - } - - message.createdBy = reader.string(); - continue; - case 11: - if (tag !== 90) { - break; - } - - message.dateCreated = reader.string(); - continue; - case 12: - if (tag !== 98) { - break; - } - - message.title = reader.string(); - continue; - case 13: - if (tag !== 106) { - break; - } - - message.description = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: VerificationTemplateData, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.id !== undefined && message.id !== "") { + writer.uint32(10).string(message.id); + } + if (message.name !== undefined && message.name !== "") { + writer.uint32(18).string(message.name); + } + if (message.version !== undefined && message.version !== 0) { + writer.uint32(24).int32(message.version); + } + Object.entries(message.fields || {}).forEach(([key, value]) => { + VerificationTemplateData_FieldsEntry.encode({ key: key as any, value }, writer.uint32(34).fork()).ldelim(); + }); + if (message.credentialTemplateId !== undefined && message.credentialTemplateId !== "") { + writer.uint32(42).string(message.credentialTemplateId); + } + if (message.ecosystemId !== undefined && message.ecosystemId !== "") { + writer.uint32(66).string(message.ecosystemId); + } + if (message.type !== undefined && message.type !== "") { + writer.uint32(74).string(message.type); + } + if (message.createdBy !== undefined && message.createdBy !== "") { + writer.uint32(82).string(message.createdBy); + } + if (message.dateCreated !== undefined && message.dateCreated !== "") { + writer.uint32(90).string(message.dateCreated); + } + if (message.title !== undefined && message.title !== "") { + writer.uint32(98).string(message.title); + } + if (message.description !== undefined && message.description !== "") { + writer.uint32(106).string(message.description); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): VerificationTemplateData { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseVerificationTemplateData(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - fromJSON(object: any): VerificationTemplateData { - return { - id: isSet(object.id) ? String(object.id) : "", - name: isSet(object.name) ? String(object.name) : "", - version: isSet(object.version) ? Number(object.version) : 0, - fields: isObject(object.fields) - ? Object.entries(object.fields).reduce<{ - [key: string]: VerificationTemplateField; - }>((acc, [key, value]) => { - acc[key] = VerificationTemplateField.fromJSON(value); - return acc; - }, {}) - : {}, - credentialTemplateId: isSet(object.credentialTemplateId) - ? String(object.credentialTemplateId) - : "", - ecosystemId: isSet(object.ecosystemId) - ? String(object.ecosystemId) - : "", - type: isSet(object.type) ? String(object.type) : "", - createdBy: isSet(object.createdBy) ? String(object.createdBy) : "", - dateCreated: isSet(object.dateCreated) - ? String(object.dateCreated) - : "", - title: isSet(object.title) ? String(object.title) : "", - description: isSet(object.description) - ? String(object.description) - : "", - }; - }, + message.id = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.name = reader.string(); + continue; + case 3: + if (tag !== 24) { + break; + } + + message.version = reader.int32(); + continue; + case 4: + if (tag !== 34) { + break; + } + + const entry4 = VerificationTemplateData_FieldsEntry.decode(reader, reader.uint32()); + if (entry4.value !== undefined) { + message.fields![entry4.key] = entry4.value; + } + continue; + case 5: + if (tag !== 42) { + break; + } + + message.credentialTemplateId = reader.string(); + continue; + case 8: + if (tag !== 66) { + break; + } + + message.ecosystemId = reader.string(); + continue; + case 9: + if (tag !== 74) { + break; + } + + message.type = reader.string(); + continue; + case 10: + if (tag !== 82) { + break; + } + + message.createdBy = reader.string(); + continue; + case 11: + if (tag !== 90) { + break; + } + + message.dateCreated = reader.string(); + continue; + case 12: + if (tag !== 98) { + break; + } + + message.title = reader.string(); + continue; + case 13: + if (tag !== 106) { + break; + } + + message.description = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: VerificationTemplateData): unknown { - const obj: any = {}; - if (message.id !== undefined && message.id !== "") { - obj.id = message.id; - } - if (message.name !== undefined && message.name !== "") { - obj.name = message.name; - } - if (message.version !== undefined && message.version !== 0) { - obj.version = Math.round(message.version); - } - if (message.fields) { - const entries = Object.entries(message.fields); - if (entries.length > 0) { - obj.fields = {}; - entries.forEach(([k, v]) => { - obj.fields[k] = VerificationTemplateField.toJSON(v); - }); - } - } - if ( - message.credentialTemplateId !== undefined && - message.credentialTemplateId !== "" - ) { - obj.credentialTemplateId = message.credentialTemplateId; - } - if (message.ecosystemId !== undefined && message.ecosystemId !== "") { - obj.ecosystemId = message.ecosystemId; - } - if (message.type !== undefined && message.type !== "") { - obj.type = message.type; - } - if (message.createdBy !== undefined && message.createdBy !== "") { - obj.createdBy = message.createdBy; - } - if (message.dateCreated !== undefined && message.dateCreated !== "") { - obj.dateCreated = message.dateCreated; - } - if (message.title !== undefined && message.title !== "") { - obj.title = message.title; - } - if (message.description !== undefined && message.description !== "") { - obj.description = message.description; - } - return obj; - }, + fromJSON(object: any): VerificationTemplateData { + return { + id: isSet(object.id) ? String(object.id) : "", + name: isSet(object.name) ? String(object.name) : "", + version: isSet(object.version) ? Number(object.version) : 0, + fields: isObject(object.fields) + ? Object.entries(object.fields).reduce<{ [key: string]: VerificationTemplateField }>((acc, [key, value]) => { + acc[key] = VerificationTemplateField.fromJSON(value); + return acc; + }, {}) + : {}, + credentialTemplateId: isSet(object.credentialTemplateId) ? String(object.credentialTemplateId) : "", + ecosystemId: isSet(object.ecosystemId) ? String(object.ecosystemId) : "", + type: isSet(object.type) ? String(object.type) : "", + createdBy: isSet(object.createdBy) ? String(object.createdBy) : "", + dateCreated: isSet(object.dateCreated) ? String(object.dateCreated) : "", + title: isSet(object.title) ? String(object.title) : "", + description: isSet(object.description) ? String(object.description) : "", + }; + }, - create( - base?: DeepPartial, - ): VerificationTemplateData { - return VerificationTemplateData.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): VerificationTemplateData { - const message = createBaseVerificationTemplateData(); - message.id = object.id ?? ""; - message.name = object.name ?? ""; - message.version = object.version ?? 0; - message.fields = Object.entries(object.fields ?? {}).reduce<{ - [key: string]: VerificationTemplateField; - }>((acc, [key, value]) => { - if (value !== undefined) { - acc[key] = VerificationTemplateField.fromPartial(value); - } - return acc; - }, {}); - message.credentialTemplateId = object.credentialTemplateId ?? ""; - message.ecosystemId = object.ecosystemId ?? ""; - message.type = object.type ?? ""; - message.createdBy = object.createdBy ?? ""; - message.dateCreated = object.dateCreated ?? ""; - message.title = object.title ?? ""; - message.description = object.description ?? ""; - return message; - }, + toJSON(message: VerificationTemplateData): unknown { + const obj: any = {}; + if (message.id !== undefined && message.id !== "") { + obj.id = message.id; + } + if (message.name !== undefined && message.name !== "") { + obj.name = message.name; + } + if (message.version !== undefined && message.version !== 0) { + obj.version = Math.round(message.version); + } + if (message.fields) { + const entries = Object.entries(message.fields); + if (entries.length > 0) { + obj.fields = {}; + entries.forEach(([k, v]) => { + obj.fields[k] = VerificationTemplateField.toJSON(v); + }); + } + } + if (message.credentialTemplateId !== undefined && message.credentialTemplateId !== "") { + obj.credentialTemplateId = message.credentialTemplateId; + } + if (message.ecosystemId !== undefined && message.ecosystemId !== "") { + obj.ecosystemId = message.ecosystemId; + } + if (message.type !== undefined && message.type !== "") { + obj.type = message.type; + } + if (message.createdBy !== undefined && message.createdBy !== "") { + obj.createdBy = message.createdBy; + } + if (message.dateCreated !== undefined && message.dateCreated !== "") { + obj.dateCreated = message.dateCreated; + } + if (message.title !== undefined && message.title !== "") { + obj.title = message.title; + } + if (message.description !== undefined && message.description !== "") { + obj.description = message.description; + } + return obj; + }, + + create(base?: DeepPartial): VerificationTemplateData { + return VerificationTemplateData.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): VerificationTemplateData { + const message = createBaseVerificationTemplateData(); + message.id = object.id ?? ""; + message.name = object.name ?? ""; + message.version = object.version ?? 0; + message.fields = Object.entries(object.fields ?? {}).reduce<{ [key: string]: VerificationTemplateField }>( + (acc, [key, value]) => { + if (value !== undefined) { + acc[key] = VerificationTemplateField.fromPartial(value); + } + return acc; + }, + {}, + ); + message.credentialTemplateId = object.credentialTemplateId ?? ""; + message.ecosystemId = object.ecosystemId ?? ""; + message.type = object.type ?? ""; + message.createdBy = object.createdBy ?? ""; + message.dateCreated = object.dateCreated ?? ""; + message.title = object.title ?? ""; + message.description = object.description ?? ""; + return message; + }, }; function createBaseVerificationTemplateData_FieldsEntry(): VerificationTemplateData_FieldsEntry { - return { key: "", value: undefined }; + return { key: "", value: undefined }; } export const VerificationTemplateData_FieldsEntry = { - encode( - message: VerificationTemplateData_FieldsEntry, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.value !== undefined) { - VerificationTemplateField.encode( - message.value, - writer.uint32(18).fork(), - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): VerificationTemplateData_FieldsEntry { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseVerificationTemplateData_FieldsEntry(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.key = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.value = VerificationTemplateField.decode( - reader, - reader.uint32(), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: VerificationTemplateData_FieldsEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.key !== "") { + writer.uint32(10).string(message.key); + } + if (message.value !== undefined) { + VerificationTemplateField.encode(message.value, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): VerificationTemplateData_FieldsEntry { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseVerificationTemplateData_FieldsEntry(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - fromJSON(object: any): VerificationTemplateData_FieldsEntry { - return { - key: isSet(object.key) ? String(object.key) : "", - value: isSet(object.value) - ? VerificationTemplateField.fromJSON(object.value) - : undefined, - }; - }, + message.key = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.value = VerificationTemplateField.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: VerificationTemplateData_FieldsEntry): unknown { - const obj: any = {}; - if (message.key !== "") { - obj.key = message.key; - } - if (message.value !== undefined) { - obj.value = VerificationTemplateField.toJSON(message.value); - } - return obj; - }, + fromJSON(object: any): VerificationTemplateData_FieldsEntry { + return { + key: isSet(object.key) ? String(object.key) : "", + value: isSet(object.value) ? VerificationTemplateField.fromJSON(object.value) : undefined, + }; + }, - create( - base?: DeepPartial, - ): VerificationTemplateData_FieldsEntry { - return VerificationTemplateData_FieldsEntry.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): VerificationTemplateData_FieldsEntry { - const message = createBaseVerificationTemplateData_FieldsEntry(); - message.key = object.key ?? ""; - message.value = - object.value !== undefined && object.value !== null - ? VerificationTemplateField.fromPartial(object.value) - : undefined; - return message; - }, + toJSON(message: VerificationTemplateData_FieldsEntry): unknown { + const obj: any = {}; + if (message.key !== "") { + obj.key = message.key; + } + if (message.value !== undefined) { + obj.value = VerificationTemplateField.toJSON(message.value); + } + return obj; + }, + + create(base?: DeepPartial): VerificationTemplateData_FieldsEntry { + return VerificationTemplateData_FieldsEntry.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): VerificationTemplateData_FieldsEntry { + const message = createBaseVerificationTemplateData_FieldsEntry(); + message.key = object.key ?? ""; + message.value = (object.value !== undefined && object.value !== null) + ? VerificationTemplateField.fromPartial(object.value) + : undefined; + return message; + }, }; function createBaseListVerificationTemplatesRequest(): ListVerificationTemplatesRequest { - return { query: "", continuationToken: "" }; + return { query: "", continuationToken: "" }; } export const ListVerificationTemplatesRequest = { - encode( - message: ListVerificationTemplatesRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.query !== undefined && message.query !== "") { - writer.uint32(10).string(message.query); - } - if ( - message.continuationToken !== undefined && - message.continuationToken !== "" - ) { - writer.uint32(18).string(message.continuationToken); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): ListVerificationTemplatesRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseListVerificationTemplatesRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.query = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.continuationToken = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: ListVerificationTemplatesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.query !== undefined && message.query !== "") { + writer.uint32(10).string(message.query); + } + if (message.continuationToken !== undefined && message.continuationToken !== "") { + writer.uint32(18).string(message.continuationToken); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ListVerificationTemplatesRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseListVerificationTemplatesRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - fromJSON(object: any): ListVerificationTemplatesRequest { - return { - query: isSet(object.query) ? String(object.query) : "", - continuationToken: isSet(object.continuationToken) - ? String(object.continuationToken) - : "", - }; - }, + message.query = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.continuationToken = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: ListVerificationTemplatesRequest): unknown { - const obj: any = {}; - if (message.query !== undefined && message.query !== "") { - obj.query = message.query; - } - if ( - message.continuationToken !== undefined && - message.continuationToken !== "" - ) { - obj.continuationToken = message.continuationToken; - } - return obj; - }, + fromJSON(object: any): ListVerificationTemplatesRequest { + return { + query: isSet(object.query) ? String(object.query) : "", + continuationToken: isSet(object.continuationToken) ? String(object.continuationToken) : "", + }; + }, - create( - base?: DeepPartial, - ): ListVerificationTemplatesRequest { - return ListVerificationTemplatesRequest.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): ListVerificationTemplatesRequest { - const message = createBaseListVerificationTemplatesRequest(); - message.query = object.query ?? ""; - message.continuationToken = object.continuationToken ?? ""; - return message; - }, + toJSON(message: ListVerificationTemplatesRequest): unknown { + const obj: any = {}; + if (message.query !== undefined && message.query !== "") { + obj.query = message.query; + } + if (message.continuationToken !== undefined && message.continuationToken !== "") { + obj.continuationToken = message.continuationToken; + } + return obj; + }, + + create(base?: DeepPartial): ListVerificationTemplatesRequest { + return ListVerificationTemplatesRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): ListVerificationTemplatesRequest { + const message = createBaseListVerificationTemplatesRequest(); + message.query = object.query ?? ""; + message.continuationToken = object.continuationToken ?? ""; + return message; + }, }; function createBaseListVerificationTemplatesResponse(): ListVerificationTemplatesResponse { - return { templates: [], hasMoreResults: false, continuationToken: "" }; + return { templates: [], hasMoreResults: false, continuationToken: "" }; } export const ListVerificationTemplatesResponse = { - encode( - message: ListVerificationTemplatesResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.templates !== undefined && message.templates.length !== 0) { - for (const v of message.templates) { - VerificationTemplateData.encode( - v!, - writer.uint32(10).fork(), - ).ldelim(); - } - } - if (message.hasMoreResults === true) { - writer.uint32(16).bool(message.hasMoreResults); - } - if ( - message.continuationToken !== undefined && - message.continuationToken !== "" - ) { - writer.uint32(26).string(message.continuationToken); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): ListVerificationTemplatesResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseListVerificationTemplatesResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.templates!.push( - VerificationTemplateData.decode( - reader, - reader.uint32(), - ), - ); - continue; - case 2: - if (tag !== 16) { - break; - } - - message.hasMoreResults = reader.bool(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.continuationToken = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: ListVerificationTemplatesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.templates !== undefined && message.templates.length !== 0) { + for (const v of message.templates) { + VerificationTemplateData.encode(v!, writer.uint32(10).fork()).ldelim(); + } + } + if (message.hasMoreResults === true) { + writer.uint32(16).bool(message.hasMoreResults); + } + if (message.continuationToken !== undefined && message.continuationToken !== "") { + writer.uint32(26).string(message.continuationToken); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ListVerificationTemplatesResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseListVerificationTemplatesResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - fromJSON(object: any): ListVerificationTemplatesResponse { - return { - templates: Array.isArray(object?.templates) - ? object.templates.map((e: any) => - VerificationTemplateData.fromJSON(e), - ) - : [], - hasMoreResults: isSet(object.hasMoreResults) - ? Boolean(object.hasMoreResults) - : false, - continuationToken: isSet(object.continuationToken) - ? String(object.continuationToken) - : "", - }; - }, + message.templates!.push(VerificationTemplateData.decode(reader, reader.uint32())); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.hasMoreResults = reader.bool(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.continuationToken = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: ListVerificationTemplatesResponse): unknown { - const obj: any = {}; - if (message.templates?.length) { - obj.templates = message.templates.map((e) => - VerificationTemplateData.toJSON(e), - ); - } - if (message.hasMoreResults === true) { - obj.hasMoreResults = message.hasMoreResults; - } - if ( - message.continuationToken !== undefined && - message.continuationToken !== "" - ) { - obj.continuationToken = message.continuationToken; - } - return obj; - }, + fromJSON(object: any): ListVerificationTemplatesResponse { + return { + templates: Array.isArray(object?.templates) + ? object.templates.map((e: any) => VerificationTemplateData.fromJSON(e)) + : [], + hasMoreResults: isSet(object.hasMoreResults) ? Boolean(object.hasMoreResults) : false, + continuationToken: isSet(object.continuationToken) ? String(object.continuationToken) : "", + }; + }, - create( - base?: DeepPartial, - ): ListVerificationTemplatesResponse { - return ListVerificationTemplatesResponse.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): ListVerificationTemplatesResponse { - const message = createBaseListVerificationTemplatesResponse(); - message.templates = - object.templates?.map((e) => - VerificationTemplateData.fromPartial(e), - ) || []; - message.hasMoreResults = object.hasMoreResults ?? false; - message.continuationToken = object.continuationToken ?? ""; - return message; - }, + toJSON(message: ListVerificationTemplatesResponse): unknown { + const obj: any = {}; + if (message.templates?.length) { + obj.templates = message.templates.map((e) => VerificationTemplateData.toJSON(e)); + } + if (message.hasMoreResults === true) { + obj.hasMoreResults = message.hasMoreResults; + } + if (message.continuationToken !== undefined && message.continuationToken !== "") { + obj.continuationToken = message.continuationToken; + } + return obj; + }, + + create(base?: DeepPartial): ListVerificationTemplatesResponse { + return ListVerificationTemplatesResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): ListVerificationTemplatesResponse { + const message = createBaseListVerificationTemplatesResponse(); + message.templates = object.templates?.map((e) => VerificationTemplateData.fromPartial(e)) || []; + message.hasMoreResults = object.hasMoreResults ?? false; + message.continuationToken = object.continuationToken ?? ""; + return message; + }, }; function createBaseVerificationTemplateField(): VerificationTemplateField { - return { fieldShareType: 0, usagePolicy: "" }; + return { fieldShareType: 0, usagePolicy: "" }; } export const VerificationTemplateField = { - encode( - message: VerificationTemplateField, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if ( - message.fieldShareType !== undefined && - message.fieldShareType !== 0 - ) { - writer.uint32(8).int32(message.fieldShareType); - } - if (message.usagePolicy !== undefined && message.usagePolicy !== "") { - writer.uint32(18).string(message.usagePolicy); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): VerificationTemplateField { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseVerificationTemplateField(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.fieldShareType = reader.int32() as any; - continue; - case 2: - if (tag !== 18) { - break; - } - - message.usagePolicy = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: VerificationTemplateField, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.fieldShareType !== undefined && message.fieldShareType !== 0) { + writer.uint32(8).int32(message.fieldShareType); + } + if (message.usagePolicy !== undefined && message.usagePolicy !== "") { + writer.uint32(18).string(message.usagePolicy); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): VerificationTemplateField { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseVerificationTemplateField(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } - fromJSON(object: any): VerificationTemplateField { - return { - fieldShareType: isSet(object.fieldShareType) - ? verificationShareTypeFromJSON(object.fieldShareType) - : 0, - usagePolicy: isSet(object.usagePolicy) - ? String(object.usagePolicy) - : "", - }; - }, + message.fieldShareType = reader.int32() as any; + continue; + case 2: + if (tag !== 18) { + break; + } + + message.usagePolicy = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: VerificationTemplateField): unknown { - const obj: any = {}; - if ( - message.fieldShareType !== undefined && - message.fieldShareType !== 0 - ) { - obj.fieldShareType = verificationShareTypeToJSON( - message.fieldShareType, - ); - } - if (message.usagePolicy !== undefined && message.usagePolicy !== "") { - obj.usagePolicy = message.usagePolicy; - } - return obj; - }, + fromJSON(object: any): VerificationTemplateField { + return { + fieldShareType: isSet(object.fieldShareType) ? verificationShareTypeFromJSON(object.fieldShareType) : 0, + usagePolicy: isSet(object.usagePolicy) ? String(object.usagePolicy) : "", + }; + }, - create( - base?: DeepPartial, - ): VerificationTemplateField { - return VerificationTemplateField.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): VerificationTemplateField { - const message = createBaseVerificationTemplateField(); - message.fieldShareType = object.fieldShareType ?? 0; - message.usagePolicy = object.usagePolicy ?? ""; - return message; - }, + toJSON(message: VerificationTemplateField): unknown { + const obj: any = {}; + if (message.fieldShareType !== undefined && message.fieldShareType !== 0) { + obj.fieldShareType = verificationShareTypeToJSON(message.fieldShareType); + } + if (message.usagePolicy !== undefined && message.usagePolicy !== "") { + obj.usagePolicy = message.usagePolicy; + } + return obj; + }, + + create(base?: DeepPartial): VerificationTemplateField { + return VerificationTemplateField.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): VerificationTemplateField { + const message = createBaseVerificationTemplateField(); + message.fieldShareType = object.fieldShareType ?? 0; + message.usagePolicy = object.usagePolicy ?? ""; + return message; + }, }; function createBaseVerificationTemplateFieldPatch(): VerificationTemplateFieldPatch { - return { fieldShareType: 0, usagePolicy: "" }; + return { fieldShareType: 0, usagePolicy: "" }; } export const VerificationTemplateFieldPatch = { - encode( - message: VerificationTemplateFieldPatch, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if ( - message.fieldShareType !== undefined && - message.fieldShareType !== 0 - ) { - writer.uint32(8).int32(message.fieldShareType); - } - if (message.usagePolicy !== undefined && message.usagePolicy !== "") { - writer.uint32(18).string(message.usagePolicy); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): VerificationTemplateFieldPatch { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseVerificationTemplateFieldPatch(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.fieldShareType = reader.int32() as any; - continue; - case 2: - if (tag !== 18) { - break; - } - - message.usagePolicy = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: VerificationTemplateFieldPatch, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.fieldShareType !== undefined && message.fieldShareType !== 0) { + writer.uint32(8).int32(message.fieldShareType); + } + if (message.usagePolicy !== undefined && message.usagePolicy !== "") { + writer.uint32(18).string(message.usagePolicy); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): VerificationTemplateFieldPatch { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseVerificationTemplateFieldPatch(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } - fromJSON(object: any): VerificationTemplateFieldPatch { - return { - fieldShareType: isSet(object.fieldShareType) - ? verificationShareTypeFromJSON(object.fieldShareType) - : 0, - usagePolicy: isSet(object.usagePolicy) - ? String(object.usagePolicy) - : "", - }; - }, + message.fieldShareType = reader.int32() as any; + continue; + case 2: + if (tag !== 18) { + break; + } + + message.usagePolicy = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: VerificationTemplateFieldPatch): unknown { - const obj: any = {}; - if ( - message.fieldShareType !== undefined && - message.fieldShareType !== 0 - ) { - obj.fieldShareType = verificationShareTypeToJSON( - message.fieldShareType, - ); - } - if (message.usagePolicy !== undefined && message.usagePolicy !== "") { - obj.usagePolicy = message.usagePolicy; - } - return obj; - }, + fromJSON(object: any): VerificationTemplateFieldPatch { + return { + fieldShareType: isSet(object.fieldShareType) ? verificationShareTypeFromJSON(object.fieldShareType) : 0, + usagePolicy: isSet(object.usagePolicy) ? String(object.usagePolicy) : "", + }; + }, - create( - base?: DeepPartial, - ): VerificationTemplateFieldPatch { - return VerificationTemplateFieldPatch.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): VerificationTemplateFieldPatch { - const message = createBaseVerificationTemplateFieldPatch(); - message.fieldShareType = object.fieldShareType ?? 0; - message.usagePolicy = object.usagePolicy ?? ""; - return message; - }, + toJSON(message: VerificationTemplateFieldPatch): unknown { + const obj: any = {}; + if (message.fieldShareType !== undefined && message.fieldShareType !== 0) { + obj.fieldShareType = verificationShareTypeToJSON(message.fieldShareType); + } + if (message.usagePolicy !== undefined && message.usagePolicy !== "") { + obj.usagePolicy = message.usagePolicy; + } + return obj; + }, + + create(base?: DeepPartial): VerificationTemplateFieldPatch { + return VerificationTemplateFieldPatch.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): VerificationTemplateFieldPatch { + const message = createBaseVerificationTemplateFieldPatch(); + message.fieldShareType = object.fieldShareType ?? 0; + message.usagePolicy = object.usagePolicy ?? ""; + return message; + }, }; -export type CredentialTemplatesDefinition = - typeof CredentialTemplatesDefinition; +export type CredentialTemplatesDefinition = typeof CredentialTemplatesDefinition; export const CredentialTemplatesDefinition = { - name: "CredentialTemplates", - fullName: "services.verifiablecredentials.templates.v1.CredentialTemplates", - methods: { - /** Create a credential template in the current ecosystem */ - create: { - name: "Create", - requestType: CreateCredentialTemplateRequest, - requestStream: false, - responseType: CreateCredentialTemplateResponse, - responseStream: false, - options: {}, - }, - /** Fetch a credential template by ID */ - get: { - name: "Get", - requestType: GetCredentialTemplateRequest, - requestStream: false, - responseType: GetCredentialTemplateResponse, - responseStream: false, - options: {}, - }, - /** Update metadata of a template */ - update: { - name: "Update", - requestType: UpdateCredentialTemplateRequest, - requestStream: false, - responseType: UpdateCredentialTemplateResponse, - responseStream: false, - options: {}, - }, - /** Search credential templates using SQL, returning strongly-typed template data */ - list: { - name: "List", - requestType: ListCredentialTemplatesRequest, - requestStream: false, - responseType: ListCredentialTemplatesResponse, - responseStream: false, - options: {}, - }, - /** Search credential templates using SQL, returning raw JSON data */ - search: { - name: "Search", - requestType: SearchCredentialTemplatesRequest, - requestStream: false, - responseType: SearchCredentialTemplatesResponse, - responseStream: false, - options: {}, - }, - /** Delete a credential template from the current ecosystem by ID */ - delete: { - name: "Delete", - requestType: DeleteCredentialTemplateRequest, - requestStream: false, - responseType: DeleteCredentialTemplateResponse, - responseStream: false, - options: {}, - }, - /** Create/update verification templates */ - createVerificationTemplate: { - name: "CreateVerificationTemplate", - requestType: CreateVerificationTemplateRequest, - requestStream: false, - responseType: CreateVerificationTemplateResponse, - responseStream: false, - options: { - _unknownFields: { 480010: [new Uint8Array([4, 34, 2, 8, 1])] }, - }, - }, - listVerificationTemplates: { - name: "ListVerificationTemplates", - requestType: ListVerificationTemplatesRequest, - requestStream: false, - responseType: ListVerificationTemplatesResponse, - responseStream: false, - options: { - _unknownFields: { 480010: [new Uint8Array([4, 34, 2, 8, 1])] }, - }, - }, - getVerificationTemplate: { - name: "GetVerificationTemplate", - requestType: GetVerificationTemplateRequest, - requestStream: false, - responseType: GetVerificationTemplateResponse, - responseStream: false, - options: { - _unknownFields: { 480010: [new Uint8Array([4, 34, 2, 8, 1])] }, - }, - }, - updateVerificationTemplate: { - name: "UpdateVerificationTemplate", - requestType: UpdateVerificationTemplateRequest, - requestStream: false, - responseType: UpdateVerificationTemplateResponse, - responseStream: false, - options: { - _unknownFields: { 480010: [new Uint8Array([4, 34, 2, 8, 1])] }, - }, - }, - deleteVerificationTemplate: { - name: "DeleteVerificationTemplate", - requestType: DeleteVerificationTemplateRequest, - requestStream: false, - responseType: DeleteVerificationTemplateResponse, - responseStream: false, - options: { - _unknownFields: { 480010: [new Uint8Array([4, 34, 2, 8, 1])] }, - }, - }, - }, + name: "CredentialTemplates", + fullName: "services.verifiablecredentials.templates.v1.CredentialTemplates", + methods: { + /** Create a credential template in the current ecosystem */ + create: { + name: "Create", + requestType: CreateCredentialTemplateRequest, + requestStream: false, + responseType: CreateCredentialTemplateResponse, + responseStream: false, + options: {}, + }, + /** Fetch a credential template by ID */ + get: { + name: "Get", + requestType: GetCredentialTemplateRequest, + requestStream: false, + responseType: GetCredentialTemplateResponse, + responseStream: false, + options: {}, + }, + /** Update metadata of a template */ + update: { + name: "Update", + requestType: UpdateCredentialTemplateRequest, + requestStream: false, + responseType: UpdateCredentialTemplateResponse, + responseStream: false, + options: {}, + }, + /** Search credential templates using SQL, returning strongly-typed template data */ + list: { + name: "List", + requestType: ListCredentialTemplatesRequest, + requestStream: false, + responseType: ListCredentialTemplatesResponse, + responseStream: false, + options: {}, + }, + /** Search credential templates using SQL, returning raw JSON data */ + search: { + name: "Search", + requestType: SearchCredentialTemplatesRequest, + requestStream: false, + responseType: SearchCredentialTemplatesResponse, + responseStream: false, + options: {}, + }, + /** Delete a credential template from the current ecosystem by ID */ + delete: { + name: "Delete", + requestType: DeleteCredentialTemplateRequest, + requestStream: false, + responseType: DeleteCredentialTemplateResponse, + responseStream: false, + options: {}, + }, + /** Create/update verification templates */ + createVerificationTemplate: { + name: "CreateVerificationTemplate", + requestType: CreateVerificationTemplateRequest, + requestStream: false, + responseType: CreateVerificationTemplateResponse, + responseStream: false, + options: { _unknownFields: { 480010: [new Uint8Array([4, 34, 2, 8, 1])] } }, + }, + listVerificationTemplates: { + name: "ListVerificationTemplates", + requestType: ListVerificationTemplatesRequest, + requestStream: false, + responseType: ListVerificationTemplatesResponse, + responseStream: false, + options: { _unknownFields: { 480010: [new Uint8Array([4, 34, 2, 8, 1])] } }, + }, + getVerificationTemplate: { + name: "GetVerificationTemplate", + requestType: GetVerificationTemplateRequest, + requestStream: false, + responseType: GetVerificationTemplateResponse, + responseStream: false, + options: { _unknownFields: { 480010: [new Uint8Array([4, 34, 2, 8, 1])] } }, + }, + updateVerificationTemplate: { + name: "UpdateVerificationTemplate", + requestType: UpdateVerificationTemplateRequest, + requestStream: false, + responseType: UpdateVerificationTemplateResponse, + responseStream: false, + options: { _unknownFields: { 480010: [new Uint8Array([4, 34, 2, 8, 1])] } }, + }, + deleteVerificationTemplate: { + name: "DeleteVerificationTemplate", + requestType: DeleteVerificationTemplateRequest, + requestStream: false, + responseType: DeleteVerificationTemplateResponse, + responseStream: false, + options: { _unknownFields: { 480010: [new Uint8Array([4, 34, 2, 8, 1])] } }, + }, + }, } as const; -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; function isObject(value: any): boolean { - return typeof value === "object" && value !== null; + return typeof value === "object" && value !== null; } function isSet(value: any): boolean { - return value !== null && value !== undefined; + return value !== null && value !== undefined; } diff --git a/web/src/proto/services/verifiable-credentials/v1/verifiable-credentials.ts b/web/src/proto/services/verifiable-credentials/v1/verifiable-credentials.ts index 9d907412b..11aec2df3 100644 --- a/web/src/proto/services/verifiable-credentials/v1/verifiable-credentials.ts +++ b/web/src/proto/services/verifiable-credentials/v1/verifiable-credentials.ts @@ -2,91 +2,101 @@ import _m0 from "protobufjs/minimal"; export enum SignatureType { - /** UNSPECIFIED - The signature type is not specified. The experimental signature type will be used. */ - UNSPECIFIED = 0, - /** - * STANDARD - The signature type uses EdDSA with the Ed25519 curve (NIST compliant). - * This type of signature does not support selective disclosure of attributes. - */ - STANDARD = 1, - /** - * EXPERIMENTAL - The signature type uses BBS signatures with BLS12-381 curve (experimental). - * This type of signature allows for selective disclosure of attributes. - */ - EXPERIMENTAL = 2, - UNRECOGNIZED = -1, + /** UNSPECIFIED - The signature type is not specified. The experimental signature type will be used. */ + UNSPECIFIED = 0, + /** + * STANDARD - The signature type uses EdDSA with the Ed25519 curve (NIST compliant). + * This type of signature does not support selective disclosure of attributes. + */ + STANDARD = 1, + /** + * EXPERIMENTAL - The signature type uses BBS signatures with BLS12-381 curve (experimental). + * This type of signature allows for selective disclosure of attributes. + */ + EXPERIMENTAL = 2, + UNRECOGNIZED = -1, } export function signatureTypeFromJSON(object: any): SignatureType { - switch (object) { - case 0: - case "UNSPECIFIED": - return SignatureType.UNSPECIFIED; - case 1: - case "STANDARD": - return SignatureType.STANDARD; - case 2: - case "EXPERIMENTAL": - return SignatureType.EXPERIMENTAL; - case -1: - case "UNRECOGNIZED": - default: - return SignatureType.UNRECOGNIZED; - } + switch (object) { + case 0: + case "UNSPECIFIED": + return SignatureType.UNSPECIFIED; + case 1: + case "STANDARD": + return SignatureType.STANDARD; + case 2: + case "EXPERIMENTAL": + return SignatureType.EXPERIMENTAL; + case -1: + case "UNRECOGNIZED": + default: + return SignatureType.UNRECOGNIZED; + } } export function signatureTypeToJSON(object: SignatureType): string { - switch (object) { - case SignatureType.UNSPECIFIED: - return "UNSPECIFIED"; - case SignatureType.STANDARD: - return "STANDARD"; - case SignatureType.EXPERIMENTAL: - return "EXPERIMENTAL"; - case SignatureType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } + switch (object) { + case SignatureType.UNSPECIFIED: + return "UNSPECIFIED"; + case SignatureType.STANDARD: + return "STANDARD"; + case SignatureType.EXPERIMENTAL: + return "EXPERIMENTAL"; + case SignatureType.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } } /** Request to create and sign a JSON-LD Verifiable Credential from a template using public key tied to caller */ export interface IssueFromTemplateRequest { - /** ID of template to use */ - templateId?: string | undefined; - /** - * JSON document string with keys corresponding to the fields of - * the template referenced by `template_id` - */ - valuesJson?: string | undefined; - /** - * Save a copy of the issued credential to this user's wallet. This copy will only contain - * the credential data, but not the secret proof value. Issuers may use this data to - * keep track of the details for revocation status. - */ - saveCopy?: boolean | undefined; - /** - * The ISO8601 expiration UTC date of the credential. This is a reserved field in the VC specification. - * If specified, the issued credential will contain an expiration date. - * https://www.w3.org/TR/vc-data-model/#expiration - */ - expirationDate?: string | undefined; - /** - * If true, the issued credential will contain an attestation of the issuer's membership in the ecosystem's - * governance framework. - */ - includeGovernance?: boolean | undefined; - /** The type of signature to use when signing the credential. Defaults to `EXPERIMENTAL`. */ - signatureType?: SignatureType | undefined; + /** ID of template to use */ + templateId?: + | string + | undefined; + /** + * JSON document string with keys corresponding to the fields of + * the template referenced by `template_id` + */ + valuesJson?: + | string + | undefined; + /** + * Save a copy of the issued credential to this user's wallet. This copy will only contain + * the credential data, but not the secret proof value. Issuers may use this data to + * keep track of the details for revocation status. + */ + saveCopy?: + | boolean + | undefined; + /** + * The ISO8601 expiration UTC date of the credential. This is a reserved field in the VC specification. + * If specified, the issued credential will contain an expiration date. + * https://www.w3.org/TR/vc-data-model/#expiration + */ + expirationDate?: + | string + | undefined; + /** + * If true, the issued credential will contain an attestation of the issuer's membership in the ecosystem's + * governance framework. + */ + includeGovernance?: + | boolean + | undefined; + /** The type of signature to use when signing the credential. Defaults to `EXPERIMENTAL`. */ + signatureType?: SignatureType | undefined; } /** Response to `IssueFromTemplateRequest` */ export interface IssueFromTemplateResponse { - /** - * Verifiable Credential document, in JSON-LD form, - * constructed from the specified template and values; signed - * with public key tied to caller of `IssueFromTemplateRequest` - */ - documentJson?: string | undefined; + /** + * Verifiable Credential document, in JSON-LD form, + * constructed from the specified template and values; signed + * with public key tied to caller of `IssueFromTemplateRequest` + */ + documentJson?: string | undefined; } /** @@ -94,2358 +104,2070 @@ export interface IssueFromTemplateResponse { * Either `item_id`, or `document_json` may be provided, not both. */ export interface CreateProofRequest { - /** - * A valid JSON-LD frame describing which fields should be - * revealed in the generated proof. - * If unspecified, all fields in the document will be revealed - */ - revealDocumentJson?: string | undefined; - /** Information about what sections of the document to reveal */ - revealTemplate?: RevealTemplateAttributes | undefined; - /** Id of verification template with which to construct the JSON-LD proof document */ - verificationTemplateId?: string | undefined; - /** ID of wallet item stored in a Trinsic cloud wallet */ - itemId?: string | undefined; - /** - * A valid JSON-LD Verifiable Credential document string - * with an unbound signature. The proof will be derived from this - * document directly. The document will not be stored in the wallet. - */ - documentJson?: string | undefined; - /** - * Wrap the output in a verifiable presentation. - * If the credential used in the proof is bound to the holder DID, - * the output will always use a verifiable presentation and this field will be ignored. - */ - useVerifiablePresentation?: boolean | undefined; - /** - * Nonce value used to derive the proof. If not specified, a random nonce will be generated. - * This value may be represented in base64 format in the proof model. - */ - nonce?: Uint8Array | undefined; + /** + * A valid JSON-LD frame describing which fields should be + * revealed in the generated proof. + * If unspecified, all fields in the document will be revealed + */ + revealDocumentJson?: + | string + | undefined; + /** Information about what sections of the document to reveal */ + revealTemplate?: + | RevealTemplateAttributes + | undefined; + /** Id of verification template with which to construct the JSON-LD proof document */ + verificationTemplateId?: + | string + | undefined; + /** ID of wallet item stored in a Trinsic cloud wallet */ + itemId?: + | string + | undefined; + /** + * A valid JSON-LD Verifiable Credential document string + * with an unbound signature. The proof will be derived from this + * document directly. The document will not be stored in the wallet. + */ + documentJson?: + | string + | undefined; + /** + * Wrap the output in a verifiable presentation. + * If the credential used in the proof is bound to the holder DID, + * the output will always use a verifiable presentation and this field will be ignored. + */ + useVerifiablePresentation?: + | boolean + | undefined; + /** + * Nonce value used to derive the proof. If not specified, a random nonce will be generated. + * This value may be represented in base64 format in the proof model. + */ + nonce?: Uint8Array | undefined; } export interface RevealTemplateAttributes { - /** A list of document attributes to reveal. If unset, all attributes will be returned. */ - templateAttributes?: string[] | undefined; + /** A list of document attributes to reveal. If unset, all attributes will be returned. */ + templateAttributes?: string[] | undefined; } /** Response to `CreateProofRequest` */ export interface CreateProofResponse { - /** Valid JSON-LD proof for the specified credential */ - proofDocumentJson?: string | undefined; + /** Valid JSON-LD proof for the specified credential */ + proofDocumentJson?: string | undefined; } /** Request to verify a proof */ export interface VerifyProofRequest { - /** JSON-LD proof document string to verify */ - proofDocumentJson?: string | undefined; + /** JSON-LD proof document string to verify */ + proofDocumentJson?: string | undefined; } /** Response to `VerifyProofRequest` */ export interface VerifyProofResponse { - /** Whether all validations in `validation_results` passed */ - isValid?: boolean | undefined; - /** - * Results of each validation check performed, - * such as schema conformance, revocation status, signature, etc. - * Detailed results are provided for failed validations. - */ - validationResults?: { [key: string]: ValidationMessage } | undefined; + /** Whether all validations in `validation_results` passed */ + isValid?: + | boolean + | undefined; + /** + * Results of each validation check performed, + * such as schema conformance, revocation status, signature, etc. + * Detailed results are provided for failed validations. + */ + validationResults?: { [key: string]: ValidationMessage } | undefined; } export interface VerifyProofResponse_ValidationResultsEntry { - key: string; - value?: ValidationMessage | undefined; + key: string; + value?: ValidationMessage | undefined; } /** Result of a validation check on a proof */ export interface ValidationMessage { - /** Whether this validation check passed */ - isValid?: boolean | undefined; - /** If validation failed, contains messages explaining why */ - messages?: string[] | undefined; + /** Whether this validation check passed */ + isValid?: + | boolean + | undefined; + /** If validation failed, contains messages explaining why */ + messages?: string[] | undefined; } /** Request to send a document to another user's wallet */ export interface SendRequest { - /** Email address of user to whom you'll send the item */ - email?: string | undefined; - /** Wallet ID of the recipient within the ecosystem */ - walletId?: string | undefined; - /** DID URI of the recipient */ - didUri?: string | undefined; - /** SMS of user to whom you'll send the item */ - phoneNumber?: string | undefined; - /** Send email notification that credential has been sent to a wallet */ - sendNotification?: boolean | undefined; - /** JSON document to send to recipient */ - documentJson?: string | undefined; + /** Email address of user to whom you'll send the item */ + email?: + | string + | undefined; + /** Wallet ID of the recipient within the ecosystem */ + walletId?: + | string + | undefined; + /** DID URI of the recipient */ + didUri?: + | string + | undefined; + /** SMS of user to whom you'll send the item */ + phoneNumber?: + | string + | undefined; + /** Send email notification that credential has been sent to a wallet */ + sendNotification?: + | boolean + | undefined; + /** JSON document to send to recipient */ + documentJson?: string | undefined; } /** Response to `SendRequest` */ -export interface SendResponse {} +export interface SendResponse { +} /** Request to update a credential's revocation status */ export interface UpdateStatusRequest { - /** Credential Status ID to update. This is not the same as the credential's ID. */ - credentialStatusId?: string | undefined; - /** New revocation status of credential */ - revoked?: boolean | undefined; + /** Credential Status ID to update. This is not the same as the credential's ID. */ + credentialStatusId?: + | string + | undefined; + /** New revocation status of credential */ + revoked?: boolean | undefined; } /** Response to `UpdateStatusRequest` */ -export interface UpdateStatusResponse {} +export interface UpdateStatusResponse { +} /** Request to check a credential's revocation status */ export interface CheckStatusRequest { - /** Credential Status ID to check. This is not the same as the credential's ID. */ - credentialStatusId?: string | undefined; + /** Credential Status ID to check. This is not the same as the credential's ID. */ + credentialStatusId?: string | undefined; } /** Response to `CheckStatusRequest` */ export interface CheckStatusResponse { - /** The credential's revocation status */ - revoked?: boolean | undefined; + /** The credential's revocation status */ + revoked?: boolean | undefined; } export interface CreateCredentialOfferRequest { - /** ID of template to use */ - templateId?: string | undefined; - /** - * JSON document string with keys corresponding to the fields of - * the template referenced by `template_id` - */ - valuesJson?: string | undefined; - /** - * If true, the credential will be issued with holder binding by specifying - * the holder DID in the credential subject - */ - holderBinding?: boolean | undefined; - /** - * If true, the issued credential will contain an attestation of the issuer's membership in the ecosystem's - * governance framework. - */ - includeGovernance?: boolean | undefined; - /** - * If true, a short URL link will be generated that can be used to share the credential offer with the holder. - * This link will point to the credential offer in the wallet app. - */ - generateShareUrl?: boolean | undefined; - /** The type of signature to use when signing the credential. Defaults to `EXPERIMENTAL`. */ - signatureType?: SignatureType | undefined; + /** ID of template to use */ + templateId?: + | string + | undefined; + /** + * JSON document string with keys corresponding to the fields of + * the template referenced by `template_id` + */ + valuesJson?: + | string + | undefined; + /** + * If true, the credential will be issued with holder binding by specifying + * the holder DID in the credential subject + */ + holderBinding?: + | boolean + | undefined; + /** + * If true, the issued credential will contain an attestation of the issuer's membership in the ecosystem's + * governance framework. + */ + includeGovernance?: + | boolean + | undefined; + /** + * If true, a short URL link will be generated that can be used to share the credential offer with the holder. + * This link will point to the credential offer in the wallet app. + */ + generateShareUrl?: + | boolean + | undefined; + /** The type of signature to use when signing the credential. Defaults to `EXPERIMENTAL`. */ + signatureType?: SignatureType | undefined; } export interface CreateCredentialOfferResponse { - /** The JSON document that contains the credential offer */ - documentJson?: string | undefined; - /** - * If requested, a URL that can be used to share the credential offer with the holder. - * This is a short URL that can be used in a QR code and will redirect the - * holder to the credential offer using the wallet app. - */ - shareUrl?: string | undefined; + /** The JSON document that contains the credential offer */ + documentJson?: + | string + | undefined; + /** + * If requested, a URL that can be used to share the credential offer with the holder. + * This is a short URL that can be used in a QR code and will redirect the + * holder to the credential offer using the wallet app. + */ + shareUrl?: string | undefined; } export interface AcceptCredentialRequest { - /** The JSON document that contains the credential offer */ - documentJson?: string | undefined; - /** The ID of the item in the wallet that contains the credential offer */ - itemId?: string | undefined; + /** The JSON document that contains the credential offer */ + documentJson?: + | string + | undefined; + /** The ID of the item in the wallet that contains the credential offer */ + itemId?: string | undefined; } export interface AcceptCredentialResponse { - /** The ID of the item in the wallet that contains the issued credential */ - itemId?: string | undefined; - /** - * The JSON document that contains the issued credential. - * This item is already stored in the wallet. - */ - documentJson?: string | undefined; + /** The ID of the item in the wallet that contains the issued credential */ + itemId?: + | string + | undefined; + /** + * The JSON document that contains the issued credential. + * This item is already stored in the wallet. + */ + documentJson?: string | undefined; } export interface RejectCredentialRequest { - /** The JSON document that contains the credential offer */ - documentJson?: string | undefined; - /** The ID of the item in the wallet that contains the credential offer */ - itemId?: string | undefined; + /** The JSON document that contains the credential offer */ + documentJson?: + | string + | undefined; + /** The ID of the item in the wallet that contains the credential offer */ + itemId?: string | undefined; } -export interface RejectCredentialResponse {} +export interface RejectCredentialResponse { +} function createBaseIssueFromTemplateRequest(): IssueFromTemplateRequest { - return { - templateId: "", - valuesJson: "", - saveCopy: false, - expirationDate: "", - includeGovernance: false, - signatureType: 0, - }; + return { + templateId: "", + valuesJson: "", + saveCopy: false, + expirationDate: "", + includeGovernance: false, + signatureType: 0, + }; } export const IssueFromTemplateRequest = { - encode( - message: IssueFromTemplateRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.templateId !== undefined && message.templateId !== "") { - writer.uint32(10).string(message.templateId); - } - if (message.valuesJson !== undefined && message.valuesJson !== "") { - writer.uint32(18).string(message.valuesJson); - } - if (message.saveCopy === true) { - writer.uint32(32).bool(message.saveCopy); - } - if ( - message.expirationDate !== undefined && - message.expirationDate !== "" - ) { - writer.uint32(42).string(message.expirationDate); - } - if (message.includeGovernance === true) { - writer.uint32(48).bool(message.includeGovernance); - } - if ( - message.signatureType !== undefined && - message.signatureType !== 0 - ) { - writer.uint32(56).int32(message.signatureType); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): IssueFromTemplateRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseIssueFromTemplateRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.templateId = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.valuesJson = reader.string(); - continue; - case 4: - if (tag !== 32) { - break; - } - - message.saveCopy = reader.bool(); - continue; - case 5: - if (tag !== 42) { - break; - } - - message.expirationDate = reader.string(); - continue; - case 6: - if (tag !== 48) { - break; - } - - message.includeGovernance = reader.bool(); - continue; - case 7: - if (tag !== 56) { - break; - } - - message.signatureType = reader.int32() as any; - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: IssueFromTemplateRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.templateId !== undefined && message.templateId !== "") { + writer.uint32(10).string(message.templateId); + } + if (message.valuesJson !== undefined && message.valuesJson !== "") { + writer.uint32(18).string(message.valuesJson); + } + if (message.saveCopy === true) { + writer.uint32(32).bool(message.saveCopy); + } + if (message.expirationDate !== undefined && message.expirationDate !== "") { + writer.uint32(42).string(message.expirationDate); + } + if (message.includeGovernance === true) { + writer.uint32(48).bool(message.includeGovernance); + } + if (message.signatureType !== undefined && message.signatureType !== 0) { + writer.uint32(56).int32(message.signatureType); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): IssueFromTemplateRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseIssueFromTemplateRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - fromJSON(object: any): IssueFromTemplateRequest { - return { - templateId: isSet(object.templateId) - ? String(object.templateId) - : "", - valuesJson: isSet(object.valuesJson) - ? String(object.valuesJson) - : "", - saveCopy: isSet(object.saveCopy) ? Boolean(object.saveCopy) : false, - expirationDate: isSet(object.expirationDate) - ? String(object.expirationDate) - : "", - includeGovernance: isSet(object.includeGovernance) - ? Boolean(object.includeGovernance) - : false, - signatureType: isSet(object.signatureType) - ? signatureTypeFromJSON(object.signatureType) - : 0, - }; - }, + message.templateId = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.valuesJson = reader.string(); + continue; + case 4: + if (tag !== 32) { + break; + } + + message.saveCopy = reader.bool(); + continue; + case 5: + if (tag !== 42) { + break; + } + + message.expirationDate = reader.string(); + continue; + case 6: + if (tag !== 48) { + break; + } + + message.includeGovernance = reader.bool(); + continue; + case 7: + if (tag !== 56) { + break; + } + + message.signatureType = reader.int32() as any; + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: IssueFromTemplateRequest): unknown { - const obj: any = {}; - if (message.templateId !== undefined && message.templateId !== "") { - obj.templateId = message.templateId; - } - if (message.valuesJson !== undefined && message.valuesJson !== "") { - obj.valuesJson = message.valuesJson; - } - if (message.saveCopy === true) { - obj.saveCopy = message.saveCopy; - } - if ( - message.expirationDate !== undefined && - message.expirationDate !== "" - ) { - obj.expirationDate = message.expirationDate; - } - if (message.includeGovernance === true) { - obj.includeGovernance = message.includeGovernance; - } - if ( - message.signatureType !== undefined && - message.signatureType !== 0 - ) { - obj.signatureType = signatureTypeToJSON(message.signatureType); - } - return obj; - }, + fromJSON(object: any): IssueFromTemplateRequest { + return { + templateId: isSet(object.templateId) ? String(object.templateId) : "", + valuesJson: isSet(object.valuesJson) ? String(object.valuesJson) : "", + saveCopy: isSet(object.saveCopy) ? Boolean(object.saveCopy) : false, + expirationDate: isSet(object.expirationDate) ? String(object.expirationDate) : "", + includeGovernance: isSet(object.includeGovernance) ? Boolean(object.includeGovernance) : false, + signatureType: isSet(object.signatureType) ? signatureTypeFromJSON(object.signatureType) : 0, + }; + }, - create( - base?: DeepPartial, - ): IssueFromTemplateRequest { - return IssueFromTemplateRequest.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): IssueFromTemplateRequest { - const message = createBaseIssueFromTemplateRequest(); - message.templateId = object.templateId ?? ""; - message.valuesJson = object.valuesJson ?? ""; - message.saveCopy = object.saveCopy ?? false; - message.expirationDate = object.expirationDate ?? ""; - message.includeGovernance = object.includeGovernance ?? false; - message.signatureType = object.signatureType ?? 0; - return message; - }, + toJSON(message: IssueFromTemplateRequest): unknown { + const obj: any = {}; + if (message.templateId !== undefined && message.templateId !== "") { + obj.templateId = message.templateId; + } + if (message.valuesJson !== undefined && message.valuesJson !== "") { + obj.valuesJson = message.valuesJson; + } + if (message.saveCopy === true) { + obj.saveCopy = message.saveCopy; + } + if (message.expirationDate !== undefined && message.expirationDate !== "") { + obj.expirationDate = message.expirationDate; + } + if (message.includeGovernance === true) { + obj.includeGovernance = message.includeGovernance; + } + if (message.signatureType !== undefined && message.signatureType !== 0) { + obj.signatureType = signatureTypeToJSON(message.signatureType); + } + return obj; + }, + + create(base?: DeepPartial): IssueFromTemplateRequest { + return IssueFromTemplateRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): IssueFromTemplateRequest { + const message = createBaseIssueFromTemplateRequest(); + message.templateId = object.templateId ?? ""; + message.valuesJson = object.valuesJson ?? ""; + message.saveCopy = object.saveCopy ?? false; + message.expirationDate = object.expirationDate ?? ""; + message.includeGovernance = object.includeGovernance ?? false; + message.signatureType = object.signatureType ?? 0; + return message; + }, }; function createBaseIssueFromTemplateResponse(): IssueFromTemplateResponse { - return { documentJson: "" }; + return { documentJson: "" }; } export const IssueFromTemplateResponse = { - encode( - message: IssueFromTemplateResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.documentJson !== undefined && message.documentJson !== "") { - writer.uint32(10).string(message.documentJson); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): IssueFromTemplateResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseIssueFromTemplateResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.documentJson = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): IssueFromTemplateResponse { - return { - documentJson: isSet(object.documentJson) - ? String(object.documentJson) - : "", - }; - }, + encode(message: IssueFromTemplateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.documentJson !== undefined && message.documentJson !== "") { + writer.uint32(10).string(message.documentJson); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): IssueFromTemplateResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseIssueFromTemplateResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.documentJson = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: IssueFromTemplateResponse): unknown { - const obj: any = {}; - if (message.documentJson !== undefined && message.documentJson !== "") { - obj.documentJson = message.documentJson; - } - return obj; - }, + fromJSON(object: any): IssueFromTemplateResponse { + return { documentJson: isSet(object.documentJson) ? String(object.documentJson) : "" }; + }, - create( - base?: DeepPartial, - ): IssueFromTemplateResponse { - return IssueFromTemplateResponse.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): IssueFromTemplateResponse { - const message = createBaseIssueFromTemplateResponse(); - message.documentJson = object.documentJson ?? ""; - return message; - }, + toJSON(message: IssueFromTemplateResponse): unknown { + const obj: any = {}; + if (message.documentJson !== undefined && message.documentJson !== "") { + obj.documentJson = message.documentJson; + } + return obj; + }, + + create(base?: DeepPartial): IssueFromTemplateResponse { + return IssueFromTemplateResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): IssueFromTemplateResponse { + const message = createBaseIssueFromTemplateResponse(); + message.documentJson = object.documentJson ?? ""; + return message; + }, }; function createBaseCreateProofRequest(): CreateProofRequest { - return { - revealDocumentJson: undefined, - revealTemplate: undefined, - verificationTemplateId: undefined, - itemId: undefined, - documentJson: undefined, - useVerifiablePresentation: false, - nonce: new Uint8Array(0), - }; + return { + revealDocumentJson: undefined, + revealTemplate: undefined, + verificationTemplateId: undefined, + itemId: undefined, + documentJson: undefined, + useVerifiablePresentation: false, + nonce: new Uint8Array(0), + }; } export const CreateProofRequest = { - encode( - message: CreateProofRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.revealDocumentJson !== undefined) { - writer.uint32(10).string(message.revealDocumentJson); - } - if (message.revealTemplate !== undefined) { - RevealTemplateAttributes.encode( - message.revealTemplate, - writer.uint32(90).fork(), - ).ldelim(); - } - if (message.verificationTemplateId !== undefined) { - writer.uint32(98).string(message.verificationTemplateId); - } - if (message.itemId !== undefined) { - writer.uint32(18).string(message.itemId); - } - if (message.documentJson !== undefined) { - writer.uint32(26).string(message.documentJson); - } - if (message.useVerifiablePresentation === true) { - writer.uint32(32).bool(message.useVerifiablePresentation); - } - if (message.nonce !== undefined && message.nonce.length !== 0) { - writer.uint32(82).bytes(message.nonce); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): CreateProofRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCreateProofRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.revealDocumentJson = reader.string(); - continue; - case 11: - if (tag !== 90) { - break; - } - - message.revealTemplate = RevealTemplateAttributes.decode( - reader, - reader.uint32(), - ); - continue; - case 12: - if (tag !== 98) { - break; - } - - message.verificationTemplateId = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.itemId = reader.string(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.documentJson = reader.string(); - continue; - case 4: - if (tag !== 32) { - break; - } - - message.useVerifiablePresentation = reader.bool(); - continue; - case 10: - if (tag !== 82) { - break; - } - - message.nonce = reader.bytes(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): CreateProofRequest { - return { - revealDocumentJson: isSet(object.revealDocumentJson) - ? String(object.revealDocumentJson) - : undefined, - revealTemplate: isSet(object.revealTemplate) - ? RevealTemplateAttributes.fromJSON(object.revealTemplate) - : undefined, - verificationTemplateId: isSet(object.verificationTemplateId) - ? String(object.verificationTemplateId) - : undefined, - itemId: isSet(object.itemId) ? String(object.itemId) : undefined, - documentJson: isSet(object.documentJson) - ? String(object.documentJson) - : undefined, - useVerifiablePresentation: isSet(object.useVerifiablePresentation) - ? Boolean(object.useVerifiablePresentation) - : false, - nonce: isSet(object.nonce) - ? bytesFromBase64(object.nonce) - : new Uint8Array(0), - }; - }, + encode(message: CreateProofRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.revealDocumentJson !== undefined) { + writer.uint32(10).string(message.revealDocumentJson); + } + if (message.revealTemplate !== undefined) { + RevealTemplateAttributes.encode(message.revealTemplate, writer.uint32(90).fork()).ldelim(); + } + if (message.verificationTemplateId !== undefined) { + writer.uint32(98).string(message.verificationTemplateId); + } + if (message.itemId !== undefined) { + writer.uint32(18).string(message.itemId); + } + if (message.documentJson !== undefined) { + writer.uint32(26).string(message.documentJson); + } + if (message.useVerifiablePresentation === true) { + writer.uint32(32).bool(message.useVerifiablePresentation); + } + if (message.nonce !== undefined && message.nonce.length !== 0) { + writer.uint32(82).bytes(message.nonce); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): CreateProofRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCreateProofRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.revealDocumentJson = reader.string(); + continue; + case 11: + if (tag !== 90) { + break; + } + + message.revealTemplate = RevealTemplateAttributes.decode(reader, reader.uint32()); + continue; + case 12: + if (tag !== 98) { + break; + } + + message.verificationTemplateId = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.itemId = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.documentJson = reader.string(); + continue; + case 4: + if (tag !== 32) { + break; + } + + message.useVerifiablePresentation = reader.bool(); + continue; + case 10: + if (tag !== 82) { + break; + } + + message.nonce = reader.bytes(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: CreateProofRequest): unknown { - const obj: any = {}; - if (message.revealDocumentJson !== undefined) { - obj.revealDocumentJson = message.revealDocumentJson; - } - if (message.revealTemplate !== undefined) { - obj.revealTemplate = RevealTemplateAttributes.toJSON( - message.revealTemplate, - ); - } - if (message.verificationTemplateId !== undefined) { - obj.verificationTemplateId = message.verificationTemplateId; - } - if (message.itemId !== undefined) { - obj.itemId = message.itemId; - } - if (message.documentJson !== undefined) { - obj.documentJson = message.documentJson; - } - if (message.useVerifiablePresentation === true) { - obj.useVerifiablePresentation = message.useVerifiablePresentation; - } - if (message.nonce !== undefined && message.nonce.length !== 0) { - obj.nonce = base64FromBytes(message.nonce); - } - return obj; - }, + fromJSON(object: any): CreateProofRequest { + return { + revealDocumentJson: isSet(object.revealDocumentJson) ? String(object.revealDocumentJson) : undefined, + revealTemplate: isSet(object.revealTemplate) + ? RevealTemplateAttributes.fromJSON(object.revealTemplate) + : undefined, + verificationTemplateId: isSet(object.verificationTemplateId) ? String(object.verificationTemplateId) : undefined, + itemId: isSet(object.itemId) ? String(object.itemId) : undefined, + documentJson: isSet(object.documentJson) ? String(object.documentJson) : undefined, + useVerifiablePresentation: isSet(object.useVerifiablePresentation) + ? Boolean(object.useVerifiablePresentation) + : false, + nonce: isSet(object.nonce) ? bytesFromBase64(object.nonce) : new Uint8Array(0), + }; + }, - create(base?: DeepPartial): CreateProofRequest { - return CreateProofRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): CreateProofRequest { - const message = createBaseCreateProofRequest(); - message.revealDocumentJson = object.revealDocumentJson ?? undefined; - message.revealTemplate = - object.revealTemplate !== undefined && - object.revealTemplate !== null - ? RevealTemplateAttributes.fromPartial(object.revealTemplate) - : undefined; - message.verificationTemplateId = - object.verificationTemplateId ?? undefined; - message.itemId = object.itemId ?? undefined; - message.documentJson = object.documentJson ?? undefined; - message.useVerifiablePresentation = - object.useVerifiablePresentation ?? false; - message.nonce = object.nonce ?? new Uint8Array(0); - return message; - }, + toJSON(message: CreateProofRequest): unknown { + const obj: any = {}; + if (message.revealDocumentJson !== undefined) { + obj.revealDocumentJson = message.revealDocumentJson; + } + if (message.revealTemplate !== undefined) { + obj.revealTemplate = RevealTemplateAttributes.toJSON(message.revealTemplate); + } + if (message.verificationTemplateId !== undefined) { + obj.verificationTemplateId = message.verificationTemplateId; + } + if (message.itemId !== undefined) { + obj.itemId = message.itemId; + } + if (message.documentJson !== undefined) { + obj.documentJson = message.documentJson; + } + if (message.useVerifiablePresentation === true) { + obj.useVerifiablePresentation = message.useVerifiablePresentation; + } + if (message.nonce !== undefined && message.nonce.length !== 0) { + obj.nonce = base64FromBytes(message.nonce); + } + return obj; + }, + + create(base?: DeepPartial): CreateProofRequest { + return CreateProofRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): CreateProofRequest { + const message = createBaseCreateProofRequest(); + message.revealDocumentJson = object.revealDocumentJson ?? undefined; + message.revealTemplate = (object.revealTemplate !== undefined && object.revealTemplate !== null) + ? RevealTemplateAttributes.fromPartial(object.revealTemplate) + : undefined; + message.verificationTemplateId = object.verificationTemplateId ?? undefined; + message.itemId = object.itemId ?? undefined; + message.documentJson = object.documentJson ?? undefined; + message.useVerifiablePresentation = object.useVerifiablePresentation ?? false; + message.nonce = object.nonce ?? new Uint8Array(0); + return message; + }, }; function createBaseRevealTemplateAttributes(): RevealTemplateAttributes { - return { templateAttributes: [] }; + return { templateAttributes: [] }; } export const RevealTemplateAttributes = { - encode( - message: RevealTemplateAttributes, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if ( - message.templateAttributes !== undefined && - message.templateAttributes.length !== 0 - ) { - for (const v of message.templateAttributes) { - writer.uint32(10).string(v!); - } - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): RevealTemplateAttributes { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRevealTemplateAttributes(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.templateAttributes!.push(reader.string()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): RevealTemplateAttributes { - return { - templateAttributes: Array.isArray(object?.templateAttributes) - ? object.templateAttributes.map((e: any) => String(e)) - : [], - }; - }, + encode(message: RevealTemplateAttributes, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.templateAttributes !== undefined && message.templateAttributes.length !== 0) { + for (const v of message.templateAttributes) { + writer.uint32(10).string(v!); + } + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): RevealTemplateAttributes { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseRevealTemplateAttributes(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.templateAttributes!.push(reader.string()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: RevealTemplateAttributes): unknown { - const obj: any = {}; - if (message.templateAttributes?.length) { - obj.templateAttributes = message.templateAttributes; - } - return obj; - }, + fromJSON(object: any): RevealTemplateAttributes { + return { + templateAttributes: Array.isArray(object?.templateAttributes) + ? object.templateAttributes.map((e: any) => String(e)) + : [], + }; + }, - create( - base?: DeepPartial, - ): RevealTemplateAttributes { - return RevealTemplateAttributes.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): RevealTemplateAttributes { - const message = createBaseRevealTemplateAttributes(); - message.templateAttributes = - object.templateAttributes?.map((e) => e) || []; - return message; - }, + toJSON(message: RevealTemplateAttributes): unknown { + const obj: any = {}; + if (message.templateAttributes?.length) { + obj.templateAttributes = message.templateAttributes; + } + return obj; + }, + + create(base?: DeepPartial): RevealTemplateAttributes { + return RevealTemplateAttributes.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): RevealTemplateAttributes { + const message = createBaseRevealTemplateAttributes(); + message.templateAttributes = object.templateAttributes?.map((e) => e) || []; + return message; + }, }; function createBaseCreateProofResponse(): CreateProofResponse { - return { proofDocumentJson: "" }; + return { proofDocumentJson: "" }; } export const CreateProofResponse = { - encode( - message: CreateProofResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if ( - message.proofDocumentJson !== undefined && - message.proofDocumentJson !== "" - ) { - writer.uint32(10).string(message.proofDocumentJson); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): CreateProofResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCreateProofResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.proofDocumentJson = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): CreateProofResponse { - return { - proofDocumentJson: isSet(object.proofDocumentJson) - ? String(object.proofDocumentJson) - : "", - }; - }, + encode(message: CreateProofResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.proofDocumentJson !== undefined && message.proofDocumentJson !== "") { + writer.uint32(10).string(message.proofDocumentJson); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): CreateProofResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCreateProofResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.proofDocumentJson = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: CreateProofResponse): unknown { - const obj: any = {}; - if ( - message.proofDocumentJson !== undefined && - message.proofDocumentJson !== "" - ) { - obj.proofDocumentJson = message.proofDocumentJson; - } - return obj; - }, + fromJSON(object: any): CreateProofResponse { + return { proofDocumentJson: isSet(object.proofDocumentJson) ? String(object.proofDocumentJson) : "" }; + }, - create(base?: DeepPartial): CreateProofResponse { - return CreateProofResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): CreateProofResponse { - const message = createBaseCreateProofResponse(); - message.proofDocumentJson = object.proofDocumentJson ?? ""; - return message; - }, + toJSON(message: CreateProofResponse): unknown { + const obj: any = {}; + if (message.proofDocumentJson !== undefined && message.proofDocumentJson !== "") { + obj.proofDocumentJson = message.proofDocumentJson; + } + return obj; + }, + + create(base?: DeepPartial): CreateProofResponse { + return CreateProofResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): CreateProofResponse { + const message = createBaseCreateProofResponse(); + message.proofDocumentJson = object.proofDocumentJson ?? ""; + return message; + }, }; function createBaseVerifyProofRequest(): VerifyProofRequest { - return { proofDocumentJson: "" }; + return { proofDocumentJson: "" }; } export const VerifyProofRequest = { - encode( - message: VerifyProofRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if ( - message.proofDocumentJson !== undefined && - message.proofDocumentJson !== "" - ) { - writer.uint32(10).string(message.proofDocumentJson); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): VerifyProofRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseVerifyProofRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.proofDocumentJson = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): VerifyProofRequest { - return { - proofDocumentJson: isSet(object.proofDocumentJson) - ? String(object.proofDocumentJson) - : "", - }; - }, + encode(message: VerifyProofRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.proofDocumentJson !== undefined && message.proofDocumentJson !== "") { + writer.uint32(10).string(message.proofDocumentJson); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): VerifyProofRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseVerifyProofRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.proofDocumentJson = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: VerifyProofRequest): unknown { - const obj: any = {}; - if ( - message.proofDocumentJson !== undefined && - message.proofDocumentJson !== "" - ) { - obj.proofDocumentJson = message.proofDocumentJson; - } - return obj; - }, + fromJSON(object: any): VerifyProofRequest { + return { proofDocumentJson: isSet(object.proofDocumentJson) ? String(object.proofDocumentJson) : "" }; + }, - create(base?: DeepPartial): VerifyProofRequest { - return VerifyProofRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): VerifyProofRequest { - const message = createBaseVerifyProofRequest(); - message.proofDocumentJson = object.proofDocumentJson ?? ""; - return message; - }, + toJSON(message: VerifyProofRequest): unknown { + const obj: any = {}; + if (message.proofDocumentJson !== undefined && message.proofDocumentJson !== "") { + obj.proofDocumentJson = message.proofDocumentJson; + } + return obj; + }, + + create(base?: DeepPartial): VerifyProofRequest { + return VerifyProofRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): VerifyProofRequest { + const message = createBaseVerifyProofRequest(); + message.proofDocumentJson = object.proofDocumentJson ?? ""; + return message; + }, }; function createBaseVerifyProofResponse(): VerifyProofResponse { - return { isValid: false, validationResults: {} }; + return { isValid: false, validationResults: {} }; } export const VerifyProofResponse = { - encode( - message: VerifyProofResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.isValid === true) { - writer.uint32(8).bool(message.isValid); - } - Object.entries(message.validationResults || {}).forEach( - ([key, value]) => { - VerifyProofResponse_ValidationResultsEntry.encode( - { key: key as any, value }, - writer.uint32(26).fork(), - ).ldelim(); - }, - ); - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): VerifyProofResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseVerifyProofResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.isValid = reader.bool(); - continue; - case 3: - if (tag !== 26) { - break; - } - - const entry3 = - VerifyProofResponse_ValidationResultsEntry.decode( - reader, - reader.uint32(), - ); - if (entry3.value !== undefined) { - message.validationResults![entry3.key] = entry3.value; - } - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): VerifyProofResponse { - return { - isValid: isSet(object.isValid) ? Boolean(object.isValid) : false, - validationResults: isObject(object.validationResults) - ? Object.entries(object.validationResults).reduce<{ - [key: string]: ValidationMessage; - }>((acc, [key, value]) => { - acc[key] = ValidationMessage.fromJSON(value); - return acc; - }, {}) - : {}, - }; - }, + encode(message: VerifyProofResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.isValid === true) { + writer.uint32(8).bool(message.isValid); + } + Object.entries(message.validationResults || {}).forEach(([key, value]) => { + VerifyProofResponse_ValidationResultsEntry.encode({ key: key as any, value }, writer.uint32(26).fork()).ldelim(); + }); + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): VerifyProofResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseVerifyProofResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.isValid = reader.bool(); + continue; + case 3: + if (tag !== 26) { + break; + } + + const entry3 = VerifyProofResponse_ValidationResultsEntry.decode(reader, reader.uint32()); + if (entry3.value !== undefined) { + message.validationResults![entry3.key] = entry3.value; + } + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: VerifyProofResponse): unknown { - const obj: any = {}; - if (message.isValid === true) { - obj.isValid = message.isValid; - } - if (message.validationResults) { - const entries = Object.entries(message.validationResults); - if (entries.length > 0) { - obj.validationResults = {}; - entries.forEach(([k, v]) => { - obj.validationResults[k] = ValidationMessage.toJSON(v); - }); - } - } - return obj; - }, + fromJSON(object: any): VerifyProofResponse { + return { + isValid: isSet(object.isValid) ? Boolean(object.isValid) : false, + validationResults: isObject(object.validationResults) + ? Object.entries(object.validationResults).reduce<{ [key: string]: ValidationMessage }>((acc, [key, value]) => { + acc[key] = ValidationMessage.fromJSON(value); + return acc; + }, {}) + : {}, + }; + }, - create(base?: DeepPartial): VerifyProofResponse { - return VerifyProofResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): VerifyProofResponse { - const message = createBaseVerifyProofResponse(); - message.isValid = object.isValid ?? false; - message.validationResults = Object.entries( - object.validationResults ?? {}, - ).reduce<{ [key: string]: ValidationMessage }>((acc, [key, value]) => { - if (value !== undefined) { - acc[key] = ValidationMessage.fromPartial(value); - } - return acc; - }, {}); - return message; - }, + toJSON(message: VerifyProofResponse): unknown { + const obj: any = {}; + if (message.isValid === true) { + obj.isValid = message.isValid; + } + if (message.validationResults) { + const entries = Object.entries(message.validationResults); + if (entries.length > 0) { + obj.validationResults = {}; + entries.forEach(([k, v]) => { + obj.validationResults[k] = ValidationMessage.toJSON(v); + }); + } + } + return obj; + }, + + create(base?: DeepPartial): VerifyProofResponse { + return VerifyProofResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): VerifyProofResponse { + const message = createBaseVerifyProofResponse(); + message.isValid = object.isValid ?? false; + message.validationResults = Object.entries(object.validationResults ?? {}).reduce< + { [key: string]: ValidationMessage } + >((acc, [key, value]) => { + if (value !== undefined) { + acc[key] = ValidationMessage.fromPartial(value); + } + return acc; + }, {}); + return message; + }, }; function createBaseVerifyProofResponse_ValidationResultsEntry(): VerifyProofResponse_ValidationResultsEntry { - return { key: "", value: undefined }; + return { key: "", value: undefined }; } export const VerifyProofResponse_ValidationResultsEntry = { - encode( - message: VerifyProofResponse_ValidationResultsEntry, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.value !== undefined) { - ValidationMessage.encode( - message.value, - writer.uint32(18).fork(), - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): VerifyProofResponse_ValidationResultsEntry { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseVerifyProofResponse_ValidationResultsEntry(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.key = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.value = ValidationMessage.decode( - reader, - reader.uint32(), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: VerifyProofResponse_ValidationResultsEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.key !== "") { + writer.uint32(10).string(message.key); + } + if (message.value !== undefined) { + ValidationMessage.encode(message.value, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): VerifyProofResponse_ValidationResultsEntry { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseVerifyProofResponse_ValidationResultsEntry(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - fromJSON(object: any): VerifyProofResponse_ValidationResultsEntry { - return { - key: isSet(object.key) ? String(object.key) : "", - value: isSet(object.value) - ? ValidationMessage.fromJSON(object.value) - : undefined, - }; - }, + message.key = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.value = ValidationMessage.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: VerifyProofResponse_ValidationResultsEntry): unknown { - const obj: any = {}; - if (message.key !== "") { - obj.key = message.key; - } - if (message.value !== undefined) { - obj.value = ValidationMessage.toJSON(message.value); - } - return obj; - }, + fromJSON(object: any): VerifyProofResponse_ValidationResultsEntry { + return { + key: isSet(object.key) ? String(object.key) : "", + value: isSet(object.value) ? ValidationMessage.fromJSON(object.value) : undefined, + }; + }, - create( - base?: DeepPartial, - ): VerifyProofResponse_ValidationResultsEntry { - return VerifyProofResponse_ValidationResultsEntry.fromPartial( - base ?? {}, - ); - }, - fromPartial( - object: DeepPartial, - ): VerifyProofResponse_ValidationResultsEntry { - const message = createBaseVerifyProofResponse_ValidationResultsEntry(); - message.key = object.key ?? ""; - message.value = - object.value !== undefined && object.value !== null - ? ValidationMessage.fromPartial(object.value) - : undefined; - return message; - }, + toJSON(message: VerifyProofResponse_ValidationResultsEntry): unknown { + const obj: any = {}; + if (message.key !== "") { + obj.key = message.key; + } + if (message.value !== undefined) { + obj.value = ValidationMessage.toJSON(message.value); + } + return obj; + }, + + create(base?: DeepPartial): VerifyProofResponse_ValidationResultsEntry { + return VerifyProofResponse_ValidationResultsEntry.fromPartial(base ?? {}); + }, + fromPartial( + object: DeepPartial, + ): VerifyProofResponse_ValidationResultsEntry { + const message = createBaseVerifyProofResponse_ValidationResultsEntry(); + message.key = object.key ?? ""; + message.value = (object.value !== undefined && object.value !== null) + ? ValidationMessage.fromPartial(object.value) + : undefined; + return message; + }, }; function createBaseValidationMessage(): ValidationMessage { - return { isValid: false, messages: [] }; + return { isValid: false, messages: [] }; } export const ValidationMessage = { - encode( - message: ValidationMessage, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.isValid === true) { - writer.uint32(8).bool(message.isValid); - } - if (message.messages !== undefined && message.messages.length !== 0) { - for (const v of message.messages) { - writer.uint32(18).string(v!); - } - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): ValidationMessage { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseValidationMessage(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.isValid = reader.bool(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.messages!.push(reader.string()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: ValidationMessage, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.isValid === true) { + writer.uint32(8).bool(message.isValid); + } + if (message.messages !== undefined && message.messages.length !== 0) { + for (const v of message.messages) { + writer.uint32(18).string(v!); + } + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ValidationMessage { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseValidationMessage(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } - fromJSON(object: any): ValidationMessage { - return { - isValid: isSet(object.isValid) ? Boolean(object.isValid) : false, - messages: Array.isArray(object?.messages) - ? object.messages.map((e: any) => String(e)) - : [], - }; - }, + message.isValid = reader.bool(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.messages!.push(reader.string()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: ValidationMessage): unknown { - const obj: any = {}; - if (message.isValid === true) { - obj.isValid = message.isValid; - } - if (message.messages?.length) { - obj.messages = message.messages; - } - return obj; - }, + fromJSON(object: any): ValidationMessage { + return { + isValid: isSet(object.isValid) ? Boolean(object.isValid) : false, + messages: Array.isArray(object?.messages) ? object.messages.map((e: any) => String(e)) : [], + }; + }, - create(base?: DeepPartial): ValidationMessage { - return ValidationMessage.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): ValidationMessage { - const message = createBaseValidationMessage(); - message.isValid = object.isValid ?? false; - message.messages = object.messages?.map((e) => e) || []; - return message; - }, + toJSON(message: ValidationMessage): unknown { + const obj: any = {}; + if (message.isValid === true) { + obj.isValid = message.isValid; + } + if (message.messages?.length) { + obj.messages = message.messages; + } + return obj; + }, + + create(base?: DeepPartial): ValidationMessage { + return ValidationMessage.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): ValidationMessage { + const message = createBaseValidationMessage(); + message.isValid = object.isValid ?? false; + message.messages = object.messages?.map((e) => e) || []; + return message; + }, }; function createBaseSendRequest(): SendRequest { - return { - email: undefined, - walletId: undefined, - didUri: undefined, - phoneNumber: undefined, - sendNotification: false, - documentJson: "", - }; + return { + email: undefined, + walletId: undefined, + didUri: undefined, + phoneNumber: undefined, + sendNotification: false, + documentJson: "", + }; } export const SendRequest = { - encode( - message: SendRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.email !== undefined) { - writer.uint32(10).string(message.email); - } - if (message.walletId !== undefined) { - writer.uint32(42).string(message.walletId); - } - if (message.didUri !== undefined) { - writer.uint32(50).string(message.didUri); - } - if (message.phoneNumber !== undefined) { - writer.uint32(58).string(message.phoneNumber); - } - if (message.sendNotification === true) { - writer.uint32(32).bool(message.sendNotification); - } - if (message.documentJson !== undefined && message.documentJson !== "") { - writer.uint32(802).string(message.documentJson); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): SendRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSendRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.email = reader.string(); - continue; - case 5: - if (tag !== 42) { - break; - } - - message.walletId = reader.string(); - continue; - case 6: - if (tag !== 50) { - break; - } - - message.didUri = reader.string(); - continue; - case 7: - if (tag !== 58) { - break; - } - - message.phoneNumber = reader.string(); - continue; - case 4: - if (tag !== 32) { - break; - } - - message.sendNotification = reader.bool(); - continue; - case 100: - if (tag !== 802) { - break; - } - - message.documentJson = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): SendRequest { - return { - email: isSet(object.email) ? String(object.email) : undefined, - walletId: isSet(object.walletId) - ? String(object.walletId) - : undefined, - didUri: isSet(object.didUri) ? String(object.didUri) : undefined, - phoneNumber: isSet(object.phoneNumber) - ? String(object.phoneNumber) - : undefined, - sendNotification: isSet(object.sendNotification) - ? Boolean(object.sendNotification) - : false, - documentJson: isSet(object.documentJson) - ? String(object.documentJson) - : "", - }; - }, + encode(message: SendRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.email !== undefined) { + writer.uint32(10).string(message.email); + } + if (message.walletId !== undefined) { + writer.uint32(42).string(message.walletId); + } + if (message.didUri !== undefined) { + writer.uint32(50).string(message.didUri); + } + if (message.phoneNumber !== undefined) { + writer.uint32(58).string(message.phoneNumber); + } + if (message.sendNotification === true) { + writer.uint32(32).bool(message.sendNotification); + } + if (message.documentJson !== undefined && message.documentJson !== "") { + writer.uint32(802).string(message.documentJson); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): SendRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSendRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.email = reader.string(); + continue; + case 5: + if (tag !== 42) { + break; + } + + message.walletId = reader.string(); + continue; + case 6: + if (tag !== 50) { + break; + } + + message.didUri = reader.string(); + continue; + case 7: + if (tag !== 58) { + break; + } + + message.phoneNumber = reader.string(); + continue; + case 4: + if (tag !== 32) { + break; + } + + message.sendNotification = reader.bool(); + continue; + case 100: + if (tag !== 802) { + break; + } + + message.documentJson = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: SendRequest): unknown { - const obj: any = {}; - if (message.email !== undefined) { - obj.email = message.email; - } - if (message.walletId !== undefined) { - obj.walletId = message.walletId; - } - if (message.didUri !== undefined) { - obj.didUri = message.didUri; - } - if (message.phoneNumber !== undefined) { - obj.phoneNumber = message.phoneNumber; - } - if (message.sendNotification === true) { - obj.sendNotification = message.sendNotification; - } - if (message.documentJson !== undefined && message.documentJson !== "") { - obj.documentJson = message.documentJson; - } - return obj; - }, + fromJSON(object: any): SendRequest { + return { + email: isSet(object.email) ? String(object.email) : undefined, + walletId: isSet(object.walletId) ? String(object.walletId) : undefined, + didUri: isSet(object.didUri) ? String(object.didUri) : undefined, + phoneNumber: isSet(object.phoneNumber) ? String(object.phoneNumber) : undefined, + sendNotification: isSet(object.sendNotification) ? Boolean(object.sendNotification) : false, + documentJson: isSet(object.documentJson) ? String(object.documentJson) : "", + }; + }, - create(base?: DeepPartial): SendRequest { - return SendRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): SendRequest { - const message = createBaseSendRequest(); - message.email = object.email ?? undefined; - message.walletId = object.walletId ?? undefined; - message.didUri = object.didUri ?? undefined; - message.phoneNumber = object.phoneNumber ?? undefined; - message.sendNotification = object.sendNotification ?? false; - message.documentJson = object.documentJson ?? ""; - return message; - }, + toJSON(message: SendRequest): unknown { + const obj: any = {}; + if (message.email !== undefined) { + obj.email = message.email; + } + if (message.walletId !== undefined) { + obj.walletId = message.walletId; + } + if (message.didUri !== undefined) { + obj.didUri = message.didUri; + } + if (message.phoneNumber !== undefined) { + obj.phoneNumber = message.phoneNumber; + } + if (message.sendNotification === true) { + obj.sendNotification = message.sendNotification; + } + if (message.documentJson !== undefined && message.documentJson !== "") { + obj.documentJson = message.documentJson; + } + return obj; + }, + + create(base?: DeepPartial): SendRequest { + return SendRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): SendRequest { + const message = createBaseSendRequest(); + message.email = object.email ?? undefined; + message.walletId = object.walletId ?? undefined; + message.didUri = object.didUri ?? undefined; + message.phoneNumber = object.phoneNumber ?? undefined; + message.sendNotification = object.sendNotification ?? false; + message.documentJson = object.documentJson ?? ""; + return message; + }, }; function createBaseSendResponse(): SendResponse { - return {}; + return {}; } export const SendResponse = { - encode( - _: SendResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): SendResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSendResponse(); - 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): SendResponse { - return {}; - }, - - toJSON(_: SendResponse): unknown { - const obj: any = {}; - return obj; - }, + encode(_: SendResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): SendResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSendResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - create(base?: DeepPartial): SendResponse { - return SendResponse.fromPartial(base ?? {}); - }, - fromPartial(_: DeepPartial): SendResponse { - const message = createBaseSendResponse(); - return message; - }, + fromJSON(_: any): SendResponse { + return {}; + }, + + toJSON(_: SendResponse): unknown { + const obj: any = {}; + return obj; + }, + + create(base?: DeepPartial): SendResponse { + return SendResponse.fromPartial(base ?? {}); + }, + fromPartial(_: DeepPartial): SendResponse { + const message = createBaseSendResponse(); + return message; + }, }; function createBaseUpdateStatusRequest(): UpdateStatusRequest { - return { credentialStatusId: "", revoked: false }; + return { credentialStatusId: "", revoked: false }; } export const UpdateStatusRequest = { - encode( - message: UpdateStatusRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if ( - message.credentialStatusId !== undefined && - message.credentialStatusId !== "" - ) { - writer.uint32(10).string(message.credentialStatusId); - } - if (message.revoked === true) { - writer.uint32(16).bool(message.revoked); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): UpdateStatusRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateStatusRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.credentialStatusId = reader.string(); - continue; - case 2: - if (tag !== 16) { - break; - } - - message.revoked = reader.bool(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: UpdateStatusRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.credentialStatusId !== undefined && message.credentialStatusId !== "") { + writer.uint32(10).string(message.credentialStatusId); + } + if (message.revoked === true) { + writer.uint32(16).bool(message.revoked); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): UpdateStatusRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUpdateStatusRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - fromJSON(object: any): UpdateStatusRequest { - return { - credentialStatusId: isSet(object.credentialStatusId) - ? String(object.credentialStatusId) - : "", - revoked: isSet(object.revoked) ? Boolean(object.revoked) : false, - }; - }, + message.credentialStatusId = reader.string(); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.revoked = reader.bool(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: UpdateStatusRequest): unknown { - const obj: any = {}; - if ( - message.credentialStatusId !== undefined && - message.credentialStatusId !== "" - ) { - obj.credentialStatusId = message.credentialStatusId; - } - if (message.revoked === true) { - obj.revoked = message.revoked; - } - return obj; - }, + fromJSON(object: any): UpdateStatusRequest { + return { + credentialStatusId: isSet(object.credentialStatusId) ? String(object.credentialStatusId) : "", + revoked: isSet(object.revoked) ? Boolean(object.revoked) : false, + }; + }, - create(base?: DeepPartial): UpdateStatusRequest { - return UpdateStatusRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): UpdateStatusRequest { - const message = createBaseUpdateStatusRequest(); - message.credentialStatusId = object.credentialStatusId ?? ""; - message.revoked = object.revoked ?? false; - return message; - }, + toJSON(message: UpdateStatusRequest): unknown { + const obj: any = {}; + if (message.credentialStatusId !== undefined && message.credentialStatusId !== "") { + obj.credentialStatusId = message.credentialStatusId; + } + if (message.revoked === true) { + obj.revoked = message.revoked; + } + return obj; + }, + + create(base?: DeepPartial): UpdateStatusRequest { + return UpdateStatusRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): UpdateStatusRequest { + const message = createBaseUpdateStatusRequest(); + message.credentialStatusId = object.credentialStatusId ?? ""; + message.revoked = object.revoked ?? false; + return message; + }, }; function createBaseUpdateStatusResponse(): UpdateStatusResponse { - return {}; + return {}; } export const UpdateStatusResponse = { - encode( - _: UpdateStatusResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): UpdateStatusResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateStatusResponse(); - 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): UpdateStatusResponse { - return {}; - }, - - toJSON(_: UpdateStatusResponse): unknown { - const obj: any = {}; - return obj; - }, + encode(_: UpdateStatusResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): UpdateStatusResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUpdateStatusResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - create(base?: DeepPartial): UpdateStatusResponse { - return UpdateStatusResponse.fromPartial(base ?? {}); - }, - fromPartial(_: DeepPartial): UpdateStatusResponse { - const message = createBaseUpdateStatusResponse(); - return message; - }, + fromJSON(_: any): UpdateStatusResponse { + return {}; + }, + + toJSON(_: UpdateStatusResponse): unknown { + const obj: any = {}; + return obj; + }, + + create(base?: DeepPartial): UpdateStatusResponse { + return UpdateStatusResponse.fromPartial(base ?? {}); + }, + fromPartial(_: DeepPartial): UpdateStatusResponse { + const message = createBaseUpdateStatusResponse(); + return message; + }, }; function createBaseCheckStatusRequest(): CheckStatusRequest { - return { credentialStatusId: "" }; + return { credentialStatusId: "" }; } export const CheckStatusRequest = { - encode( - message: CheckStatusRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if ( - message.credentialStatusId !== undefined && - message.credentialStatusId !== "" - ) { - writer.uint32(10).string(message.credentialStatusId); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): CheckStatusRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCheckStatusRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.credentialStatusId = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): CheckStatusRequest { - return { - credentialStatusId: isSet(object.credentialStatusId) - ? String(object.credentialStatusId) - : "", - }; - }, + encode(message: CheckStatusRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.credentialStatusId !== undefined && message.credentialStatusId !== "") { + writer.uint32(10).string(message.credentialStatusId); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): CheckStatusRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCheckStatusRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.credentialStatusId = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: CheckStatusRequest): unknown { - const obj: any = {}; - if ( - message.credentialStatusId !== undefined && - message.credentialStatusId !== "" - ) { - obj.credentialStatusId = message.credentialStatusId; - } - return obj; - }, + fromJSON(object: any): CheckStatusRequest { + return { credentialStatusId: isSet(object.credentialStatusId) ? String(object.credentialStatusId) : "" }; + }, - create(base?: DeepPartial): CheckStatusRequest { - return CheckStatusRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): CheckStatusRequest { - const message = createBaseCheckStatusRequest(); - message.credentialStatusId = object.credentialStatusId ?? ""; - return message; - }, + toJSON(message: CheckStatusRequest): unknown { + const obj: any = {}; + if (message.credentialStatusId !== undefined && message.credentialStatusId !== "") { + obj.credentialStatusId = message.credentialStatusId; + } + return obj; + }, + + create(base?: DeepPartial): CheckStatusRequest { + return CheckStatusRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): CheckStatusRequest { + const message = createBaseCheckStatusRequest(); + message.credentialStatusId = object.credentialStatusId ?? ""; + return message; + }, }; function createBaseCheckStatusResponse(): CheckStatusResponse { - return { revoked: false }; + return { revoked: false }; } export const CheckStatusResponse = { - encode( - message: CheckStatusResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.revoked === true) { - writer.uint32(8).bool(message.revoked); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): CheckStatusResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCheckStatusResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.revoked = reader.bool(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): CheckStatusResponse { - return { - revoked: isSet(object.revoked) ? Boolean(object.revoked) : false, - }; - }, + encode(message: CheckStatusResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.revoked === true) { + writer.uint32(8).bool(message.revoked); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): CheckStatusResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCheckStatusResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.revoked = reader.bool(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: CheckStatusResponse): unknown { - const obj: any = {}; - if (message.revoked === true) { - obj.revoked = message.revoked; - } - return obj; - }, + fromJSON(object: any): CheckStatusResponse { + return { revoked: isSet(object.revoked) ? Boolean(object.revoked) : false }; + }, - create(base?: DeepPartial): CheckStatusResponse { - return CheckStatusResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): CheckStatusResponse { - const message = createBaseCheckStatusResponse(); - message.revoked = object.revoked ?? false; - return message; - }, + toJSON(message: CheckStatusResponse): unknown { + const obj: any = {}; + if (message.revoked === true) { + obj.revoked = message.revoked; + } + return obj; + }, + + create(base?: DeepPartial): CheckStatusResponse { + return CheckStatusResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): CheckStatusResponse { + const message = createBaseCheckStatusResponse(); + message.revoked = object.revoked ?? false; + return message; + }, }; function createBaseCreateCredentialOfferRequest(): CreateCredentialOfferRequest { - return { - templateId: "", - valuesJson: "", - holderBinding: false, - includeGovernance: false, - generateShareUrl: false, - signatureType: 0, - }; + return { + templateId: "", + valuesJson: "", + holderBinding: false, + includeGovernance: false, + generateShareUrl: false, + signatureType: 0, + }; } export const CreateCredentialOfferRequest = { - encode( - message: CreateCredentialOfferRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.templateId !== undefined && message.templateId !== "") { - writer.uint32(10).string(message.templateId); - } - if (message.valuesJson !== undefined && message.valuesJson !== "") { - writer.uint32(18).string(message.valuesJson); - } - if (message.holderBinding === true) { - writer.uint32(24).bool(message.holderBinding); - } - if (message.includeGovernance === true) { - writer.uint32(32).bool(message.includeGovernance); - } - if (message.generateShareUrl === true) { - writer.uint32(40).bool(message.generateShareUrl); - } - if ( - message.signatureType !== undefined && - message.signatureType !== 0 - ) { - writer.uint32(56).int32(message.signatureType); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): CreateCredentialOfferRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCreateCredentialOfferRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.templateId = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.valuesJson = reader.string(); - continue; - case 3: - if (tag !== 24) { - break; - } - - message.holderBinding = reader.bool(); - continue; - case 4: - if (tag !== 32) { - break; - } - - message.includeGovernance = reader.bool(); - continue; - case 5: - if (tag !== 40) { - break; - } - - message.generateShareUrl = reader.bool(); - continue; - case 7: - if (tag !== 56) { - break; - } - - message.signatureType = reader.int32() as any; - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: CreateCredentialOfferRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.templateId !== undefined && message.templateId !== "") { + writer.uint32(10).string(message.templateId); + } + if (message.valuesJson !== undefined && message.valuesJson !== "") { + writer.uint32(18).string(message.valuesJson); + } + if (message.holderBinding === true) { + writer.uint32(24).bool(message.holderBinding); + } + if (message.includeGovernance === true) { + writer.uint32(32).bool(message.includeGovernance); + } + if (message.generateShareUrl === true) { + writer.uint32(40).bool(message.generateShareUrl); + } + if (message.signatureType !== undefined && message.signatureType !== 0) { + writer.uint32(56).int32(message.signatureType); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): CreateCredentialOfferRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCreateCredentialOfferRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - fromJSON(object: any): CreateCredentialOfferRequest { - return { - templateId: isSet(object.templateId) - ? String(object.templateId) - : "", - valuesJson: isSet(object.valuesJson) - ? String(object.valuesJson) - : "", - holderBinding: isSet(object.holderBinding) - ? Boolean(object.holderBinding) - : false, - includeGovernance: isSet(object.includeGovernance) - ? Boolean(object.includeGovernance) - : false, - generateShareUrl: isSet(object.generateShareUrl) - ? Boolean(object.generateShareUrl) - : false, - signatureType: isSet(object.signatureType) - ? signatureTypeFromJSON(object.signatureType) - : 0, - }; - }, + message.templateId = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.valuesJson = reader.string(); + continue; + case 3: + if (tag !== 24) { + break; + } + + message.holderBinding = reader.bool(); + continue; + case 4: + if (tag !== 32) { + break; + } + + message.includeGovernance = reader.bool(); + continue; + case 5: + if (tag !== 40) { + break; + } + + message.generateShareUrl = reader.bool(); + continue; + case 7: + if (tag !== 56) { + break; + } + + message.signatureType = reader.int32() as any; + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: CreateCredentialOfferRequest): unknown { - const obj: any = {}; - if (message.templateId !== undefined && message.templateId !== "") { - obj.templateId = message.templateId; - } - if (message.valuesJson !== undefined && message.valuesJson !== "") { - obj.valuesJson = message.valuesJson; - } - if (message.holderBinding === true) { - obj.holderBinding = message.holderBinding; - } - if (message.includeGovernance === true) { - obj.includeGovernance = message.includeGovernance; - } - if (message.generateShareUrl === true) { - obj.generateShareUrl = message.generateShareUrl; - } - if ( - message.signatureType !== undefined && - message.signatureType !== 0 - ) { - obj.signatureType = signatureTypeToJSON(message.signatureType); - } - return obj; - }, + fromJSON(object: any): CreateCredentialOfferRequest { + return { + templateId: isSet(object.templateId) ? String(object.templateId) : "", + valuesJson: isSet(object.valuesJson) ? String(object.valuesJson) : "", + holderBinding: isSet(object.holderBinding) ? Boolean(object.holderBinding) : false, + includeGovernance: isSet(object.includeGovernance) ? Boolean(object.includeGovernance) : false, + generateShareUrl: isSet(object.generateShareUrl) ? Boolean(object.generateShareUrl) : false, + signatureType: isSet(object.signatureType) ? signatureTypeFromJSON(object.signatureType) : 0, + }; + }, - create( - base?: DeepPartial, - ): CreateCredentialOfferRequest { - return CreateCredentialOfferRequest.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): CreateCredentialOfferRequest { - const message = createBaseCreateCredentialOfferRequest(); - message.templateId = object.templateId ?? ""; - message.valuesJson = object.valuesJson ?? ""; - message.holderBinding = object.holderBinding ?? false; - message.includeGovernance = object.includeGovernance ?? false; - message.generateShareUrl = object.generateShareUrl ?? false; - message.signatureType = object.signatureType ?? 0; - return message; - }, + toJSON(message: CreateCredentialOfferRequest): unknown { + const obj: any = {}; + if (message.templateId !== undefined && message.templateId !== "") { + obj.templateId = message.templateId; + } + if (message.valuesJson !== undefined && message.valuesJson !== "") { + obj.valuesJson = message.valuesJson; + } + if (message.holderBinding === true) { + obj.holderBinding = message.holderBinding; + } + if (message.includeGovernance === true) { + obj.includeGovernance = message.includeGovernance; + } + if (message.generateShareUrl === true) { + obj.generateShareUrl = message.generateShareUrl; + } + if (message.signatureType !== undefined && message.signatureType !== 0) { + obj.signatureType = signatureTypeToJSON(message.signatureType); + } + return obj; + }, + + create(base?: DeepPartial): CreateCredentialOfferRequest { + return CreateCredentialOfferRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): CreateCredentialOfferRequest { + const message = createBaseCreateCredentialOfferRequest(); + message.templateId = object.templateId ?? ""; + message.valuesJson = object.valuesJson ?? ""; + message.holderBinding = object.holderBinding ?? false; + message.includeGovernance = object.includeGovernance ?? false; + message.generateShareUrl = object.generateShareUrl ?? false; + message.signatureType = object.signatureType ?? 0; + return message; + }, }; function createBaseCreateCredentialOfferResponse(): CreateCredentialOfferResponse { - return { documentJson: "", shareUrl: "" }; + return { documentJson: "", shareUrl: "" }; } export const CreateCredentialOfferResponse = { - encode( - message: CreateCredentialOfferResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.documentJson !== undefined && message.documentJson !== "") { - writer.uint32(10).string(message.documentJson); - } - if (message.shareUrl !== undefined && message.shareUrl !== "") { - writer.uint32(18).string(message.shareUrl); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): CreateCredentialOfferResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCreateCredentialOfferResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.documentJson = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.shareUrl = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: CreateCredentialOfferResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.documentJson !== undefined && message.documentJson !== "") { + writer.uint32(10).string(message.documentJson); + } + if (message.shareUrl !== undefined && message.shareUrl !== "") { + writer.uint32(18).string(message.shareUrl); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): CreateCredentialOfferResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCreateCredentialOfferResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - fromJSON(object: any): CreateCredentialOfferResponse { - return { - documentJson: isSet(object.documentJson) - ? String(object.documentJson) - : "", - shareUrl: isSet(object.shareUrl) ? String(object.shareUrl) : "", - }; - }, + message.documentJson = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.shareUrl = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: CreateCredentialOfferResponse): unknown { - const obj: any = {}; - if (message.documentJson !== undefined && message.documentJson !== "") { - obj.documentJson = message.documentJson; - } - if (message.shareUrl !== undefined && message.shareUrl !== "") { - obj.shareUrl = message.shareUrl; - } - return obj; - }, + fromJSON(object: any): CreateCredentialOfferResponse { + return { + documentJson: isSet(object.documentJson) ? String(object.documentJson) : "", + shareUrl: isSet(object.shareUrl) ? String(object.shareUrl) : "", + }; + }, - create( - base?: DeepPartial, - ): CreateCredentialOfferResponse { - return CreateCredentialOfferResponse.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): CreateCredentialOfferResponse { - const message = createBaseCreateCredentialOfferResponse(); - message.documentJson = object.documentJson ?? ""; - message.shareUrl = object.shareUrl ?? ""; - return message; - }, + toJSON(message: CreateCredentialOfferResponse): unknown { + const obj: any = {}; + if (message.documentJson !== undefined && message.documentJson !== "") { + obj.documentJson = message.documentJson; + } + if (message.shareUrl !== undefined && message.shareUrl !== "") { + obj.shareUrl = message.shareUrl; + } + return obj; + }, + + create(base?: DeepPartial): CreateCredentialOfferResponse { + return CreateCredentialOfferResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): CreateCredentialOfferResponse { + const message = createBaseCreateCredentialOfferResponse(); + message.documentJson = object.documentJson ?? ""; + message.shareUrl = object.shareUrl ?? ""; + return message; + }, }; function createBaseAcceptCredentialRequest(): AcceptCredentialRequest { - return { documentJson: undefined, itemId: undefined }; + return { documentJson: undefined, itemId: undefined }; } export const AcceptCredentialRequest = { - encode( - message: AcceptCredentialRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.documentJson !== undefined) { - writer.uint32(10).string(message.documentJson); - } - if (message.itemId !== undefined) { - writer.uint32(18).string(message.itemId); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): AcceptCredentialRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAcceptCredentialRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.documentJson = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.itemId = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: AcceptCredentialRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.documentJson !== undefined) { + writer.uint32(10).string(message.documentJson); + } + if (message.itemId !== undefined) { + writer.uint32(18).string(message.itemId); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): AcceptCredentialRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAcceptCredentialRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - fromJSON(object: any): AcceptCredentialRequest { - return { - documentJson: isSet(object.documentJson) - ? String(object.documentJson) - : undefined, - itemId: isSet(object.itemId) ? String(object.itemId) : undefined, - }; - }, + message.documentJson = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.itemId = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: AcceptCredentialRequest): unknown { - const obj: any = {}; - if (message.documentJson !== undefined) { - obj.documentJson = message.documentJson; - } - if (message.itemId !== undefined) { - obj.itemId = message.itemId; - } - return obj; - }, + fromJSON(object: any): AcceptCredentialRequest { + return { + documentJson: isSet(object.documentJson) ? String(object.documentJson) : undefined, + itemId: isSet(object.itemId) ? String(object.itemId) : undefined, + }; + }, - create( - base?: DeepPartial, - ): AcceptCredentialRequest { - return AcceptCredentialRequest.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): AcceptCredentialRequest { - const message = createBaseAcceptCredentialRequest(); - message.documentJson = object.documentJson ?? undefined; - message.itemId = object.itemId ?? undefined; - return message; - }, + toJSON(message: AcceptCredentialRequest): unknown { + const obj: any = {}; + if (message.documentJson !== undefined) { + obj.documentJson = message.documentJson; + } + if (message.itemId !== undefined) { + obj.itemId = message.itemId; + } + return obj; + }, + + create(base?: DeepPartial): AcceptCredentialRequest { + return AcceptCredentialRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): AcceptCredentialRequest { + const message = createBaseAcceptCredentialRequest(); + message.documentJson = object.documentJson ?? undefined; + message.itemId = object.itemId ?? undefined; + return message; + }, }; function createBaseAcceptCredentialResponse(): AcceptCredentialResponse { - return { itemId: "", documentJson: "" }; + return { itemId: "", documentJson: "" }; } export const AcceptCredentialResponse = { - encode( - message: AcceptCredentialResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.itemId !== undefined && message.itemId !== "") { - writer.uint32(10).string(message.itemId); - } - if (message.documentJson !== undefined && message.documentJson !== "") { - writer.uint32(18).string(message.documentJson); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): AcceptCredentialResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAcceptCredentialResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.itemId = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.documentJson = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: AcceptCredentialResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.itemId !== undefined && message.itemId !== "") { + writer.uint32(10).string(message.itemId); + } + if (message.documentJson !== undefined && message.documentJson !== "") { + writer.uint32(18).string(message.documentJson); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): AcceptCredentialResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAcceptCredentialResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - fromJSON(object: any): AcceptCredentialResponse { - return { - itemId: isSet(object.itemId) ? String(object.itemId) : "", - documentJson: isSet(object.documentJson) - ? String(object.documentJson) - : "", - }; - }, + message.itemId = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.documentJson = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: AcceptCredentialResponse): unknown { - const obj: any = {}; - if (message.itemId !== undefined && message.itemId !== "") { - obj.itemId = message.itemId; - } - if (message.documentJson !== undefined && message.documentJson !== "") { - obj.documentJson = message.documentJson; - } - return obj; - }, + fromJSON(object: any): AcceptCredentialResponse { + return { + itemId: isSet(object.itemId) ? String(object.itemId) : "", + documentJson: isSet(object.documentJson) ? String(object.documentJson) : "", + }; + }, - create( - base?: DeepPartial, - ): AcceptCredentialResponse { - return AcceptCredentialResponse.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): AcceptCredentialResponse { - const message = createBaseAcceptCredentialResponse(); - message.itemId = object.itemId ?? ""; - message.documentJson = object.documentJson ?? ""; - return message; - }, + toJSON(message: AcceptCredentialResponse): unknown { + const obj: any = {}; + if (message.itemId !== undefined && message.itemId !== "") { + obj.itemId = message.itemId; + } + if (message.documentJson !== undefined && message.documentJson !== "") { + obj.documentJson = message.documentJson; + } + return obj; + }, + + create(base?: DeepPartial): AcceptCredentialResponse { + return AcceptCredentialResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): AcceptCredentialResponse { + const message = createBaseAcceptCredentialResponse(); + message.itemId = object.itemId ?? ""; + message.documentJson = object.documentJson ?? ""; + return message; + }, }; function createBaseRejectCredentialRequest(): RejectCredentialRequest { - return { documentJson: undefined, itemId: undefined }; + return { documentJson: undefined, itemId: undefined }; } export const RejectCredentialRequest = { - encode( - message: RejectCredentialRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.documentJson !== undefined) { - writer.uint32(10).string(message.documentJson); - } - if (message.itemId !== undefined) { - writer.uint32(18).string(message.itemId); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): RejectCredentialRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRejectCredentialRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.documentJson = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.itemId = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, + encode(message: RejectCredentialRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.documentJson !== undefined) { + writer.uint32(10).string(message.documentJson); + } + if (message.itemId !== undefined) { + writer.uint32(18).string(message.itemId); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): RejectCredentialRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseRejectCredentialRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } - fromJSON(object: any): RejectCredentialRequest { - return { - documentJson: isSet(object.documentJson) - ? String(object.documentJson) - : undefined, - itemId: isSet(object.itemId) ? String(object.itemId) : undefined, - }; - }, + message.documentJson = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.itemId = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - toJSON(message: RejectCredentialRequest): unknown { - const obj: any = {}; - if (message.documentJson !== undefined) { - obj.documentJson = message.documentJson; - } - if (message.itemId !== undefined) { - obj.itemId = message.itemId; - } - return obj; - }, + fromJSON(object: any): RejectCredentialRequest { + return { + documentJson: isSet(object.documentJson) ? String(object.documentJson) : undefined, + itemId: isSet(object.itemId) ? String(object.itemId) : undefined, + }; + }, - create( - base?: DeepPartial, - ): RejectCredentialRequest { - return RejectCredentialRequest.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): RejectCredentialRequest { - const message = createBaseRejectCredentialRequest(); - message.documentJson = object.documentJson ?? undefined; - message.itemId = object.itemId ?? undefined; - return message; - }, + toJSON(message: RejectCredentialRequest): unknown { + const obj: any = {}; + if (message.documentJson !== undefined) { + obj.documentJson = message.documentJson; + } + if (message.itemId !== undefined) { + obj.itemId = message.itemId; + } + return obj; + }, + + create(base?: DeepPartial): RejectCredentialRequest { + return RejectCredentialRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): RejectCredentialRequest { + const message = createBaseRejectCredentialRequest(); + message.documentJson = object.documentJson ?? undefined; + message.itemId = object.itemId ?? undefined; + return message; + }, }; function createBaseRejectCredentialResponse(): RejectCredentialResponse { - return {}; + return {}; } export const RejectCredentialResponse = { - encode( - _: RejectCredentialResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): RejectCredentialResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRejectCredentialResponse(); - 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): RejectCredentialResponse { - return {}; - }, - - toJSON(_: RejectCredentialResponse): unknown { - const obj: any = {}; - return obj; - }, + encode(_: RejectCredentialResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): RejectCredentialResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseRejectCredentialResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, - create( - base?: DeepPartial, - ): RejectCredentialResponse { - return RejectCredentialResponse.fromPartial(base ?? {}); - }, - fromPartial( - _: DeepPartial, - ): RejectCredentialResponse { - const message = createBaseRejectCredentialResponse(); - return message; - }, + fromJSON(_: any): RejectCredentialResponse { + return {}; + }, + + toJSON(_: RejectCredentialResponse): unknown { + const obj: any = {}; + return obj; + }, + + create(base?: DeepPartial): RejectCredentialResponse { + return RejectCredentialResponse.fromPartial(base ?? {}); + }, + fromPartial(_: DeepPartial): RejectCredentialResponse { + const message = createBaseRejectCredentialResponse(); + return message; + }, }; -export type VerifiableCredentialDefinition = - typeof VerifiableCredentialDefinition; +export type VerifiableCredentialDefinition = typeof VerifiableCredentialDefinition; export const VerifiableCredentialDefinition = { - name: "VerifiableCredential", - fullName: "services.verifiablecredentials.v1.VerifiableCredential", - methods: { - /** - * Sign and issue a verifiable credential from a pre-defined template. - * This process will also add schema validation and - * revocation registry values to the credential. - */ - issueFromTemplate: { - name: "IssueFromTemplate", - requestType: IssueFromTemplateRequest, - requestStream: false, - responseType: IssueFromTemplateResponse, - responseStream: false, - options: {}, - }, - /** Check credential status in the revocation registry */ - checkStatus: { - name: "CheckStatus", - requestType: CheckStatusRequest, - requestStream: false, - responseType: CheckStatusResponse, - responseStream: false, - options: {}, - }, - /** Update credential status by setting the revocation value */ - updateStatus: { - name: "UpdateStatus", - requestType: UpdateStatusRequest, - requestStream: false, - responseType: UpdateStatusResponse, - responseStream: false, - options: {}, - }, - /** - * Create a proof from a signed document that is a valid - * verifiable credential and contains a signature from which a proof can be derived. - */ - createProof: { - name: "CreateProof", - requestType: CreateProofRequest, - requestStream: false, - responseType: CreateProofResponse, - responseStream: false, - options: {}, - }, - /** - * Verifies a proof by checking the signature value, and if possible schema validation, - * revocation status, and issuer status against a trust registry - */ - verifyProof: { - name: "VerifyProof", - requestType: VerifyProofRequest, - requestStream: false, - responseType: VerifyProofResponse, - responseStream: false, - options: {}, - }, - /** Sends a document directly to a user's email within the given ecosystem */ - send: { - name: "Send", - requestType: SendRequest, - requestStream: false, - responseType: SendResponse, - responseStream: false, - options: {}, - }, - /** Create credential offer */ - createCredentialOffer: { - name: "CreateCredentialOffer", - requestType: CreateCredentialOfferRequest, - requestStream: false, - responseType: CreateCredentialOfferResponse, - responseStream: false, - options: {}, - }, - /** Accept an offer to exchange a credential */ - acceptCredential: { - name: "AcceptCredential", - requestType: AcceptCredentialRequest, - requestStream: false, - responseType: AcceptCredentialResponse, - responseStream: false, - options: {}, - }, - /** Reject an offer to exchange a credential */ - rejectCredential: { - name: "RejectCredential", - requestType: RejectCredentialRequest, - requestStream: false, - responseType: RejectCredentialResponse, - responseStream: false, - options: {}, - }, + name: "VerifiableCredential", + fullName: "services.verifiablecredentials.v1.VerifiableCredential", + methods: { + /** + * Sign and issue a verifiable credential from a pre-defined template. + * This process will also add schema validation and + * revocation registry values to the credential. + */ + issueFromTemplate: { + name: "IssueFromTemplate", + requestType: IssueFromTemplateRequest, + requestStream: false, + responseType: IssueFromTemplateResponse, + responseStream: false, + options: {}, + }, + /** Check credential status in the revocation registry */ + checkStatus: { + name: "CheckStatus", + requestType: CheckStatusRequest, + requestStream: false, + responseType: CheckStatusResponse, + responseStream: false, + options: {}, + }, + /** Update credential status by setting the revocation value */ + updateStatus: { + name: "UpdateStatus", + requestType: UpdateStatusRequest, + requestStream: false, + responseType: UpdateStatusResponse, + responseStream: false, + options: {}, }, + /** + * Create a proof from a signed document that is a valid + * verifiable credential and contains a signature from which a proof can be derived. + */ + createProof: { + name: "CreateProof", + requestType: CreateProofRequest, + requestStream: false, + responseType: CreateProofResponse, + responseStream: false, + options: {}, + }, + /** + * Verifies a proof by checking the signature value, and if possible schema validation, + * revocation status, and issuer status against a trust registry + */ + verifyProof: { + name: "VerifyProof", + requestType: VerifyProofRequest, + requestStream: false, + responseType: VerifyProofResponse, + responseStream: false, + options: {}, + }, + /** Sends a document directly to a user's email within the given ecosystem */ + send: { + name: "Send", + requestType: SendRequest, + requestStream: false, + responseType: SendResponse, + responseStream: false, + options: {}, + }, + /** Create credential offer */ + createCredentialOffer: { + name: "CreateCredentialOffer", + requestType: CreateCredentialOfferRequest, + requestStream: false, + responseType: CreateCredentialOfferResponse, + responseStream: false, + options: {}, + }, + /** Accept an offer to exchange a credential */ + acceptCredential: { + name: "AcceptCredential", + requestType: AcceptCredentialRequest, + requestStream: false, + responseType: AcceptCredentialResponse, + responseStream: false, + options: {}, + }, + /** Reject an offer to exchange a credential */ + rejectCredential: { + name: "RejectCredential", + requestType: RejectCredentialRequest, + requestStream: false, + responseType: RejectCredentialResponse, + responseStream: false, + options: {}, + }, + }, } as const; declare const self: any | undefined; declare const window: any | undefined; declare const global: any | undefined; const tsProtoGlobalThis: any = (() => { - if (typeof globalThis !== "undefined") { - return globalThis; - } - if (typeof self !== "undefined") { - return self; - } - if (typeof window !== "undefined") { - return window; - } - if (typeof global !== "undefined") { - return global; - } - throw "Unable to locate global object"; + if (typeof globalThis !== "undefined") { + return globalThis; + } + if (typeof self !== "undefined") { + return self; + } + if (typeof window !== "undefined") { + return window; + } + if (typeof global !== "undefined") { + return global; + } + throw "Unable to locate global object"; })(); function bytesFromBase64(b64: string): Uint8Array { - if (tsProtoGlobalThis.Buffer) { - return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64")); - } else { - const bin = tsProtoGlobalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; + if (tsProtoGlobalThis.Buffer) { + return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64")); + } else { + const bin = tsProtoGlobalThis.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 (tsProtoGlobalThis.Buffer) { - return tsProtoGlobalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return tsProtoGlobalThis.btoa(bin.join("")); - } + if (tsProtoGlobalThis.Buffer) { + return tsProtoGlobalThis.Buffer.from(arr).toString("base64"); + } else { + const bin: string[] = []; + arr.forEach((byte) => { + bin.push(String.fromCharCode(byte)); + }); + return tsProtoGlobalThis.btoa(bin.join("")); + } } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; function isObject(value: any): boolean { - return typeof value === "object" && value !== null; + return typeof value === "object" && value !== null; } function isSet(value: any): boolean { - return value !== null && value !== undefined; + return value !== null && value !== undefined; } diff --git a/web/src/providers.ts b/web/src/providers.ts index 472261e93..4173263b0 100644 --- a/web/src/providers.ts +++ b/web/src/providers.ts @@ -48,17 +48,18 @@ export class TransportProvider implements IPlatformProvider { address: string, ): Client { let transport: any; - const runtime = getRuntime(); - if (runtime === "web") { - transport = FetchTransport(); - } else if (runtime === "react-native") { - // TODO - Once this PR is merged: https://github.com/deeplay-io/nice-grpc/pull/348 - transport = FetchReactNativeTransport(); - } else { - transport = NodeHttpTransport(); - } if (TransportProvider.overrideTransport !== undefined) { transport = TransportProvider.overrideTransport; + } else { + const runtime = getRuntime(); + if (runtime === "web") { + transport = FetchTransport(); + } else if (runtime === "react-native") { + // TODO - Once this PR is merged: https://github.com/deeplay-io/nice-grpc/pull/348 + transport = FetchReactNativeTransport(); + } else { + transport = NodeHttpTransport(); + } } const channel = createChannel(address, transport); return createClient(definition, channel); From 665a6385d44cbcf3cc82eeba9c2afa6ca8f24566 Mon Sep 17 00:00:00 2001 From: Scott Phillips Date: Fri, 18 Aug 2023 13:29:26 -0400 Subject: [PATCH 4/6] fix: front-end call the right locations --- .../connect-app/package-lock.json | 2470 ++++++++++++++++- .../connect-basic/connect-app/package.json | 2 + samples/connect-basic/connect-app/src/App.tsx | 52 +- .../connect-basic/connect-app/src/shared.ts | 88 +- .../connect-basic/connect-backend/src/app.ts | 51 +- .../connect-backend/src/shared.ts | 80 +- 6 files changed, 2562 insertions(+), 181 deletions(-) diff --git a/samples/connect-basic/connect-app/package-lock.json b/samples/connect-basic/connect-app/package-lock.json index 08ac2238e..bba457d8c 100644 --- a/samples/connect-basic/connect-app/package-lock.json +++ b/samples/connect-basic/connect-app/package-lock.json @@ -9,7 +9,9 @@ "version": "0.0.0", "dependencies": { "@trinsic/trinsic": "file:../../../web", + "@use-it/interval": "^1.0.0", "react": "^18.2.0", + "react-code-blocks": "^0.1.3", "react-dom": "^18.2.0" }, "devDependencies": { @@ -26,6 +28,7 @@ } }, "../../../web": { + "name": "@trinsic/trinsic", "version": "1.0.0", "license": "ISC", "dependencies": { @@ -92,7 +95,6 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", - "dev": true, "dependencies": { "@jridgewell/gen-mapping": "^0.3.0", "@jridgewell/trace-mapping": "^0.3.9" @@ -101,11 +103,46 @@ "node": ">=6.0.0" } }, + "node_modules/@babel/cli": { + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.22.10.tgz", + "integrity": "sha512-rM9ZMmaII630zGvtMtQ3P4GyHs28CHLYE9apLG7L8TgaSqcfoIGrlLSLsh4Q8kDTdZQQEXZm1M0nQtOvU/2heg==", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.17", + "commander": "^4.0.1", + "convert-source-map": "^1.1.0", + "fs-readdir-recursive": "^1.1.0", + "glob": "^7.2.0", + "make-dir": "^2.1.0", + "slash": "^2.0.0" + }, + "bin": { + "babel": "bin/babel.js", + "babel-external-helpers": "bin/babel-external-helpers.js" + }, + "engines": { + "node": ">=6.9.0" + }, + "optionalDependencies": { + "@nicolo-ribaudo/chokidar-2": "2.1.8-no-fsevents.3", + "chokidar": "^3.4.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/cli/node_modules/slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "engines": { + "node": ">=6" + } + }, "node_modules/@babel/code-frame": { "version": "7.22.10", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.10.tgz", "integrity": "sha512-/KKIMG4UEL35WmI9OlvMhurwtytjvXoFcGNrOvyG9zIzA8YmPjVtIZUf7b05+TPO7G7/GEmLHDaoCgACHl9hhA==", - "dev": true, "dependencies": { "@babel/highlight": "^7.22.10", "chalk": "^2.4.2" @@ -118,7 +155,6 @@ "version": "7.22.9", "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.9.tgz", "integrity": "sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ==", - "dev": true, "engines": { "node": ">=6.9.0" } @@ -127,7 +163,6 @@ "version": "7.22.10", "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.22.10.tgz", "integrity": "sha512-fTmqbbUBAwCcre6zPzNngvsI0aNrPZe77AeqvDxWM9Nm+04RrJ3CAmGHA9f7lJQY6ZMhRztNemy4uslDxTX4Qw==", - "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.22.10", @@ -157,7 +192,6 @@ "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, "bin": { "semver": "bin/semver.js" } @@ -166,7 +200,6 @@ "version": "7.22.10", "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.10.tgz", "integrity": "sha512-79KIf7YiWjjdZ81JnLujDRApWtl7BxTqWD88+FFdQEIOG8LJ0etDOM7CXuIgGJa55sGOwZVwuEsaLEm0PJ5/+A==", - "dev": true, "dependencies": { "@babel/types": "^7.22.10", "@jridgewell/gen-mapping": "^0.3.2", @@ -177,11 +210,32 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/helper-annotate-as-pure": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz", + "integrity": "sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==", + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.22.10.tgz", + "integrity": "sha512-Av0qubwDQxC56DoUReVDeLfMEjYYSN1nZrTUrWkXd7hpU73ymRANkbuDm3yni9npkn+RXy9nNbEJZEzXr7xrfQ==", + "dependencies": { + "@babel/types": "^7.22.10" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/helper-compilation-targets": { "version": "7.22.10", "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.10.tgz", "integrity": "sha512-JMSwHD4J7SLod0idLq5PKgI+6g/hLD/iuWBq08ZX49xE14VpVEojJ5rHWptpirV2j020MvypRLAXAO50igCJ5Q==", - "dev": true, "dependencies": { "@babel/compat-data": "^7.22.9", "@babel/helper-validator-option": "^7.22.5", @@ -197,16 +251,83 @@ "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, "bin": { "semver": "bin/semver.js" } }, + "node_modules/@babel/helper-create-class-features-plugin": { + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.22.10.tgz", + "integrity": "sha512-5IBb77txKYQPpOEdUdIhBx8VrZyDCQ+H82H0+5dX1TmuscP5vJKEE3cKurjtIw/vFwzbVH48VweE78kVDBrqjA==", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-function-name": "^7.22.5", + "@babel/helper-member-expression-to-functions": "^7.22.5", + "@babel/helper-optimise-call-expression": "^7.22.5", + "@babel/helper-replace-supers": "^7.22.9", + "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-create-class-features-plugin/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/@babel/helper-create-regexp-features-plugin": { + "version": "7.22.9", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.22.9.tgz", + "integrity": "sha512-+svjVa/tFwsNSG4NEy1h85+HQ5imbT92Q5/bgtS7P0GTQlP8WuFdqsiABmQouhiFGyV66oGxZFpeYHza1rNsKw==", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.22.5", + "regexpu-core": "^5.3.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-create-regexp-features-plugin/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/@babel/helper-define-polyfill-provider": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.4.2.tgz", + "integrity": "sha512-k0qnnOqHn5dK9pZpfD5XXZ9SojAITdCKRn2Lp6rnDGzIbaP0rHyMPk/4wsSxVBVz4RfN0q6VpXWP2pDGIoQ7hw==", + "dependencies": { + "@babel/helper-compilation-targets": "^7.22.6", + "@babel/helper-plugin-utils": "^7.22.5", + "debug": "^4.1.1", + "lodash.debounce": "^4.0.8", + "resolve": "^1.14.2" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + } + }, "node_modules/@babel/helper-environment-visitor": { "version": "7.22.5", "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz", "integrity": "sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==", - "dev": true, "engines": { "node": ">=6.9.0" } @@ -215,7 +336,6 @@ "version": "7.22.5", "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz", "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==", - "dev": true, "dependencies": { "@babel/template": "^7.22.5", "@babel/types": "^7.22.5" @@ -228,7 +348,17 @@ "version": "7.22.5", "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", - "dev": true, + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-member-expression-to-functions": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.22.5.tgz", + "integrity": "sha512-aBiH1NKMG0H2cGZqspNvsaBe6wNGjbJjuLy29aU+eDZjSbbN53BaxlpB02xm9v34pLTZ1nIQPFYn2qMZoa5BQQ==", "dependencies": { "@babel/types": "^7.22.5" }, @@ -240,7 +370,6 @@ "version": "7.22.5", "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.5.tgz", "integrity": "sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg==", - "dev": true, "dependencies": { "@babel/types": "^7.22.5" }, @@ -252,7 +381,6 @@ "version": "7.22.9", "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.22.9.tgz", "integrity": "sha512-t+WA2Xn5K+rTeGtC8jCsdAH52bjggG5TKRuRrAGNM/mjIbO4GxvlLMFOEz9wXY5I2XQ60PMFsAG2WIcG82dQMQ==", - "dev": true, "dependencies": { "@babel/helper-environment-visitor": "^7.22.5", "@babel/helper-module-imports": "^7.22.5", @@ -267,20 +395,72 @@ "@babel/core": "^7.0.0" } }, + "node_modules/@babel/helper-optimise-call-expression": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.22.5.tgz", + "integrity": "sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==", + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/helper-plugin-utils": { "version": "7.22.5", "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", - "dev": true, "engines": { "node": ">=6.9.0" } }, + "node_modules/@babel/helper-remap-async-to-generator": { + "version": "7.22.9", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.22.9.tgz", + "integrity": "sha512-8WWC4oR4Px+tr+Fp0X3RHDVfINGpF3ad1HIbrc8A77epiR6eMMc6jsgozkzT2uDiOOdoS9cLIQ+XD2XvI2WSmQ==", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-wrap-function": "^7.22.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-replace-supers": { + "version": "7.22.9", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.22.9.tgz", + "integrity": "sha512-LJIKvvpgPOPUThdYqcX6IXRuIcTkcAub0IaDRGCZH0p5GPUp7PhRU9QVgFcDDd51BaPkk77ZjqFwh6DZTAEmGg==", + "dependencies": { + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-member-expression-to-functions": "^7.22.5", + "@babel/helper-optimise-call-expression": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, "node_modules/@babel/helper-simple-access": { "version": "7.22.5", "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", - "dev": true, + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.22.5.tgz", + "integrity": "sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==", "dependencies": { "@babel/types": "^7.22.5" }, @@ -292,88 +472,1377 @@ "version": "7.22.6", "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", - "dev": true, "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", + "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz", + "integrity": "sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-wrap-function": { + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.22.10.tgz", + "integrity": "sha512-OnMhjWjuGYtdoO3FmsEFWvBStBAe2QOgwOLsLNDjN+aaiMD8InJk1/O3HSD8lkqTjCgg5YI34Tz15KNNA3p+nQ==", + "dependencies": { + "@babel/helper-function-name": "^7.22.5", + "@babel/template": "^7.22.5", + "@babel/types": "^7.22.10" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.10.tgz", + "integrity": "sha512-a41J4NW8HyZa1I1vAndrraTlPZ/eZoga2ZgS7fEr0tZJGVU4xqdE80CEm0CcNjha5EZ8fTBYLKHF0kqDUuAwQw==", + "dependencies": { + "@babel/template": "^7.22.5", + "@babel/traverse": "^7.22.10", + "@babel/types": "^7.22.10" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.10.tgz", + "integrity": "sha512-78aUtVcT7MUscr0K5mIEnkwxPE0MaxkR5RxRwuHaQ+JuU5AmTPhY+do2mdzVTnIJJpyBglql2pehuBIWHug+WQ==", + "dependencies": { + "@babel/helper-validator-identifier": "^7.22.5", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.10.tgz", + "integrity": "sha512-lNbdGsQb9ekfsnjFGhEiF4hfFqGgfOP3H3d27re3n+CGhNuTSUEQdfWk556sTLNTloczcdM5TYF2LhzmDQKyvQ==", + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.22.5.tgz", + "integrity": "sha512-NP1M5Rf+u2Gw9qfSO4ihjcTGW5zXTi36ITLd4/EoAcEhIZ0yjMqmftDNl3QC19CX7olhrjpyU454g/2W7X0jvQ==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.22.5.tgz", + "integrity": "sha512-31Bb65aZaUwqCbWMnZPduIZxCBngHFlzyN6Dq6KAJjtx+lx6ohKHubc61OomYi7XwVD4Ol0XCVz4h+pYFR048g==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", + "@babel/plugin-transform-optional-chaining": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.13.0" + } + }, + "node_modules/@babel/plugin-external-helpers": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-external-helpers/-/plugin-external-helpers-7.22.5.tgz", + "integrity": "sha512-ngnNEWxmykPk82mH4ajZT0qTztr3Je6hrMuKAslZVM8G1YZTENJSYwrIGtt6KOtznug3exmAtF4so/nPqJuA4A==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-class-properties": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz", + "integrity": "sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ==", + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-object-rest-spread": { + "version": "7.20.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.20.7.tgz", + "integrity": "sha512-d2S98yCiLxDVmBmE8UjGcfPvNEUbA1U5q5WxaWFUGRzJSVAZqm5W6MbPct0jxnegUZ0niLeNX+IOzEs7wYg9Dg==", + "dependencies": { + "@babel/compat-data": "^7.20.5", + "@babel/helper-compilation-targets": "^7.20.7", + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.20.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-private-property-in-object": { + "version": "7.21.0-placeholder-for-preset-env.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz", + "integrity": "sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==", + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-dynamic-import": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", + "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-export-namespace-from": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", + "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.3" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-assertions": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.22.5.tgz", + "integrity": "sha512-rdV97N7KqsRzeNGoWUOK6yUsWarLjE5Su/Snk9IYPU9CwkWHs4t+rTGOvffTR8XGkJMTAdLfO0xVnXm8wugIJg==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-attributes": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.22.5.tgz", + "integrity": "sha512-KwvoWDeNKPETmozyFE0P2rOLqh39EoQHNjqizrI5B8Vt0ZNS7M56s7dAiAqbYfiAYOuIzIh96z3iR2ktgu3tEg==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-jsx": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.22.5.tgz", + "integrity": "sha512-gvyP4hZrgrs/wWMaocvxZ44Hw0b3W8Pe+cMxc8V1ULQ07oh8VNbIRaoD1LRZVTvD+0nieDKjfgKg89sD7rrKrg==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-typescript": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.22.5.tgz", + "integrity": "sha512-1mS2o03i7t1c6VzH6fdQ3OA8tcEIxwG18zIPRp+UY1Ihv6W+XZzBCVxExF9upussPXJ0xE9XRHwMoNs1ep/nRQ==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-unicode-sets-regex": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz", + "integrity": "sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg==", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-transform-arrow-functions": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.22.5.tgz", + "integrity": "sha512-26lTNXoVRdAnsaDXPpvCNUq+OVWEVC6bx7Vvz9rC53F2bagUWW4u4ii2+h8Fejfh7RYqPxn+libeFBBck9muEw==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-async-generator-functions": { + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.22.10.tgz", + "integrity": "sha512-eueE8lvKVzq5wIObKK/7dvoeKJ+xc6TvRn6aysIjS6pSCeLy7S/eVi7pEQknZqyqvzaNKdDtem8nUNTBgDVR2g==", + "dependencies": { + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-remap-async-to-generator": "^7.22.9", + "@babel/plugin-syntax-async-generators": "^7.8.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-async-to-generator": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.22.5.tgz", + "integrity": "sha512-b1A8D8ZzE/VhNDoV1MSJTnpKkCG5bJo+19R4o4oy03zM7ws8yEMK755j61Dc3EyvdysbqH5BOOTquJ7ZX9C6vQ==", + "dependencies": { + "@babel/helper-module-imports": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-remap-async-to-generator": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-block-scoped-functions": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.22.5.tgz", + "integrity": "sha512-tdXZ2UdknEKQWKJP1KMNmuF5Lx3MymtMN/pvA+p/VEkhK8jVcQ1fzSy8KM9qRYhAf2/lV33hoMPKI/xaI9sADA==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-block-scoping": { + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.22.10.tgz", + "integrity": "sha512-1+kVpGAOOI1Albt6Vse7c8pHzcZQdQKW+wJH+g8mCaszOdDVwRXa/slHPqIw+oJAJANTKDMuM2cBdV0Dg618Vg==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-class-properties": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.22.5.tgz", + "integrity": "sha512-nDkQ0NfkOhPTq8YCLiWNxp1+f9fCobEjCb0n8WdbNUBc4IB5V7P1QnX9IjpSoquKrXF5SKojHleVNs2vGeHCHQ==", + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-class-static-block": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.22.5.tgz", + "integrity": "sha512-SPToJ5eYZLxlnp1UzdARpOGeC2GbHvr9d/UV0EukuVx8atktg194oe+C5BqQ8jRTkgLRVOPYeXRSBg1IlMoVRA==", + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-class-static-block": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.12.0" + } + }, + "node_modules/@babel/plugin-transform-classes": { + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.22.6.tgz", + "integrity": "sha512-58EgM6nuPNG6Py4Z3zSuu0xWu2VfodiMi72Jt5Kj2FECmaYk1RrTXA45z6KBFsu9tRgwQDwIiY4FXTt+YsSFAQ==", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-compilation-targets": "^7.22.6", + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-function-name": "^7.22.5", + "@babel/helper-optimise-call-expression": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-replace-supers": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-computed-properties": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.22.5.tgz", + "integrity": "sha512-4GHWBgRf0krxPX+AaPtgBAlTgTeZmqDynokHOX7aqqAB4tHs3U2Y02zH6ETFdLZGcg9UQSD1WCmkVrE9ErHeOg==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/template": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-destructuring": { + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.22.10.tgz", + "integrity": "sha512-dPJrL0VOyxqLM9sritNbMSGx/teueHF/htMKrPT7DNxccXxRDPYqlgPFFdr8u+F+qUZOkZoXue/6rL5O5GduEw==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-dotall-regex": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.22.5.tgz", + "integrity": "sha512-5/Yk9QxCQCl+sOIB1WelKnVRxTJDSAIxtJLL2/pqL14ZVlbH0fUQUZa/T5/UnQtBNgghR7mfB8ERBKyKPCi7Vw==", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-duplicate-keys": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.22.5.tgz", + "integrity": "sha512-dEnYD+9BBgld5VBXHnF/DbYGp3fqGMsyxKbtD1mDyIA7AkTSpKXFhCVuj/oQVOoALfBs77DudA0BE4d5mcpmqw==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-dynamic-import": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.22.5.tgz", + "integrity": "sha512-0MC3ppTB1AMxd8fXjSrbPa7LT9hrImt+/fcj+Pg5YMD7UQyWp/02+JWpdnCymmsXwIx5Z+sYn1bwCn4ZJNvhqQ==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-dynamic-import": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-exponentiation-operator": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.22.5.tgz", + "integrity": "sha512-vIpJFNM/FjZ4rh1myqIya9jXwrwwgFRHPjT3DkUA9ZLHuzox8jiXkOLvwm1H+PQIP3CqfC++WPKeuDi0Sjdj1g==", + "dependencies": { + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-export-namespace-from": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.22.5.tgz", + "integrity": "sha512-X4hhm7FRnPgd4nDA4b/5V280xCx6oL7Oob5+9qVS5C13Zq4bh1qq7LU0GgRU6b5dBWBvhGaXYVB4AcN6+ol6vg==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-for-of": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.22.5.tgz", + "integrity": "sha512-3kxQjX1dU9uudwSshyLeEipvrLjBCVthCgeTp6CzE/9JYrlAIaeekVxRpCWsDDfYTfRZRoCeZatCQvwo+wvK8A==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-function-name": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.22.5.tgz", + "integrity": "sha512-UIzQNMS0p0HHiQm3oelztj+ECwFnj+ZRV4KnguvlsD2of1whUeM6o7wGNj6oLwcDoAXQ8gEqfgC24D+VdIcevg==", + "dependencies": { + "@babel/helper-compilation-targets": "^7.22.5", + "@babel/helper-function-name": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-json-strings": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.22.5.tgz", + "integrity": "sha512-DuCRB7fu8MyTLbEQd1ew3R85nx/88yMoqo2uPSjevMj3yoN7CDM8jkgrY0wmVxfJZyJ/B9fE1iq7EQppWQmR5A==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-json-strings": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-literals": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.22.5.tgz", + "integrity": "sha512-fTLj4D79M+mepcw3dgFBTIDYpbcB9Sm0bpm4ppXPaO+U+PKFFyV9MGRvS0gvGw62sd10kT5lRMKXAADb9pWy8g==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-logical-assignment-operators": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.22.5.tgz", + "integrity": "sha512-MQQOUW1KL8X0cDWfbwYP+TbVbZm16QmQXJQ+vndPtH/BoO0lOKpVoEDMI7+PskYxH+IiE0tS8xZye0qr1lGzSA==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-member-expression-literals": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.22.5.tgz", + "integrity": "sha512-RZEdkNtzzYCFl9SE9ATaUMTj2hqMb4StarOJLrZRbqqU4HSBE7UlBw9WBWQiDzrJZJdUWiMTVDI6Gv/8DPvfew==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-amd": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.22.5.tgz", + "integrity": "sha512-R+PTfLTcYEmb1+kK7FNkhQ1gP4KgjpSO6HfH9+f8/yfp2Nt3ggBjiVpRwmwTlfqZLafYKJACy36yDXlEmI9HjQ==", + "dependencies": { + "@babel/helper-module-transforms": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-commonjs": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.22.5.tgz", + "integrity": "sha512-B4pzOXj+ONRmuaQTg05b3y/4DuFz3WcCNAXPLb2Q0GT0TrGKGxNKV4jwsXts+StaM0LQczZbOpj8o1DLPDJIiA==", + "dependencies": { + "@babel/helper-module-transforms": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-simple-access": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-systemjs": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.22.5.tgz", + "integrity": "sha512-emtEpoaTMsOs6Tzz+nbmcePl6AKVtS1yC4YNAeMun9U8YCsgadPNxnOPQ8GhHFB2qdx+LZu9LgoC0Lthuu05DQ==", + "dependencies": { + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-module-transforms": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-umd": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.22.5.tgz", + "integrity": "sha512-+S6kzefN/E1vkSsKx8kmQuqeQsvCKCd1fraCM7zXm4SFoggI099Tr4G8U81+5gtMdUeMQ4ipdQffbKLX0/7dBQ==", + "dependencies": { + "@babel/helper-module-transforms": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.22.5.tgz", + "integrity": "sha512-YgLLKmS3aUBhHaxp5hi1WJTgOUb/NCuDHzGT9z9WTt3YG+CPRhJs6nprbStx6DnWM4dh6gt7SU3sZodbZ08adQ==", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-transform-new-target": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.22.5.tgz", + "integrity": "sha512-AsF7K0Fx/cNKVyk3a+DW0JLo+Ua598/NxMRvxDnkpCIGFh43+h/v2xyhRUYf6oD8gE4QtL83C7zZVghMjHd+iw==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-nullish-coalescing-operator": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.22.5.tgz", + "integrity": "sha512-6CF8g6z1dNYZ/VXok5uYkkBBICHZPiGEl7oDnAx2Mt1hlHVHOSIKWJaXHjQJA5VB43KZnXZDIexMchY4y2PGdA==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-numeric-separator": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.22.5.tgz", + "integrity": "sha512-NbslED1/6M+sXiwwtcAB/nieypGw02Ejf4KtDeMkCEpP6gWFMX1wI9WKYua+4oBneCCEmulOkRpwywypVZzs/g==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-numeric-separator": "^7.10.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-object-rest-spread": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.22.5.tgz", + "integrity": "sha512-Kk3lyDmEslH9DnvCDA1s1kkd3YWQITiBOHngOtDL9Pt6BZjzqb6hiOlb8VfjiiQJ2unmegBqZu0rx5RxJb5vmQ==", + "dependencies": { + "@babel/compat-data": "^7.22.5", + "@babel/helper-compilation-targets": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-object-super": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.22.5.tgz", + "integrity": "sha512-klXqyaT9trSjIUrcsYIfETAzmOEZL3cBYqOYLJxBHfMFFggmXOv+NYSX/Jbs9mzMVESw/WycLFPRx8ba/b2Ipw==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-replace-supers": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-optional-catch-binding": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.22.5.tgz", + "integrity": "sha512-pH8orJahy+hzZje5b8e2QIlBWQvGpelS76C63Z+jhZKsmzfNaPQ+LaW6dcJ9bxTpo1mtXbgHwy765Ro3jftmUg==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-optional-chaining": { + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.22.10.tgz", + "integrity": "sha512-MMkQqZAZ+MGj+jGTG3OTuhKeBpNcO+0oCEbrGNEaOmiEn+1MzRyQlYsruGiU8RTK3zV6XwrVJTmwiDOyYK6J9g==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", + "@babel/plugin-syntax-optional-chaining": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-parameters": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.22.5.tgz", + "integrity": "sha512-AVkFUBurORBREOmHRKo06FjHYgjrabpdqRSwq6+C7R5iTCZOsM4QbcB27St0a4U6fffyAOqh3s/qEfybAhfivg==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-private-methods": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.22.5.tgz", + "integrity": "sha512-PPjh4gyrQnGe97JTalgRGMuU4icsZFnWkzicB/fUtzlKUqvsWBKEpPPfr5a2JiyirZkHxnAqkQMO5Z5B2kK3fA==", + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-private-property-in-object": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.22.5.tgz", + "integrity": "sha512-/9xnaTTJcVoBtSSmrVyhtSvO3kbqS2ODoh2juEU72c3aYonNF0OMGiaz2gjukyKM2wBBYJP38S4JiE0Wfb5VMQ==", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-create-class-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-property-literals": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.22.5.tgz", + "integrity": "sha512-TiOArgddK3mK/x1Qwf5hay2pxI6wCZnvQqrFSqbtg1GLl2JcNMitVH/YnqjP+M31pLUeTfzY1HAXFDnUBV30rQ==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-display-name": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.22.5.tgz", + "integrity": "sha512-PVk3WPYudRF5z4GKMEYUrLjPl38fJSKNaEOkFuoprioowGuWN6w2RKznuFNSlJx7pzzXXStPUnNSOEO0jL5EVw==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.22.5.tgz", + "integrity": "sha512-rog5gZaVbUip5iWDMTYbVM15XQq+RkUKhET/IHR6oizR+JEoN6CAfTTuHcK4vwUyzca30qqHqEpzBOnaRMWYMA==", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-module-imports": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-jsx": "^7.22.5", + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-development": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.22.5.tgz", + "integrity": "sha512-bDhuzwWMuInwCYeDeMzyi7TaBgRQei6DqxhbyniL7/VG4RSS7HtSL2QbY4eESy1KJqlWt8g3xeEBGPuo+XqC8A==", + "dependencies": { + "@babel/plugin-transform-react-jsx": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-self": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.22.5.tgz", + "integrity": "sha512-nTh2ogNUtxbiSbxaT4Ds6aXnXEipHweN9YRgOX/oNXdf0cCrGn/+2LozFa3lnPV5D90MkjhgckCPBrsoSc1a7g==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-source": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.22.5.tgz", + "integrity": "sha512-yIiRO6yobeEIaI0RTbIr8iAK9FcBHLtZq0S89ZPjDLQXBA4xvghaKqI0etp/tF3htTM0sazJKKLz9oEiGRtu7w==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-pure-annotations": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.22.5.tgz", + "integrity": "sha512-gP4k85wx09q+brArVinTXhWiyzLl9UpmGva0+mWyKxk6JZequ05x3eUcIUE+FyttPKJFRRVtAvQaJ6YF9h1ZpA==", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-regenerator": { + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.22.10.tgz", + "integrity": "sha512-F28b1mDt8KcT5bUyJc/U9nwzw6cV+UmTeRlXYIl2TNqMMJif0Jeey9/RQ3C4NOd2zp0/TRsDns9ttj2L523rsw==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5", + "regenerator-transform": "^0.15.2" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-reserved-words": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.22.5.tgz", + "integrity": "sha512-DTtGKFRQUDm8svigJzZHzb/2xatPc6TzNvAIJ5GqOKDsGFYgAskjRulbR/vGsPKq3OPqtexnz327qYpP57RFyA==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-shorthand-properties": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.22.5.tgz", + "integrity": "sha512-vM4fq9IXHscXVKzDv5itkO1X52SmdFBFcMIBZ2FRn2nqVYqw6dBexUgMvAjHW+KXpPPViD/Yo3GrDEBaRC0QYA==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-spread": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.22.5.tgz", + "integrity": "sha512-5ZzDQIGyvN4w8+dMmpohL6MBo+l2G7tfC/O2Dg7/hjpgeWvUx8FzfeOKxGog9IimPa4YekaQ9PlDqTLOljkcxg==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-sticky-regex": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.22.5.tgz", + "integrity": "sha512-zf7LuNpHG0iEeiyCNwX4j3gDg1jgt1k3ZdXBKbZSoA3BbGQGvMiSvfbZRR3Dr3aeJe3ooWFZxOOG3IRStYp2Bw==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-template-literals": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.22.5.tgz", + "integrity": "sha512-5ciOehRNf+EyUeewo8NkbQiUs4d6ZxiHo6BcBcnFlgiJfu16q0bQUw9Jvo0b0gBKFG1SMhDSjeKXSYuJLeFSMA==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-typeof-symbol": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.22.5.tgz", + "integrity": "sha512-bYkI5lMzL4kPii4HHEEChkD0rkc+nvnlR6+o/qdqR6zrm0Sv/nodmyLhlq2DO0YKLUNd2VePmPRjJXSBh9OIdA==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-typescript": { + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.22.10.tgz", + "integrity": "sha512-7++c8I/ymsDo4QQBAgbraXLzIM6jmfao11KgIBEYZRReWzNWH9NtNgJcyrZiXsOPh523FQm6LfpLyy/U5fn46A==", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-create-class-features-plugin": "^7.22.10", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-typescript": "^7.22.5" }, "engines": { "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", - "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", - "dev": true, + "node_modules/@babel/plugin-transform-unicode-escapes": { + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.22.10.tgz", + "integrity": "sha512-lRfaRKGZCBqDlRU3UIFovdp9c9mEvlylmpod0/OatICsSfuQ9YFthRo1tpTkGsklEefZdqlEFdY4A2dwTb6ohg==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, "engines": { "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/helper-validator-identifier": { + "node_modules/@babel/plugin-transform-unicode-property-regex": { "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", - "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", - "dev": true, + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.22.5.tgz", + "integrity": "sha512-HCCIb+CbJIAE6sXn5CjFQXMwkCClcOfPCzTlilJ8cUatfzwHlWQkbtV0zD338u9dZskwvuOYTuuaMaA8J5EI5A==", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" + }, "engines": { "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/helper-validator-option": { + "node_modules/@babel/plugin-transform-unicode-regex": { "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz", - "integrity": "sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw==", - "dev": true, + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.22.5.tgz", + "integrity": "sha512-028laaOKptN5vHJf9/Arr/HiJekMd41hOEZYvNsrsXqJ7YPYuX2bQxh31fkZzGmq3YqHRJzYFFAVYvKfMPKqyg==", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" + }, "engines": { "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/helpers": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.10.tgz", - "integrity": "sha512-a41J4NW8HyZa1I1vAndrraTlPZ/eZoga2ZgS7fEr0tZJGVU4xqdE80CEm0CcNjha5EZ8fTBYLKHF0kqDUuAwQw==", - "dev": true, + "node_modules/@babel/plugin-transform-unicode-sets-regex": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.22.5.tgz", + "integrity": "sha512-lhMfi4FC15j13eKrh3DnYHjpGj6UKQHtNKTbtc1igvAhRy4+kLhV07OpLcsN0VgDEw/MjAvJO4BdMJsHwMhzCg==", "dependencies": { - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.10", - "@babel/types": "^7.22.10" + "@babel/helper-create-regexp-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, - "node_modules/@babel/highlight": { + "node_modules/@babel/preset-env": { "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.10.tgz", - "integrity": "sha512-78aUtVcT7MUscr0K5mIEnkwxPE0MaxkR5RxRwuHaQ+JuU5AmTPhY+do2mdzVTnIJJpyBglql2pehuBIWHug+WQ==", - "dev": true, + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.22.10.tgz", + "integrity": "sha512-riHpLb1drNkpLlocmSyEg4oYJIQFeXAK/d7rI6mbD0XsvoTOOweXDmQPG/ErxsEhWk3rl3Q/3F6RFQlVFS8m0A==", "dependencies": { - "@babel/helper-validator-identifier": "^7.22.5", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0" + "@babel/compat-data": "^7.22.9", + "@babel/helper-compilation-targets": "^7.22.10", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-validator-option": "^7.22.5", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.22.5", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.22.5", + "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2", + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-dynamic-import": "^7.8.3", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3", + "@babel/plugin-syntax-import-assertions": "^7.22.5", + "@babel/plugin-syntax-import-attributes": "^7.22.5", + "@babel/plugin-syntax-import-meta": "^7.10.4", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5", + "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", + "@babel/plugin-transform-arrow-functions": "^7.22.5", + "@babel/plugin-transform-async-generator-functions": "^7.22.10", + "@babel/plugin-transform-async-to-generator": "^7.22.5", + "@babel/plugin-transform-block-scoped-functions": "^7.22.5", + "@babel/plugin-transform-block-scoping": "^7.22.10", + "@babel/plugin-transform-class-properties": "^7.22.5", + "@babel/plugin-transform-class-static-block": "^7.22.5", + "@babel/plugin-transform-classes": "^7.22.6", + "@babel/plugin-transform-computed-properties": "^7.22.5", + "@babel/plugin-transform-destructuring": "^7.22.10", + "@babel/plugin-transform-dotall-regex": "^7.22.5", + "@babel/plugin-transform-duplicate-keys": "^7.22.5", + "@babel/plugin-transform-dynamic-import": "^7.22.5", + "@babel/plugin-transform-exponentiation-operator": "^7.22.5", + "@babel/plugin-transform-export-namespace-from": "^7.22.5", + "@babel/plugin-transform-for-of": "^7.22.5", + "@babel/plugin-transform-function-name": "^7.22.5", + "@babel/plugin-transform-json-strings": "^7.22.5", + "@babel/plugin-transform-literals": "^7.22.5", + "@babel/plugin-transform-logical-assignment-operators": "^7.22.5", + "@babel/plugin-transform-member-expression-literals": "^7.22.5", + "@babel/plugin-transform-modules-amd": "^7.22.5", + "@babel/plugin-transform-modules-commonjs": "^7.22.5", + "@babel/plugin-transform-modules-systemjs": "^7.22.5", + "@babel/plugin-transform-modules-umd": "^7.22.5", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.22.5", + "@babel/plugin-transform-new-target": "^7.22.5", + "@babel/plugin-transform-nullish-coalescing-operator": "^7.22.5", + "@babel/plugin-transform-numeric-separator": "^7.22.5", + "@babel/plugin-transform-object-rest-spread": "^7.22.5", + "@babel/plugin-transform-object-super": "^7.22.5", + "@babel/plugin-transform-optional-catch-binding": "^7.22.5", + "@babel/plugin-transform-optional-chaining": "^7.22.10", + "@babel/plugin-transform-parameters": "^7.22.5", + "@babel/plugin-transform-private-methods": "^7.22.5", + "@babel/plugin-transform-private-property-in-object": "^7.22.5", + "@babel/plugin-transform-property-literals": "^7.22.5", + "@babel/plugin-transform-regenerator": "^7.22.10", + "@babel/plugin-transform-reserved-words": "^7.22.5", + "@babel/plugin-transform-shorthand-properties": "^7.22.5", + "@babel/plugin-transform-spread": "^7.22.5", + "@babel/plugin-transform-sticky-regex": "^7.22.5", + "@babel/plugin-transform-template-literals": "^7.22.5", + "@babel/plugin-transform-typeof-symbol": "^7.22.5", + "@babel/plugin-transform-unicode-escapes": "^7.22.10", + "@babel/plugin-transform-unicode-property-regex": "^7.22.5", + "@babel/plugin-transform-unicode-regex": "^7.22.5", + "@babel/plugin-transform-unicode-sets-regex": "^7.22.5", + "@babel/preset-modules": "0.1.6-no-external-plugins", + "@babel/types": "^7.22.10", + "babel-plugin-polyfill-corejs2": "^0.4.5", + "babel-plugin-polyfill-corejs3": "^0.8.3", + "babel-plugin-polyfill-regenerator": "^0.5.2", + "core-js-compat": "^3.31.0", + "semver": "^6.3.1" }, "engines": { "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/parser": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.10.tgz", - "integrity": "sha512-lNbdGsQb9ekfsnjFGhEiF4hfFqGgfOP3H3d27re3n+CGhNuTSUEQdfWk556sTLNTloczcdM5TYF2LhzmDQKyvQ==", - "dev": true, + "node_modules/@babel/preset-env/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": { - "parser": "bin/babel-parser.js" + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/preset-modules": { + "version": "0.1.6-no-external-plugins", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.6-no-external-plugins.tgz", + "integrity": "sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/types": "^7.4.4", + "esutils": "^2.0.2" }, - "engines": { - "node": ">=6.0.0" + "peerDependencies": { + "@babel/core": "^7.0.0-0 || ^8.0.0-0 <8.0.0" } }, - "node_modules/@babel/plugin-transform-react-jsx-self": { + "node_modules/@babel/preset-react": { "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.22.5.tgz", - "integrity": "sha512-nTh2ogNUtxbiSbxaT4Ds6aXnXEipHweN9YRgOX/oNXdf0cCrGn/+2LozFa3lnPV5D90MkjhgckCPBrsoSc1a7g==", - "dev": true, + "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.22.5.tgz", + "integrity": "sha512-M+Is3WikOpEJHgR385HbuCITPTaPRaNkibTEa9oiofmJvIsrceb4yp9RL9Kb+TE8LznmeyZqpP+Lopwcx59xPQ==", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-validator-option": "^7.22.5", + "@babel/plugin-transform-react-display-name": "^7.22.5", + "@babel/plugin-transform-react-jsx": "^7.22.5", + "@babel/plugin-transform-react-jsx-development": "^7.22.5", + "@babel/plugin-transform-react-pure-annotations": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -382,13 +1851,16 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-react-jsx-source": { + "node_modules/@babel/preset-typescript": { "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.22.5.tgz", - "integrity": "sha512-yIiRO6yobeEIaI0RTbIr8iAK9FcBHLtZq0S89ZPjDLQXBA4xvghaKqI0etp/tF3htTM0sazJKKLz9oEiGRtu7w==", - "dev": true, + "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.22.5.tgz", + "integrity": "sha512-YbPaal9LxztSGhmndR46FmAbkJ/1fAsw293tSU+I5E5h+cnJ3d4GTwyUgGYmOXJYdGA+uNePle4qbaRzj2NISQ==", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-validator-option": "^7.22.5", + "@babel/plugin-syntax-jsx": "^7.22.5", + "@babel/plugin-transform-modules-commonjs": "^7.22.5", + "@babel/plugin-transform-typescript": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -397,11 +1869,26 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/regjsgen": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@babel/regjsgen/-/regjsgen-0.8.0.tgz", + "integrity": "sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==" + }, + "node_modules/@babel/runtime": { + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.10.tgz", + "integrity": "sha512-21t/fkKLMZI4pqP2wlmsQAWnYW1PDyKyyUV4vCi+B25ydmdaYTKXPwCj0BzSUnZf4seIiYvSA3jcZ3gdsMFkLQ==", + "dependencies": { + "regenerator-runtime": "^0.14.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/template": { "version": "7.22.5", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz", "integrity": "sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==", - "dev": true, "dependencies": { "@babel/code-frame": "^7.22.5", "@babel/parser": "^7.22.5", @@ -415,7 +1902,6 @@ "version": "7.22.10", "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.10.tgz", "integrity": "sha512-Q/urqV4pRByiNNpb/f5OSv28ZlGJiFiiTh+GAHktbIrkPhPbl90+uW6SmpoLyZqutrg9AEaEf3Q/ZBRHBXgxig==", - "dev": true, "dependencies": { "@babel/code-frame": "^7.22.10", "@babel/generator": "^7.22.10", @@ -436,7 +1922,6 @@ "version": "7.22.10", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.10.tgz", "integrity": "sha512-obaoigiLrlDZ7TUQln/8m4mSqIW2QFeOrCQc9r+xsaHGNoplVNYlRVpsfE8Vj35GEm2ZH4ZhrNYogs/3fj85kg==", - "dev": true, "dependencies": { "@babel/helper-string-parser": "^7.22.5", "@babel/helper-validator-identifier": "^7.22.5", @@ -446,6 +1931,24 @@ "node": ">=6.9.0" } }, + "node_modules/@emotion/is-prop-valid": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.2.1.tgz", + "integrity": "sha512-61Mf7Ufx4aDxx1xlDeOm8aFFigGHE4z+0sKCa+IHCeZKiyP9RLD0Mmx7m8b9/Cf37f7NAvQOOJAbQQGVr5uERw==", + "dependencies": { + "@emotion/memoize": "^0.8.1" + } + }, + "node_modules/@emotion/memoize": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.1.tgz", + "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==" + }, + "node_modules/@emotion/unitless": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.8.1.tgz", + "integrity": "sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ==" + }, "node_modules/@esbuild/android-arm": { "version": "0.18.20", "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz", @@ -906,7 +2409,6 @@ "version": "0.3.3", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", - "dev": true, "dependencies": { "@jridgewell/set-array": "^1.0.1", "@jridgewell/sourcemap-codec": "^1.4.10", @@ -920,7 +2422,6 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", - "dev": true, "engines": { "node": ">=6.0.0" } @@ -929,7 +2430,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "dev": true, "engines": { "node": ">=6.0.0" } @@ -937,19 +2437,23 @@ "node_modules/@jridgewell/sourcemap-codec": { "version": "1.4.15", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.19", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz", "integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==", - "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@nicolo-ribaudo/chokidar-2": { + "version": "2.1.8-no-fsevents.3", + "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8-no-fsevents.3.tgz", + "integrity": "sha512-s88O1aVtXftvp5bCPB7WnmXc5IwOZZ7YPuwNPt+GtOOXpPvad1LfbmjYv+qII7zP6RU2QGnqve27dnLycEnyEQ==", + "optional": true + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -989,6 +2493,14 @@ "resolved": "../../../web", "link": true }, + "node_modules/@types/hast": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.5.tgz", + "integrity": "sha512-SvQi0L/lNpThgPoleH53cdjB3y9zpLlVjRbqB3rH8hx1jiRSBGAhyjV3H+URFjNVRqt2EdYNrbZE5IsGlNfpRg==", + "dependencies": { + "@types/unist": "^2" + } + }, "node_modules/@types/json-schema": { "version": "7.0.12", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz", @@ -998,14 +2510,12 @@ "node_modules/@types/prop-types": { "version": "15.7.5", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", - "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==", - "dev": true + "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==" }, "node_modules/@types/react": { "version": "18.2.20", "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.20.tgz", "integrity": "sha512-WKNtmsLWJM/3D5mG4U84cysVY31ivmyw85dE84fOCk5Hx78wezB/XEjVPWl2JTZ5FkEeaTJf+VgUAUn3PE7Isw==", - "dev": true, "dependencies": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -1021,11 +2531,18 @@ "@types/react": "*" } }, + "node_modules/@types/react-syntax-highlighter": { + "version": "15.5.7", + "resolved": "https://registry.npmjs.org/@types/react-syntax-highlighter/-/react-syntax-highlighter-15.5.7.tgz", + "integrity": "sha512-bo5fEO5toQeyCp0zVHBeggclqf5SQ/Z5blfFmjwO5dkMVGPgmiwZsJh9nu/Bo5L7IHTuGWrja6LxJVE2uB5ZrQ==", + "dependencies": { + "@types/react": "*" + } + }, "node_modules/@types/scheduler": { "version": "0.16.3", "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.3.tgz", - "integrity": "sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ==", - "dev": true + "integrity": "sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ==" }, "node_modules/@types/semver": { "version": "7.5.0", @@ -1033,6 +2550,16 @@ "integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==", "dev": true }, + "node_modules/@types/stylis": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@types/stylis/-/stylis-4.2.0.tgz", + "integrity": "sha512-n4sx2bqL0mW1tvDf/loQ+aMX7GQD3lc3fkCMC55VFNDu/vBOabO+LTIeXKM14xK0ppk5TUGcWRjiSpIlUpghKw==" + }, + "node_modules/@types/unist": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.7.tgz", + "integrity": "sha512-cputDpIbFgLUaGQn6Vqg3/YsJwxUwHLO13v3i5ouxT4lat0khip9AEWxtERujXV9wxIB1EyF97BSJFt6vpdI8g==" + }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "6.4.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.4.0.tgz", @@ -1222,6 +2749,17 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@use-it/interval": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@use-it/interval/-/interval-1.0.0.tgz", + "integrity": "sha512-WQFcnSt/xM/mS8ZtJ0ut5lhPrl+V0HDPPcI/J0eUClsfiD+/r8A7IeW/pVcfpSVGWRmN3+WnjNteWuKyWs2WZg==", + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "react": ">=16.8" + } + }, "node_modules/@vitejs/plugin-react": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.0.4.tgz", @@ -1290,7 +2828,6 @@ "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, "dependencies": { "color-convert": "^1.9.0" }, @@ -1298,6 +2835,19 @@ "node": ">=4" } }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "optional": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -1313,17 +2863,68 @@ "node": ">=8" } }, + "node_modules/babel-plugin-polyfill-corejs2": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.5.tgz", + "integrity": "sha512-19hwUH5FKl49JEsvyTcoHakh6BE0wgXLLptIyKZ3PijHc/Ci521wygORCUCCred+E/twuqRyAkE02BAWPmsHOg==", + "dependencies": { + "@babel/compat-data": "^7.22.6", + "@babel/helper-define-polyfill-provider": "^0.4.2", + "semver": "^6.3.1" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + } + }, + "node_modules/babel-plugin-polyfill-corejs2/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/babel-plugin-polyfill-corejs3": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.8.3.tgz", + "integrity": "sha512-z41XaniZL26WLrvjy7soabMXrfPWARN25PZoriDEiLMxAp50AUW3t35BGQUMg5xK3UrpVTtagIDklxYa+MhiNA==", + "dependencies": { + "@babel/helper-define-polyfill-provider": "^0.4.2", + "core-js-compat": "^3.31.0" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + } + }, + "node_modules/babel-plugin-polyfill-regenerator": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.2.tgz", + "integrity": "sha512-tAlOptU0Xj34V1Y2PNTL4Y0FOJMDB6bZmoW39FeCQIhigGLkqu3Fj6uiXpxIf6Ij274ENdYx64y6Au+ZKlb1IA==", + "dependencies": { + "@babel/helper-define-polyfill-provider": "^0.4.2" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "optional": true, + "engines": { + "node": ">=8" + } }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -1333,7 +2934,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, + "devOptional": true, "dependencies": { "fill-range": "^7.0.1" }, @@ -1345,7 +2946,6 @@ "version": "4.21.10", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.10.tgz", "integrity": "sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==", - "dev": true, "funding": [ { "type": "opencollective", @@ -1382,11 +2982,18 @@ "node": ">=6" } }, + "node_modules/camelize": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/camelize/-/camelize-1.0.1.tgz", + "integrity": "sha512-dU+Tx2fsypxTgtLoE36npi3UqcjSSMNYfkqgmoEhtZrraP5VWq0K7FkWVTYa8eMPtnU/G2txVsfdCJTn9uzpuQ==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/caniuse-lite": { "version": "1.0.30001521", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001521.tgz", "integrity": "sha512-fnx1grfpEOvDGH+V17eccmNjucGUnCbP6KL+l5KqBIerp26WK/+RQ7CIDE37KGJjaPyqWXXlFUyKiWmvdNNKmQ==", - "dev": true, "funding": [ { "type": "opencollective", @@ -1406,7 +3013,6 @@ "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -1416,11 +3022,76 @@ "node": ">=4" } }, + "node_modules/character-entities": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz", + "integrity": "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-entities-legacy": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz", + "integrity": "sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-reference-invalid": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz", + "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "optional": true, + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "optional": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, "dependencies": { "color-name": "1.1.3" } @@ -1428,20 +3099,46 @@ "node_modules/color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" + }, + "node_modules/comma-separated-tokens": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-1.0.8.tgz", + "integrity": "sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "engines": { + "node": ">= 6" + } }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" }, "node_modules/convert-source-map": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", - "dev": true + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==" + }, + "node_modules/core-js-compat": { + "version": "3.32.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.32.0.tgz", + "integrity": "sha512-7a9a3D1k4UCVKnLhrgALyFcP7YCsLOQIxPd0dKjf/6GuPcgyiGP70ewWdCGrSK7evyhymi0qO4EqCmSJofDeYw==", + "dependencies": { + "browserslist": "^4.21.9" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } }, "node_modules/cross-spawn": { "version": "7.0.3", @@ -1457,17 +3154,33 @@ "node": ">= 8" } }, + "node_modules/css-color-keywords": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/css-color-keywords/-/css-color-keywords-1.0.0.tgz", + "integrity": "sha512-FyyrDHZKEjXDpNJYvVsV960FiqQyXc/LlYmsxl2BcdMb2WPx0OGRVgTg55rPSyLSNMqP52R9r8geSp7apN3Ofg==", + "engines": { + "node": ">=4" + } + }, + "node_modules/css-to-react-native": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/css-to-react-native/-/css-to-react-native-3.2.0.tgz", + "integrity": "sha512-e8RKaLXMOFii+02mOlqwjbD00KSEKqblnpO9e++1aXS1fPQOpS1YoqdVHBqPjHNoxeF2mimzVqawm2KCbEdtHQ==", + "dependencies": { + "camelize": "^1.0.0", + "css-color-keywords": "^1.0.0", + "postcss-value-parser": "^4.0.2" + } + }, "node_modules/csstype": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz", - "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==", - "dev": true + "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==" }, "node_modules/debug": { "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" }, @@ -1513,8 +3226,7 @@ "node_modules/electron-to-chromium": { "version": "1.4.495", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.495.tgz", - "integrity": "sha512-mwknuemBZnoOCths4GtpU/SDuVMp3uQHKa2UNJT9/aVD6WVRjGpXOxRGX7lm6ILIenTdGXPSTCTDaWos5tEU8Q==", - "dev": true + "integrity": "sha512-mwknuemBZnoOCths4GtpU/SDuVMp3uQHKa2UNJT9/aVD6WVRjGpXOxRGX7lm6ILIenTdGXPSTCTDaWos5tEU8Q==" }, "node_modules/esbuild": { "version": "0.18.20", @@ -1557,7 +3269,6 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true, "engines": { "node": ">=6" } @@ -1566,7 +3277,6 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, "engines": { "node": ">=0.8.0" } @@ -1825,7 +3535,6 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -1882,7 +3591,19 @@ "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", "dev": true, "dependencies": { - "reusify": "^1.0.4" + "reusify": "^1.0.4" + } + }, + "node_modules/fault": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/fault/-/fault-1.0.4.tgz", + "integrity": "sha512-CJ0HCB5tL5fYTEA7ToAq5+kTwd++Borf1/bifxd9iT70QcXr4MRrO3Llf8Ifs70q+SJcGHFtnIE/Nw6giCtECA==", + "dependencies": { + "format": "^0.2.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" } }, "node_modules/file-entry-cache": { @@ -1901,7 +3622,7 @@ "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, + "devOptional": true, "dependencies": { "to-regex-range": "^5.0.1" }, @@ -1944,17 +3665,28 @@ "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", "dev": true }, + "node_modules/format": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/format/-/format-0.2.2.tgz", + "integrity": "sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww==", + "engines": { + "node": ">=0.4.x" + } + }, + "node_modules/fs-readdir-recursive": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", + "integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==" + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, "node_modules/fsevents": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, "hasInstallScript": true, "optional": true, "os": [ @@ -1964,11 +3696,15 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, "node_modules/gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true, "engines": { "node": ">=6.9.0" } @@ -1977,7 +3713,6 @@ "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -2009,7 +3744,6 @@ "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true, "engines": { "node": ">=4" } @@ -2040,15 +3774,58 @@ "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, "node_modules/has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, "engines": { "node": ">=4" } }, + "node_modules/hast-util-parse-selector": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-2.2.5.tgz", + "integrity": "sha512-7j6mrk/qqkSehsM92wQjdIgWM2/BW61u/53G6xmC8i1OmEdKLHbk419QKQUjz6LglWsfqoiHmyMRkP1BGjecNQ==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hastscript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-6.0.0.tgz", + "integrity": "sha512-nDM6bvd7lIqDUiYEiu5Sl/+6ReP0BMk/2f4U/Rooccxkj0P5nm+acM5PrGJ/t5I8qPGiqZSE6hVAwZEdZIvP4w==", + "dependencies": { + "@types/hast": "^2.0.0", + "comma-separated-tokens": "^1.0.0", + "hast-util-parse-selector": "^2.0.0", + "property-information": "^5.0.0", + "space-separated-tokens": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/highlight.js": { + "version": "10.7.3", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", + "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==", + "engines": { + "node": "*" + } + }, "node_modules/ignore": { "version": "5.2.4", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", @@ -2087,7 +3864,6 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -2096,14 +3872,67 @@ "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/is-alphabetical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz", + "integrity": "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-alphanumerical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz", + "integrity": "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==", + "dependencies": { + "is-alphabetical": "^1.0.0", + "is-decimal": "^1.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "optional": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-core-module": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz", + "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==", + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-decimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz", + "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, + "devOptional": true, "engines": { "node": ">=0.10.0" } @@ -2112,7 +3941,7 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, + "devOptional": true, "dependencies": { "is-extglob": "^2.1.1" }, @@ -2120,11 +3949,20 @@ "node": ">=0.10.0" } }, + "node_modules/is-hexadecimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz", + "integrity": "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, + "devOptional": true, "engines": { "node": ">=0.12.0" } @@ -2165,7 +4003,6 @@ "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true, "bin": { "jsesc": "bin/jsesc" }, @@ -2189,7 +4026,6 @@ "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true, "bin": { "json5": "lib/cli.js" }, @@ -2225,6 +4061,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==" + }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -2242,15 +4083,47 @@ "loose-envify": "cli.js" } }, + "node_modules/lowlight": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/lowlight/-/lowlight-1.20.0.tgz", + "integrity": "sha512-8Ktj+prEb1RoCPkEOrPMYUN/nCggB7qAWe3a7OpMjWQkh3l2RD5wKRQ+o8Q8YuI9RG/xs95waaI/E6ym/7NsTw==", + "dependencies": { + "fault": "^1.0.0", + "highlight.js": "~10.7.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, "dependencies": { "yallist": "^3.0.2" } }, + "node_modules/make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dependencies": { + "pify": "^4.0.1", + "semver": "^5.6.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "bin": { + "semver": "bin/semver" + } + }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -2277,7 +4150,6 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, "dependencies": { "brace-expansion": "^1.1.7" }, @@ -2288,14 +4160,12 @@ "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==", - "dev": true + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/nanoid": { "version": "3.3.6", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", - "dev": true, "funding": [ { "type": "github", @@ -2318,14 +4188,21 @@ "node_modules/node-releases": { "version": "2.0.13", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", - "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", - "dev": true + "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==" + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "optional": true, + "engines": { + "node": ">=0.10.0" + } }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, "dependencies": { "wrappy": "1" } @@ -2389,6 +4266,23 @@ "node": ">=6" } }, + "node_modules/parse-entities": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", + "integrity": "sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==", + "dependencies": { + "character-entities": "^1.0.0", + "character-entities-legacy": "^1.0.0", + "character-reference-invalid": "^1.0.0", + "is-alphanumerical": "^1.0.0", + "is-decimal": "^1.0.0", + "is-hexadecimal": "^1.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -2402,7 +4296,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -2416,6 +4309,11 @@ "node": ">=8" } }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, "node_modules/path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", @@ -2428,14 +4326,13 @@ "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, + "devOptional": true, "engines": { "node": ">=8.6" }, @@ -2443,11 +4340,18 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "engines": { + "node": ">=6" + } + }, "node_modules/postcss": { "version": "8.4.28", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.28.tgz", "integrity": "sha512-Z7V5j0cq8oEKyejIKfpD8b4eBy9cwW2JWPk0+fB1HOAMsfHbnAXLLS+PfVWlzMSLQaWttKDt607I0XHmpE67Vw==", - "dev": true, "funding": [ { "type": "opencollective", @@ -2471,6 +4375,11 @@ "node": "^10 || ^12 || >=14" } }, + "node_modules/postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==" + }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -2480,6 +4389,26 @@ "node": ">= 0.8.0" } }, + "node_modules/prismjs": { + "version": "1.29.0", + "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.29.0.tgz", + "integrity": "sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q==", + "engines": { + "node": ">=6" + } + }, + "node_modules/property-information": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/property-information/-/property-information-5.6.0.tgz", + "integrity": "sha512-YUHSPk+A30YPv+0Qf8i9Mbfe/C0hdPXk1s1jPVToV8pk8BQtpw10ct89Eo7OWkutrwqvT0eicAxlOg3dOAu8JA==", + "dependencies": { + "xtend": "^4.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/punycode": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", @@ -2520,6 +4449,24 @@ "node": ">=0.10.0" } }, + "node_modules/react-code-blocks": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/react-code-blocks/-/react-code-blocks-0.1.3.tgz", + "integrity": "sha512-GUtzjR6VFitpx1S0txn783mJdzeEdlchkk1LjFVXGuuHOHm+hVHqv4VHAGXMGskxSWHywh7lGB3BnOlyiJOPfQ==", + "dependencies": { + "@babel/runtime": "^7.10.4", + "@types/react-syntax-highlighter": "^15.5.7", + "react-syntax-highlighter": "^15.5.0", + "styled-components": "^6.0.5", + "tslib": "^2.6.0" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "react": ">=16" + } + }, "node_modules/react-dom": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", @@ -2541,6 +4488,135 @@ "node": ">=0.10.0" } }, + "node_modules/react-syntax-highlighter": { + "version": "15.5.0", + "resolved": "https://registry.npmjs.org/react-syntax-highlighter/-/react-syntax-highlighter-15.5.0.tgz", + "integrity": "sha512-+zq2myprEnQmH5yw6Gqc8lD55QHnpKaU8TOcFeC/Lg/MQSs8UknEA0JC4nTZGFAXC2J2Hyj/ijJ7NlabyPi2gg==", + "dependencies": { + "@babel/runtime": "^7.3.1", + "highlight.js": "^10.4.1", + "lowlight": "^1.17.0", + "prismjs": "^1.27.0", + "refractor": "^3.6.0" + }, + "peerDependencies": { + "react": ">= 0.14.0" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "optional": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/refractor": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/refractor/-/refractor-3.6.0.tgz", + "integrity": "sha512-MY9W41IOWxxk31o+YvFCNyNzdkc9M20NoZK5vq6jkv4I/uh2zkWcfudj0Q1fovjUQJrNewS9NMzeTtqPf+n5EA==", + "dependencies": { + "hastscript": "^6.0.0", + "parse-entities": "^2.0.0", + "prismjs": "~1.27.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/refractor/node_modules/prismjs": { + "version": "1.27.0", + "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.27.0.tgz", + "integrity": "sha512-t13BGPUlFDR7wRB5kQDG4jjl7XeuH6jbJGt11JHPL96qwsEHNX2+68tFXqc1/k+/jALsbSWJKUOT/hcYAZ5LkA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/regenerate": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", + "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==" + }, + "node_modules/regenerate-unicode-properties": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.0.tgz", + "integrity": "sha512-d1VudCLoIGitcU/hEg2QqvyGZQmdC0Lf8BqdOMXGFSvJP4bNV1+XqbPQeHHLD51Jh4QJJ225dlIFvY4Ly6MXmQ==", + "dependencies": { + "regenerate": "^1.4.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/regenerator-runtime": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz", + "integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==" + }, + "node_modules/regenerator-transform": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.2.tgz", + "integrity": "sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg==", + "dependencies": { + "@babel/runtime": "^7.8.4" + } + }, + "node_modules/regexpu-core": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.3.2.tgz", + "integrity": "sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ==", + "dependencies": { + "@babel/regjsgen": "^0.8.0", + "regenerate": "^1.4.2", + "regenerate-unicode-properties": "^10.1.0", + "regjsparser": "^0.9.1", + "unicode-match-property-ecmascript": "^2.0.0", + "unicode-match-property-value-ecmascript": "^2.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/regjsparser": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.9.1.tgz", + "integrity": "sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==", + "dependencies": { + "jsesc": "~0.5.0" + }, + "bin": { + "regjsparser": "bin/parser" + } + }, + "node_modules/regjsparser/node_modules/jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==", + "bin": { + "jsesc": "bin/jsesc" + } + }, + "node_modules/resolve": { + "version": "1.22.4", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.4.tgz", + "integrity": "sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==", + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", @@ -2655,6 +4731,11 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, + "node_modules/shallowequal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", + "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==" + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -2689,11 +4770,19 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", - "dev": true, "engines": { "node": ">=0.10.0" } }, + "node_modules/space-separated-tokens": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-1.1.5.tgz", + "integrity": "sha512-q/JSVd1Lptzhf5bkYm4ob4iWPjx0KiRe3sRFBNrVqbJkFaBm5vbbowy1mymoPNLRa52+oadOhJ+K49wsSeSjTA==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -2718,11 +4807,58 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/styled-components": { + "version": "6.0.7", + "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-6.0.7.tgz", + "integrity": "sha512-xIwWuiRMYR43mskVsW9MGTRjSo7ol4bcVjT595fGUp3OLBJOlOgaiKaxsHdC4a2HqWKqKnh0CmcRbk5ogyDjTg==", + "dependencies": { + "@babel/cli": "^7.21.0", + "@babel/core": "^7.21.0", + "@babel/helper-module-imports": "^7.18.6", + "@babel/plugin-external-helpers": "^7.18.6", + "@babel/plugin-proposal-class-properties": "^7.18.6", + "@babel/plugin-proposal-object-rest-spread": "^7.20.7", + "@babel/preset-env": "^7.20.2", + "@babel/preset-react": "^7.18.6", + "@babel/preset-typescript": "^7.21.0", + "@babel/traverse": "^7.21.2", + "@emotion/is-prop-valid": "^1.2.1", + "@emotion/unitless": "^0.8.0", + "@types/stylis": "^4.0.2", + "css-to-react-native": "^3.2.0", + "csstype": "^3.1.2", + "postcss": "^8.4.23", + "shallowequal": "^1.1.0", + "stylis": "^4.3.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/styled-components" + }, + "peerDependencies": { + "babel-plugin-styled-components": ">= 2", + "react": ">= 16.8.0", + "react-dom": ">= 16.8.0" + }, + "peerDependenciesMeta": { + "babel-plugin-styled-components": { + "optional": true + } + } + }, + "node_modules/stylis": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.0.tgz", + "integrity": "sha512-E87pIogpwUsUwXw7dNyU4QDjdgVMy52m+XEOPEKUn161cCzWjjhPSQhByfd1CcNvrOLnXQ6OnnZDwnJrz/Z4YQ==" + }, "node_modules/supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, "dependencies": { "has-flag": "^3.0.0" }, @@ -2730,6 +4866,17 @@ "node": ">=4" } }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -2740,7 +4887,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, "engines": { "node": ">=4" } @@ -2749,7 +4895,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, + "devOptional": true, "dependencies": { "is-number": "^7.0.0" }, @@ -2769,6 +4915,11 @@ "typescript": ">=4.2.0" } }, + "node_modules/tslib": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.1.tgz", + "integrity": "sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==" + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -2806,11 +4957,46 @@ "node": ">=14.17" } }, + "node_modules/unicode-canonical-property-names-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", + "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==", + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-match-property-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", + "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", + "dependencies": { + "unicode-canonical-property-names-ecmascript": "^2.0.0", + "unicode-property-aliases-ecmascript": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-match-property-value-ecmascript": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.1.0.tgz", + "integrity": "sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA==", + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-property-aliases-ecmascript": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz", + "integrity": "sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==", + "engines": { + "node": ">=4" + } + }, "node_modules/update-browserslist-db": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", - "dev": true, "funding": [ { "type": "opencollective", @@ -2918,14 +5104,20 @@ "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "engines": { + "node": ">=0.4" + } }, "node_modules/yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" }, "node_modules/yocto-queue": { "version": "0.1.0", diff --git a/samples/connect-basic/connect-app/package.json b/samples/connect-basic/connect-app/package.json index be42628a6..b90c5f1e4 100644 --- a/samples/connect-basic/connect-app/package.json +++ b/samples/connect-basic/connect-app/package.json @@ -11,7 +11,9 @@ }, "dependencies": { "@trinsic/trinsic": "file:../../../web", + "@use-it/interval": "^1.0.0", "react": "^18.2.0", + "react-code-blocks": "^0.1.3", "react-dom": "^18.2.0" }, "devDependencies": { diff --git a/samples/connect-basic/connect-app/src/App.tsx b/samples/connect-basic/connect-app/src/App.tsx index a40ad5edd..d25c974fa 100644 --- a/samples/connect-basic/connect-app/src/App.tsx +++ b/samples/connect-basic/connect-app/src/App.tsx @@ -1,11 +1,21 @@ -import { useState } from "react"; +import {useState} from "react"; import reactLogo from "./assets/react.svg"; import viteLogo from "/vite.svg"; import "./App.css"; -import {connectInit, SessionResult} from "./shared.ts"; +import {connectGetSession, connectInit, FlowType, SessionResult, showTrinsicConnect} from "./shared.ts"; +import {CodeBlock, dracula} from "react-code-blocks"; +import useInterval from "@use-it/interval"; function App() { const [clientToken, setClientToken] = useState("N/A"); + const [verifiablePresentation, setVerifiablePresentation] = useState("No VP"); + const [verifyStatus, setVerifyStatus] = useState("No Flippin Idea"); + + useInterval(async () => { + console.log("Checking for session status"); + const vpResult = await connectGetSession(); + setVerifyStatus(vpResult.status); + },3*1000); return ( <> @@ -24,14 +34,42 @@ function App() {

Vite + React

- Client token:

{clientToken}
+ Client token:

- + +

+ Current Status: {verifyStatus} +

+

Edit src/App.tsx and save to test HMR

diff --git a/samples/connect-basic/connect-app/src/shared.ts b/samples/connect-basic/connect-app/src/shared.ts index ac68aa43e..9cc491741 100644 --- a/samples/connect-basic/connect-app/src/shared.ts +++ b/samples/connect-basic/connect-app/src/shared.ts @@ -1,33 +1,91 @@ export type SessionResult = { client_token: string; verifiable_presentation: string; -} + status: string; +}; export const backendUrl = "http://localhost:3000"; export const frontendUrl = "http://localhost:5173"; - export async function connectInit(): Promise { // This should be a POST request - const response = await fetch( backendUrl + "/connect_init",{ method: "POST", headers: { - 'Content-Type': 'application/json', - 'Access-Control-Allow-Origin': '*' - }}); + const response = await fetch(backendUrl + "/connect_init", { + method: "POST", + headers: { + "Content-Type": "application/json", + "Access-Control-Allow-Origin": "*", + }, + }); return await response.json(); } export async function connectGetSession(): Promise { - const response = await fetch(backendUrl + "/connect_get_session",{ method: "POST", headers: { - 'Content-Type': 'application/json', - 'Access-Control-Allow-Origin': '*' - }}); + const response = await fetch(backendUrl + "/connect_get_session", { + method: "POST", + headers: { + "Content-Type": "application/json", + "Access-Control-Allow-Origin": "*", + }, + }); return await response.json(); } export async function connectCancel(): Promise { - const response = await fetch(backendUrl + "/connect_cancel",{ method: "POST", headers: { - 'Content-Type': 'application/json', - 'Access-Control-Allow-Origin': '*' - }}); + const response = await fetch(backendUrl + "/connect_cancel", { + method: "POST", + headers: { + "Content-Type": "application/json", + "Access-Control-Allow-Origin": "*", + }, + }); return await response.json(); -} \ No newline at end of file +} + +export enum FlowType { + POPUP, + EMBEDDED, +} + +export type TrinsicConnectFlowOptions = { + flowType?: FlowType; +}; + +// TODO - Move this into the SDK once we get it working! +export async function showTrinsicConnect( + sessionId: string, + options: TrinsicConnectFlowOptions, +): Promise { + const ecosystemId = "idv"; + // TODO - Handle dev/staging/prod + const connectUrl = "dev-connect.trinsic.cloud"; + const flowType = options.flowType ?? FlowType.EMBEDDED; + const connectParams = { + "trinsic:ecosystem": ecosystemId, + "trinsic:verification_session_id": sessionId, + "trinsic:schema": "https://dev-schema.trinsic.cloud/idv/connect-1" + }; + + const url = `https://${ecosystemId}.${connectUrl}/connect/authorize?${new URLSearchParams(connectParams).toString()}`; + + if (flowType === FlowType.POPUP) { + console.log("Opening popup window to: " + url); + window.open(url); + } else if (flowType === FlowType.EMBEDDED) { + // Create an iframe on the document pointing to `url`, + // position it, etc; create a grayish background layer to obscure the RP + // site. + throw new Error("Not implemented"); + } + + // Wait for the IDV flow to post a message back from the popup or iframe and + // resolve/reject the promise in response + return new Promise((resolve, reject) => { + window.addEventListener("message", (evt) => { + // do security checks eg message comes from right place etc + if (evt.data.verificationSessionId !== sessionId) return; + + if (evt.data.success) resolve(sessionId); + else reject(evt.data.message); + }); + }); +} diff --git a/samples/connect-basic/connect-backend/src/app.ts b/samples/connect-basic/connect-backend/src/app.ts index 61eb39d57..a6e90c149 100644 --- a/samples/connect-basic/connect-backend/src/app.ts +++ b/samples/connect-basic/connect-backend/src/app.ts @@ -1,16 +1,24 @@ import express from "express"; -import {FetchTransport} from "nice-grpc-web"; -import bodyParser from 'body-parser'; -import {SessionResult} from "./shared"; +import { FetchTransport } from "nice-grpc-web"; +import bodyParser from "body-parser"; +import { SessionResult } from "./shared"; import cors from "cors"; -import {TrinsicService, TransportProvider, IDVSessionState, VerificationType} from "@trinsic/trinsic"; +import { + TrinsicService, + TransportProvider, + IDVSessionState, + VerificationType, +} from "@trinsic/trinsic"; const app = express(); const port = 3000; TransportProvider.overrideTransport = FetchTransport(); -const trinsic = new TrinsicService({ authToken: process.env.TRINSIC_AUTH_TOKEN, serverEndpoint: "dev-internal.trinsic.cloud" }); +const trinsic = new TrinsicService({ + authToken: process.env.TRINSIC_AUTH_TOKEN, + serverEndpoint: "dev-internal.trinsic.cloud", +}); const connectSvc = trinsic.connect(); let sessionId = "SESSION-ID-KEY"; const mockDatabase = new Map(); @@ -34,9 +42,11 @@ const htmlContent = ` `; // Allow requests without the 'Origin' header -app.use(cors({ - origin: "*" -})); +app.use( + cors({ + origin: "*", + }), +); app.use(bodyParser.json()); @@ -51,11 +61,16 @@ app.post("/connect_init", async (req, res) => { // const { sessionId } = req.body; // Create a connect session // Open connect session using government id - const result = await connectSvc.createSession({verifications: [{type: VerificationType.GOVERNMENT_ID }]}) + const result = await connectSvc.createSession({ + verifications: [{ type: VerificationType.GOVERNMENT_ID }], + }); mockDatabase.set(sessionId, result.session.id); - req.read() + req.read(); // Return the client_token to the user - const sessionResult: SessionResult = { client_token: result.session.clientToken, verifiable_presentation: "" }; + const sessionResult: SessionResult = { + client_token: result.session.clientToken, + verifiable_presentation: "", + }; res.status(200).json(sessionResult); }); @@ -63,9 +78,15 @@ app.post("/connect_get_session", async (req, res) => { console.log("POST /connect_get_session"); // const {sessionId} = req.body; // Use the `id` to get the session - const result = await connectSvc.getSession({idvSessionId: mockDatabase.get(sessionId)}); + const result = await connectSvc.getSession({ + idvSessionId: mockDatabase.get(sessionId), + }); - const sessionResult: SessionResult = { client_token: "", verifiable_presentation: "" }; + const sessionResult: SessionResult = { + client_token: "", + verifiable_presentation: "", + status: result.session.state.toString(), + }; if (result.session.state === IDVSessionState.IDV_SUCCESS) { // Return the session @@ -81,7 +102,9 @@ app.post("/connect_get_session", async (req, res) => { app.post("/connect_cancel", async (req, res) => { console.log("POST /connect_cancel"); // TODO - Call the `CancelSession` endpoint to terminate - const result = await connectSvc.cancelSession({idvSessionId: mockDatabase.get(sessionId)}); + const result = await connectSvc.cancelSession({ + idvSessionId: mockDatabase.get(sessionId), + }); res.status(200); }); diff --git a/samples/connect-basic/connect-backend/src/shared.ts b/samples/connect-basic/connect-backend/src/shared.ts index 70dcd42b8..9cc491741 100644 --- a/samples/connect-basic/connect-backend/src/shared.ts +++ b/samples/connect-basic/connect-backend/src/shared.ts @@ -1,23 +1,91 @@ export type SessionResult = { client_token: string; verifiable_presentation: string; -} + status: string; +}; export const backendUrl = "http://localhost:3000"; export const frontendUrl = "http://localhost:5173"; - export async function connectInit(): Promise { - const response = await fetch(backendUrl + "/connect_init"); + // This should be a POST request + const response = await fetch(backendUrl + "/connect_init", { + method: "POST", + headers: { + "Content-Type": "application/json", + "Access-Control-Allow-Origin": "*", + }, + }); return await response.json(); } export async function connectGetSession(): Promise { - const response = await fetch(backendUrl + "/connect_get_session"); + const response = await fetch(backendUrl + "/connect_get_session", { + method: "POST", + headers: { + "Content-Type": "application/json", + "Access-Control-Allow-Origin": "*", + }, + }); return await response.json(); } export async function connectCancel(): Promise { - const response = await fetch(backendUrl + "/connect_cancel"); + const response = await fetch(backendUrl + "/connect_cancel", { + method: "POST", + headers: { + "Content-Type": "application/json", + "Access-Control-Allow-Origin": "*", + }, + }); return await response.json(); -} \ No newline at end of file +} + +export enum FlowType { + POPUP, + EMBEDDED, +} + +export type TrinsicConnectFlowOptions = { + flowType?: FlowType; +}; + +// TODO - Move this into the SDK once we get it working! +export async function showTrinsicConnect( + sessionId: string, + options: TrinsicConnectFlowOptions, +): Promise { + const ecosystemId = "idv"; + // TODO - Handle dev/staging/prod + const connectUrl = "dev-connect.trinsic.cloud"; + const flowType = options.flowType ?? FlowType.EMBEDDED; + const connectParams = { + "trinsic:ecosystem": ecosystemId, + "trinsic:verification_session_id": sessionId, + "trinsic:schema": "https://dev-schema.trinsic.cloud/idv/connect-1" + }; + + const url = `https://${ecosystemId}.${connectUrl}/connect/authorize?${new URLSearchParams(connectParams).toString()}`; + + if (flowType === FlowType.POPUP) { + console.log("Opening popup window to: " + url); + window.open(url); + } else if (flowType === FlowType.EMBEDDED) { + // Create an iframe on the document pointing to `url`, + // position it, etc; create a grayish background layer to obscure the RP + // site. + throw new Error("Not implemented"); + } + + // Wait for the IDV flow to post a message back from the popup or iframe and + // resolve/reject the promise in response + return new Promise((resolve, reject) => { + window.addEventListener("message", (evt) => { + // do security checks eg message comes from right place etc + if (evt.data.verificationSessionId !== sessionId) return; + + if (evt.data.success) resolve(sessionId); + else reject(evt.data.message); + }); + }); +} From 21aea34826feec2d557b511187046e08d75699cc Mon Sep 17 00:00:00 2001 From: Scott Phillips Date: Fri, 18 Aug 2023 14:06:47 -0400 Subject: [PATCH 5/6] spike: CORS SUX --- .../connect-app/package-lock.json | 39 ++++++++++++++++- .../connect-basic/connect-app/package.json | 3 +- samples/connect-basic/connect-app/src/App.tsx | 20 +++++---- samples/connect-basic/connect-app/src/util.ts | 23 ++++++++++ .../connect-basic/connect-app/tsconfig.json | 3 +- .../connect-basic/connect-backend/src/app.ts | 43 ++++++++++++------- 6 files changed, 104 insertions(+), 27 deletions(-) create mode 100644 samples/connect-basic/connect-app/src/util.ts diff --git a/samples/connect-basic/connect-app/package-lock.json b/samples/connect-basic/connect-app/package-lock.json index bba457d8c..e969c4db4 100644 --- a/samples/connect-basic/connect-app/package-lock.json +++ b/samples/connect-basic/connect-app/package-lock.json @@ -12,7 +12,8 @@ "@use-it/interval": "^1.0.0", "react": "^18.2.0", "react-code-blocks": "^0.1.3", - "react-dom": "^18.2.0" + "react-dom": "^18.2.0", + "react-polling": "^1.0.9" }, "devDependencies": { "@types/react": "^18.2.15", @@ -4199,6 +4200,15 @@ "node": ">=0.10.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==", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -4397,6 +4407,17 @@ "node": ">=6" } }, + "node_modules/prop-types": { + "version": "15.8.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "peer": true, + "dependencies": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.13.1" + } + }, "node_modules/property-information": { "version": "5.6.0", "resolved": "https://registry.npmjs.org/property-information/-/property-information-5.6.0.tgz", @@ -4479,6 +4500,22 @@ "react": "^18.2.0" } }, + "node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "peer": true + }, + "node_modules/react-polling": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/react-polling/-/react-polling-1.0.9.tgz", + "integrity": "sha512-fXRQMbpfp5B8tOjq/JzqsP0V8DcgDbb/piwlnTMHJUgepgyyVPNGqtT0TmaJTIsyS+ujkNWOyjGtjewMoNmdYg==", + "peerDependencies": { + "prop-types": "^15.6.0", + "react": ">=15.0.0", + "react-dom": ">=15.0.0" + } + }, "node_modules/react-refresh": { "version": "0.14.0", "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.0.tgz", diff --git a/samples/connect-basic/connect-app/package.json b/samples/connect-basic/connect-app/package.json index b90c5f1e4..422b4ece5 100644 --- a/samples/connect-basic/connect-app/package.json +++ b/samples/connect-basic/connect-app/package.json @@ -14,7 +14,8 @@ "@use-it/interval": "^1.0.0", "react": "^18.2.0", "react-code-blocks": "^0.1.3", - "react-dom": "^18.2.0" + "react-dom": "^18.2.0", + "react-polling": "^1.0.9" }, "devDependencies": { "@types/react": "^18.2.15", diff --git a/samples/connect-basic/connect-app/src/App.tsx b/samples/connect-basic/connect-app/src/App.tsx index d25c974fa..faa122c70 100644 --- a/samples/connect-basic/connect-app/src/App.tsx +++ b/samples/connect-basic/connect-app/src/App.tsx @@ -4,7 +4,7 @@ import viteLogo from "/vite.svg"; import "./App.css"; import {connectGetSession, connectInit, FlowType, SessionResult, showTrinsicConnect} from "./shared.ts"; import {CodeBlock, dracula} from "react-code-blocks"; -import useInterval from "@use-it/interval"; +import {useInterval} from "./util.ts"; function App() { const [clientToken, setClientToken] = useState("N/A"); @@ -12,11 +12,11 @@ function App() { const [verifyStatus, setVerifyStatus] = useState("No Flippin Idea"); useInterval(async () => { - console.log("Checking for session status"); - const vpResult = await connectGetSession(); - setVerifyStatus(vpResult.status); - },3*1000); + const result = await connectGetSession(); + setVerifyStatus(result.status); + }, 5000); + // @ts-ignore return ( <>
@@ -60,9 +60,13 @@ function App() { > Show Trinsic Connect -

- Current Status: {verifyStatus} -

+ +
Current Status: {verifyStatus}
Promise, delay: number): void { + const savedCallback = useRef(); + + // Remember the latest callback. + useEffect(() => { + // @ts-ignore + savedCallback.current = callback; + }, [callback]); + + // Set up the interval. + useEffect(() => { + function tick() { + // @ts-ignore + savedCallback.current(); + } + if (delay !== null) { + let id = setInterval(tick, delay); + return () => clearInterval(id); + } + }, [delay]); +} \ No newline at end of file diff --git a/samples/connect-basic/connect-app/tsconfig.json b/samples/connect-basic/connect-app/tsconfig.json index 30d6ff14f..a51fd7934 100644 --- a/samples/connect-basic/connect-app/tsconfig.json +++ b/samples/connect-basic/connect-app/tsconfig.json @@ -18,7 +18,8 @@ "strict": true, "noUnusedLocals": true, "noUnusedParameters": true, - "noFallthroughCasesInSwitch": true + "noFallthroughCasesInSwitch": true, + "allowSyntheticDefaultImports": true }, "include": ["src"], "references": [{ "path": "./tsconfig.node.json" }] diff --git a/samples/connect-basic/connect-backend/src/app.ts b/samples/connect-basic/connect-backend/src/app.ts index a6e90c149..0feb84263 100644 --- a/samples/connect-basic/connect-backend/src/app.ts +++ b/samples/connect-basic/connect-backend/src/app.ts @@ -45,6 +45,8 @@ const htmlContent = ` app.use( cors({ origin: "*", + methods: ["GET", "POST"], + credentials: false, }), ); @@ -70,6 +72,7 @@ app.post("/connect_init", async (req, res) => { const sessionResult: SessionResult = { client_token: result.session.clientToken, verifiable_presentation: "", + status: result.session.state.toString(), }; res.status(200).json(sessionResult); }); @@ -78,25 +81,33 @@ app.post("/connect_get_session", async (req, res) => { console.log("POST /connect_get_session"); // const {sessionId} = req.body; // Use the `id` to get the session - const result = await connectSvc.getSession({ - idvSessionId: mockDatabase.get(sessionId), - }); + try { + let idvSessionId = mockDatabase.get(sessionId); - const sessionResult: SessionResult = { - client_token: "", - verifiable_presentation: "", - status: result.session.state.toString(), - }; + const result = await connectSvc.getSession({ + idvSessionId: idvSessionId, + }); + + const sessionResult: SessionResult = { + client_token: "", + verifiable_presentation: "", + status: result.session.state.toString(), + }; - if (result.session.state === IDVSessionState.IDV_SUCCESS) { - // Return the session - sessionResult.verifiable_presentation = result.session.resultVp; - res.status(200); - } else { - // Processing - res.status(102); + if (result.session.state === IDVSessionState.IDV_SUCCESS) { + // Return the session + sessionResult.verifiable_presentation = result.session.resultVp; + res.status(200); + } else { + // Processing + res.status(102); + } + console.log(sessionResult); + res.json(sessionResult); + } catch (error) { + console.log(error); + res.status(500).json({ error: "Session not found" }); } - res.send(JSON.stringify(sessionResult)); }); app.post("/connect_cancel", async (req, res) => { From e7a1b178e0a9b02a6a8bd0ddded72f8f7ee962c2 Mon Sep 17 00:00:00 2001 From: Scott Phillips Date: Fri, 18 Aug 2023 14:24:42 -0400 Subject: [PATCH 6/6] no message --- samples/connect-basic/connect-app/src/App.tsx | 4 ++-- samples/connect-basic/connect-app/src/shared.ts | 1 + samples/connect-basic/connect-backend/src/app.ts | 13 ++++--------- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/samples/connect-basic/connect-app/src/App.tsx b/samples/connect-basic/connect-app/src/App.tsx index faa122c70..3ef14e09d 100644 --- a/samples/connect-basic/connect-app/src/App.tsx +++ b/samples/connect-basic/connect-app/src/App.tsx @@ -12,8 +12,8 @@ function App() { const [verifyStatus, setVerifyStatus] = useState("No Flippin Idea"); useInterval(async () => { - const result = await connectGetSession(); - setVerifyStatus(result.status); + // const result = await connectGetSession(); + // setVerifyStatus(result.status); }, 5000); // @ts-ignore diff --git a/samples/connect-basic/connect-app/src/shared.ts b/samples/connect-basic/connect-app/src/shared.ts index 9cc491741..985f067cc 100644 --- a/samples/connect-basic/connect-app/src/shared.ts +++ b/samples/connect-basic/connect-app/src/shared.ts @@ -81,6 +81,7 @@ export async function showTrinsicConnect( // resolve/reject the promise in response return new Promise((resolve, reject) => { window.addEventListener("message", (evt) => { + console.log("Received message from IDV flow", evt.data); // do security checks eg message comes from right place etc if (evt.data.verificationSessionId !== sessionId) return; diff --git a/samples/connect-basic/connect-backend/src/app.ts b/samples/connect-basic/connect-backend/src/app.ts index 0feb84263..518f49dbf 100644 --- a/samples/connect-basic/connect-backend/src/app.ts +++ b/samples/connect-basic/connect-backend/src/app.ts @@ -45,8 +45,6 @@ const htmlContent = ` app.use( cors({ origin: "*", - methods: ["GET", "POST"], - credentials: false, }), ); @@ -72,13 +70,14 @@ app.post("/connect_init", async (req, res) => { const sessionResult: SessionResult = { client_token: result.session.clientToken, verifiable_presentation: "", - status: result.session.state.toString(), + status: IDVSessionState[result.session.state], }; res.status(200).json(sessionResult); }); app.post("/connect_get_session", async (req, res) => { console.log("POST /connect_get_session"); + req.read(); // const {sessionId} = req.body; // Use the `id` to get the session try { @@ -91,19 +90,15 @@ app.post("/connect_get_session", async (req, res) => { const sessionResult: SessionResult = { client_token: "", verifiable_presentation: "", - status: result.session.state.toString(), + status: IDVSessionState[result.session.state], }; if (result.session.state === IDVSessionState.IDV_SUCCESS) { // Return the session sessionResult.verifiable_presentation = result.session.resultVp; - res.status(200); - } else { - // Processing - res.status(102); } console.log(sessionResult); - res.json(sessionResult); + res.status(200).json(sessionResult); } catch (error) { console.log(error); res.status(500).json({ error: "Session not found" });