Skip to content

Commit 332a6e0

Browse files
committed
[handlers] fix inbox export path
1 parent 0ea8734 commit 332a6e0

File tree

2 files changed

+65
-63
lines changed

2 files changed

+65
-63
lines changed

internal/sms-gateway/handlers/messages/3rdparty.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ func (h *ThirdPartyController) get(user models.User, c *fiber.Ctx) error {
246246
// @Failure 400 {object} smsgateway.ErrorResponse "Invalid request"
247247
// @Failure 401 {object} smsgateway.ErrorResponse "Unauthorized"
248248
// @Failure 500 {object} smsgateway.ErrorResponse "Internal server error"
249-
// @Router /3rdparty/v1/inbox/export [post]
249+
// @Router /3rdparty/v1/messages/inbox/export [post]
250250
//
251251
// Export inbox
252252
func (h *ThirdPartyController) postInboxExport(user models.User, c *fiber.Ctx) error {

internal/sms-gateway/openapi/docs.go

Lines changed: 64 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -147,64 +147,6 @@ const docTemplate = `{
147147
}
148148
}
149149
},
150-
"/3rdparty/v1/inbox/export": {
151-
"post": {
152-
"security": [
153-
{
154-
"ApiAuth": []
155-
}
156-
],
157-
"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.",
158-
"consumes": [
159-
"application/json"
160-
],
161-
"produces": [
162-
"application/json"
163-
],
164-
"tags": [
165-
"User",
166-
"Messages"
167-
],
168-
"summary": "Request inbox messages export",
169-
"parameters": [
170-
{
171-
"description": "Export inbox request",
172-
"name": "request",
173-
"in": "body",
174-
"required": true,
175-
"schema": {
176-
"$ref": "#/definitions/smsgateway.MessagesExportRequest"
177-
}
178-
}
179-
],
180-
"responses": {
181-
"202": {
182-
"description": "Inbox export request accepted",
183-
"schema": {
184-
"type": "object"
185-
}
186-
},
187-
"400": {
188-
"description": "Invalid request",
189-
"schema": {
190-
"$ref": "#/definitions/smsgateway.ErrorResponse"
191-
}
192-
},
193-
"401": {
194-
"description": "Unauthorized",
195-
"schema": {
196-
"$ref": "#/definitions/smsgateway.ErrorResponse"
197-
}
198-
},
199-
"500": {
200-
"description": "Internal server error",
201-
"schema": {
202-
"$ref": "#/definitions/smsgateway.ErrorResponse"
203-
}
204-
}
205-
}
206-
}
207-
},
208150
"/3rdparty/v1/logs": {
209151
"get": {
210152
"security": [
@@ -439,6 +381,64 @@ const docTemplate = `{
439381
}
440382
}
441383
},
384+
"/3rdparty/v1/messages/inbox/export": {
385+
"post": {
386+
"security": [
387+
{
388+
"ApiAuth": []
389+
}
390+
],
391+
"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.",
392+
"consumes": [
393+
"application/json"
394+
],
395+
"produces": [
396+
"application/json"
397+
],
398+
"tags": [
399+
"User",
400+
"Messages"
401+
],
402+
"summary": "Request inbox messages export",
403+
"parameters": [
404+
{
405+
"description": "Export inbox request",
406+
"name": "request",
407+
"in": "body",
408+
"required": true,
409+
"schema": {
410+
"$ref": "#/definitions/smsgateway.MessagesExportRequest"
411+
}
412+
}
413+
],
414+
"responses": {
415+
"202": {
416+
"description": "Inbox export request accepted",
417+
"schema": {
418+
"type": "object"
419+
}
420+
},
421+
"400": {
422+
"description": "Invalid request",
423+
"schema": {
424+
"$ref": "#/definitions/smsgateway.ErrorResponse"
425+
}
426+
},
427+
"401": {
428+
"description": "Unauthorized",
429+
"schema": {
430+
"$ref": "#/definitions/smsgateway.ErrorResponse"
431+
}
432+
},
433+
"500": {
434+
"description": "Internal server error",
435+
"schema": {
436+
"$ref": "#/definitions/smsgateway.ErrorResponse"
437+
}
438+
}
439+
}
440+
}
441+
},
442442
"/3rdparty/v1/messages/{id}": {
443443
"get": {
444444
"security": [
@@ -1368,7 +1368,7 @@ const docTemplate = `{
13681368
"type": "object",
13691369
"properties": {
13701370
"passphrase": {
1371-
"description": "Passphrase is the encryption passphrase. If nil or empty, encryption is disabled.",
1371+
"description": "Passphrase is the encryption passphrase. If nil or empty, encryption is disabled. Must not be used with Cloud Server.",
13721372
"type": "string"
13731373
}
13741374
}
@@ -1470,7 +1470,7 @@ const docTemplate = `{
14701470
"minimum": 1
14711471
},
14721472
"signing_key": {
1473-
"description": "SigningKey is the secret key used for signing webhook payloads.",
1473+
"description": "SigningKey is the secret key used for signing webhook payloads. Must not be used with Cloud Server.",
14741474
"type": "string"
14751475
}
14761476
}
@@ -1546,15 +1546,17 @@ const docTemplate = `{
15461546
"sms:sent",
15471547
"sms:delivered",
15481548
"sms:failed",
1549-
"system:ping"
1549+
"system:ping",
1550+
"mms:received"
15501551
],
15511552
"x-enum-varnames": [
15521553
"WebhookEventSmsReceived",
15531554
"WebhookEventSmsDataReceived",
15541555
"WebhookEventSmsSent",
15551556
"WebhookEventSmsDelivered",
15561557
"WebhookEventSmsFailed",
1557-
"WebhookEventSystemPing"
1558+
"WebhookEventSystemPing",
1559+
"WebhookEventMmsReceived"
15581560
]
15591561
}
15601562
},

0 commit comments

Comments
 (0)