From 8a897170d39e594f1f1b9c1745af34d6a9cbc966 Mon Sep 17 00:00:00 2001 From: Carmine Porricelli Date: Thu, 11 Jul 2024 17:52:06 +0200 Subject: [PATCH 01/12] First commit --- .eslintrc.cjs | 24 + .gitignore | 50 + .vscode/settings.json | 11 + package.json | 44 + pnpm-lock.yaml | 2415 ++++++++++++++++++++++++++++ proto/v1/agreement/agreement.proto | 72 + proto/v1/agreement/events.proto | 48 + proto/v1/agreement/state.proto | 15 + proto/v1/eservice/eservice.proto | 84 + proto/v1/eservice/events.proto | 77 + proto/v1/purpose/events.proto | 53 + proto/v1/purpose/purpose.proto | 39 + proto/v1/tenant/events.proto | 26 + proto/v1/tenant/tenant.proto | 59 + proto/v2/agreement/agreement.proto | 72 + proto/v2/agreement/events.proto | 83 + proto/v2/eservice/eservice.proto | 82 + proto/v2/eservice/events.proto | 115 ++ proto/v2/purpose/events.proto | 90 ++ proto/v2/purpose/purpose.proto | 38 + proto/v2/tenant/events.proto | 63 + proto/v2/tenant/tenant.proto | 57 + src/agreement/eventsV1.ts | 106 ++ src/agreement/eventsV2.ts | 189 +++ src/agreement/index.ts | 48 + src/eservice/eventsV1.ts | 143 ++ src/eservice/eventsV2.ts | 206 +++ src/eservice/index.ts | 48 + src/events.ts | 55 + src/index.ts | 4 + src/protobuf.ts | 8 + src/purpose/eventsV1.ts | 113 ++ src/purpose/eventsV2.ts | 174 ++ src/purpose/index.ts | 47 + src/tenant/eventsV1.ts | 60 + src/tenant/eventsV2.ts | 123 ++ src/tenant/index.ts | 48 + tsconfig.check.json | 7 + tsconfig.eslint.json | 11 + tsconfig.json | 13 + 40 files changed, 5020 insertions(+) create mode 100644 .eslintrc.cjs create mode 100644 .gitignore create mode 100644 .vscode/settings.json create mode 100644 package.json create mode 100644 pnpm-lock.yaml create mode 100644 proto/v1/agreement/agreement.proto create mode 100644 proto/v1/agreement/events.proto create mode 100644 proto/v1/agreement/state.proto create mode 100644 proto/v1/eservice/eservice.proto create mode 100644 proto/v1/eservice/events.proto create mode 100644 proto/v1/purpose/events.proto create mode 100644 proto/v1/purpose/purpose.proto create mode 100644 proto/v1/tenant/events.proto create mode 100644 proto/v1/tenant/tenant.proto create mode 100644 proto/v2/agreement/agreement.proto create mode 100644 proto/v2/agreement/events.proto create mode 100644 proto/v2/eservice/eservice.proto create mode 100644 proto/v2/eservice/events.proto create mode 100644 proto/v2/purpose/events.proto create mode 100644 proto/v2/purpose/purpose.proto create mode 100644 proto/v2/tenant/events.proto create mode 100644 proto/v2/tenant/tenant.proto create mode 100644 src/agreement/eventsV1.ts create mode 100644 src/agreement/eventsV2.ts create mode 100644 src/agreement/index.ts create mode 100644 src/eservice/eventsV1.ts create mode 100644 src/eservice/eventsV2.ts create mode 100644 src/eservice/index.ts create mode 100644 src/events.ts create mode 100644 src/index.ts create mode 100644 src/protobuf.ts create mode 100644 src/purpose/eventsV1.ts create mode 100644 src/purpose/eventsV2.ts create mode 100644 src/purpose/index.ts create mode 100644 src/tenant/eventsV1.ts create mode 100644 src/tenant/eventsV2.ts create mode 100644 src/tenant/index.ts create mode 100644 tsconfig.check.json create mode 100644 tsconfig.eslint.json create mode 100644 tsconfig.json diff --git a/.eslintrc.cjs b/.eslintrc.cjs new file mode 100644 index 0000000..2c55890 --- /dev/null +++ b/.eslintrc.cjs @@ -0,0 +1,24 @@ +module.exports = { + extends: ["@pagopa/eslint-config/strong"], + parserOptions: { + tsconfigRootDir: __dirname, + project: "./tsconfig.eslint.json", + }, + rules: { + // Any project level custom rule + "@typescript-eslint/switch-exhaustiveness-check": "error", + "default-case": "off", + "prefer-arrow/prefer-arrow-functions": "off", + eqeqeq: ["error", "smart"], + "@typescript-eslint/consistent-type-definitions": "off", + "sort-keys": "off", + "functional/prefer-readonly-type": "off", + "@typescript-eslint/no-shadow": "off", + "extra-rules/no-commented-out-code": "off", + "sonarjs/no-duplicate-string": "off", + "max-lines-per-function": "off", + "@typescript-eslint/naming-convention": "off", + "@typescript-eslint/no-use-before-define": "off", + }, + ignorePatterns: [".eslintrc.cjs", "**/src/gen/**/*.ts", "**/dist"], +}; diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a3dff20 --- /dev/null +++ b/.gitignore @@ -0,0 +1,50 @@ +# Created by https://www.toptal.com/developers/gitignore/api/node,visualstudiocode +# Edit at https://www.toptal.com/developers/gitignore?templates=node,visualstudiocode + +### Node ### +# Logs +logs +*.log +.pnpm-debug.log* + +# Dependency directories +node_modules/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional stylelint cache +.stylelintcache + +# Output of 'npm pack' +*.tgz + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +### VisualStudioCode ### +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +!.vscode/*.code-snippets + +# Local History for Visual Studio Code +.history/ + +**/dist +/src/gen + +# MinIO container data +docker/minio-data + +### Turbo ### +# Turborepo task cache +.turbo diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..a109034 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,11 @@ +{ + "editor.formatOnSave": true, + "prettier.requireConfig": false, + "editor.codeActionsOnSave": { + "source.fixAll": "explicit" + }, + "typescript.tsdk": "node_modules/typescript/lib", + "files.watcherExclude": { + "**/target": true + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..f274223 --- /dev/null +++ b/package.json @@ -0,0 +1,44 @@ +{ + "name": "pagopa-interop-outbound-models", + "version": "1.0.0", + "private": true, + "description": "PagoPA Interoperability outbound models", + "main": "dist", + "type": "module", + "exports": { + ".": "./dist/index.js" + }, + "scripts": { + "lint": "eslint . --ext .ts,.tsx", + "lint:autofix": "eslint . --ext .ts,.tsx --fix", + "format:check": "prettier --check src", + "format:write": "prettier --write src", + "build": "pnpm generate-protobuf & tsc", + "check": "tsc --project tsconfig.check.json", + "generate-protobuf": "mkdirp ./src/gen && npx protoc --ts_opt=eslint_disable --ts_out ./src/gen --proto_path ./proto ./proto/**/**/*.proto && tsc-esm-fix --src='src/gen/' --ext='.js'" + }, + "keywords": [], + "author": "", + "license": "Apache-2.0", + "dependencies": { + "ts-pattern": "5.2.0", + "zod": "3.23.8" + }, + "devDependencies": { + "eslint": "8.57.0", + "mkdirp": "3.0.1", + "prettier": "2.8.8", + "tsc-esm-fix": "2.20.27", + "typescript": "5.4.5", + "@types/node": "20.14.6", + "@protobuf-ts/protoc": "2.9.4", + "@protobuf-ts/plugin": "2.9.4", + "@protobuf-ts/runtime": "2.9.4", + "@tsconfig/node-lts": "20.1.3", + "@pagopa/eslint-config": "3.0.0" + }, + "config": { + "protocVersion": "26.1" + }, + "packageManager": "pnpm@8.15.8" +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml new file mode 100644 index 0000000..7ba0233 --- /dev/null +++ b/pnpm-lock.yaml @@ -0,0 +1,2415 @@ +lockfileVersion: '6.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +dependencies: + ts-pattern: + specifier: 5.2.0 + version: 5.2.0 + zod: + specifier: 3.23.8 + version: 3.23.8 + +devDependencies: + '@pagopa/eslint-config': + specifier: 3.0.0 + version: 3.0.0(typescript@5.4.5) + '@protobuf-ts/plugin': + specifier: 2.9.4 + version: 2.9.4 + '@protobuf-ts/protoc': + specifier: 2.9.4 + version: 2.9.4 + '@protobuf-ts/runtime': + specifier: 2.9.4 + version: 2.9.4 + '@tsconfig/node-lts': + specifier: 20.1.3 + version: 20.1.3 + '@types/node': + specifier: 20.14.6 + version: 20.14.6 + eslint: + specifier: 8.57.0 + version: 8.57.0 + mkdirp: + specifier: 3.0.1 + version: 3.0.1 + prettier: + specifier: 2.8.8 + version: 2.8.8 + tsc-esm-fix: + specifier: 2.20.27 + version: 2.20.27 + typescript: + specifier: 5.4.5 + version: 5.4.5 + +packages: + + /@es-joy/jsdoccomment@0.36.1: + resolution: {integrity: sha512-922xqFsTpHs6D0BUiG4toiyPOMc8/jafnWKxz1KWgS4XzKPy2qXf1Pe6UFuNSCQqt6tOuhAWXBNuuyUhJmw9Vg==} + engines: {node: ^14 || ^16 || ^17 || ^18 || ^19} + dependencies: + comment-parser: 1.3.1 + esquery: 1.6.0 + jsdoc-type-pratt-parser: 3.1.0 + dev: true + + /@eslint-community/eslint-utils@4.4.0(eslint@8.57.0): + resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + dependencies: + eslint: 8.57.0 + eslint-visitor-keys: 3.4.3 + dev: true + + /@eslint-community/regexpp@4.11.0: + resolution: {integrity: sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + dev: true + + /@eslint/eslintrc@2.1.4: + resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + ajv: 6.12.6 + debug: 4.3.5 + espree: 9.6.1 + globals: 13.24.0 + ignore: 5.3.1 + import-fresh: 3.3.0 + js-yaml: 4.1.0 + minimatch: 3.1.2 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + dev: true + + /@eslint/js@8.57.0: + resolution: {integrity: sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: true + + /@humanwhocodes/config-array@0.11.14: + resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} + engines: {node: '>=10.10.0'} + deprecated: Use @eslint/config-array instead + dependencies: + '@humanwhocodes/object-schema': 2.0.3 + debug: 4.3.5 + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color + dev: true + + /@humanwhocodes/module-importer@1.0.1: + resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} + engines: {node: '>=12.22'} + dev: true + + /@humanwhocodes/object-schema@2.0.3: + resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} + deprecated: Use @eslint/object-schema instead + dev: true + + /@nodelib/fs.scandir@2.1.5: + resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} + engines: {node: '>= 8'} + dependencies: + '@nodelib/fs.stat': 2.0.5 + run-parallel: 1.2.0 + dev: true + + /@nodelib/fs.stat@2.0.5: + resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} + engines: {node: '>= 8'} + dev: true + + /@nodelib/fs.walk@1.2.8: + resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} + engines: {node: '>= 8'} + dependencies: + '@nodelib/fs.scandir': 2.1.5 + fastq: 1.17.1 + dev: true + + /@pagopa/eslint-config@3.0.0(typescript@5.4.5): + resolution: {integrity: sha512-eYIPdiuYRbRPR5k0OuteRNqYb0Z2nfJ/lZohejB7ylfBeSDWwkaV8Z19AXP4RymE6oEesyPDZ6i0yNaE9tQrHw==} + dependencies: + '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@5.4.5) + eslint: 8.57.0 + eslint-config-prettier: 8.10.0(eslint@8.57.0) + eslint-plugin-extra-rules: 0.0.0-development + eslint-plugin-fp: 2.3.0(eslint@8.57.0) + eslint-plugin-functional: 4.4.1(eslint@8.57.0)(typescript@5.4.5) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0)(eslint@8.57.0) + eslint-plugin-jsdoc: 39.9.1(eslint@8.57.0) + eslint-plugin-prefer-arrow: 1.2.3(eslint@8.57.0) + eslint-plugin-prettier: 4.2.1(eslint-config-prettier@8.10.0)(eslint@8.57.0)(prettier@2.8.8) + eslint-plugin-react: 7.34.3(eslint@8.57.0) + eslint-plugin-sonarjs: 0.13.0(eslint@8.57.0) + prettier: 2.8.8 + transitivePeerDependencies: + - eslint-import-resolver-typescript + - eslint-import-resolver-webpack + - supports-color + - tsutils + - typescript + dev: true + + /@protobuf-ts/plugin-framework@2.9.4: + resolution: {integrity: sha512-9nuX1kjdMliv+Pes8dQCKyVhjKgNNfwxVHg+tx3fLXSfZZRcUHMc1PMwB9/vTvc6gBKt9QGz5ERqSqZc0++E9A==} + dependencies: + '@protobuf-ts/runtime': 2.9.4 + typescript: 3.9.10 + dev: true + + /@protobuf-ts/plugin@2.9.4: + resolution: {integrity: sha512-Db5Laq5T3mc6ERZvhIhkj1rn57/p8gbWiCKxQWbZBBl20wMuqKoHbRw4tuD7FyXi+IkwTToaNVXymv5CY3E8Rw==} + hasBin: true + dependencies: + '@protobuf-ts/plugin-framework': 2.9.4 + '@protobuf-ts/protoc': 2.9.4 + '@protobuf-ts/runtime': 2.9.4 + '@protobuf-ts/runtime-rpc': 2.9.4 + typescript: 3.9.10 + dev: true + + /@protobuf-ts/protoc@2.9.4: + resolution: {integrity: sha512-hQX+nOhFtrA+YdAXsXEDrLoGJqXHpgv4+BueYF0S9hy/Jq0VRTVlJS1Etmf4qlMt/WdigEes5LOd/LDzui4GIQ==} + hasBin: true + dev: true + + /@protobuf-ts/runtime-rpc@2.9.4: + resolution: {integrity: sha512-y9L9JgnZxXFqH5vD4d7j9duWvIJ7AShyBRoNKJGhu9Q27qIbchfzli66H9RvrQNIFk5ER7z1Twe059WZGqERcA==} + dependencies: + '@protobuf-ts/runtime': 2.9.4 + dev: true + + /@protobuf-ts/runtime@2.9.4: + resolution: {integrity: sha512-vHRFWtJJB/SiogWDF0ypoKfRIZ41Kq+G9cEFj6Qm1eQaAhJ1LDFvgZ7Ja4tb3iLOQhz0PaoPnnOijF1qmEqTxg==} + dev: true + + /@tsconfig/node-lts@20.1.3: + resolution: {integrity: sha512-m3b7EP2U+h5tNSpaBMfcTuHmHn04wrgRPQQrfKt75YIPq6kPs2153/KfPHdqkEWGx5pEBvS6rnvToT+yTtC1iw==} + dev: true + + /@types/json-schema@7.0.15: + resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} + dev: true + + /@types/json5@0.0.29: + resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} + dev: true + + /@types/node@20.14.6: + resolution: {integrity: sha512-JbA0XIJPL1IiNnU7PFxDXyfAwcwVVrOoqyzzyQTyMeVhBzkJVMSkC1LlVsRQ2lpqiY4n6Bb9oCS6lzDKVQxbZw==} + dependencies: + undici-types: 5.26.5 + dev: true + + /@types/semver@7.5.8: + resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==} + dev: true + + /@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.57.0)(typescript@5.4.5): + resolution: {integrity: sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + '@typescript-eslint/parser': ^5.0.0 + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@eslint-community/regexpp': 4.11.0 + '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/scope-manager': 5.62.0 + '@typescript-eslint/type-utils': 5.62.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/utils': 5.62.0(eslint@8.57.0)(typescript@5.4.5) + debug: 4.3.5 + eslint: 8.57.0 + graphemer: 1.4.0 + ignore: 5.3.1 + natural-compare-lite: 1.4.0 + semver: 7.6.2 + tsutils: 3.21.0(typescript@5.4.5) + typescript: 5.4.5 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.4.5): + resolution: {integrity: sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/scope-manager': 5.62.0 + '@typescript-eslint/types': 5.62.0 + '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.4.5) + debug: 4.3.5 + eslint: 8.57.0 + typescript: 5.4.5 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/scope-manager@5.62.0: + resolution: {integrity: sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + '@typescript-eslint/types': 5.62.0 + '@typescript-eslint/visitor-keys': 5.62.0 + dev: true + + /@typescript-eslint/type-utils@5.62.0(eslint@8.57.0)(typescript@5.4.5): + resolution: {integrity: sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: '*' + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.4.5) + '@typescript-eslint/utils': 5.62.0(eslint@8.57.0)(typescript@5.4.5) + debug: 4.3.5 + eslint: 8.57.0 + tsutils: 3.21.0(typescript@5.4.5) + typescript: 5.4.5 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/types@5.62.0: + resolution: {integrity: sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: true + + /@typescript-eslint/typescript-estree@5.62.0(typescript@5.4.5): + resolution: {integrity: sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/types': 5.62.0 + '@typescript-eslint/visitor-keys': 5.62.0 + debug: 4.3.5 + globby: 11.1.0 + is-glob: 4.0.3 + semver: 7.6.2 + tsutils: 3.21.0(typescript@5.4.5) + typescript: 5.4.5 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/utils@5.62.0(eslint@8.57.0)(typescript@5.4.5): + resolution: {integrity: sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@types/json-schema': 7.0.15 + '@types/semver': 7.5.8 + '@typescript-eslint/scope-manager': 5.62.0 + '@typescript-eslint/types': 5.62.0 + '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.4.5) + eslint: 8.57.0 + eslint-scope: 5.1.1 + semver: 7.6.2 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + + /@typescript-eslint/visitor-keys@5.62.0: + resolution: {integrity: sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + '@typescript-eslint/types': 5.62.0 + eslint-visitor-keys: 3.4.3 + dev: true + + /@ungap/structured-clone@1.2.0: + resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} + dev: true + + /acorn-jsx@2.0.1: + resolution: {integrity: sha512-rbNtu2WkMJAZNnw2rh35whZO2e2N8Q1Dp4PBf/pKJAals6uFbPvVgVcKZ8poUnrkF50thOea1ApmF8W56apnwA==} + dependencies: + acorn: 2.7.0 + dev: true + + /acorn-jsx@5.3.2(acorn@8.12.1): + resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} + peerDependencies: + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + dependencies: + acorn: 8.12.1 + dev: true + + /acorn@2.7.0: + resolution: {integrity: sha512-pXK8ez/pVjqFdAgBkF1YPVRacuLQ9EXBKaKWaeh58WNfMkCmZhOZzu+NtKSPD5PHmCCHheQ5cD29qM1K4QTxIg==} + engines: {node: '>=0.4.0'} + hasBin: true + dev: true + + /acorn@8.12.1: + resolution: {integrity: sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==} + engines: {node: '>=0.4.0'} + hasBin: true + dev: true + + /ajv@6.12.6: + resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} + dependencies: + fast-deep-equal: 3.1.3 + fast-json-stable-stringify: 2.1.0 + json-schema-traverse: 0.4.1 + uri-js: 4.4.1 + dev: true + + /ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + dev: true + + /ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + dependencies: + color-convert: 2.0.1 + dev: true + + /argparse@2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + dev: true + + /array-buffer-byte-length@1.0.1: + resolution: {integrity: sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + is-array-buffer: 3.0.4 + dev: true + + /array-includes@3.1.8: + resolution: {integrity: sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.3 + es-object-atoms: 1.0.0 + get-intrinsic: 1.2.4 + is-string: 1.0.7 + dev: true + + /array-union@2.1.0: + resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} + engines: {node: '>=8'} + dev: true + + /array.prototype.findlast@1.2.5: + resolution: {integrity: sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.3 + es-errors: 1.3.0 + es-object-atoms: 1.0.0 + es-shim-unscopables: 1.0.2 + dev: true + + /array.prototype.findlastindex@1.2.5: + resolution: {integrity: sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.3 + es-errors: 1.3.0 + es-object-atoms: 1.0.0 + es-shim-unscopables: 1.0.2 + dev: true + + /array.prototype.flat@1.3.2: + resolution: {integrity: sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.3 + es-shim-unscopables: 1.0.2 + dev: true + + /array.prototype.flatmap@1.3.2: + resolution: {integrity: sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.3 + es-shim-unscopables: 1.0.2 + dev: true + + /array.prototype.toreversed@1.1.2: + resolution: {integrity: sha512-wwDCoT4Ck4Cz7sLtgUmzR5UV3YF5mFHUlbChCzZBQZ+0m2cl/DH3tKgvphv1nKgFsJ48oCSg6p91q2Vm0I/ZMA==} + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.3 + es-shim-unscopables: 1.0.2 + dev: true + + /array.prototype.tosorted@1.1.4: + resolution: {integrity: sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.3 + es-errors: 1.3.0 + es-shim-unscopables: 1.0.2 + dev: true + + /arraybuffer.prototype.slice@1.0.3: + resolution: {integrity: sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==} + engines: {node: '>= 0.4'} + dependencies: + array-buffer-byte-length: 1.0.1 + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.3 + es-errors: 1.3.0 + get-intrinsic: 1.2.4 + is-array-buffer: 3.0.4 + is-shared-array-buffer: 1.0.3 + dev: true + + /available-typed-arrays@1.0.7: + resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} + engines: {node: '>= 0.4'} + dependencies: + possible-typed-array-names: 1.0.0 + dev: true + + /balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + dev: true + + /brace-expansion@1.1.11: + resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + dev: true + + /braces@3.0.3: + resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} + engines: {node: '>=8'} + dependencies: + fill-range: 7.1.1 + dev: true + + /call-bind@1.0.7: + resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} + engines: {node: '>= 0.4'} + dependencies: + es-define-property: 1.0.0 + es-errors: 1.3.0 + function-bind: 1.1.2 + get-intrinsic: 1.2.4 + set-function-length: 1.2.2 + dev: true + + /callsites@3.1.0: + resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} + engines: {node: '>=6'} + dev: true + + /chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + dev: true + + /color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + dependencies: + color-name: 1.1.4 + dev: true + + /color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + dev: true + + /comment-parser@1.3.1: + resolution: {integrity: sha512-B52sN2VNghyq5ofvUsqZjmk6YkihBX5vMSChmSK9v4ShjKf3Vk5Xcmgpw4o+iIgtrnM/u5FiMpz9VKb8lpBveA==} + engines: {node: '>= 12.0.0'} + dev: true + + /concat-map@0.0.1: + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + dev: true + + /console-assert@1.0.0: + resolution: {integrity: sha512-YtowQtZLdzPUlXL+kxMEBclXVOrWzR/+9TAUbIdgnjCkRW8+Dj0y4ajMJtOoQFXEubMONX0fkFS3SNLxx4FQRA==} + dev: true + + /create-eslint-index@1.0.0: + resolution: {integrity: sha512-nXvJjnfDytOOaPOonX0h0a1ggMoqrhdekGeZkD6hkcWYvlCWhU719tKFVh8eU04CnMwu3uwe1JjwuUF2C3k2qg==} + engines: {node: '>=4.0.0'} + dependencies: + lodash.get: 4.4.2 + dev: true + + /cross-spawn@7.0.3: + resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} + engines: {node: '>= 8'} + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + dev: true + + /data-view-buffer@1.0.1: + resolution: {integrity: sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + es-errors: 1.3.0 + is-data-view: 1.0.1 + dev: true + + /data-view-byte-length@1.0.1: + resolution: {integrity: sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + es-errors: 1.3.0 + is-data-view: 1.0.1 + dev: true + + /data-view-byte-offset@1.0.0: + resolution: {integrity: sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + es-errors: 1.3.0 + is-data-view: 1.0.1 + dev: true + + /debug@3.2.7: + resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + dependencies: + ms: 2.1.2 + dev: true + + /debug@4.3.5: + resolution: {integrity: sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + dependencies: + ms: 2.1.2 + dev: true + + /deep-is@0.1.4: + resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + dev: true + + /deepmerge-ts@4.3.0: + resolution: {integrity: sha512-if3ZYdkD2dClhnXR5reKtG98cwyaRT1NeugQoAPTTfsOpV9kqyeiBF9Qa5RHjemb3KzD5ulqygv6ED3t5j9eJw==} + engines: {node: '>=12.4.0'} + dev: true + + /define-data-property@1.1.4: + resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} + engines: {node: '>= 0.4'} + dependencies: + es-define-property: 1.0.0 + es-errors: 1.3.0 + gopd: 1.0.1 + dev: true + + /define-properties@1.2.1: + resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} + engines: {node: '>= 0.4'} + dependencies: + define-data-property: 1.1.4 + has-property-descriptors: 1.0.2 + object-keys: 1.1.1 + dev: true + + /depseek@0.4.1: + resolution: {integrity: sha512-YYfPPajzH9s2qnEva411VJzCMWtArBTfluI9USiKQ+T6xBWFh3C7yPxhaa1KVgJa17v9aRKc+LcRhgxS5/9mOA==} + dev: true + + /dir-glob@3.0.1: + resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} + engines: {node: '>=8'} + dependencies: + path-type: 4.0.0 + dev: true + + /doctrine@2.1.0: + resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} + engines: {node: '>=0.10.0'} + dependencies: + esutils: 2.0.3 + dev: true + + /doctrine@3.0.0: + resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} + engines: {node: '>=6.0.0'} + dependencies: + esutils: 2.0.3 + dev: true + + /es-abstract@1.23.3: + resolution: {integrity: sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==} + engines: {node: '>= 0.4'} + dependencies: + array-buffer-byte-length: 1.0.1 + arraybuffer.prototype.slice: 1.0.3 + available-typed-arrays: 1.0.7 + call-bind: 1.0.7 + data-view-buffer: 1.0.1 + data-view-byte-length: 1.0.1 + data-view-byte-offset: 1.0.0 + es-define-property: 1.0.0 + es-errors: 1.3.0 + es-object-atoms: 1.0.0 + es-set-tostringtag: 2.0.3 + es-to-primitive: 1.2.1 + function.prototype.name: 1.1.6 + get-intrinsic: 1.2.4 + get-symbol-description: 1.0.2 + globalthis: 1.0.4 + gopd: 1.0.1 + has-property-descriptors: 1.0.2 + has-proto: 1.0.3 + has-symbols: 1.0.3 + hasown: 2.0.2 + internal-slot: 1.0.7 + is-array-buffer: 3.0.4 + is-callable: 1.2.7 + is-data-view: 1.0.1 + is-negative-zero: 2.0.3 + is-regex: 1.1.4 + is-shared-array-buffer: 1.0.3 + is-string: 1.0.7 + is-typed-array: 1.1.13 + is-weakref: 1.0.2 + object-inspect: 1.13.2 + object-keys: 1.1.1 + object.assign: 4.1.5 + regexp.prototype.flags: 1.5.2 + safe-array-concat: 1.1.2 + safe-regex-test: 1.0.3 + string.prototype.trim: 1.2.9 + string.prototype.trimend: 1.0.8 + string.prototype.trimstart: 1.0.8 + typed-array-buffer: 1.0.2 + typed-array-byte-length: 1.0.1 + typed-array-byte-offset: 1.0.2 + typed-array-length: 1.0.6 + unbox-primitive: 1.0.2 + which-typed-array: 1.1.15 + dev: true + + /es-define-property@1.0.0: + resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} + engines: {node: '>= 0.4'} + dependencies: + get-intrinsic: 1.2.4 + dev: true + + /es-errors@1.3.0: + resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} + engines: {node: '>= 0.4'} + dev: true + + /es-iterator-helpers@1.0.19: + resolution: {integrity: sha512-zoMwbCcH5hwUkKJkT8kDIBZSz9I6mVG//+lDCinLCGov4+r7NIy0ld8o03M0cJxl2spVf6ESYVS6/gpIfq1FFw==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.3 + es-errors: 1.3.0 + es-set-tostringtag: 2.0.3 + function-bind: 1.1.2 + get-intrinsic: 1.2.4 + globalthis: 1.0.4 + has-property-descriptors: 1.0.2 + has-proto: 1.0.3 + has-symbols: 1.0.3 + internal-slot: 1.0.7 + iterator.prototype: 1.1.2 + safe-array-concat: 1.1.2 + dev: true + + /es-object-atoms@1.0.0: + resolution: {integrity: sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==} + engines: {node: '>= 0.4'} + dependencies: + es-errors: 1.3.0 + dev: true + + /es-set-tostringtag@2.0.3: + resolution: {integrity: sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==} + engines: {node: '>= 0.4'} + dependencies: + get-intrinsic: 1.2.4 + has-tostringtag: 1.0.2 + hasown: 2.0.2 + dev: true + + /es-shim-unscopables@1.0.2: + resolution: {integrity: sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==} + dependencies: + hasown: 2.0.2 + dev: true + + /es-to-primitive@1.2.1: + resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} + engines: {node: '>= 0.4'} + dependencies: + is-callable: 1.2.7 + is-date-object: 1.0.5 + is-symbol: 1.0.4 + dev: true + + /escape-string-regexp@4.0.0: + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} + dev: true + + /eslint-ast-utils@1.1.0: + resolution: {integrity: sha512-otzzTim2/1+lVrlH19EfQQJEhVJSu0zOb9ygb3iapN6UlyaDtyRq4b5U1FuW0v1lRa9Fp/GJyHkSwm6NqABgCA==} + engines: {node: '>=4'} + dependencies: + lodash.get: 4.4.2 + lodash.zip: 4.2.0 + dev: true + + /eslint-config-prettier@8.10.0(eslint@8.57.0): + resolution: {integrity: sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==} + hasBin: true + peerDependencies: + eslint: '>=7.0.0' + dependencies: + eslint: 8.57.0 + dev: true + + /eslint-import-resolver-node@0.3.9: + resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} + dependencies: + debug: 3.2.7 + is-core-module: 2.14.0 + resolve: 1.22.8 + transitivePeerDependencies: + - supports-color + dev: true + + /eslint-module-utils@2.8.1(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.9)(eslint@8.57.0): + resolution: {integrity: sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==} + engines: {node: '>=4'} + peerDependencies: + '@typescript-eslint/parser': '*' + eslint: '*' + eslint-import-resolver-node: '*' + eslint-import-resolver-typescript: '*' + eslint-import-resolver-webpack: '*' + peerDependenciesMeta: + '@typescript-eslint/parser': + optional: true + eslint: + optional: true + eslint-import-resolver-node: + optional: true + eslint-import-resolver-typescript: + optional: true + eslint-import-resolver-webpack: + optional: true + dependencies: + '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@5.4.5) + debug: 3.2.7 + eslint: 8.57.0 + eslint-import-resolver-node: 0.3.9 + transitivePeerDependencies: + - supports-color + dev: true + + /eslint-plugin-extra-rules@0.0.0-development: + resolution: {integrity: sha512-Lib5tzYuLE8IneAYm8LY5oFhAaQ40IgO8BemKZGBpmZgQwgG7zzKLHs+pvUcgn5cjdoPdbZMcr2vTYmuss2l/g==} + engines: {node: '> 0.10.*'} + dependencies: + console-assert: 1.0.0 + espree: 3.0.0-alpha-1 + quote: 0.4.0 + dev: true + + /eslint-plugin-fp@2.3.0(eslint@8.57.0): + resolution: {integrity: sha512-3n2oHibwoIxAht9/+ZaTldhI6brXORgl8oNXqZd+d9xuAQt2SBJ2/aml0oQRMWvXrgsz2WG6wfC++NjzSG3prA==} + engines: {node: '>=4.0.0'} + peerDependencies: + eslint: '>=3' + dependencies: + create-eslint-index: 1.0.0 + eslint: 8.57.0 + eslint-ast-utils: 1.1.0 + lodash: 4.17.21 + req-all: 0.1.0 + dev: true + + /eslint-plugin-functional@4.4.1(eslint@8.57.0)(typescript@5.4.5): + resolution: {integrity: sha512-YhSfHS52Si62Sn126g9wGx+XnWMoWhwEt6ctVXfcJj+xMUiggjOqUVMca7fuLNzX8jYiNBIeU1Y0teHGePZ3NA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^8.0.0 + tsutils: ^3.0.0 + typescript: ^3.4.1 || ^4.0.0 + peerDependenciesMeta: + tsutils: + optional: true + typescript: + optional: true + dependencies: + '@typescript-eslint/utils': 5.62.0(eslint@8.57.0)(typescript@5.4.5) + deepmerge-ts: 4.3.0 + escape-string-regexp: 4.0.0 + eslint: 8.57.0 + semver: 7.6.2 + typescript: 5.4.5 + transitivePeerDependencies: + - supports-color + dev: true + + /eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0)(eslint@8.57.0): + resolution: {integrity: sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==} + engines: {node: '>=4'} + peerDependencies: + '@typescript-eslint/parser': '*' + eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 + peerDependenciesMeta: + '@typescript-eslint/parser': + optional: true + dependencies: + '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@5.4.5) + array-includes: 3.1.8 + array.prototype.findlastindex: 1.2.5 + array.prototype.flat: 1.3.2 + array.prototype.flatmap: 1.3.2 + debug: 3.2.7 + doctrine: 2.1.0 + eslint: 8.57.0 + eslint-import-resolver-node: 0.3.9 + eslint-module-utils: 2.8.1(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.9)(eslint@8.57.0) + hasown: 2.0.2 + is-core-module: 2.14.0 + is-glob: 4.0.3 + minimatch: 3.1.2 + object.fromentries: 2.0.8 + object.groupby: 1.0.3 + object.values: 1.2.0 + semver: 6.3.1 + tsconfig-paths: 3.15.0 + transitivePeerDependencies: + - eslint-import-resolver-typescript + - eslint-import-resolver-webpack + - supports-color + dev: true + + /eslint-plugin-jsdoc@39.9.1(eslint@8.57.0): + resolution: {integrity: sha512-Rq2QY6BZP2meNIs48aZ3GlIlJgBqFCmR55+UBvaDkA3ZNQ0SvQXOs2QKkubakEijV8UbIVbVZKsOVN8G3MuqZw==} + engines: {node: ^14 || ^16 || ^17 || ^18 || ^19} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + dependencies: + '@es-joy/jsdoccomment': 0.36.1 + comment-parser: 1.3.1 + debug: 4.3.5 + escape-string-regexp: 4.0.0 + eslint: 8.57.0 + esquery: 1.6.0 + semver: 7.6.2 + spdx-expression-parse: 3.0.1 + transitivePeerDependencies: + - supports-color + dev: true + + /eslint-plugin-prefer-arrow@1.2.3(eslint@8.57.0): + resolution: {integrity: sha512-J9I5PKCOJretVuiZRGvPQxCbllxGAV/viI20JO3LYblAodofBxyMnZAJ+WGeClHgANnSJberTNoFWWjrWKBuXQ==} + peerDependencies: + eslint: '>=2.0.0' + dependencies: + eslint: 8.57.0 + dev: true + + /eslint-plugin-prettier@4.2.1(eslint-config-prettier@8.10.0)(eslint@8.57.0)(prettier@2.8.8): + resolution: {integrity: sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==} + engines: {node: '>=12.0.0'} + peerDependencies: + eslint: '>=7.28.0' + eslint-config-prettier: '*' + prettier: '>=2.0.0' + peerDependenciesMeta: + eslint-config-prettier: + optional: true + dependencies: + eslint: 8.57.0 + eslint-config-prettier: 8.10.0(eslint@8.57.0) + prettier: 2.8.8 + prettier-linter-helpers: 1.0.0 + dev: true + + /eslint-plugin-react@7.34.3(eslint@8.57.0): + resolution: {integrity: sha512-aoW4MV891jkUulwDApQbPYTVZmeuSyFrudpbTAQuj5Fv8VL+o6df2xIGpw8B0hPjAaih1/Fb0om9grCdyFYemA==} + engines: {node: '>=4'} + peerDependencies: + eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 + dependencies: + array-includes: 3.1.8 + array.prototype.findlast: 1.2.5 + array.prototype.flatmap: 1.3.2 + array.prototype.toreversed: 1.1.2 + array.prototype.tosorted: 1.1.4 + doctrine: 2.1.0 + es-iterator-helpers: 1.0.19 + eslint: 8.57.0 + estraverse: 5.3.0 + jsx-ast-utils: 3.3.5 + minimatch: 3.1.2 + object.entries: 1.1.8 + object.fromentries: 2.0.8 + object.hasown: 1.1.4 + object.values: 1.2.0 + prop-types: 15.8.1 + resolve: 2.0.0-next.5 + semver: 6.3.1 + string.prototype.matchall: 4.0.11 + dev: true + + /eslint-plugin-sonarjs@0.13.0(eslint@8.57.0): + resolution: {integrity: sha512-t3m7ta0EspzDxSOZh3cEOJIJVZgN/TlJYaBGnQlK6W/PZNbWep8q4RQskkJkA7/zwNpX0BaoEOSUUrqaADVoqA==} + engines: {node: '>=12'} + peerDependencies: + eslint: ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 + dependencies: + eslint: 8.57.0 + dev: true + + /eslint-scope@5.1.1: + resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} + engines: {node: '>=8.0.0'} + dependencies: + esrecurse: 4.3.0 + estraverse: 4.3.0 + dev: true + + /eslint-scope@7.2.2: + resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 + dev: true + + /eslint-visitor-keys@3.4.3: + resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: true + + /eslint@8.57.0: + resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + hasBin: true + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@eslint-community/regexpp': 4.11.0 + '@eslint/eslintrc': 2.1.4 + '@eslint/js': 8.57.0 + '@humanwhocodes/config-array': 0.11.14 + '@humanwhocodes/module-importer': 1.0.1 + '@nodelib/fs.walk': 1.2.8 + '@ungap/structured-clone': 1.2.0 + ajv: 6.12.6 + chalk: 4.1.2 + cross-spawn: 7.0.3 + debug: 4.3.5 + 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.6.0 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 6.0.1 + find-up: 5.0.0 + glob-parent: 6.0.2 + globals: 13.24.0 + graphemer: 1.4.0 + ignore: 5.3.1 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + 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.4 + strip-ansi: 6.0.1 + text-table: 0.2.0 + transitivePeerDependencies: + - supports-color + dev: true + + /espree@3.0.0-alpha-1: + resolution: {integrity: sha512-HIv6P6qCt3ciLWri1KrO7EPigKPetBZwfCf0o9TuAxRBEPoUUisCepsZqvM76xRfQf2sheO4BC5R/w3UKhwx4w==} + engines: {node: '>=0.10.0'} + hasBin: true + dependencies: + acorn: 2.7.0 + acorn-jsx: 2.0.1 + dev: true + + /espree@9.6.1: + resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + acorn: 8.12.1 + acorn-jsx: 5.3.2(acorn@8.12.1) + eslint-visitor-keys: 3.4.3 + dev: true + + /esquery@1.6.0: + resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} + engines: {node: '>=0.10'} + dependencies: + estraverse: 5.3.0 + dev: true + + /esrecurse@4.3.0: + resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} + engines: {node: '>=4.0'} + dependencies: + estraverse: 5.3.0 + dev: true + + /estraverse@4.3.0: + resolution: {integrity: sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==} + engines: {node: '>=4.0'} + dev: true + + /estraverse@5.3.0: + resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} + engines: {node: '>=4.0'} + dev: true + + /esutils@2.0.3: + resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} + engines: {node: '>=0.10.0'} + dev: true + + /fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + dev: true + + /fast-diff@1.3.0: + resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==} + dev: true + + /fast-glob@3.3.2: + resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} + engines: {node: '>=8.6.0'} + dependencies: + '@nodelib/fs.stat': 2.0.5 + '@nodelib/fs.walk': 1.2.8 + glob-parent: 5.1.2 + merge2: 1.4.1 + micromatch: 4.0.7 + dev: true + + /fast-json-stable-stringify@2.1.0: + resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} + dev: true + + /fast-levenshtein@2.0.6: + resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + dev: true + + /fastq@1.17.1: + resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} + dependencies: + reusify: 1.0.4 + dev: true + + /file-entry-cache@6.0.1: + resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} + engines: {node: ^10.12.0 || >=12.0.0} + dependencies: + flat-cache: 3.2.0 + dev: true + + /fill-range@7.1.1: + resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} + engines: {node: '>=8'} + dependencies: + to-regex-range: 5.0.1 + dev: true + + /find-up@5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + dependencies: + locate-path: 6.0.0 + path-exists: 4.0.0 + dev: true + + /flat-cache@3.2.0: + resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} + engines: {node: ^10.12.0 || >=12.0.0} + dependencies: + flatted: 3.3.1 + keyv: 4.5.4 + rimraf: 3.0.2 + dev: true + + /flatted@3.3.1: + resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} + dev: true + + /for-each@0.3.3: + resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} + dependencies: + is-callable: 1.2.7 + dev: true + + /fs-extra@11.2.0: + resolution: {integrity: sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==} + engines: {node: '>=14.14'} + dependencies: + graceful-fs: 4.2.11 + jsonfile: 6.1.0 + universalify: 2.0.1 + dev: true + + /fs.realpath@1.0.0: + resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} + dev: true + + /function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + dev: true + + /function.prototype.name@1.1.6: + resolution: {integrity: sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.3 + functions-have-names: 1.2.3 + dev: true + + /functions-have-names@1.2.3: + resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} + dev: true + + /get-intrinsic@1.2.4: + resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} + engines: {node: '>= 0.4'} + dependencies: + es-errors: 1.3.0 + function-bind: 1.1.2 + has-proto: 1.0.3 + has-symbols: 1.0.3 + hasown: 2.0.2 + dev: true + + /get-symbol-description@1.0.2: + resolution: {integrity: sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + es-errors: 1.3.0 + get-intrinsic: 1.2.4 + dev: true + + /glob-parent@5.1.2: + resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} + engines: {node: '>= 6'} + dependencies: + is-glob: 4.0.3 + dev: true + + /glob-parent@6.0.2: + resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} + engines: {node: '>=10.13.0'} + dependencies: + is-glob: 4.0.3 + dev: true + + /glob@7.2.3: + resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + deprecated: Glob versions prior to v9 are no longer supported + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 3.1.2 + once: 1.4.0 + path-is-absolute: 1.0.1 + dev: true + + /globals@13.24.0: + resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} + engines: {node: '>=8'} + dependencies: + type-fest: 0.20.2 + dev: true + + /globalthis@1.0.4: + resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} + engines: {node: '>= 0.4'} + dependencies: + define-properties: 1.2.1 + gopd: 1.0.1 + dev: true + + /globby@11.1.0: + resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} + engines: {node: '>=10'} + dependencies: + array-union: 2.1.0 + dir-glob: 3.0.1 + fast-glob: 3.3.2 + ignore: 5.3.1 + merge2: 1.4.1 + slash: 3.0.0 + dev: true + + /globby@13.2.2: + resolution: {integrity: sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + dir-glob: 3.0.1 + fast-glob: 3.3.2 + ignore: 5.3.1 + merge2: 1.4.1 + slash: 4.0.0 + dev: true + + /gopd@1.0.1: + resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} + dependencies: + get-intrinsic: 1.2.4 + dev: true + + /graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + dev: true + + /graphemer@1.4.0: + resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + dev: true + + /has-bigints@1.0.2: + resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} + dev: true + + /has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + dev: true + + /has-property-descriptors@1.0.2: + resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} + dependencies: + es-define-property: 1.0.0 + dev: true + + /has-proto@1.0.3: + resolution: {integrity: sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==} + engines: {node: '>= 0.4'} + dev: true + + /has-symbols@1.0.3: + resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} + engines: {node: '>= 0.4'} + dev: true + + /has-tostringtag@1.0.2: + resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} + engines: {node: '>= 0.4'} + dependencies: + has-symbols: 1.0.3 + dev: true + + /hasown@2.0.2: + resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} + engines: {node: '>= 0.4'} + dependencies: + function-bind: 1.1.2 + dev: true + + /ignore@5.3.1: + resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} + engines: {node: '>= 4'} + dev: true + + /import-fresh@3.3.0: + resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} + engines: {node: '>=6'} + dependencies: + parent-module: 1.0.1 + resolve-from: 4.0.0 + dev: true + + /imurmurhash@0.1.4: + resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} + engines: {node: '>=0.8.19'} + dev: true + + /inflight@1.0.6: + resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. + dependencies: + once: 1.4.0 + wrappy: 1.0.2 + dev: true + + /inherits@2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + dev: true + + /internal-slot@1.0.7: + resolution: {integrity: sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==} + engines: {node: '>= 0.4'} + dependencies: + es-errors: 1.3.0 + hasown: 2.0.2 + side-channel: 1.0.6 + dev: true + + /is-array-buffer@3.0.4: + resolution: {integrity: sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + get-intrinsic: 1.2.4 + dev: true + + /is-async-function@2.0.0: + resolution: {integrity: sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==} + engines: {node: '>= 0.4'} + dependencies: + has-tostringtag: 1.0.2 + dev: true + + /is-bigint@1.0.4: + resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} + dependencies: + has-bigints: 1.0.2 + dev: true + + /is-boolean-object@1.1.2: + resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + has-tostringtag: 1.0.2 + dev: true + + /is-callable@1.2.7: + resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} + engines: {node: '>= 0.4'} + dev: true + + /is-core-module@2.14.0: + resolution: {integrity: sha512-a5dFJih5ZLYlRtDc0dZWP7RiKr6xIKzmn/oAYCDvdLThadVgyJwlaoQPmRtMSpz+rk0OGAgIu+TcM9HUF0fk1A==} + engines: {node: '>= 0.4'} + dependencies: + hasown: 2.0.2 + dev: true + + /is-data-view@1.0.1: + resolution: {integrity: sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==} + engines: {node: '>= 0.4'} + dependencies: + is-typed-array: 1.1.13 + dev: true + + /is-date-object@1.0.5: + resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} + engines: {node: '>= 0.4'} + dependencies: + has-tostringtag: 1.0.2 + dev: true + + /is-extglob@2.1.1: + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} + dev: true + + /is-finalizationregistry@1.0.2: + resolution: {integrity: sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw==} + dependencies: + call-bind: 1.0.7 + dev: true + + /is-generator-function@1.0.10: + resolution: {integrity: sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==} + engines: {node: '>= 0.4'} + dependencies: + has-tostringtag: 1.0.2 + dev: true + + /is-glob@4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} + dependencies: + is-extglob: 2.1.1 + dev: true + + /is-map@2.0.3: + resolution: {integrity: sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==} + engines: {node: '>= 0.4'} + dev: true + + /is-negative-zero@2.0.3: + resolution: {integrity: sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==} + engines: {node: '>= 0.4'} + dev: true + + /is-number-object@1.0.7: + resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} + engines: {node: '>= 0.4'} + dependencies: + has-tostringtag: 1.0.2 + dev: true + + /is-number@7.0.0: + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} + engines: {node: '>=0.12.0'} + dev: true + + /is-path-inside@3.0.3: + resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} + engines: {node: '>=8'} + dev: true + + /is-regex@1.1.4: + resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + has-tostringtag: 1.0.2 + dev: true + + /is-set@2.0.3: + resolution: {integrity: sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==} + engines: {node: '>= 0.4'} + dev: true + + /is-shared-array-buffer@1.0.3: + resolution: {integrity: sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + dev: true + + /is-string@1.0.7: + resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} + engines: {node: '>= 0.4'} + dependencies: + has-tostringtag: 1.0.2 + dev: true + + /is-symbol@1.0.4: + resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==} + engines: {node: '>= 0.4'} + dependencies: + has-symbols: 1.0.3 + dev: true + + /is-typed-array@1.1.13: + resolution: {integrity: sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==} + engines: {node: '>= 0.4'} + dependencies: + which-typed-array: 1.1.15 + dev: true + + /is-weakmap@2.0.2: + resolution: {integrity: sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==} + engines: {node: '>= 0.4'} + dev: true + + /is-weakref@1.0.2: + resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} + dependencies: + call-bind: 1.0.7 + dev: true + + /is-weakset@2.0.3: + resolution: {integrity: sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + get-intrinsic: 1.2.4 + dev: true + + /isarray@2.0.5: + resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} + dev: true + + /isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + dev: true + + /iterator.prototype@1.1.2: + resolution: {integrity: sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w==} + dependencies: + define-properties: 1.2.1 + get-intrinsic: 1.2.4 + has-symbols: 1.0.3 + reflect.getprototypeof: 1.0.6 + set-function-name: 2.0.2 + dev: true + + /js-tokens@4.0.0: + resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + dev: true + + /js-yaml@4.1.0: + resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} + hasBin: true + dependencies: + argparse: 2.0.1 + dev: true + + /jsdoc-type-pratt-parser@3.1.0: + resolution: {integrity: sha512-MgtD0ZiCDk9B+eI73BextfRrVQl0oyzRG8B2BjORts6jbunj4ScKPcyXGTbB6eXL4y9TzxCm6hyeLq/2ASzNdw==} + engines: {node: '>=12.0.0'} + dev: true + + /json-buffer@3.0.1: + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + dev: true + + /json-schema-traverse@0.4.1: + resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + dev: true + + /json-stable-stringify-without-jsonify@1.0.1: + resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + dev: true + + /json5@1.0.2: + resolution: {integrity: sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==} + hasBin: true + dependencies: + minimist: 1.2.8 + dev: true + + /json5@2.2.3: + resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} + engines: {node: '>=6'} + hasBin: true + dev: true + + /jsonfile@6.1.0: + resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} + dependencies: + universalify: 2.0.1 + optionalDependencies: + graceful-fs: 4.2.11 + dev: true + + /jsx-ast-utils@3.3.5: + resolution: {integrity: sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==} + engines: {node: '>=4.0'} + dependencies: + array-includes: 3.1.8 + array.prototype.flat: 1.3.2 + object.assign: 4.1.5 + object.values: 1.2.0 + dev: true + + /keyv@4.5.4: + resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + dependencies: + json-buffer: 3.0.1 + dev: true + + /levn@0.4.1: + resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} + engines: {node: '>= 0.8.0'} + dependencies: + prelude-ls: 1.2.1 + type-check: 0.4.0 + dev: true + + /locate-path@6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + dependencies: + p-locate: 5.0.0 + dev: true + + /lodash.get@4.4.2: + resolution: {integrity: sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==} + dev: true + + /lodash.merge@4.6.2: + resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + dev: true + + /lodash.zip@4.2.0: + resolution: {integrity: sha512-C7IOaBBK/0gMORRBd8OETNx3kmOkgIWIPvyDpZSCTwUrpYmgZwJkjZeOD8ww4xbOUOs4/attY+pciKvadNfFbg==} + dev: true + + /lodash@4.17.21: + resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + dev: true + + /loose-envify@1.4.0: + resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} + hasBin: true + dependencies: + js-tokens: 4.0.0 + dev: true + + /meow@12.1.1: + resolution: {integrity: sha512-BhXM0Au22RwUneMPwSCnyhTOizdWoIEPU9sp0Aqa1PnDMR5Wv2FGXYDjuzJEIX+Eo2Rb8xuYe5jrnm5QowQFkw==} + engines: {node: '>=16.10'} + dev: true + + /merge2@1.4.1: + resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} + engines: {node: '>= 8'} + dev: true + + /micromatch@4.0.7: + resolution: {integrity: sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==} + engines: {node: '>=8.6'} + dependencies: + braces: 3.0.3 + picomatch: 2.3.1 + dev: true + + /minimatch@3.1.2: + resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + dependencies: + brace-expansion: 1.1.11 + dev: true + + /minimist@1.2.8: + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + dev: true + + /mkdirp@3.0.1: + resolution: {integrity: sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==} + engines: {node: '>=10'} + hasBin: true + dev: true + + /ms@2.1.2: + resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} + dev: true + + /natural-compare-lite@1.4.0: + resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==} + dev: true + + /natural-compare@1.4.0: + resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + dev: true + + /object-assign@4.1.1: + resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} + engines: {node: '>=0.10.0'} + dev: true + + /object-inspect@1.13.2: + resolution: {integrity: sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==} + engines: {node: '>= 0.4'} + dev: true + + /object-keys@1.1.1: + resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} + engines: {node: '>= 0.4'} + dev: true + + /object.assign@4.1.5: + resolution: {integrity: sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + has-symbols: 1.0.3 + object-keys: 1.1.1 + dev: true + + /object.entries@1.1.8: + resolution: {integrity: sha512-cmopxi8VwRIAw/fkijJohSfpef5PdN0pMQJN6VC/ZKvn0LIknWD8KtgY6KlQdEc4tIjcQ3HxSMmnvtzIscdaYQ==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-object-atoms: 1.0.0 + dev: true + + /object.fromentries@2.0.8: + resolution: {integrity: sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.3 + es-object-atoms: 1.0.0 + dev: true + + /object.groupby@1.0.3: + resolution: {integrity: sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.3 + dev: true + + /object.hasown@1.1.4: + resolution: {integrity: sha512-FZ9LZt9/RHzGySlBARE3VF+gE26TxR38SdmqOqliuTnl9wrKulaQs+4dee1V+Io8VfxqzAfHu6YuRgUy8OHoTg==} + engines: {node: '>= 0.4'} + dependencies: + define-properties: 1.2.1 + es-abstract: 1.23.3 + es-object-atoms: 1.0.0 + dev: true + + /object.values@1.2.0: + resolution: {integrity: sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-object-atoms: 1.0.0 + dev: true + + /once@1.4.0: + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + dependencies: + wrappy: 1.0.2 + dev: true + + /optionator@0.9.4: + resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} + engines: {node: '>= 0.8.0'} + dependencies: + deep-is: 0.1.4 + fast-levenshtein: 2.0.6 + levn: 0.4.1 + prelude-ls: 1.2.1 + type-check: 0.4.0 + word-wrap: 1.2.5 + dev: true + + /p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + dependencies: + yocto-queue: 0.1.0 + dev: true + + /p-locate@5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + dependencies: + p-limit: 3.1.0 + dev: true + + /parent-module@1.0.1: + resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} + engines: {node: '>=6'} + dependencies: + callsites: 3.1.0 + dev: true + + /path-exists@4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + dev: true + + /path-is-absolute@1.0.1: + resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} + engines: {node: '>=0.10.0'} + dev: true + + /path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + dev: true + + /path-parse@1.0.7: + resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + dev: true + + /path-type@4.0.0: + resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} + engines: {node: '>=8'} + dev: true + + /picomatch@2.3.1: + resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} + engines: {node: '>=8.6'} + dev: true + + /possible-typed-array-names@1.0.0: + resolution: {integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==} + engines: {node: '>= 0.4'} + dev: true + + /prelude-ls@1.2.1: + resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} + engines: {node: '>= 0.8.0'} + dev: true + + /prettier-linter-helpers@1.0.0: + resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==} + engines: {node: '>=6.0.0'} + dependencies: + fast-diff: 1.3.0 + dev: true + + /prettier@2.8.8: + resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} + engines: {node: '>=10.13.0'} + hasBin: true + dev: true + + /prop-types@15.8.1: + resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} + dependencies: + loose-envify: 1.4.0 + object-assign: 4.1.1 + react-is: 16.13.1 + dev: true + + /punycode@2.3.1: + resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} + engines: {node: '>=6'} + dev: true + + /queue-microtask@1.2.3: + resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + dev: true + + /quote@0.4.0: + resolution: {integrity: sha512-KHp3y3xDjuBhRx+tYKOgzPnVHMRlgpn2rU450GcU4PL24r1H6ls/hfPrxDwX2pvYMlwODHI2l8WwgoV69x5rUQ==} + dev: true + + /react-is@16.13.1: + resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} + dev: true + + /reflect.getprototypeof@1.0.6: + resolution: {integrity: sha512-fmfw4XgoDke3kdI6h4xcUz1dG8uaiv5q9gcEwLS4Pnth2kxT+GZ7YehS1JTMGBQmtV7Y4GFGbs2re2NqhdozUg==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.3 + es-errors: 1.3.0 + get-intrinsic: 1.2.4 + globalthis: 1.0.4 + which-builtin-type: 1.1.3 + dev: true + + /regexp.prototype.flags@1.5.2: + resolution: {integrity: sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-errors: 1.3.0 + set-function-name: 2.0.2 + dev: true + + /req-all@0.1.0: + resolution: {integrity: sha512-ZdvPr8uXy9ujX3KujwE2P1HWkMYgogIhqeAeyb47MqWjSfyxERSm0TNbN/IapCCmWDufXab04AYrRgObaJCJ6Q==} + engines: {node: '>=4'} + dev: true + + /resolve-from@4.0.0: + resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} + engines: {node: '>=4'} + dev: true + + /resolve@1.22.8: + resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} + hasBin: true + dependencies: + is-core-module: 2.14.0 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + dev: true + + /resolve@2.0.0-next.5: + resolution: {integrity: sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==} + hasBin: true + dependencies: + is-core-module: 2.14.0 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + dev: true + + /reusify@1.0.4: + resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} + engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + dev: true + + /rimraf@3.0.2: + resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + deprecated: Rimraf versions prior to v4 are no longer supported + hasBin: true + dependencies: + glob: 7.2.3 + dev: true + + /run-parallel@1.2.0: + resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + dependencies: + queue-microtask: 1.2.3 + dev: true + + /safe-array-concat@1.1.2: + resolution: {integrity: sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==} + engines: {node: '>=0.4'} + dependencies: + call-bind: 1.0.7 + get-intrinsic: 1.2.4 + has-symbols: 1.0.3 + isarray: 2.0.5 + dev: true + + /safe-regex-test@1.0.3: + resolution: {integrity: sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + es-errors: 1.3.0 + is-regex: 1.1.4 + dev: true + + /semver@6.3.1: + resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} + hasBin: true + dev: true + + /semver@7.6.2: + resolution: {integrity: sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==} + engines: {node: '>=10'} + hasBin: true + dev: true + + /set-function-length@1.2.2: + resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} + engines: {node: '>= 0.4'} + dependencies: + define-data-property: 1.1.4 + es-errors: 1.3.0 + function-bind: 1.1.2 + get-intrinsic: 1.2.4 + gopd: 1.0.1 + has-property-descriptors: 1.0.2 + dev: true + + /set-function-name@2.0.2: + resolution: {integrity: sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==} + engines: {node: '>= 0.4'} + dependencies: + define-data-property: 1.1.4 + es-errors: 1.3.0 + functions-have-names: 1.2.3 + has-property-descriptors: 1.0.2 + dev: true + + /shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + dependencies: + shebang-regex: 3.0.0 + dev: true + + /shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + dev: true + + /side-channel@1.0.6: + resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + es-errors: 1.3.0 + get-intrinsic: 1.2.4 + object-inspect: 1.13.2 + dev: true + + /slash@3.0.0: + resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} + engines: {node: '>=8'} + dev: true + + /slash@4.0.0: + resolution: {integrity: sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==} + engines: {node: '>=12'} + dev: true + + /spdx-exceptions@2.5.0: + resolution: {integrity: sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==} + dev: true + + /spdx-expression-parse@3.0.1: + resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} + dependencies: + spdx-exceptions: 2.5.0 + spdx-license-ids: 3.0.18 + dev: true + + /spdx-license-ids@3.0.18: + resolution: {integrity: sha512-xxRs31BqRYHwiMzudOrpSiHtZ8i/GeionCBDSilhYRj+9gIcI8wCZTlXZKu9vZIVqViP3dcp9qE5G6AlIaD+TQ==} + dev: true + + /string.prototype.matchall@4.0.11: + resolution: {integrity: sha512-NUdh0aDavY2og7IbBPenWqR9exH+E26Sv8e0/eTe1tltDGZL+GtBkDAnnyBtmekfK6/Dq3MkcGtzXFEd1LQrtg==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.3 + es-errors: 1.3.0 + es-object-atoms: 1.0.0 + get-intrinsic: 1.2.4 + gopd: 1.0.1 + has-symbols: 1.0.3 + internal-slot: 1.0.7 + regexp.prototype.flags: 1.5.2 + set-function-name: 2.0.2 + side-channel: 1.0.6 + dev: true + + /string.prototype.trim@1.2.9: + resolution: {integrity: sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.3 + es-object-atoms: 1.0.0 + dev: true + + /string.prototype.trimend@1.0.8: + resolution: {integrity: sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==} + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-object-atoms: 1.0.0 + dev: true + + /string.prototype.trimstart@1.0.8: + resolution: {integrity: sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-object-atoms: 1.0.0 + dev: true + + /strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + dependencies: + ansi-regex: 5.0.1 + dev: true + + /strip-bom@3.0.0: + resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} + engines: {node: '>=4'} + dev: true + + /strip-json-comments@3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + dev: true + + /supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + dependencies: + has-flag: 4.0.0 + dev: true + + /supports-preserve-symlinks-flag@1.0.0: + resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} + engines: {node: '>= 0.4'} + dev: true + + /text-table@0.2.0: + resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} + dev: true + + /to-regex-range@5.0.1: + resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} + engines: {node: '>=8.0'} + dependencies: + is-number: 7.0.0 + dev: true + + /ts-pattern@5.2.0: + resolution: {integrity: sha512-aGaSpOlDcns7ZoeG/OMftWyQG1KqPVhgplhJxNCvyIXqWrumM5uIoOSarw/hmmi/T1PnuQ/uD8NaFHvLpHicDg==} + dev: false + + /tsc-esm-fix@2.20.27: + resolution: {integrity: sha512-bfoSY29XN4yRvXgfxc4rtKQPe9Xx02BahWSZ3D4GgBXIWSE+TJ/BXGSrpUIBkrsKIUQv2zA3qiwJVFnUV59Xdw==} + engines: {node: '>=16.0.0'} + hasBin: true + dependencies: + depseek: 0.4.1 + fs-extra: 11.2.0 + globby: 13.2.2 + json5: 2.2.3 + meow: 12.1.1 + tslib: 2.6.3 + dev: true + + /tsconfig-paths@3.15.0: + resolution: {integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==} + dependencies: + '@types/json5': 0.0.29 + json5: 1.0.2 + minimist: 1.2.8 + strip-bom: 3.0.0 + dev: true + + /tslib@1.14.1: + resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} + dev: true + + /tslib@2.6.3: + resolution: {integrity: sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==} + dev: true + + /tsutils@3.21.0(typescript@5.4.5): + resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} + engines: {node: '>= 6'} + peerDependencies: + typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' + dependencies: + tslib: 1.14.1 + typescript: 5.4.5 + dev: true + + /type-check@0.4.0: + resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} + engines: {node: '>= 0.8.0'} + dependencies: + prelude-ls: 1.2.1 + dev: true + + /type-fest@0.20.2: + resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} + engines: {node: '>=10'} + dev: true + + /typed-array-buffer@1.0.2: + resolution: {integrity: sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + es-errors: 1.3.0 + is-typed-array: 1.1.13 + dev: true + + /typed-array-byte-length@1.0.1: + resolution: {integrity: sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + for-each: 0.3.3 + gopd: 1.0.1 + has-proto: 1.0.3 + is-typed-array: 1.1.13 + dev: true + + /typed-array-byte-offset@1.0.2: + resolution: {integrity: sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==} + engines: {node: '>= 0.4'} + dependencies: + available-typed-arrays: 1.0.7 + call-bind: 1.0.7 + for-each: 0.3.3 + gopd: 1.0.1 + has-proto: 1.0.3 + is-typed-array: 1.1.13 + dev: true + + /typed-array-length@1.0.6: + resolution: {integrity: sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + for-each: 0.3.3 + gopd: 1.0.1 + has-proto: 1.0.3 + is-typed-array: 1.1.13 + possible-typed-array-names: 1.0.0 + dev: true + + /typescript@3.9.10: + resolution: {integrity: sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==} + engines: {node: '>=4.2.0'} + hasBin: true + dev: true + + /typescript@5.4.5: + resolution: {integrity: sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==} + engines: {node: '>=14.17'} + hasBin: true + dev: true + + /unbox-primitive@1.0.2: + resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} + dependencies: + call-bind: 1.0.7 + has-bigints: 1.0.2 + has-symbols: 1.0.3 + which-boxed-primitive: 1.0.2 + dev: true + + /undici-types@5.26.5: + resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + dev: true + + /universalify@2.0.1: + resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} + engines: {node: '>= 10.0.0'} + dev: true + + /uri-js@4.4.1: + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + dependencies: + punycode: 2.3.1 + dev: true + + /which-boxed-primitive@1.0.2: + resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} + dependencies: + is-bigint: 1.0.4 + is-boolean-object: 1.1.2 + is-number-object: 1.0.7 + is-string: 1.0.7 + is-symbol: 1.0.4 + dev: true + + /which-builtin-type@1.1.3: + resolution: {integrity: sha512-YmjsSMDBYsM1CaFiayOVT06+KJeXf0o5M/CAd4o1lTadFAtacTUM49zoYxr/oroopFDfhvN6iEcBxUyc3gvKmw==} + engines: {node: '>= 0.4'} + dependencies: + function.prototype.name: 1.1.6 + has-tostringtag: 1.0.2 + is-async-function: 2.0.0 + is-date-object: 1.0.5 + is-finalizationregistry: 1.0.2 + is-generator-function: 1.0.10 + is-regex: 1.1.4 + is-weakref: 1.0.2 + isarray: 2.0.5 + which-boxed-primitive: 1.0.2 + which-collection: 1.0.2 + which-typed-array: 1.1.15 + dev: true + + /which-collection@1.0.2: + resolution: {integrity: sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==} + engines: {node: '>= 0.4'} + dependencies: + is-map: 2.0.3 + is-set: 2.0.3 + is-weakmap: 2.0.2 + is-weakset: 2.0.3 + dev: true + + /which-typed-array@1.1.15: + resolution: {integrity: sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==} + engines: {node: '>= 0.4'} + dependencies: + available-typed-arrays: 1.0.7 + call-bind: 1.0.7 + for-each: 0.3.3 + gopd: 1.0.1 + has-tostringtag: 1.0.2 + dev: true + + /which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + dependencies: + isexe: 2.0.0 + dev: true + + /word-wrap@1.2.5: + resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} + engines: {node: '>=0.10.0'} + dev: true + + /wrappy@1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + dev: true + + /yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + dev: true + + /zod@3.23.8: + resolution: {integrity: sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==} + dev: false diff --git a/proto/v1/agreement/agreement.proto b/proto/v1/agreement/agreement.proto new file mode 100644 index 0000000..2f100e7 --- /dev/null +++ b/proto/v1/agreement/agreement.proto @@ -0,0 +1,72 @@ +syntax = "proto2"; + +package agreement; + +message AgreementV1 { + required string id = 1; + required string eserviceId = 2; + required string descriptorId = 3; + required string producerId = 4; + required string consumerId = 5; + required AgreementStateV1 state = 6; + repeated VerifiedAttributeV1 verifiedAttributes = 7; + optional bool suspendedByConsumer = 8; + optional bool suspendedByProducer = 9; + required int64 createdAt = 10; + optional int64 updatedAt = 11; + optional bool suspendedByPlatform = 12; + repeated CertifiedAttributeV1 certifiedAttributes = 13; + repeated DeclaredAttributeV1 declaredAttributes = 14; + repeated AgreementDocumentV1 consumerDocuments = 15; + optional string consumerNotes = 16; + optional AgreementDocumentV1 contract = 17; + optional StampsV1 stamps = 18; + optional string rejectionReason = 19; + optional int64 suspendedAt = 20; +} + +message VerifiedAttributeV1 { + reserved 2, 3, 4, 5; + + required string id = 1; +} + +message CertifiedAttributeV1 { + required string id = 1; +} + +message DeclaredAttributeV1 { + required string id = 1; +} + +message AgreementDocumentV1 { + required string id = 1; + required string name = 2; + required string prettyName = 3; + required string contentType = 4; + required int64 createdAt = 5; +} + +enum AgreementStateV1 { + PENDING = 1; + ACTIVE = 2; + SUSPENDED = 3; + ARCHIVED = 4; + DRAFT = 5; + MISSING_CERTIFIED_ATTRIBUTES = 6; + REJECTED = 7; +} + +message StampV1 { + required int64 when = 1; +} + +message StampsV1 { + optional StampV1 submission = 1; + optional StampV1 activation = 2; + optional StampV1 rejection = 3; + optional StampV1 suspensionByProducer = 4; + optional StampV1 upgrade = 5; + optional StampV1 archiving = 6; + optional StampV1 suspensionByConsumer = 7; +} diff --git a/proto/v1/agreement/events.proto b/proto/v1/agreement/events.proto new file mode 100644 index 0000000..413be55 --- /dev/null +++ b/proto/v1/agreement/events.proto @@ -0,0 +1,48 @@ +syntax = "proto2"; + +package agreement; + +import "v1/agreement/agreement.proto"; + +message AgreementAddedV1 { + required AgreementV1 agreement = 1; +} + +message AgreementActivatedV1 { + required AgreementV1 agreement = 1; +} + +message AgreementSuspendedV1 { + required AgreementV1 agreement = 1; +} + +message AgreementDeactivatedV1 { + required AgreementV1 agreement = 1; +} + +message AgreementUpdatedV1 { + required AgreementV1 agreement = 1; +} + +message AgreementDeletedV1 { + required string agreementId = 1; +} + +message VerifiedAttributeUpdatedV1 { + required AgreementV1 agreement = 1; +} + +message AgreementConsumerDocumentAddedV1 { + required string agreementId = 1; + required AgreementDocumentV1 document = 2; +} + +message AgreementConsumerDocumentRemovedV1 { + required string agreementId = 1; + required string documentId = 2; +} + +message AgreementContractAddedV1 { + required string agreementId = 1; + required AgreementDocumentV1 contract = 2; +} diff --git a/proto/v1/agreement/state.proto b/proto/v1/agreement/state.proto new file mode 100644 index 0000000..7386eee --- /dev/null +++ b/proto/v1/agreement/state.proto @@ -0,0 +1,15 @@ +syntax = "proto2"; + +package agreement; + +import "v1/agreement/agreement.proto"; + + +message StateV1 { + repeated AgreementsV1 agreements = 1; +} + +message AgreementsV1 { + required string key = 1; + required AgreementV1 value = 2; +} diff --git a/proto/v1/eservice/eservice.proto b/proto/v1/eservice/eservice.proto new file mode 100644 index 0000000..884e71e --- /dev/null +++ b/proto/v1/eservice/eservice.proto @@ -0,0 +1,84 @@ +syntax = "proto2"; + +package eservice; + +message EServiceV1 { + required string id = 1; + required string producerId = 2; + required string name = 3; + required string description = 4; + required EServiceTechnologyV1 technology = 5; + optional EServiceAttributesV1 attributes = 6; + repeated EServiceDescriptorV1 descriptors = 7; + optional int64 createdAt = 8; + optional EServiceModeV1 mode = 9; +} + +message EServiceAttributeValueV1 { + required string id = 1; + required bool explicitAttributeVerification = 2; +} + +message EServiceAttributeV1 { + optional EServiceAttributeValueV1 single = 1; + repeated EServiceAttributeValueV1 group = 2; +} + +message EServiceAttributesV1 { + repeated EServiceAttributeV1 certified = 1; + repeated EServiceAttributeV1 declared = 2; + repeated EServiceAttributeV1 verified = 3; +} + +message EServiceDescriptorV1 { + required string id = 1; + required string version = 2; + optional string description = 3; + repeated EServiceDocumentV1 docs = 4; + required EServiceDescriptorStateV1 state = 5; + optional EServiceDocumentV1 interface = 6; + repeated string audience = 7; + required int32 voucherLifespan = 8; + required int32 dailyCallsPerConsumer = 9; + required int32 dailyCallsTotal = 10; + optional AgreementApprovalPolicyV1 agreementApprovalPolicy = 11; + optional int64 createdAt = 12; + optional int64 publishedAt = 13; + repeated string serverUrls = 14; + optional int64 suspendedAt = 15; + optional int64 deprecatedAt = 16; + optional int64 archivedAt = 17; + optional EServiceAttributesV1 attributes = 18; +} + +message EServiceDocumentV1 { + required string id = 1; + required string name = 2; + required string contentType = 3; + required string checksum = 4; + required string uploadDate = 5; + required string prettyName = 6; +} + +enum EServiceDescriptorStateV1 { + DRAFT = 1; + PUBLISHED = 2; + DEPRECATED = 3; + SUSPENDED = 4; + ARCHIVED = 5; +} + +enum EServiceTechnologyV1 { + REST = 1; + SOAP = 2; +} + +enum AgreementApprovalPolicyV1 { + AUTOMATIC = 1; + MANUAL = 2; +} + +enum EServiceModeV1 { + RECEIVE = 1; + DELIVER = 2; +} diff --git a/proto/v1/eservice/events.proto b/proto/v1/eservice/events.proto new file mode 100644 index 0000000..e7038db --- /dev/null +++ b/proto/v1/eservice/events.proto @@ -0,0 +1,77 @@ +syntax = "proto2"; + +package eservice; + +import "v1/eservice/eservice.proto"; + +message EServiceAddedV1 { + required EServiceV1 eservice = 1; +} + +message ClonedEServiceAddedV1 { + required EServiceV1 eservice = 1; +} + +message EServiceUpdatedV1 { + required EServiceV1 eservice = 1; +} + +message EServiceWithDescriptorsDeletedV1 { + required EServiceV1 eservice = 1; + required string descriptorId = 2; +} + +message EServiceDocumentUpdatedV1 { + required string eserviceId = 1; + required string descriptorId = 2; + required string documentId = 3; + required EServiceDocumentV1 updatedDocument = 4; + repeated string serverUrls = 5; +} + +message EServiceDeletedV1 { + required string eserviceId = 1; +} + +message EServiceDocumentAddedV1 { + required string eserviceId = 1; + required string descriptorId = 2; + required EServiceDocumentV1 document = 3; + required bool isInterface = 4; + repeated string serverUrls = 5; +} + +message EServiceDocumentDeletedV1 { + required string eserviceId = 1; + required string descriptorId = 2; + required string documentId = 3; +} + +message EServiceDescriptorAddedV1 { + required string eserviceId = 1; + required EServiceDescriptorV1 eserviceDescriptor = 2; +} + +message EServiceDescriptorUpdatedV1 { + required string eserviceId = 1; + required EServiceDescriptorV1 eserviceDescriptor = 2; +} + +message MovedAttributesFromEserviceToDescriptorsV1 { + required EServiceV1 eservice = 1; +} + +message EServiceRiskAnalysisAddedV1 { + required EServiceV1 eservice = 1; + required string riskAnalysisId = 2; +} + +message EServiceRiskAnalysisUpdatedV1 { + required EServiceV1 eservice = 1; + required string riskAnalysisId = 2; +} + +message EServiceRiskAnalysisDeletedV1 { + required EServiceV1 eservice = 1; + required string riskAnalysisId = 2; +} diff --git a/proto/v1/purpose/events.proto b/proto/v1/purpose/events.proto new file mode 100644 index 0000000..af40292 --- /dev/null +++ b/proto/v1/purpose/events.proto @@ -0,0 +1,53 @@ +syntax = "proto2"; + +package purpose; + +import "v1/purpose/purpose.proto"; + +message PurposeCreatedV1 { + required PurposeV1 purpose = 1; +} + +message PurposeVersionCreatedV1 { + required string purposeId = 1; + required PurposeVersionV1 version = 2; +} + +message PurposeUpdatedV1 { + required PurposeV1 purpose = 1; +} + +message PurposeVersionUpdatedV1 { + required string purposeId = 1; + required PurposeVersionV1 version = 2; +} + +message PurposeVersionActivatedV1 { + required PurposeV1 purpose = 1; +} + +message PurposeVersionRejectedV1 { + required PurposeV1 purpose = 1; + required string versionId = 2; +} + +message PurposeVersionSuspendedV1 { + required PurposeV1 purpose = 1; +} + +message PurposeVersionArchivedV1 { + required PurposeV1 purpose = 1; +} + +message PurposeVersionWaitedForApprovalV1 { + required PurposeV1 purpose = 1; +} + +message PurposeDeletedV1 { + required string purposeId = 1; +} + +message PurposeVersionDeletedV1 { + required string purposeId = 1; + required string versionId = 2; +} diff --git a/proto/v1/purpose/purpose.proto b/proto/v1/purpose/purpose.proto new file mode 100644 index 0000000..bdaaa9d --- /dev/null +++ b/proto/v1/purpose/purpose.proto @@ -0,0 +1,39 @@ +syntax = "proto2"; + +package purpose; + +message PurposeV1 { + required string id = 1; + required string eserviceId = 2; + required string consumerId = 3; + optional bool suspendedByConsumer = 5; + optional bool suspendedByProducer = 6; + repeated PurposeVersionV1 versions = 7; + required string title = 8; + required string description = 9; + required int64 createdAt = 10; + optional int64 updatedAt = 11; + optional bool isFreeOfCharge = 12; + optional string freeOfChargeReason = 13; +} + +message PurposeVersionV1 { + required string id = 1; + required PurposeStateV1 state = 2; + required int32 dailyCalls = 3; + required int64 createdAt = 4; + optional int64 updatedAt = 5; + optional int64 firstActivationAt = 6; + optional int64 expectedApprovalDate = 7; + optional int64 suspendedAt = 8; + optional string rejectionReason = 9; +} + +enum PurposeStateV1 { + DRAFT = 1; + ACTIVE = 2; + SUSPENDED = 3; + WAITING_FOR_APPROVAL = 4; + ARCHIVED = 5; + REJECTED = 6; +} diff --git a/proto/v1/tenant/events.proto b/proto/v1/tenant/events.proto new file mode 100644 index 0000000..aed0bb2 --- /dev/null +++ b/proto/v1/tenant/events.proto @@ -0,0 +1,26 @@ +syntax = "proto2"; + +package tenant; + +import "v1/tenant/tenant.proto"; + +message TenantCreatedV1 { + required TenantV1 tenant = 1; +} + +message TenantUpdatedV1 { + required TenantV1 tenant = 1; +} + +message TenantDeletedV1 { + required string tenantId = 1; +} + +message SelfcareMappingCreatedV1 { + required string selfcareId = 1; + required string tenantId = 2; +} + +message SelfcareMappingDeletedV1 { + required string selfcareId = 1; +} \ No newline at end of file diff --git a/proto/v1/tenant/tenant.proto b/proto/v1/tenant/tenant.proto new file mode 100644 index 0000000..a3a2767 --- /dev/null +++ b/proto/v1/tenant/tenant.proto @@ -0,0 +1,59 @@ +syntax = "proto2"; + +package tenant; + +message TenantV1 { + required string id = 1; + optional string selfcareId = 2; + required ExternalIdV1 externalId = 3; + repeated TenantFeatureV1 features = 4; + required int64 createdAt = 5; + optional int64 updatedAt = 6; + optional string name = 7; + optional TenantKindV1 kind = 8; + optional int64 onboardedAt = 9; + optional TenantUnitTypeV1 subUnitType = 10; +} + +enum TenantKindV1 { + PA = 1; + GSP = 2; + PRIVATE = 3; +} + +enum TenantUnitTypeV1 { + AOO = 1; + UO = 2; +} + +message TenantFeatureV1 { + oneof sealed_value { + CertifierV1 certifier = 1; + } +} + +message CertifierV1 { + required string certifierId = 1; +} + +message TenantVerifierV1 { + reserved 3; + required string id = 1; + required int64 verificationDate = 2; + optional int64 expirationDate = 4; + optional int64 extensionDate = 5; +} + +message TenantRevokerV1 { + reserved 3; + required string id = 1; + required int64 verificationDate = 2; + optional int64 expirationDate = 4; + optional int64 extensionDate = 5; + required int64 revocationDate = 6; +} + +message ExternalIdV1 { + required string origin = 1; + required string value = 2; +} diff --git a/proto/v2/agreement/agreement.proto b/proto/v2/agreement/agreement.proto new file mode 100644 index 0000000..e97c067 --- /dev/null +++ b/proto/v2/agreement/agreement.proto @@ -0,0 +1,72 @@ +syntax = "proto3"; + +package agreement.v2; + +message AgreementV2 { + string id = 1; + string eserviceId = 2; + string descriptorId = 3; + string producerId = 4; + string consumerId = 5; + AgreementStateV2 state = 6; + repeated VerifiedAttributeV2 verifiedAttributes = 7; + optional bool suspendedByConsumer = 8; + optional bool suspendedByProducer = 9; + int64 createdAt = 10; + optional int64 updatedAt = 11; + optional bool suspendedByPlatform = 12; + repeated CertifiedAttributeV2 certifiedAttributes = 13; + repeated DeclaredAttributeV2 declaredAttributes = 14; + repeated AgreementDocumentV2 consumerDocuments = 15; + optional string consumerNotes = 16; + optional AgreementDocumentV2 contract = 17; + optional AgreementStampsV2 stamps = 18; + optional string rejectionReason = 19; + optional int64 suspendedAt = 20; +} + +message VerifiedAttributeV2 { + reserved 2, 3, 4, 5; + + string id = 1; +} + +message CertifiedAttributeV2 { + string id = 1; +} + +message DeclaredAttributeV2 { + string id = 1; +} + +message AgreementDocumentV2 { + string id = 1; + string name = 2; + string prettyName = 3; + string contentType = 4; + int64 createdAt = 5; +} + +enum AgreementStateV2 { + PENDING = 0; + ACTIVE = 1; + SUSPENDED = 2; + ARCHIVED = 3; + DRAFT = 4; + MISSING_CERTIFIED_ATTRIBUTES = 5; + REJECTED = 6; +} + +message AgreementStampV2 { + int64 when = 1; +} + +message AgreementStampsV2 { + optional AgreementStampV2 submission = 1; + optional AgreementStampV2 activation = 2; + optional AgreementStampV2 rejection = 3; + optional AgreementStampV2 suspensionByProducer = 4; + optional AgreementStampV2 upgrade = 5; + optional AgreementStampV2 archiving = 6; + optional AgreementStampV2 suspensionByConsumer = 7; +} diff --git a/proto/v2/agreement/events.proto b/proto/v2/agreement/events.proto new file mode 100644 index 0000000..df25816 --- /dev/null +++ b/proto/v2/agreement/events.proto @@ -0,0 +1,83 @@ +syntax = "proto3"; + +package agreement.v2; + +import "v2/agreement/agreement.proto"; + +message AgreementAddedV2 { + AgreementV2 agreement = 1; +} + +message AgreementDeletedV2 { + AgreementV2 agreement = 1; +} + +message DraftAgreementUpdatedV2 { + AgreementV2 agreement = 1; +} + +message AgreementSubmittedV2 { + AgreementV2 agreement = 1; +} + +message AgreementActivatedV2 { + AgreementV2 agreement = 1; +} + +message AgreementUnsuspendedByProducerV2 { + AgreementV2 agreement = 1; +} + +message AgreementUnsuspendedByConsumerV2 { + AgreementV2 agreement = 1; +} + +message AgreementUnsuspendedByPlatformV2 { + AgreementV2 agreement = 1; +} + +message AgreementArchivedByConsumerV2 { + AgreementV2 agreement = 1; +} + +message AgreementArchivedByUpgradeV2 { + AgreementV2 agreement = 1; +} + +message AgreementUpgradedV2 { + AgreementV2 agreement = 1; +} + +message AgreementSuspendedByProducerV2 { + AgreementV2 agreement = 1; +} + +message AgreementSuspendedByConsumerV2 { + AgreementV2 agreement = 1; +} + +message AgreementSuspendedByPlatformV2 { + AgreementV2 agreement = 1; +} + +message AgreementRejectedV2 { + AgreementV2 agreement = 1; +} + +message AgreementConsumerDocumentAddedV2 { + string documentId = 1; + AgreementV2 agreement = 2; +} + +message AgreementConsumerDocumentRemovedV2 { + string documentId = 1; + AgreementV2 agreement = 2; +} + +message AgreementSetDraftByPlatformV2 { + AgreementV2 agreement = 1; +} + +message AgreementSetMissingCertifiedAttributesByPlatformV2 { + AgreementV2 agreement = 1; +} diff --git a/proto/v2/eservice/eservice.proto b/proto/v2/eservice/eservice.proto new file mode 100644 index 0000000..1f20184 --- /dev/null +++ b/proto/v2/eservice/eservice.proto @@ -0,0 +1,82 @@ +syntax = "proto3"; + +package eservice.v2; + +message EServiceV2 { + string id = 1; + string producerId = 2; + string name = 3; + string description = 4; + EServiceTechnologyV2 technology = 5; + repeated EServiceDescriptorV2 descriptors = 6; + int64 createdAt = 7; + EServiceModeV2 mode = 8; +} + +message EServiceAttributeValueV2 { + string id = 1; + bool explicitAttributeVerification = 2; +} + +message EServiceAttributeV2 { + repeated EServiceAttributeValueV2 values = 1; +} + +message EServiceAttributesV2 { + repeated EServiceAttributeV2 certified = 1; + repeated EServiceAttributeV2 declared = 2; + repeated EServiceAttributeV2 verified = 3; +} + +message EServiceDescriptorV2 { + string id = 1; + int64 version = 2; + optional string description = 3; + repeated EServiceDocumentV2 docs = 4; + EServiceDescriptorStateV2 state = 5; + optional EServiceDocumentV2 interface = 6; + repeated string audience = 7; + int32 voucherLifespan = 8; + int32 dailyCallsPerConsumer = 9; + int32 dailyCallsTotal = 10; + AgreementApprovalPolicyV2 agreementApprovalPolicy = 11; + int64 createdAt = 12; + optional int64 publishedAt = 13; + repeated string serverUrls = 14; + optional int64 suspendedAt = 15; + optional int64 deprecatedAt = 16; + optional int64 archivedAt = 17; + EServiceAttributesV2 attributes = 18; +} + +message EServiceDocumentV2 { + string id = 1; + string name = 2; + string contentType = 3; + string checksum = 4; + string uploadDate = 5; + string prettyName = 6; +} + +enum EServiceDescriptorStateV2 { + DRAFT = 0; + PUBLISHED = 1; + DEPRECATED = 2; + SUSPENDED = 3; + ARCHIVED = 4; +} + +enum EServiceTechnologyV2 { + REST = 0; + SOAP = 1; +} + +enum AgreementApprovalPolicyV2 { + AUTOMATIC = 0; + MANUAL = 1; +} + +enum EServiceModeV2 { + RECEIVE = 0; + DELIVER = 1; +} diff --git a/proto/v2/eservice/events.proto b/proto/v2/eservice/events.proto new file mode 100644 index 0000000..236626d --- /dev/null +++ b/proto/v2/eservice/events.proto @@ -0,0 +1,115 @@ +syntax = "proto3"; + +package eservice.v2; + +import "v2/eservice/eservice.proto"; + +message EServiceAddedV2 { + EServiceV2 eservice = 1; +} + +message DraftEServiceUpdatedV2 { + EServiceV2 eservice = 1; +} + +message EServiceDeletedV2 { + string eserviceId = 1; + EServiceV2 eservice = 2; +} + +message EServiceClonedV2 { + EServiceV2 sourceEservice = 1; + string sourceDescriptorId = 2; + EServiceV2 eservice = 3; +} + +message EServiceDescriptorAddedV2 { + string descriptorId = 1; + EServiceV2 eservice = 2; +} + +message EServiceDraftDescriptorUpdatedV2 { + string descriptorId = 1; + EServiceV2 eservice = 2; +} + +message EServiceDescriptorQuotasUpdatedV2 { + string descriptorId = 1; + EServiceV2 eservice = 2; +} + +message EServiceDescriptorActivatedV2 { + string descriptorId = 1; + EServiceV2 eservice = 2; +} + +message EServiceDescriptorArchivedV2 { + string descriptorId = 1; + EServiceV2 eservice = 2; +} + +message EServiceDescriptorPublishedV2 { + string descriptorId = 1; + EServiceV2 eservice = 2; +} + +message EServiceDescriptorSuspendedV2 { + string descriptorId = 1; + EServiceV2 eservice = 2; +} + +message EServiceDraftDescriptorDeletedV2 { + string descriptorId = 1; + EServiceV2 eservice = 2; +} + +message EServiceDescriptorInterfaceAddedV2 { + string descriptorId = 1; + string documentId = 2; + EServiceV2 eservice = 3; +} + +message EServiceDescriptorDocumentAddedV2 { + string descriptorId = 1; + string documentId = 2; + EServiceV2 eservice = 3; +} + +message EServiceDescriptorInterfaceUpdatedV2 { + string descriptorId = 1; + string documentId = 2; + EServiceV2 eservice = 3; +} + +message EServiceDescriptorDocumentUpdatedV2 { + string descriptorId = 1; + string documentId = 2; + EServiceV2 eservice = 3; +} + +message EServiceDescriptorInterfaceDeletedV2 { + string descriptorId = 1; + string documentId = 2; + EServiceV2 eservice = 3; +} + +message EServiceDescriptorDocumentDeletedV2 { + string descriptorId = 1; + string documentId = 2; + EServiceV2 eservice = 3; +} + +message EServiceRiskAnalysisAddedV2 { + string riskAnalysisId = 1; + EServiceV2 eservice = 2; +} + +message EServiceRiskAnalysisUpdatedV2 { + string riskAnalysisId = 1; + EServiceV2 eservice = 2; +} + +message EServiceRiskAnalysisDeletedV2 { + string riskAnalysisId = 1; + EServiceV2 eservice = 2; +} diff --git a/proto/v2/purpose/events.proto b/proto/v2/purpose/events.proto new file mode 100644 index 0000000..a75e854 --- /dev/null +++ b/proto/v2/purpose/events.proto @@ -0,0 +1,90 @@ +syntax = "proto3"; + +package purpose.v2; + +import "v2/purpose/purpose.proto"; + +message PurposeAddedV2 { + PurposeV2 purpose = 1; +} + +message DraftPurposeUpdatedV2 { + PurposeV2 purpose = 1; +} + +message PurposeWaitingForApprovalV2 { + PurposeV2 purpose = 1; +} + +message PurposeActivatedV2 { + PurposeV2 purpose = 1; +} + +message DraftPurposeDeletedV2 { + PurposeV2 purpose = 1; +} + +message WaitingForApprovalPurposeDeletedV2 { + PurposeV2 purpose = 1; +} + +message NewPurposeVersionActivatedV2 { + string versionId = 1; + PurposeV2 purpose = 2; +} + +message PurposeVersionActivatedV2 { + string versionId = 1; + PurposeV2 purpose = 2; +} + +message PurposeVersionUnsuspendedByProducerV2 { + string versionId = 1; + PurposeV2 purpose = 2; +} + +message PurposeVersionUnsuspendedByConsumerV2 { + string versionId = 1; + PurposeV2 purpose = 2; +} + +message PurposeVersionSuspendedByProducerV2 { + string versionId = 1; + PurposeV2 purpose = 2; +} + +message PurposeVersionSuspendedByConsumerV2 { + string versionId = 1; + PurposeV2 purpose = 2; +} + +message NewPurposeVersionWaitingForApprovalV2 { + string versionId = 1; + PurposeV2 purpose = 2; +} + +message PurposeVersionOverQuotaUnsuspendedV2 { + string versionId = 1; + PurposeV2 purpose = 2; +} + +message PurposeArchivedV2 { + string versionId = 1; + PurposeV2 purpose = 2; +} + +message WaitingForApprovalPurposeVersionDeletedV2 { + string versionId = 1; + PurposeV2 purpose = 2; +} + +message PurposeVersionRejectedV2 { + string versionId = 1; + PurposeV2 purpose = 2; +} + +message PurposeClonedV2 { + string sourcePurposeId = 1; + string sourceVersionId = 2; + PurposeV2 purpose = 3; +} diff --git a/proto/v2/purpose/purpose.proto b/proto/v2/purpose/purpose.proto new file mode 100644 index 0000000..267af7c --- /dev/null +++ b/proto/v2/purpose/purpose.proto @@ -0,0 +1,38 @@ +syntax = "proto3"; + +package purpose.v2; + +message PurposeV2 { + string id = 1; + string eserviceId = 2; + string consumerId = 3; + optional bool suspendedByConsumer = 5; + optional bool suspendedByProducer = 6; + repeated PurposeVersionV2 versions = 7; + string title = 8; + string description = 9; + int64 createdAt = 10; + optional int64 updatedAt = 11; + bool isFreeOfCharge = 12; + optional string freeOfChargeReason = 13; +} + +message PurposeVersionV2 { + string id = 1; + PurposeStateV2 state = 2; + int32 dailyCalls = 3; + int64 createdAt = 4; + optional int64 updatedAt = 5; + optional int64 firstActivationAt = 6; + optional int64 suspendedAt = 7; + optional string rejectionReason = 8; +} + +enum PurposeStateV2 { + DRAFT = 0; + ACTIVE = 1; + SUSPENDED = 2; + WAITING_FOR_APPROVAL = 3; + ARCHIVED = 4; + REJECTED = 5; +} diff --git a/proto/v2/tenant/events.proto b/proto/v2/tenant/events.proto new file mode 100644 index 0000000..b7b0221 --- /dev/null +++ b/proto/v2/tenant/events.proto @@ -0,0 +1,63 @@ +syntax = "proto3"; + +package tenant.v2; + +import "v2/tenant/tenant.proto"; + +message TenantOnboardedV2 { + TenantV2 tenant = 1; +} + +message TenantOnboardDetailsUpdatedV2 { + TenantV2 tenant = 1; +} + +message TenantCertifiedAttributeAssignedV2 { + string attributeId = 1; + TenantV2 tenant = 2; +} + +message TenantCertifiedAttributeRevokedV2 { + string attributeId = 1; + TenantV2 tenant = 2; +} + +message TenantDeclaredAttributeAssignedV2 { + string attributeId = 1; + TenantV2 tenant = 2; +} + +message TenantDeclaredAttributeRevokedV2 { + string attributeId = 1; + TenantV2 tenant = 2; +} + +message TenantVerifiedAttributeAssignedV2 { + string attributeId = 1; + TenantV2 tenant = 2; +} + +message TenantVerifiedAttributeRevokedV2 { + string attributeId = 1; + TenantV2 tenant = 2; +} + +message TenantVerifiedAttributeExpirationUpdatedV2 { + string attributeId = 1; + TenantV2 tenant = 2; +} + +message TenantVerifiedAttributeExtensionUpdatedV2 { + string attributeId = 1; + TenantV2 tenant = 2; +} + +message MaintenanceTenantDeletedV2 { + string tenantId = 1; + TenantV2 tenant = 2; +} + +message TenantMailAddedV2 { + string mailId = 1; + TenantV2 tenant = 2; +} \ No newline at end of file diff --git a/proto/v2/tenant/tenant.proto b/proto/v2/tenant/tenant.proto new file mode 100644 index 0000000..a280590 --- /dev/null +++ b/proto/v2/tenant/tenant.proto @@ -0,0 +1,57 @@ +syntax = "proto3"; + +package tenant.v2; + +message TenantV2 { + string id = 1; + string selfcareId = 2; + ExternalIdV2 externalId = 3; + repeated TenantFeatureV2 features = 4; + int64 createdAt = 5; + optional int64 updatedAt = 6; + string name = 7; + optional TenantKindV2 kind = 8; + int64 onboardedAt = 9; + optional TenantUnitTypeV2 subUnitType = 10; +} + +enum TenantKindV2 { + PA = 0; + GSP = 1; + PRIVATE = 2; +} + +enum TenantUnitTypeV2 { + AOO = 0; + UO = 1; +} + +message TenantFeatureV2 { + oneof sealed_value { + CertifierV2 certifier = 1; + } +} + +message CertifierV2 { + string certifierId = 1; +} + +message TenantVerifierV2 { + string id = 1; + int64 verificationDate = 2; + optional int64 expirationDate = 3; + optional int64 extensionDate = 4; +} + +message TenantRevokerV2 { + string id = 1; + int64 verificationDate = 2; + optional int64 expirationDate = 3; + optional int64 extensionDate = 4; + int64 revocationDate = 5; +} + +message ExternalIdV2 { + string origin = 1; + string value = 2; +} diff --git a/src/agreement/eventsV1.ts b/src/agreement/eventsV1.ts new file mode 100644 index 0000000..2633766 --- /dev/null +++ b/src/agreement/eventsV1.ts @@ -0,0 +1,106 @@ +import { match } from "ts-pattern"; +import { z } from "zod"; +import { + AgreementAddedV1, + AgreementDeletedV1, + AgreementUpdatedV1, + AgreementContractAddedV1, + AgreementConsumerDocumentAddedV1, + AgreementConsumerDocumentRemovedV1, + AgreementActivatedV1, + AgreementSuspendedV1, + AgreementDeactivatedV1, + VerifiedAttributeUpdatedV1, +} from "../gen/v1/agreement/events.js"; +import { protobufDecoder } from "../protobuf.js"; + +export function agreementEventToBinaryDataV1( + event: AgreementEventV1 +): Uint8Array { + return match(event) + .with({ type: "AgreementDeleted" }, ({ data }) => + AgreementDeletedV1.toBinary(data) + ) + .with({ type: "AgreementAdded" }, ({ data }) => + AgreementAddedV1.toBinary(data) + ) + .with({ type: "AgreementActivated" }, ({ data }) => + AgreementActivatedV1.toBinary(data) + ) + .with({ type: "AgreementSuspended" }, ({ data }) => + AgreementSuspendedV1.toBinary(data) + ) + .with({ type: "AgreementDeactivated" }, ({ data }) => + AgreementDeactivatedV1.toBinary(data) + ) + .with({ type: "VerifiedAttributeUpdated" }, ({ data }) => + VerifiedAttributeUpdatedV1.toBinary(data) + ) + .with({ type: "AgreementUpdated" }, ({ data }) => + AgreementUpdatedV1.toBinary(data) + ) + .with({ type: "AgreementContractAdded" }, ({ data }) => + AgreementContractAddedV1.toBinary(data) + ) + .with({ type: "AgreementConsumerDocumentAdded" }, ({ data }) => + AgreementConsumerDocumentAddedV1.toBinary(data) + ) + .with({ type: "AgreementConsumerDocumentRemoved" }, ({ data }) => + AgreementConsumerDocumentRemovedV1.toBinary(data) + ) + .exhaustive(); +} + +export const AgreementEventV1 = z.discriminatedUnion("type", [ + z.object({ + event_version: z.literal(1), + type: z.literal("AgreementAdded"), + data: protobufDecoder(AgreementAddedV1), + }), + z.object({ + event_version: z.literal(1), + type: z.literal("AgreementActivated"), + data: protobufDecoder(AgreementActivatedV1), + }), + z.object({ + event_version: z.literal(1), + type: z.literal("AgreementSuspended"), + data: protobufDecoder(AgreementSuspendedV1), + }), + z.object({ + event_version: z.literal(1), + type: z.literal("AgreementDeactivated"), + data: protobufDecoder(AgreementDeactivatedV1), + }), + z.object({ + event_version: z.literal(1), + type: z.literal("AgreementDeleted"), + data: protobufDecoder(AgreementDeletedV1), + }), + z.object({ + event_version: z.literal(1), + type: z.literal("VerifiedAttributeUpdated"), + data: protobufDecoder(VerifiedAttributeUpdatedV1), + }), + z.object({ + event_version: z.literal(1), + type: z.literal("AgreementUpdated"), + data: protobufDecoder(AgreementUpdatedV1), + }), + z.object({ + event_version: z.literal(1), + type: z.literal("AgreementConsumerDocumentAdded"), + data: protobufDecoder(AgreementConsumerDocumentAddedV1), + }), + z.object({ + event_version: z.literal(1), + type: z.literal("AgreementConsumerDocumentRemoved"), + data: protobufDecoder(AgreementConsumerDocumentRemovedV1), + }), + z.object({ + event_version: z.literal(1), + type: z.literal("AgreementContractAdded"), + data: protobufDecoder(AgreementContractAddedV1), + }), +]); +export type AgreementEventV1 = z.infer; diff --git a/src/agreement/eventsV2.ts b/src/agreement/eventsV2.ts new file mode 100644 index 0000000..c0ac524 --- /dev/null +++ b/src/agreement/eventsV2.ts @@ -0,0 +1,189 @@ +import { match } from "ts-pattern"; +import { z } from "zod"; +import { + AgreementActivatedV2, + AgreementAddedV2, + AgreementArchivedByUpgradeV2, + AgreementArchivedByConsumerV2, + AgreementConsumerDocumentAddedV2, + AgreementConsumerDocumentRemovedV2, + AgreementDeletedV2, + AgreementRejectedV2, + AgreementSubmittedV2, + AgreementSuspendedByConsumerV2, + AgreementSuspendedByPlatformV2, + AgreementSuspendedByProducerV2, + AgreementUnsuspendedByConsumerV2, + AgreementUnsuspendedByPlatformV2, + AgreementUnsuspendedByProducerV2, + AgreementUpgradedV2, + DraftAgreementUpdatedV2, + AgreementSetDraftByPlatformV2, + AgreementSetMissingCertifiedAttributesByPlatformV2, +} from "../gen/v2/agreement/events.js"; +import { protobufDecoder } from "../protobuf.js"; + +export function agreementEventToBinaryDataV2( + event: AgreementEventV2 +): Uint8Array { + return match(event) + .with({ type: "AgreementAdded" }, ({ data }) => + AgreementAddedV2.toBinary(data) + ) + .with({ type: "AgreementDeleted" }, ({ data }) => + AgreementDeletedV2.toBinary(data) + ) + .with({ type: "DraftAgreementUpdated" }, ({ data }) => + DraftAgreementUpdatedV2.toBinary(data) + ) + .with({ type: "AgreementSubmitted" }, ({ data }) => + AgreementSubmittedV2.toBinary(data) + ) + .with({ type: "AgreementActivated" }, ({ data }) => + AgreementActivatedV2.toBinary(data) + ) + .with({ type: "AgreementUnsuspendedByProducer" }, ({ data }) => + AgreementUnsuspendedByProducerV2.toBinary(data) + ) + .with({ type: "AgreementUnsuspendedByConsumer" }, ({ data }) => + AgreementUnsuspendedByConsumerV2.toBinary(data) + ) + .with({ type: "AgreementUnsuspendedByPlatform" }, ({ data }) => + AgreementUnsuspendedByPlatformV2.toBinary(data) + ) + .with({ type: "AgreementArchivedByConsumer" }, ({ data }) => + AgreementArchivedByConsumerV2.toBinary(data) + ) + .with({ type: "AgreementArchivedByUpgrade" }, ({ data }) => + AgreementArchivedByUpgradeV2.toBinary(data) + ) + .with({ type: "AgreementUpgraded" }, ({ data }) => + AgreementUpgradedV2.toBinary(data) + ) + .with({ type: "AgreementSuspendedByProducer" }, ({ data }) => + AgreementSuspendedByProducerV2.toBinary(data) + ) + .with({ type: "AgreementSuspendedByConsumer" }, ({ data }) => + AgreementSuspendedByConsumerV2.toBinary(data) + ) + .with({ type: "AgreementSuspendedByPlatform" }, ({ data }) => + AgreementSuspendedByPlatformV2.toBinary(data) + ) + .with({ type: "AgreementRejected" }, ({ data }) => + AgreementRejectedV2.toBinary(data) + ) + .with({ type: "AgreementConsumerDocumentAdded" }, ({ data }) => + AgreementConsumerDocumentAddedV2.toBinary(data) + ) + .with({ type: "AgreementConsumerDocumentRemoved" }, ({ data }) => + AgreementConsumerDocumentRemovedV2.toBinary(data) + ) + .with({ type: "AgreementSetDraftByPlatform" }, ({ data }) => + AgreementSetDraftByPlatformV2.toBinary(data) + ) + .with( + { type: "AgreementSetMissingCertifiedAttributesByPlatform" }, + ({ data }) => + AgreementSetMissingCertifiedAttributesByPlatformV2.toBinary(data) + ) + .exhaustive(); +} + +export const AgreementEventV2 = z.discriminatedUnion("type", [ + z.object({ + event_version: z.literal(2), + type: z.literal("AgreementAdded"), + data: protobufDecoder(AgreementAddedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("AgreementDeleted"), + data: protobufDecoder(AgreementDeletedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("DraftAgreementUpdated"), + data: protobufDecoder(DraftAgreementUpdatedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("AgreementSubmitted"), + data: protobufDecoder(AgreementSubmittedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("AgreementActivated"), + data: protobufDecoder(AgreementActivatedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("AgreementUnsuspendedByProducer"), + data: protobufDecoder(AgreementUnsuspendedByProducerV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("AgreementUnsuspendedByConsumer"), + data: protobufDecoder(AgreementUnsuspendedByConsumerV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("AgreementUnsuspendedByPlatform"), + data: protobufDecoder(AgreementUnsuspendedByPlatformV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("AgreementArchivedByConsumer"), + data: protobufDecoder(AgreementArchivedByConsumerV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("AgreementArchivedByUpgrade"), + data: protobufDecoder(AgreementArchivedByUpgradeV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("AgreementUpgraded"), + data: protobufDecoder(AgreementUpgradedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("AgreementSuspendedByProducer"), + data: protobufDecoder(AgreementSuspendedByProducerV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("AgreementSuspendedByConsumer"), + data: protobufDecoder(AgreementSuspendedByConsumerV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("AgreementSuspendedByPlatform"), + data: protobufDecoder(AgreementSuspendedByPlatformV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("AgreementRejected"), + data: protobufDecoder(AgreementRejectedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("AgreementConsumerDocumentAdded"), + data: protobufDecoder(AgreementConsumerDocumentAddedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("AgreementConsumerDocumentRemoved"), + data: protobufDecoder(AgreementConsumerDocumentRemovedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("AgreementSetDraftByPlatform"), + data: protobufDecoder(AgreementSetDraftByPlatformV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("AgreementSetMissingCertifiedAttributesByPlatform"), + data: protobufDecoder(AgreementSetMissingCertifiedAttributesByPlatformV2), + }), +]); +export type AgreementEventV2 = z.infer; diff --git a/src/agreement/index.ts b/src/agreement/index.ts new file mode 100644 index 0000000..be0b49b --- /dev/null +++ b/src/agreement/index.ts @@ -0,0 +1,48 @@ +import { match } from "ts-pattern"; +import { z } from "zod"; +import { EventEnvelope, eventV1, eventV2 } from "../events.js"; +import { AgreementEventV1, agreementEventToBinaryDataV1 } from "./eventsV1.js"; +import { AgreementEventV2, agreementEventToBinaryDataV2 } from "./eventsV2.js"; + +function agreementEventToBinaryData(event: AgreementEvent): Uint8Array { + return match(event) + .with({ event_version: 1 }, agreementEventToBinaryDataV1) + .with({ event_version: 2 }, agreementEventToBinaryDataV2) + .exhaustive(); +} + +const AgreementEvent = z + .discriminatedUnion("event_version", [eventV1, eventV2]) + .transform((obj, ctx) => { + const res = match(obj) + .with({ event_version: 1 }, () => AgreementEventV1.safeParse(obj)) + .with({ event_version: 2 }, () => AgreementEventV2.safeParse(obj)) + .exhaustive(); + + if (!res.success) { + res.error.issues.forEach(ctx.addIssue); + return z.NEVER; + } + return res.data; + }); + +type AgreementEvent = z.infer; + +const AgreementEventEnvelopeV1 = EventEnvelope(AgreementEventV1); +type AgreementEventEnvelopeV1 = z.infer; + +const AgreementEventEnvelopeV2 = EventEnvelope(AgreementEventV2); +type AgreementEventEnvelopeV2 = z.infer; + +const AgreementEventEnvelope = EventEnvelope(AgreementEvent); +type AgreementEventEnvelope = z.infer; + +export { + agreementEventToBinaryData, + AgreementEvent, + AgreementEventV1, + AgreementEventV2, + AgreementEventEnvelope, + AgreementEventEnvelopeV1, + AgreementEventEnvelopeV2, +}; diff --git a/src/eservice/eventsV1.ts b/src/eservice/eventsV1.ts new file mode 100644 index 0000000..57a8c26 --- /dev/null +++ b/src/eservice/eventsV1.ts @@ -0,0 +1,143 @@ +import { match } from "ts-pattern"; +import { z } from "zod"; +import { + ClonedEServiceAddedV1, + EServiceAddedV1, + EServiceDeletedV1, + EServiceDescriptorAddedV1, + EServiceDescriptorUpdatedV1, + EServiceDocumentAddedV1, + EServiceDocumentDeletedV1, + EServiceDocumentUpdatedV1, + EServiceRiskAnalysisAddedV1, + EServiceRiskAnalysisDeletedV1, + EServiceRiskAnalysisUpdatedV1, + EServiceUpdatedV1, + EServiceWithDescriptorsDeletedV1, + MovedAttributesFromEserviceToDescriptorsV1, +} from "../gen/v1/eservice/events.js"; +import { protobufDecoder } from "../protobuf.js"; + +export function eServiceEventToBinaryDataV1( + event: EServiceEventV1 +): Uint8Array { + return match(event) + .with({ type: "EServiceAdded" }, ({ data }) => + EServiceAddedV1.toBinary(data) + ) + .with({ type: "ClonedEServiceAdded" }, ({ data }) => + ClonedEServiceAddedV1.toBinary(data) + ) + .with({ type: "EServiceUpdated" }, ({ data }) => + EServiceUpdatedV1.toBinary(data) + ) + .with({ type: "EServiceWithDescriptorsDeleted" }, ({ data }) => + EServiceWithDescriptorsDeletedV1.toBinary(data) + ) + .with({ type: "EServiceDocumentUpdated" }, ({ data }) => + EServiceDocumentUpdatedV1.toBinary(data) + ) + .with({ type: "EServiceDeleted" }, ({ data }) => + EServiceDeletedV1.toBinary(data) + ) + .with({ type: "EServiceDocumentAdded" }, ({ data }) => + EServiceDocumentAddedV1.toBinary(data) + ) + .with({ type: "EServiceDocumentDeleted" }, ({ data }) => + EServiceDocumentDeletedV1.toBinary(data) + ) + .with({ type: "EServiceDescriptorAdded" }, ({ data }) => + EServiceDescriptorAddedV1.toBinary(data) + ) + .with({ type: "EServiceDescriptorUpdated" }, ({ data }) => + EServiceDescriptorUpdatedV1.toBinary(data) + ) + .with({ type: "MovedAttributesFromEserviceToDescriptors" }, ({ data }) => + MovedAttributesFromEserviceToDescriptorsV1.toBinary(data) + ) + .with({ type: "EServiceRiskAnalysisAdded" }, ({ data }) => + EServiceRiskAnalysisAddedV1.toBinary(data) + ) + .with({ type: "EServiceRiskAnalysisUpdated" }, ({ data }) => + EServiceRiskAnalysisUpdatedV1.toBinary(data) + ) + .with({ type: "EServiceRiskAnalysisDeleted" }, ({ data }) => + EServiceRiskAnalysisDeletedV1.toBinary(data) + ) + .exhaustive(); +} + +export const EServiceEventV1 = z.discriminatedUnion("type", [ + z.object({ + event_version: z.literal(1), + type: z.literal("EServiceAdded"), + data: protobufDecoder(EServiceAddedV1), + }), + z.object({ + event_version: z.literal(1), + type: z.literal("ClonedEServiceAdded"), + data: protobufDecoder(ClonedEServiceAddedV1), + }), + z.object({ + event_version: z.literal(1), + type: z.literal("EServiceUpdated"), + data: protobufDecoder(EServiceUpdatedV1), + }), + z.object({ + event_version: z.literal(1), + type: z.literal("EServiceWithDescriptorsDeleted"), + data: protobufDecoder(EServiceWithDescriptorsDeletedV1), + }), + z.object({ + event_version: z.literal(1), + type: z.literal("EServiceDocumentUpdated"), + data: protobufDecoder(EServiceDocumentUpdatedV1), + }), + z.object({ + event_version: z.literal(1), + type: z.literal("EServiceDeleted"), + data: protobufDecoder(EServiceDeletedV1), + }), + z.object({ + event_version: z.literal(1), + type: z.literal("EServiceDocumentAdded"), + data: protobufDecoder(EServiceDocumentAddedV1), + }), + z.object({ + event_version: z.literal(1), + type: z.literal("EServiceDocumentDeleted"), + data: protobufDecoder(EServiceDocumentDeletedV1), + }), + z.object({ + event_version: z.literal(1), + type: z.literal("EServiceDescriptorAdded"), + data: protobufDecoder(EServiceDescriptorAddedV1), + }), + z.object({ + event_version: z.literal(1), + type: z.literal("EServiceDescriptorUpdated"), + data: protobufDecoder(EServiceDescriptorUpdatedV1), + }), + z.object({ + event_version: z.literal(1), + type: z.literal("MovedAttributesFromEserviceToDescriptors"), + data: protobufDecoder(MovedAttributesFromEserviceToDescriptorsV1), + }), + z.object({ + event_version: z.literal(1), + type: z.literal("EServiceRiskAnalysisAdded"), + data: protobufDecoder(EServiceRiskAnalysisAddedV1), + }), + z.object({ + event_version: z.literal(1), + type: z.literal("EServiceRiskAnalysisUpdated"), + data: protobufDecoder(EServiceRiskAnalysisUpdatedV1), + }), + z.object({ + event_version: z.literal(1), + type: z.literal("EServiceRiskAnalysisDeleted"), + data: protobufDecoder(EServiceRiskAnalysisDeletedV1), + }), +]); + +export type EServiceEventV1 = z.infer; diff --git a/src/eservice/eventsV2.ts b/src/eservice/eventsV2.ts new file mode 100644 index 0000000..a3962a8 --- /dev/null +++ b/src/eservice/eventsV2.ts @@ -0,0 +1,206 @@ +import { match } from "ts-pattern"; +import { z } from "zod"; +import { protobufDecoder } from "../protobuf.js"; +import { + DraftEServiceUpdatedV2, + EServiceAddedV2, + EServiceClonedV2, + EServiceDeletedV2, + EServiceDescriptorActivatedV2, + EServiceDescriptorAddedV2, + EServiceDescriptorArchivedV2, + EServiceDescriptorDocumentAddedV2, + EServiceDescriptorDocumentDeletedV2, + EServiceDescriptorDocumentUpdatedV2, + EServiceDescriptorInterfaceAddedV2, + EServiceDescriptorInterfaceDeletedV2, + EServiceDescriptorInterfaceUpdatedV2, + EServiceDescriptorPublishedV2, + EServiceDescriptorSuspendedV2, + EServiceDraftDescriptorDeletedV2, + EServiceDraftDescriptorUpdatedV2, + EServiceRiskAnalysisAddedV2, + EServiceDescriptorQuotasUpdatedV2, + EServiceRiskAnalysisUpdatedV2, + EServiceRiskAnalysisDeletedV2, +} from "../gen/v2/eservice/events.js"; + +export function eServiceEventToBinaryDataV2( + event: EServiceEventV2 +): Uint8Array { + return match(event) + .with({ type: "EServiceAdded" }, ({ data }) => + EServiceAddedV2.toBinary(data) + ) + .with({ type: "DraftEServiceUpdated" }, ({ data }) => + DraftEServiceUpdatedV2.toBinary(data) + ) + .with({ type: "EServiceDeleted" }, ({ data }) => + EServiceDeletedV2.toBinary(data) + ) + .with({ type: "EServiceCloned" }, ({ data }) => + EServiceClonedV2.toBinary(data) + ) + .with({ type: "EServiceDescriptorAdded" }, ({ data }) => + EServiceDescriptorAddedV2.toBinary(data) + ) + .with({ type: "EServiceDraftDescriptorUpdated" }, ({ data }) => + EServiceDraftDescriptorUpdatedV2.toBinary(data) + ) + .with({ type: "EServiceDescriptorQuotasUpdated" }, ({ data }) => + EServiceDescriptorQuotasUpdatedV2.toBinary(data) + ) + .with({ type: "EServiceDescriptorActivated" }, ({ data }) => + EServiceDescriptorActivatedV2.toBinary(data) + ) + .with({ type: "EServiceDescriptorArchived" }, ({ data }) => + EServiceDescriptorArchivedV2.toBinary(data) + ) + .with({ type: "EServiceDescriptorPublished" }, ({ data }) => + EServiceDescriptorPublishedV2.toBinary(data) + ) + .with({ type: "EServiceDescriptorSuspended" }, ({ data }) => + EServiceDescriptorSuspendedV2.toBinary(data) + ) + .with({ type: "EServiceDraftDescriptorDeleted" }, ({ data }) => + EServiceDraftDescriptorDeletedV2.toBinary(data) + ) + .with({ type: "EServiceDescriptorInterfaceAdded" }, ({ data }) => + EServiceDescriptorInterfaceAddedV2.toBinary(data) + ) + .with({ type: "EServiceDescriptorDocumentAdded" }, ({ data }) => + EServiceDescriptorDocumentAddedV2.toBinary(data) + ) + .with({ type: "EServiceDescriptorInterfaceUpdated" }, ({ data }) => + EServiceDescriptorInterfaceUpdatedV2.toBinary(data) + ) + .with({ type: "EServiceDescriptorDocumentUpdated" }, ({ data }) => + EServiceDescriptorDocumentUpdatedV2.toBinary(data) + ) + .with({ type: "EServiceDescriptorInterfaceDeleted" }, ({ data }) => + EServiceDescriptorInterfaceDeletedV2.toBinary(data) + ) + .with({ type: "EServiceDescriptorDocumentDeleted" }, ({ data }) => + EServiceDescriptorDocumentDeletedV2.toBinary(data) + ) + .with({ type: "EServiceRiskAnalysisAdded" }, ({ data }) => + EServiceRiskAnalysisAddedV2.toBinary(data) + ) + .with({ type: "EServiceRiskAnalysisUpdated" }, ({ data }) => + EServiceRiskAnalysisUpdatedV2.toBinary(data) + ) + .with({ type: "EServiceRiskAnalysisDeleted" }, ({ data }) => + EServiceRiskAnalysisDeletedV2.toBinary(data) + ) + .exhaustive(); +} + +export const EServiceEventV2 = z.discriminatedUnion("type", [ + z.object({ + event_version: z.literal(2), + type: z.literal("EServiceAdded"), + data: protobufDecoder(EServiceAddedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("DraftEServiceUpdated"), + data: protobufDecoder(DraftEServiceUpdatedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("EServiceDeleted"), + data: protobufDecoder(EServiceDeletedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("EServiceCloned"), + data: protobufDecoder(EServiceClonedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("EServiceDescriptorAdded"), + data: protobufDecoder(EServiceDescriptorAddedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("EServiceDraftDescriptorUpdated"), + data: protobufDecoder(EServiceDraftDescriptorUpdatedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("EServiceDescriptorQuotasUpdated"), + data: protobufDecoder(EServiceDescriptorQuotasUpdatedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("EServiceDescriptorActivated"), + data: protobufDecoder(EServiceDescriptorActivatedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("EServiceDescriptorArchived"), + data: protobufDecoder(EServiceDescriptorArchivedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("EServiceDescriptorPublished"), + data: protobufDecoder(EServiceDescriptorPublishedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("EServiceDescriptorSuspended"), + data: protobufDecoder(EServiceDescriptorSuspendedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("EServiceDraftDescriptorDeleted"), + data: protobufDecoder(EServiceDraftDescriptorDeletedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("EServiceDescriptorInterfaceAdded"), + data: protobufDecoder(EServiceDescriptorInterfaceAddedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("EServiceDescriptorDocumentAdded"), + data: protobufDecoder(EServiceDescriptorDocumentAddedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("EServiceDescriptorInterfaceUpdated"), + data: protobufDecoder(EServiceDescriptorInterfaceUpdatedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("EServiceDescriptorDocumentUpdated"), + data: protobufDecoder(EServiceDescriptorDocumentUpdatedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("EServiceDescriptorInterfaceDeleted"), + data: protobufDecoder(EServiceDescriptorInterfaceDeletedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("EServiceDescriptorDocumentDeleted"), + data: protobufDecoder(EServiceDescriptorDocumentDeletedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("EServiceRiskAnalysisAdded"), + data: protobufDecoder(EServiceRiskAnalysisAddedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("EServiceRiskAnalysisUpdated"), + data: protobufDecoder(EServiceRiskAnalysisUpdatedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("EServiceRiskAnalysisDeleted"), + data: protobufDecoder(EServiceRiskAnalysisDeletedV2), + }), +]); + +export type EServiceEventV2 = z.infer; diff --git a/src/eservice/index.ts b/src/eservice/index.ts new file mode 100644 index 0000000..fe19bf0 --- /dev/null +++ b/src/eservice/index.ts @@ -0,0 +1,48 @@ +import { match } from "ts-pattern"; +import { z } from "zod"; +import { EventEnvelope, eventV1, eventV2 } from "../events.js"; +import { EServiceEventV1, eServiceEventToBinaryDataV1 } from "./eventsV1.js"; +import { EServiceEventV2, eServiceEventToBinaryDataV2 } from "./eventsV2.js"; + +function eServiceEventToBinaryData(event: EServiceEvent): Uint8Array { + return match(event) + .with({ event_version: 1 }, eServiceEventToBinaryDataV1) + .with({ event_version: 2 }, eServiceEventToBinaryDataV2) + .exhaustive(); +} + +const EServiceEvent = z + .discriminatedUnion("event_version", [eventV1, eventV2]) + .transform((obj, ctx) => { + const res = match(obj) + .with({ event_version: 1 }, () => EServiceEventV1.safeParse(obj)) + .with({ event_version: 2 }, () => EServiceEventV2.safeParse(obj)) + .exhaustive(); + + if (!res.success) { + res.error.issues.forEach(ctx.addIssue); + return z.NEVER; + } + return res.data; + }); + +type EServiceEvent = z.infer; + +const EServiceEventEnvelopeV1 = EventEnvelope(EServiceEventV1); +type EServiceEventEnvelopeV1 = z.infer; + +const EServiceEventEnvelopeV2 = EventEnvelope(EServiceEventV2); +type EServiceEventEnvelopeV2 = z.infer; + +const EServiceEventEnvelope = EventEnvelope(EServiceEvent); +type EServiceEventEnvelope = z.infer; + +export { + eServiceEventToBinaryData, + EServiceEvent, + EServiceEventV1, + EServiceEventV2, + EServiceEventEnvelope, + EServiceEventEnvelopeV1, + EServiceEventEnvelopeV2, +}; diff --git a/src/events.ts b/src/events.ts new file mode 100644 index 0000000..66f9137 --- /dev/null +++ b/src/events.ts @@ -0,0 +1,55 @@ +/* eslint-disable @typescript-eslint/explicit-function-return-type */ +import { z } from "zod"; + +export const EventEnvelope = ( + event: TEventZodType +) => + z.intersection( + z.object({ + sequence_num: z.number(), + stream_id: z.string().uuid(), + version: z.number(), + correlation_id: z.string().nullish(), + log_date: z.coerce.date(), + }), + event + ); +export type EventEnvelope = z.infer< + ReturnType>> +>; + +export const DebeziumCreatePayload = ( + event: TEventZodType +) => + z.object({ + op: z.enum(["c", "r"]), + after: EventEnvelope(event), + }); +export type DebeziumCreatePayload = z.infer< + ReturnType>> +>; + +export const Message = ( + event: TEventZodType +) => + z.object({ + value: z.preprocess( + (v) => (v != null ? JSON.parse(v.toString()) : null), + DebeziumCreatePayload(EventEnvelope(event)) + ), + }); +export type Message = z.infer< + ReturnType>> +>; + +export const eventV1 = z + .object({ + event_version: z.literal(1), + }) + .passthrough(); + +export const eventV2 = z + .object({ + event_version: z.literal(2), + }) + .passthrough(); diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..1861fd2 --- /dev/null +++ b/src/index.ts @@ -0,0 +1,4 @@ +export * from "./eservice/index.js"; +export * from "./agreement/index.js"; +export * from "./purpose/index.js"; +export * from "./tenant/index.js"; diff --git a/src/protobuf.ts b/src/protobuf.ts new file mode 100644 index 0000000..b949fbe --- /dev/null +++ b/src/protobuf.ts @@ -0,0 +1,8 @@ +import { MessageType } from "@protobuf-ts/runtime"; +import { ZodAny, ZodTransformer, z } from "zod"; + +export function protobufDecoder( + decoder: MessageType +): ZodTransformer { + return z.any().transform((v) => decoder.fromBinary(Buffer.from(v, "hex"))); +} diff --git a/src/purpose/eventsV1.ts b/src/purpose/eventsV1.ts new file mode 100644 index 0000000..80ee662 --- /dev/null +++ b/src/purpose/eventsV1.ts @@ -0,0 +1,113 @@ +import { match } from "ts-pattern"; +import { z } from "zod"; +import { + PurposeCreatedV1, + PurposeDeletedV1, + PurposeUpdatedV1, + PurposeVersionActivatedV1, + PurposeVersionArchivedV1, + PurposeVersionCreatedV1, + PurposeVersionDeletedV1, + PurposeVersionRejectedV1, + PurposeVersionSuspendedV1, + PurposeVersionUpdatedV1, + PurposeVersionWaitedForApprovalV1, +} from "../gen/v1/purpose/events.js"; +import { protobufDecoder } from "../protobuf.js"; + +export function purposeEventToBinaryDataV1(event: PurposeEventV1): Uint8Array { + return match(event) + .with({ type: "PurposeCreated" }, ({ data }) => + PurposeCreatedV1.toBinary(data) + ) + .with({ type: "PurposeVersionCreated" }, ({ data }) => + PurposeVersionCreatedV1.toBinary(data) + ) + .with({ type: "PurposeUpdated" }, ({ data }) => + PurposeUpdatedV1.toBinary(data) + ) + .with({ type: "PurposeVersionUpdated" }, ({ data }) => + PurposeVersionUpdatedV1.toBinary(data) + ) + .with({ type: "PurposeVersionActivated" }, ({ data }) => + PurposeVersionActivatedV1.toBinary(data) + ) + .with({ type: "PurposeVersionRejected" }, ({ data }) => + PurposeVersionRejectedV1.toBinary(data) + ) + .with({ type: "PurposeVersionSuspended" }, ({ data }) => + PurposeVersionSuspendedV1.toBinary(data) + ) + .with({ type: "PurposeVersionArchived" }, ({ data }) => + PurposeVersionArchivedV1.toBinary(data) + ) + .with({ type: "PurposeVersionWaitedForApproval" }, ({ data }) => + PurposeVersionWaitedForApprovalV1.toBinary(data) + ) + .with({ type: "PurposeDeleted" }, ({ data }) => + PurposeDeletedV1.toBinary(data) + ) + .with({ type: "PurposeVersionDeleted" }, ({ data }) => + PurposeVersionDeletedV1.toBinary(data) + ) + .exhaustive(); +} + +export const PurposeEventV1 = z.discriminatedUnion("type", [ + z.object({ + event_version: z.literal(1), + type: z.literal("PurposeCreated"), + data: protobufDecoder(PurposeCreatedV1), + }), + z.object({ + event_version: z.literal(1), + type: z.literal("PurposeUpdated"), + data: protobufDecoder(PurposeUpdatedV1), + }), + z.object({ + event_version: z.literal(1), + type: z.literal("PurposeVersionWaitedForApproval"), + data: protobufDecoder(PurposeVersionWaitedForApprovalV1), + }), + z.object({ + event_version: z.literal(1), + type: z.literal("PurposeVersionActivated"), + data: protobufDecoder(PurposeVersionActivatedV1), + }), + z.object({ + event_version: z.literal(1), + type: z.literal("PurposeVersionCreated"), + data: protobufDecoder(PurposeVersionCreatedV1), + }), + z.object({ + event_version: z.literal(1), + type: z.literal("PurposeVersionSuspended"), + data: protobufDecoder(PurposeVersionSuspendedV1), + }), + z.object({ + event_version: z.literal(1), + type: z.literal("PurposeVersionArchived"), + data: protobufDecoder(PurposeVersionArchivedV1), + }), + z.object({ + event_version: z.literal(1), + type: z.literal("PurposeVersionUpdated"), + data: protobufDecoder(PurposeVersionUpdatedV1), + }), + z.object({ + event_version: z.literal(1), + type: z.literal("PurposeVersionDeleted"), + data: protobufDecoder(PurposeVersionDeletedV1), + }), + z.object({ + event_version: z.literal(1), + type: z.literal("PurposeDeleted"), + data: protobufDecoder(PurposeDeletedV1), + }), + z.object({ + event_version: z.literal(1), + type: z.literal("PurposeVersionRejected"), + data: protobufDecoder(PurposeVersionRejectedV1), + }), +]); +export type PurposeEventV1 = z.infer; diff --git a/src/purpose/eventsV2.ts b/src/purpose/eventsV2.ts new file mode 100644 index 0000000..50d7adc --- /dev/null +++ b/src/purpose/eventsV2.ts @@ -0,0 +1,174 @@ +import { match } from "ts-pattern"; +import { z } from "zod"; +import { + PurposeAddedV2, + DraftPurposeUpdatedV2, + PurposeWaitingForApprovalV2, + PurposeActivatedV2, + DraftPurposeDeletedV2, + WaitingForApprovalPurposeDeletedV2, + NewPurposeVersionActivatedV2, + PurposeVersionActivatedV2, + PurposeVersionUnsuspendedByProducerV2, + PurposeVersionUnsuspendedByConsumerV2, + PurposeVersionSuspendedByProducerV2, + PurposeVersionSuspendedByConsumerV2, + NewPurposeVersionWaitingForApprovalV2, + PurposeVersionOverQuotaUnsuspendedV2, + PurposeArchivedV2, + WaitingForApprovalPurposeVersionDeletedV2, + PurposeVersionRejectedV2, + PurposeClonedV2, +} from "../gen/v2/purpose/events.js"; +import { protobufDecoder } from "../protobuf.js"; + +export function purposeEventToBinaryDataV2(event: PurposeEventV2): Uint8Array { + return match(event) + .with({ type: "PurposeAdded" }, ({ data }) => PurposeAddedV2.toBinary(data)) + .with({ type: "DraftPurposeUpdated" }, ({ data }) => + DraftPurposeUpdatedV2.toBinary(data) + ) + .with({ type: "PurposeWaitingForApproval" }, ({ data }) => + PurposeWaitingForApprovalV2.toBinary(data) + ) + .with({ type: "PurposeActivated" }, ({ data }) => + PurposeActivatedV2.toBinary(data) + ) + .with({ type: "DraftPurposeDeleted" }, ({ data }) => + DraftPurposeDeletedV2.toBinary(data) + ) + .with({ type: "WaitingForApprovalPurposeDeleted" }, ({ data }) => + WaitingForApprovalPurposeDeletedV2.toBinary(data) + ) + .with({ type: "NewPurposeVersionActivated" }, ({ data }) => + NewPurposeVersionActivatedV2.toBinary(data) + ) + .with({ type: "PurposeVersionActivated" }, ({ data }) => + PurposeVersionActivatedV2.toBinary(data) + ) + .with({ type: "PurposeVersionUnsuspendedByProducer" }, ({ data }) => + PurposeVersionUnsuspendedByProducerV2.toBinary(data) + ) + .with({ type: "PurposeVersionUnsuspendedByConsumer" }, ({ data }) => + PurposeVersionUnsuspendedByConsumerV2.toBinary(data) + ) + .with({ type: "PurposeVersionSuspendedByProducer" }, ({ data }) => + PurposeVersionSuspendedByProducerV2.toBinary(data) + ) + .with({ type: "PurposeVersionSuspendedByConsumer" }, ({ data }) => + PurposeVersionSuspendedByConsumerV2.toBinary(data) + ) + .with({ type: "NewPurposeVersionWaitingForApproval" }, ({ data }) => + NewPurposeVersionWaitingForApprovalV2.toBinary(data) + ) + .with({ type: "PurposeVersionOverQuotaUnsuspended" }, ({ data }) => + PurposeVersionOverQuotaUnsuspendedV2.toBinary(data) + ) + .with({ type: "PurposeArchived" }, ({ data }) => + PurposeArchivedV2.toBinary(data) + ) + .with({ type: "WaitingForApprovalPurposeVersionDeleted" }, ({ data }) => + WaitingForApprovalPurposeVersionDeletedV2.toBinary(data) + ) + .with({ type: "PurposeVersionRejected" }, ({ data }) => + PurposeVersionRejectedV2.toBinary(data) + ) + .with({ type: "PurposeCloned" }, ({ data }) => + PurposeClonedV2.toBinary(data) + ) + .exhaustive(); +} + +export const PurposeEventV2 = z.discriminatedUnion("type", [ + z.object({ + event_version: z.literal(2), + type: z.literal("PurposeAdded"), + data: protobufDecoder(PurposeAddedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("DraftPurposeUpdated"), + data: protobufDecoder(DraftPurposeUpdatedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("PurposeWaitingForApproval"), + data: protobufDecoder(PurposeWaitingForApprovalV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("PurposeActivated"), + data: protobufDecoder(PurposeActivatedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("DraftPurposeDeleted"), + data: protobufDecoder(DraftPurposeDeletedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("WaitingForApprovalPurposeDeleted"), + data: protobufDecoder(WaitingForApprovalPurposeDeletedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("NewPurposeVersionActivated"), + data: protobufDecoder(NewPurposeVersionActivatedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("PurposeVersionActivated"), + data: protobufDecoder(PurposeVersionActivatedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("PurposeVersionUnsuspendedByProducer"), + data: protobufDecoder(PurposeVersionUnsuspendedByProducerV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("PurposeVersionUnsuspendedByConsumer"), + data: protobufDecoder(PurposeVersionUnsuspendedByConsumerV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("PurposeVersionSuspendedByProducer"), + data: protobufDecoder(PurposeVersionSuspendedByProducerV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("PurposeVersionSuspendedByConsumer"), + data: protobufDecoder(PurposeVersionSuspendedByConsumerV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("NewPurposeVersionWaitingForApproval"), + data: protobufDecoder(NewPurposeVersionWaitingForApprovalV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("PurposeVersionOverQuotaUnsuspended"), + data: protobufDecoder(PurposeVersionOverQuotaUnsuspendedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("PurposeArchived"), + data: protobufDecoder(PurposeArchivedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("WaitingForApprovalPurposeVersionDeleted"), + data: protobufDecoder(WaitingForApprovalPurposeVersionDeletedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("PurposeVersionRejected"), + data: protobufDecoder(PurposeVersionRejectedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("PurposeCloned"), + data: protobufDecoder(PurposeClonedV2), + }), +]); +export type PurposeEventV2 = z.infer; diff --git a/src/purpose/index.ts b/src/purpose/index.ts new file mode 100644 index 0000000..f9587a5 --- /dev/null +++ b/src/purpose/index.ts @@ -0,0 +1,47 @@ +import { match } from "ts-pattern"; +import { z } from "zod"; +import { EventEnvelope, eventV1, eventV2 } from "../events.js"; +import { PurposeEventV1, purposeEventToBinaryDataV1 } from "./eventsV1.js"; +import { PurposeEventV2, purposeEventToBinaryDataV2 } from "./eventsV2.js"; + +function purposeEventToBinaryData(event: PurposeEvent): Uint8Array { + return match(event) + .with({ event_version: 1 }, purposeEventToBinaryDataV1) + .with({ event_version: 2 }, purposeEventToBinaryDataV2) + .exhaustive(); +} + +const PurposeEvent = z + .discriminatedUnion("event_version", [eventV1, eventV2]) + .transform((obj, ctx) => { + const res = match(obj) + .with({ event_version: 1 }, () => PurposeEventV1.safeParse(obj)) + .with({ event_version: 2 }, () => PurposeEventV2.safeParse(obj)) + .exhaustive(); + + if (!res.success) { + res.error.issues.forEach(ctx.addIssue); + return z.NEVER; + } + return res.data; + }); +type PurposeEvent = z.infer; + +const PurposeEventEnvelopeV1 = EventEnvelope(PurposeEventV1); +type PurposeEventEnvelopeV1 = z.infer; + +const PurposeEventEnvelopeV2 = EventEnvelope(PurposeEventV2); +type PurposeEventEnvelopeV2 = z.infer; + +const PurposeEventEnvelope = EventEnvelope(PurposeEvent); +type PurposeEventEnvelope = z.infer; + +export { + purposeEventToBinaryData, + PurposeEvent, + PurposeEventV1, + PurposeEventV2, + PurposeEventEnvelope, + PurposeEventEnvelopeV1, + PurposeEventEnvelopeV2, +}; diff --git a/src/tenant/eventsV1.ts b/src/tenant/eventsV1.ts new file mode 100644 index 0000000..5f02101 --- /dev/null +++ b/src/tenant/eventsV1.ts @@ -0,0 +1,60 @@ +import { match } from "ts-pattern"; +import { z } from "zod"; +import { + TenantCreatedV1, + TenantUpdatedV1, + TenantDeletedV1, + SelfcareMappingCreatedV1, + SelfcareMappingDeletedV1, +} from "../gen/v1/tenant/events.js"; +import { protobufDecoder } from "../protobuf.js"; + +export function tenantEventToBinaryDataV1(event: TenantEventV1): Uint8Array { + return match(event) + .with({ type: "TenantCreated" }, ({ data }) => + TenantCreatedV1.toBinary(data) + ) + .with({ type: "TenantUpdated" }, ({ data }) => + TenantUpdatedV1.toBinary(data) + ) + .with({ type: "TenantDeleted" }, ({ data }) => + TenantDeletedV1.toBinary(data) + ) + .with({ type: "SelfcareMappingCreated" }, ({ data }) => + SelfcareMappingCreatedV1.toBinary(data) + ) + .with({ type: "SelfcareMappingDeleted" }, ({ data }) => + SelfcareMappingDeletedV1.toBinary(data) + ) + .exhaustive(); +} + +export const TenantEventV1 = z.discriminatedUnion("type", [ + z.object({ + event_version: z.literal(1), + type: z.literal("TenantCreated"), + data: protobufDecoder(TenantCreatedV1), + }), + z.object({ + event_version: z.literal(1), + type: z.literal("TenantUpdated"), + data: protobufDecoder(TenantUpdatedV1), + }), + z.object({ + event_version: z.literal(1), + type: z.literal("TenantDeleted"), + data: protobufDecoder(TenantDeletedV1), + }), + z.object({ + event_version: z.literal(1), + type: z.literal("SelfcareMappingCreated"), + data: protobufDecoder(SelfcareMappingCreatedV1), + }), + z.object({ + event_version: z.literal(1), + type: z.literal("SelfcareMappingDeleted"), + data: protobufDecoder(SelfcareMappingDeletedV1), + }), +]); + +export type TenantEventV1 = z.infer; diff --git a/src/tenant/eventsV2.ts b/src/tenant/eventsV2.ts new file mode 100644 index 0000000..a243689 --- /dev/null +++ b/src/tenant/eventsV2.ts @@ -0,0 +1,123 @@ +import { match } from "ts-pattern"; +import { z } from "zod"; +import { + TenantOnboardedV2, + TenantOnboardDetailsUpdatedV2, + TenantCertifiedAttributeAssignedV2, + TenantCertifiedAttributeRevokedV2, + TenantDeclaredAttributeAssignedV2, + TenantDeclaredAttributeRevokedV2, + TenantVerifiedAttributeAssignedV2, + TenantVerifiedAttributeRevokedV2, + TenantVerifiedAttributeExpirationUpdatedV2, + MaintenanceTenantDeletedV2, + TenantMailAddedV2, + TenantVerifiedAttributeExtensionUpdatedV2, +} from "../gen/v2/tenant/events.js"; +import { protobufDecoder } from "../protobuf.js"; + +export function tenantEventToBinaryDataV2(event: TenantEventV2): Uint8Array { + return match(event) + .with({ type: "TenantOnboarded" }, ({ data }) => + TenantOnboardedV2.toBinary(data) + ) + .with({ type: "TenantOnboardDetailsUpdated" }, ({ data }) => + TenantOnboardDetailsUpdatedV2.toBinary(data) + ) + .with({ type: "TenantCertifiedAttributeAssigned" }, ({ data }) => + TenantCertifiedAttributeAssignedV2.toBinary(data) + ) + .with({ type: "TenantCertifiedAttributeRevoked" }, ({ data }) => + TenantCertifiedAttributeRevokedV2.toBinary(data) + ) + .with({ type: "TenantDeclaredAttributeAssigned" }, ({ data }) => + TenantDeclaredAttributeAssignedV2.toBinary(data) + ) + .with({ type: "TenantDeclaredAttributeRevoked" }, ({ data }) => + TenantDeclaredAttributeRevokedV2.toBinary(data) + ) + .with({ type: "TenantVerifiedAttributeAssigned" }, ({ data }) => + TenantVerifiedAttributeAssignedV2.toBinary(data) + ) + .with({ type: "TenantVerifiedAttributeRevoked" }, ({ data }) => + TenantVerifiedAttributeRevokedV2.toBinary(data) + ) + .with({ type: "TenantVerifiedAttributeExpirationUpdated" }, ({ data }) => + TenantVerifiedAttributeExpirationUpdatedV2.toBinary(data) + ) + .with({ type: "TenantVerifiedAttributeExtensionUpdated" }, ({ data }) => + TenantVerifiedAttributeExtensionUpdatedV2.toBinary(data) + ) + .with({ type: "MaintenanceTenantDeleted" }, ({ data }) => + MaintenanceTenantDeletedV2.toBinary(data) + ) + .with({ type: "TenantMailAdded" }, ({ data }) => + TenantMailAddedV2.toBinary(data) + ) + .exhaustive(); +} + +export const TenantEventV2 = z.discriminatedUnion("type", [ + z.object({ + event_version: z.literal(2), + type: z.literal("TenantOnboarded"), + data: protobufDecoder(TenantOnboardedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("TenantOnboardDetailsUpdated"), + data: protobufDecoder(TenantOnboardDetailsUpdatedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("TenantCertifiedAttributeAssigned"), + data: protobufDecoder(TenantCertifiedAttributeAssignedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("TenantCertifiedAttributeRevoked"), + data: protobufDecoder(TenantCertifiedAttributeRevokedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("TenantDeclaredAttributeAssigned"), + data: protobufDecoder(TenantDeclaredAttributeAssignedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("TenantDeclaredAttributeRevoked"), + data: protobufDecoder(TenantDeclaredAttributeRevokedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("TenantVerifiedAttributeAssigned"), + data: protobufDecoder(TenantVerifiedAttributeAssignedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("TenantVerifiedAttributeRevoked"), + data: protobufDecoder(TenantVerifiedAttributeRevokedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("TenantVerifiedAttributeExpirationUpdated"), + data: protobufDecoder(TenantVerifiedAttributeExpirationUpdatedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("TenantVerifiedAttributeExtensionUpdated"), + data: protobufDecoder(TenantVerifiedAttributeExtensionUpdatedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("MaintenanceTenantDeleted"), + data: protobufDecoder(MaintenanceTenantDeletedV2), + }), + z.object({ + event_version: z.literal(2), + type: z.literal("TenantMailAdded"), + data: protobufDecoder(TenantMailAddedV2), + }), +]); + +export type TenantEventV2 = z.infer; diff --git a/src/tenant/index.ts b/src/tenant/index.ts new file mode 100644 index 0000000..f49c4f1 --- /dev/null +++ b/src/tenant/index.ts @@ -0,0 +1,48 @@ +import { match } from "ts-pattern"; +import { z } from "zod"; +import { EventEnvelope, eventV1, eventV2 } from "../events.js"; +import { TenantEventV1, tenantEventToBinaryDataV1 } from "./eventsV1.js"; +import { TenantEventV2, tenantEventToBinaryDataV2 } from "./eventsV2.js"; + +function tenantEventToBinaryData(event: TenantEvent): Uint8Array { + return match(event) + .with({ event_version: 1 }, tenantEventToBinaryDataV1) + .with({ event_version: 2 }, tenantEventToBinaryDataV2) + .exhaustive(); +} + +const TenantEvent = z + .discriminatedUnion("event_version", [eventV1, eventV2]) + .transform((obj, ctx) => { + const res = match(obj) + .with({ event_version: 1 }, () => TenantEventV1.safeParse(obj)) + .with({ event_version: 2 }, () => TenantEventV2.safeParse(obj)) + .exhaustive(); + + if (!res.success) { + res.error.issues.forEach(ctx.addIssue); + return z.NEVER; + } + return res.data; + }); + +type TenantEvent = z.infer; + +const TenantEventEnvelopeV1 = EventEnvelope(TenantEventV1); +type TenantEventEnvelopeV1 = z.infer; + +const TenantEventEnvelopeV2 = EventEnvelope(TenantEventV2); +type TenantEventEnvelopeV2 = z.infer; + +const TenantEventEnvelope = EventEnvelope(TenantEvent); +type TenantEventEnvelope = z.infer; + +export { + tenantEventToBinaryData, + TenantEvent, + TenantEventV1, + TenantEventV2, + TenantEventEnvelope, + TenantEventEnvelopeV1, + TenantEventEnvelopeV2, +}; diff --git a/tsconfig.check.json b/tsconfig.check.json new file mode 100644 index 0000000..68c5cbd --- /dev/null +++ b/tsconfig.check.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "noEmit": true, + }, + "include": ["src"] +} diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json new file mode 100644 index 0000000..87aee40 --- /dev/null +++ b/tsconfig.eslint.json @@ -0,0 +1,11 @@ +// Root tsconfig for typescript-eslint +// See: https://typescript-eslint.io/getting-started/typed-linting/monorepos#important-note-regarding-large--10-multi-package-monorepos +// Choosing the root tsconfig approach because of: https://typescript-eslint.io/getting-started/typed-linting/monorepos#important-note-regarding-large--10-multi-package-monorepos +{ + "extends": "./tsconfig.json", + "compilerOptions": { + // ensure that nobody can accidentally use this config for a build + "noEmit": true, + }, + "include": ["src"] +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..fd8be29 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,13 @@ +{ + "extends": "@tsconfig/node-lts", + "compilerOptions": { + "noUnusedLocals": true, + "noUnusedParameters": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "declaration": true, + "declarationMap": true, + "outDir": "dist" + }, + "include": ["src"] +} From 1fb18916f8a4897530bdad92e9aeff03977cddba Mon Sep 17 00:00:00 2001 From: Carmine Porricelli Date: Tue, 16 Jul 2024 10:08:04 +0200 Subject: [PATCH 02/12] Added github ci and release workflows --- .github/workflows/ci.yml | 58 +++++++++++++++++++++++++++++++++++ .github/workflows/release.yml | 35 +++++++++++++++++++++ 2 files changed, 93 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..d2af39c --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,58 @@ +name: CI +on: + push: + branches: main + pull_request: + +jobs: + formatting: + name: Check formatting + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 + - uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4 + with: + node-version-file: ./package.json + - uses: pnpm/action-setup@v4 + with: + run_install: true + - run: pnpm format:check + + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 + - uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4 + with: + node-version-file: ./package.json + - uses: pnpm/action-setup@v4 + with: + run_install: true + - run: pnpm lint + + check: + name: Check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 + - uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4 + with: + node-version-file: ./package.json + - uses: pnpm/action-setup@v4 + with: + run_install: true + - run: pnpm check + + build: + name: Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 + - uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4 + with: + node-version-file: ./package.json + - uses: pnpm/action-setup@v4 + with: + run_install: true + - run: pnpm build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..e2fef46 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,35 @@ +name: Publish package to GitHub Packages +on: + push: + branches: + - main + paths-ignore: + - "CODEOWNERS" + - "**.md" + - ".**" + +jobs: + release: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + fetch-depth: 0 + + - uses: actions/setup-node@v4 + with: + node-version: "20.x" + registry-url: "https://npm.pkg.github.com" + scope: "@pagopa" + + - uses: pnpm/action-setup@v2 + + - run: pnpm i --frozen-lockfile + - run: pnpm build + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.BOT_TOKEN }} From 3e91d526b72d32ed0733696ee0fd642016827a9a Mon Sep 17 00:00:00 2001 From: Carmine Porricelli Date: Tue, 16 Jul 2024 10:08:09 +0200 Subject: [PATCH 03/12] Small refactors --- src/agreement/index.ts | 28 +++++++++------------------- src/eservice/index.ts | 28 +++++++++------------------- src/events.ts | 24 ------------------------ src/purpose/index.ts | 28 +++++++++------------------- src/tenant/index.ts | 28 +++++++++------------------- 5 files changed, 36 insertions(+), 100 deletions(-) diff --git a/src/agreement/index.ts b/src/agreement/index.ts index be0b49b..a259fef 100644 --- a/src/agreement/index.ts +++ b/src/agreement/index.ts @@ -4,14 +4,14 @@ import { EventEnvelope, eventV1, eventV2 } from "../events.js"; import { AgreementEventV1, agreementEventToBinaryDataV1 } from "./eventsV1.js"; import { AgreementEventV2, agreementEventToBinaryDataV2 } from "./eventsV2.js"; -function agreementEventToBinaryData(event: AgreementEvent): Uint8Array { +export function agreementEventToBinaryData(event: AgreementEvent): Uint8Array { return match(event) .with({ event_version: 1 }, agreementEventToBinaryDataV1) .with({ event_version: 2 }, agreementEventToBinaryDataV2) .exhaustive(); } -const AgreementEvent = z +export const AgreementEvent = z .discriminatedUnion("event_version", [eventV1, eventV2]) .transform((obj, ctx) => { const res = match(obj) @@ -26,23 +26,13 @@ const AgreementEvent = z return res.data; }); -type AgreementEvent = z.infer; +export type AgreementEvent = z.infer; -const AgreementEventEnvelopeV1 = EventEnvelope(AgreementEventV1); -type AgreementEventEnvelopeV1 = z.infer; +export const AgreementEventEnvelopeV1 = EventEnvelope(AgreementEventV1); +export type AgreementEventEnvelopeV1 = z.infer; -const AgreementEventEnvelopeV2 = EventEnvelope(AgreementEventV2); -type AgreementEventEnvelopeV2 = z.infer; +export const AgreementEventEnvelopeV2 = EventEnvelope(AgreementEventV2); +export type AgreementEventEnvelopeV2 = z.infer; -const AgreementEventEnvelope = EventEnvelope(AgreementEvent); -type AgreementEventEnvelope = z.infer; - -export { - agreementEventToBinaryData, - AgreementEvent, - AgreementEventV1, - AgreementEventV2, - AgreementEventEnvelope, - AgreementEventEnvelopeV1, - AgreementEventEnvelopeV2, -}; +export const AgreementEventEnvelope = EventEnvelope(AgreementEvent); +export type AgreementEventEnvelope = z.infer; diff --git a/src/eservice/index.ts b/src/eservice/index.ts index fe19bf0..360c8ac 100644 --- a/src/eservice/index.ts +++ b/src/eservice/index.ts @@ -4,14 +4,14 @@ import { EventEnvelope, eventV1, eventV2 } from "../events.js"; import { EServiceEventV1, eServiceEventToBinaryDataV1 } from "./eventsV1.js"; import { EServiceEventV2, eServiceEventToBinaryDataV2 } from "./eventsV2.js"; -function eServiceEventToBinaryData(event: EServiceEvent): Uint8Array { +export function eServiceEventToBinaryData(event: EServiceEvent): Uint8Array { return match(event) .with({ event_version: 1 }, eServiceEventToBinaryDataV1) .with({ event_version: 2 }, eServiceEventToBinaryDataV2) .exhaustive(); } -const EServiceEvent = z +export const EServiceEvent = z .discriminatedUnion("event_version", [eventV1, eventV2]) .transform((obj, ctx) => { const res = match(obj) @@ -26,23 +26,13 @@ const EServiceEvent = z return res.data; }); -type EServiceEvent = z.infer; +export type EServiceEvent = z.infer; -const EServiceEventEnvelopeV1 = EventEnvelope(EServiceEventV1); -type EServiceEventEnvelopeV1 = z.infer; +export const EServiceEventEnvelopeV1 = EventEnvelope(EServiceEventV1); +export type EServiceEventEnvelopeV1 = z.infer; -const EServiceEventEnvelopeV2 = EventEnvelope(EServiceEventV2); -type EServiceEventEnvelopeV2 = z.infer; +export const EServiceEventEnvelopeV2 = EventEnvelope(EServiceEventV2); +export type EServiceEventEnvelopeV2 = z.infer; -const EServiceEventEnvelope = EventEnvelope(EServiceEvent); -type EServiceEventEnvelope = z.infer; - -export { - eServiceEventToBinaryData, - EServiceEvent, - EServiceEventV1, - EServiceEventV2, - EServiceEventEnvelope, - EServiceEventEnvelopeV1, - EServiceEventEnvelopeV2, -}; +export const EServiceEventEnvelope = EventEnvelope(EServiceEvent); +export type EServiceEventEnvelope = z.infer; diff --git a/src/events.ts b/src/events.ts index 66f9137..8dc6c0c 100644 --- a/src/events.ts +++ b/src/events.ts @@ -18,30 +18,6 @@ export type EventEnvelope = z.infer< ReturnType>> >; -export const DebeziumCreatePayload = ( - event: TEventZodType -) => - z.object({ - op: z.enum(["c", "r"]), - after: EventEnvelope(event), - }); -export type DebeziumCreatePayload = z.infer< - ReturnType>> ->; - -export const Message = ( - event: TEventZodType -) => - z.object({ - value: z.preprocess( - (v) => (v != null ? JSON.parse(v.toString()) : null), - DebeziumCreatePayload(EventEnvelope(event)) - ), - }); -export type Message = z.infer< - ReturnType>> ->; - export const eventV1 = z .object({ event_version: z.literal(1), diff --git a/src/purpose/index.ts b/src/purpose/index.ts index f9587a5..04ed710 100644 --- a/src/purpose/index.ts +++ b/src/purpose/index.ts @@ -4,14 +4,14 @@ import { EventEnvelope, eventV1, eventV2 } from "../events.js"; import { PurposeEventV1, purposeEventToBinaryDataV1 } from "./eventsV1.js"; import { PurposeEventV2, purposeEventToBinaryDataV2 } from "./eventsV2.js"; -function purposeEventToBinaryData(event: PurposeEvent): Uint8Array { +export function purposeEventToBinaryData(event: PurposeEvent): Uint8Array { return match(event) .with({ event_version: 1 }, purposeEventToBinaryDataV1) .with({ event_version: 2 }, purposeEventToBinaryDataV2) .exhaustive(); } -const PurposeEvent = z +export const PurposeEvent = z .discriminatedUnion("event_version", [eventV1, eventV2]) .transform((obj, ctx) => { const res = match(obj) @@ -25,23 +25,13 @@ const PurposeEvent = z } return res.data; }); -type PurposeEvent = z.infer; +export type PurposeEvent = z.infer; -const PurposeEventEnvelopeV1 = EventEnvelope(PurposeEventV1); -type PurposeEventEnvelopeV1 = z.infer; +export const PurposeEventEnvelopeV1 = EventEnvelope(PurposeEventV1); +export type PurposeEventEnvelopeV1 = z.infer; -const PurposeEventEnvelopeV2 = EventEnvelope(PurposeEventV2); -type PurposeEventEnvelopeV2 = z.infer; +export const PurposeEventEnvelopeV2 = EventEnvelope(PurposeEventV2); +export type PurposeEventEnvelopeV2 = z.infer; -const PurposeEventEnvelope = EventEnvelope(PurposeEvent); -type PurposeEventEnvelope = z.infer; - -export { - purposeEventToBinaryData, - PurposeEvent, - PurposeEventV1, - PurposeEventV2, - PurposeEventEnvelope, - PurposeEventEnvelopeV1, - PurposeEventEnvelopeV2, -}; +export const PurposeEventEnvelope = EventEnvelope(PurposeEvent); +export type PurposeEventEnvelope = z.infer; diff --git a/src/tenant/index.ts b/src/tenant/index.ts index f49c4f1..aae79e8 100644 --- a/src/tenant/index.ts +++ b/src/tenant/index.ts @@ -4,14 +4,14 @@ import { EventEnvelope, eventV1, eventV2 } from "../events.js"; import { TenantEventV1, tenantEventToBinaryDataV1 } from "./eventsV1.js"; import { TenantEventV2, tenantEventToBinaryDataV2 } from "./eventsV2.js"; -function tenantEventToBinaryData(event: TenantEvent): Uint8Array { +export function tenantEventToBinaryData(event: TenantEvent): Uint8Array { return match(event) .with({ event_version: 1 }, tenantEventToBinaryDataV1) .with({ event_version: 2 }, tenantEventToBinaryDataV2) .exhaustive(); } -const TenantEvent = z +export const TenantEvent = z .discriminatedUnion("event_version", [eventV1, eventV2]) .transform((obj, ctx) => { const res = match(obj) @@ -26,23 +26,13 @@ const TenantEvent = z return res.data; }); -type TenantEvent = z.infer; +export type TenantEvent = z.infer; -const TenantEventEnvelopeV1 = EventEnvelope(TenantEventV1); -type TenantEventEnvelopeV1 = z.infer; +export const TenantEventEnvelopeV1 = EventEnvelope(TenantEventV1); +export type TenantEventEnvelopeV1 = z.infer; -const TenantEventEnvelopeV2 = EventEnvelope(TenantEventV2); -type TenantEventEnvelopeV2 = z.infer; +export const TenantEventEnvelopeV2 = EventEnvelope(TenantEventV2); +export type TenantEventEnvelopeV2 = z.infer; -const TenantEventEnvelope = EventEnvelope(TenantEvent); -type TenantEventEnvelope = z.infer; - -export { - tenantEventToBinaryData, - TenantEvent, - TenantEventV1, - TenantEventV2, - TenantEventEnvelope, - TenantEventEnvelopeV1, - TenantEventEnvelopeV2, -}; +export const TenantEventEnvelope = EventEnvelope(TenantEvent); +export type TenantEventEnvelope = z.infer; From 76c1c8e02e81d25ed3f6355daa2ab72301958758 Mon Sep 17 00:00:00 2001 From: Carmine Porricelli Date: Tue, 16 Jul 2024 10:11:01 +0200 Subject: [PATCH 04/12] Added postinstall script --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index f274223..68cec5a 100644 --- a/package.json +++ b/package.json @@ -9,11 +9,12 @@ ".": "./dist/index.js" }, "scripts": { + "postinstall": "pnpm run generate-protobuf", "lint": "eslint . --ext .ts,.tsx", "lint:autofix": "eslint . --ext .ts,.tsx --fix", "format:check": "prettier --check src", "format:write": "prettier --write src", - "build": "pnpm generate-protobuf & tsc", + "build": "tsc", "check": "tsc --project tsconfig.check.json", "generate-protobuf": "mkdirp ./src/gen && npx protoc --ts_opt=eslint_disable --ts_out ./src/gen --proto_path ./proto ./proto/**/**/*.proto && tsc-esm-fix --src='src/gen/' --ext='.js'" }, From 706105fa3afcb3bc5e19ce33966c75558bd0a82e Mon Sep 17 00:00:00 2001 From: Carmine Porricelli Date: Tue, 16 Jul 2024 10:16:01 +0200 Subject: [PATCH 05/12] Create .prettierignore --- .prettierignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .prettierignore diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..fb1d3ea --- /dev/null +++ b/.prettierignore @@ -0,0 +1,2 @@ +src/gen/**/* +dist/** From 345b83aa82d9ca78f78f27c3ab20778cb23f27a8 Mon Sep 17 00:00:00 2001 From: Carmine Porricelli Date: Wed, 17 Jul 2024 10:38:40 +0200 Subject: [PATCH 06/12] Implemented suggestions --- proto/v1/agreement/agreement.proto | 2 -- proto/v1/agreement/state.proto | 15 --------------- proto/v1/eservice/events.proto | 14 -------------- proto/v1/tenant/events.proto | 9 --------- proto/v2/agreement/agreement.proto | 2 -- proto/v2/eservice/events.proto | 15 --------------- 6 files changed, 57 deletions(-) delete mode 100644 proto/v1/agreement/state.proto diff --git a/proto/v1/agreement/agreement.proto b/proto/v1/agreement/agreement.proto index 2f100e7..07697bb 100644 --- a/proto/v1/agreement/agreement.proto +++ b/proto/v1/agreement/agreement.proto @@ -26,8 +26,6 @@ message AgreementV1 { } message VerifiedAttributeV1 { - reserved 2, 3, 4, 5; - required string id = 1; } diff --git a/proto/v1/agreement/state.proto b/proto/v1/agreement/state.proto deleted file mode 100644 index 7386eee..0000000 --- a/proto/v1/agreement/state.proto +++ /dev/null @@ -1,15 +0,0 @@ -syntax = "proto2"; - -package agreement; - -import "v1/agreement/agreement.proto"; - - -message StateV1 { - repeated AgreementsV1 agreements = 1; -} - -message AgreementsV1 { - required string key = 1; - required AgreementV1 value = 2; -} diff --git a/proto/v1/eservice/events.proto b/proto/v1/eservice/events.proto index e7038db..2508a1a 100644 --- a/proto/v1/eservice/events.proto +++ b/proto/v1/eservice/events.proto @@ -61,17 +61,3 @@ message MovedAttributesFromEserviceToDescriptorsV1 { required EServiceV1 eservice = 1; } -message EServiceRiskAnalysisAddedV1 { - required EServiceV1 eservice = 1; - required string riskAnalysisId = 2; -} - -message EServiceRiskAnalysisUpdatedV1 { - required EServiceV1 eservice = 1; - required string riskAnalysisId = 2; -} - -message EServiceRiskAnalysisDeletedV1 { - required EServiceV1 eservice = 1; - required string riskAnalysisId = 2; -} diff --git a/proto/v1/tenant/events.proto b/proto/v1/tenant/events.proto index aed0bb2..3542287 100644 --- a/proto/v1/tenant/events.proto +++ b/proto/v1/tenant/events.proto @@ -15,12 +15,3 @@ message TenantUpdatedV1 { message TenantDeletedV1 { required string tenantId = 1; } - -message SelfcareMappingCreatedV1 { - required string selfcareId = 1; - required string tenantId = 2; -} - -message SelfcareMappingDeletedV1 { - required string selfcareId = 1; -} \ No newline at end of file diff --git a/proto/v2/agreement/agreement.proto b/proto/v2/agreement/agreement.proto index e97c067..6abeafb 100644 --- a/proto/v2/agreement/agreement.proto +++ b/proto/v2/agreement/agreement.proto @@ -26,8 +26,6 @@ message AgreementV2 { } message VerifiedAttributeV2 { - reserved 2, 3, 4, 5; - string id = 1; } diff --git a/proto/v2/eservice/events.proto b/proto/v2/eservice/events.proto index 236626d..29588d9 100644 --- a/proto/v2/eservice/events.proto +++ b/proto/v2/eservice/events.proto @@ -98,18 +98,3 @@ message EServiceDescriptorDocumentDeletedV2 { string documentId = 2; EServiceV2 eservice = 3; } - -message EServiceRiskAnalysisAddedV2 { - string riskAnalysisId = 1; - EServiceV2 eservice = 2; -} - -message EServiceRiskAnalysisUpdatedV2 { - string riskAnalysisId = 1; - EServiceV2 eservice = 2; -} - -message EServiceRiskAnalysisDeletedV2 { - string riskAnalysisId = 1; - EServiceV2 eservice = 2; -} From 6be25615220f7bc09e17bae039dcc1ce532bbe15 Mon Sep 17 00:00:00 2001 From: Carmine Porricelli Date: Wed, 17 Jul 2024 10:47:48 +0200 Subject: [PATCH 07/12] Fix --- src/eservice/eventsV1.ts | 27 --------------------------- src/eservice/eventsV2.ts | 27 --------------------------- src/tenant/eventsV1.ts | 18 ------------------ 3 files changed, 72 deletions(-) diff --git a/src/eservice/eventsV1.ts b/src/eservice/eventsV1.ts index 57a8c26..7bde147 100644 --- a/src/eservice/eventsV1.ts +++ b/src/eservice/eventsV1.ts @@ -9,9 +9,6 @@ import { EServiceDocumentAddedV1, EServiceDocumentDeletedV1, EServiceDocumentUpdatedV1, - EServiceRiskAnalysisAddedV1, - EServiceRiskAnalysisDeletedV1, - EServiceRiskAnalysisUpdatedV1, EServiceUpdatedV1, EServiceWithDescriptorsDeletedV1, MovedAttributesFromEserviceToDescriptorsV1, @@ -55,15 +52,6 @@ export function eServiceEventToBinaryDataV1( .with({ type: "MovedAttributesFromEserviceToDescriptors" }, ({ data }) => MovedAttributesFromEserviceToDescriptorsV1.toBinary(data) ) - .with({ type: "EServiceRiskAnalysisAdded" }, ({ data }) => - EServiceRiskAnalysisAddedV1.toBinary(data) - ) - .with({ type: "EServiceRiskAnalysisUpdated" }, ({ data }) => - EServiceRiskAnalysisUpdatedV1.toBinary(data) - ) - .with({ type: "EServiceRiskAnalysisDeleted" }, ({ data }) => - EServiceRiskAnalysisDeletedV1.toBinary(data) - ) .exhaustive(); } @@ -123,21 +111,6 @@ export const EServiceEventV1 = z.discriminatedUnion("type", [ type: z.literal("MovedAttributesFromEserviceToDescriptors"), data: protobufDecoder(MovedAttributesFromEserviceToDescriptorsV1), }), - z.object({ - event_version: z.literal(1), - type: z.literal("EServiceRiskAnalysisAdded"), - data: protobufDecoder(EServiceRiskAnalysisAddedV1), - }), - z.object({ - event_version: z.literal(1), - type: z.literal("EServiceRiskAnalysisUpdated"), - data: protobufDecoder(EServiceRiskAnalysisUpdatedV1), - }), - z.object({ - event_version: z.literal(1), - type: z.literal("EServiceRiskAnalysisDeleted"), - data: protobufDecoder(EServiceRiskAnalysisDeletedV1), - }), ]); export type EServiceEventV1 = z.infer; diff --git a/src/eservice/eventsV2.ts b/src/eservice/eventsV2.ts index a3962a8..0467b7f 100644 --- a/src/eservice/eventsV2.ts +++ b/src/eservice/eventsV2.ts @@ -19,10 +19,7 @@ import { EServiceDescriptorSuspendedV2, EServiceDraftDescriptorDeletedV2, EServiceDraftDescriptorUpdatedV2, - EServiceRiskAnalysisAddedV2, EServiceDescriptorQuotasUpdatedV2, - EServiceRiskAnalysisUpdatedV2, - EServiceRiskAnalysisDeletedV2, } from "../gen/v2/eservice/events.js"; export function eServiceEventToBinaryDataV2( @@ -83,15 +80,6 @@ export function eServiceEventToBinaryDataV2( .with({ type: "EServiceDescriptorDocumentDeleted" }, ({ data }) => EServiceDescriptorDocumentDeletedV2.toBinary(data) ) - .with({ type: "EServiceRiskAnalysisAdded" }, ({ data }) => - EServiceRiskAnalysisAddedV2.toBinary(data) - ) - .with({ type: "EServiceRiskAnalysisUpdated" }, ({ data }) => - EServiceRiskAnalysisUpdatedV2.toBinary(data) - ) - .with({ type: "EServiceRiskAnalysisDeleted" }, ({ data }) => - EServiceRiskAnalysisDeletedV2.toBinary(data) - ) .exhaustive(); } @@ -186,21 +174,6 @@ export const EServiceEventV2 = z.discriminatedUnion("type", [ type: z.literal("EServiceDescriptorDocumentDeleted"), data: protobufDecoder(EServiceDescriptorDocumentDeletedV2), }), - z.object({ - event_version: z.literal(2), - type: z.literal("EServiceRiskAnalysisAdded"), - data: protobufDecoder(EServiceRiskAnalysisAddedV2), - }), - z.object({ - event_version: z.literal(2), - type: z.literal("EServiceRiskAnalysisUpdated"), - data: protobufDecoder(EServiceRiskAnalysisUpdatedV2), - }), - z.object({ - event_version: z.literal(2), - type: z.literal("EServiceRiskAnalysisDeleted"), - data: protobufDecoder(EServiceRiskAnalysisDeletedV2), - }), ]); export type EServiceEventV2 = z.infer; diff --git a/src/tenant/eventsV1.ts b/src/tenant/eventsV1.ts index 5f02101..a67ad77 100644 --- a/src/tenant/eventsV1.ts +++ b/src/tenant/eventsV1.ts @@ -4,8 +4,6 @@ import { TenantCreatedV1, TenantUpdatedV1, TenantDeletedV1, - SelfcareMappingCreatedV1, - SelfcareMappingDeletedV1, } from "../gen/v1/tenant/events.js"; import { protobufDecoder } from "../protobuf.js"; @@ -20,12 +18,6 @@ export function tenantEventToBinaryDataV1(event: TenantEventV1): Uint8Array { .with({ type: "TenantDeleted" }, ({ data }) => TenantDeletedV1.toBinary(data) ) - .with({ type: "SelfcareMappingCreated" }, ({ data }) => - SelfcareMappingCreatedV1.toBinary(data) - ) - .with({ type: "SelfcareMappingDeleted" }, ({ data }) => - SelfcareMappingDeletedV1.toBinary(data) - ) .exhaustive(); } @@ -45,16 +37,6 @@ export const TenantEventV1 = z.discriminatedUnion("type", [ type: z.literal("TenantDeleted"), data: protobufDecoder(TenantDeletedV1), }), - z.object({ - event_version: z.literal(1), - type: z.literal("SelfcareMappingCreated"), - data: protobufDecoder(SelfcareMappingCreatedV1), - }), - z.object({ - event_version: z.literal(1), - type: z.literal("SelfcareMappingDeleted"), - data: protobufDecoder(SelfcareMappingDeletedV1), - }), ]); export type TenantEventV1 = z.infer; From 9f14723c73081c313a62f5f48aea7d46afd2a9f3 Mon Sep 17 00:00:00 2001 From: Carmine Porricelli Date: Wed, 17 Jul 2024 10:53:03 +0200 Subject: [PATCH 08/12] Added attributes to tenant proto model --- proto/v1/tenant/tenant.proto | 41 ++++++++++++++++++++++++++++++------ proto/v2/tenant/events.proto | 5 ----- proto/v2/tenant/tenant.proto | 41 ++++++++++++++++++++++++++++++------ src/tenant/eventsV2.ts | 9 -------- 4 files changed, 70 insertions(+), 26 deletions(-) diff --git a/proto/v1/tenant/tenant.proto b/proto/v1/tenant/tenant.proto index a3a2767..936be96 100644 --- a/proto/v1/tenant/tenant.proto +++ b/proto/v1/tenant/tenant.proto @@ -7,12 +7,14 @@ message TenantV1 { optional string selfcareId = 2; required ExternalIdV1 externalId = 3; repeated TenantFeatureV1 features = 4; - required int64 createdAt = 5; - optional int64 updatedAt = 6; - optional string name = 7; - optional TenantKindV1 kind = 8; - optional int64 onboardedAt = 9; - optional TenantUnitTypeV1 subUnitType = 10; + repeated TenantAttributeV1 attributes = 5; + required int64 createdAt = 6; + optional int64 updatedAt = 7; + optional string name = 8; + optional TenantKindV1 kind = 9; + optional int64 onboardedAt = 10; + optional TenantUnitTypeV1 subUnitType = 11; + } enum TenantKindV1 { @@ -57,3 +59,30 @@ message ExternalIdV1 { required string origin = 1; required string value = 2; } + +message TenantCertifiedAttributeV1 { + required string id = 1; + required int64 assignmentTimestamp = 2; + optional int64 revocationTimestamp = 3; +} + +message TenantDeclaredAttributeV1 { + required string id = 1; + required int64 assignmentTimestamp = 2; + optional int64 revocationTimestamp = 3; +} + +message TenantVerifiedAttributeV1 { + required string id = 1; + required int64 assignmentTimestamp = 2; + repeated TenantVerifierV1 verifiedBy = 3; + repeated TenantRevokerV1 revokedBy = 4; +} + +message TenantAttributeV1 { + oneof sealed_value { + TenantCertifiedAttributeV1 certifiedAttribute = 1; + TenantDeclaredAttributeV1 declaredAttribute = 2; + TenantVerifiedAttributeV1 verifiedAttribute = 3; + } +} \ No newline at end of file diff --git a/proto/v2/tenant/events.proto b/proto/v2/tenant/events.proto index b7b0221..5131429 100644 --- a/proto/v2/tenant/events.proto +++ b/proto/v2/tenant/events.proto @@ -56,8 +56,3 @@ message MaintenanceTenantDeletedV2 { string tenantId = 1; TenantV2 tenant = 2; } - -message TenantMailAddedV2 { - string mailId = 1; - TenantV2 tenant = 2; -} \ No newline at end of file diff --git a/proto/v2/tenant/tenant.proto b/proto/v2/tenant/tenant.proto index a280590..aecdc78 100644 --- a/proto/v2/tenant/tenant.proto +++ b/proto/v2/tenant/tenant.proto @@ -7,12 +7,14 @@ message TenantV2 { string selfcareId = 2; ExternalIdV2 externalId = 3; repeated TenantFeatureV2 features = 4; - int64 createdAt = 5; - optional int64 updatedAt = 6; - string name = 7; - optional TenantKindV2 kind = 8; - int64 onboardedAt = 9; - optional TenantUnitTypeV2 subUnitType = 10; + repeated TenantAttributeV2 attributes = 5; + int64 createdAt = 6; + optional int64 updatedAt = 7; + string name = 8; + optional TenantKindV2 kind = 9; + int64 onboardedAt = 10; + optional TenantUnitTypeV2 subUnitType = 11; + } enum TenantKindV2 { @@ -55,3 +57,30 @@ message ExternalIdV2 { string origin = 1; string value = 2; } + +message TenantCertifiedAttributeV2 { + string id = 1; + int64 assignmentTimestamp = 2; + optional int64 revocationTimestamp = 3; +} + +message TenantDeclaredAttributeV2 { + string id = 1; + int64 assignmentTimestamp = 2; + optional int64 revocationTimestamp = 3; +} + +message TenantVerifiedAttributeV2 { + string id = 1; + int64 assignmentTimestamp = 2; + repeated TenantVerifierV2 verifiedBy = 3; + repeated TenantRevokerV2 revokedBy = 4; +} + +message TenantAttributeV2 { + oneof sealed_value { + TenantCertifiedAttributeV2 certifiedAttribute = 1; + TenantDeclaredAttributeV2 declaredAttribute = 2; + TenantVerifiedAttributeV2 verifiedAttribute = 3; + } +} \ No newline at end of file diff --git a/src/tenant/eventsV2.ts b/src/tenant/eventsV2.ts index a243689..287137a 100644 --- a/src/tenant/eventsV2.ts +++ b/src/tenant/eventsV2.ts @@ -11,7 +11,6 @@ import { TenantVerifiedAttributeRevokedV2, TenantVerifiedAttributeExpirationUpdatedV2, MaintenanceTenantDeletedV2, - TenantMailAddedV2, TenantVerifiedAttributeExtensionUpdatedV2, } from "../gen/v2/tenant/events.js"; import { protobufDecoder } from "../protobuf.js"; @@ -51,9 +50,6 @@ export function tenantEventToBinaryDataV2(event: TenantEventV2): Uint8Array { .with({ type: "MaintenanceTenantDeleted" }, ({ data }) => MaintenanceTenantDeletedV2.toBinary(data) ) - .with({ type: "TenantMailAdded" }, ({ data }) => - TenantMailAddedV2.toBinary(data) - ) .exhaustive(); } @@ -113,11 +109,6 @@ export const TenantEventV2 = z.discriminatedUnion("type", [ type: z.literal("MaintenanceTenantDeleted"), data: protobufDecoder(MaintenanceTenantDeletedV2), }), - z.object({ - event_version: z.literal(2), - type: z.literal("TenantMailAdded"), - data: protobufDecoder(TenantMailAddedV2), - }), ]); export type TenantEventV2 = z.infer; From d53c741e9e4da194306a849fd41fddc526222535 Mon Sep 17 00:00:00 2001 From: Carmine Porricelli Date: Wed, 17 Jul 2024 10:53:56 +0200 Subject: [PATCH 09/12] Added EOF lines --- proto/v1/tenant/tenant.proto | 2 +- proto/v2/tenant/tenant.proto | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/proto/v1/tenant/tenant.proto b/proto/v1/tenant/tenant.proto index 936be96..b7667b2 100644 --- a/proto/v1/tenant/tenant.proto +++ b/proto/v1/tenant/tenant.proto @@ -85,4 +85,4 @@ message TenantAttributeV1 { TenantDeclaredAttributeV1 declaredAttribute = 2; TenantVerifiedAttributeV1 verifiedAttribute = 3; } -} \ No newline at end of file +} diff --git a/proto/v2/tenant/tenant.proto b/proto/v2/tenant/tenant.proto index aecdc78..01006cd 100644 --- a/proto/v2/tenant/tenant.proto +++ b/proto/v2/tenant/tenant.proto @@ -83,4 +83,4 @@ message TenantAttributeV2 { TenantDeclaredAttributeV2 declaredAttribute = 2; TenantVerifiedAttributeV2 verifiedAttribute = 3; } -} \ No newline at end of file +} From 2a64d34a3eb50109975795fddc24855329a4f9b8 Mon Sep 17 00:00:00 2001 From: Carmine Porricelli Date: Wed, 17 Jul 2024 15:58:43 +0200 Subject: [PATCH 10/12] Update .github/workflows/ci.yml Co-authored-by: Michele De Simone <106953981+micdes-pagopa@users.noreply.github.com> --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d2af39c..2a36825 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: CI +name: PR build on: push: branches: main From dfca0df2ed8086ee7a2a0815368befec0400bbd9 Mon Sep 17 00:00:00 2001 From: Carmine Porricelli Date: Wed, 17 Jul 2024 15:59:09 +0200 Subject: [PATCH 11/12] Update .github/workflows/ci.yml Co-authored-by: Michele De Simone <106953981+micdes-pagopa@users.noreply.github.com> --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2a36825..7ccb9d0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,5 @@ name: PR build on: - push: - branches: main pull_request: jobs: From 4d0179aae90c75c81551b4a9400ae4c76abbb239 Mon Sep 17 00:00:00 2001 From: Carmine Porricelli Date: Thu, 18 Jul 2024 14:39:40 +0200 Subject: [PATCH 12/12] Added EServiceDescriptionUpdated event --- proto/v2/eservice/events.proto | 4 ++++ src/eservice/eventsV2.ts | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/proto/v2/eservice/events.proto b/proto/v2/eservice/events.proto index 29588d9..0b7c97a 100644 --- a/proto/v2/eservice/events.proto +++ b/proto/v2/eservice/events.proto @@ -98,3 +98,7 @@ message EServiceDescriptorDocumentDeletedV2 { string documentId = 2; EServiceV2 eservice = 3; } + +message EServiceDescriptionUpdatedV2 { + EServiceV2 eservice = 1; +} diff --git a/src/eservice/eventsV2.ts b/src/eservice/eventsV2.ts index 0467b7f..f9b9c18 100644 --- a/src/eservice/eventsV2.ts +++ b/src/eservice/eventsV2.ts @@ -20,6 +20,7 @@ import { EServiceDraftDescriptorDeletedV2, EServiceDraftDescriptorUpdatedV2, EServiceDescriptorQuotasUpdatedV2, + EServiceDescriptionUpdatedV2, } from "../gen/v2/eservice/events.js"; export function eServiceEventToBinaryDataV2( @@ -80,6 +81,9 @@ export function eServiceEventToBinaryDataV2( .with({ type: "EServiceDescriptorDocumentDeleted" }, ({ data }) => EServiceDescriptorDocumentDeletedV2.toBinary(data) ) + .with({ type: "EServiceDescriptionUpdated" }, ({ data }) => + EServiceDescriptionUpdatedV2.toBinary(data) + ) .exhaustive(); } @@ -174,6 +178,11 @@ export const EServiceEventV2 = z.discriminatedUnion("type", [ type: z.literal("EServiceDescriptorDocumentDeleted"), data: protobufDecoder(EServiceDescriptorDocumentDeletedV2), }), + z.object({ + event_version: z.literal(2), + type: z.literal("EServiceDescriptionUpdated"), + data: protobufDecoder(EServiceDescriptionUpdatedV2), + }), ]); export type EServiceEventV2 = z.infer;