diff --git a/.pnp.cjs b/.pnp.cjs index febbddb53..832612283 100755 --- a/.pnp.cjs +++ b/.pnp.cjs @@ -78,7 +78,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@types/testing-library__jest-dom", "npm:5.14.5"],\ ["@types/uuid", "npm:9.0.1"],\ ["@typescript-eslint/eslint-plugin", "virtual:9909ff5388c6b6a3a46f12eb37c0afb449fcd1eedb9f02d871bde711a076c929583f48ecc4b85fa6d71478b076104a25f83dee45bc69687a22f551c576d7595d#npm:7.5.0"],\ - ["@typescript-eslint/parser", "virtual:9909ff5388c6b6a3a46f12eb37c0afb449fcd1eedb9f02d871bde711a076c929583f48ecc4b85fa6d71478b076104a25f83dee45bc69687a22f551c576d7595d#npm:7.5.0"],\ + ["@typescript-eslint/parser", "virtual:9909ff5388c6b6a3a46f12eb37c0afb449fcd1eedb9f02d871bde711a076c929583f48ecc4b85fa6d71478b076104a25f83dee45bc69687a22f551c576d7595d#npm:8.17.0"],\ ["apollo-datasource-rest", "virtual:9909ff5388c6b6a3a46f12eb37c0afb449fcd1eedb9f02d871bde711a076c929583f48ecc4b85fa6d71478b076104a25f83dee45bc69687a22f551c576d7595d#npm:3.7.0"],\ ["apollo-server-micro", "virtual:9909ff5388c6b6a3a46f12eb37c0afb449fcd1eedb9f02d871bde711a076c929583f48ecc4b85fa6d71478b076104a25f83dee45bc69687a22f551c576d7595d#npm:3.11.1"],\ ["apollo3-cache-persist", "virtual:9909ff5388c6b6a3a46f12eb37c0afb449fcd1eedb9f02d871bde711a076c929583f48ecc4b85fa6d71478b076104a25f83dee45bc69687a22f551c576d7595d#npm:0.14.1"],\ @@ -8212,7 +8212,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ]],\ ["@surma/rollup-plugin-off-main-thread", [\ ["npm:2.2.3", {\ - "packageLocation": "./.yarn/unplugged/@surma-rollup-plugin-off-main-thread-npm-2.2.3-1f57d3eded/node_modules/@surma/rollup-plugin-off-main-thread/",\ + "packageLocation": "./.yarn/cache/@surma-rollup-plugin-off-main-thread-npm-2.2.3-1f57d3eded-2c02134944.zip/node_modules/@surma/rollup-plugin-off-main-thread/",\ "packageDependencies": [\ ["@surma/rollup-plugin-off-main-thread", "npm:2.2.3"],\ ["ejs", "npm:3.1.10"],\ @@ -9025,7 +9025,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@types/eslint", null],\ ["@types/typescript", null],\ ["@types/typescript-eslint__parser", null],\ - ["@typescript-eslint/parser", "virtual:9909ff5388c6b6a3a46f12eb37c0afb449fcd1eedb9f02d871bde711a076c929583f48ecc4b85fa6d71478b076104a25f83dee45bc69687a22f551c576d7595d#npm:7.5.0"],\ + ["@typescript-eslint/parser", "virtual:9909ff5388c6b6a3a46f12eb37c0afb449fcd1eedb9f02d871bde711a076c929583f48ecc4b85fa6d71478b076104a25f83dee45bc69687a22f551c576d7595d#npm:8.17.0"],\ ["@typescript-eslint/scope-manager", "npm:7.5.0"],\ ["@typescript-eslint/type-utils", "virtual:ffbd544ad0fe91b6a84d26da1b983efebd6dadd9a2ae0160d3effbd386edafd313452293d39a630ddc390a351a5cc7679a4b023d895be27d9a3a0972f47b5e95#npm:7.5.0"],\ ["@typescript-eslint/utils", "virtual:ffbd544ad0fe91b6a84d26da1b983efebd6dadd9a2ae0160d3effbd386edafd313452293d39a630ddc390a351a5cc7679a4b023d895be27d9a3a0972f47b5e95#npm:7.5.0"],\ @@ -9051,23 +9051,23 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { }]\ ]],\ ["@typescript-eslint/parser", [\ - ["npm:7.5.0", {\ - "packageLocation": "./.yarn/cache/@typescript-eslint-parser-npm-7.5.0-950f9b5b79-c9f85ae638.zip/node_modules/@typescript-eslint/parser/",\ + ["npm:8.17.0", {\ + "packageLocation": "./.yarn/cache/@typescript-eslint-parser-npm-8.17.0-f09f5fe974-3d330fc777.zip/node_modules/@typescript-eslint/parser/",\ "packageDependencies": [\ - ["@typescript-eslint/parser", "npm:7.5.0"]\ + ["@typescript-eslint/parser", "npm:8.17.0"]\ ],\ "linkType": "SOFT"\ }],\ - ["virtual:9909ff5388c6b6a3a46f12eb37c0afb449fcd1eedb9f02d871bde711a076c929583f48ecc4b85fa6d71478b076104a25f83dee45bc69687a22f551c576d7595d#npm:7.5.0", {\ - "packageLocation": "./.yarn/__virtual__/@typescript-eslint-parser-virtual-ff1f3e1176/0/cache/@typescript-eslint-parser-npm-7.5.0-950f9b5b79-c9f85ae638.zip/node_modules/@typescript-eslint/parser/",\ + ["virtual:9909ff5388c6b6a3a46f12eb37c0afb449fcd1eedb9f02d871bde711a076c929583f48ecc4b85fa6d71478b076104a25f83dee45bc69687a22f551c576d7595d#npm:8.17.0", {\ + "packageLocation": "./.yarn/__virtual__/@typescript-eslint-parser-virtual-30f2e23c7f/0/cache/@typescript-eslint-parser-npm-8.17.0-f09f5fe974-3d330fc777.zip/node_modules/@typescript-eslint/parser/",\ "packageDependencies": [\ - ["@typescript-eslint/parser", "virtual:9909ff5388c6b6a3a46f12eb37c0afb449fcd1eedb9f02d871bde711a076c929583f48ecc4b85fa6d71478b076104a25f83dee45bc69687a22f551c576d7595d#npm:7.5.0"],\ + ["@typescript-eslint/parser", "virtual:9909ff5388c6b6a3a46f12eb37c0afb449fcd1eedb9f02d871bde711a076c929583f48ecc4b85fa6d71478b076104a25f83dee45bc69687a22f551c576d7595d#npm:8.17.0"],\ ["@types/eslint", null],\ ["@types/typescript", null],\ - ["@typescript-eslint/scope-manager", "npm:7.5.0"],\ - ["@typescript-eslint/types", "npm:7.5.0"],\ - ["@typescript-eslint/typescript-estree", "virtual:0cb9aadbb04938258c97b7cbc489f605e3990fc27740176fcd5b75b9e0cbc7e0332ee441d29d653ee98091fea9acfceb90c7fe89e3796da0a24d0b189182f300#npm:7.5.0"],\ - ["@typescript-eslint/visitor-keys", "npm:7.5.0"],\ + ["@typescript-eslint/scope-manager", "npm:8.17.0"],\ + ["@typescript-eslint/types", "npm:8.17.0"],\ + ["@typescript-eslint/typescript-estree", "virtual:30f2e23c7ffcf891f87a18cb58d472e2cdd77c8ba41282172fab4ab97aca549224dfc8214dd79bce8fef1f272ed1c733a2ee10d12249d23d48590573865fe339#npm:8.17.0"],\ + ["@typescript-eslint/visitor-keys", "npm:8.17.0"],\ ["debug", "virtual:4758feee42453c0e31b0d2032a7b1362d6b06281699830d2da9a056f2cca72bd2c5cfdb74005fdf03a64876be8eaca2dd7b0fc2dc59d14318badf19cb22ba18e#npm:4.3.4"],\ ["eslint", "npm:8.57.0"],\ ["typescript", "patch:typescript@npm%3A5.6.3#~builtin::version=5.6.3&hash=8c6c40"]\ @@ -9099,6 +9099,15 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@typescript-eslint/visitor-keys", "npm:7.5.0"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:8.17.0", {\ + "packageLocation": "./.yarn/cache/@typescript-eslint-scope-manager-npm-8.17.0-f0be17d23c-c5f628e5b4.zip/node_modules/@typescript-eslint/scope-manager/",\ + "packageDependencies": [\ + ["@typescript-eslint/scope-manager", "npm:8.17.0"],\ + ["@typescript-eslint/types", "npm:8.17.0"],\ + ["@typescript-eslint/visitor-keys", "npm:8.17.0"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@typescript-eslint/type-utils", [\ @@ -9145,6 +9154,13 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@typescript-eslint/types", "npm:7.5.0"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:8.17.0", {\ + "packageLocation": "./.yarn/cache/@typescript-eslint-types-npm-8.17.0-ad6f5ae49f-5f6933903c.zip/node_modules/@typescript-eslint/types/",\ + "packageDependencies": [\ + ["@typescript-eslint/types", "npm:8.17.0"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@typescript-eslint/typescript-estree", [\ @@ -9162,6 +9178,13 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ],\ "linkType": "SOFT"\ }],\ + ["npm:8.17.0", {\ + "packageLocation": "./.yarn/cache/@typescript-eslint-typescript-estree-npm-8.17.0-0110955b24-35d3dca3cd.zip/node_modules/@typescript-eslint/typescript-estree/",\ + "packageDependencies": [\ + ["@typescript-eslint/typescript-estree", "npm:8.17.0"]\ + ],\ + "linkType": "SOFT"\ + }],\ ["virtual:09b157fecc804d318ed6a4566b4fd8284d6c425c8f1d0e01ffa1f243f725634a1bd90dde6adac603624e360c4421ea2a697f3d3c81cceace25e2f7fdba859625#npm:5.33.1", {\ "packageLocation": "./.yarn/__virtual__/@typescript-eslint-typescript-estree-virtual-1492b0a79a/0/cache/@typescript-eslint-typescript-estree-npm-5.33.1-1b514c2400-1418e409b1.zip/node_modules/@typescript-eslint/typescript-estree/",\ "packageDependencies": [\ @@ -9203,6 +9226,27 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ],\ "linkType": "HARD"\ }],\ + ["virtual:30f2e23c7ffcf891f87a18cb58d472e2cdd77c8ba41282172fab4ab97aca549224dfc8214dd79bce8fef1f272ed1c733a2ee10d12249d23d48590573865fe339#npm:8.17.0", {\ + "packageLocation": "./.yarn/__virtual__/@typescript-eslint-typescript-estree-virtual-ff45382f28/0/cache/@typescript-eslint-typescript-estree-npm-8.17.0-0110955b24-35d3dca3cd.zip/node_modules/@typescript-eslint/typescript-estree/",\ + "packageDependencies": [\ + ["@typescript-eslint/typescript-estree", "virtual:30f2e23c7ffcf891f87a18cb58d472e2cdd77c8ba41282172fab4ab97aca549224dfc8214dd79bce8fef1f272ed1c733a2ee10d12249d23d48590573865fe339#npm:8.17.0"],\ + ["@types/typescript", null],\ + ["@typescript-eslint/types", "npm:8.17.0"],\ + ["@typescript-eslint/visitor-keys", "npm:8.17.0"],\ + ["debug", "virtual:4758feee42453c0e31b0d2032a7b1362d6b06281699830d2da9a056f2cca72bd2c5cfdb74005fdf03a64876be8eaca2dd7b0fc2dc59d14318badf19cb22ba18e#npm:4.3.4"],\ + ["fast-glob", "npm:3.3.2"],\ + ["is-glob", "npm:4.0.3"],\ + ["minimatch", "npm:9.0.5"],\ + ["semver", "npm:7.6.3"],\ + ["ts-api-utils", "virtual:ff45382f289877ead7011223e1a3e12ad5931bc5bb966ce16d645a7d92cd2edad32394d9fb08d21093dea26aa08aeb03e17de0977d68d796d54585998a88576c#npm:1.4.3"],\ + ["typescript", "patch:typescript@npm%3A5.6.3#~builtin::version=5.6.3&hash=8c6c40"]\ + ],\ + "packagePeers": [\ + "@types/typescript",\ + "typescript"\ + ],\ + "linkType": "HARD"\ + }],\ ["virtual:83b5808f266aeb1551a5f18e8473d1be0048c9b8fe4d71b11e46c49ef84098857bd6c7c43bb6925e75a393f7b88790afcce73d5fa58c2822236c7e167b9fc140#npm:7.5.0", {\ "packageLocation": "./.yarn/__virtual__/@typescript-eslint-typescript-estree-virtual-0f7794eca8/0/cache/@typescript-eslint-typescript-estree-npm-7.5.0-4235eaf12f-ebc6838af9.zip/node_modules/@typescript-eslint/typescript-estree/",\ "packageDependencies": [\ @@ -9298,6 +9342,15 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["eslint-visitor-keys", "npm:3.4.3"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:8.17.0", {\ + "packageLocation": "./.yarn/cache/@typescript-eslint-visitor-keys-npm-8.17.0-9c7a8b5908-f92f659ec8.zip/node_modules/@typescript-eslint/visitor-keys/",\ + "packageDependencies": [\ + ["@typescript-eslint/visitor-keys", "npm:8.17.0"],\ + ["@typescript-eslint/types", "npm:8.17.0"],\ + ["eslint-visitor-keys", "npm:4.2.0"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@ungap/structured-clone", [\ @@ -13954,7 +14007,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@types/eslint-import-resolver-typescript", null],\ ["@types/eslint-import-resolver-webpack", null],\ ["@types/typescript-eslint__parser", null],\ - ["@typescript-eslint/parser", "virtual:9909ff5388c6b6a3a46f12eb37c0afb449fcd1eedb9f02d871bde711a076c929583f48ecc4b85fa6d71478b076104a25f83dee45bc69687a22f551c576d7595d#npm:7.5.0"],\ + ["@typescript-eslint/parser", "virtual:9909ff5388c6b6a3a46f12eb37c0afb449fcd1eedb9f02d871bde711a076c929583f48ecc4b85fa6d71478b076104a25f83dee45bc69687a22f551c576d7595d#npm:8.17.0"],\ ["debug", "virtual:d9426786c635bc4b52511d6cc4b56156f50d780a698c0e20fc6caf10d3be51cbf176e79cff882f4d42a23ff4d0f89fe94222849578214e7fbae0f2754c82af02#npm:3.2.7"],\ ["eslint", "npm:8.57.0"],\ ["eslint-import-resolver-node", "npm:0.3.6"],\ @@ -13990,7 +14043,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["eslint-plugin-import", "virtual:9909ff5388c6b6a3a46f12eb37c0afb449fcd1eedb9f02d871bde711a076c929583f48ecc4b85fa6d71478b076104a25f83dee45bc69687a22f551c576d7595d#npm:2.26.0"],\ ["@types/eslint", null],\ ["@types/typescript-eslint__parser", null],\ - ["@typescript-eslint/parser", "virtual:9909ff5388c6b6a3a46f12eb37c0afb449fcd1eedb9f02d871bde711a076c929583f48ecc4b85fa6d71478b076104a25f83dee45bc69687a22f551c576d7595d#npm:7.5.0"],\ + ["@typescript-eslint/parser", "virtual:9909ff5388c6b6a3a46f12eb37c0afb449fcd1eedb9f02d871bde711a076c929583f48ecc4b85fa6d71478b076104a25f83dee45bc69687a22f551c576d7595d#npm:8.17.0"],\ ["array-includes", "npm:3.1.5"],\ ["array.prototype.flat", "npm:1.3.0"],\ ["debug", "virtual:4b6d71baf8d43e6e9ab2e034c76a127a59a4f52c68b4d690a67d2337edcbba20c586f42f868bf9e27d2a8c265a2f8ed46b0a406f3d925c97696dc47fd870e967#npm:2.6.9"],\ @@ -14212,6 +14265,13 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["eslint-visitor-keys", "npm:3.4.3"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:4.2.0", {\ + "packageLocation": "./.yarn/cache/eslint-visitor-keys-npm-4.2.0-a591434af3-779c604672.zip/node_modules/eslint-visitor-keys/",\ + "packageDependencies": [\ + ["eslint-visitor-keys", "npm:4.2.0"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["espree", [\ @@ -14625,6 +14685,18 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["micromatch", "npm:4.0.8"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:3.3.2", {\ + "packageLocation": "./.yarn/cache/fast-glob-npm-3.3.2-0a8cb4f2ca-900e4979f4.zip/node_modules/fast-glob/",\ + "packageDependencies": [\ + ["fast-glob", "npm:3.3.2"],\ + ["@nodelib/fs.stat", "npm:2.0.5"],\ + ["@nodelib/fs.walk", "npm:1.2.8"],\ + ["glob-parent", "npm:5.1.2"],\ + ["merge2", "npm:1.4.1"],\ + ["micromatch", "npm:4.0.8"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["fast-json-stable-stringify", [\ @@ -19236,6 +19308,14 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["brace-expansion", "npm:2.0.1"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:9.0.5", {\ + "packageLocation": "./.yarn/cache/minimatch-npm-9.0.5-9aa93d97fa-2c035575ed.zip/node_modules/minimatch/",\ + "packageDependencies": [\ + ["minimatch", "npm:9.0.5"],\ + ["brace-expansion", "npm:2.0.1"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["minimist", [\ @@ -19438,7 +19518,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@types/testing-library__jest-dom", "npm:5.14.5"],\ ["@types/uuid", "npm:9.0.1"],\ ["@typescript-eslint/eslint-plugin", "virtual:9909ff5388c6b6a3a46f12eb37c0afb449fcd1eedb9f02d871bde711a076c929583f48ecc4b85fa6d71478b076104a25f83dee45bc69687a22f551c576d7595d#npm:7.5.0"],\ - ["@typescript-eslint/parser", "virtual:9909ff5388c6b6a3a46f12eb37c0afb449fcd1eedb9f02d871bde711a076c929583f48ecc4b85fa6d71478b076104a25f83dee45bc69687a22f551c576d7595d#npm:7.5.0"],\ + ["@typescript-eslint/parser", "virtual:9909ff5388c6b6a3a46f12eb37c0afb449fcd1eedb9f02d871bde711a076c929583f48ecc4b85fa6d71478b076104a25f83dee45bc69687a22f551c576d7595d#npm:8.17.0"],\ ["apollo-datasource-rest", "virtual:9909ff5388c6b6a3a46f12eb37c0afb449fcd1eedb9f02d871bde711a076c929583f48ecc4b85fa6d71478b076104a25f83dee45bc69687a22f551c576d7595d#npm:3.7.0"],\ ["apollo-server-micro", "virtual:9909ff5388c6b6a3a46f12eb37c0afb449fcd1eedb9f02d871bde711a076c929583f48ecc4b85fa6d71478b076104a25f83dee45bc69687a22f551c576d7595d#npm:3.11.1"],\ ["apollo3-cache-persist", "virtual:9909ff5388c6b6a3a46f12eb37c0afb449fcd1eedb9f02d871bde711a076c929583f48ecc4b85fa6d71478b076104a25f83dee45bc69687a22f551c576d7595d#npm:0.14.1"],\ @@ -24534,6 +24614,13 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ],\ "linkType": "SOFT"\ }],\ + ["npm:1.4.3", {\ + "packageLocation": "./.yarn/cache/ts-api-utils-npm-1.4.3-ee6b12ae73-ea00dee382.zip/node_modules/ts-api-utils/",\ + "packageDependencies": [\ + ["ts-api-utils", "npm:1.4.3"]\ + ],\ + "linkType": "SOFT"\ + }],\ ["virtual:0f7794eca8c536afb0e41b1bb750c7fef0f63fab3c0489648e5b096fef723275cc5288e236412fb5bd39bfd38f71a926240ed28d6b1219fd63acd084fb6ab940#npm:1.3.0", {\ "packageLocation": "./.yarn/__virtual__/ts-api-utils-virtual-e5182242d0/0/cache/ts-api-utils-npm-1.3.0-33457908f8-c746ddabfd.zip/node_modules/ts-api-utils/",\ "packageDependencies": [\ @@ -24547,6 +24634,19 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ],\ "linkType": "HARD"\ }],\ + ["virtual:ff45382f289877ead7011223e1a3e12ad5931bc5bb966ce16d645a7d92cd2edad32394d9fb08d21093dea26aa08aeb03e17de0977d68d796d54585998a88576c#npm:1.4.3", {\ + "packageLocation": "./.yarn/__virtual__/ts-api-utils-virtual-371d481ae5/0/cache/ts-api-utils-npm-1.4.3-ee6b12ae73-ea00dee382.zip/node_modules/ts-api-utils/",\ + "packageDependencies": [\ + ["ts-api-utils", "virtual:ff45382f289877ead7011223e1a3e12ad5931bc5bb966ce16d645a7d92cd2edad32394d9fb08d21093dea26aa08aeb03e17de0977d68d796d54585998a88576c#npm:1.4.3"],\ + ["@types/typescript", null],\ + ["typescript", "patch:typescript@npm%3A5.6.3#~builtin::version=5.6.3&hash=8c6c40"]\ + ],\ + "packagePeers": [\ + "@types/typescript",\ + "typescript"\ + ],\ + "linkType": "HARD"\ + }],\ ["virtual:ffbd544ad0fe91b6a84d26da1b983efebd6dadd9a2ae0160d3effbd386edafd313452293d39a630ddc390a351a5cc7679a4b023d895be27d9a3a0972f47b5e95#npm:1.3.0", {\ "packageLocation": "./.yarn/__virtual__/ts-api-utils-virtual-b61b2d1b10/0/cache/ts-api-utils-npm-1.3.0-33457908f8-c746ddabfd.zip/node_modules/ts-api-utils/",\ "packageDependencies": [\ diff --git a/.yarn/cache/@typescript-eslint-parser-npm-7.5.0-950f9b5b79-c9f85ae638.zip b/.yarn/cache/@typescript-eslint-parser-npm-7.5.0-950f9b5b79-c9f85ae638.zip deleted file mode 100644 index 2f26f80da..000000000 Binary files a/.yarn/cache/@typescript-eslint-parser-npm-7.5.0-950f9b5b79-c9f85ae638.zip and /dev/null differ diff --git a/.yarn/cache/@typescript-eslint-parser-npm-8.17.0-f09f5fe974-3d330fc777.zip b/.yarn/cache/@typescript-eslint-parser-npm-8.17.0-f09f5fe974-3d330fc777.zip new file mode 100644 index 000000000..ba8a603c9 Binary files /dev/null and b/.yarn/cache/@typescript-eslint-parser-npm-8.17.0-f09f5fe974-3d330fc777.zip differ diff --git a/.yarn/cache/@typescript-eslint-scope-manager-npm-8.17.0-f0be17d23c-c5f628e5b4.zip b/.yarn/cache/@typescript-eslint-scope-manager-npm-8.17.0-f0be17d23c-c5f628e5b4.zip new file mode 100644 index 000000000..e23c40f32 Binary files /dev/null and b/.yarn/cache/@typescript-eslint-scope-manager-npm-8.17.0-f0be17d23c-c5f628e5b4.zip differ diff --git a/.yarn/cache/@typescript-eslint-types-npm-8.17.0-ad6f5ae49f-5f6933903c.zip b/.yarn/cache/@typescript-eslint-types-npm-8.17.0-ad6f5ae49f-5f6933903c.zip new file mode 100644 index 000000000..2b7272d7a Binary files /dev/null and b/.yarn/cache/@typescript-eslint-types-npm-8.17.0-ad6f5ae49f-5f6933903c.zip differ diff --git a/.yarn/cache/@typescript-eslint-typescript-estree-npm-8.17.0-0110955b24-35d3dca3cd.zip b/.yarn/cache/@typescript-eslint-typescript-estree-npm-8.17.0-0110955b24-35d3dca3cd.zip new file mode 100644 index 000000000..bbaea79f5 Binary files /dev/null and b/.yarn/cache/@typescript-eslint-typescript-estree-npm-8.17.0-0110955b24-35d3dca3cd.zip differ diff --git a/.yarn/cache/@typescript-eslint-visitor-keys-npm-8.17.0-9c7a8b5908-f92f659ec8.zip b/.yarn/cache/@typescript-eslint-visitor-keys-npm-8.17.0-9c7a8b5908-f92f659ec8.zip new file mode 100644 index 000000000..e51f25820 Binary files /dev/null and b/.yarn/cache/@typescript-eslint-visitor-keys-npm-8.17.0-9c7a8b5908-f92f659ec8.zip differ diff --git a/.yarn/cache/eslint-visitor-keys-npm-4.2.0-a591434af3-779c604672.zip b/.yarn/cache/eslint-visitor-keys-npm-4.2.0-a591434af3-779c604672.zip new file mode 100644 index 000000000..29abd6d3c Binary files /dev/null and b/.yarn/cache/eslint-visitor-keys-npm-4.2.0-a591434af3-779c604672.zip differ diff --git a/.yarn/cache/fast-glob-npm-3.3.2-0a8cb4f2ca-900e4979f4.zip b/.yarn/cache/fast-glob-npm-3.3.2-0a8cb4f2ca-900e4979f4.zip new file mode 100644 index 000000000..409893e13 Binary files /dev/null and b/.yarn/cache/fast-glob-npm-3.3.2-0a8cb4f2ca-900e4979f4.zip differ diff --git a/.yarn/cache/minimatch-npm-9.0.5-9aa93d97fa-2c035575ed.zip b/.yarn/cache/minimatch-npm-9.0.5-9aa93d97fa-2c035575ed.zip new file mode 100644 index 000000000..7418c75bb Binary files /dev/null and b/.yarn/cache/minimatch-npm-9.0.5-9aa93d97fa-2c035575ed.zip differ diff --git a/.yarn/cache/ts-api-utils-npm-1.4.3-ee6b12ae73-ea00dee382.zip b/.yarn/cache/ts-api-utils-npm-1.4.3-ee6b12ae73-ea00dee382.zip new file mode 100644 index 000000000..f81d40f8a Binary files /dev/null and b/.yarn/cache/ts-api-utils-npm-1.4.3-ee6b12ae73-ea00dee382.zip differ diff --git a/package.json b/package.json index bc88f4e53..49cf054b2 100644 --- a/package.json +++ b/package.json @@ -118,7 +118,7 @@ "@types/testing-library__jest-dom": "^5.14.5", "@types/uuid": "^9.0.1", "@typescript-eslint/eslint-plugin": "^7.5.0", - "@typescript-eslint/parser": "^7.5.0", + "@typescript-eslint/parser": "^8.17.0", "concurrently": "^8.2.2", "cross-env": "^7.0.3", "css-mediaquery": "^0.1.2", diff --git a/src/components/Contacts/ContactDetails/ContactDetailsHeader/ContactDetailsMoreActions/ContactDetailsMoreActions.tsx b/src/components/Contacts/ContactDetails/ContactDetailsHeader/ContactDetailsMoreActions/ContactDetailsMoreActions.tsx index 42926ed15..e2bb9ea30 100644 --- a/src/components/Contacts/ContactDetails/ContactDetailsHeader/ContactDetailsMoreActions/ContactDetailsMoreActions.tsx +++ b/src/components/Contacts/ContactDetails/ContactDetailsHeader/ContactDetailsMoreActions/ContactDetailsMoreActions.tsx @@ -296,6 +296,7 @@ export const ContactDetailsMoreAcitions: React.FC< setOpen={setDeleteModalOpen} deleting={deleting} deleteContact={handleDeleteContact} + contactId={contactId} /> )} {openHideModal && ( diff --git a/src/components/Contacts/ContactDetails/ContactDetailsHeader/DeleteContactModal/ContactSource.graphql b/src/components/Contacts/ContactDetails/ContactDetailsHeader/DeleteContactModal/ContactSource.graphql new file mode 100644 index 000000000..83dbaa392 --- /dev/null +++ b/src/components/Contacts/ContactDetails/ContactDetailsHeader/DeleteContactModal/ContactSource.graphql @@ -0,0 +1,29 @@ +query ContactSource($accountListId: ID!, $contactId: ID!) { + contact(accountListId: $accountListId, id: $contactId) { + id + source + addresses { + nodes { + id + source + } + } + people { + nodes { + id + emailAddresses { + nodes { + id + source + } + } + phoneNumbers { + nodes { + id + source + } + } + } + } + } +} diff --git a/src/components/Contacts/ContactDetails/ContactDetailsHeader/DeleteContactModal/DeleteContactModal.test.tsx b/src/components/Contacts/ContactDetails/ContactDetailsHeader/DeleteContactModal/DeleteContactModal.test.tsx new file mode 100644 index 000000000..4837e518d --- /dev/null +++ b/src/components/Contacts/ContactDetails/ContactDetailsHeader/DeleteContactModal/DeleteContactModal.test.tsx @@ -0,0 +1,219 @@ +import React from 'react'; +import { ThemeProvider } from '@mui/material/styles'; +import { LocalizationProvider } from '@mui/x-date-pickers'; +import { AdapterLuxon } from '@mui/x-date-pickers/AdapterLuxon'; +import { render, waitFor } from '@testing-library/react'; +import { SnackbarProvider } from 'notistack'; +import TestRouter from '__tests__/util/TestRouter'; +import { GqlMockedProvider } from '__tests__/util/graphqlMocking'; +import { ContactSourceEnum } from 'src/graphql/types.generated'; +import theme from 'src/theme'; +import { ContactSourceQuery } from './ContactSource.generated'; +import { DeleteContactModal } from './DeleteContactModal'; + +const contactId = 'contact-id'; +const mutationSpy = jest.fn(); +const setOpen = jest.fn(); +const deleteContact = jest.fn(); + +interface TestComponentProps { + open?: boolean; + deleting?: boolean; + contactSource?: ContactSourceEnum; + addressSources?: string[]; + emailSources?: string[]; + phoneSources?: string[]; +} + +const TestComponent: React.FC = ({ + open = true, + deleting = false, + contactSource = ContactSourceEnum.Mpdx, + addressSources = [], + emailSources = [], + phoneSources = [], +}) => ( + + + + + + mocks={{ + ContactSource: { + contact: { + id: contactId, + source: contactSource, + addresses: { + nodes: addressSources.map((source) => ({ source })), + }, + people: { + nodes: [ + { + emailAddresses: { + nodes: emailSources.map((source) => ({ source })), + }, + phoneNumbers: { + nodes: phoneSources.map((source) => ({ source })), + }, + }, + { + emailAddresses: { + nodes: emailSources.map((source) => ({ source })), + }, + phoneNumbers: { + nodes: phoneSources.map((source) => ({ source })), + }, + }, + ], + }, + }, + }, + }} + onCall={mutationSpy} + > + + + + + + +); + +describe('DeleteContactModal', () => { + it('should not show modal if not open', () => { + const { queryByText } = render(); + + expect( + queryByText(/Are you sure you want to permanently delete this contact?/), + ).not.toBeInTheDocument(); + }); + + it('should be able to delete contact', async () => { + const { getByText, getByRole } = render(); + + await waitFor(() => { + expect(mutationSpy).toHaveGraphqlOperation('ContactSource'); + }); + + expect( + getByText(/Are you sure you want to permanently delete this contact?/), + ).toBeInTheDocument(); + + expect(getByRole('button', { name: 'delete contact' })).toBeInTheDocument(); + }); + + it('should prevent user from deleting contact while currently deleting contact', async () => { + const { getByRole } = render(); + + await waitFor(() => { + expect(mutationSpy).toHaveGraphqlOperation('ContactSource'); + }); + + expect(getByRole('button', { name: 'delete contact' })).toBeDisabled(); + }); + + describe('Show third party message', () => { + interface TestProps { + testName: string; + props: TestComponentProps; + } + const tests: TestProps[] = [ + { + testName: 'disables deletion if contact created by third party', + props: { contactSource: ContactSourceEnum.GiveSite }, + }, + { + testName: + "disables deletion if a contact's address is sourced by a third party", + props: { + addressSources: ['Siebel', 'MPDX'], + }, + }, + { + testName: + "disables deletion if a contact's phone or email is sourced by a third party", + props: { + emailSources: ['Siebel', 'MPDX'], + phoneSources: ['Siebel', 'MPDX'], + }, + }, + { + testName: + "disables deletion if only one contact's phone number is sourced by a third party", + props: { + emailSources: ['MPDX', 'MPDX'], + phoneSources: ['MPDX', 'Siebel'], + }, + }, + ]; + + test.each(tests)('$testName', async ({ props }) => { + const { findByText, getByRole } = render(); + + expect( + await findByText( + /its data may sync with Donation Services or other third-party systems/, + ), + ).toBeInTheDocument(); + + expect( + getByRole('button', { name: 'delete contact' }), + ).toBeInTheDocument(); + }); + + it('should show third party source for contact', async () => { + const { findByText } = render( + , + ); + + expect(await findByText('Contact: GIVE_SITE')).toBeInTheDocument(); + expect( + await findByText('Address: US Donation Services'), + ).toBeInTheDocument(); + expect( + await findByText('Email: US Donation Services'), + ).toBeInTheDocument(); + expect( + await findByText('Phone: US Donation Services'), + ).toBeInTheDocument(); + }); + }); + + describe('Show normal delete message', () => { + it('should show modal and be able to delete user', async () => { + const { getByText, getByRole } = render( + , + ); + + await waitFor(() => { + expect(mutationSpy).toHaveGraphqlOperation('ContactSource'); + }); + + expect( + getByText(/Are you sure you want to permanently delete this contact?/), + ).toBeInTheDocument(); + + expect( + getByRole('button', { name: 'delete contact' }), + ).toBeInTheDocument(); + }); + }); +}); diff --git a/src/components/Contacts/ContactDetails/ContactDetailsHeader/DeleteContactModal/DeleteContactModal.tsx b/src/components/Contacts/ContactDetails/ContactDetailsHeader/DeleteContactModal/DeleteContactModal.tsx index 92a2aabac..d6c2bdba5 100644 --- a/src/components/Contacts/ContactDetails/ContactDetailsHeader/DeleteContactModal/DeleteContactModal.tsx +++ b/src/components/Contacts/ContactDetails/ContactDetailsHeader/DeleteContactModal/DeleteContactModal.tsx @@ -1,9 +1,14 @@ -import React from 'react'; +import React, { useMemo } from 'react'; +import { Email, Person, Phone, Place } from '@mui/icons-material'; import { CircularProgress, DialogActions, DialogContent, - DialogContentText, + List, + ListItem, + ListItemIcon, + ListItemText, + Typography, } from '@mui/material'; import { styled } from '@mui/material/styles'; import { useTranslation } from 'react-i18next'; @@ -12,16 +17,27 @@ import { DeleteButton, } from 'src/components/common/Modal/ActionButtons/ActionButtons'; import Modal from 'src/components/common/Modal/Modal'; +import { useAccountListId } from 'src/hooks/useAccountListId'; +import { isEditableSource, sourceToStr } from 'src/utils/sourceHelper'; +import { useContactSourceQuery } from './ContactSource.generated'; const LoadingIndicator = styled(CircularProgress)(({ theme }) => ({ margin: theme.spacing(0, 1, 0, 0), })); +interface DataInfo { + canDeleteWithoutIssues: boolean; + contactSource: string; + addressSources: string[]; + emailSources: string[]; + phoneSources: string[]; +} interface DeleteContactModalProps { open: boolean; setOpen: (open: boolean) => void; deleting: boolean; deleteContact: () => void; + contactId: string; } export const DeleteContactModal: React.FC = ({ @@ -29,8 +45,71 @@ export const DeleteContactModal: React.FC = ({ setOpen, deleting, deleteContact, + contactId, }) => { const { t } = useTranslation(); + const accountListId = useAccountListId() ?? ''; + + const { data } = useContactSourceQuery({ + variables: { accountListId, contactId }, + skip: !open && !contactId, + }); + const contactSources = data?.contact; + + const dataInfo: DataInfo = useMemo(() => { + if (!contactSources) { + return { + canDeleteWithoutIssues: true, + contactSource: sourceToStr(t, 'MPDX'), + addressSources: [], + emailSources: [], + phoneSources: [], + }; + } + + // We ensure the contact was created on MPDX and that all the data is editable. + // If any data is not editable, this means it was created by a third party. + // Which will only recreate the data after deleting it on MPDX. + // To prevent this confusion, we do not allow a contact to be deleted if it has non editable data. + + const addressSources = new Set(); + const emailSources = new Set(); + const phoneSources = new Set(); + + contactSources.addresses?.nodes.forEach((address) => { + if (!isEditableSource(address.source)) { + addressSources.add(address.source); + } + }); + + contactSources.people?.nodes.forEach((person) => { + person.emailAddresses.nodes.forEach((email) => { + if (!isEditableSource(email.source)) { + emailSources.add(email.source); + } + }); + person.phoneNumbers.nodes.forEach((phone) => { + if (!isEditableSource(phone.source)) { + phoneSources.add(phone.source); + } + }); + }); + + return { + canDeleteWithoutIssues: + isEditableSource(contactSources.source ?? undefined) && + !addressSources.size && + !emailSources.size && + !phoneSources.size, + contactSource: sourceToStr(t, contactSources.source), + addressSources: [...addressSources].map((source) => + sourceToStr(t, source), + ), + emailSources: [...emailSources].map((source) => sourceToStr(t, source)), + phoneSources: [...phoneSources].map((source) => sourceToStr(t, source)), + }; + }, [contactSources]); + return ( = ({ handleClose={() => setOpen(false)} > - - {t( - 'Are you sure you want to permanently delete this contact? Doing so will permanently delete this contacts information, as well as task history. This cannot be undone. If you wish to keep this information, you can try hiding this contact instead.', - )} - + {dataInfo.canDeleteWithoutIssues ? ( + + {t( + `Are you sure you want to permanently delete this contact? Doing so will permanently delete this contacts information, as well as task history. This cannot be undone. If you wish to keep this information, you can try hiding this contact instead.`, + )} + + ) : ( + <> + + {t( + `Be cautious when deleting this contact, as its data may sync with Donation Services or other third-party systems. Deleting the contact will not remove it from those systems; consider hiding the contact instead.`, + )} + + + {t( + `For contacts originating from Donation Services or DonorHub, email Donation Services to request deletion.`, + )} + +
+
+ {t('Data sources:')} + + {!!dataInfo.contactSource && ( + + + + + + + )} + + {!!dataInfo.addressSources.length && ( + + + + + + + )} + {!!dataInfo.emailSources.length && ( + + + + + + + )} + {!!dataInfo.phoneSources.length && ( + + + + + + + )} + + + )}
{ // A source is editable if it is undefined or if it is in the list of editable sources. diff --git a/yarn.lock b/yarn.lock index 00aabf2f2..8070d9b3d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6187,21 +6187,21 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/parser@npm:^7.5.0": - version: 7.5.0 - resolution: "@typescript-eslint/parser@npm:7.5.0" - dependencies: - "@typescript-eslint/scope-manager": 7.5.0 - "@typescript-eslint/types": 7.5.0 - "@typescript-eslint/typescript-estree": 7.5.0 - "@typescript-eslint/visitor-keys": 7.5.0 +"@typescript-eslint/parser@npm:^8.17.0": + version: 8.17.0 + resolution: "@typescript-eslint/parser@npm:8.17.0" + dependencies: + "@typescript-eslint/scope-manager": 8.17.0 + "@typescript-eslint/types": 8.17.0 + "@typescript-eslint/typescript-estree": 8.17.0 + "@typescript-eslint/visitor-keys": 8.17.0 debug: ^4.3.4 peerDependencies: - eslint: ^8.56.0 + eslint: ^8.57.0 || ^9.0.0 peerDependenciesMeta: typescript: optional: true - checksum: c9f85ae638e27fb249e565fc299cfee456b15f6a67156f373c10fa6e310a470b5298e174ca75309789c4cf1acd1a9fd3391d5fe128208b05bac0b701d5ddf512 + checksum: 3d330fc777cc34d8f21c7668a6ef48a1ce91905efde000f561cde76a630433c2a76d46857f7a62dc23c530e6441a5ea18b89c52e7fa5a099144c54bfe646dc35 languageName: node linkType: hard @@ -6225,6 +6225,16 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/scope-manager@npm:8.17.0": + version: 8.17.0 + resolution: "@typescript-eslint/scope-manager@npm:8.17.0" + dependencies: + "@typescript-eslint/types": 8.17.0 + "@typescript-eslint/visitor-keys": 8.17.0 + checksum: c5f628e5b4793181a219fc8be4dc2653b2a2a158c4add645b3ba063b9618f5892e5bbf6726c9e674731e698a3df4f2ddb671494482e0f59b6625c43810f78eeb + languageName: node + linkType: hard + "@typescript-eslint/type-utils@npm:7.5.0": version: 7.5.0 resolution: "@typescript-eslint/type-utils@npm:7.5.0" @@ -6256,6 +6266,13 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/types@npm:8.17.0": + version: 8.17.0 + resolution: "@typescript-eslint/types@npm:8.17.0" + checksum: 5f6933903ce4af536f180c9e326c18da715f6f400e6bc5b89828dcb5779ae5693bf95c59d253e105c9efe6ffd2046d0db868bcfb1c5288c5e194bae4ebaa9976 + languageName: node + linkType: hard + "@typescript-eslint/typescript-estree@npm:5.33.1": version: 5.33.1 resolution: "@typescript-eslint/typescript-estree@npm:5.33.1" @@ -6293,6 +6310,25 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/typescript-estree@npm:8.17.0": + version: 8.17.0 + resolution: "@typescript-eslint/typescript-estree@npm:8.17.0" + dependencies: + "@typescript-eslint/types": 8.17.0 + "@typescript-eslint/visitor-keys": 8.17.0 + debug: ^4.3.4 + fast-glob: ^3.3.2 + is-glob: ^4.0.3 + minimatch: ^9.0.4 + semver: ^7.6.0 + ts-api-utils: ^1.3.0 + peerDependenciesMeta: + typescript: + optional: true + checksum: 35d3dca3cde7a1f3a7a1e4e5a25a69b6151338cd329dceeb52880e6f05048d10c9ac472a07e558fdfb7acc10dd60cd106284e834cfe40ced3d2c4527e8727335 + languageName: node + linkType: hard + "@typescript-eslint/utils@npm:7.5.0": version: 7.5.0 resolution: "@typescript-eslint/utils@npm:7.5.0" @@ -6346,6 +6382,16 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/visitor-keys@npm:8.17.0": + version: 8.17.0 + resolution: "@typescript-eslint/visitor-keys@npm:8.17.0" + dependencies: + "@typescript-eslint/types": 8.17.0 + eslint-visitor-keys: ^4.2.0 + checksum: f92f659ec88a1ce34f5003722a133ced1ebf9b3dfc1c0ff18caa5362d4722307edb42fa606ebf80aada8525abe78b24143ef93864d38a1e359605096f1fe2f00 + languageName: node + linkType: hard + "@ungap/structured-clone@npm:^1.2.0": version: 1.2.0 resolution: "@ungap/structured-clone@npm:1.2.0" @@ -10402,6 +10448,13 @@ __metadata: languageName: node linkType: hard +"eslint-visitor-keys@npm:^4.2.0": + version: 4.2.0 + resolution: "eslint-visitor-keys@npm:4.2.0" + checksum: 779c604672b570bb4da84cef32f6abb085ac78379779c1122d7879eade8bb38ae715645324597cf23232d03cef06032c9844d25c73625bc282a5bfd30247e5b5 + languageName: node + linkType: hard + "eslint@npm:^8.57.0": version: 8.57.0 resolution: "eslint@npm:8.57.0" @@ -10832,6 +10885,19 @@ __metadata: languageName: node linkType: hard +"fast-glob@npm:^3.3.2": + version: 3.3.2 + resolution: "fast-glob@npm:3.3.2" + dependencies: + "@nodelib/fs.stat": ^2.0.2 + "@nodelib/fs.walk": ^1.2.3 + glob-parent: ^5.1.2 + merge2: ^1.3.0 + micromatch: ^4.0.4 + checksum: 900e4979f4dbc3313840078419245621259f349950411ca2fa445a2f9a1a6d98c3b5e7e0660c5ccd563aa61abe133a21765c6c0dec8e57da1ba71d8000b05ec1 + languageName: node + linkType: hard + "fast-json-stable-stringify@npm:^2.0.0, fast-json-stable-stringify@npm:^2.1.0": version: 2.1.0 resolution: "fast-json-stable-stringify@npm:2.1.0" @@ -14895,6 +14961,15 @@ __metadata: languageName: node linkType: hard +"minimatch@npm:^9.0.4": + version: 9.0.5 + resolution: "minimatch@npm:9.0.5" + dependencies: + brace-expansion: ^2.0.1 + checksum: 2c035575eda1e50623c731ec6c14f65a85296268f749b9337005210bb2b34e2705f8ef1a358b188f69892286ab99dc42c8fb98a57bde55c8d81b3023c19cea28 + languageName: node + linkType: hard + "minimist@npm:^1.2.0, minimist@npm:^1.2.6": version: 1.2.6 resolution: "minimist@npm:1.2.6" @@ -15084,7 +15159,7 @@ __metadata: "@types/testing-library__jest-dom": ^5.14.5 "@types/uuid": ^9.0.1 "@typescript-eslint/eslint-plugin": ^7.5.0 - "@typescript-eslint/parser": ^7.5.0 + "@typescript-eslint/parser": ^8.17.0 apollo-datasource-rest: ^3.7.0 apollo-server-micro: ^3.11.0 apollo3-cache-persist: ^0.14.1 @@ -17990,7 +18065,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:^7.6.3": +"semver@npm:^7.6.0, semver@npm:^7.6.3": version: 7.6.3 resolution: "semver@npm:7.6.3" bin: @@ -19503,6 +19578,15 @@ __metadata: languageName: node linkType: hard +"ts-api-utils@npm:^1.3.0": + version: 1.4.3 + resolution: "ts-api-utils@npm:1.4.3" + peerDependencies: + typescript: ">=4.2.0" + checksum: ea00dee382d19066b2a3d8929f1089888b05fec797e32e7a7004938eda1dccf2e77274ee2afcd4166f53fab9b8d7ee90ebb225a3183f9ba8817d636f688a148d + languageName: node + linkType: hard + "ts-essentials@npm:^9.3.0": version: 9.3.0 resolution: "ts-essentials@npm:9.3.0"