mirror of
https://github.com/cpvalente/ontime.git
synced 2026-09-10 08:39:34 +00:00
change some naming
This commit is contained in:
@@ -3,14 +3,14 @@ import {
|
|||||||
Alias,
|
Alias,
|
||||||
DatabaseModel,
|
DatabaseModel,
|
||||||
GetInfo,
|
GetInfo,
|
||||||
GoogleSheet,
|
|
||||||
GoogleSheetState,
|
|
||||||
HttpSettings,
|
HttpSettings,
|
||||||
OntimeRundown,
|
OntimeRundown,
|
||||||
OSCSettings,
|
OSCSettings,
|
||||||
OscSubscription,
|
OscSubscription,
|
||||||
ProjectData,
|
ProjectData,
|
||||||
Settings,
|
Settings,
|
||||||
|
Sheet,
|
||||||
|
SheetState,
|
||||||
UserFields,
|
UserFields,
|
||||||
ViewSettings,
|
ViewSettings,
|
||||||
} from 'ontime-types';
|
} from 'ontime-types';
|
||||||
@@ -281,28 +281,28 @@ export const postPushSheet = async () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description HTTP request to retrieve google sheets settings
|
* @description HTTP request to retrieve sheets settings
|
||||||
* @return {Promise}
|
* @return {Promise}
|
||||||
*/
|
*/
|
||||||
export async function getSheetSettings(): Promise<GoogleSheet> {
|
export async function getSheetSettings(): Promise<Sheet> {
|
||||||
const res = await axios.get(`${ontimeURL}/sheet-settings`);
|
const res = await axios.get(`${ontimeURL}/sheet-settings`);
|
||||||
return res.data;
|
return res.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description HTTP request to mutate google sheets settings
|
* @description HTTP request to mutate sheets settings
|
||||||
* @return {Promise}
|
* @return {Promise}
|
||||||
*/
|
*/
|
||||||
export async function postSheetSettings(data: GoogleSheet): Promise<GoogleSheet> {
|
export async function postSheetSettings(data: Sheet): Promise<Sheet> {
|
||||||
const res = await axios.post(`${ontimeURL}/sheet-settings`, data);
|
const res = await axios.post(`${ontimeURL}/sheet-settings`, data);
|
||||||
return res.data;
|
return res.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description HTTP request to retrieve google sheets state
|
* @description HTTP request to retrieve sheets state
|
||||||
* @return {Promise}
|
* @return {Promise}
|
||||||
*/
|
*/
|
||||||
export async function getSheetState(): Promise<GoogleSheetState> {
|
export async function getSheetState(): Promise<SheetState> {
|
||||||
const res = await axios.get(`${ontimeURL}/sheet-state`);
|
const res = await axios.get(`${ontimeURL}/sheet-state`);
|
||||||
return res.data;
|
return res.data;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
UserFields,
|
UserFields,
|
||||||
Alias,
|
Alias,
|
||||||
Settings,
|
Settings,
|
||||||
GoogleSheet,
|
Sheet,
|
||||||
} from 'ontime-types';
|
} from 'ontime-types';
|
||||||
|
|
||||||
import { data, db } from '../../modules/loadDb.js';
|
import { data, db } from '../../modules/loadDb.js';
|
||||||
@@ -59,12 +59,12 @@ export class DataProvider {
|
|||||||
await this.persist();
|
await this.persist();
|
||||||
}
|
}
|
||||||
|
|
||||||
static getGoogleSheet() {
|
static getSheet() {
|
||||||
return data.googleSheet;
|
return data.sheet;
|
||||||
}
|
}
|
||||||
|
|
||||||
static async setGoogleSheet(newData: GoogleSheet) {
|
static async setSheet(newData: Sheet) {
|
||||||
data.googleSheet = { ...newData };
|
data.sheet = { ...newData };
|
||||||
await this.persist();
|
await this.persist();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,13 +6,13 @@ import { DatabaseModel } from 'ontime-types';
|
|||||||
* @param {object} newData
|
* @param {object} newData
|
||||||
*/
|
*/
|
||||||
export function safeMerge(existing: DatabaseModel, newData: Partial<DatabaseModel>) {
|
export function safeMerge(existing: DatabaseModel, newData: Partial<DatabaseModel>) {
|
||||||
const { rundown, project, settings, googleSheet, viewSettings, osc, aliases, userFields } = newData || {};
|
const { rundown, project, settings, sheet, viewSettings, osc, aliases, userFields } = newData || {};
|
||||||
return {
|
return {
|
||||||
...existing,
|
...existing,
|
||||||
rundown: rundown ?? existing.rundown,
|
rundown: rundown ?? existing.rundown,
|
||||||
project: { ...existing.project, ...project },
|
project: { ...existing.project, ...project },
|
||||||
settings: { ...existing.settings, ...settings },
|
settings: { ...existing.settings, ...settings },
|
||||||
googleSheet: { ...existing.googleSheet, ...googleSheet },
|
sheet: { ...existing.sheet, ...sheet },
|
||||||
viewSettings: { ...existing.viewSettings, ...viewSettings },
|
viewSettings: { ...existing.viewSettings, ...viewSettings },
|
||||||
aliases: aliases ?? existing.aliases,
|
aliases: aliases ?? existing.aliases,
|
||||||
userFields: {
|
userFields: {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Alias, DatabaseModel, GoogleSheet, OntimeRundown, Settings } from 'ontime-types';
|
import { Alias, DatabaseModel, Sheet, OntimeRundown, Settings } from 'ontime-types';
|
||||||
import { safeMerge } from '../DataProvider.utils.js';
|
import { safeMerge } from '../DataProvider.utils.js';
|
||||||
|
|
||||||
describe('safeMerge', () => {
|
describe('safeMerge', () => {
|
||||||
@@ -21,7 +21,7 @@ describe('safeMerge', () => {
|
|||||||
timeFormat: '24',
|
timeFormat: '24',
|
||||||
language: 'en',
|
language: 'en',
|
||||||
},
|
},
|
||||||
googleSheet: {
|
sheet: {
|
||||||
worksheet: '1',
|
worksheet: '1',
|
||||||
id: '2',
|
id: '2',
|
||||||
},
|
},
|
||||||
@@ -102,15 +102,15 @@ describe('safeMerge', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('merges the google sheet key', () => {
|
it('merges the sheet key', () => {
|
||||||
const newData = {
|
const newData = {
|
||||||
googleSheet: {
|
sheet: {
|
||||||
id: '4',
|
id: '4',
|
||||||
worksheet: '5',
|
worksheet: '5',
|
||||||
} as GoogleSheet,
|
} as Sheet,
|
||||||
};
|
};
|
||||||
const mergedData = safeMerge(existing, newData);
|
const mergedData = safeMerge(existing, newData);
|
||||||
expect(mergedData.googleSheet).toEqual({
|
expect(mergedData.sheet).toEqual({
|
||||||
id: '4',
|
id: '4',
|
||||||
worksheet: '5',
|
worksheet: '5',
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -488,7 +488,7 @@ export async function pushSheet(req, res) {
|
|||||||
* uploads Client secrets file
|
* uploads Client secrets file
|
||||||
* @returns parsed result
|
* @returns parsed result
|
||||||
*/
|
*/
|
||||||
export async function uploadGoogleSheetClientFile(req, res) {
|
export async function uploadSheetClientFile(req, res) {
|
||||||
if (!req.file.path) {
|
if (!req.file.path) {
|
||||||
res.status(400).send({ message: 'File not found' });
|
res.status(400).send({ message: 'File not found' });
|
||||||
return;
|
return;
|
||||||
@@ -520,11 +520,11 @@ export async function sheetAuthUrl(req, res) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description Get google sheet Settings
|
* @description Get s sheet Settings
|
||||||
* @method GET
|
* @method GET
|
||||||
*/
|
*/
|
||||||
export const getGoogleSheetSettings = async (req, res) => {
|
export const getSheetSettings = async (req, res) => {
|
||||||
const sheet = await DataProvider.getGoogleSheet();
|
const sheet = await DataProvider.getSheet();
|
||||||
res.status(200).send(sheet);
|
res.status(200).send(sheet);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -532,7 +532,7 @@ export const getGoogleSheetSettings = async (req, res) => {
|
|||||||
* @description Change view Settings
|
* @description Change view Settings
|
||||||
* @method POST
|
* @method POST
|
||||||
*/
|
*/
|
||||||
export const postGoogleSheetSettings = async (req, res) => {
|
export const postSheetSettings = async (req, res) => {
|
||||||
if (failEmptyObjects(req.body, res)) {
|
if (failEmptyObjects(req.body, res)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -542,7 +542,7 @@ export const postGoogleSheetSettings = async (req, res) => {
|
|||||||
id: req.body.id,
|
id: req.body.id,
|
||||||
worksheet: req.body.worksheet,
|
worksheet: req.body.worksheet,
|
||||||
};
|
};
|
||||||
await DataProvider.setGoogleSheet(newData);
|
await DataProvider.setSheet(newData);
|
||||||
res.status(200).send(newData);
|
res.status(200).send(newData);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
res.status(400).send({ message: error.toString() });
|
res.status(400).send({ message: error.toString() });
|
||||||
@@ -550,9 +550,9 @@ export const postGoogleSheetSettings = async (req, res) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description Get google sheet state
|
* @description Get sheet state
|
||||||
* @method GET
|
* @method GET
|
||||||
*/
|
*/
|
||||||
export const getGoogleSheetState = async (req, res) => {
|
export const getSheetState = async (req, res) => {
|
||||||
res.status(200).send(await Sheet.getSheetState());
|
res.status(200).send(await Sheet.getSheetState());
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ export const validateSheetPreview = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
export const validateGoogleSheetSettings = [
|
export const validateSheetSettings = [
|
||||||
body('id').isString().optional({ nullable: false }),
|
body('id').isString().optional({ nullable: false }),
|
||||||
body('worksheet').isString().optional({ nullable: false }),
|
body('worksheet').isString().optional({ nullable: false }),
|
||||||
(req, res, next) => {
|
(req, res, next) => {
|
||||||
|
|||||||
@@ -20,9 +20,9 @@ export const dbModel: DatabaseModel = {
|
|||||||
timeFormat: '24',
|
timeFormat: '24',
|
||||||
language: 'en',
|
language: 'en',
|
||||||
},
|
},
|
||||||
googleSheet: {
|
sheet: {
|
||||||
worksheet: '',
|
|
||||||
id: '',
|
id: '',
|
||||||
|
worksheet: '',
|
||||||
},
|
},
|
||||||
viewSettings: {
|
viewSettings: {
|
||||||
overrideStyles: false,
|
overrideStyles: false,
|
||||||
|
|||||||
@@ -22,17 +22,17 @@ import {
|
|||||||
previewExcel,
|
previewExcel,
|
||||||
postHTTP,
|
postHTTP,
|
||||||
sheetAuthUrl,
|
sheetAuthUrl,
|
||||||
uploadGoogleSheetClientFile,
|
uploadSheetClientFile,
|
||||||
previewSheet,
|
previewSheet,
|
||||||
pushSheet,
|
pushSheet,
|
||||||
getGoogleSheetSettings,
|
getSheetSettings,
|
||||||
postGoogleSheetSettings,
|
postSheetSettings,
|
||||||
getGoogleSheetState,
|
getSheetState,
|
||||||
} from '../controllers/ontimeController.js';
|
} from '../controllers/ontimeController.js';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
validateAliases,
|
validateAliases,
|
||||||
validateGoogleSheetSettings,
|
validateSheetSettings,
|
||||||
validateOSC,
|
validateOSC,
|
||||||
validatePatchProjectFile,
|
validatePatchProjectFile,
|
||||||
validateSettings,
|
validateSettings,
|
||||||
@@ -107,7 +107,7 @@ router.post('/http', validateHTTP, postHTTP);
|
|||||||
router.post('/new', projectSanitiser, postNew);
|
router.post('/new', projectSanitiser, postNew);
|
||||||
|
|
||||||
// create route between controller and '/ontime/sheet-client' endpoint
|
// create route between controller and '/ontime/sheet-client' endpoint
|
||||||
router.post('/sheet-clientsecrect', uploadFile, uploadGoogleSheetClientFile);
|
router.post('/sheet-clientsecrect', uploadFile, uploadSheetClientFile);
|
||||||
|
|
||||||
// create route between controller and '/ontime/sheet-authstatus' endpoint
|
// create route between controller and '/ontime/sheet-authstatus' endpoint
|
||||||
router.get('/sheet-authurl', sheetAuthUrl);
|
router.get('/sheet-authurl', sheetAuthUrl);
|
||||||
@@ -119,10 +119,10 @@ router.post('/sheet-preview', validateSheetPreview, previewSheet);
|
|||||||
router.post('/sheet-push', pushSheet);
|
router.post('/sheet-push', pushSheet);
|
||||||
|
|
||||||
// create route between controller and '/ontime/sheet-settings' endpoint
|
// create route between controller and '/ontime/sheet-settings' endpoint
|
||||||
router.get('/sheet-settings', getGoogleSheetSettings);
|
router.get('/sheet-settings', getSheetSettings);
|
||||||
|
|
||||||
// create route between controller and '/ontime/sheet-settings' endpoint
|
// create route between controller and '/ontime/sheet-settings' endpoint
|
||||||
router.post('/sheet-settings', validateGoogleSheetSettings, postGoogleSheetSettings);
|
router.post('/sheet-settings', validateSheetSettings, postSheetSettings);
|
||||||
|
|
||||||
// create route between controller and '/ontime/sheet-state' endpoint
|
// create route between controller and '/ontime/sheet-state' endpoint
|
||||||
router.get('/sheet-state', getGoogleSheetState);
|
router.get('/sheet-state', getSheetState);
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
import { millisToString } from 'ontime-utils';
|
import { millisToString } from 'ontime-utils';
|
||||||
import { getA1Notation, cellRequenstFromEvent, cellRequenstFromProjectData } from '../googleSheetUtils.js';
|
import { getA1Notation, cellRequenstFromEvent, cellRequenstFromProjectData } from '../sheetUtils.js';
|
||||||
import { EndAction, OntimeRundownEntry, ProjectData, SupportedEvent, TimerType } from 'ontime-types';
|
import { EndAction, OntimeRundownEntry, ProjectData, SupportedEvent, TimerType } from 'ontime-types';
|
||||||
|
|
||||||
describe('getA1Notation()', () => {
|
describe('getA1Notation()', () => {
|
||||||
@@ -34,7 +34,7 @@ import {
|
|||||||
parseSettings,
|
parseSettings,
|
||||||
parseUserFields,
|
parseUserFields,
|
||||||
parseViewSettings,
|
parseViewSettings,
|
||||||
parseGoogleSheet,
|
parseSheet,
|
||||||
} from './parserFunctions.js';
|
} from './parserFunctions.js';
|
||||||
import { parseExcelDate } from './time.js';
|
import { parseExcelDate } from './time.js';
|
||||||
import { coerceBoolean } from './coerceType.js';
|
import { coerceBoolean } from './coerceType.js';
|
||||||
@@ -371,8 +371,8 @@ export const parseJson = async (jsonData): Promise<DatabaseModel | null> => {
|
|||||||
returnData.osc = parseOsc(jsonData) ?? dbModel.osc;
|
returnData.osc = parseOsc(jsonData) ?? dbModel.osc;
|
||||||
// Import HTTP settings if any
|
// Import HTTP settings if any
|
||||||
returnData.http = parseHttp(jsonData) ?? dbModel.http;
|
returnData.http = parseHttp(jsonData) ?? dbModel.http;
|
||||||
// Import GoogleSheet settings if any
|
// Import Sheet settings if any
|
||||||
returnData.googleSheet = parseGoogleSheet(jsonData, true);
|
returnData.sheet = parseSheet(jsonData, true);
|
||||||
|
|
||||||
return returnData as DatabaseModel;
|
return returnData as DatabaseModel;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { generateId } from 'ontime-utils';
|
import { generateId } from 'ontime-utils';
|
||||||
import {
|
import {
|
||||||
Alias,
|
Alias,
|
||||||
GoogleSheet,
|
Sheet,
|
||||||
OntimeRundown,
|
OntimeRundown,
|
||||||
HttpSettings,
|
HttpSettings,
|
||||||
OSCSettings,
|
OSCSettings,
|
||||||
@@ -335,20 +335,20 @@ export const parseUserFields = (data): UserFields => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parse Google Sheet portion of an entry
|
* Parse Sheet portion of an entry
|
||||||
* @param {object} data - data object
|
* @param {object} data - data object
|
||||||
* @param {boolean} enforce - whether to create a definition if one is missing
|
* @param {boolean} enforce - whether to create a definition if one is missing
|
||||||
* @returns {object} - event object data
|
* @returns {object} - event object data
|
||||||
*/
|
*/
|
||||||
export const parseGoogleSheet = (data, enforce) => {
|
export const parseSheet = (data, enforce) => {
|
||||||
const newSheet: GoogleSheet = {
|
const newSheet: Sheet = {
|
||||||
id: '',
|
id: '',
|
||||||
worksheet: '',
|
worksheet: '',
|
||||||
};
|
};
|
||||||
if ('googleSheet' in data) {
|
if ('sheet' in data) {
|
||||||
console.log('Found Google Sheet definition, importing...');
|
console.log('Found Sheet definition, importing...');
|
||||||
newSheet.id ??= data.googleSheet?.id;
|
newSheet.id ??= data.sheet?.id;
|
||||||
newSheet.worksheet ??= data.googleSheet?.worksheet;
|
newSheet.worksheet ??= data.sheet?.worksheet;
|
||||||
return newSheet;
|
return newSheet;
|
||||||
} else if (enforce) {
|
} else if (enforce) {
|
||||||
return newSheet;
|
return newSheet;
|
||||||
|
|||||||
@@ -3,14 +3,14 @@ import { writeFile } from 'fs/promises';
|
|||||||
import { readFileSync } from 'fs';
|
import { readFileSync } from 'fs';
|
||||||
import { OAuth2Client } from 'google-auth-library';
|
import { OAuth2Client } from 'google-auth-library';
|
||||||
import http from 'http';
|
import http from 'http';
|
||||||
import { DatabaseModel, GoogleSheetState, LogOrigin } from 'ontime-types';
|
import { DatabaseModel, SheetState, LogOrigin } from 'ontime-types';
|
||||||
import { join } from 'path';
|
import { join } from 'path';
|
||||||
import { URL } from 'url';
|
import { URL } from 'url';
|
||||||
import { logger } from '../classes/Logger.js';
|
import { logger } from '../classes/Logger.js';
|
||||||
import { DataProvider } from '../classes/data-provider/DataProvider.js';
|
import { DataProvider } from '../classes/data-provider/DataProvider.js';
|
||||||
import { getAppDataPath } from '../setup.js';
|
import { getAppDataPath } from '../setup.js';
|
||||||
import { ensureDirectory } from './fileManagement.js';
|
import { ensureDirectory } from './fileManagement.js';
|
||||||
import { cellRequenstFromEvent, cellRequenstFromProjectData, getA1Notation } from './googleSheetUtils.js';
|
import { cellRequenstFromEvent, cellRequenstFromProjectData, getA1Notation } from './sheetUtils.js';
|
||||||
import { parseExcel } from './parser.js';
|
import { parseExcel } from './parser.js';
|
||||||
import { parseProject, parseRundown, parseUserFields } from './parserFunctions.js';
|
import { parseProject, parseRundown, parseUserFields } from './parserFunctions.js';
|
||||||
|
|
||||||
@@ -41,8 +41,8 @@ class sheet {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async getSheetState(): Promise<GoogleSheetState> {
|
public async getSheetState(): Promise<SheetState> {
|
||||||
const ret: GoogleSheetState = {
|
const ret: SheetState = {
|
||||||
secret: false,
|
secret: false,
|
||||||
auth: false,
|
auth: false,
|
||||||
id: false,
|
id: false,
|
||||||
@@ -60,12 +60,12 @@ class sheet {
|
|||||||
try {
|
try {
|
||||||
ret.auth = await this.refreshToken();
|
ret.auth = await this.refreshToken();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
logger.error(LogOrigin.Server, `Google Sheet: Faild to refresh token ${err}`);
|
logger.error(LogOrigin.Server, `Sheet: Faild to refresh token ${err}`);
|
||||||
}
|
}
|
||||||
if (!ret.auth) {
|
if (!ret.auth) {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
const settings = DataProvider.getGoogleSheet();
|
const settings = DataProvider.getSheet();
|
||||||
if (settings.id != '') {
|
if (settings.id != '') {
|
||||||
const spreadsheets = await sheets({ version: 'v4', auth: sheet.client })
|
const spreadsheets = await sheets({ version: 'v4', auth: sheet.client })
|
||||||
.spreadsheets.get({
|
.spreadsheets.get({
|
||||||
@@ -73,7 +73,7 @@ class sheet {
|
|||||||
includeGridData: false,
|
includeGridData: false,
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
logger.error(LogOrigin.Server, `Google Sheet: faild to load sheet ${err}`);
|
logger.error(LogOrigin.Server, `Sheet: faild to load sheet ${err}`);
|
||||||
});
|
});
|
||||||
if (!spreadsheets || spreadsheets.status != 200) {
|
if (!spreadsheets || spreadsheets.status != 200) {
|
||||||
return ret;
|
return ret;
|
||||||
@@ -119,7 +119,7 @@ class sheet {
|
|||||||
* @throws
|
* @throws
|
||||||
*/
|
*/
|
||||||
public async push() {
|
public async push() {
|
||||||
const { id, worksheet } = DataProvider.getGoogleSheet();
|
const { id, worksheet } = DataProvider.getSheet();
|
||||||
const { worksheetId, range } = await this.exist(id, worksheet);
|
const { worksheetId, range } = await this.exist(id, worksheet);
|
||||||
|
|
||||||
const rq = await sheets({ version: 'v4', auth: sheet.client }).spreadsheets.values.get({
|
const rq = await sheets({ version: 'v4', auth: sheet.client }).spreadsheets.values.get({
|
||||||
@@ -198,7 +198,7 @@ class sheet {
|
|||||||
* @throws
|
* @throws
|
||||||
*/
|
*/
|
||||||
public async pull(): Promise<Partial<ResponseOK>> {
|
public async pull(): Promise<Partial<ResponseOK>> {
|
||||||
const { id, worksheet } = DataProvider.getGoogleSheet();
|
const { id, worksheet } = DataProvider.getSheet();
|
||||||
const { range } = await this.exist(id, worksheet);
|
const { range } = await this.exist(id, worksheet);
|
||||||
|
|
||||||
const res: Partial<ResponseOK> = {};
|
const res: Partial<ResponseOK> = {};
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { OSCSettings } from './core/OscSettings.type.js';
|
|||||||
import { Settings } from './core/Settings.type.js';
|
import { Settings } from './core/Settings.type.js';
|
||||||
import { UserFields } from './core/UserFields.type.js';
|
import { UserFields } from './core/UserFields.type.js';
|
||||||
import { ViewSettings } from './core/Views.type.js';
|
import { ViewSettings } from './core/Views.type.js';
|
||||||
import { GoogleSheet, HttpSettings } from '../index.js';
|
import { Sheet, HttpSettings } from '../index.js';
|
||||||
|
|
||||||
export type DatabaseModel = {
|
export type DatabaseModel = {
|
||||||
rundown: OntimeRundown;
|
rundown: OntimeRundown;
|
||||||
@@ -14,7 +14,7 @@ export type DatabaseModel = {
|
|||||||
viewSettings: ViewSettings;
|
viewSettings: ViewSettings;
|
||||||
aliases: Alias[];
|
aliases: Alias[];
|
||||||
userFields: UserFields;
|
userFields: UserFields;
|
||||||
googleSheet: GoogleSheet;
|
sheet: Sheet;
|
||||||
osc: OSCSettings;
|
osc: OSCSettings;
|
||||||
http: HttpSettings;
|
http: HttpSettings;
|
||||||
};
|
};
|
||||||
|
|||||||
+2
-2
@@ -1,9 +1,9 @@
|
|||||||
export type GoogleSheet = {
|
export type Sheet = {
|
||||||
worksheet: string | null;
|
worksheet: string | null;
|
||||||
id: string | null;
|
id: string | null;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type GoogleSheetState = {
|
export type SheetState = {
|
||||||
secret: boolean;
|
secret: boolean;
|
||||||
auth: boolean;
|
auth: boolean;
|
||||||
id: boolean;
|
id: boolean;
|
||||||
@@ -37,8 +37,8 @@ export type { OSCSettings, OscSubscription, OscSubscriptionOptions } from './def
|
|||||||
// ---> HTTP
|
// ---> HTTP
|
||||||
export type { HttpSettings, HttpSubscription, HttpSubscriptionOptions } from './definitions/core/HttpSettings.type.js';
|
export type { HttpSettings, HttpSubscription, HttpSubscriptionOptions } from './definitions/core/HttpSettings.type.js';
|
||||||
|
|
||||||
// ---> Google Sheet
|
// ---> Sheet
|
||||||
export type { GoogleSheet, GoogleSheetState } from './definitions/core/GoogleSheet.type.js';
|
export type { Sheet, SheetState } from './definitions/core/Sheet.type.js';
|
||||||
|
|
||||||
// SERVER RESPONSES
|
// SERVER RESPONSES
|
||||||
export type { NetworkInterface, GetInfo } from './api/ontime-controller/BackendResponse.type.js';
|
export type { NetworkInterface, GetInfo } from './api/ontime-controller/BackendResponse.type.js';
|
||||||
|
|||||||
Reference in New Issue
Block a user