{
  "swagger": "2.0",
  "info": {
    "title": "evey/v1/push.proto",
    "version": "version not set"
  },
  "tags": [
    {
      "name": "PushService"
    }
  ],
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "paths": {
    "/api/v1/push/consent": {
      "get": {
        "operationId": "PushService_GetPushConsent",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1GetPushConsentResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "tags": [
          "PushService"
        ]
      },
      "put": {
        "operationId": "PushService_UpdatePushConsent",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1UpdatePushConsentResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/v1UpdatePushConsentRequest"
            }
          }
        ],
        "tags": [
          "PushService"
        ]
      }
    },
    "/api/v1/push/devices": {
      "get": {
        "summary": "Deprecated: no replacement. ListDevices backed the profile \"Devices\" tab,\nremoved from web and mobile in 2026-10: native device-token registration\n(the FCM-era RegisterDevice/UnregisterDevice pair) is gone, so the list\ncould only ever be empty. Kept answering an empty list for beta builds\nthat still open the old tab; remove after two server releases (ADR-0004).",
        "operationId": "PushService_ListDevices",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1ListDevicesResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "tags": [
          "PushService"
        ]
      }
    },
    "/api/v1/push/subscriptions": {
      "get": {
        "operationId": "PushService_ListWebPushSubscriptions",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1ListWebPushSubscriptionsResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "tags": [
          "PushService"
        ]
      },
      "delete": {
        "operationId": "PushService_DeleteWebPushSubscription",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1DeleteWebPushSubscriptionResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "endpoint",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": [
          "PushService"
        ]
      }
    },
    "/api/v1/push/vapid-key": {
      "get": {
        "operationId": "PushService_GetVAPIDKey",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1GetVAPIDKeyResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "tags": [
          "PushService"
        ]
      }
    },
    "/api/v1/push/web/register": {
      "post": {
        "operationId": "PushService_RegisterWebPush",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1RegisterWebPushResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/v1RegisterWebPushRequest"
            }
          }
        ],
        "tags": [
          "PushService"
        ]
      }
    },
    "/api/v1/push/web/unregister": {
      "delete": {
        "operationId": "PushService_UnregisterWebPush",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1UnregisterWebPushResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "endpoint",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": [
          "PushService"
        ]
      }
    }
  },
  "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"
          }
        }
      }
    },
    "v1DeleteWebPushSubscriptionResponse": {
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        }
      }
    },
    "v1Device": {
      "type": "object",
      "properties": {
        "token": {
          "type": "string"
        },
        "platform": {
          "type": "string"
        }
      },
      "description": "Deprecated with ListDevices."
    },
    "v1GetPushConsentResponse": {
      "type": "object",
      "properties": {
        "pushConsent": {
          "type": "boolean"
        }
      }
    },
    "v1GetVAPIDKeyResponse": {
      "type": "object",
      "properties": {
        "publicKey": {
          "type": "string"
        }
      }
    },
    "v1ListDevicesResponse": {
      "type": "object",
      "properties": {
        "devices": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1Device"
          }
        }
      },
      "description": "Deprecated with ListDevices."
    },
    "v1ListWebPushSubscriptionsResponse": {
      "type": "object",
      "properties": {
        "subscriptions": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1WebPushSubscription"
          }
        }
      }
    },
    "v1RegisterWebPushRequest": {
      "type": "object",
      "properties": {
        "endpoint": {
          "type": "string"
        },
        "keys": {
          "$ref": "#/definitions/v1WebPushKeys"
        },
        "consent": {
          "type": "boolean"
        }
      }
    },
    "v1RegisterWebPushResponse": {
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        }
      }
    },
    "v1UnregisterWebPushResponse": {
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        }
      }
    },
    "v1UpdatePushConsentRequest": {
      "type": "object",
      "properties": {
        "consent": {
          "type": "boolean"
        }
      }
    },
    "v1UpdatePushConsentResponse": {
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        }
      }
    },
    "v1WebPushKeys": {
      "type": "object",
      "properties": {
        "p256dh": {
          "type": "string"
        },
        "auth": {
          "type": "string"
        }
      }
    },
    "v1WebPushSubscription": {
      "type": "object",
      "properties": {
        "endpoint": {
          "type": "string"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    }
  }
}
