Update docs and sdk for schedule

This commit is contained in:
KMKoushik
2024-08-21 18:32:56 +10:00
parent 9b54fc1793
commit 0df42698d0
6 changed files with 186 additions and 3 deletions

View File

@@ -0,0 +1,3 @@
---
openapi: post /v1/emails/{emailId}/cancel
---

View File

@@ -0,0 +1,3 @@
---
openapi: patch /v1/emails/{emailId}
---

View File

@@ -215,6 +215,7 @@
"status": {
"type": "string",
"enum": [
"SCHEDULED",
"QUEUED",
"SENT",
"DELIVERY_DELAYED",
@@ -225,7 +226,8 @@
"OPENED",
"CLICKED",
"COMPLAINED",
"FAILED"
"FAILED",
"CANCELLED"
]
},
"createdAt": {
@@ -260,6 +262,56 @@
}
}
}
},
"patch": {
"parameters": [
{
"schema": {
"type": "string",
"minLength": 3,
"example": "cuiwqdj74rygf74"
},
"required": true,
"name": "emailId",
"in": "path"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"scheduledAt": {
"type": "string",
"format": "date-time"
}
},
"required": [
"scheduledAt"
]
}
}
}
},
"responses": {
"200": {
"description": "Retrieve the user",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"emailId": {
"type": "string"
}
}
}
}
}
}
}
}
},
"/v1/emails": {
@@ -352,6 +404,10 @@
"content"
]
}
},
"scheduledAt": {
"type": "string",
"format": "date-time"
}
},
"required": [
@@ -382,6 +438,39 @@
}
}
},
"/v1/emails/{emailId}/cancel": {
"post": {
"parameters": [
{
"schema": {
"type": "string",
"minLength": 3,
"example": "cuiwqdj74rygf74"
},
"required": true,
"name": "emailId",
"in": "path"
}
],
"responses": {
"200": {
"description": "Retrieve the user",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"emailId": {
"type": "string"
}
}
}
}
}
}
}
}
},
"/v1/contactBooks/{contactBookId}/contacts": {
"post": {
"parameters": [

View File

@@ -70,7 +70,9 @@
"group": "Emails",
"pages": [
"api-reference/emails/get-email",
"api-reference/emails/send-email"
"api-reference/emails/send-email",
"api-reference/emails/update-schedule",
"api-reference/emails/cancel-schedule"
]
},
{