diff --git a/.changeset/shaggy-turkeys-play.md b/.changeset/shaggy-turkeys-play.md new file mode 100644 index 0000000..871aed3 --- /dev/null +++ b/.changeset/shaggy-turkeys-play.md @@ -0,0 +1,5 @@ +--- +'@team-plain/typescript-sdk': patch +--- + +Include SDK version as header in all requests to our API so we can better debug failures and issues. diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 6782962..0000000 --- a/.eslintignore +++ /dev/null @@ -1,4 +0,0 @@ -# Generated: -src/graphql/types.ts -dist -docs \ No newline at end of file diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index f09b34d..0000000 --- a/.eslintrc +++ /dev/null @@ -1,32 +0,0 @@ -{ - "root": true, - "parser": "@typescript-eslint/parser", - "parserOptions": { - "project": "./tsconfig.json" - }, - "plugins": ["@typescript-eslint", "unused-imports", "simple-import-sort", "import"], - "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/recommended", - "plugin:@typescript-eslint/recommended-requiring-type-checking" - ], - "rules": { - "@typescript-eslint/no-unused-vars": "error", - "import/first": "error", - "import/newline-after-import": "error", - "import/no-duplicates": "error", - "simple-import-sort/imports": "error", - "simple-import-sort/exports": "error", - "unused-imports/no-unused-imports": "error" - }, - "overrides": [ - { - "files": ["*.test.ts"], - "rules": { - "@typescript-eslint/no-unsafe-assignment": "off", - "@typescript-eslint/no-unsafe-member-access": "off", - "@typescript-eslint/no-unsafe-call": "off" - } - } - ] -} diff --git a/biome.json b/biome.json new file mode 100644 index 0000000..56c646d --- /dev/null +++ b/biome.json @@ -0,0 +1,62 @@ +{ + "$schema": "./node_modules/@biomejs/biome/configuration_schema.json", + "formatter": { + "enabled": true, + "formatWithErrors": false, + "indentStyle": "space", + "indentWidth": 2, + "lineEnding": "lf", + "lineWidth": 100, + "attributePosition": "auto" + }, + "javascript": { + "formatter": { + "jsxQuoteStyle": "double", + "quoteProperties": "asNeeded", + "trailingCommas": "es5", + "semicolons": "always", + "arrowParentheses": "always", + "bracketSpacing": true, + "bracketSameLine": false, + "quoteStyle": "single", + "attributePosition": "auto" + } + }, + "files": { + "include": ["biome.json", "vitest.*.js", "src/**/*.ts", "src/**/*.gql"], + "ignore": [ + "dist/**", + "node_modules/**", + "src/graphql/types.ts", + "src/webhooks/webhook-schema.ts" + ] + }, + "linter": { + "rules": { + "complexity": { + "noBannedTypes": "off", + "noForEach": "off" + }, + "suspicious": { + "noAssignInExpressions": "off", + "noConfusingVoidType": "off", + "noExplicitAny": "off", + "noShadowRestrictedNames": "off" + }, + "style": { + "noNonNullAssertion": "off", + "noParameterAssign": "off", + "useTemplate": "off" + }, + "correctness": { + "noUnusedImports": "error" + }, + "performance": { + "noAccumulatingSpread": "off" + } + } + }, + "organizeImports": { + "enabled": true + } +} diff --git a/package.json b/package.json index edb2c49..313d12d 100644 --- a/package.json +++ b/package.json @@ -12,15 +12,17 @@ "codegen:graphql": "graphql-codegen", "codegen:webhooks": "sh ./scripts/codegen-webhooks.sh", "typecheck": "tsc --noEmit", - "lint": "pnpm run lint:eslint && pnpm run lint:prettier", - "lint:eslint": "eslint 'src/**/*.ts'", - "lint:prettier": "prettier --config=.prettierrc --ignore-path=.prettierignore --check '**/*.{ts,tsx,gql,js}'", + "lint": "biome lint .", + "lint:fix": "biome lint . --fix", + "format": "biome format .", + "format:fix": "biome format --write .", "test": "vitest", "changeset": "changeset", "release": "npm run build && changeset publish" }, "license": "MIT", "devDependencies": { + "@biomejs/biome": "1.9.2", "@changesets/cli": "^2.26.1", "@graphql-codegen/add": "^4.0.1", "@graphql-codegen/cli": "^3.3.1", @@ -29,13 +31,7 @@ "@graphql-codegen/typescript-document-nodes": "^3.0.4", "@graphql-codegen/typescript-operations": "^3.0.4", "@rollup/plugin-json": "^6.1.0", - "@typescript-eslint/eslint-plugin": "^5.59.2", - "@typescript-eslint/parser": "^5.59.2", "esbuild": "^0.17.18", - "eslint": "^8.40.0", - "eslint-plugin-import": "^2.27.5", - "eslint-plugin-simple-import-sort": "^10.0.0", - "eslint-plugin-unused-imports": "^2.0.0", "json-schema-to-typescript": "^13.1.2", "rollup": "^3.21.5", "rollup-plugin-dts": "^5.3.0", @@ -52,4 +48,4 @@ "graphql": "^16.6.0", "zod": "3.22.4" } -} +} \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ff9fd83..96ef898 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -22,6 +22,9 @@ dependencies: version: 3.22.4 devDependencies: + '@biomejs/biome': + specifier: 1.9.2 + version: 1.9.2 '@changesets/cli': specifier: ^2.26.1 version: 2.26.1 @@ -46,27 +49,9 @@ devDependencies: '@rollup/plugin-json': specifier: ^6.1.0 version: 6.1.0(rollup@3.21.5) - '@typescript-eslint/eslint-plugin': - specifier: ^5.59.2 - version: 5.59.2(@typescript-eslint/parser@5.59.2)(eslint@8.40.0)(typescript@5.4.2) - '@typescript-eslint/parser': - specifier: ^5.59.2 - version: 5.59.2(eslint@8.40.0)(typescript@5.4.2) esbuild: specifier: ^0.17.18 version: 0.17.18 - eslint: - specifier: ^8.40.0 - version: 8.40.0 - eslint-plugin-import: - specifier: ^2.27.5 - version: 2.27.5(@typescript-eslint/parser@5.59.2)(eslint@8.40.0) - eslint-plugin-simple-import-sort: - specifier: ^10.0.0 - version: 10.0.0(eslint@8.40.0) - eslint-plugin-unused-imports: - specifier: ^2.0.0 - version: 2.0.0(@typescript-eslint/eslint-plugin@5.59.2)(eslint@8.40.0) json-schema-to-typescript: specifier: ^13.1.2 version: 13.1.2 @@ -94,11 +79,6 @@ devDependencies: packages: - /@aashutoshrathi/word-wrap@1.2.6: - resolution: {integrity: sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==} - engines: {node: '>=0.10.0'} - dev: true - /@ampproject/remapping@2.2.1: resolution: {integrity: sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==} engines: {node: '>=6.0.0'} @@ -726,6 +706,94 @@ packages: js-yaml: 4.1.0 dev: true + /@biomejs/biome@1.9.2: + resolution: {integrity: sha512-4j2Gfwft8Jqp1X0qLYvK4TEy4xhTo4o6rlvJPsjPeEame8gsmbGQfOPBkw7ur+7/Z/f0HZmCZKqbMvR7vTXQYQ==} + engines: {node: '>=14.21.3'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@biomejs/cli-darwin-arm64': 1.9.2 + '@biomejs/cli-darwin-x64': 1.9.2 + '@biomejs/cli-linux-arm64': 1.9.2 + '@biomejs/cli-linux-arm64-musl': 1.9.2 + '@biomejs/cli-linux-x64': 1.9.2 + '@biomejs/cli-linux-x64-musl': 1.9.2 + '@biomejs/cli-win32-arm64': 1.9.2 + '@biomejs/cli-win32-x64': 1.9.2 + dev: true + + /@biomejs/cli-darwin-arm64@1.9.2: + resolution: {integrity: sha512-rbs9uJHFmhqB3Td0Ro+1wmeZOHhAPTL3WHr8NtaVczUmDhXkRDWScaxicG9+vhSLj1iLrW47itiK6xiIJy6vaA==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@biomejs/cli-darwin-x64@1.9.2: + resolution: {integrity: sha512-BlfULKijNaMigQ9GH9fqJVt+3JTDOSiZeWOQtG/1S1sa8Lp046JHG3wRJVOvekTPL9q/CNFW1NVG8J0JN+L1OA==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@biomejs/cli-linux-arm64-musl@1.9.2: + resolution: {integrity: sha512-ZATvbUWhNxegSALUnCKWqetTZqrK72r2RsFD19OK5jXDj/7o1hzI1KzDNG78LloZxftrwr3uI9SqCLh06shSZw==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@biomejs/cli-linux-arm64@1.9.2: + resolution: {integrity: sha512-T8TJuSxuBDeQCQzxZu2o3OU4eyLumTofhCxxFd3+aH2AEWVMnH7Z/c3QP1lHI5RRMBP9xIJeMORqDQ5j+gVZzw==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@biomejs/cli-linux-x64-musl@1.9.2: + resolution: {integrity: sha512-CjPM6jT1miV5pry9C7qv8YJk0FIZvZd86QRD3atvDgfgeh9WQU0k2Aoo0xUcPdTnoz0WNwRtDicHxwik63MmSg==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@biomejs/cli-linux-x64@1.9.2: + resolution: {integrity: sha512-T0cPk3C3Jr2pVlsuQVTBqk2qPjTm8cYcTD9p/wmR9MeVqui1C/xTVfOIwd3miRODFMrJaVQ8MYSXnVIhV9jTjg==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@biomejs/cli-win32-arm64@1.9.2: + resolution: {integrity: sha512-2x7gSty75bNIeD23ZRPXyox6Z/V0M71ObeJtvQBhi1fgrvPdtkEuw7/0wEHg6buNCubzOFuN9WYJm6FKoUHfhg==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@biomejs/cli-win32-x64@1.9.2: + resolution: {integrity: sha512-JC3XvdYcjmu1FmAehVwVV0SebLpeNTnO2ZaMdGCSOdS7f8O9Fq14T2P1gTG1Q29Q8Dt1S03hh0IdVpIZykOL8g==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@changesets/apply-release-plan@6.1.4: resolution: {integrity: sha512-FMpKF1fRlJyCZVYHr3CbinpZZ+6MwvOtWUuO8uo+svcATEoc1zRDcj23pAurJ2TZ/uVz1wFHH6K3NlACy0PLew==} dependencies: @@ -1306,43 +1374,6 @@ packages: dev: true optional: true - /@eslint-community/eslint-utils@4.4.0(eslint@8.40.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.40.0 - eslint-visitor-keys: 3.4.1 - dev: true - - /@eslint-community/regexpp@4.5.1: - resolution: {integrity: sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==} - engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - dev: true - - /@eslint/eslintrc@2.1.0: - resolution: {integrity: sha512-Lj7DECXqIVCqnqjjHMPna4vn6GJcMgul/wuS0je9OZ9gsL0zzDpKPVtcG1HaDVc+9y+qgXneTeUMbCqXJNpH1A==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - ajv: 6.12.6 - debug: 4.3.4 - espree: 9.6.0 - globals: 13.20.0 - ignore: 5.2.4 - 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.40.0: - resolution: {integrity: sha512-ElyB54bJIhXQYVKjDSvCkPO1iU1tSAeVQJbllWJq1XQSmmA4dgFk8CbiBGpiOPxleE48vDogxCtmMYku4HSVLA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dev: true - /@graphql-codegen/add@4.0.1(graphql@16.6.0): resolution: {integrity: sha512-A7k+9eRfrKyyNfhWEN/0eKz09R5cp4XXxUuNLQAVm/aohmVI2xdMV4lM02rTlM6Pyou3cU/v0iZnhgo6IRpqeg==} peerDependencies: @@ -1884,26 +1915,6 @@ packages: dependencies: graphql: 16.6.0 - /@humanwhocodes/config-array@0.11.10: - resolution: {integrity: sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==} - engines: {node: '>=10.10.0'} - dependencies: - '@humanwhocodes/object-schema': 1.2.1 - debug: 4.3.4 - 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@1.2.1: - resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==} - dev: true - /@jridgewell/gen-mapping@0.3.3: resolution: {integrity: sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==} engines: {node: '>=6.0.0'} @@ -2211,10 +2222,6 @@ packages: resolution: {integrity: sha512-s2cfwagOQAS8o06TcwKfr9Wx11dNGbH2E9vJz1cqV+a/LOyhWNLUNd6JSRYNzvB4d29UuJX2M0Dj9vE1T8fRXw==} dev: true - /@types/json5@0.0.29: - resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} - dev: true - /@types/lodash@4.14.202: resolution: {integrity: sha512-OvlIYQK9tNneDlS0VN54LLd5uiPCBOp7gS5Z0f1mjoJYBrtStzgmJBxONW3U6OZqdtNzZPmn9BS/7WI7BFFcFQ==} dev: true @@ -2251,146 +2258,12 @@ packages: resolution: {integrity: sha512-KQf+QAMWKMrtBMsB8/24w53tEsxllMj6TuA80TT/5igJalLI/zm0L3oXRbIAl4Ohfc85gyHX/jhMwsVkmhLU4A==} dev: true - /@types/semver@7.5.0: - resolution: {integrity: sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==} - dev: true - /@types/ws@8.5.5: resolution: {integrity: sha512-lwhs8hktwxSjf9UaZ9tG5M03PGogvFaH8gUgLNbN9HKIg0dvv6q+gkSuJ8HN4/VbyxkuLzCjlN7GquQ0gUJfIg==} dependencies: '@types/node': 20.4.1 dev: true - /@typescript-eslint/eslint-plugin@5.59.2(@typescript-eslint/parser@5.59.2)(eslint@8.40.0)(typescript@5.4.2): - resolution: {integrity: sha512-yVrXupeHjRxLDcPKL10sGQ/QlVrA8J5IYOEWVqk0lJaSZP7X5DfnP7Ns3cc74/blmbipQ1htFNVGsHX6wsYm0A==} - 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.5.1 - '@typescript-eslint/parser': 5.59.2(eslint@8.40.0)(typescript@5.4.2) - '@typescript-eslint/scope-manager': 5.59.2 - '@typescript-eslint/type-utils': 5.59.2(eslint@8.40.0)(typescript@5.4.2) - '@typescript-eslint/utils': 5.59.2(eslint@8.40.0)(typescript@5.4.2) - debug: 4.3.4 - eslint: 8.40.0 - grapheme-splitter: 1.0.4 - ignore: 5.2.4 - natural-compare-lite: 1.4.0 - semver: 7.5.4 - tsutils: 3.21.0(typescript@5.4.2) - typescript: 5.4.2 - transitivePeerDependencies: - - supports-color - dev: true - - /@typescript-eslint/parser@5.59.2(eslint@8.40.0)(typescript@5.4.2): - resolution: {integrity: sha512-uq0sKyw6ao1iFOZZGk9F8Nro/8+gfB5ezl1cA06SrqbgJAt0SRoFhb9pXaHvkrxUpZaoLxt8KlovHNk8Gp6/HQ==} - 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.59.2 - '@typescript-eslint/types': 5.59.2 - '@typescript-eslint/typescript-estree': 5.59.2(typescript@5.4.2) - debug: 4.3.4 - eslint: 8.40.0 - typescript: 5.4.2 - transitivePeerDependencies: - - supports-color - dev: true - - /@typescript-eslint/scope-manager@5.59.2: - resolution: {integrity: sha512-dB1v7ROySwQWKqQ8rEWcdbTsFjh2G0vn8KUyvTXdPoyzSL6lLGkiXEV5CvpJsEe9xIdKV+8Zqb7wif2issoOFA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - '@typescript-eslint/types': 5.59.2 - '@typescript-eslint/visitor-keys': 5.59.2 - dev: true - - /@typescript-eslint/type-utils@5.59.2(eslint@8.40.0)(typescript@5.4.2): - resolution: {integrity: sha512-b1LS2phBOsEy/T381bxkkywfQXkV1dWda/z0PhnIy3bC5+rQWQDS7fk9CSpcXBccPY27Z6vBEuaPBCKCgYezyQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: '*' - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/typescript-estree': 5.59.2(typescript@5.4.2) - '@typescript-eslint/utils': 5.59.2(eslint@8.40.0)(typescript@5.4.2) - debug: 4.3.4 - eslint: 8.40.0 - tsutils: 3.21.0(typescript@5.4.2) - typescript: 5.4.2 - transitivePeerDependencies: - - supports-color - dev: true - - /@typescript-eslint/types@5.59.2: - resolution: {integrity: sha512-LbJ/HqoVs2XTGq5shkiKaNTuVv5tTejdHgfdjqRUGdYhjW1crm/M7og2jhVskMt8/4wS3T1+PfFvL1K3wqYj4w==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dev: true - - /@typescript-eslint/typescript-estree@5.59.2(typescript@5.4.2): - resolution: {integrity: sha512-+j4SmbwVmZsQ9jEyBMgpuBD0rKwi9RxRpjX71Brr73RsYnEr3Lt5QZ624Bxphp8HUkSKfqGnPJp1kA5nl0Sh7Q==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/types': 5.59.2 - '@typescript-eslint/visitor-keys': 5.59.2 - debug: 4.3.4 - globby: 11.1.0 - is-glob: 4.0.3 - semver: 7.5.4 - tsutils: 3.21.0(typescript@5.4.2) - typescript: 5.4.2 - transitivePeerDependencies: - - supports-color - dev: true - - /@typescript-eslint/utils@5.59.2(eslint@8.40.0)(typescript@5.4.2): - resolution: {integrity: sha512-kSuF6/77TZzyGPhGO4uVp+f0SBoYxCDf+lW3GKhtKru/L8k/Hd7NFQxyWUeY7Z/KGB2C6Fe3yf2vVi4V9TsCSQ==} - 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.40.0) - '@types/json-schema': 7.0.12 - '@types/semver': 7.5.0 - '@typescript-eslint/scope-manager': 5.59.2 - '@typescript-eslint/types': 5.59.2 - '@typescript-eslint/typescript-estree': 5.59.2(typescript@5.4.2) - eslint: 8.40.0 - eslint-scope: 5.1.1 - semver: 7.5.4 - transitivePeerDependencies: - - supports-color - - typescript - dev: true - - /@typescript-eslint/visitor-keys@5.59.2: - resolution: {integrity: sha512-EEpsO8m3RASrKAHI9jpavNv9NlEUebV4qmF1OWxSTtKSFBpC1NCmWazDQHFivRf0O1DV11BA645yrLEVQ0/Lig==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - '@typescript-eslint/types': 5.59.2 - eslint-visitor-keys: 3.4.1 - dev: true - /@vitest/expect@0.31.0: resolution: {integrity: sha512-Jlm8ZTyp6vMY9iz9Ny9a0BHnCG4fqBa8neCF6Pk/c/6vkUk49Ls6UBlgGAU82QnzzoaUs9E/mUhq/eq9uMOv/g==} dependencies: @@ -2454,14 +2327,6 @@ packages: tslib: 2.6.0 dev: true - /acorn-jsx@5.3.2(acorn@8.10.0): - resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} - peerDependencies: - acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - dependencies: - acorn: 8.10.0 - dev: true - /acorn-walk@8.2.0: resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} engines: {node: '>=0.4.0'} @@ -2501,15 +2366,6 @@ packages: ajv: 8.12.0 dev: false - /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 - /ajv@8.12.0: resolution: {integrity: sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==} dependencies: @@ -2580,17 +2436,6 @@ packages: is-array-buffer: 3.0.2 dev: true - /array-includes@3.1.6: - resolution: {integrity: sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.2 - get-intrinsic: 1.2.1 - is-string: 1.0.7 - dev: true - /array-union@2.1.0: resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} engines: {node: '>=8'} @@ -2606,16 +2451,6 @@ packages: es-shim-unscopables: 1.0.0 dev: true - /array.prototype.flatmap@1.3.1: - resolution: {integrity: sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.2 - es-shim-unscopables: 1.0.0 - dev: true - /arrify@1.0.1: resolution: {integrity: sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==} engines: {node: '>=0.10.0'} @@ -3067,15 +2902,6 @@ packages: which: 1.3.1 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 - /csv-generate@3.4.3: resolution: {integrity: sha512-w/T+rqR0vwvHqWs/1ZyMDWtHHSJaN06klRqJXBEpDJaM/+dZkso0OKh1VcuuYvK3XM53KysVNq8Ko/epCK8wOw==} dev: true @@ -3121,17 +2947,6 @@ packages: resolution: {integrity: sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==} dev: true - /debug@3.2.7: - resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - dependencies: - ms: 2.1.3 - dev: true - /debug@4.3.4: resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} @@ -3164,10 +2979,6 @@ packages: type-detect: 4.0.8 dev: true - /deep-is@0.1.4: - resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} - dev: true - /defaults@1.0.4: resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} dependencies: @@ -3205,20 +3016,6 @@ packages: 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 - /dot-case@3.0.4: resolution: {integrity: sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==} dependencies: @@ -3431,181 +3228,6 @@ packages: engines: {node: '>=0.8.0'} dev: true - /escape-string-regexp@4.0.0: - resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} - engines: {node: '>=10'} - dev: true - - /eslint-import-resolver-node@0.3.7: - resolution: {integrity: sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==} - dependencies: - debug: 3.2.7 - is-core-module: 2.12.1 - resolve: 1.22.2 - transitivePeerDependencies: - - supports-color - dev: true - - /eslint-module-utils@2.8.0(@typescript-eslint/parser@5.59.2)(eslint-import-resolver-node@0.3.7)(eslint@8.40.0): - resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} - 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.59.2(eslint@8.40.0)(typescript@5.4.2) - debug: 3.2.7 - eslint: 8.40.0 - eslint-import-resolver-node: 0.3.7 - transitivePeerDependencies: - - supports-color - dev: true - - /eslint-plugin-import@2.27.5(@typescript-eslint/parser@5.59.2)(eslint@8.40.0): - resolution: {integrity: sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==} - 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.59.2(eslint@8.40.0)(typescript@5.4.2) - array-includes: 3.1.6 - array.prototype.flat: 1.3.1 - array.prototype.flatmap: 1.3.1 - debug: 3.2.7 - doctrine: 2.1.0 - eslint: 8.40.0 - eslint-import-resolver-node: 0.3.7 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.59.2)(eslint-import-resolver-node@0.3.7)(eslint@8.40.0) - has: 1.0.3 - is-core-module: 2.12.1 - is-glob: 4.0.3 - minimatch: 3.1.2 - object.values: 1.1.6 - resolve: 1.22.2 - semver: 6.3.0 - tsconfig-paths: 3.14.2 - transitivePeerDependencies: - - eslint-import-resolver-typescript - - eslint-import-resolver-webpack - - supports-color - dev: true - - /eslint-plugin-simple-import-sort@10.0.0(eslint@8.40.0): - resolution: {integrity: sha512-AeTvO9UCMSNzIHRkg8S6c3RPy5YEwKWSQPx3DYghLedo2ZQxowPFLGDN1AZ2evfg6r6mjBSZSLxLFsWSu3acsw==} - peerDependencies: - eslint: '>=5.0.0' - dependencies: - eslint: 8.40.0 - dev: true - - /eslint-plugin-unused-imports@2.0.0(@typescript-eslint/eslint-plugin@5.59.2)(eslint@8.40.0): - resolution: {integrity: sha512-3APeS/tQlTrFa167ThtP0Zm0vctjr4M44HMpeg1P4bK6wItarumq0Ma82xorMKdFsWpphQBlRPzw/pxiVELX1A==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - '@typescript-eslint/eslint-plugin': ^5.0.0 - eslint: ^8.0.0 - peerDependenciesMeta: - '@typescript-eslint/eslint-plugin': - optional: true - dependencies: - '@typescript-eslint/eslint-plugin': 5.59.2(@typescript-eslint/parser@5.59.2)(eslint@8.40.0)(typescript@5.4.2) - eslint: 8.40.0 - eslint-rule-composer: 0.3.0 - dev: true - - /eslint-rule-composer@0.3.0: - resolution: {integrity: sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg==} - engines: {node: '>=4.0.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.0: - resolution: {integrity: sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==} - 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.1: - resolution: {integrity: sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dev: true - - /eslint@8.40.0: - resolution: {integrity: sha512-bvR+TsP9EHL3TqNtj9sCNJVAFK3fBN8Q7g5waghxyRsPLIMwL73XSKnZFK0hk/O2ANC+iAoq6PWMQ+IfBAJIiQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - hasBin: true - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.40.0) - '@eslint-community/regexpp': 4.5.1 - '@eslint/eslintrc': 2.1.0 - '@eslint/js': 8.40.0 - '@humanwhocodes/config-array': 0.11.10 - '@humanwhocodes/module-importer': 1.0.1 - '@nodelib/fs.walk': 1.2.8 - ajv: 6.12.6 - chalk: 4.1.2 - cross-spawn: 7.0.3 - debug: 4.3.4 - doctrine: 3.0.0 - escape-string-regexp: 4.0.0 - eslint-scope: 7.2.0 - eslint-visitor-keys: 3.4.1 - espree: 9.6.0 - esquery: 1.5.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.20.0 - grapheme-splitter: 1.0.4 - ignore: 5.2.4 - import-fresh: 3.3.0 - imurmurhash: 0.1.4 - is-glob: 4.0.3 - is-path-inside: 3.0.3 - js-sdsl: 4.4.1 - js-yaml: 4.1.0 - json-stable-stringify-without-jsonify: 1.0.1 - levn: 0.4.1 - lodash.merge: 4.6.2 - minimatch: 3.1.2 - natural-compare: 1.4.0 - optionator: 0.9.3 - strip-ansi: 6.0.1 - strip-json-comments: 3.1.1 - text-table: 0.2.0 - transitivePeerDependencies: - - supports-color - dev: true - /esniff@2.0.1: resolution: {integrity: sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==} engines: {node: '>=0.10'} @@ -3616,45 +3238,12 @@ packages: type: 2.7.2 dev: true - /espree@9.6.0: - resolution: {integrity: sha512-1FH/IiruXZ84tpUlm0aCUEwMl2Ho5ilqVh0VvQXw+byAz/4SAciyHLlfmL5WYqsvD38oymdUwBss0LtK8m4s/A==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - acorn: 8.10.0 - acorn-jsx: 5.3.2(acorn@8.10.0) - eslint-visitor-keys: 3.4.1 - dev: true - /esprima@4.0.1: resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} engines: {node: '>=4'} hasBin: true dev: true - /esquery@1.5.0: - resolution: {integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==} - 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 - /estree-walker@2.0.2: resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} dev: true @@ -3701,6 +3290,7 @@ packages: /fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + dev: false /fast-diff@1.3.0: resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==} @@ -3717,14 +3307,6 @@ packages: micromatch: 4.0.5 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 - /fast-querystring@1.1.2: resolution: {integrity: sha512-g6KuKWmFXc0fID8WWH0jit4g0AGBoJhCkJMb1RmbsSEUNvQ+ZC8D6CUZ+GtF8nMzSPXnhiePyyqqipzNNEnHjg==} dependencies: @@ -3774,13 +3356,6 @@ packages: escape-string-regexp: 1.0.5 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.0.4 - dev: true - /fill-range@7.0.1: resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} engines: {node: '>=8'} @@ -3811,18 +3386,6 @@ packages: pkg-dir: 4.2.0 dev: true - /flat-cache@3.0.4: - resolution: {integrity: sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==} - engines: {node: ^10.12.0 || >=12.0.0} - dependencies: - flatted: 3.2.7 - rimraf: 3.0.2 - dev: true - - /flatted@3.2.7: - resolution: {integrity: sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==} - dev: true - /for-each@0.3.3: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} dependencies: @@ -3920,13 +3483,6 @@ packages: 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-promise@4.2.2(glob@7.2.3): resolution: {integrity: sha512-xcUzJ8NWN5bktoTIX7eOclO1Npxd/dyVqUJxlLIDasT4C7KZyqlPIwkdJ0Ypiy3p2ZKahTjK4M9uC3sNSfNMzw==} engines: {node: '>=12'} @@ -3953,13 +3509,6 @@ packages: engines: {node: '>=4'} dev: true - /globals@13.20.0: - resolution: {integrity: sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==} - engines: {node: '>=8'} - dependencies: - type-fest: 0.20.2 - dev: true - /globalthis@1.0.3: resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==} engines: {node: '>= 0.4'} @@ -4175,11 +3724,6 @@ packages: engines: {node: '>=12.2'} dev: true - /imurmurhash@0.1.4: - resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} - engines: {node: '>=0.8.19'} - dev: true - /indent-string@4.0.0: resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} engines: {node: '>=8'} @@ -4336,11 +3880,6 @@ packages: 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-plain-obj@1.1.0: resolution: {integrity: sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==} engines: {node: '>=0.10.0'} @@ -4463,10 +4002,6 @@ packages: engines: {node: '>=10'} dev: true - /js-sdsl@4.4.1: - resolution: {integrity: sha512-6Gsx8R0RucyePbWqPssR8DyfuXmLBooYN5cZFZKjHGnQuaf7pEzhtpceagJxVu4LqhYY5EYA7nko3FmeHZ1KbA==} - dev: true - /js-string-escape@1.0.1: resolution: {integrity: sha512-Smw4xcfIQ5LVjAOuJCvN/zIodzA/BBSsluuoSykP+lUvScIi4U6RJLfwHet5cxFnCswUjISV8oAXaqaJDY3chg==} engines: {node: '>= 0.8'} @@ -4522,18 +4057,10 @@ packages: prettier: 2.8.8 dev: true - /json-schema-traverse@0.4.1: - resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} - dev: true - /json-schema-traverse@1.0.0: resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} dev: false - /json-stable-stringify-without-jsonify@1.0.1: - resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} - dev: true - /json-stable-stringify@1.0.2: resolution: {integrity: sha512-eunSSaEnxV12z+Z73y/j5N37/In40GK4GmsSy+tEHJMxknvqnA7/djeYtAgW0GsWHUfg+847WJjKaEylk2y09g==} dependencies: @@ -4548,13 +4075,6 @@ packages: remove-trailing-spaces: 1.0.8 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'} @@ -4585,14 +4105,6 @@ packages: engines: {node: '>=6'} 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 - /lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} dev: true @@ -4645,10 +4157,6 @@ packages: p-locate: 5.0.0 dev: true - /lodash.merge@4.6.2: - resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} - dev: true - /lodash.startcase@4.4.0: resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==} dev: true @@ -4885,10 +4393,6 @@ packages: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} dev: true - /ms@2.1.3: - resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - dev: true - /mute-stream@0.0.8: resolution: {integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==} dev: true @@ -4907,14 +4411,6 @@ packages: hasBin: true 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 - /next-tick@1.1.0: resolution: {integrity: sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==} dev: true @@ -4994,15 +4490,6 @@ packages: object-keys: 1.1.1 dev: true - /object.values@1.1.6: - resolution: {integrity: sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.2 - dev: true - /once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} dependencies: @@ -5016,18 +4503,6 @@ packages: mimic-fn: 2.1.0 dev: true - /optionator@0.9.3: - resolution: {integrity: sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==} - engines: {node: '>= 0.8.0'} - dependencies: - '@aashutoshrathi/word-wrap': 1.2.6 - deep-is: 0.1.4 - fast-levenshtein: 2.0.6 - levn: 0.4.1 - prelude-ls: 1.2.1 - type-check: 0.4.0 - dev: true - /ora@5.4.1: resolution: {integrity: sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==} engines: {node: '>=10'} @@ -5168,11 +4643,6 @@ packages: 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 @@ -5250,11 +4720,6 @@ packages: which-pm: 2.0.0 dev: true - /prelude-ls@1.2.1: - resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} - engines: {node: '>= 0.8.0'} - dev: true - /prettier@2.8.8: resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} engines: {node: '>=10.13.0'} @@ -5287,6 +4752,7 @@ packages: /punycode@2.3.0: resolution: {integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==} engines: {node: '>=6'} + dev: false /pvtsutils@1.3.2: resolution: {integrity: sha512-+Ipe2iNUyrZz+8K/2IOo+kKikdtfhRKzNpQbruF2URmqPtoqAs8g3xS7TJvFF2GcPXjh7DkqMnpVveRFq4PgEQ==} @@ -5443,13 +4909,6 @@ packages: resolution: {integrity: sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==} dev: true - /rimraf@3.0.2: - resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} - hasBin: true - dependencies: - glob: 7.2.3 - dev: true - /rollup-plugin-dts@5.3.0(rollup@3.21.5)(typescript@5.4.2): resolution: {integrity: sha512-8FXp0ZkyZj1iU5klkIJYLjIq/YZSwBoERu33QBDxm/1yw5UU4txrEtcmMkrq+ZiKu3Q4qvPCNqc3ovX6rjqzbQ==} engines: {node: '>=v14'} @@ -5540,11 +4999,6 @@ packages: hasBin: true dev: true - /semver@6.3.0: - resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==} - hasBin: true - dev: true - /semver@7.5.4: resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} engines: {node: '>=10'} @@ -5576,23 +5030,11 @@ packages: shebang-regex: 1.0.0 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@1.0.0: resolution: {integrity: sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==} engines: {node: '>=0.10.0'} dev: true - /shebang-regex@3.0.0: - resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} - engines: {node: '>=8'} - dev: true - /shell-quote@1.8.1: resolution: {integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==} dev: true @@ -5795,11 +5237,6 @@ packages: min-indent: 1.0.1 dev: true - /strip-json-comments@3.1.1: - resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} - engines: {node: '>=8'} - dev: true - /strip-literal@1.0.1: resolution: {integrity: sha512-QZTsipNpa2Ppr6v1AmJHESqJ3Uz247MUS0OjrnnZjFAvEoWqxuyFuXn2xLgMtRnijJShAa1HL0gtJyUs7u7n3Q==} dependencies: @@ -5836,10 +5273,6 @@ packages: engines: {node: '>=8'} dev: true - /text-table@0.2.0: - resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} - dev: true - /thenify-all@1.6.0: resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} engines: {node: '>=0.8'} @@ -5921,19 +5354,6 @@ packages: resolution: {integrity: sha512-PGcnJoTBnVGy6yYNFxWVNkdcAuAMstvutN9MgDJIV6L0oG8fB+ZNNy1T+wJzah8RPGor1mZuPQkVfXNDpy9eHA==} dev: true - /tsconfig-paths@3.14.2: - resolution: {integrity: sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==} - 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.5.3: resolution: {integrity: sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==} dev: true @@ -5942,16 +5362,6 @@ packages: resolution: {integrity: sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==} dev: true - /tsutils@3.21.0(typescript@5.4.2): - 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.2 - dev: true - /tty-table@4.2.1: resolution: {integrity: sha512-xz0uKo+KakCQ+Dxj1D/tKn2FSyreSYWzdkL/BYhgN6oMW808g8QRMuh1atAV9fjTPbWBjfbkKQpI/5rEcnAc7g==} engines: {node: '>=8.0.0'} @@ -5966,13 +5376,6 @@ packages: yargs: 17.7.2 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-detect@4.0.8: resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} engines: {node: '>=4'} @@ -5983,11 +5386,6 @@ packages: engines: {node: '>=10'} dev: true - /type-fest@0.20.2: - resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} - engines: {node: '>=10'} - dev: true - /type-fest@0.21.3: resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} engines: {node: '>=10'} @@ -6104,6 +5502,7 @@ packages: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} dependencies: punycode: 2.3.0 + dev: false /urlpattern-polyfill@8.0.2: resolution: {integrity: sha512-Qp95D4TPJl1kC9SKigDcqgyM2VDVO4RiJc2d4qe5GrYm+zbIQCWWKAFaJNQ4BhdFeDGwBmAxqJBwWSJDb9T3BQ==} @@ -6335,14 +5734,6 @@ packages: isexe: 2.0.0 dev: true - /which@2.0.2: - resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} - engines: {node: '>= 8'} - hasBin: true - dependencies: - isexe: 2.0.0 - dev: true - /why-is-node-running@2.2.2: resolution: {integrity: sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==} engines: {node: '>=8'} diff --git a/src/client.ts b/src/client.ts index ddaa335..f4242ee 100644 --- a/src/client.ts +++ b/src/client.ts @@ -32,9 +32,9 @@ import { type CustomerGroupPartsFragment, CustomerGroupsDocument, type CustomerPartsFragment, - CustomersDocument, type CustomerTenantMembershipPartsFragment, CustomerTenantsDocument, + CustomersDocument, DeleteCustomerCardConfigDocument, DeleteCustomerDocument, DeleteThreadFieldDocument, @@ -63,8 +63,8 @@ import { SnoozeThreadDocument, TenantDocument, type TenantPartsFragment, - TenantsDocument, type TenantTierMembershipPartsFragment, + TenantsDocument, ThreadByExternalIdDocument, ThreadDocument, type ThreadEventPartsFragment, @@ -101,7 +101,7 @@ type SDKResult = Promise>; function nonNullable(x: T | null | undefined): T { if (x === null || x === undefined) { - throw new Error(`Expected value to be non nullable`); + throw new Error('Expected value to be non nullable'); } return x; @@ -115,11 +115,10 @@ function unwrapData( return { error: result.error, }; - } else { - return { - data: unwrapFn(result.data), - }; } + return { + data: unwrapFn(result.data), + }; } type ConstructorOptions = { diff --git a/src/error.ts b/src/error.ts index 3ee4da6..23176b0 100644 --- a/src/error.ts +++ b/src/error.ts @@ -1,5 +1,5 @@ -import type { MutationErrorPartsFragment } from './graphql/types'; import type { PlainGraphQLError } from './graphql-utlities'; +import type { MutationErrorPartsFragment } from './graphql/types'; /* 400 */ export type BadRequestError = { diff --git a/src/examples/assignThread.ts b/src/examples/assignThread.ts index 6fbcd80..819b489 100644 --- a/src/examples/assignThread.ts +++ b/src/examples/assignThread.ts @@ -12,7 +12,7 @@ export async function assignThread() { if (res.error) { console.error(res.error); } else { - console.log(`Thread assigned!`); + console.log('Thread assigned!'); console.log(res.data); } } diff --git a/src/examples/createAttachmentUploadUrl.ts b/src/examples/createAttachmentUploadUrl.ts index 883a2a7..f373458 100644 --- a/src/examples/createAttachmentUploadUrl.ts +++ b/src/examples/createAttachmentUploadUrl.ts @@ -13,6 +13,6 @@ export async function createAttachmentUploadUrl() { if (res.error) { console.error(res.error); } else { - console.log(`Attachment upload url created!`, res.data); + console.log('Attachment upload url created!', res.data); } } diff --git a/src/examples/threadFields.ts b/src/examples/threadFields.ts index be17a08..57f7a78 100644 --- a/src/examples/threadFields.ts +++ b/src/examples/threadFields.ts @@ -18,7 +18,7 @@ export async function upsertThreadField() { console.log('There was an error upserting thread field'); console.error(res.error); } else { - console.log(`Thread field upserted!`); + console.log('Thread field upserted!'); console.log(res.data); } } @@ -32,7 +32,7 @@ export async function deleteThreadField() { console.log('There was an error deleting thread field'); console.error(res.error); } else { - console.log(`Thread field deleted!`); + console.log('Thread field deleted!'); console.log(res.data); } } diff --git a/src/graphql/types.ts b/src/graphql/types.ts index b9e7d6d..8aaafc0 100644 --- a/src/graphql/types.ts +++ b/src/graphql/types.ts @@ -418,6 +418,21 @@ export type BusinessHours = { weekDays: BusinessHoursWeekDays; }; +export type BusinessHoursSlot = { + __typename?: 'BusinessHoursSlot'; + closesAt: Scalars['String']; + opensAt: Scalars['String']; + timezone: Timezone; + weekday: WeekDay; +}; + +export type BusinessHoursSlotInput = { + closesAt: Scalars['String']; + opensAt: Scalars['String']; + timezone: Scalars['String']; + weekday: WeekDay; +}; + export type BusinessHoursWeekDay = { __typename?: 'BusinessHoursWeekDay'; endTime: Time; @@ -1266,6 +1281,18 @@ export type CreateWebhookTargetOutput = { webhookTarget: Maybe; }; +export type CreateWorkflowRuleInput = { + name: Scalars['String']; + /** JSON-encoded payload of the rule definition. */ + payload: Scalars['String']; +}; + +export type CreateWorkflowRuleOutput = { + __typename?: 'CreateWorkflowRuleOutput'; + error: Maybe; + workflowRule: Maybe; +}; + export type CreateWorkspaceDiscordIntegrationInput = { name: Scalars['String']; webhookUrl: Scalars['String']; @@ -2041,6 +2068,15 @@ export type DeleteWebhookTargetOutput = { error: Maybe; }; +export type DeleteWorkflowRuleInput = { + workflowRuleId: Scalars['ID']; +}; + +export type DeleteWorkflowRuleOutput = { + __typename?: 'DeleteWorkflowRuleOutput'; + error: Maybe; +}; + export type DeleteWorkspaceDiscordIntegrationInput = { integrationId: Scalars['ID']; }; @@ -2284,7 +2320,8 @@ export enum FeatureKey { MoreActiveEngRotaSeats = 'MORE_ACTIVE_ENG_ROTA_SEATS', MsTeamsIntegration = 'MS_TEAMS_INTEGRATION', ServiceLevelAgreements = 'SERVICE_LEVEL_AGREEMENTS', - SlackDiscussions = 'SLACK_DISCUSSIONS' + SlackDiscussions = 'SLACK_DISCUSSIONS', + WorkflowRules = 'WORKFLOW_RULES' } export type FileSize = { @@ -2620,6 +2657,7 @@ export type Mutation = { createUserAuthSlackIntegration: CreateUserAuthSlackIntegrationOutput; /** Creates a webhook target. */ createWebhookTarget: CreateWebhookTargetOutput; + createWorkflowRule: CreateWorkflowRuleOutput; createWorkspace: CreateWorkspaceOutput; createWorkspaceDiscordIntegration: CreateWorkspaceDiscordIntegrationOutput; createWorkspaceEmailDomainSettings: CreateWorkspaceEmailDomainSettingsOutput; @@ -2628,6 +2666,7 @@ export type Mutation = { createWorkspaceSlackIntegration: CreateWorkspaceSlackIntegrationOutput; deleteApiKey: DeleteApiKeyOutput; deleteAutoresponder: DeleteAutoresponderOutput; + /** @deprecated Use syncBusinessHoursSlots instead. */ deleteBusinessHours: DeleteBusinessHoursOutput; /** Deletes a customer and all of their data stored on Plain. This action cannot be reversed. */ deleteCustomer: DeleteCustomerOutput; @@ -2651,6 +2690,7 @@ export type Mutation = { deleteUserAuthSlackIntegration: DeleteUserAuthSlackIntegrationOutput; /** Deletes a webhook target. */ deleteWebhookTarget: DeleteWebhookTargetOutput; + deleteWorkflowRule: DeleteWorkflowRuleOutput; deleteWorkspaceDiscordIntegration: DeleteWorkspaceDiscordIntegrationOutput; deleteWorkspaceEmailDomainSettings: DeleteWorkspaceEmailDomainSettingsOutput; deleteWorkspaceInvite: DeleteWorkspaceInviteOutput; @@ -2707,6 +2747,7 @@ export type Mutation = { shareThreadToUserInSlack: ShareThreadToUserInSlackOutput; snoozeThread: SnoozeThreadOutput; startServiceAuthorization: StartServiceAuthorizationOutput; + syncBusinessHoursSlots: SyncBusinessHoursSlotsOutput; /** Adds or removes a reaction from a slack message timeline entry. */ toggleSlackMessageReaction: ToggleSlackMessageReactionOutput; unarchiveLabelType: UnarchiveLabelTypeOutput; @@ -2737,8 +2778,10 @@ export type Mutation = { updateTier: UpdateTierOutput; /** Updates a webhook target. */ updateWebhookTarget: UpdateWebhookTargetOutput; + updateWorkflowRule: UpdateWorkflowRuleOutput; updateWorkspace: UpdateWorkspaceOutput; updateWorkspaceEmailSettings: UpdateWorkspaceEmailSettingsOutput; + /** @deprecated Use syncBusinessHoursSlots instead. */ upsertBusinessHours: UpsertBusinessHoursOutput; upsertCompany: UpsertCompanyOutput; /** Creates or updates a customer. */ @@ -2963,6 +3006,11 @@ export type MutationCreateWebhookTargetArgs = { }; +export type MutationCreateWorkflowRuleArgs = { + input: CreateWorkflowRuleInput; +}; + + export type MutationCreateWorkspaceArgs = { input: CreateWorkspaceInput; }; @@ -3078,6 +3126,11 @@ export type MutationDeleteWebhookTargetArgs = { }; +export type MutationDeleteWorkflowRuleArgs = { + input: DeleteWorkflowRuleInput; +}; + + export type MutationDeleteWorkspaceDiscordIntegrationArgs = { input: DeleteWorkspaceDiscordIntegrationInput; }; @@ -3253,6 +3306,11 @@ export type MutationStartServiceAuthorizationArgs = { }; +export type MutationSyncBusinessHoursSlotsArgs = { + input: SyncBusinessHoursSlotsInput; +}; + + export type MutationToggleSlackMessageReactionArgs = { input: ToggleSlackMessageReactionInput; }; @@ -3368,6 +3426,11 @@ export type MutationUpdateWebhookTargetArgs = { }; +export type MutationUpdateWorkflowRuleArgs = { + input: UpdateWorkflowRuleInput; +}; + + export type MutationUpdateWorkspaceArgs = { input: UpdateWorkspaceInput; }; @@ -3575,7 +3638,9 @@ export type Query = { autoresponder: Maybe; autoresponders: AutoresponderConnection; billingPlans: BillingPlanConnection; + /** @deprecated Use businessHoursSlots instead. */ businessHours: Maybe; + businessHoursSlots: Array; companies: CompanyConnection; company: Maybe; /** Gets all slack channels for this workspace, which match the specified filters. */ @@ -3688,6 +3753,10 @@ export type Query = { webhookTargets: WebhookTargetConnection; /** List webhook versions. */ webhookVersions: WebhookVersionConnection; + /** Get a workflow rule by id. */ + workflowRule: Maybe; + /** List workflow rules. */ + workflowRules: WorkflowRuleConnection; workspace: Maybe; workspaceChatSettings: WorkspaceChatSettings; workspaceDiscordIntegration: Maybe; @@ -4116,6 +4185,19 @@ export type QueryWebhookVersionsArgs = { }; +export type QueryWorkflowRuleArgs = { + workflowRuleId: Scalars['ID']; +}; + + +export type QueryWorkflowRulesArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; +}; + + export type QueryWorkspaceArgs = { workspaceId: Scalars['ID']; }; @@ -4933,6 +5015,16 @@ export type SupportEmailAddressEmailActor = { supportEmailAddress: Scalars['String']; }; +export type SyncBusinessHoursSlotsInput = { + slots: Array; +}; + +export type SyncBusinessHoursSlotsOutput = { + __typename?: 'SyncBusinessHoursSlotsOutput'; + error: Maybe; + slots: Array; +}; + export type System = { __typename?: 'System'; id: Scalars['ID']; @@ -5697,6 +5789,11 @@ export type TimelineEventEntry = { title: Scalars['String']; }; +export type Timezone = { + __typename?: 'Timezone'; + name: Scalars['String']; +}; + export enum TodoStatusDetail { Created = 'CREATED', InProgress = 'IN_PROGRESS', @@ -6031,6 +6128,19 @@ export type UpdateWebhookTargetOutput = { webhookTarget: Maybe; }; +export type UpdateWorkflowRuleInput = { + name?: InputMaybe; + /** JSON-encoded payload of the rule definition. */ + payload?: InputMaybe; + workflowRuleId: Scalars['ID']; +}; + +export type UpdateWorkflowRuleOutput = { + __typename?: 'UpdateWorkflowRuleOutput'; + error: Maybe; + workflowRule: Maybe; +}; + export type UpdateWorkspaceEmailSettingsInput = { isEnabled: Scalars['Boolean']; }; @@ -6400,6 +6510,40 @@ export type WebhookVersionEdge = { node: WebhookVersion; }; +export enum WeekDay { + Friday = 'FRIDAY', + Monday = 'MONDAY', + Saturday = 'SATURDAY', + Sunday = 'SUNDAY', + Thursday = 'THURSDAY', + Tuesday = 'TUESDAY', + Wednesday = 'WEDNESDAY' +} + +export type WorkflowRule = { + __typename?: 'WorkflowRule'; + createdAt: DateTime; + createdBy: InternalActor; + id: Scalars['ID']; + name: Scalars['String']; + /** JSON-encoded payload of the rule definition. */ + payload: Scalars['String']; + updatedAt: DateTime; + updatedBy: InternalActor; +}; + +export type WorkflowRuleConnection = { + __typename?: 'WorkflowRuleConnection'; + edges: Array; + pageInfo: PageInfo; +}; + +export type WorkflowRuleEdge = { + __typename?: 'WorkflowRuleEdge'; + cursor: Scalars['String']; + node: WorkflowRule; +}; + export type Workspace = { __typename?: 'Workspace'; createdAt: DateTime; diff --git a/src/request.ts b/src/request.ts index 50c65a5..b216666 100644 --- a/src/request.ts +++ b/src/request.ts @@ -1,6 +1,7 @@ import type { TypedDocumentNode } from '@graphql-typed-document-node/core'; import { print } from 'graphql'; +import * as packageJson from '../package.json'; import type { Context } from './context'; import type { PlainSDKError } from './error'; import { getMutationErrorFromResponse, isPlainFailedGraphQLResponse } from './graphql-utlities'; @@ -29,6 +30,8 @@ export async function request( const headers = { Authorization: `Bearer ${ctx.apiKey}`, 'Content-Type': 'application/json', + 'Plain-SDK': 'typescript', + 'Plain-SDK-Version': packageJson.version, }; const url = ctx.apiUrl || defaultUrl; @@ -45,7 +48,7 @@ export async function request( const status = result.status; const responseHeaders = result.headers; - let response; + let response: any; try { // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment response = await result.json(); diff --git a/src/tests/parse-webhook.test.ts b/src/tests/parse-webhook.test.ts index 4b665c4..42673e5 100644 --- a/src/tests/parse-webhook.test.ts +++ b/src/tests/parse-webhook.test.ts @@ -21,7 +21,7 @@ describe('Parse webhook', () => { }); }); - test(`should fail to validate an invalid payload`, () => { + test('should fail to validate an invalid payload', () => { expect(parsePlainWebhook(invalidWebhook).error).toBeTruthy(); }); }); diff --git a/src/tests/query.test.ts b/src/tests/query.test.ts index 9c66635..4c37f47 100644 --- a/src/tests/query.test.ts +++ b/src/tests/query.test.ts @@ -3,8 +3,8 @@ import { describe, expect, test } from 'vitest'; import { PlainClient } from '..'; import type { PlainSDKError } from '../error'; +import type { PlainGraphQLError } from '../graphql-utlities'; import { CustomerByIdDocument, type CustomerPartsFragment } from '../graphql/types'; -import { PlainGraphQLError } from '../graphql-utlities'; import { testHelpers } from './test-helpers'; describe('query test - customer by id', () => { diff --git a/src/tests/test-helpers.ts b/src/tests/test-helpers.ts index 2172f3b..025c8d8 100644 --- a/src/tests/test-helpers.ts +++ b/src/tests/test-helpers.ts @@ -1,4 +1,5 @@ -import { expect, type Mock, vitest } from 'vitest'; +import { type Mock, expect, vitest } from 'vitest'; +import * as packageJson from '../../package.json'; // eslint-disable-next-line @typescript-eslint/no-explicit-any function makeExpectFn(spy: Mock) { @@ -21,6 +22,8 @@ function makeExpectFn(spy: Mock) { expect(reqOptions.headers).toStrictEqual({ Authorization: `Bearer ${apiKey}`, 'Content-Type': 'application/json', + 'Plain-SDK': 'typescript', + 'Plain-SDK-Version': packageJson.version, }); expect(reqOptions.method).toStrictEqual('POST'); diff --git a/src/ui-components/containerComponent.ts b/src/ui-components/containerComponent.ts index c4c6aa1..e3ead70 100644 --- a/src/ui-components/containerComponent.ts +++ b/src/ui-components/containerComponent.ts @@ -1,4 +1,4 @@ -import { type ComponentInput } from '../graphql/types'; +import type { ComponentInput } from '../graphql/types'; /** * Returns a ComponentInput which can be used with the API. diff --git a/src/ui-components/copyButtonComponent.ts b/src/ui-components/copyButtonComponent.ts index 7cadc4c..c55920e 100644 --- a/src/ui-components/copyButtonComponent.ts +++ b/src/ui-components/copyButtonComponent.ts @@ -1,4 +1,4 @@ -import { type ComponentInput } from '../graphql/types'; +import type { ComponentInput } from '../graphql/types'; /** * Returns a ComponentInput which can be used with the API. diff --git a/src/ui-components/index.test.ts b/src/ui-components/index.test.ts index b942fca..23adcc1 100644 --- a/src/ui-components/index.test.ts +++ b/src/ui-components/index.test.ts @@ -1,7 +1,7 @@ import { describe, expect, test } from 'vitest'; -import { ComponentBadgeColor, ComponentTextColor, ComponentTextSize } from '../graphql/types'; import { uiComponent } from '.'; +import { ComponentBadgeColor, ComponentTextColor, ComponentTextSize } from '../graphql/types'; describe('ui components builder', () => { test('basic example', () => { diff --git a/src/ui-components/linkButtonComponent.ts b/src/ui-components/linkButtonComponent.ts index 5e8c2fb..7d5a453 100644 --- a/src/ui-components/linkButtonComponent.ts +++ b/src/ui-components/linkButtonComponent.ts @@ -1,4 +1,4 @@ -import { type ComponentInput } from '../graphql/types'; +import type { ComponentInput } from '../graphql/types'; /** * Returns a ComponentInput which can be used with the API. diff --git a/src/ui-components/rowComponent.ts b/src/ui-components/rowComponent.ts index 78e922b..28587a8 100644 --- a/src/ui-components/rowComponent.ts +++ b/src/ui-components/rowComponent.ts @@ -1,4 +1,4 @@ -import { type ComponentInput } from '../graphql/types'; +import type { ComponentInput } from '../graphql/types'; /** * Returns a ComponentInput which can be used with the API. diff --git a/src/webhooks/webhook-schema.json b/src/webhooks/webhook-schema.json index 7a873dc..30ba9aa 100644 --- a/src/webhooks/webhook-schema.json +++ b/src/webhooks/webhook-schema.json @@ -141,7 +141,7 @@ }, { "type": "string", - "pattern": "^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|([^-]([a-zA-Z0-9-]*\\.)+[a-zA-Z]{2,}))$" + "pattern": "^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|([^-]([a-zA-Z0-9-]*\\.)+[a-zA-Z]{2,}))$" } ] },