mirror of
https://github.com/unraid/api.git
synced 2025-12-31 13:39:52 -06:00
fix: authorization type error (#987)
Co-authored-by: Eli Bosley <ekbosley@gmail.com>
This commit is contained in:
105
api/codegen.ts
Normal file
105
api/codegen.ts
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
import type { CodegenConfig } from '@graphql-codegen/cli';
|
||||||
|
|
||||||
|
const config: CodegenConfig = {
|
||||||
|
overwrite: true,
|
||||||
|
emitLegacyCommonJSImports: false,
|
||||||
|
verbose: true,
|
||||||
|
config: {
|
||||||
|
namingConvention: {
|
||||||
|
typeNames: './fix-array-type.cjs',
|
||||||
|
enumValues: 'change-case#upperCase',
|
||||||
|
useTypeImports: true,
|
||||||
|
},
|
||||||
|
scalars: {
|
||||||
|
DateTime: 'string',
|
||||||
|
Long: 'number',
|
||||||
|
JSON: '{ [key: string]: any }',
|
||||||
|
URL: 'URL',
|
||||||
|
Port: 'number',
|
||||||
|
UUID: 'string',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
generates: {
|
||||||
|
'src/graphql/generated/client/': {
|
||||||
|
documents: './src/graphql/mothership/*.ts',
|
||||||
|
schema: {
|
||||||
|
[process.env.MOTHERSHIP_GRAPHQL_LINK as string]: {
|
||||||
|
headers: {
|
||||||
|
origin: 'https://forums.unraid.net',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
preset: 'client',
|
||||||
|
presetConfig: {
|
||||||
|
gqlTagName: 'graphql',
|
||||||
|
},
|
||||||
|
config: {
|
||||||
|
useTypeImports: true,
|
||||||
|
withObjectType: true,
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
{ add: { content: '/* eslint-disable */' } },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
// Generate Types for the API Server
|
||||||
|
'src/graphql/generated/api/types.ts': {
|
||||||
|
schema: [
|
||||||
|
'./src/graphql/types.ts',
|
||||||
|
'./src/graphql/schema/types/**/*.graphql',
|
||||||
|
],
|
||||||
|
plugins: [
|
||||||
|
'typescript',
|
||||||
|
'typescript-resolvers',
|
||||||
|
{ add: { content: '/* eslint-disable */' } },
|
||||||
|
],
|
||||||
|
config: {
|
||||||
|
contextType: '@app/graphql/schema/utils#Context',
|
||||||
|
useIndexSignature: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
// Generate Operations for any built-in API Server Operations (e.g., report.ts)
|
||||||
|
'src/graphql/generated/api/operations.ts': {
|
||||||
|
documents: './src/graphql/client/api/*.ts',
|
||||||
|
schema: [
|
||||||
|
'./src/graphql/types.ts',
|
||||||
|
'./src/graphql/schema/types/**/*.graphql',
|
||||||
|
],
|
||||||
|
preset: 'import-types',
|
||||||
|
presetConfig: {
|
||||||
|
typesPath: '@app/graphql/generated/api/types',
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
'typescript-validation-schema',
|
||||||
|
'typescript-operations',
|
||||||
|
'typed-document-node',
|
||||||
|
{ add: { content: '/* eslint-disable */' } },
|
||||||
|
],
|
||||||
|
config: {
|
||||||
|
importFrom: '@app/graphql/generated/api/types',
|
||||||
|
strictScalars: false,
|
||||||
|
schema: 'zod',
|
||||||
|
withObjectType: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'src/graphql/generated/client/validators.ts': {
|
||||||
|
schema: {
|
||||||
|
[process.env.MOTHERSHIP_GRAPHQL_LINK as string]: {
|
||||||
|
headers: {
|
||||||
|
origin: 'https://forums.unraid.net',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
'typescript-validation-schema',
|
||||||
|
{ add: { content: '/* eslint-disable */' } },
|
||||||
|
],
|
||||||
|
config: {
|
||||||
|
importFrom: '@app/graphql/generated/client/graphql',
|
||||||
|
strictScalars: false,
|
||||||
|
schema: 'zod',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export default config;
|
||||||
@@ -1,77 +0,0 @@
|
|||||||
overwrite: true
|
|
||||||
emitLegacyCommonJSImports: false
|
|
||||||
verbose: true
|
|
||||||
require:
|
|
||||||
- ts-node/register
|
|
||||||
config:
|
|
||||||
namingConvention:
|
|
||||||
typeNames: './fix-array-type.cjs'
|
|
||||||
enumValues: 'change-case#upperCase'
|
|
||||||
useTypeImports: true
|
|
||||||
scalars:
|
|
||||||
DateTime: string
|
|
||||||
Long: number
|
|
||||||
JSON: "{ [key: string]: any }"
|
|
||||||
URL: URL
|
|
||||||
Port: number
|
|
||||||
UUID: string
|
|
||||||
|
|
||||||
generates:
|
|
||||||
src/graphql/generated/client/:
|
|
||||||
documents: './src/graphql/mothership/*.ts'
|
|
||||||
schema:
|
|
||||||
'${MOTHERSHIP_GRAPHQL_LINK}':
|
|
||||||
headers:
|
|
||||||
origin: 'https://forums.unraid.net'
|
|
||||||
preset: client
|
|
||||||
presetConfig:
|
|
||||||
gqlTagName: graphql
|
|
||||||
config:
|
|
||||||
useTypeImports: true
|
|
||||||
withObjectType: true
|
|
||||||
plugins:
|
|
||||||
- add: { content: '/* eslint-disable */' }
|
|
||||||
|
|
||||||
# Generate Types for the API Server
|
|
||||||
src/graphql/generated/api/types.ts:
|
|
||||||
schema:
|
|
||||||
- './src/graphql/types.ts'
|
|
||||||
- './src/graphql/schema/types/**/*.graphql'
|
|
||||||
plugins:
|
|
||||||
- typescript
|
|
||||||
- typescript-resolvers
|
|
||||||
- add: { content: '/* eslint-disable */' }
|
|
||||||
config:
|
|
||||||
contextType: '@app/graphql/schema/utils#Context'
|
|
||||||
useIndexSignature: true
|
|
||||||
# Generate Operations for any built in API Server Operations (ie report.ts)
|
|
||||||
src/graphql/generated/api/operations.ts:
|
|
||||||
documents: './src/graphql/client/api/*.ts'
|
|
||||||
schema:
|
|
||||||
- './src/graphql/types.ts'
|
|
||||||
- './src/graphql/schema/types/**/*.graphql'
|
|
||||||
preset: import-types
|
|
||||||
presetConfig:
|
|
||||||
typesPath: '@app/graphql/generated/api/types'
|
|
||||||
plugins:
|
|
||||||
- typescript-validation-schema
|
|
||||||
- typescript-operations
|
|
||||||
- typed-document-node
|
|
||||||
- add: { content: '/* eslint-disable */' }
|
|
||||||
config:
|
|
||||||
importFrom: '@app/graphql/generated/api/types'
|
|
||||||
strictScalars: false
|
|
||||||
schema: 'zod'
|
|
||||||
withObjectType: true
|
|
||||||
src/graphql/generated/client/validators.ts:
|
|
||||||
schema:
|
|
||||||
'${MOTHERSHIP_GRAPHQL_LINK}':
|
|
||||||
headers:
|
|
||||||
origin: 'https://forums.unraid.net'
|
|
||||||
plugins:
|
|
||||||
- typescript-validation-schema
|
|
||||||
- add: { content: '/* eslint-disable */'}
|
|
||||||
config:
|
|
||||||
importFrom: '@app/graphql/generated/client/graphql'
|
|
||||||
strictScalars: false
|
|
||||||
schema: 'zod'
|
|
||||||
@@ -17,7 +17,7 @@ x-volumes: &volumes
|
|||||||
- ./.env.staging:/app/.env.staging
|
- ./.env.staging:/app/.env.staging
|
||||||
- ./.env.test:/app/.env.test
|
- ./.env.test:/app/.env.test
|
||||||
- ./.env.development:/app/.env.development
|
- ./.env.development:/app/.env.development
|
||||||
- ./codegen.yml:/app/codegen.yml
|
- ./codegen.ts:/app/codegen.ts
|
||||||
- ./fix-array-type.cjs:/app/fix-array-type.cjs
|
- ./fix-array-type.cjs:/app/fix-array-type.cjs
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
- ./unraid-api.js:/app/unraid-api.js
|
- ./unraid-api.js:/app/unraid-api.js
|
||||||
|
|||||||
54813
api/package-lock.json
generated
54813
api/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
378
api/package.json
378
api/package.json
@@ -1,191 +1,193 @@
|
|||||||
{
|
{
|
||||||
"name": "@unraid/api",
|
"name": "@unraid/api",
|
||||||
"version": "3.11.0",
|
"version": "3.11.0",
|
||||||
"main": "src/cli/index.ts",
|
"main": "src/cli/index.ts",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"repository": "git@github.com:unraid/api.git",
|
"repository": "git@github.com:unraid/api.git",
|
||||||
"author": "Lime Technology, Inc. <unraid.net>",
|
"author": "Lime Technology, Inc. <unraid.net>",
|
||||||
"license": "UNLICENSED",
|
"license": "UNLICENSED",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node dist/main.js",
|
"start": "node dist/main.js",
|
||||||
"build:docker": "./scripts/dc.sh run --rm builder",
|
"build:docker": "./scripts/dc.sh run --rm builder",
|
||||||
"build": "vite build --mode=production",
|
"build": "vite build --mode=production",
|
||||||
"postbuild": "chmod +x dist/main.js && chmod +x dist/cli.js",
|
"postbuild": "chmod +x dist/main.js && chmod +x dist/cli.js",
|
||||||
"build-and-pack": "./scripts/build.mjs",
|
"build-and-pack": "./scripts/build.mjs",
|
||||||
"codegen": "MOTHERSHIP_GRAPHQL_LINK='https://staging.mothership.unraid.net/ws' graphql-codegen --config codegen.yml -r dotenv/config './.env.staging'",
|
"codegen": "MOTHERSHIP_GRAPHQL_LINK='https://staging.mothership.unraid.net/ws' graphql-codegen --config codegen.ts -r dotenv/config './.env.staging'",
|
||||||
"codegen:watch": "DOTENV_CONFIG_PATH='./.env.staging' graphql-codegen --config codegen.yml --watch -r dotenv/config",
|
"codegen:watch": "DOTENV_CONFIG_PATH='./.env.staging' graphql-codegen --config codegen.ts --watch -r dotenv/config",
|
||||||
"codegen:local": "NODE_TLS_REJECT_UNAUTHORIZED=0 MOTHERSHIP_GRAPHQL_LINK='https://mothership.localhost/ws' graphql-codegen-esm --config codegen.yml --watch",
|
"codegen:local": "NODE_TLS_REJECT_UNAUTHORIZED=0 MOTHERSHIP_GRAPHQL_LINK='https://mothership.localhost/ws' graphql-codegen --config codegen.ts --watch",
|
||||||
"tsc": "tsc --noEmit",
|
"tsc": "tsc --noEmit",
|
||||||
"lint": "eslint --flag unstable_ts_config --config .eslintrc.ts src/",
|
"lint": "eslint --flag unstable_ts_config --config .eslintrc.ts src/",
|
||||||
"lint:fix": "eslint --flag unstable_ts_config --fix --config .eslintrc.ts src/",
|
"lint:fix": "eslint --flag unstable_ts_config --fix --config .eslintrc.ts src/",
|
||||||
"test:watch": "vitest --pool=forks",
|
"test:watch": "vitest --pool=forks",
|
||||||
"test": "vitest run --pool=forks",
|
"test": "vitest run --pool=forks",
|
||||||
"coverage": "vitest run --pool=forks --coverage",
|
"coverage": "vitest run --pool=forks --coverage",
|
||||||
"release": "standard-version",
|
"release": "standard-version",
|
||||||
"dev": "nodemon --ext ts,gql --ignore \"dist/\" --ignore \"dev/\" --signal SIGKILL --exec \"vite\"",
|
"dev": "vite",
|
||||||
"container:build": "./scripts/dc.sh build dev",
|
"container:build": "./scripts/dc.sh build dev",
|
||||||
"container:start": "./scripts/dc.sh run --rm --service-ports dev",
|
"container:start": "./scripts/dc.sh run --rm --service-ports dev",
|
||||||
"container:test": "./scripts/dc.sh run --rm builder npm run test",
|
"container:test": "./scripts/dc.sh run --rm builder npm run test",
|
||||||
"container:enter": "./scripts/dc.sh exec dev /bin/bash"
|
"container:enter": "./scripts/dc.sh exec dev /bin/bash"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
".env.staging",
|
".env.staging",
|
||||||
".env.production",
|
".env.production",
|
||||||
"ecosystem.config.json",
|
"ecosystem.config.json",
|
||||||
"README.md",
|
"README.md",
|
||||||
"src",
|
"src",
|
||||||
"node_modules/"
|
"node_modules/"
|
||||||
],
|
],
|
||||||
"bin": {
|
"bin": {
|
||||||
"unraid-api": "dist/cli.js"
|
"unraid-api": "dist/cli.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@apollo/client": "^3.11.8",
|
"@apollo/client": "^3.11.8",
|
||||||
"@apollo/server": "^4.11.2",
|
"@apollo/server": "^4.11.2",
|
||||||
"@as-integrations/fastify": "^2.1.1",
|
"@as-integrations/fastify": "^2.1.1",
|
||||||
"@fastify/cookie": "^9.4.0",
|
"@fastify/cookie": "^9.4.0",
|
||||||
"@graphql-codegen/client-preset": "^4.5.0",
|
"@graphql-codegen/client-preset": "^4.5.0",
|
||||||
"@graphql-tools/load-files": "^7.0.0",
|
"@graphql-tools/load-files": "^7.0.0",
|
||||||
"@graphql-tools/merge": "^9.0.8",
|
"@graphql-tools/merge": "^9.0.8",
|
||||||
"@graphql-tools/schema": "^10.0.7",
|
"@graphql-tools/schema": "^10.0.7",
|
||||||
"@graphql-tools/utils": "^10.5.5",
|
"@graphql-tools/utils": "^10.5.5",
|
||||||
"@nestjs/apollo": "^12.2.1",
|
"@nestjs/apollo": "^12.2.1",
|
||||||
"@nestjs/core": "^10.4.7",
|
"@nestjs/core": "^10.4.7",
|
||||||
"@nestjs/graphql": "^12.2.1",
|
"@nestjs/graphql": "^12.2.1",
|
||||||
"@nestjs/passport": "^10.0.3",
|
"@nestjs/passport": "^10.0.3",
|
||||||
"@nestjs/platform-fastify": "^10.4.7",
|
"@nestjs/platform-fastify": "^10.4.7",
|
||||||
"@nestjs/schedule": "^4.1.1",
|
"@nestjs/schedule": "^4.1.1",
|
||||||
"@nestjs/throttler": "^6.2.1",
|
"@nestjs/throttler": "^6.2.1",
|
||||||
"@reduxjs/toolkit": "^2.3.0",
|
"@reduxjs/toolkit": "^2.3.0",
|
||||||
"@reflet/cron": "^1.3.1",
|
"@reflet/cron": "^1.3.1",
|
||||||
"@runonflux/nat-upnp": "^1.0.2",
|
"@runonflux/nat-upnp": "^1.0.2",
|
||||||
"accesscontrol": "^2.2.1",
|
"accesscontrol": "^2.2.1",
|
||||||
"btoa": "^1.2.1",
|
"btoa": "^1.2.1",
|
||||||
"bycontract": "^2.0.11",
|
"bycontract": "^2.0.11",
|
||||||
"bytes": "^3.1.2",
|
"bytes": "^3.1.2",
|
||||||
"cacheable-lookup": "^7.0.0",
|
"cacheable-lookup": "^7.0.0",
|
||||||
"camelcase-keys": "^9.1.3",
|
"camelcase-keys": "^9.1.3",
|
||||||
"casbin": "^5.32.0",
|
"casbin": "^5.32.0",
|
||||||
"catch-exit": "^1.2.2",
|
"catch-exit": "^1.2.2",
|
||||||
"chokidar": "^4.0.1",
|
"chokidar": "^4.0.1",
|
||||||
"cli-table": "^0.3.11",
|
"cli-table": "^0.3.11",
|
||||||
"command-exists": "^1.2.9",
|
"command-exists": "^1.2.9",
|
||||||
"convert": "^5.5.1",
|
"convert": "^5.5.1",
|
||||||
"cross-fetch": "^4.0.0",
|
"cross-fetch": "^4.0.0",
|
||||||
"docker-event-emitter": "^0.3.0",
|
"docker-event-emitter": "^0.3.0",
|
||||||
"dockerode": "^3.3.5",
|
"dockerode": "^3.3.5",
|
||||||
"dotenv": "^16.4.5",
|
"dotenv": "^16.4.5",
|
||||||
"execa": "^9.5.1",
|
"execa": "^9.5.1",
|
||||||
"exit-hook": "^4.0.0",
|
"exit-hook": "^4.0.0",
|
||||||
"express": "^4.21.1",
|
"express": "^4.21.1",
|
||||||
"filenamify": "^6.0.0",
|
"filenamify": "^6.0.0",
|
||||||
"fs-extra": "^11.2.0",
|
"fs-extra": "^11.2.0",
|
||||||
"global-agent": "^3.0.0",
|
"global-agent": "^3.0.0",
|
||||||
"got": "^14.4.4",
|
"got": "^14.4.4",
|
||||||
"graphql": "^16.9.0",
|
"graphql": "^16.9.0",
|
||||||
"graphql-fields": "^2.0.3",
|
"graphql-fields": "^2.0.3",
|
||||||
"graphql-scalars": "^1.23.0",
|
"graphql-scalars": "^1.23.0",
|
||||||
"graphql-subscriptions": "^2.0.0",
|
"graphql-subscriptions": "^2.0.0",
|
||||||
"graphql-tag": "^2.12.6",
|
"graphql-tag": "^2.12.6",
|
||||||
"graphql-type-json": "^0.3.2",
|
"graphql-type-json": "^0.3.2",
|
||||||
"graphql-type-uuid": "^0.2.0",
|
"graphql-type-uuid": "^0.2.0",
|
||||||
"graphql-ws": "^5.16.0",
|
"graphql-ws": "^5.16.0",
|
||||||
"ini": "^4.1.2",
|
"ini": "^4.1.2",
|
||||||
"ip": "^2.0.1",
|
"ip": "^2.0.1",
|
||||||
"ip-regex": "^5.0.0",
|
"ip-regex": "^5.0.0",
|
||||||
"jose": "^5.9.6",
|
"jose": "^5.9.6",
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
"multi-ini": "^2.3.2",
|
"multi-ini": "^2.3.2",
|
||||||
"mustache": "^4.2.0",
|
"mustache": "^4.2.0",
|
||||||
"nest-access-control": "^3.1.0",
|
"nest-access-control": "^3.1.0",
|
||||||
"nest-authz": "^2.11.0",
|
"nest-authz": "^2.11.0",
|
||||||
"nestjs-pino": "^4.1.0",
|
"nestjs-pino": "^4.1.0",
|
||||||
"node-cache": "^5.1.2",
|
"node-cache": "^5.1.2",
|
||||||
"node-window-polyfill": "^1.0.2",
|
"node-window-polyfill": "^1.0.2",
|
||||||
"openid-client": "^6.1.3",
|
"openid-client": "^6.1.3",
|
||||||
"p-retry": "^6.2.0",
|
"p-retry": "^6.2.0",
|
||||||
"passport-custom": "^1.1.1",
|
"passport-custom": "^1.1.1",
|
||||||
"passport-http-header-strategy": "^1.1.0",
|
"passport-http-header-strategy": "^1.1.0",
|
||||||
"path-type": "^6.0.0",
|
"path-type": "^6.0.0",
|
||||||
"pidusage": "^3.0.2",
|
"pidusage": "^3.0.2",
|
||||||
"pino": "^9.5.0",
|
"pino": "^9.5.0",
|
||||||
"pino-http": "^10.3.0",
|
"pino-http": "^10.3.0",
|
||||||
"pino-pretty": "^11.3.0",
|
"pino-pretty": "^11.3.0",
|
||||||
"pm2": "^5.4.2",
|
"pm2": "^5.4.2",
|
||||||
"reflect-metadata": "^0.1.14",
|
"reflect-metadata": "^0.1.14",
|
||||||
"request": "^2.88.2",
|
"request": "^2.88.2",
|
||||||
"semver": "^7.6.3",
|
"semver": "^7.6.3",
|
||||||
"stoppable": "^1.1.0",
|
"stoppable": "^1.1.0",
|
||||||
"strftime": "^0.10.3",
|
"strftime": "^0.10.3",
|
||||||
"systeminformation": "^5.23.5",
|
"systeminformation": "^5.23.5",
|
||||||
"ts-command-line-args": "^2.5.1",
|
"ts-command-line-args": "^2.5.1",
|
||||||
"uuid": "^11.0.2",
|
"uuid": "^11.0.2",
|
||||||
"ws": "^8.18.0",
|
"ws": "^8.18.0",
|
||||||
"xhr2": "^0.2.1",
|
"xhr2": "^0.2.1",
|
||||||
"zod": "^3.23.8"
|
"zod": "^3.23.8"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@graphql-codegen/add": "^5.0.3",
|
"@graphql-codegen/add": "^5.0.3",
|
||||||
"@graphql-codegen/cli": "^5.0.3",
|
"@graphql-codegen/cli": "^5.0.3",
|
||||||
"@graphql-codegen/fragment-matcher": "^5.0.2",
|
"@graphql-codegen/fragment-matcher": "^5.0.2",
|
||||||
"@graphql-codegen/import-types-preset": "^3.0.0",
|
"@graphql-codegen/import-types-preset": "^3.0.0",
|
||||||
"@graphql-codegen/typed-document-node": "^5.0.11",
|
"@graphql-codegen/typed-document-node": "^5.0.11",
|
||||||
"@graphql-codegen/typescript": "^4.1.1",
|
"@graphql-codegen/typescript": "^4.1.1",
|
||||||
"@graphql-codegen/typescript-operations": "^4.3.1",
|
"@graphql-codegen/typescript-operations": "^4.3.1",
|
||||||
"@graphql-codegen/typescript-resolvers": "4.4.0",
|
"@graphql-codegen/typescript-resolvers": "4.4.0",
|
||||||
"@graphql-typed-document-node/core": "^3.2.0",
|
"@graphql-typed-document-node/core": "^3.2.0",
|
||||||
"@ianvs/prettier-plugin-sort-imports": "^4.4.0",
|
"@ianvs/prettier-plugin-sort-imports": "^4.4.0",
|
||||||
"@nestjs/testing": "^10.4.7",
|
"@nestjs/testing": "^10.4.7",
|
||||||
"@originjs/vite-plugin-commonjs": "^1.0.3",
|
"@originjs/vite-plugin-commonjs": "^1.0.3",
|
||||||
"@rollup/plugin-node-resolve": "^15.3.0",
|
"@rollup/plugin-node-resolve": "^15.3.0",
|
||||||
"@types/async-exit-hook": "^2.0.2",
|
"@swc/core": "^1.10.1",
|
||||||
"@types/btoa": "^1.2.5",
|
"@types/async-exit-hook": "^2.0.2",
|
||||||
"@types/bytes": "^3.1.4",
|
"@types/btoa": "^1.2.5",
|
||||||
"@types/cli-table": "^0.3.4",
|
"@types/bytes": "^3.1.4",
|
||||||
"@types/command-exists": "^1.2.3",
|
"@types/cli-table": "^0.3.4",
|
||||||
"@types/cors": "^2.8.17",
|
"@types/command-exists": "^1.2.3",
|
||||||
"@types/dockerode": "^3.3.31",
|
"@types/cors": "^2.8.17",
|
||||||
"@types/express": "^5.0.0",
|
"@types/dockerode": "^3.3.31",
|
||||||
"@types/graphql-fields": "^1.3.9",
|
"@types/express": "^5.0.0",
|
||||||
"@types/graphql-type-uuid": "^0.2.6",
|
"@types/graphql-fields": "^1.3.9",
|
||||||
"@types/ini": "^4.1.1",
|
"@types/graphql-type-uuid": "^0.2.6",
|
||||||
"@types/ip": "^1.1.3",
|
"@types/ini": "^4.1.1",
|
||||||
"@types/lodash": "^4.17.13",
|
"@types/ip": "^1.1.3",
|
||||||
"@types/mustache": "^4.2.5",
|
"@types/lodash": "^4.17.13",
|
||||||
"@types/node": "^22.9.0",
|
"@types/mustache": "^4.2.5",
|
||||||
"@types/pidusage": "^2.0.5",
|
"@types/node": "^22.9.0",
|
||||||
"@types/pify": "^5.0.4",
|
"@types/pidusage": "^2.0.5",
|
||||||
"@types/semver": "^7.5.8",
|
"@types/pify": "^5.0.4",
|
||||||
"@types/sendmail": "^1.4.7",
|
"@types/semver": "^7.5.8",
|
||||||
"@types/stoppable": "^1.1.3",
|
"@types/sendmail": "^1.4.7",
|
||||||
"@types/strftime": "^0.9.8",
|
"@types/stoppable": "^1.1.3",
|
||||||
"@types/uuid": "^10.0.0",
|
"@types/strftime": "^0.9.8",
|
||||||
"@types/ws": "^8.5.13",
|
"@types/uuid": "^10.0.0",
|
||||||
"@types/wtfnode": "^0.7.3",
|
"@types/ws": "^8.5.13",
|
||||||
"@vitest/coverage-v8": "^2.1.4",
|
"@types/wtfnode": "^0.7.3",
|
||||||
"@vitest/ui": "^2.1.4",
|
"@vitest/coverage-v8": "^2.1.8",
|
||||||
"cz-conventional-changelog": "3.3.0",
|
"@vitest/ui": "^2.1.4",
|
||||||
"eslint": "^9.14.0",
|
"cz-conventional-changelog": "3.3.0",
|
||||||
"graphql-codegen-typescript-validation-schema": "^0.16.0",
|
"eslint": "^9.14.0",
|
||||||
"jiti": "^2.4.0",
|
"graphql-codegen-typescript-validation-schema": "^0.16.0",
|
||||||
"nodemon": "^3.1.7",
|
"jiti": "^2.4.0",
|
||||||
"rollup-plugin-node-externals": "^7.1.3",
|
"nodemon": "^3.1.7",
|
||||||
"standard-version": "^9.5.0",
|
"rollup-plugin-node-externals": "^7.1.3",
|
||||||
"typescript": "^5.6.3",
|
"standard-version": "^9.5.0",
|
||||||
"typescript-eslint": "^8.13.0",
|
"typescript": "^5.6.3",
|
||||||
"vite": "^5.4.10",
|
"typescript-eslint": "^8.13.0",
|
||||||
"vite-plugin-node": "^4.0.0",
|
"unplugin-swc": "^1.5.1",
|
||||||
"vite-plugin-static-copy": "^2.0.0",
|
"vite": "^5.4.10",
|
||||||
"vite-tsconfig-paths": "^5.1.0",
|
"vite-plugin-node": "^4.0.0",
|
||||||
"vitest": "^2.1.4",
|
"vite-plugin-static-copy": "^2.0.0",
|
||||||
"zx": "^8.2.0"
|
"vite-tsconfig-paths": "^5.1.0",
|
||||||
},
|
"vitest": "^2.1.8",
|
||||||
"optionalDependencies": {
|
"zx": "^8.2.0"
|
||||||
"@vmngr/libvirt": "github:unraid/libvirt"
|
},
|
||||||
},
|
"optionalDependencies": {
|
||||||
"overrides": {
|
"@vmngr/libvirt": "github:unraid/libvirt"
|
||||||
"eslint": {
|
},
|
||||||
"jiti": "2"
|
"overrides": {
|
||||||
|
"eslint": {
|
||||||
|
"jiti": "2"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,8 +32,9 @@ try {
|
|||||||
'.env.production',
|
'.env.production',
|
||||||
'.env.staging',
|
'.env.staging',
|
||||||
'tsconfig.json',
|
'tsconfig.json',
|
||||||
'codegen.yml',
|
'codegen.ts',
|
||||||
'ecosystem.config.json'
|
'ecosystem.config.json',
|
||||||
|
'vite.config.ts',
|
||||||
]
|
]
|
||||||
|
|
||||||
for (const file of files) {
|
for (const file of files) {
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ import { AuthActionVerb, AuthPossession, UsePermissions } from 'nest-authz';
|
|||||||
import { AppError } from '@app/core/errors/app-error';
|
import { AppError } from '@app/core/errors/app-error';
|
||||||
import { createSubscription, PUBSUB_CHANNEL } from '@app/core/pubsub';
|
import { createSubscription, PUBSUB_CHANNEL } from '@app/core/pubsub';
|
||||||
import {
|
import {
|
||||||
NotificationData,
|
type NotificationData,
|
||||||
NotificationFilter,
|
type NotificationFilter,
|
||||||
NotificationOverview,
|
type NotificationOverview,
|
||||||
NotificationType,
|
NotificationType,
|
||||||
Resource,
|
Resource,
|
||||||
} from '@app/graphql/generated/api/types';
|
} from '@app/graphql/generated/api/types';
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
|
|
||||||
import { viteCommonjs } from '@originjs/vite-plugin-commonjs';
|
import { viteCommonjs } from '@originjs/vite-plugin-commonjs';
|
||||||
import nodeResolve from '@rollup/plugin-node-resolve';
|
import nodeResolve from '@rollup/plugin-node-resolve';
|
||||||
import nodeExternals from 'rollup-plugin-node-externals';
|
import nodeExternals from 'rollup-plugin-node-externals';
|
||||||
|
import swc from 'unplugin-swc';
|
||||||
import { VitePluginNode } from 'vite-plugin-node';
|
import { VitePluginNode } from 'vite-plugin-node';
|
||||||
import { viteStaticCopy } from 'vite-plugin-static-copy';
|
import { viteStaticCopy } from 'vite-plugin-static-copy';
|
||||||
import tsconfigPaths from 'vite-tsconfig-paths';
|
import tsconfigPaths from 'vite-tsconfig-paths';
|
||||||
@@ -26,9 +28,35 @@ export default defineConfig(({ mode }) => {
|
|||||||
adapter: 'nest',
|
adapter: 'nest',
|
||||||
appPath: 'src/index.ts',
|
appPath: 'src/index.ts',
|
||||||
tsCompiler: 'swc',
|
tsCompiler: 'swc',
|
||||||
|
swcOptions: {
|
||||||
|
jsc: {
|
||||||
|
parser: {
|
||||||
|
syntax: 'typescript',
|
||||||
|
decorators: true,
|
||||||
|
},
|
||||||
|
target: 'es2024',
|
||||||
|
transform: {
|
||||||
|
legacyDecorator: true,
|
||||||
|
decoratorMetadata: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
initAppOnBoot: true,
|
initAppOnBoot: true,
|
||||||
})
|
})
|
||||||
: []),
|
: []),
|
||||||
|
swc.vite({
|
||||||
|
jsc: {
|
||||||
|
parser: {
|
||||||
|
syntax: 'typescript',
|
||||||
|
decorators: true,
|
||||||
|
},
|
||||||
|
target: 'es2024',
|
||||||
|
transform: {
|
||||||
|
legacyDecorator: true,
|
||||||
|
decoratorMetadata: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}),
|
||||||
],
|
],
|
||||||
define: {
|
define: {
|
||||||
// Allows vite to preserve process.env variables and not hardcode them
|
// Allows vite to preserve process.env variables and not hardcode them
|
||||||
@@ -43,7 +71,15 @@ export default defineConfig(({ mode }) => {
|
|||||||
'class-transformer/storage',
|
'class-transformer/storage',
|
||||||
'unicorn-magic',
|
'unicorn-magic',
|
||||||
],
|
],
|
||||||
include: ['@nestjs/common', '@nestjs/core', 'reflect-metadata', 'fastify'],
|
include: [
|
||||||
|
'@nestjs/common',
|
||||||
|
'@nestjs/core',
|
||||||
|
'@nestjs/platform-express',
|
||||||
|
'reflect-metadata',
|
||||||
|
'fastify',
|
||||||
|
'passport',
|
||||||
|
'passport-custom',
|
||||||
|
],
|
||||||
},
|
},
|
||||||
build: {
|
build: {
|
||||||
sourcemap: true,
|
sourcemap: true,
|
||||||
@@ -55,17 +91,46 @@ export default defineConfig(({ mode }) => {
|
|||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
entryFileNames: '[name].js',
|
entryFileNames: '[name].js',
|
||||||
format: 'es', // Change the format to 'es' to support top-level await
|
format: 'es',
|
||||||
|
interop: 'auto',
|
||||||
},
|
},
|
||||||
preserveEntrySignatures: 'strict',
|
preserveEntrySignatures: 'strict',
|
||||||
|
external: [
|
||||||
|
'class-validator',
|
||||||
|
'class-transformer',
|
||||||
|
/^@nestjs\/.*/,
|
||||||
|
'reflect-metadata',
|
||||||
|
'rxjs',
|
||||||
|
'fastify',
|
||||||
|
'@fastify/cors',
|
||||||
|
'@fastify/cookie',
|
||||||
|
'passport',
|
||||||
|
'passport-custom',
|
||||||
|
'passport-http-header-strategy',
|
||||||
|
'casbin',
|
||||||
|
'nest-authz',
|
||||||
|
'nest-access-control',
|
||||||
|
'@nestjs/passport',
|
||||||
|
'passport-http-header-strategy',
|
||||||
|
'accesscontrol',
|
||||||
|
],
|
||||||
},
|
},
|
||||||
modulePreload: false,
|
modulePreload: false,
|
||||||
minify: false,
|
minify: false,
|
||||||
target: 'node20',
|
target: 'node20',
|
||||||
commonjsOptions: {
|
commonjsOptions: {
|
||||||
transformMixedEsModules: true,
|
transformMixedEsModules: true,
|
||||||
include: [/node_modules/, /fastify/],
|
include: [/node_modules/, /fastify/, /reflect-metadata/],
|
||||||
exclude: ['cpu-features'],
|
exclude: [
|
||||||
|
'cpu-features',
|
||||||
|
'@nestjs',
|
||||||
|
'rxjs',
|
||||||
|
'passport',
|
||||||
|
'passport-custom',
|
||||||
|
'passport-http-header-strategy',
|
||||||
|
],
|
||||||
|
requireReturnsDefault: 'preferred',
|
||||||
|
strictRequires: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
server: {
|
server: {
|
||||||
|
|||||||
@@ -43,17 +43,34 @@ export type AccessUrlInput = {
|
|||||||
type: URL_TYPE;
|
type: URL_TYPE;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type AddPermissionInput = {
|
||||||
|
action: Scalars['String']['input'];
|
||||||
|
possession: Scalars['String']['input'];
|
||||||
|
resource: Resource;
|
||||||
|
role: Role;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type AddRoleForApiKeyInput = {
|
||||||
|
apiKeyId: Scalars['ID']['input'];
|
||||||
|
role: Role;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type AddRoleForUserInput = {
|
||||||
|
role: Role;
|
||||||
|
userId: Scalars['ID']['input'];
|
||||||
|
};
|
||||||
|
|
||||||
export type AllowedOriginInput = {
|
export type AllowedOriginInput = {
|
||||||
origins: Array<Scalars['String']['input']>;
|
origins: Array<Scalars['String']['input']>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type ApiKey = {
|
export type ApiKey = {
|
||||||
__typename?: 'ApiKey';
|
__typename?: 'ApiKey';
|
||||||
|
createdAt: Scalars['DateTime']['output'];
|
||||||
description?: Maybe<Scalars['String']['output']>;
|
description?: Maybe<Scalars['String']['output']>;
|
||||||
expiresAt: Scalars['Long']['output'];
|
id: Scalars['ID']['output'];
|
||||||
key: Scalars['String']['output'];
|
|
||||||
name: Scalars['String']['output'];
|
name: Scalars['String']['output'];
|
||||||
scopes: Scalars['JSON']['output'];
|
roles: Array<Role>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type ApiKeyResponse = {
|
export type ApiKeyResponse = {
|
||||||
@@ -62,6 +79,16 @@ export type ApiKeyResponse = {
|
|||||||
valid: Scalars['Boolean']['output'];
|
valid: Scalars['Boolean']['output'];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type ApiKeyWithSecret = {
|
||||||
|
__typename?: 'ApiKeyWithSecret';
|
||||||
|
createdAt: Scalars['DateTime']['output'];
|
||||||
|
description?: Maybe<Scalars['String']['output']>;
|
||||||
|
id: Scalars['ID']['output'];
|
||||||
|
key: Scalars['String']['output'];
|
||||||
|
name: Scalars['String']['output'];
|
||||||
|
roles: Array<Role>;
|
||||||
|
};
|
||||||
|
|
||||||
export type ArrayType = Node & {
|
export type ArrayType = Node & {
|
||||||
__typename?: 'Array';
|
__typename?: 'Array';
|
||||||
/** Current boot disk */
|
/** Current boot disk */
|
||||||
@@ -322,6 +349,12 @@ export enum ContainerState {
|
|||||||
Running = 'RUNNING'
|
Running = 'RUNNING'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type CreateApiKeyInput = {
|
||||||
|
description?: InputMaybe<Scalars['String']['input']>;
|
||||||
|
name: Scalars['String']['input'];
|
||||||
|
roles: Array<Role>;
|
||||||
|
};
|
||||||
|
|
||||||
export type Devices = {
|
export type Devices = {
|
||||||
__typename?: 'Devices';
|
__typename?: 'Devices';
|
||||||
gpu?: Maybe<Array<Maybe<Gpu>>>;
|
gpu?: Maybe<Array<Maybe<Gpu>>>;
|
||||||
@@ -567,7 +600,7 @@ export type Me = UserAccount & {
|
|||||||
id: Scalars['ID']['output'];
|
id: Scalars['ID']['output'];
|
||||||
name: Scalars['String']['output'];
|
name: Scalars['String']['output'];
|
||||||
permissions?: Maybe<Scalars['JSON']['output']>;
|
permissions?: Maybe<Scalars['JSON']['output']>;
|
||||||
roles: Scalars['String']['output'];
|
roles: Array<Role>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export enum MemoryFormFactor {
|
export enum MemoryFormFactor {
|
||||||
@@ -620,10 +653,11 @@ export type Mount = {
|
|||||||
|
|
||||||
export type Mutation = {
|
export type Mutation = {
|
||||||
__typename?: 'Mutation';
|
__typename?: 'Mutation';
|
||||||
/** Create a new API key */
|
|
||||||
addApikey?: Maybe<ApiKey>;
|
|
||||||
/** Add new disk to array */
|
/** Add new disk to array */
|
||||||
addDiskToArray?: Maybe<ArrayType>;
|
addDiskToArray?: Maybe<ArrayType>;
|
||||||
|
addPermission: Scalars['Boolean']['output'];
|
||||||
|
addRoleForApiKey: Scalars['Boolean']['output'];
|
||||||
|
addRoleForUser: Scalars['Boolean']['output'];
|
||||||
/** Add a new user */
|
/** Add a new user */
|
||||||
addUser?: Maybe<User>;
|
addUser?: Maybe<User>;
|
||||||
archiveAll: NotificationOverview;
|
archiveAll: NotificationOverview;
|
||||||
@@ -635,6 +669,7 @@ export type Mutation = {
|
|||||||
clearArrayDiskStatistics?: Maybe<Scalars['JSON']['output']>;
|
clearArrayDiskStatistics?: Maybe<Scalars['JSON']['output']>;
|
||||||
connectSignIn: Scalars['Boolean']['output'];
|
connectSignIn: Scalars['Boolean']['output'];
|
||||||
connectSignOut: Scalars['Boolean']['output'];
|
connectSignOut: Scalars['Boolean']['output'];
|
||||||
|
createApiKey: ApiKeyWithSecret;
|
||||||
createNotification: Notification;
|
createNotification: Notification;
|
||||||
/** Deletes all archived notifications on server. */
|
/** Deletes all archived notifications on server. */
|
||||||
deleteArchivedNotifications: NotificationOverview;
|
deleteArchivedNotifications: NotificationOverview;
|
||||||
@@ -642,8 +677,6 @@ export type Mutation = {
|
|||||||
/** Delete a user */
|
/** Delete a user */
|
||||||
deleteUser?: Maybe<User>;
|
deleteUser?: Maybe<User>;
|
||||||
enableDynamicRemoteAccess: Scalars['Boolean']['output'];
|
enableDynamicRemoteAccess: Scalars['Boolean']['output'];
|
||||||
/** Get an existing API key */
|
|
||||||
getApiKey?: Maybe<ApiKey>;
|
|
||||||
login?: Maybe<Scalars['String']['output']>;
|
login?: Maybe<Scalars['String']['output']>;
|
||||||
mountArrayDisk?: Maybe<Disk>;
|
mountArrayDisk?: Maybe<Disk>;
|
||||||
/** Pause parity check */
|
/** Pause parity check */
|
||||||
@@ -653,6 +686,7 @@ export type Mutation = {
|
|||||||
recalculateOverview: NotificationOverview;
|
recalculateOverview: NotificationOverview;
|
||||||
/** Remove existing disk from array. NOTE: The array must be stopped before running this otherwise it'll throw an error. */
|
/** Remove existing disk from array. NOTE: The array must be stopped before running this otherwise it'll throw an error. */
|
||||||
removeDiskFromArray?: Maybe<ArrayType>;
|
removeDiskFromArray?: Maybe<ArrayType>;
|
||||||
|
removeRoleFromApiKey: Scalars['Boolean']['output'];
|
||||||
/** Resume parity check */
|
/** Resume parity check */
|
||||||
resumeParityCheck?: Maybe<Scalars['JSON']['output']>;
|
resumeParityCheck?: Maybe<Scalars['JSON']['output']>;
|
||||||
setAdditionalAllowedOrigins: Array<Scalars['String']['output']>;
|
setAdditionalAllowedOrigins: Array<Scalars['String']['output']>;
|
||||||
@@ -669,14 +703,6 @@ export type Mutation = {
|
|||||||
unmountArrayDisk?: Maybe<Disk>;
|
unmountArrayDisk?: Maybe<Disk>;
|
||||||
/** Marks a notification as unread. */
|
/** Marks a notification as unread. */
|
||||||
unreadNotification: Notification;
|
unreadNotification: Notification;
|
||||||
/** Update an existing API key */
|
|
||||||
updateApikey?: Maybe<ApiKey>;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
export type MutationaddApikeyArgs = {
|
|
||||||
input?: InputMaybe<updateApikeyInput>;
|
|
||||||
name: Scalars['String']['input'];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -685,6 +711,21 @@ export type MutationaddDiskToArrayArgs = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
export type MutationaddPermissionArgs = {
|
||||||
|
input: AddPermissionInput;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
export type MutationaddRoleForApiKeyArgs = {
|
||||||
|
input: AddRoleForApiKeyInput;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
export type MutationaddRoleForUserArgs = {
|
||||||
|
input: AddRoleForUserInput;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
export type MutationaddUserArgs = {
|
export type MutationaddUserArgs = {
|
||||||
input: addUserInput;
|
input: addUserInput;
|
||||||
};
|
};
|
||||||
@@ -715,6 +756,11 @@ export type MutationconnectSignInArgs = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
export type MutationcreateApiKeyArgs = {
|
||||||
|
input: CreateApiKeyInput;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
export type MutationcreateNotificationArgs = {
|
export type MutationcreateNotificationArgs = {
|
||||||
input: NotificationData;
|
input: NotificationData;
|
||||||
};
|
};
|
||||||
@@ -736,12 +782,6 @@ export type MutationenableDynamicRemoteAccessArgs = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
export type MutationgetApiKeyArgs = {
|
|
||||||
input?: InputMaybe<authenticateInput>;
|
|
||||||
name: Scalars['String']['input'];
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
export type MutationloginArgs = {
|
export type MutationloginArgs = {
|
||||||
password: Scalars['String']['input'];
|
password: Scalars['String']['input'];
|
||||||
username: Scalars['String']['input'];
|
username: Scalars['String']['input'];
|
||||||
@@ -758,6 +798,11 @@ export type MutationremoveDiskFromArrayArgs = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
export type MutationremoveRoleFromApiKeyArgs = {
|
||||||
|
input: RemoveRoleFromApiKeyInput;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
export type MutationsetAdditionalAllowedOriginsArgs = {
|
export type MutationsetAdditionalAllowedOriginsArgs = {
|
||||||
input: AllowedOriginInput;
|
input: AllowedOriginInput;
|
||||||
};
|
};
|
||||||
@@ -792,12 +837,6 @@ export type MutationunreadNotificationArgs = {
|
|||||||
id: Scalars['String']['input'];
|
id: Scalars['String']['input'];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
export type MutationupdateApikeyArgs = {
|
|
||||||
input?: InputMaybe<updateApikeyInput>;
|
|
||||||
name: Scalars['String']['input'];
|
|
||||||
};
|
|
||||||
|
|
||||||
export type Network = Node & {
|
export type Network = Node & {
|
||||||
__typename?: 'Network';
|
__typename?: 'Network';
|
||||||
accessUrls?: Maybe<Array<AccessUrl>>;
|
accessUrls?: Maybe<Array<AccessUrl>>;
|
||||||
@@ -999,8 +1038,8 @@ export type ProfileModel = {
|
|||||||
|
|
||||||
export type Query = {
|
export type Query = {
|
||||||
__typename?: 'Query';
|
__typename?: 'Query';
|
||||||
/** Get all API keys */
|
apiKey?: Maybe<ApiKey>;
|
||||||
apiKeys?: Maybe<Array<Maybe<ApiKey>>>;
|
apiKeys: Array<ApiKey>;
|
||||||
/** An Unraid array consisting of 1 or 2 Parity disks and a number of Data disks. */
|
/** An Unraid array consisting of 1 or 2 Parity disks and a number of Data disks. */
|
||||||
array: ArrayType;
|
array: ArrayType;
|
||||||
cloud?: Maybe<Cloud>;
|
cloud?: Maybe<Cloud>;
|
||||||
@@ -1046,6 +1085,11 @@ export type Query = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
export type QueryapiKeyArgs = {
|
||||||
|
id: Scalars['ID']['input'];
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
export type QuerydiskArgs = {
|
export type QuerydiskArgs = {
|
||||||
id: Scalars['ID']['input'];
|
id: Scalars['ID']['input'];
|
||||||
};
|
};
|
||||||
@@ -1140,6 +1184,52 @@ export type RemoteAccess = {
|
|||||||
port?: Maybe<Scalars['Port']['output']>;
|
port?: Maybe<Scalars['Port']['output']>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type RemoveRoleFromApiKeyInput = {
|
||||||
|
apiKeyId: Scalars['ID']['input'];
|
||||||
|
role: Role;
|
||||||
|
};
|
||||||
|
|
||||||
|
/** Available resources for permissions */
|
||||||
|
export enum Resource {
|
||||||
|
ApiKey = 'api_key',
|
||||||
|
Array = 'array',
|
||||||
|
Cloud = 'cloud',
|
||||||
|
Config = 'config',
|
||||||
|
Connect = 'connect',
|
||||||
|
CrashReportingEnabled = 'crash_reporting_enabled',
|
||||||
|
Customizations = 'customizations',
|
||||||
|
Dashboard = 'dashboard',
|
||||||
|
Disk = 'disk',
|
||||||
|
Display = 'display',
|
||||||
|
Docker = 'docker',
|
||||||
|
Flash = 'flash',
|
||||||
|
Info = 'info',
|
||||||
|
Logs = 'logs',
|
||||||
|
Me = 'me',
|
||||||
|
Network = 'network',
|
||||||
|
Notifications = 'notifications',
|
||||||
|
Online = 'online',
|
||||||
|
Os = 'os',
|
||||||
|
Owner = 'owner',
|
||||||
|
Permission = 'permission',
|
||||||
|
Registration = 'registration',
|
||||||
|
Servers = 'servers',
|
||||||
|
Services = 'services',
|
||||||
|
Share = 'share',
|
||||||
|
Vars = 'vars',
|
||||||
|
Vms = 'vms',
|
||||||
|
Welcome = 'welcome'
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Available roles for API keys and users */
|
||||||
|
export enum Role {
|
||||||
|
Admin = 'admin',
|
||||||
|
Guest = 'guest',
|
||||||
|
MyServers = 'my_servers',
|
||||||
|
Notifier = 'notifier',
|
||||||
|
Upc = 'upc'
|
||||||
|
}
|
||||||
|
|
||||||
export type Server = {
|
export type Server = {
|
||||||
__typename?: 'Server';
|
__typename?: 'Server';
|
||||||
apikey: Scalars['String']['output'];
|
apikey: Scalars['String']['output'];
|
||||||
@@ -1203,7 +1293,6 @@ export type Share = {
|
|||||||
|
|
||||||
export type Subscription = {
|
export type Subscription = {
|
||||||
__typename?: 'Subscription';
|
__typename?: 'Subscription';
|
||||||
apikeys?: Maybe<Array<Maybe<ApiKey>>>;
|
|
||||||
array: ArrayType;
|
array: ArrayType;
|
||||||
config: Config;
|
config: Config;
|
||||||
display?: Maybe<Display>;
|
display?: Maybe<Display>;
|
||||||
@@ -1361,14 +1450,14 @@ export type User = UserAccount & {
|
|||||||
name: Scalars['String']['output'];
|
name: Scalars['String']['output'];
|
||||||
/** If the account has a password set */
|
/** If the account has a password set */
|
||||||
password?: Maybe<Scalars['Boolean']['output']>;
|
password?: Maybe<Scalars['Boolean']['output']>;
|
||||||
roles: Scalars['String']['output'];
|
roles: Array<Role>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type UserAccount = {
|
export type UserAccount = {
|
||||||
description: Scalars['String']['output'];
|
description: Scalars['String']['output'];
|
||||||
id: Scalars['ID']['output'];
|
id: Scalars['ID']['output'];
|
||||||
name: Scalars['String']['output'];
|
name: Scalars['String']['output'];
|
||||||
roles: Scalars['String']['output'];
|
roles: Array<Role>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type Vars = Node & {
|
export type Vars = Node & {
|
||||||
@@ -1607,12 +1696,6 @@ export type Welcome = {
|
|||||||
message: Scalars['String']['output'];
|
message: Scalars['String']['output'];
|
||||||
};
|
};
|
||||||
|
|
||||||
export type addApiKeyInput = {
|
|
||||||
key?: InputMaybe<Scalars['String']['input']>;
|
|
||||||
name?: InputMaybe<Scalars['String']['input']>;
|
|
||||||
userId?: InputMaybe<Scalars['String']['input']>;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type addUserInput = {
|
export type addUserInput = {
|
||||||
description?: InputMaybe<Scalars['String']['input']>;
|
description?: InputMaybe<Scalars['String']['input']>;
|
||||||
name: Scalars['String']['input'];
|
name: Scalars['String']['input'];
|
||||||
@@ -1626,10 +1709,6 @@ export type arrayDiskInput = {
|
|||||||
slot?: InputMaybe<Scalars['Int']['input']>;
|
slot?: InputMaybe<Scalars['Int']['input']>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type authenticateInput = {
|
|
||||||
password: Scalars['String']['input'];
|
|
||||||
};
|
|
||||||
|
|
||||||
export type deleteUserInput = {
|
export type deleteUserInput = {
|
||||||
name: Scalars['String']['input'];
|
name: Scalars['String']['input'];
|
||||||
};
|
};
|
||||||
@@ -1650,11 +1729,6 @@ export enum registrationType {
|
|||||||
Unleashed = 'UNLEASHED'
|
Unleashed = 'UNLEASHED'
|
||||||
}
|
}
|
||||||
|
|
||||||
export type updateApikeyInput = {
|
|
||||||
description?: InputMaybe<Scalars['String']['input']>;
|
|
||||||
expiresAt: Scalars['Long']['input'];
|
|
||||||
};
|
|
||||||
|
|
||||||
export type usersInput = {
|
export type usersInput = {
|
||||||
slim?: InputMaybe<Scalars['Boolean']['input']>;
|
slim?: InputMaybe<Scalars['Boolean']['input']>;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user