{ "swagger": "2.0", "info": { "contact": {} }, "paths": { "/alias": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Create alias", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "alias" ], "summary": "Create alias", "parameters": [ { "description": "Alias request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.AliasReq" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/alias/{id}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get alias by ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "alias" ], "summary": "Get alias", "parameters": [ { "type": "string", "description": "Alias ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/model.Alias" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Update alias", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "alias" ], "summary": "Update alias", "parameters": [ { "type": "string", "description": "Alias ID", "name": "id", "in": "path", "required": true }, { "description": "Alias request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.AliasReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "Delete alias", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "alias" ], "summary": "Delete alias", "parameters": [ { "type": "string", "description": "Alias ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/aliases": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get all aliases", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "alias" ], "summary": "Get aliases", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/model.AliasList" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/email": { "post": { "description": "Handle incoming email", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "email" ], "summary": "Email handler", "parameters": [ { "description": "Email body", "name": "email", "in": "body", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "string" } } } } }, "/initiatepasswordreset": { "post": { "description": "Initiate password reset", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Initiate password reset", "parameters": [ { "description": "Initiate password reset request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.EmailReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/login": { "post": { "description": "Login user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Login user", "parameters": [ { "description": "User request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.UserReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/login/begin": { "post": { "description": "Begin login process", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "webauthn" ], "summary": "Begin login", "parameters": [ { "description": "Email", "name": "email", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.EmailReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/login/finish": { "post": { "description": "Finish login process", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "webauthn" ], "summary": "Finish login", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/recipient": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Update recipient", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "recipient" ], "summary": "Update recipient", "parameters": [ { "description": "Recipient request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.RecipientReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Create recipient", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "recipient" ], "summary": "Create recipient", "parameters": [ { "description": "Recipient request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.EmailReq" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/recipient/activate/{id}": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Activate recipient", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "recipient" ], "summary": "Activate recipient", "parameters": [ { "type": "string", "description": "Recipient ID", "name": "id", "in": "path", "required": true }, { "description": "Activate request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.ActivateReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/recipient/sendotp/{id}": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Send recipient OTP", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "recipient" ], "summary": "Send recipient OTP", "parameters": [ { "type": "string", "description": "Recipient ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/recipient/{id}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get recipient by ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "recipient" ], "summary": "Get recipient", "parameters": [ { "type": "string", "description": "Recipient ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/model.Recipient" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "Delete recipient", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "recipient" ], "summary": "Delete recipient", "parameters": [ { "type": "string", "description": "Recipient ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/recipients": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get all recipients", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "recipient" ], "summary": "Get recipients", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/model.Recipient" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/register": { "post": { "description": "Register user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Register user", "parameters": [ { "description": "User request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.SignupUserReq" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/register/add": { "post": { "description": "Begin Add Passkey process", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "webauthn" ], "summary": "Add Passkey", "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/register/add/finish": { "post": { "description": "Finish add Passkey process", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "webauthn" ], "summary": "Finish add Passkey", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/register/begin": { "post": { "description": "Begin registration process", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "webauthn" ], "summary": "Begin registration", "parameters": [ { "description": "Email", "name": "email", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.SignupEmailReq" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/register/finish": { "post": { "description": "Finish registration process", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "webauthn" ], "summary": "Finish registration", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/resetpassword": { "put": { "description": "Reset password", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Reset password", "parameters": [ { "description": "Password reset request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.ResetPasswordReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/settings": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get settings", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "settings" ], "summary": "Get settings", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/model.Settings" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Update settings", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "settings" ], "summary": "Update settings", "parameters": [ { "description": "Settings", "name": "settings", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.SettingsReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/sub": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get subscription", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "subscription" ], "summary": "Get subscription", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/model.Subscription" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/subscription/update": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Update subscription", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "subscription" ], "summary": "Update subscription", "parameters": [ { "description": "Subscription request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.SubscriptionReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/user": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Get user", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/model.User" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/user/activate": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Activate user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Activate user", "parameters": [ { "description": "Activate request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.ActivateReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/user/changeemail": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Change email", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Change email", "parameters": [ { "description": "Change email request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.EmailReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/user/changepassword": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Change password", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Change password", "parameters": [ { "description": "Change password request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.ChangePasswordReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/user/credential/{id}": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "Delete credential by ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "webauthn" ], "summary": "Delete credential", "parameters": [ { "type": "string", "description": "Credential ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/user/credentials": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get user credentials", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "webauthn" ], "summary": "Get credentials", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/model.Credential" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/user/delete": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Delete user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Delete user", "parameters": [ { "description": "Delete user request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.DeleteUserReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/user/delete/request": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Delete user request", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Delete user request", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/user/logout": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Logout user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Logout user", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/user/sendotp": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Send user OTP", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Send user OTP", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/user/stats": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get user stats", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Get user stats", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/model.UserStats" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/user/totp/disable": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Disable TOTP", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Disable TOTP", "parameters": [ { "description": "TOTP confirm request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.TotpReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/user/totp/enable": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Enable TOTP", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Enable TOTP", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/model.TOTPNew" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/user/totp/enable/confirm": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Enable TOTP confirm", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Enable TOTP confirm", "parameters": [ { "description": "TOTP confirm request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.TotpReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/model.TOTPBackup" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } } }, "definitions": { "api.ActivateReq": { "type": "object", "required": [ "otp" ], "properties": { "otp": { "type": "string" } } }, "api.AliasReq": { "type": "object", "required": [ "domain", "recipients" ], "properties": { "catch_all_suffix": { "type": "string", "maxLength": 12, "minLength": 6 }, "description": { "type": "string" }, "domain": { "type": "string" }, "enabled": { "type": "boolean" }, "format": { "type": "string" }, "from_name": { "type": "string" }, "recipients": { "type": "string" } } }, "api.ChangePasswordReq": { "type": "object", "properties": { "password": { "type": "string" } } }, "api.DeleteUserReq": { "type": "object", "required": [ "otp" ], "properties": { "otp": { "type": "string" } } }, "api.EmailReq": { "type": "object", "required": [ "email" ], "properties": { "email": { "type": "string" } } }, "api.ErrorRes": { "type": "object", "properties": { "error": { "type": "string" } } }, "api.RecipientReq": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "string" }, "pgp_enabled": { "type": "boolean" }, "pgp_inline": { "type": "boolean" }, "pgp_key": { "type": "string" } } }, "api.ResetPasswordReq": { "type": "object", "required": [ "otp" ], "properties": { "otp": { "type": "string" }, "password": { "type": "string" } } }, "api.SettingsReq": { "type": "object", "required": [ "id" ], "properties": { "alias_format": { "type": "string" }, "domain": { "type": "string" }, "from_name": { "type": "string" }, "id": { "type": "string" }, "recipient": { "type": "string" } } }, "api.SignupEmailReq": { "type": "object", "required": [ "email", "preauthid", "preauthtokenhash", "subid" ], "properties": { "email": { "type": "string" }, "preauthid": { "type": "string" }, "preauthtokenhash": { "type": "string" }, "subid": { "type": "string" } } }, "api.SignupUserReq": { "type": "object", "required": [ "email", "preauthid", "preauthtokenhash", "subid" ], "properties": { "email": { "type": "string" }, "password": { "type": "string" }, "preauthid": { "type": "string" }, "preauthtokenhash": { "type": "string" }, "subid": { "type": "string" } } }, "api.SubscriptionReq": { "type": "object", "required": [ "id", "preauthid", "preauthtokenhash", "subid" ], "properties": { "id": { "type": "string" }, "preauthid": { "type": "string" }, "preauthtokenhash": { "type": "string" }, "subid": { "type": "string" } } }, "api.SuccessRes": { "type": "object", "properties": { "message": { "type": "string" } } }, "api.TotpReq": { "type": "object", "required": [ "otp" ], "properties": { "otp": { "type": "string", "maxLength": 8, "minLength": 6 } } }, "api.UserReq": { "type": "object", "required": [ "email" ], "properties": { "email": { "type": "string" }, "otp": { "type": "string", "maxLength": 8, "minLength": 0 }, "password": { "type": "string" } } }, "model.Alias": { "type": "object", "properties": { "catch_all": { "type": "boolean" }, "created_at": { "type": "string" }, "description": { "type": "string" }, "enabled": { "type": "boolean" }, "from_name": { "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" }, "recipients": { "type": "string" }, "stats": { "$ref": "#/definitions/model.AliasStats" } } }, "model.AliasList": { "type": "object", "properties": { "aliases": { "type": "array", "items": { "$ref": "#/definitions/model.Alias" } }, "total": { "type": "integer" } } }, "model.AliasStats": { "type": "object", "properties": { "blocks": { "type": "integer" }, "forwards": { "type": "integer" }, "replies": { "type": "integer" }, "sends": { "type": "integer" } } }, "model.Credential": { "type": "object", "properties": { "created_at": { "type": "string" }, "id": { "type": "string" }, "user_id": { "type": "string" } } }, "model.Recipient": { "type": "object", "properties": { "created_at": { "type": "string" }, "email": { "type": "string" }, "id": { "type": "string" }, "is_active": { "type": "boolean" }, "pgp_enabled": { "type": "boolean" }, "pgp_inline": { "type": "boolean" }, "pgp_key": { "type": "string" } } }, "model.Settings": { "type": "object", "properties": { "alias_format": { "type": "string" }, "created_at": { "type": "string" }, "domain": { "type": "string" }, "from_name": { "type": "string" }, "id": { "type": "string" }, "recipient": { "type": "string" } } }, "model.Subscription": { "type": "object", "properties": { "active_until": { "type": "string" }, "created_at": { "type": "string" }, "id": { "type": "string" }, "outage": { "type": "boolean" }, "status": { "$ref": "#/definitions/model.SubscriptionStatus" }, "tier": { "type": "string" }, "updated_at": { "type": "string" } } }, "model.SubscriptionStatus": { "type": "string", "enum": [ "active", "grace_period", "limited_access", "pending_delete" ], "x-enum-varnames": [ "Active", "GracePeriod", "LimitedAccess", "PendingDelete" ] }, "model.TOTPBackup": { "type": "object", "properties": { "backup": { "type": "string" } } }, "model.TOTPNew": { "type": "object", "properties": { "account": { "type": "string" }, "secret": { "type": "string" }, "uri": { "type": "string" } } }, "model.User": { "type": "object", "properties": { "created_at": { "type": "string" }, "email": { "type": "string" }, "id": { "type": "string" }, "is_active": { "type": "boolean" }, "totp_enabled": { "type": "boolean" } } }, "model.UserStats": { "type": "object", "properties": { "aliases": { "type": "integer" }, "blocks": { "type": "integer" }, "forwards": { "type": "integer" }, "messages": { "type": "array", "items": {} }, "replies": { "type": "integer" }, "sends": { "type": "integer" } } } } }