mirror of
https://github.com/harivansh-afk/betterNAS.git
synced 2026-04-21 17:00:45 +00:00
skeleton schemas
This commit is contained in:
parent
0032487ca1
commit
4f174ec3a8
9 changed files with 470 additions and 42 deletions
30
packages/contracts/schemas/cloud-profile.schema.json
Normal file
30
packages/contracts/schemas/cloud-profile.schema.json
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://betternas.local/schemas/cloud-profile.schema.json",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"id",
|
||||
"exportId",
|
||||
"provider",
|
||||
"baseUrl",
|
||||
"path"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"exportId": {
|
||||
"type": "string"
|
||||
},
|
||||
"provider": {
|
||||
"const": "nextcloud"
|
||||
},
|
||||
"baseUrl": {
|
||||
"type": "string"
|
||||
},
|
||||
"path": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
41
packages/contracts/schemas/mount-profile.schema.json
Normal file
41
packages/contracts/schemas/mount-profile.schema.json
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://betternas.local/schemas/mount-profile.schema.json",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"id",
|
||||
"exportId",
|
||||
"protocol",
|
||||
"displayName",
|
||||
"mountUrl",
|
||||
"readonly",
|
||||
"credentialMode"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"exportId": {
|
||||
"type": "string"
|
||||
},
|
||||
"protocol": {
|
||||
"const": "webdav"
|
||||
},
|
||||
"displayName": {
|
||||
"type": "string"
|
||||
},
|
||||
"mountUrl": {
|
||||
"type": "string"
|
||||
},
|
||||
"readonly": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"credentialMode": {
|
||||
"enum": [
|
||||
"session-token",
|
||||
"app-password"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
52
packages/contracts/schemas/nas-node.schema.json
Normal file
52
packages/contracts/schemas/nas-node.schema.json
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://betternas.local/schemas/nas-node.schema.json",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"id",
|
||||
"machineId",
|
||||
"displayName",
|
||||
"agentVersion",
|
||||
"status",
|
||||
"lastSeenAt",
|
||||
"directAddress",
|
||||
"relayAddress"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"machineId": {
|
||||
"type": "string"
|
||||
},
|
||||
"displayName": {
|
||||
"type": "string"
|
||||
},
|
||||
"agentVersion": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"enum": [
|
||||
"online",
|
||||
"offline",
|
||||
"degraded"
|
||||
]
|
||||
},
|
||||
"lastSeenAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"directAddress": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"relayAddress": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
47
packages/contracts/schemas/storage-export.schema.json
Normal file
47
packages/contracts/schemas/storage-export.schema.json
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://betternas.local/schemas/storage-export.schema.json",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"id",
|
||||
"nasNodeId",
|
||||
"label",
|
||||
"path",
|
||||
"protocols",
|
||||
"capacityBytes",
|
||||
"tags"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"nasNodeId": {
|
||||
"type": "string"
|
||||
},
|
||||
"label": {
|
||||
"type": "string"
|
||||
},
|
||||
"path": {
|
||||
"type": "string"
|
||||
},
|
||||
"protocols": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"const": "webdav"
|
||||
}
|
||||
},
|
||||
"capacityBytes": {
|
||||
"type": [
|
||||
"number",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"tags": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue