Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/sms-gateway/handlers/messages/3rdparty.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ func (h *ThirdPartyController) get(user models.User, c *fiber.Ctx) error {
// @Failure 400 {object} smsgateway.ErrorResponse "Invalid request"
// @Failure 401 {object} smsgateway.ErrorResponse "Unauthorized"
// @Failure 500 {object} smsgateway.ErrorResponse "Internal server error"
// @Router /3rdparty/v1/inbox/export [post]
// @Router /3rdparty/v1/messages/inbox/export [post]
//
// Export inbox
func (h *ThirdPartyController) postInboxExport(user models.User, c *fiber.Ctx) error {
Expand Down
126 changes: 64 additions & 62 deletions internal/sms-gateway/openapi/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,64 +147,6 @@ const docTemplate = `{
}
}
},
"/3rdparty/v1/inbox/export": {
"post": {
"security": [
{
"ApiAuth": []
}
],
"description": "Initiates process of inbox messages export via webhooks. For each message the ` + "`" + `sms:received` + "`" + ` webhook will be triggered. The webhooks will be triggered without specific order.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"User",
"Messages"
],
"summary": "Request inbox messages export",
"parameters": [
{
"description": "Export inbox request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/smsgateway.MessagesExportRequest"
}
}
],
"responses": {
"202": {
"description": "Inbox export request accepted",
"schema": {
"type": "object"
}
},
"400": {
"description": "Invalid request",
"schema": {
"$ref": "#/definitions/smsgateway.ErrorResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/smsgateway.ErrorResponse"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/smsgateway.ErrorResponse"
}
}
}
}
},
"/3rdparty/v1/logs": {
"get": {
"security": [
Expand Down Expand Up @@ -439,6 +381,64 @@ const docTemplate = `{
}
}
},
"/3rdparty/v1/messages/inbox/export": {
"post": {
"security": [
{
"ApiAuth": []
}
],
"description": "Initiates process of inbox messages export via webhooks. For each message the ` + "`" + `sms:received` + "`" + ` webhook will be triggered. The webhooks will be triggered without specific order.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"User",
"Messages"
],
"summary": "Request inbox messages export",
"parameters": [
{
"description": "Export inbox request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/smsgateway.MessagesExportRequest"
}
}
],
"responses": {
"202": {
"description": "Inbox export request accepted",
"schema": {
"type": "object"
}
},
"400": {
"description": "Invalid request",
"schema": {
"$ref": "#/definitions/smsgateway.ErrorResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/smsgateway.ErrorResponse"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/smsgateway.ErrorResponse"
}
}
}
}
},
"/3rdparty/v1/messages/{id}": {
"get": {
"security": [
Expand Down Expand Up @@ -1368,7 +1368,7 @@ const docTemplate = `{
"type": "object",
"properties": {
"passphrase": {
"description": "Passphrase is the encryption passphrase. If nil or empty, encryption is disabled.",
"description": "Passphrase is the encryption passphrase. If nil or empty, encryption is disabled. Must not be used with Cloud Server.",
"type": "string"
}
}
Expand Down Expand Up @@ -1470,7 +1470,7 @@ const docTemplate = `{
"minimum": 1
},
"signing_key": {
"description": "SigningKey is the secret key used for signing webhook payloads.",
"description": "SigningKey is the secret key used for signing webhook payloads. Must not be used with Cloud Server.",
"type": "string"
}
}
Expand Down Expand Up @@ -1546,15 +1546,17 @@ const docTemplate = `{
"sms:sent",
"sms:delivered",
"sms:failed",
"system:ping"
"system:ping",
"mms:received"
],
"x-enum-varnames": [
"WebhookEventSmsReceived",
"WebhookEventSmsDataReceived",
"WebhookEventSmsSent",
"WebhookEventSmsDelivered",
"WebhookEventSmsFailed",
"WebhookEventSystemPing"
"WebhookEventSystemPing",
"WebhookEventMmsReceived"
]
}
},
Expand Down
Loading