apollo/config/config.schema.js

110 lines
2.1 KiB
JavaScript

const schema = {
type: 'object',
required: [],
properties: {
plex: {
type: 'object',
required: ['url', 'token'],
properties: {
url: {
type: 'string'
},
token: {
type: 'string'
},
filters: {
type: 'array',
minItems: 0,
items: {
type: 'object',
properties: {
library: {
type: 'array',
items: {
type: 'string'
},
minItems: 0,
},
ip: {
type: 'array',
items: {
type: 'string'
},
minItems: 0,
},
deviceId: {
type: 'array',
items: {
type: 'string'
},
minItems: 0,
},
platform: {
type: 'array',
items: {
type: 'string'
},
minItems: 0,
},
product: {
type: 'array',
items: {
type: 'string'
},
minItems: 0,
},
}
}
}
}
},
scrobble: {
type: 'object',
properties: {
minimum: {
type: 'object',
properties: {
percent: {
type: 'number'
},
duration: {
type: 'number'
}
}
}
}
},
spotify: {
type: 'object',
required: ['client_id', 'client_secret', 'redirect_uri'],
properties: {
client_id: {
type: 'string'
},
client_secret: {
type: 'string'
},
redirect_uri: {
type: 'string'
}
}
},
web: {
type: 'object',
required: [],
properties: {
host: {
type: 'string'
},
port: {
type: 'number'
}
}
}
}
}
module.exports = schema;