@@ -2186,7 +2186,7 @@ const docTemplate = `{
21862186 "ApiKeyAuth": []
21872187 }
21882188 ],
2189- "description": "Lists the send schedules owned by the authenticated user.",
2189+ "description": "List all send schedules owned by the authenticated user.",
21902190 "produces": [
21912191 "application/json"
21922192 ],
@@ -2198,7 +2198,10 @@ const docTemplate = `{
21982198 "200": {
21992199 "description": "OK",
22002200 "schema": {
2201- "$ref": "#/definitions/responses.SendSchedulesResponse"
2201+ "type": "array",
2202+ "items": {
2203+ "$ref": "#/definitions/entities.MessageSendSchedule"
2204+ }
22022205 }
22032206 },
22042207 "401": {
@@ -2221,7 +2224,7 @@ const docTemplate = `{
22212224 "ApiKeyAuth": []
22222225 }
22232226 ],
2224- "description": "Creates a send schedule for the authenticated user.",
2227+ "description": "Create a new send schedule for the authenticated user.",
22252228 "consumes": [
22262229 "application/json"
22272230 ],
@@ -2278,63 +2281,13 @@ const docTemplate = `{
22782281 }
22792282 },
22802283 "/send-schedules/{scheduleID}": {
2281- "get": {
2282- "security": [
2283- {
2284- "ApiKeyAuth": []
2285- }
2286- ],
2287- "description": "Loads a single send schedule owned by the authenticated user.",
2288- "produces": [
2289- "application/json"
2290- ],
2291- "tags": [
2292- "Send Schedules"
2293- ],
2294- "summary": "Show send schedule",
2295- "parameters": [
2296- {
2297- "type": "string",
2298- "description": "Schedule ID",
2299- "name": "scheduleID",
2300- "in": "path",
2301- "required": true
2302- }
2303- ],
2304- "responses": {
2305- "200": {
2306- "description": "OK",
2307- "schema": {
2308- "$ref": "#/definitions/responses.SendScheduleResponse"
2309- }
2310- },
2311- "401": {
2312- "description": "Unauthorized",
2313- "schema": {
2314- "$ref": "#/definitions/responses.Unauthorized"
2315- }
2316- },
2317- "404": {
2318- "description": "Not Found",
2319- "schema": {
2320- "$ref": "#/definitions/responses.NotFound"
2321- }
2322- },
2323- "500": {
2324- "description": "Internal Server Error",
2325- "schema": {
2326- "$ref": "#/definitions/responses.InternalServerError"
2327- }
2328- }
2329- }
2330- },
23312284 "put": {
23322285 "security": [
23332286 {
23342287 "ApiKeyAuth": []
23352288 }
23362289 ],
2337- "description": "Updates a send schedule owned by the authenticated user.",
2290+ "description": "Update a send schedule owned by the authenticated user.",
23382291 "consumes": [
23392292 "application/json"
23402293 ],
@@ -2408,7 +2361,7 @@ const docTemplate = `{
24082361 "ApiKeyAuth": []
24092362 }
24102363 ],
2411- "description": "Deletes a send schedule owned by the authenticated user.",
2364+ "description": "Delete a send schedule owned by the authenticated user.",
24122365 "produces": [
24132366 "application/json"
24142367 ],
@@ -2427,10 +2380,7 @@ const docTemplate = `{
24272380 ],
24282381 "responses": {
24292382 "204": {
2430- "description": "No Content",
2431- "schema": {
2432- "$ref": "#/definitions/responses.NoContent"
2433- }
2383+ "description": "No Content"
24342384 },
24352385 "400": {
24362386 "description": "Bad Request",
@@ -2444,6 +2394,12 @@ const docTemplate = `{
24442394 "$ref": "#/definitions/responses.Unauthorized"
24452395 }
24462396 },
2397+ "404": {
2398+ "description": "Not Found",
2399+ "schema": {
2400+ "$ref": "#/definitions/responses.NotFound"
2401+ }
2402+ },
24472403 "500": {
24482404 "description": "Internal Server Error",
24492405 "schema": {
@@ -2729,6 +2685,13 @@ const docTemplate = `{
27292685 "schema": {
27302686 "$ref": "#/definitions/requests.UserPaymentInvoice"
27312687 }
2688+ },
2689+ {
2690+ "type": "string",
2691+ "description": "ID of the subscription invoice to generate the PDF for",
2692+ "name": "subscriptionInvoiceID",
2693+ "in": "path",
2694+ "required": true
27322695 }
27332696 ],
27342697 "responses": {
@@ -3353,6 +3316,7 @@ const docTemplate = `{
33533316 "entities.Message": {
33543317 "type": "object",
33553318 "required": [
3319+ "attachments",
33563320 "contact",
33573321 "content",
33583322 "created_at",
@@ -3370,6 +3334,12 @@ const docTemplate = `{
33703334 "user_id"
33713335 ],
33723336 "properties": {
3337+ "attachments": {
3338+ "type": "array",
3339+ "items": {
3340+ "type": "string"
3341+ }
3342+ },
33733343 "contact": {
33743344 "type": "string",
33753345 "example": "+18005550100"
@@ -3482,6 +3452,77 @@ const docTemplate = `{
34823452 }
34833453 }
34843454 },
3455+ "entities.MessageSendSchedule": {
3456+ "type": "object",
3457+ "required": [
3458+ "created_at",
3459+ "id",
3460+ "is_active",
3461+ "name",
3462+ "timezone",
3463+ "updated_at",
3464+ "user_id",
3465+ "windows"
3466+ ],
3467+ "properties": {
3468+ "created_at": {
3469+ "type": "string",
3470+ "example": "2022-06-05T14:26:02.302718+03:00"
3471+ },
3472+ "id": {
3473+ "type": "string",
3474+ "example": "32343a19-da5e-4b1b-a767-3298a73703cb"
3475+ },
3476+ "is_active": {
3477+ "type": "boolean",
3478+ "example": true
3479+ },
3480+ "name": {
3481+ "type": "string",
3482+ "example": "Business Hours"
3483+ },
3484+ "timezone": {
3485+ "type": "string",
3486+ "example": "Europe/Tallinn"
3487+ },
3488+ "updated_at": {
3489+ "type": "string",
3490+ "example": "2022-06-05T14:26:10.303278+03:00"
3491+ },
3492+ "user_id": {
3493+ "type": "string",
3494+ "example": "WB7DRDWrJZRGbYrv2CKGkqbzvqdC"
3495+ },
3496+ "windows": {
3497+ "type": "array",
3498+ "items": {
3499+ "$ref": "#/definitions/entities.MessageSendScheduleWindow"
3500+ }
3501+ }
3502+ }
3503+ },
3504+ "entities.MessageSendScheduleWindow": {
3505+ "type": "object",
3506+ "required": [
3507+ "day_of_week",
3508+ "end_minute",
3509+ "start_minute"
3510+ ],
3511+ "properties": {
3512+ "day_of_week": {
3513+ "type": "integer",
3514+ "example": 1
3515+ },
3516+ "end_minute": {
3517+ "type": "integer",
3518+ "example": 1020
3519+ },
3520+ "start_minute": {
3521+ "type": "integer",
3522+ "example": 540
3523+ }
3524+ }
3525+ },
34853526 "entities.MessageThread": {
34863527 "type": "object",
34873528 "required": [
@@ -3689,77 +3730,6 @@ const docTemplate = `{
36893730 "SIM2"
36903731 ]
36913732 },
3692- "entities.SendSchedule": {
3693- "type": "object",
3694- "required": [
3695- "created_at",
3696- "id",
3697- "is_active",
3698- "name",
3699- "timezone",
3700- "updated_at",
3701- "user_id",
3702- "windows"
3703- ],
3704- "properties": {
3705- "created_at": {
3706- "type": "string",
3707- "example": "2022-06-05T14:26:02.302718+03:00"
3708- },
3709- "id": {
3710- "type": "string",
3711- "example": "32343a19-da5e-4b1b-a767-3298a73703cb"
3712- },
3713- "is_active": {
3714- "type": "boolean",
3715- "example": true
3716- },
3717- "name": {
3718- "type": "string",
3719- "example": "Business Hours"
3720- },
3721- "timezone": {
3722- "type": "string",
3723- "example": "Europe/Tallinn"
3724- },
3725- "updated_at": {
3726- "type": "string",
3727- "example": "2022-06-05T14:26:10.303278+03:00"
3728- },
3729- "user_id": {
3730- "type": "string",
3731- "example": "WB7DRDWrJZRGbYrv2CKGkqbzvqdC"
3732- },
3733- "windows": {
3734- "type": "array",
3735- "items": {
3736- "$ref": "#/definitions/entities.SendScheduleWindow"
3737- }
3738- }
3739- }
3740- },
3741- "entities.SendScheduleWindow": {
3742- "type": "object",
3743- "required": [
3744- "day_of_week",
3745- "end_minute",
3746- "start_minute"
3747- ],
3748- "properties": {
3749- "day_of_week": {
3750- "type": "integer",
3751- "example": 1
3752- },
3753- "end_minute": {
3754- "type": "integer",
3755- "example": 1020
3756- },
3757- "start_minute": {
3758- "type": "integer",
3759- "example": 540
3760- }
3761- }
3762- },
37633733 "entities.SubscriptionName": {
37643734 "type": "string",
37653735 "enum": [
@@ -3994,11 +3964,17 @@ const docTemplate = `{
39943964 "type": "object",
39953965 "required": [
39963966 "content",
3997- "encrypted",
39983967 "from",
39993968 "to"
40003969 ],
40013970 "properties": {
3971+ "attachments": {
3972+ "description": "Attachments are optional. When you provide a list of attachments, the message will be sent out as an MMS",
3973+ "type": "array",
3974+ "items": {
3975+ "type": "string"
3976+ }
3977+ },
40023978 "content": {
40033979 "type": "string",
40043980 "example": "This is a sample text message"
@@ -4132,6 +4108,13 @@ const docTemplate = `{
41324108 "to"
41334109 ],
41344110 "properties": {
4111+ "attachments": {
4112+ "description": "Attachments are optional. When you provide a list of attachments, the message will be sent out as an MMS",
4113+ "type": "array",
4114+ "items": {
4115+ "type": "string"
4116+ }
4117+ },
41354118 "content": {
41364119 "type": "string",
41374120 "example": "This is a sample text message"
@@ -4852,31 +4835,7 @@ const docTemplate = `{
48524835 ],
48534836 "properties": {
48544837 "data": {
4855- "$ref": "#/definitions/entities.SendSchedule"
4856- },
4857- "message": {
4858- "type": "string",
4859- "example": "Request handled successfully"
4860- },
4861- "status": {
4862- "type": "string",
4863- "example": "success"
4864- }
4865- }
4866- },
4867- "responses.SendSchedulesResponse": {
4868- "type": "object",
4869- "required": [
4870- "data",
4871- "message",
4872- "status"
4873- ],
4874- "properties": {
4875- "data": {
4876- "type": "array",
4877- "items": {
4878- "$ref": "#/definitions/entities.SendSchedule"
4879- }
4838+ "$ref": "#/definitions/entities.MessageSendSchedule"
48804839 },
48814840 "message": {
48824841 "type": "string",
0 commit comments