-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathmain.tsp
58 lines (51 loc) · 1.57 KB
/
main.tsp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import "@typespec/http";
import "@typespec/openapi";
import "./models/core.tsp";
import "./models/requests.tsp";
import "./models/responses.tsp";
import "./models/errors.tsp";
import "../../types";
using TypeSpec.Http;
using Types.StatusCodes;
@route("/resources/cxml_webhooks")
namespace FabricAPI.CXMLWebhooks {
@tag("cXML Webhook")
@friendlyName("cXML Webhooks")
interface CXMLWebhooks {
@summary("List cXML Webhooks")
@doc("A list of cXML Webhooks")
list():
CXMLWebhookListResponse |
StatusCode401 |
StatusCode404;
@summary("Get cXML Webhook")
@doc("Returns an cXML Webhook by ID")
read(...CXMLWebhookID): {
@statusCode statusCode: 200;
@body cxml_webhook: CXMLWebhookResponse;
} |
StatusCode401 |
StatusCode404;
@summary("Create cXML Webhook")
@doc("Creates an cXML Webhook")
@post create(...CXMLWebhookCreateRequest):
{ @statusCode statusCode: 201; @body cxml_webhook: CXMLWebhookResponse; } |
StatusCode401 |
StatusCode404 |
CXMLWebhookCreateStatusCode422;
@summary("Update cXML Webhook")
@doc("Updates an cXML Webhook by ID")
@patch update(...CXMLWebhookID, ...CXMLWebhookUpdateRequest): {
@statusCode statusCode: 200; @body cxml_webhook: CXMLWebhookResponse;
} |
StatusCode401 |
StatusCode404 |
CXMLWebhookUpdateStatusCode422;
@summary("Delete cXML Webhook")
@doc("Deletes an cXML Webhook by ID")
@delete delete(...CXMLWebhookID):
{ @statusCode statusCode: 204; } |
StatusCode401 |
StatusCode404;
}
}