diff --git a/build-docs/swagger-output.json b/build-docs/swagger-output.json index 4a4ab83dd..544d2b153 100644 --- a/build-docs/swagger-output.json +++ b/build-docs/swagger-output.json @@ -720,7 +720,12 @@ }, "createdAt": { "type": "integer", - "description": "The time (in ms since POSIX epoch) when the item was created.", + "description": "The time (in ms since POSIX epoch) when was created.", + "example": 1633522963509 + }, + "updatedAt": { + "type": "integer", + "description": "The time (in ms since POSIX epoch) when last updated.", "example": 1633522963509 }, "tags": { @@ -880,14 +885,10 @@ ] }, "addedAt": { - "description": "The time (in ms since POSIX epoch) when the author was added.", - "type": "integer", - "example": 1650621073750 + "$ref": "#/components/schemas/addedAt" }, "updatedAt": { - "description": "The time (in ms since POSIX epoch) when the author was last updated.", - "type": "integer", - "example": 1650621073750 + "$ref": "#/components/schemas/updatedAt" } } }, @@ -941,14 +942,10 @@ ] }, "addedAt": { - "description": "The time (in ms since POSIX epoch) when the author was added.", - "type": "integer", - "example": 1650621073750 + "$ref": "#/components/schemas/addedAt" }, "updatedAt": { - "description": "The time (in ms since POSIX epoch) when the author was last updated.", - "type": "integer", - "example": 1650621073750 + "$ref": "#/components/schemas/updatedAt" }, "numBooks": { "description": "The number of books associated with the author in the library.", @@ -978,14 +975,10 @@ ] }, "addedAt": { - "description": "The time (in ms since POSIX epoch) when the series was added.", - "type": "integer", - "example": 1650621073750 + "$ref": "#/components/schemas/addedAt" }, "updatedAt": { - "description": "The time (in ms since POSIX epoch) when the series was last updated.", - "type": "integer", - "example": 1650621073750 + "$ref": "#/components/schemas/updatedAt" } } }, @@ -1148,9 +1141,7 @@ "$ref": "#/components/schemas/createdAt" }, "updatedAt": { - "description": "The time (in ms since POSIX epoch) when the RSS feed was last updated.", - "type": "integer", - "example": 1669031843179 + "$ref": "#/components/schemas/updatedAt" } } }, @@ -1432,14 +1423,10 @@ "$ref": "#/components/schemas/fileMetadata" }, "addedAt": { - "description": "The time (in ms since POSIX epoch) when the audio file was added to the library.", - "type": "integer", - "example": 1650621074131 + "$ref": "#/components/schemas/addedAt" }, "updatedAt": { - "description": "The time (in ms since POSIX epoch) when the audio file last updated. (Read Only)", - "type": "integer", - "example": 1651830828023 + "$ref": "#/components/schemas/updatedAt" }, "trackNumFromMeta": { "description": "The track number of the audio file as pulled from the file's metadata. Will be null if unknown.", @@ -1617,14 +1604,10 @@ "example": "epub" }, "addedAt": { - "description": "The time (in ms since POSIX epoch) when the library file was added.", - "type": "integer", - "example": 1650621073750 + "$ref": "#/components/schemas/addedAt" }, "updatedAt": { - "description": "The time (in ms since POSIX epoch) when the library file was last updated.", - "type": "integer", - "example": 1650621110769 + "$ref": "#/components/schemas/updatedAt" } } }, @@ -1640,14 +1623,10 @@ "$ref": "#/components/schemas/fileMetadata" }, "addedAt": { - "description": "The time (in ms since POSIX epoch) when the library file was added.", - "type": "integer", - "example": 1650621052494 + "$ref": "#/components/schemas/addedAt" }, "updatedAt": { - "description": "The time (in ms since POSIX epoch) when the library file was last updated.", - "type": "integer", - "example": 1650621052494 + "$ref": "#/components/schemas/updatedAt" }, "fileType": { "description": "The type of file that the library file is (audio, image, etc.).", @@ -1928,12 +1907,10 @@ "type": "integer" }, "addedAt": { - "description": "The time (in ms since POSIX epoch) when the library item was added to the library.", - "type": "integer" + "$ref": "#/components/schemas/addedAt" }, "updatedAt": { - "description": "The time (in ms since POSIX epoch) when the library item was last updated. (Read Only)", - "type": "integer" + "$ref": "#/components/schemas/updatedAt" }, "isMissing": { "description": "Whether the library item was scanned and no longer exists.", @@ -2841,14 +2818,10 @@ "$ref": "#/components/schemas/audioFile" }, "addedAt": { - "description": "The time (in ms since POSIX epoch) when the podcast episode was added to the library.", - "type": "integer", - "example": 1667326679503 + "$ref": "#/components/schemas/addedAt" }, "updatedAt": { - "description": "The time (in ms since POSIX epoch) when the podcast episode was last updated.", - "type": "integer", - "example": 1667326679503 + "$ref": "#/components/schemas/updatedAt" } } } @@ -3773,9 +3746,7 @@ "example": 1668206493239 }, "updatedAt": { - "description": "The time (in ms since POSIX epoch) when the playback session was last updated.", - "type": "integer", - "example": 1668206493239 + "$ref": "#/components/schemas/updatedAt" } } }, @@ -3911,9 +3882,7 @@ "example": 1668206493239 }, "updatedAt": { - "description": "The time (in ms since POSIX epoch) when the playback session was last updated.", - "type": "integer", - "example": 1668206493239 + "$ref": "#/components/schemas/updatedAt" }, "audioTracks": { "description": "The audio tracks that are being played with the playback session.", diff --git a/server/objects/Feed.js b/server/objects/Feed.js index 43398d22f..30bc9a6c4 100644 --- a/server/objects/Feed.js +++ b/server/objects/Feed.js @@ -59,9 +59,7 @@ const naturalSort = createNewSortInstance({ * createdAt: * $ref: '#/components/schemas/createdAt' * updatedAt: - * description: The time (in ms since POSIX epoch) when the RSS feed was last updated. - * type: integer - * example: 1669031843179 + * $ref: '#/components/schemas/updatedAt' * rssFeedMinified: * type: [object, 'null'] * properties: diff --git a/server/objects/LibraryItem.js b/server/objects/LibraryItem.js index 7bb1f8bbf..886300773 100644 --- a/server/objects/LibraryItem.js +++ b/server/objects/LibraryItem.js @@ -61,11 +61,9 @@ const { filePathToPOSIX, getFileTimestampsWithIno } = require('../utils/fileUtil * description: The time (in ms since POSIX epoch) when the library item was created on disk. Will be 0 if unknown. * type: integer * addedAt: - * description: The time (in ms since POSIX epoch) when the library item was added to the library. - * type: integer + * $ref: '#/components/schemas/addedAt' * updatedAt: - * description: The time (in ms since POSIX epoch) when the library item was last updated. (Read Only) - * type: integer + * $ref: '#/components/schemas/updatedAt' * isMissing: * description: Whether the library item was scanned and no longer exists. * type: boolean diff --git a/server/objects/PlaybackSession.js b/server/objects/PlaybackSession.js index 90a1fa2ff..cff64621a 100644 --- a/server/objects/PlaybackSession.js +++ b/server/objects/PlaybackSession.js @@ -103,9 +103,7 @@ const VideoMetadata = require('./metadata/VideoMetadata') * type: integer * example: 1668206493239 * updatedAt: - * description: The time (in ms since POSIX epoch) when the playback session was last updated. - * type: integer - * example: 1668206493239 + * $ref: '#/components/schemas/updatedAt' * playbackSessionExpanded: * type: [object, 'null'] * properties: @@ -199,9 +197,7 @@ const VideoMetadata = require('./metadata/VideoMetadata') * type: integer * example: 1668206493239 * updatedAt: - * description: The time (in ms since POSIX epoch) when the playback session was last updated. - * type: integer - * example: 1668206493239 + * $ref: '#/components/schemas/updatedAt' * audioTracks: * description: The audio tracks that are being played with the playback session. * type: array diff --git a/server/objects/components.js b/server/objects/components.js index 82a49a39e..b14847e38 100644 --- a/server/objects/components.js +++ b/server/objects/components.js @@ -4,7 +4,11 @@ * schemas: * createdAt: * type: integer - * description: The time (in ms since POSIX epoch) when the item was created. + * description: The time (in ms since POSIX epoch) when was created. + * example: 1633522963509 + * updatedAt: + * type: integer + * description: The time (in ms since POSIX epoch) when last updated. * example: 1633522963509 * tags: * description: Tags applied to items. diff --git a/server/objects/entities/Author.js b/server/objects/entities/Author.js index c05aac05a..428f04785 100644 --- a/server/objects/entities/Author.js +++ b/server/objects/entities/Author.js @@ -27,13 +27,9 @@ const { checkNamesAreEqual, nameToLastFirst } = require('../../utils/parsers/par * description: The absolute path for the author image. Will be null if there is no image. * type: [string, 'null'] * addedAt: - * description: The time (in ms since POSIX epoch) when the author was added. - * type: integer - * example: 1650621073750 + * $ref: '#/components/schemas/addedAt' * updatedAt: - * description: The time (in ms since POSIX epoch) when the author was last updated. - * type: integer - * example: 1650621073750 + * $ref: '#/components/schemas/updatedAt' * authorMinified: * type: object * properties: @@ -66,13 +62,9 @@ const { checkNamesAreEqual, nameToLastFirst } = require('../../utils/parsers/par * description: The absolute path for the author image. Will be null if there is no image. * type: [string, 'null'] * addedAt: - * description: The time (in ms since POSIX epoch) when the author was added. - * type: integer - * example: 1650621073750 + * $ref: '#/components/schemas/addedAt' * updatedAt: - * description: The time (in ms since POSIX epoch) when the author was last updated. - * type: integer - * example: 1650621073750 + * $ref: '#/components/schemas/updatedAt' * numBooks: * description: The number of books associated with the author in the library. * type: integer diff --git a/server/objects/entities/Series.js b/server/objects/entities/Series.js index 8c85517e5..10c59fd64 100644 --- a/server/objects/entities/Series.js +++ b/server/objects/entities/Series.js @@ -20,13 +20,9 @@ const { getTitleIgnorePrefix, getTitlePrefixAtEnd } = require('../../utils/index * description: A description for the series. Will be null if there is none. * type: [string, 'null'] * addedAt: - * description: The time (in ms since POSIX epoch) when the series was added. - * type: integer - * example: 1650621073750 + * $ref: '#/components/schemas/addedAt' * updatedAt: - * description: The time (in ms since POSIX epoch) when the series was last updated. - * type: integer - * example: 1650621073750 + * $ref: '#/components/schemas/updatedAt' * seriesNumBooks: * type: object * properties: diff --git a/server/objects/files/AudioFile.js b/server/objects/files/AudioFile.js index 1eabaae37..9df28b412 100644 --- a/server/objects/files/AudioFile.js +++ b/server/objects/files/AudioFile.js @@ -20,13 +20,9 @@ const FileMetadata = require('../metadata/FileMetadata') * metadata: * $ref: '#/components/schemas/fileMetadata' * addedAt: - * description: The time (in ms since POSIX epoch) when the audio file was added to the library. - * type: integer - * example: 1650621074131 + * $ref: '#/components/schemas/addedAt' * updatedAt: - * description: The time (in ms since POSIX epoch) when the audio file last updated. (Read Only) - * type: integer - * example: 1651830828023 + * $ref: '#/components/schemas/updatedAt' * trackNumFromMeta: * description: The track number of the audio file as pulled from the file's metadata. Will be null if unknown. * type: [integer, 'null'] diff --git a/server/objects/files/EBookFile.js b/server/objects/files/EBookFile.js index 4666a1c6b..e7473789c 100644 --- a/server/objects/files/EBookFile.js +++ b/server/objects/files/EBookFile.js @@ -18,13 +18,9 @@ const FileMetadata = require('../metadata/FileMetadata') * type: string * example: epub * addedAt: - * description: The time (in ms since POSIX epoch) when the library file was added. - * type: integer - * example: 1650621073750 + * $ref: '#/components/schemas/addedAt' * updatedAt: - * description: The time (in ms since POSIX epoch) when the library file was last updated. - * type: integer - * example: 1650621110769 + * $ref: '#/components/schemas/updatedAt' */ class EBookFile { diff --git a/server/objects/files/LibraryFile.js b/server/objects/files/LibraryFile.js index 67471b088..6461c11b8 100644 --- a/server/objects/files/LibraryFile.js +++ b/server/objects/files/LibraryFile.js @@ -17,13 +17,9 @@ const FileMetadata = require('../metadata/FileMetadata') * metadata: * $ref: '#/components/schemas/fileMetadata' * addedAt: - * description: The time (in ms since POSIX epoch) when the library file was added. - * type: integer - * example: 1650621052494 + * $ref: '#/components/schemas/addedAt' * updatedAt: - * description: The time (in ms since POSIX epoch) when the library file was last updated. - * type: integer - * example: 1650621052494 + * $ref: '#/components/schemas/updatedAt' * fileType: * description: The type of file that the library file is (audio, image, etc.). * type: string diff --git a/server/objects/mediaTypes/Podcast.js b/server/objects/mediaTypes/Podcast.js index 0f0250982..899937c5c 100644 --- a/server/objects/mediaTypes/Podcast.js +++ b/server/objects/mediaTypes/Podcast.js @@ -452,13 +452,9 @@ const { filePathToPOSIX } = require('../../utils/fileUtils') * audioFile: * $ref: '#/components/schemas/audioFile' * addedAt: - * description: The time (in ms since POSIX epoch) when the podcast episode was added to the library. - * type: integer - * example: 1667326679503 + * $ref: '#/components/schemas/addedAt' * updatedAt: - * description: The time (in ms since POSIX epoch) when the podcast episode was last updated. - * type: integer - * example: 1667326679503 + * $ref: '#/components/schemas/updatedAt' * podcastEpisodeExpanded: * type: [object, 'null'] * allOf: