diff --git a/schemas/openapi-steering.json b/schemas/openapi-steering.json index ad9d0531c8bc7c5458b4fb69d4ece50ecad374b3..8d526a5b3f93d54d61828615cd9042a48146be97 100644 --- a/schemas/openapi-steering.json +++ b/schemas/openapi-steering.json @@ -1,3422 +1,175 @@ { - "openapi": "3.0.3", - "info": { - "title": "AURA Steering API", - "version": "1.0.0", - "description": "Programme/schedule management for Aura" - }, - "paths": {}, - "components": { - "schemas": { - "BasicProgramEntry": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "start": { - "type": "string", - "format": "date-time" - }, - "end": { - "type": "string", - "format": "date-time" - }, - "timeslotId": { - "type": "integer", - "nullable": true - }, - "playlistId": { - "type": "integer", - "nullable": true - }, - "showId": { - "type": "integer" - } - }, - "required": [ - "end", - "id", - "playlistId", - "showId", - "start", - "timeslotId" - ] - }, - "BySetPosEnum": { - "enum": [ - 1, - 2, - 3, - 4, - 5, - -1 - ], - "type": "integer", - "description": "* `1` - first\n* `2` - second\n* `3` - third\n* `4` - fourth\n* `5` - fifth\n* `-1` - last" - }, - "ByWeekdayEnum": { - "enum": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6 - ], - "type": "integer", - "description": "**0**: Monday\n\n\n**1**: Tuesday\n\n\n**2**: Wednesday\n\n\n**3**: Thursday\n\n\n**4**: Friday\n\n\n**5**: Saturday\n\n\n**6**: Sunday" - }, - "ByWeekdaysEnum": { - "enum": [ - "0,1,2,3,4", - "5,6" - ], - "description": "* `None` - \n* `0,1,2,3,4` - business days\n* `5,6` - weekends" - }, - "CBA": { - "type": "object", - "properties": { - "username": { - "type": "string", - "maxLength": 60 - }, - "userToken": { - "type": "string", - "maxLength": 255 - }, - "createdAt": { - "type": "string", - "format": "date-time", - "readOnly": true - }, - "createdBy": { - "type": "string", - "readOnly": true - }, - "updatedAt": { - "type": "string", - "format": "date-time", - "readOnly": true, - "nullable": true - }, - "updatedBy": { - "type": "string", - "readOnly": true - } - }, - "required": [ - "createdAt", - "createdBy", - "updatedAt", - "updatedBy" - ] - }, - "CalendarEpisode": { - "type": "object", - "properties": { - "cbaId": { - "type": "integer", - "maximum": 2147483647, - "minimum": -2147483648, - "nullable": true, - "description": "CBA entry ID." - }, - "content": { - "type": "string", - "description": "Textual content of the note." - }, - "contributorIds": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "`Profile` IDs that contributed to this episode." - }, - "id": { - "type": "integer", - "readOnly": true - }, - "imageId": { - "type": "integer", - "nullable": true, - "description": "`Image` ID." - }, - "languageIds": { - "type": "array", - "items": { - "type": "integer", - "nullable": true - }, - "description": "Array of `Language` IDs." - }, - "links": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NoteLink" - }, - "description": "Array of `Link` objects." - }, - "playlistId": { - "type": "integer", - "description": "Array of `Playlist` IDs." - }, - "summary": { - "type": "string", - "description": "Summary of the Note." - }, - "tags": { - "type": "string", - "description": "Tags of the Note." - }, - "timeslotId": { - "type": "integer", - "description": "`Timeslot` ID." - }, - "title": { - "type": "string", - "description": "Title of the note.", - "maxLength": 128 - }, - "topicIds": { - "type": "array", - "items": { - "type": "integer", - "nullable": true - }, - "description": "Array of `Topic`IDs." - } - }, - "required": [ - "content", - "id" - ] - }, - "CalendarProfile": { - "type": "object", - "properties": { - "biography": { - "type": "string", - "description": "Biography of the profile." - }, - "email": { - "type": "string", - "format": "email", - "description": "Email address of the profile.", - "maxLength": 254 - }, - "id": { - "type": "integer", - "readOnly": true - }, - "imageId": { - "type": "integer", - "nullable": true, - "description": "`Image` id of the profile." - }, - "isActive": { - "type": "boolean", - "description": "True if the profile is active." - }, - "links": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProfileLink" - }, - "description": "Array of `Link` objects. Can be empty." - }, - "name": { - "type": "string", - "description": "Display name of the profile.", - "maxLength": 128 - } - }, - "required": [ - "id", - "name" - ] - }, - "CalendarSchema": { - "type": "object", - "properties": { - "shows": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CalendarShow" - } - }, - "timeslots": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CalendarTimeslot" - } - }, - "profiles": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CalendarProfile" - } - }, - "categories": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Category" - } - }, - "fundingCategories": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FundingCategory" - } - }, - "types": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Type" - } - }, - "images": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Image" - } - }, - "topics": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Topic" - } - }, - "languages": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Language" - } - }, - "musicFocuses": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MusicFocus" - } - }, - "program": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BasicProgramEntry" - } - }, - "episodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CalendarEpisode" - } - }, - "licenses": { - "type": "array", - "items": { - "$ref": "#/components/schemas/License" - } - }, - "linkTypes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/LinkType" - } - } - }, - "required": [ - "categories", - "episodes", - "fundingCategories", - "images", - "languages", - "licenses", - "linkTypes", - "musicFocuses", - "profiles", - "program", - "shows", - "timeslots", - "topics", - "types" - ] - }, - "CalendarShow": { - "type": "object", - "properties": { - "categoryIds": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "Array of `Category` IDs." - }, - "cbaSeriesId": { - "type": "integer", - "nullable": true, - "description": "CBA series ID." - }, - "defaultPlaylistId": { - "type": "integer", - "nullable": true, - "description": "Default `Playlist` ID for this show." - }, - "description": { - "type": "string", - "description": "Description of this show." - }, - "email": { - "type": "string", - "format": "email", - "nullable": true, - "description": "Email address of this show.", - "maxLength": 254 - }, - "fundingCategoryId": { - "type": "integer", - "description": "`FundingCategory` ID." - }, - "hostIds": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "`Profile` IDs that host this show." - }, - "id": { - "type": "integer", - "readOnly": true - }, - "imageId": { - "type": "integer", - "nullable": true, - "description": "`Image` ID of this show." - }, - "isActive": { - "type": "boolean", - "description": "True if this show is active." - }, - "isPublic": { - "type": "boolean", - "description": "True if this show is public." - }, - "languageIds": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "`Language` IDs of this show." - }, - "links": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProfileLink" - }, - "description": "Array of `Link` objects." - }, - "logoId": { - "type": "integer", - "nullable": true, - "description": "`Image` ID of the logo of this show." - }, - "musicFocusIds": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "Array of `MusicFocus` IDs." - }, - "name": { - "type": "string", - "description": "Name of this Show.", - "maxLength": 255 - }, - "predecessorId": { - "type": "integer", - "nullable": true, - "description": "`Show` ID that predeceeded this one." - }, - "shortDescription": { - "type": "string", - "description": "Short description of this show." - }, - "slug": { - "type": "string", - "description": "Slug of this show.", - "maxLength": 255, - "pattern": "^[-a-zA-Z0-9_]+$" - }, - "topicIds": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "Array of `Topic` IDs." - }, - "typeId": { - "type": "integer", - "description": "Array of `Type` IDs." - } - }, - "required": [ - "categoryIds", - "fundingCategoryId", - "hostIds", - "id", - "languageIds", - "musicFocusIds", - "name", - "shortDescription", - "topicIds", - "typeId" - ] - }, - "CalendarTimeslot": { - "type": "object", - "properties": { - "playlistId": { - "type": "integer", - "maximum": 2147483647, - "minimum": -2147483648, - "nullable": true, - "description": "Playlist ID of this timeslot." - }, - "repetitionOfId": { - "type": "integer", - "nullable": true, - "description": "This timeslot is a repetition of `Timeslot` ID." - }, - "end": { - "type": "string", - "format": "date-time", - "readOnly": true - }, - "id": { - "type": "integer", - "readOnly": true - }, - "noteId": { - "type": "integer", - "readOnly": true - }, - "scheduleId": { - "type": "integer", - "description": "`Schedule` ID of this timeslot." - }, - "showId": { - "type": "integer", - "readOnly": true - }, - "start": { - "type": "string", - "format": "date-time", - "readOnly": true - } - }, - "required": [ - "end", - "id", - "noteId", - "showId", - "start" - ] - }, - "Category": { - "type": "object", - "properties": { - "description": { - "type": "string", - "description": "Description of the category." - }, - "id": { - "type": "integer", - "readOnly": true - }, - "isActive": { - "type": "boolean", - "description": "True if category is active." - }, - "name": { - "type": "string", - "description": "Name of the category.", - "maxLength": 32 - }, - "slug": { - "type": "string", - "description": "Slug of the category.", - "maxLength": 32, - "pattern": "^[-a-zA-Z0-9_]+$" - }, - "subtitle": { - "type": "string", - "description": "Subtitle of the category.", - "maxLength": 32 - } - }, - "required": [ - "id", - "name", - "slug" - ] - }, - "Collision": { - "type": "object", - "properties": { - "start": { - "type": "string", - "format": "date-time" - }, - "end": { - "type": "string", - "format": "date-time" - }, - "playlistId": { - "type": "integer", - "nullable": true - }, - "showId": { - "type": "integer" - }, - "showName": { - "type": "string" - }, - "scheduleId": { - "type": "integer" - }, - "memo": { - "type": "string" - }, - "timeslotId": { - "type": "integer" - }, - "noteId": { - "type": "integer", - "nullable": true - } - }, - "required": [ - "end", - "memo", - "noteId", - "playlistId", - "scheduleId", - "showId", - "showName", - "start", - "timeslotId" - ] - }, - "DryRunTimeSlot": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "nullable": true - }, - "scheduleId": { - "type": "integer", - "nullable": true - }, - "playlistId": { - "type": "integer", - "nullable": true - }, - "start": { - "type": "string", - "format": "date" - }, - "end": { - "type": "string", - "format": "date" - }, - "repetitionOfId": { - "type": "integer", - "nullable": true - }, - "memo": { - "type": "string" - } - }, - "required": [ - "end", - "id", - "memo", - "playlistId", - "repetitionOfId", - "scheduleId", - "start" - ] - }, - "Error": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "code": { - "type": "string", - "nullable": true - } - }, - "required": [ - "code", - "message" - ] - }, - "FreqEnum": { - "enum": [ - 0, - 1, - 2, - 3 - ], - "type": "integer", - "description": "* `0` - once\n* `1` - monthly\n* `2` - weekly\n* `3` - daily" - }, - "FundingCategory": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "readOnly": true - }, - "isActive": { - "type": "boolean", - "description": "True if funding category is active." - }, - "name": { - "type": "string", - "description": "Name of the funding category.", - "maxLength": 32 - }, - "slug": { - "type": "string", - "description": "Slug of the funding category.", - "maxLength": 32, - "pattern": "^[-a-zA-Z0-9_]+$" - } - }, - "required": [ - "id", - "name", - "slug" - ] - }, - "Image": { - "type": "object", - "properties": { - "altText": { - "type": "string", - "description": "Alternate text for the image." - }, - "credits": { - "type": "string", - "description": "Credits of the image" - }, - "image": { - "type": "string", - "format": "uri", - "writeOnly": true, - "nullable": true, - "description": "The URI of the image." - }, - "isUseExplicitlyGrantedByAuthor": { - "type": "boolean", - "description": "True if use is explicitly granted by author." - }, - "licenseId": { - "type": "integer", - "nullable": true, - "description": "`License` ID of this image." - }, - "ppoi": { - "type": "string", - "description": "PPOI specifies the crop centerpoint of the image.", - "maxLength": 20 - }, - "height": { - "type": "integer", - "readOnly": true, - "nullable": true - }, - "id": { - "type": "integer", - "readOnly": true - }, - "url": { - "type": "string", - "description": "Returns the image URL, using settings.SITE_URL to include the protocol and avoid mixed\nmedia warnings.", - "readOnly": true - }, - "width": { - "type": "integer", - "readOnly": true, - "nullable": true - } - }, - "required": [ - "height", - "id", - "url", - "width" - ] - }, - "Language": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "readOnly": true - }, - "isActive": { - "type": "boolean", - "description": "True if language is active." - }, - "name": { - "type": "string", - "description": "Name of the language.", - "maxLength": 32 - } - }, - "required": [ - "id", - "name" - ] - }, - "License": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "readOnly": true - }, - "identifier": { - "type": "string", - "description": "Identifier of the license", - "maxLength": 32 - }, - "name": { - "type": "string", - "description": "Name of the license", - "maxLength": 64 - }, - "needsAuthor": { - "type": "boolean", - "description": "True if license needs an author." - }, - "requiresExpressPermissionForPublication": { - "type": "boolean", - "description": "True if express permission for publication required." - }, - "url": { - "type": "string", - "format": "uri", - "description": "URL of the licence.", - "maxLength": 200 - } - }, - "required": [ - "id", - "identifier", - "name" - ] - }, - "LinkType": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "readOnly": true - }, - "isActive": { - "type": "boolean", - "description": "True if link type is active." - }, - "name": { - "type": "string", - "description": "Name of the link type", - "maxLength": 32 - } - }, - "required": [ - "id", - "name" - ] - }, - "MusicFocus": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "readOnly": true - }, - "isActive": { - "type": "boolean", - "description": "True if music focus is active." - }, - "name": { - "type": "string", - "description": "Name of the music focus.", - "maxLength": 32 - }, - "slug": { - "type": "string", - "description": "Slug of the music focus.", - "maxLength": 32, - "pattern": "^[-a-zA-Z0-9_]+$" - } - }, - "required": [ - "id", - "name", - "slug" - ] - }, - "Note": { - "type": "object", - "properties": { - "cbaId": { - "type": "integer", - "maximum": 2147483647, - "minimum": -2147483648, - "nullable": true, - "description": "CBA entry ID." - }, - "content": { - "type": "string", - "description": "Textual content of the note." - }, - "contributorIds": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "`Profile` IDs that contributed to this episode." - }, - "id": { - "type": "integer", - "readOnly": true - }, - "imageId": { - "type": "integer", - "nullable": true, - "description": "`Image` ID." - }, - "languageIds": { - "type": "array", - "items": { - "type": "integer", - "nullable": true - }, - "description": "Array of `Language` IDs." - }, - "links": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NoteLink" - }, - "description": "Array of `Link` objects." - }, - "playlistId": { - "type": "integer", - "description": "Array of `Playlist` IDs." - }, - "summary": { - "type": "string", - "description": "Summary of the Note." - }, - "tags": { - "type": "string", - "description": "Tags of the Note." - }, - "timeslotId": { - "type": "integer", - "description": "`Timeslot` ID." - }, - "title": { - "type": "string", - "description": "Title of the note.", - "maxLength": 128 - }, - "topicIds": { - "type": "array", - "items": { - "type": "integer", - "nullable": true - }, - "description": "Array of `Topic`IDs." - }, - "createdAt": { - "type": "string", - "format": "date-time", - "readOnly": true - }, - "createdBy": { - "type": "string", - "readOnly": true - }, - "updatedAt": { - "type": "string", - "format": "date-time", - "readOnly": true, - "nullable": true - }, - "updatedBy": { - "type": "string", - "readOnly": true - } - }, - "required": [ - "content", - "createdAt", - "createdBy", - "id", - "updatedAt", - "updatedBy" - ] - }, - "NoteLink": { - "type": "object", - "properties": { - "typeId": { - "type": "integer" - }, - "url": { - "type": "string", - "format": "uri", - "maxLength": 200 - } - }, - "required": [ - "typeId", - "url" - ] - }, - "NullEnum": { - "enum": [ - null - ] - }, - "PaginatedImageList": { - "type": "object", - "required": [ - "count", - "results" - ], - "properties": { - "count": { - "type": "integer", - "example": 123 - }, - "next": { - "type": "string", - "nullable": true, - "format": "uri", - "example": "http://api.example.org/accounts/?offset=400&limit=100" - }, - "previous": { - "type": "string", - "nullable": true, - "format": "uri", - "example": "http://api.example.org/accounts/?offset=200&limit=100" - }, - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Image" - } - } - } - }, - "PaginatedNoteList": { - "type": "object", - "required": [ - "count", - "results" - ], - "properties": { - "count": { - "type": "integer", - "example": 123 - }, - "next": { - "type": "string", - "nullable": true, - "format": "uri", - "example": "http://api.example.org/accounts/?offset=400&limit=100" - }, - "previous": { - "type": "string", - "nullable": true, - "format": "uri", - "example": "http://api.example.org/accounts/?offset=200&limit=100" - }, - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Note" - } - } - } - }, - "PaginatedProfileList": { - "type": "object", - "required": [ - "count", - "results" - ], - "properties": { - "count": { - "type": "integer", - "example": 123 - }, - "next": { - "type": "string", - "nullable": true, - "format": "uri", - "example": "http://api.example.org/accounts/?offset=400&limit=100" - }, - "previous": { - "type": "string", - "nullable": true, - "format": "uri", - "example": "http://api.example.org/accounts/?offset=200&limit=100" - }, - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Profile" - } - } - } - }, - "PaginatedScheduleList": { - "type": "object", - "required": [ - "count", - "results" - ], - "properties": { - "count": { - "type": "integer", - "example": 123 - }, - "next": { - "type": "string", - "nullable": true, - "format": "uri", - "example": "http://api.example.org/accounts/?offset=400&limit=100" - }, - "previous": { - "type": "string", - "nullable": true, - "format": "uri", - "example": "http://api.example.org/accounts/?offset=200&limit=100" - }, - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Schedule" - } - } - } - }, - "PaginatedShowList": { - "type": "object", - "required": [ - "count", - "results" - ], - "properties": { - "count": { - "type": "integer", - "example": 123 - }, - "next": { - "type": "string", - "nullable": true, - "format": "uri", - "example": "http://api.example.org/accounts/?offset=400&limit=100" - }, - "previous": { - "type": "string", - "nullable": true, - "format": "uri", - "example": "http://api.example.org/accounts/?offset=200&limit=100" - }, - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Show" - } - } - } - }, - "PaginatedTimeSlotList": { - "type": "object", - "required": [ - "count", - "results" - ], - "properties": { - "count": { - "type": "integer", - "example": 123 - }, - "next": { - "type": "string", - "nullable": true, - "format": "uri", - "example": "http://api.example.org/accounts/?offset=400&limit=100" - }, - "previous": { - "type": "string", - "nullable": true, - "format": "uri", - "example": "http://api.example.org/accounts/?offset=200&limit=100" - }, - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TimeSlot" - } - } - } - }, - "PatchedCategory": { - "type": "object", - "properties": { - "description": { - "type": "string", - "description": "Description of the category." - }, - "id": { - "type": "integer", - "readOnly": true - }, - "isActive": { - "type": "boolean", - "description": "True if category is active." - }, - "name": { - "type": "string", - "description": "Name of the category.", - "maxLength": 32 - }, - "slug": { - "type": "string", - "description": "Slug of the category.", - "maxLength": 32, - "pattern": "^[-a-zA-Z0-9_]+$" - }, - "subtitle": { - "type": "string", - "description": "Subtitle of the category.", - "maxLength": 32 - } - } - }, - "PatchedFundingCategory": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "readOnly": true - }, - "isActive": { - "type": "boolean", - "description": "True if funding category is active." - }, - "name": { - "type": "string", - "description": "Name of the funding category.", - "maxLength": 32 - }, - "slug": { - "type": "string", - "description": "Slug of the funding category.", - "maxLength": 32, - "pattern": "^[-a-zA-Z0-9_]+$" - } - } - }, - "PatchedImage": { - "type": "object", - "properties": { - "altText": { - "type": "string", - "description": "Alternate text for the image." - }, - "credits": { - "type": "string", - "description": "Credits of the image" - }, - "image": { - "type": "string", - "format": "uri", - "writeOnly": true, - "nullable": true, - "description": "The URI of the image." - }, - "isUseExplicitlyGrantedByAuthor": { - "type": "boolean", - "description": "True if use is explicitly granted by author." - }, - "licenseId": { - "type": "integer", - "nullable": true, - "description": "`License` ID of this image." - }, - "ppoi": { - "type": "string", - "description": "PPOI specifies the crop centerpoint of the image.", - "maxLength": 20 - }, - "height": { - "type": "integer", - "readOnly": true, - "nullable": true - }, - "id": { - "type": "integer", - "readOnly": true - }, - "url": { - "type": "string", - "description": "Returns the image URL, using settings.SITE_URL to include the protocol and avoid mixed\nmedia warnings.", - "readOnly": true - }, - "width": { - "type": "integer", - "readOnly": true, - "nullable": true - } - } - }, - "PatchedLanguage": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "readOnly": true - }, - "isActive": { - "type": "boolean", - "description": "True if language is active." - }, - "name": { - "type": "string", - "description": "Name of the language.", - "maxLength": 32 - } - } - }, - "PatchedLicense": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "readOnly": true - }, - "identifier": { - "type": "string", - "description": "Identifier of the license", - "maxLength": 32 - }, - "name": { - "type": "string", - "description": "Name of the license", - "maxLength": 64 - }, - "needsAuthor": { - "type": "boolean", - "description": "True if license needs an author." - }, - "requiresExpressPermissionForPublication": { - "type": "boolean", - "description": "True if express permission for publication required." - }, - "url": { - "type": "string", - "format": "uri", - "description": "URL of the licence.", - "maxLength": 200 - } - } - }, - "PatchedLinkType": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "readOnly": true - }, - "isActive": { - "type": "boolean", - "description": "True if link type is active." - }, - "name": { - "type": "string", - "description": "Name of the link type", - "maxLength": 32 - } - } - }, - "PatchedMusicFocus": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "readOnly": true - }, - "isActive": { - "type": "boolean", - "description": "True if music focus is active." - }, - "name": { - "type": "string", - "description": "Name of the music focus.", - "maxLength": 32 - }, - "slug": { - "type": "string", - "description": "Slug of the music focus.", - "maxLength": 32, - "pattern": "^[-a-zA-Z0-9_]+$" - } - } - }, - "PatchedNote": { - "type": "object", - "properties": { - "cbaId": { - "type": "integer", - "maximum": 2147483647, - "minimum": -2147483648, - "nullable": true, - "description": "CBA entry ID." - }, - "content": { - "type": "string", - "description": "Textual content of the note." - }, - "contributorIds": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "`Profile` IDs that contributed to this episode." - }, - "id": { - "type": "integer", - "readOnly": true - }, - "imageId": { - "type": "integer", - "nullable": true, - "description": "`Image` ID." - }, - "languageIds": { - "type": "array", - "items": { - "type": "integer", - "nullable": true - }, - "description": "Array of `Language` IDs." - }, - "links": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NoteLink" - }, - "description": "Array of `Link` objects." - }, - "playlistId": { - "type": "integer", - "description": "Array of `Playlist` IDs." - }, - "summary": { - "type": "string", - "description": "Summary of the Note." - }, - "tags": { - "type": "string", - "description": "Tags of the Note." - }, - "timeslotId": { - "type": "integer", - "description": "`Timeslot` ID." - }, - "title": { - "type": "string", - "description": "Title of the note.", - "maxLength": 128 - }, - "topicIds": { - "type": "array", - "items": { - "type": "integer", - "nullable": true - }, - "description": "Array of `Topic`IDs." - }, - "createdAt": { - "type": "string", - "format": "date-time", - "readOnly": true - }, - "createdBy": { - "type": "string", - "readOnly": true - }, - "updatedAt": { - "type": "string", - "format": "date-time", - "readOnly": true, - "nullable": true - }, - "updatedBy": { - "type": "string", - "readOnly": true - } - } - }, - "PatchedProfile": { - "type": "object", - "properties": { - "biography": { - "type": "string", - "description": "Biography of the profile." - }, - "email": { - "type": "string", - "format": "email", - "description": "Email address of the profile.", - "maxLength": 254 - }, - "id": { - "type": "integer", - "readOnly": true - }, - "imageId": { - "type": "integer", - "nullable": true, - "description": "`Image` id of the profile." - }, - "isActive": { - "type": "boolean", - "description": "True if the profile is active." - }, - "links": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProfileLink" - }, - "description": "Array of `Link` objects. Can be empty." - }, - "name": { - "type": "string", - "description": "Display name of the profile.", - "maxLength": 128 - }, - "ownerIds": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "User ID(s) that own this profile." - }, - "createdAt": { - "type": "string", - "format": "date-time", - "readOnly": true - }, - "createdBy": { - "type": "string", - "readOnly": true - }, - "updatedAt": { - "type": "string", - "format": "date-time", - "readOnly": true, - "nullable": true - }, - "updatedBy": { - "type": "string", - "readOnly": true - } - } - }, - "PatchedRRule": { - "type": "object", - "properties": { - "bySetPos": { - "readOnly": true, - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/BySetPosEnum" - }, - { - "$ref": "#/components/schemas/NullEnum" - } - ] - }, - "byWeekdays": { - "readOnly": true, - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/ByWeekdaysEnum" - }, - { - "$ref": "#/components/schemas/NullEnum" - } - ] - }, - "count": { - "type": "integer", - "readOnly": true, - "nullable": true, - "description": "How many occurrences should be generated." - }, - "freq": { - "allOf": [ - { - "$ref": "#/components/schemas/FreqEnum" - } - ], - "readOnly": true - }, - "id": { - "type": "integer", - "readOnly": true - }, - "interval": { - "type": "integer", - "readOnly": true, - "default": 1, - "description": "The interval between each freq iteration." - }, - "name": { - "type": "string", - "readOnly": true - } - } - }, - "PatchedScheduleCreateUpdateRequest": { - "type": "object", - "properties": { - "schedule": { - "allOf": [ - { - "$ref": "#/components/schemas/ScheduleInRequest" - } - ], - "description": "`Schedule` object." - }, - "solutions": { - "type": "object", - "additionalProperties": { - "enum": [ - "theirs", - "ours", - "theirs-start", - "ours-start", - "theirs-end", - "ours-end", - "theirs-both", - "ours-both" - ], - "type": "string", - "description": "**theirs**: Discard projected timeslot. Keep existing timeslot(s).\n\n\n**ours**: Create projected timeslot. Delete existing timeslot(s).\n\n\n**theirs-start**: Keep existing timeslot. Create projected timeslot with start time of existing end.\n\n\n**ours-start**: Create projected timeslot. Change end of existing timeslot to projected start time.\n\n\n**theirs-end**: Keep existing timeslot. Create projected timeslot with end of existing start time.\n\n\n**ours-end**: Create projected timeslot. Change start of existing timeslot to projected end time.\n\n\n**theirs-both**: Keep existing timeslot. Create two projected timeslots with end of existing start and start of existing end.\n\n\n**ours-both**: Create projected timeslot. Split existing timeslot into two: \n\n* set existing end time to projected start,\n* create another timeslot with start = projected end and end = existing end." - }, - "description": "Array of solution choices." - }, - "notes": { - "type": "object", - "additionalProperties": { - "type": "integer" - }, - "description": "Array of `Note` objects." - }, - "playlists": { - "type": "object", - "additionalProperties": { - "type": "integer" - }, - "description": "Array of `Playlist` IDs." - } - } - }, - "PatchedShow": { - "type": "object", - "properties": { - "categoryIds": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "Array of `Category` IDs." - }, - "cbaSeriesId": { - "type": "integer", - "nullable": true, - "description": "CBA series ID." - }, - "defaultPlaylistId": { - "type": "integer", - "nullable": true, - "description": "Default `Playlist` ID for this show." - }, - "description": { - "type": "string", - "description": "Description of this show." - }, - "email": { - "type": "string", - "format": "email", - "nullable": true, - "description": "Email address of this show.", - "maxLength": 254 - }, - "fundingCategoryId": { - "type": "integer", - "description": "`FundingCategory` ID." - }, - "hostIds": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "`Profile` IDs that host this show." - }, - "id": { - "type": "integer", - "readOnly": true - }, - "imageId": { - "type": "integer", - "nullable": true, - "description": "`Image` ID of this show." - }, - "internalNote": { - "type": "string", - "description": "Internal note for this show." - }, - "isActive": { - "type": "boolean", - "description": "True if this show is active." - }, - "isPublic": { - "type": "boolean", - "description": "True if this show is public." - }, - "languageIds": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "`Language` IDs of this show." - }, - "links": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProfileLink" - }, - "description": "Array of `Link` objects." - }, - "logoId": { - "type": "integer", - "nullable": true, - "description": "`Image` ID of the logo of this show." - }, - "musicFocusIds": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "Array of `MusicFocus` IDs." - }, - "name": { - "type": "string", - "description": "Name of this Show.", - "maxLength": 255 - }, - "ownerIds": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "Array of `User` IDs owning this Show." - }, - "predecessorId": { - "type": "integer", - "nullable": true, - "description": "`Show` ID that predeceeded this one." - }, - "shortDescription": { - "type": "string", - "description": "Short description of this show." - }, - "slug": { - "type": "string", - "description": "Slug of this show.", - "maxLength": 255, - "pattern": "^[-a-zA-Z0-9_]+$" - }, - "topicIds": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "Array of `Topic` IDs." - }, - "typeId": { - "type": "integer", - "description": "Array of `Type` IDs." - }, - "createdAt": { - "type": "string", - "format": "date-time", - "readOnly": true - }, - "createdBy": { - "type": "string", - "readOnly": true - }, - "updatedAt": { - "type": "string", - "format": "date-time", - "readOnly": true, - "nullable": true - }, - "updatedBy": { - "type": "string", - "readOnly": true - } - } - }, - "PatchedTimeSlot": { - "type": "object", - "properties": { - "memo": { - "type": "string", - "description": "Memo for this timeslot." - }, - "playlistId": { - "type": "integer", - "maximum": 2147483647, - "minimum": -2147483648, - "nullable": true, - "description": "Playlist ID of this timeslot." - }, - "repetitionOfId": { - "type": "integer", - "nullable": true, - "description": "This timeslot is a repetition of `Timeslot` ID." - }, - "end": { - "type": "string", - "format": "date-time", - "readOnly": true - }, - "id": { - "type": "integer", - "readOnly": true - }, - "noteId": { - "type": "integer", - "readOnly": true - }, - "scheduleId": { - "type": "integer", - "description": "`Schedule` ID of this timeslot." - }, - "showId": { - "type": "integer", - "readOnly": true - }, - "start": { - "type": "string", - "format": "date-time", - "readOnly": true - } - } - }, - "PatchedTopic": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "readOnly": true - }, - "isActive": { - "type": "boolean", - "description": "True if topic is active." - }, - "name": { - "type": "string", - "description": "Name of the topic.", - "maxLength": 32 - }, - "slug": { - "type": "string", - "description": "Slug of the topic.", - "maxLength": 32, - "pattern": "^[-a-zA-Z0-9_]+$" - } - } - }, - "PatchedType": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "readOnly": true - }, - "isActive": { - "type": "boolean", - "description": "True if type is active." - }, - "name": { - "type": "string", - "description": "Name of the type.", - "maxLength": 32 - }, - "slug": { - "type": "string", - "description": "Slug of the type.", - "maxLength": 32, - "pattern": "^[-a-zA-Z0-9_]+$" - } - } - }, - "PatchedUser": { - "type": "object", - "properties": { - "cba": { - "$ref": "#/components/schemas/CBA" - }, - "email": { - "type": "string", - "format": "email", - "title": "Email address", - "maxLength": 254 - }, - "firstName": { - "type": "string", - "maxLength": 150 - }, - "isActive": { - "type": "boolean", - "title": "Active", - "description": "Designates whether this user should be treated as active. Unselect this instead of deleting accounts." - }, - "isStaff": { - "type": "boolean", - "title": "Staff status", - "description": "Designates whether the user can log into this admin site." - }, - "isSuperuser": { - "type": "boolean", - "title": "Superuser status", - "description": "Designates that this user has all permissions without explicitly assigning them." - }, - "lastName": { - "type": "string", - "maxLength": 150 - }, - "password": { - "type": "string", - "writeOnly": true, - "maxLength": 128 - }, - "username": { - "type": "string", - "description": "Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.", - "pattern": "^[\\w.@+-]+$", - "maxLength": 150 - }, - "id": { - "type": "integer", - "readOnly": true - }, - "isPrivileged": { - "type": "boolean", - "readOnly": true - }, - "permissions": { - "type": "array", - "items": { - "type": "string" - }, - "readOnly": true - }, - "profileIds": { - "type": "array", - "items": { - "type": "integer" - } - } - } - }, - "PlayoutEpisode": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "readOnly": true - }, - "title": { - "type": "string", - "description": "Title of the note.", - "maxLength": 128 - } - }, - "required": [ - "id" - ] - }, - "PlayoutProgramEntry": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "start": { - "type": "string", - "format": "date-time" - }, - "end": { - "type": "string", - "format": "date-time" - }, - "timeslotId": { - "type": "integer", - "nullable": true - }, - "playlistId": { - "type": "integer", - "nullable": true - }, - "showId": { - "type": "integer" - }, - "timeslot": { - "allOf": [ - { - "$ref": "#/components/schemas/TimeSlot" - } - ], - "nullable": true - }, - "show": { - "$ref": "#/components/schemas/PlayoutShow" - }, - "episode": { - "allOf": [ - { - "$ref": "#/components/schemas/PlayoutEpisode" - } - ], - "nullable": true - }, - "schedule": { - "allOf": [ - { - "$ref": "#/components/schemas/PlayoutSchedule" - } - ], - "nullable": true - } - }, - "required": [ - "end", - "episode", - "id", - "playlistId", - "schedule", - "show", - "showId", - "start", - "timeslot", - "timeslotId" - ] - }, - "PlayoutSchedule": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "readOnly": true - }, - "defaultPlaylistId": { - "type": "integer", - "maximum": 2147483647, - "minimum": -2147483648, - "nullable": true, - "description": "A tank ID in case the timeslot's playlist_id is empty." - } - }, - "required": [ - "id" - ] - }, - "PlayoutShow": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "readOnly": true - }, - "name": { - "type": "string", - "description": "Name of this Show.", - "maxLength": 255 - }, - "defaultPlaylistId": { - "type": "integer", - "maximum": 2147483647, - "minimum": -2147483648, - "nullable": true - } - }, - "required": [ - "id", - "name" - ] - }, - "Profile": { - "type": "object", - "properties": { - "biography": { - "type": "string", - "description": "Biography of the profile." - }, - "email": { - "type": "string", - "format": "email", - "description": "Email address of the profile.", - "maxLength": 254 - }, - "id": { - "type": "integer", - "readOnly": true - }, - "imageId": { - "type": "integer", - "nullable": true, - "description": "`Image` id of the profile." - }, - "isActive": { - "type": "boolean", - "description": "True if the profile is active." - }, - "links": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProfileLink" - }, - "description": "Array of `Link` objects. Can be empty." - }, - "name": { - "type": "string", - "description": "Display name of the profile.", - "maxLength": 128 - }, - "ownerIds": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "User ID(s) that own this profile." - }, - "createdAt": { - "type": "string", - "format": "date-time", - "readOnly": true - }, - "createdBy": { - "type": "string", - "readOnly": true - }, - "updatedAt": { - "type": "string", - "format": "date-time", - "readOnly": true, - "nullable": true - }, - "updatedBy": { - "type": "string", - "readOnly": true - } - }, - "required": [ - "createdAt", - "createdBy", - "id", - "name", - "ownerIds", - "updatedAt", - "updatedBy" - ] - }, - "ProfileLink": { - "type": "object", - "properties": { - "typeId": { - "type": "integer" - }, - "url": { - "type": "string", - "format": "uri", - "maxLength": 200 - } - }, - "required": [ - "typeId", - "url" - ] - }, - "ProjectedTimeSlot": { - "type": "object", - "properties": { - "hash": { - "type": "string" - }, - "start": { - "type": "string", - "format": "date-time" - }, - "end": { - "type": "string", - "format": "date-time" - }, - "collisions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Collision" - } - }, - "error": { - "type": "string", - "nullable": true - }, - "solutionChoices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SolutionChoicesEnum" - } - } - }, - "required": [ - "collisions", - "end", - "error", - "hash", - "solutionChoices", - "start" - ] - }, - "RRule": { - "type": "object", - "properties": { - "bySetPos": { - "readOnly": true, - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/BySetPosEnum" - }, - { - "$ref": "#/components/schemas/NullEnum" - } - ] - }, - "byWeekdays": { - "readOnly": true, - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/ByWeekdaysEnum" - }, - { - "$ref": "#/components/schemas/NullEnum" - } - ] - }, - "count": { - "type": "integer", - "readOnly": true, - "nullable": true, - "description": "How many occurrences should be generated." - }, - "freq": { - "allOf": [ - { - "$ref": "#/components/schemas/FreqEnum" - } - ], - "readOnly": true - }, - "id": { - "type": "integer", - "readOnly": true - }, - "interval": { - "type": "integer", - "readOnly": true, - "default": 1, - "description": "The interval between each freq iteration." - }, - "name": { - "type": "string", - "readOnly": true - } - }, - "required": [ - "bySetPos", - "byWeekdays", - "count", - "freq", - "id", - "interval", - "name" - ] - }, - "RadioSettings": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "readOnly": true - }, - "cba": { - "type": "object", - "properties": { - "apiKey": { - "type": "string" - }, - "domains": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "domains" - ], - "readOnly": true - }, - "imageRequirements": { - "type": "object", - "properties": { - "note.image": { - "type": "object", - "properties": { - "frame": { - "type": "object", - "properties": { - "aspectRatio": { - "oneOf": [ - { - "type": "array", - "items": { - "type": "integer" - }, - "minLength": 2, - "maxLength": 2 - }, - { - "type": "array", - "items": { - "type": "number", - "format": "double" - }, - "minLength": 2, - "maxLength": 2 - } - ] - }, - "shape": { - "enum": [ - "rect", - "round" - ], - "type": "string" - } - }, - "required": [ - "aspectRatio", - "shape" - ] - } - }, - "required": [ - "frame" - ] - }, - "profile.image": { - "type": "object", - "properties": { - "frame": { - "type": "object", - "properties": { - "aspectRatio": { - "oneOf": [ - { - "type": "array", - "items": { - "type": "integer" - }, - "minLength": 2, - "maxLength": 2 - }, - { - "type": "array", - "items": { - "type": "number", - "format": "double" - }, - "minLength": 2, - "maxLength": 2 - } - ] - }, - "shape": { - "enum": [ - "rect", - "round" - ], - "type": "string" - } - }, - "required": [ - "aspectRatio", - "shape" - ] - } - }, - "required": [ - "frame" - ] - }, - "show.image": { - "type": "object", - "properties": { - "frame": { - "type": "object", - "properties": { - "aspectRatio": { - "oneOf": [ - { - "type": "array", - "items": { - "type": "integer" - }, - "minLength": 2, - "maxLength": 2 - }, - { - "type": "array", - "items": { - "type": "number", - "format": "double" - }, - "minLength": 2, - "maxLength": 2 - } - ] - }, - "shape": { - "enum": [ - "rect", - "round" - ], - "type": "string" - } - }, - "required": [ - "aspectRatio", - "shape" - ] - } - }, - "required": [ - "frame" - ] - }, - "show.logo": { - "type": "object", - "properties": { - "frame": { - "type": "object", - "properties": { - "aspectRatio": { - "oneOf": [ - { - "type": "array", - "items": { - "type": "integer" - }, - "minLength": 2, - "maxLength": 2 - }, - { - "type": "array", - "items": { - "type": "number", - "format": "double" - }, - "minLength": 2, - "maxLength": 2 - } - ] - }, - "shape": { - "enum": [ - "rect", - "round" - ], - "type": "string" - } - }, - "required": [ - "aspectRatio", - "shape" - ] - } - }, - "required": [ - "frame" - ] - } - }, - "required": [ - "note.image", - "profile.image", - "show.image", - "show.logo" - ], - "readOnly": true - }, - "playout": { - "type": "object", - "properties": { - "lineInChannels": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "pools": { - "type": "object", - "properties": { - "fallback": { - "type": "string", - "nullable": true - } - }, - "required": [ - "fallback" - ] - } - }, - "required": [ - "lineInChannels", - "pools" - ], - "readOnly": true - }, - "program": { - "type": "object", - "properties": { - "fallback": { - "type": "object", - "properties": { - "defaultPool": { - "type": "string" - }, - "showId": { - "type": "integer", - "nullable": true - } - }, - "required": [ - "defaultPool", - "showId" - ] - }, - "micro": { - "type": "object", - "properties": { - "showId": { - "type": "integer", - "nullable": true - } - }, - "required": [ - "showId" - ] - } - }, - "required": [ - "fallback", - "micro" - ], - "readOnly": true - }, - "station": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "logo": { - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "height": { - "type": "integer" - }, - "width": { - "type": "integer" - } - }, - "required": [ - "height", - "url", - "width" - ], - "nullable": true - }, - "website": { - "type": "string" - } - }, - "required": [ - "logo", - "name", - "website" - ], - "readOnly": true - } - }, - "required": [ - "cba", - "id", - "imageRequirements", - "playout", - "program", - "station" - ] - }, - "Schedule": { - "type": "object", - "properties": { - "addBusinessDaysOnly": { - "type": "boolean", - "description": "Whether to add add_days_no but skipping the weekends. E.g. if weekday is Friday, the date returned will be the next Monday." - }, - "addDaysNo": { - "type": "integer", - "maximum": 2147483647, - "minimum": -2147483648, - "nullable": true, - "description": "Add a number of days to the generated dates. This can be useful for repetitions, like 'On the following day'." - }, - "byWeekday": { - "nullable": true, - "description": "Number of the Weekday.\n\n* `0` - Monday\n* `1` - Tuesday\n* `2` - Wednesday\n* `3` - Thursday\n* `4` - Friday\n* `5` - Saturday\n* `6` - Sunday", - "minimum": -2147483648, - "maximum": 2147483647, - "oneOf": [ - { - "$ref": "#/components/schemas/ByWeekdayEnum" - }, - { - "$ref": "#/components/schemas/NullEnum" - } - ] - }, - "defaultPlaylistId": { - "type": "integer", - "maximum": 2147483647, - "minimum": -2147483648, - "nullable": true, - "description": "A tank ID in case the timeslot's playlist_id is empty." - }, - "endTime": { - "type": "string", - "format": "time", - "nullable": true, - "description": "End time of schedule." - }, - "firstDate": { - "type": "string", - "format": "date", - "description": "Start date of schedule." - }, - "id": { - "type": "integer", - "readOnly": true - }, - "isRepetition": { - "type": "boolean", - "description": "Whether the schedule is a repetition." - }, - "lastDate": { - "type": "string", - "format": "date", - "nullable": true, - "description": "End date of schedule." - }, - "rruleId": { - "type": "integer", - "description": "A recurrence rule.", - "readOnly": true - }, - "showId": { - "type": "integer", - "description": "Show the schedule belongs to.", - "readOnly": true - }, - "startTime": { - "type": "string", - "format": "time", - "description": "Start time of schedule." - } - }, - "required": [ - "firstDate", - "id", - "rruleId", - "showId", - "startTime" - ] - }, - "ScheduleConflictResponse": { - "type": "object", - "properties": { - "projected": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProjectedTimeSlot" - } - }, - "solutions": { - "type": "object", - "additionalProperties": { - "enum": [ - "theirs", - "ours", - "theirs-start", - "ours-start", - "theirs-end", - "ours-end", - "theirs-both", - "ours-both" - ], - "type": "string", - "description": "* `theirs` - theirs\n* `ours` - ours\n* `theirs-start` - theirs-start\n* `ours-start` - ours-start\n* `theirs-end` - theirs-end\n* `ours-end` - ours-end\n* `theirs-both` - theirs-both\n* `ours-both` - ours-both" - } - }, - "notes": { - "type": "object", - "additionalProperties": { - "type": "integer" - } - }, - "playlists": { - "type": "object", - "additionalProperties": { - "type": "integer" - } - }, - "schedule": { - "$ref": "#/components/schemas/UnsavedSchedule" - } - }, - "required": [ - "notes", - "playlists", - "projected", - "schedule", - "solutions" - ] - }, - "ScheduleCreateUpdateRequest": { - "type": "object", - "properties": { - "schedule": { - "allOf": [ - { - "$ref": "#/components/schemas/ScheduleInRequest" - } - ], - "description": "`Schedule` object." - }, - "solutions": { - "type": "object", - "additionalProperties": { - "enum": [ - "theirs", - "ours", - "theirs-start", - "ours-start", - "theirs-end", - "ours-end", - "theirs-both", - "ours-both" - ], - "type": "string", - "description": "**theirs**: Discard projected timeslot. Keep existing timeslot(s).\n\n\n**ours**: Create projected timeslot. Delete existing timeslot(s).\n\n\n**theirs-start**: Keep existing timeslot. Create projected timeslot with start time of existing end.\n\n\n**ours-start**: Create projected timeslot. Change end of existing timeslot to projected start time.\n\n\n**theirs-end**: Keep existing timeslot. Create projected timeslot with end of existing start time.\n\n\n**ours-end**: Create projected timeslot. Change start of existing timeslot to projected end time.\n\n\n**theirs-both**: Keep existing timeslot. Create two projected timeslots with end of existing start and start of existing end.\n\n\n**ours-both**: Create projected timeslot. Split existing timeslot into two: \n\n* set existing end time to projected start,\n* create another timeslot with start = projected end and end = existing end." - }, - "description": "Array of solution choices." - }, - "notes": { - "type": "object", - "additionalProperties": { - "type": "integer" - }, - "description": "Array of `Note` objects." - }, - "playlists": { - "type": "object", - "additionalProperties": { - "type": "integer" - }, - "description": "Array of `Playlist` IDs." - } - }, - "required": [ - "schedule" - ] - }, - "ScheduleDryRunResponse": { - "type": "object", - "properties": { - "created": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DryRunTimeSlot" - } - }, - "updated": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DryRunTimeSlot" - } - }, - "deleted": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DryRunTimeSlot" - } - } - }, - "required": [ - "created", - "deleted", - "updated" - ] - }, - "ScheduleInRequest": { - "type": "object", - "properties": { - "addBusinessDaysOnly": { - "type": "boolean", - "description": "Whether to add add_days_no but skipping the weekends. E.g. if weekday is Friday, the date returned will be the next Monday." - }, - "addDaysNo": { - "type": "integer", - "maximum": 2147483647, - "minimum": -2147483648, - "nullable": true, - "description": "Add a number of days to the generated dates. This can be useful for repetitions, like 'On the following day'." - }, - "byWeekday": { - "nullable": true, - "description": "Number of the Weekday.\n\n* `0` - Monday\n* `1` - Tuesday\n* `2` - Wednesday\n* `3` - Thursday\n* `4` - Friday\n* `5` - Saturday\n* `6` - Sunday", - "minimum": -2147483648, - "maximum": 2147483647, - "oneOf": [ - { - "$ref": "#/components/schemas/ByWeekdayEnum" - }, - { - "$ref": "#/components/schemas/NullEnum" - } - ] - }, - "defaultPlaylistId": { - "type": "integer", - "maximum": 2147483647, - "minimum": -2147483648, - "nullable": true, - "description": "A tank ID in case the timeslot's playlist_id is empty." - }, - "dryrun": { - "type": "boolean", - "writeOnly": true, - "description": "Whether to simulate the database changes. If true, no database changes will occur. Instead a list of objects that would be created, updated and deleted if dryrun was false will be returned." - }, - "endTime": { - "type": "string", - "format": "time", - "nullable": true, - "description": "End time of schedule." - }, - "firstDate": { - "type": "string", - "format": "date", - "description": "Start date of schedule." - }, - "isRepetition": { - "type": "boolean", - "description": "Whether the schedule is a repetition." - }, - "lastDate": { - "type": "string", - "format": "date", - "nullable": true, - "description": "End date of schedule." - }, - "rruleId": { - "type": "integer", - "description": "A recurrence rule.", - "readOnly": true - }, - "showId": { - "type": "integer", - "description": "Show the schedule belongs to.", - "readOnly": true - }, - "startTime": { - "type": "string", - "format": "time", - "description": "Start time of schedule." - } - }, - "required": [ - "firstDate", - "rruleId", - "showId", - "startTime" - ] - }, - "ScheduleResponse": { - "type": "object", - "properties": { - "projected": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProjectedTimeSlot" - } - }, - "solutions": { - "type": "object", - "additionalProperties": { - "enum": [ - "theirs", - "ours", - "theirs-start", - "ours-start", - "theirs-end", - "ours-end", - "theirs-both", - "ours-both" - ], - "type": "string", - "description": "* `theirs` - theirs\n* `ours` - ours\n* `theirs-start` - theirs-start\n* `ours-start` - ours-start\n* `theirs-end` - theirs-end\n* `ours-end` - ours-end\n* `theirs-both` - theirs-both\n* `ours-both` - ours-both" - } - }, - "notes": { - "type": "object", - "additionalProperties": { - "type": "integer" - } - }, - "playlists": { - "type": "object", - "additionalProperties": { - "type": "integer" - } - }, - "schedule": { - "$ref": "#/components/schemas/Schedule" - } - }, - "required": [ - "notes", - "playlists", - "projected", - "schedule", - "solutions" - ] - }, - "Show": { - "type": "object", - "properties": { - "categoryIds": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "Array of `Category` IDs." - }, - "cbaSeriesId": { - "type": "integer", - "nullable": true, - "description": "CBA series ID." - }, - "defaultPlaylistId": { - "type": "integer", - "nullable": true, - "description": "Default `Playlist` ID for this show." - }, - "description": { - "type": "string", - "description": "Description of this show." - }, - "email": { - "type": "string", - "format": "email", - "nullable": true, - "description": "Email address of this show.", - "maxLength": 254 - }, - "fundingCategoryId": { - "type": "integer", - "description": "`FundingCategory` ID." - }, - "hostIds": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "`Profile` IDs that host this show." - }, - "id": { - "type": "integer", - "readOnly": true - }, - "imageId": { - "type": "integer", - "nullable": true, - "description": "`Image` ID of this show." - }, - "internalNote": { - "type": "string", - "description": "Internal note for this show." - }, - "isActive": { - "type": "boolean", - "description": "True if this show is active." - }, - "isPublic": { - "type": "boolean", - "description": "True if this show is public." - }, - "languageIds": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "`Language` IDs of this show." - }, - "links": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProfileLink" - }, - "description": "Array of `Link` objects." - }, - "logoId": { - "type": "integer", - "nullable": true, - "description": "`Image` ID of the logo of this show." - }, - "musicFocusIds": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "Array of `MusicFocus` IDs." - }, - "name": { - "type": "string", - "description": "Name of this Show.", - "maxLength": 255 - }, - "ownerIds": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "Array of `User` IDs owning this Show." - }, - "predecessorId": { - "type": "integer", - "nullable": true, - "description": "`Show` ID that predeceeded this one." - }, - "shortDescription": { - "type": "string", - "description": "Short description of this show." - }, - "slug": { - "type": "string", - "description": "Slug of this show.", - "maxLength": 255, - "pattern": "^[-a-zA-Z0-9_]+$" - }, - "topicIds": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "Array of `Topic` IDs." - }, - "typeId": { - "type": "integer", - "description": "Array of `Type` IDs." - }, - "createdAt": { - "type": "string", - "format": "date-time", - "readOnly": true - }, - "createdBy": { - "type": "string", - "readOnly": true - }, - "updatedAt": { - "type": "string", - "format": "date-time", - "readOnly": true, - "nullable": true - }, - "updatedBy": { - "type": "string", - "readOnly": true - } - }, - "required": [ - "categoryIds", - "createdAt", - "createdBy", - "fundingCategoryId", - "hostIds", - "id", - "languageIds", - "musicFocusIds", - "name", - "ownerIds", - "shortDescription", - "topicIds", - "typeId", - "updatedAt", - "updatedBy" - ] - }, - "SolutionChoicesEnum": { - "enum": [ - "theirs", - "ours", - "theirs-start", - "ours-start", - "theirs-end", - "ours-end", - "theirs-both", - "ours-both" - ], - "type": "string", - "description": "**theirs**: Discard projected timeslot. Keep existing timeslot(s).\n\n\n**ours**: Create projected timeslot. Delete existing timeslot(s).\n\n\n**theirs-start**: Keep existing timeslot. Create projected timeslot with start time of existing end.\n\n\n**ours-start**: Create projected timeslot. Change end of existing timeslot to projected start time.\n\n\n**theirs-end**: Keep existing timeslot. Create projected timeslot with end of existing start time.\n\n\n**ours-end**: Create projected timeslot. Change start of existing timeslot to projected end time.\n\n\n**theirs-both**: Keep existing timeslot. Create two projected timeslots with end of existing start and start of existing end.\n\n\n**ours-both**: Create projected timeslot. Split existing timeslot into two: \n\n* set existing end time to projected start,\n* create another timeslot with start = projected end and end = existing end." - }, - "TimeSlot": { - "type": "object", - "properties": { - "memo": { - "type": "string", - "description": "Memo for this timeslot." - }, - "playlistId": { - "type": "integer", - "maximum": 2147483647, - "minimum": -2147483648, - "nullable": true, - "description": "Playlist ID of this timeslot." - }, - "repetitionOfId": { - "type": "integer", - "nullable": true, - "description": "This timeslot is a repetition of `Timeslot` ID." - }, - "end": { - "type": "string", - "format": "date-time", - "readOnly": true - }, - "id": { - "type": "integer", - "readOnly": true - }, - "noteId": { - "type": "integer", - "readOnly": true - }, - "scheduleId": { - "type": "integer", - "description": "`Schedule` ID of this timeslot." - }, - "showId": { - "type": "integer", - "readOnly": true - }, - "start": { - "type": "string", - "format": "date-time", - "readOnly": true - } - }, - "required": [ - "end", - "id", - "noteId", - "showId", - "start" - ] - }, - "Topic": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "readOnly": true - }, - "isActive": { - "type": "boolean", - "description": "True if topic is active." - }, - "name": { - "type": "string", - "description": "Name of the topic.", - "maxLength": 32 - }, - "slug": { - "type": "string", - "description": "Slug of the topic.", - "maxLength": 32, - "pattern": "^[-a-zA-Z0-9_]+$" - } - }, - "required": [ - "id", - "name", - "slug" - ] - }, - "Type": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "readOnly": true - }, - "isActive": { - "type": "boolean", - "description": "True if type is active." - }, - "name": { - "type": "string", - "description": "Name of the type.", - "maxLength": 32 - }, - "slug": { - "type": "string", - "description": "Slug of the type.", - "maxLength": 32, - "pattern": "^[-a-zA-Z0-9_]+$" - } - }, - "required": [ - "id", - "name", - "slug" - ] - }, - "UnsavedSchedule": { - "type": "object", - "properties": { - "addBusinessDaysOnly": { - "type": "boolean", - "description": "Whether to add add_days_no but skipping the weekends. E.g. if weekday is Friday, the date returned will be the next Monday." - }, - "addDaysNo": { - "type": "integer", - "maximum": 2147483647, - "minimum": -2147483648, - "nullable": true, - "description": "Add a number of days to the generated dates. This can be useful for repetitions, like 'On the following day'." - }, - "byWeekday": { - "nullable": true, - "description": "Number of the Weekday.\n\n* `0` - Monday\n* `1` - Tuesday\n* `2` - Wednesday\n* `3` - Thursday\n* `4` - Friday\n* `5` - Saturday\n* `6` - Sunday", - "minimum": -2147483648, - "maximum": 2147483647, - "oneOf": [ - { - "$ref": "#/components/schemas/ByWeekdayEnum" - }, - { - "$ref": "#/components/schemas/NullEnum" - } - ] - }, - "defaultPlaylistId": { - "type": "integer", - "maximum": 2147483647, - "minimum": -2147483648, - "nullable": true, - "description": "A tank ID in case the timeslot's playlist_id is empty." - }, - "endTime": { - "type": "string", - "format": "time", - "nullable": true, - "description": "End time of schedule." - }, - "firstDate": { - "type": "string", - "format": "date", - "description": "Start date of schedule." - }, - "id": { - "type": "integer", - "nullable": true - }, - "isRepetition": { - "type": "boolean", - "description": "Whether the schedule is a repetition." - }, - "lastDate": { - "type": "string", - "format": "date", - "nullable": true, - "description": "End date of schedule." - }, - "rruleId": { - "type": "integer", - "description": "A recurrence rule.", - "readOnly": true - }, - "showId": { - "type": "integer", - "description": "Show the schedule belongs to.", - "readOnly": true - }, - "startTime": { - "type": "string", - "format": "time", - "description": "Start time of schedule." - } - }, - "required": [ - "firstDate", - "id", - "rruleId", - "showId", - "startTime" - ] - }, - "User": { - "type": "object", - "properties": { - "cba": { - "$ref": "#/components/schemas/CBA" - }, - "email": { - "type": "string", - "format": "email", - "title": "Email address", - "maxLength": 254 - }, - "firstName": { - "type": "string", - "maxLength": 150 - }, - "isActive": { - "type": "boolean", - "title": "Active", - "description": "Designates whether this user should be treated as active. Unselect this instead of deleting accounts." - }, - "isStaff": { - "type": "boolean", - "title": "Staff status", - "description": "Designates whether the user can log into this admin site." - }, - "isSuperuser": { - "type": "boolean", - "title": "Superuser status", - "description": "Designates that this user has all permissions without explicitly assigning them." - }, - "lastName": { - "type": "string", - "maxLength": 150 - }, - "password": { - "type": "string", - "writeOnly": true, - "maxLength": 128 - }, - "username": { - "type": "string", - "description": "Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.", - "pattern": "^[\\w.@+-]+$", - "maxLength": 150 - }, - "id": { - "type": "integer", - "readOnly": true - }, - "isPrivileged": { - "type": "boolean", - "readOnly": true - }, - "permissions": { - "type": "array", - "items": { - "type": "string" - }, - "readOnly": true - }, - "profileIds": { - "type": "array", - "items": { - "type": "integer" - } - } - }, - "required": [ - "id", - "isPrivileged", - "password", - "permissions", - "username" - ] - } + "openapi": "3.0.3", + "info": { + "title": "AURA Steering API", + "version": "1.0.0", + "description": "Programme/schedule management for Aura" + }, + "paths": {}, + "components": { + "schemas": { + "PlayoutEpisode": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "readOnly": true + }, + "title": { + "type": "string", + "description": "Title of the note.", + "maxLength": 128 + } }, - "securitySchemes": { - "tokenAuth": { - "type": "http", - "scheme": "bearer" - } - } + "required": ["id"] + }, + "PlayoutProgramEntry": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "start": { + "type": "string", + "format": "date-time" + }, + "end": { + "type": "string", + "format": "date-time" + }, + "timeslotId": { + "type": "integer", + "nullable": true + }, + "playlistId": { + "type": "integer", + "nullable": true + }, + "showId": { + "type": "integer" + }, + "timeslot": { + "allOf": [ + { + "$ref": "#/components/schemas/TimeSlot" + } + ], + "nullable": true + }, + "show": { + "$ref": "#/components/schemas/PlayoutShow" + }, + "episode": { + "allOf": [ + { + "$ref": "#/components/schemas/PlayoutEpisode" + } + ], + "nullable": true + }, + "schedule": { + "allOf": [ + { + "$ref": "#/components/schemas/PlayoutSchedule" + } + ], + "nullable": true + } + }, + "required": [ + "end", + "episode", + "id", + "playlistId", + "schedule", + "show", + "showId", + "start", + "timeslot", + "timeslotId" + ] + }, + "PlayoutSchedule": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "readOnly": true + }, + "defaultPlaylistId": { + "type": "integer", + "nullable": true, + "description": "A tank ID in case the timeslot's playlist_id is empty." + } + }, + "required": ["id"] + }, + "PlayoutShow": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "readOnly": true + }, + "name": { + "type": "string", + "description": "Name of this Show.", + "maxLength": 255 + }, + "defaultPlaylistId": { + "type": "integer", + "nullable": true + } + }, + "required": ["id", "name"] + }, + "TimeSlot": { + "type": "object", + "properties": { + "memo": { + "type": "string", + "description": "Memo for this timeslot." + }, + "playlistId": { + "type": "integer", + "nullable": true, + "description": "Playlist ID of this timeslot." + }, + "repetitionOfId": { + "type": "integer", + "nullable": true, + "description": "This timeslot is a repetition of `Timeslot` ID." + }, + "end": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "id": { + "type": "integer", + "readOnly": true + }, + "noteId": { + "type": "integer", + "readOnly": true + }, + "scheduleId": { + "type": "integer", + "description": "`Schedule` ID of this timeslot." + }, + "showId": { + "type": "integer", + "readOnly": true + }, + "start": { + "type": "string", + "format": "date-time", + "readOnly": true + } + }, + "required": ["end", "id", "noteId", "showId", "start"] + } } -} \ No newline at end of file + } +} diff --git a/src/aura_steering_api/models/nested_timeslot.py b/src/aura_steering_api/models/nested_timeslot.py deleted file mode 100644 index 8b2cf16cb23e0a9a857fbb90a9544c8cd0f35b97..0000000000000000000000000000000000000000 --- a/src/aura_steering_api/models/nested_timeslot.py +++ /dev/null @@ -1,103 +0,0 @@ -import datetime -from typing import Any, Dict, List, Optional, Type, TypeVar - -import attr -from dateutil.parser import isoparse - -T = TypeVar("T", bound="NestedTimeslot") - - -@attr.s(auto_attribs=True) -class NestedTimeslot: - """ - Attributes: - end (datetime.datetime): - is_virtual (bool): - memo (str): - start (datetime.datetime): - id (Optional[int]): - playlist_id (Optional[int]): - repetition_of_id (Optional[int]): - """ - - end: datetime.datetime - is_virtual: bool - memo: str - start: datetime.datetime - id: Optional[int] - playlist_id: Optional[int] - repetition_of_id: Optional[int] - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - end = self.end.isoformat() - - is_virtual = self.is_virtual - memo = self.memo - start = self.start.isoformat() - - id = self.id - playlist_id = self.playlist_id - repetition_of_id = self.repetition_of_id - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "end": end, - "isVirtual": is_virtual, - "memo": memo, - "start": start, - "id": id, - "playlistId": playlist_id, - "repetitionOfId": repetition_of_id, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - end = isoparse(d.pop("end")) - - is_virtual = d.pop("isVirtual") - - memo = d.pop("memo") - - start = isoparse(d.pop("start")) - - id = d.pop("id") - - playlist_id = d.pop("playlistId") - - repetition_of_id = d.pop("repetitionOfId") - - nested_timeslot = cls( - end=end, - is_virtual=is_virtual, - memo=memo, - start=start, - id=id, - playlist_id=playlist_id, - repetition_of_id=repetition_of_id, - ) - - nested_timeslot.additional_properties = d - return nested_timeslot - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/src/aura_steering_api/models/playout_entry.py b/src/aura_steering_api/models/playout_entry.py deleted file mode 100644 index 82af8cd07c436b4842705ed6707403eb91d582f1..0000000000000000000000000000000000000000 --- a/src/aura_steering_api/models/playout_entry.py +++ /dev/null @@ -1,98 +0,0 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Optional, Type, TypeVar - -import attr - -if TYPE_CHECKING: - from ..models.nested_timeslot import NestedTimeslot - from ..models.playout_entry_episode import PlayoutEntryEpisode - from ..models.playout_entry_schedule import PlayoutEntrySchedule - from ..models.playout_entry_show import PlayoutEntryShow - - -T = TypeVar("T", bound="PlayoutEntry") - - -@attr.s(auto_attribs=True) -class PlayoutEntry: - """ - Attributes: - episode (PlayoutEntryEpisode): - show (PlayoutEntryShow): - timeslot (NestedTimeslot): - schedule (Optional[PlayoutEntrySchedule]): - """ - - episode: "PlayoutEntryEpisode" - show: "PlayoutEntryShow" - timeslot: "NestedTimeslot" - schedule: Optional["PlayoutEntrySchedule"] - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - episode = self.episode.to_dict() - - show = self.show.to_dict() - - timeslot = self.timeslot.to_dict() - - schedule = self.schedule.to_dict() if self.schedule else None - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "episode": episode, - "show": show, - "timeslot": timeslot, - "schedule": schedule, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.nested_timeslot import NestedTimeslot - from ..models.playout_entry_episode import PlayoutEntryEpisode - from ..models.playout_entry_schedule import PlayoutEntrySchedule - from ..models.playout_entry_show import PlayoutEntryShow - - d = src_dict.copy() - episode = PlayoutEntryEpisode.from_dict(d.pop("episode")) - - show = PlayoutEntryShow.from_dict(d.pop("show")) - - timeslot = NestedTimeslot.from_dict(d.pop("timeslot")) - - _schedule = d.pop("schedule") - schedule: Optional[PlayoutEntrySchedule] - if _schedule is None: - schedule = None - else: - schedule = PlayoutEntrySchedule.from_dict(_schedule) - - playout_entry = cls( - episode=episode, - show=show, - timeslot=timeslot, - schedule=schedule, - ) - - playout_entry.additional_properties = d - return playout_entry - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/src/aura_steering_api/models/playout_entry_episode.py b/src/aura_steering_api/models/playout_entry_episode.py deleted file mode 100644 index c13f4fb61d9852a6af3150f22a1ca5d6c2a778fd..0000000000000000000000000000000000000000 --- a/src/aura_steering_api/models/playout_entry_episode.py +++ /dev/null @@ -1,64 +0,0 @@ -from typing import Any, Dict, List, Optional, Type, TypeVar - -import attr - -T = TypeVar("T", bound="PlayoutEntryEpisode") - - -@attr.s(auto_attribs=True) -class PlayoutEntryEpisode: - """ - Attributes: - title (str): - id (Optional[int]): - """ - - title: str - id: Optional[int] - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - title = self.title - id = self.id - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "title": title, - "id": id, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - title = d.pop("title") - - id = d.pop("id") - - playout_entry_episode = cls( - title=title, - id=id, - ) - - playout_entry_episode.additional_properties = d - return playout_entry_episode - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/src/aura_steering_api/models/playout_entry_schedule.py b/src/aura_steering_api/models/playout_entry_schedule.py deleted file mode 100644 index 60651633c2ef6d49f4690735c594784a427ea2bc..0000000000000000000000000000000000000000 --- a/src/aura_steering_api/models/playout_entry_schedule.py +++ /dev/null @@ -1,64 +0,0 @@ -from typing import Any, Dict, List, Optional, Type, TypeVar - -import attr - -T = TypeVar("T", bound="PlayoutEntrySchedule") - - -@attr.s(auto_attribs=True) -class PlayoutEntrySchedule: - """ - Attributes: - id (Optional[int]): - default_playlist_id (Optional[int]): - """ - - id: Optional[int] - default_playlist_id: Optional[int] - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - id = self.id - default_playlist_id = self.default_playlist_id - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "id": id, - "defaultPlaylistId": default_playlist_id, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - id = d.pop("id") - - default_playlist_id = d.pop("defaultPlaylistId") - - playout_entry_schedule = cls( - id=id, - default_playlist_id=default_playlist_id, - ) - - playout_entry_schedule.additional_properties = d - return playout_entry_schedule - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/src/aura_steering_api/models/playout_entry_show.py b/src/aura_steering_api/models/playout_entry_show.py deleted file mode 100644 index f35cf4121afc7bc6e2aca449295799e03308b33f..0000000000000000000000000000000000000000 --- a/src/aura_steering_api/models/playout_entry_show.py +++ /dev/null @@ -1,71 +0,0 @@ -from typing import Any, Dict, List, Optional, Type, TypeVar - -import attr - -T = TypeVar("T", bound="PlayoutEntryShow") - - -@attr.s(auto_attribs=True) -class PlayoutEntryShow: - """ - Attributes: - id (int): - name (str): - default_playlist_id (Optional[int]): - """ - - id: int - name: str - default_playlist_id: Optional[int] - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - id = self.id - name = self.name - default_playlist_id = self.default_playlist_id - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "id": id, - "name": name, - "defaultPlaylistId": default_playlist_id, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - id = d.pop("id") - - name = d.pop("name") - - default_playlist_id = d.pop("defaultPlaylistId") - - playout_entry_show = cls( - id=id, - name=name, - default_playlist_id=default_playlist_id, - ) - - playout_entry_show.additional_properties = d - return playout_entry_show - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/src/aura_steering_api/models/time_slot.py b/src/aura_steering_api/models/time_slot.py index c0d3753d68881fb7b312edd20d2302e73eeea35f..8b6188769fc0acb000f9c9c7f83be506d54b5d1a 100644 --- a/src/aura_steering_api/models/time_slot.py +++ b/src/aura_steering_api/models/time_slot.py @@ -70,70 +70,6 @@ class TimeSlot: return field_dict - def to_multipart(self) -> Dict[str, Any]: - end = self.end.isoformat().encode() - - id = self.id if isinstance(self.id, Unset) else (None, str(self.id).encode(), "text/plain") - note_id = ( - self.note_id - if isinstance(self.note_id, Unset) - else (None, str(self.note_id).encode(), "text/plain") - ) - show_id = ( - self.show_id - if isinstance(self.show_id, Unset) - else (None, str(self.show_id).encode(), "text/plain") - ) - start = self.start.isoformat().encode() - - memo = ( - self.memo - if isinstance(self.memo, Unset) - else (None, str(self.memo).encode(), "text/plain") - ) - playlist_id = ( - self.playlist_id - if isinstance(self.playlist_id, Unset) - else (None, str(self.playlist_id).encode(), "text/plain") - ) - repetition_of_id = ( - self.repetition_of_id - if isinstance(self.repetition_of_id, Unset) - else (None, str(self.repetition_of_id).encode(), "text/plain") - ) - schedule_id = ( - self.schedule_id - if isinstance(self.schedule_id, Unset) - else (None, str(self.schedule_id).encode(), "text/plain") - ) - - field_dict: Dict[str, Any] = {} - field_dict.update( - { - key: (None, str(value).encode(), "text/plain") - for key, value in self.additional_properties.items() - } - ) - field_dict.update( - { - "end": end, - "id": id, - "noteId": note_id, - "showId": show_id, - "start": start, - } - ) - if memo is not UNSET: - field_dict["memo"] = memo - if playlist_id is not UNSET: - field_dict["playlistId"] = playlist_id - if repetition_of_id is not UNSET: - field_dict["repetitionOfId"] = repetition_of_id - if schedule_id is not UNSET: - field_dict["scheduleId"] = schedule_id - - return field_dict - @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() diff --git a/src/aura_tank_api/__init__.py b/src/aura_tank_api/__init__.py deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000