{
  "swagger": "2.0",
  "info": {
    "title": "evey/v1/notification.proto",
    "version": "version not set"
  },
  "tags": [
    {
      "name": "NotificationService"
    }
  ],
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "paths": {
    "/api/v1/admin/notifications": {
      "get": {
        "operationId": "NotificationService_ListAdminNotifications",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1ListAdminNotificationsResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "unreadOnly",
            "in": "query",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          }
        ],
        "tags": [
          "NotificationService"
        ]
      }
    },
    "/api/v1/admin/notifications/settings": {
      "get": {
        "operationId": "NotificationService_GetGlobalNotificationSettings",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1NotificationSettings"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "tags": [
          "NotificationService"
        ]
      },
      "put": {
        "operationId": "NotificationService_UpdateGlobalNotificationSettings",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1NotificationSettings"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/v1UpdateGlobalNotificationSettingsRequest"
            }
          }
        ],
        "tags": [
          "NotificationService"
        ]
      }
    },
    "/api/v1/notifications": {
      "get": {
        "operationId": "NotificationService_ListNotifications",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1ListNotificationsResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "profileId",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "unreadOnly",
            "in": "query",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          }
        ],
        "tags": [
          "NotificationService"
        ]
      },
      "delete": {
        "operationId": "NotificationService_DeleteAllNotifications",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1DeleteAllNotificationsResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "profileId",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": [
          "NotificationService"
        ]
      }
    },
    "/api/v1/notifications/read-all": {
      "post": {
        "operationId": "NotificationService_MarkAllRead",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1MarkAllReadResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/v1MarkAllReadRequest"
            }
          }
        ],
        "tags": [
          "NotificationService"
        ]
      }
    },
    "/api/v1/notifications/settings": {
      "get": {
        "operationId": "NotificationService_GetNotificationSettings",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1NotificationSettings"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "profileId",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": [
          "NotificationService"
        ]
      },
      "put": {
        "operationId": "NotificationService_UpdateNotificationSettings",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1NotificationSettings"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/v1UpdateNotificationSettingsRequest"
            }
          }
        ],
        "tags": [
          "NotificationService"
        ]
      }
    },
    "/api/v1/notifications/unread-count": {
      "get": {
        "operationId": "NotificationService_GetUnreadCount",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1GetUnreadCountResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "profileId",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": [
          "NotificationService"
        ]
      }
    },
    "/api/v1/notifications/{id}/read": {
      "post": {
        "operationId": "NotificationService_MarkRead",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1MarkReadResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "NotificationService"
        ]
      }
    }
  },
  "definitions": {
    "protobufAny": {
      "type": "object",
      "properties": {
        "@type": {
          "type": "string"
        }
      },
      "additionalProperties": {}
    },
    "rpcStatus": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32"
        },
        "message": {
          "type": "string"
        },
        "details": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/protobufAny"
          }
        }
      }
    },
    "v1DeleteAllNotificationsResponse": {
      "type": "object"
    },
    "v1GetUnreadCountResponse": {
      "type": "object",
      "properties": {
        "count": {
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "v1ListAdminNotificationsResponse": {
      "type": "object",
      "properties": {
        "notifications": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1Notification"
          }
        }
      }
    },
    "v1ListNotificationsResponse": {
      "type": "object",
      "properties": {
        "notifications": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1Notification"
          }
        }
      }
    },
    "v1MarkAllReadRequest": {
      "type": "object",
      "properties": {
        "profileId": {
          "type": "string"
        }
      }
    },
    "v1MarkAllReadResponse": {
      "type": "object"
    },
    "v1MarkReadResponse": {
      "type": "object"
    },
    "v1Notification": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "profileId": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "mediaItemId": {
          "type": "string"
        },
        "level": {
          "type": "string"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "expiresAt": {
          "type": "string",
          "format": "date-time"
        },
        "readAt": {
          "type": "string",
          "format": "date-time"
        },
        "subject": {
          "type": "string",
          "description": "subject + the counts are the notification AS DATA: the bare name it is\nabout (\"Lioness\") and how much came with it. title stays the label the\nserver rendered in English; a client that reads subject words the whole\nsentence in its own language and ignores title. subject is empty on rows\nwritten before this existed - fall back to title there."
        },
        "seasonCount": {
          "type": "integer",
          "format": "int32"
        },
        "episodeCount": {
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "v1NotificationLevel": {
      "type": "string",
      "enum": [
        "NOTIFICATION_LEVEL_UNSPECIFIED",
        "NOTIFICATION_LEVEL_DISABLED",
        "NOTIFICATION_LEVEL_ALL",
        "NOTIFICATION_LEVEL_RELEVANT",
        "NOTIFICATION_LEVEL_HIGHLY_RELEVANT"
      ],
      "default": "NOTIFICATION_LEVEL_UNSPECIFIED"
    },
    "v1NotificationSettings": {
      "type": "object",
      "properties": {
        "profileId": {
          "type": "string"
        },
        "movieLevel": {
          "$ref": "#/definitions/v1NotificationLevel"
        },
        "seriesLevel": {
          "$ref": "#/definitions/v1NotificationLevel"
        },
        "musicLevel": {
          "$ref": "#/definitions/v1NotificationLevel"
        }
      }
    },
    "v1UpdateGlobalNotificationSettingsRequest": {
      "type": "object",
      "properties": {
        "movieLevel": {
          "$ref": "#/definitions/v1NotificationLevel"
        },
        "seriesLevel": {
          "$ref": "#/definitions/v1NotificationLevel"
        },
        "musicLevel": {
          "$ref": "#/definitions/v1NotificationLevel"
        }
      }
    },
    "v1UpdateNotificationSettingsRequest": {
      "type": "object",
      "properties": {
        "profileId": {
          "type": "string"
        },
        "movieLevel": {
          "$ref": "#/definitions/v1NotificationLevel"
        },
        "seriesLevel": {
          "$ref": "#/definitions/v1NotificationLevel"
        },
        "musicLevel": {
          "$ref": "#/definitions/v1NotificationLevel"
        }
      }
    }
  }
}
