syllable-sdk 0.1.0-alpha.72 → 0.1.0-alpha.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -11
- package/docs/sdks/batches/README.md +30 -32
- package/docs/sdks/campaigns/README.md +11 -3
- package/docs/sdks/incidents/README.md +527 -0
- package/docs/sdks/insights/README.md +1 -1
- package/docs/sdks/syllablesdk/README.md +1 -1
- package/docs/sdks/syllablesdktools/README.md +82 -2
- package/docs/sdks/takeouts/README.md +11 -11
- package/docs/sdks/workflows/README.md +1 -1
- package/funcs/{outboundBatchesOutboundBatchRemove.d.ts → incidentsCreate.d.ts} +7 -4
- package/funcs/incidentsCreate.d.ts.map +1 -0
- package/funcs/incidentsCreate.js +102 -0
- package/funcs/incidentsCreate.js.map +1 -0
- package/funcs/incidentsDelete.d.ts +16 -0
- package/funcs/incidentsDelete.d.ts.map +1 -0
- package/funcs/incidentsDelete.js +112 -0
- package/funcs/incidentsDelete.js.map +1 -0
- package/funcs/incidentsGetById.d.ts +17 -0
- package/funcs/incidentsGetById.d.ts.map +1 -0
- package/funcs/incidentsGetById.js +108 -0
- package/funcs/incidentsGetById.js.map +1 -0
- package/funcs/incidentsIncidentGetOrganizations.d.ts +15 -0
- package/funcs/incidentsIncidentGetOrganizations.d.ts.map +1 -0
- package/funcs/incidentsIncidentGetOrganizations.js +89 -0
- package/funcs/incidentsIncidentGetOrganizations.js.map +1 -0
- package/funcs/incidentsList.d.ts +17 -0
- package/funcs/incidentsList.d.ts.map +1 -0
- package/funcs/incidentsList.js +114 -0
- package/funcs/incidentsList.js.map +1 -0
- package/funcs/incidentsUpdate.d.ts +16 -0
- package/funcs/incidentsUpdate.d.ts.map +1 -0
- package/funcs/incidentsUpdate.js +102 -0
- package/funcs/incidentsUpdate.js.map +1 -0
- package/funcs/insightsList.d.ts +1 -1
- package/funcs/insightsList.js +1 -1
- package/funcs/insightsToolsCreate.d.ts +1 -1
- package/funcs/insightsToolsCreate.js +3 -3
- package/funcs/insightsToolsCreate.js.map +1 -1
- package/funcs/insightsToolsInsightsToolTest.d.ts +16 -0
- package/funcs/insightsToolsInsightsToolTest.d.ts.map +1 -0
- package/funcs/insightsToolsInsightsToolTest.js +103 -0
- package/funcs/insightsToolsInsightsToolTest.js.map +1 -0
- package/funcs/insightsToolsUpdate.d.ts +1 -1
- package/funcs/insightsToolsUpdate.js +1 -1
- package/funcs/insightsWorkflowsQueueSessionsWorkflow.d.ts +1 -1
- package/funcs/insightsWorkflowsQueueSessionsWorkflow.js +1 -1
- package/funcs/{outboundBatchesOutboundBatchAdd.d.ts → outboundBatchesAdd.d.ts} +2 -2
- package/funcs/outboundBatchesAdd.d.ts.map +1 -0
- package/funcs/{outboundBatchesOutboundBatchAdd.js → outboundBatchesAdd.js} +3 -3
- package/funcs/outboundBatchesAdd.js.map +1 -0
- package/funcs/outboundBatchesList.d.ts +1 -1
- package/funcs/outboundBatchesList.d.ts.map +1 -1
- package/funcs/outboundBatchesList.js +1 -2
- package/funcs/outboundBatchesList.js.map +1 -1
- package/funcs/outboundBatchesRemove.d.ts +13 -0
- package/funcs/outboundBatchesRemove.d.ts.map +1 -0
- package/funcs/{outboundBatchesOutboundBatchRemove.js → outboundBatchesRemove.js} +3 -3
- package/funcs/outboundBatchesRemove.js.map +1 -0
- package/funcs/{outboundBatchesOutboundBatchResults.d.ts → outboundBatchesResults.d.ts} +2 -2
- package/funcs/outboundBatchesResults.d.ts.map +1 -0
- package/funcs/{outboundBatchesOutboundBatchResults.js → outboundBatchesResults.js} +8 -3
- package/funcs/outboundBatchesResults.js.map +1 -0
- package/funcs/outboundBatchesUpload.d.ts.map +1 -1
- package/funcs/outboundBatchesUpload.js +16 -12
- package/funcs/outboundBatchesUpload.js.map +1 -1
- package/funcs/outboundCampaignsList.d.ts +1 -1
- package/funcs/outboundCampaignsList.d.ts.map +1 -1
- package/funcs/outboundCampaignsList.js +1 -2
- package/funcs/outboundCampaignsList.js.map +1 -1
- package/funcs/{takeoutsCreateTakeoutApiV1TakeoutsCreatePost.d.ts → takeoutsCreate.d.ts} +2 -2
- package/funcs/takeoutsCreate.d.ts.map +1 -0
- package/funcs/{takeoutsCreateTakeoutApiV1TakeoutsCreatePost.js → takeoutsCreate.js} +4 -4
- package/funcs/takeoutsCreate.js.map +1 -0
- package/funcs/{takeoutsGetTakeoutApiV1TakeoutsGetJobIdGet.d.ts → takeoutsTakeoutsGetByJobId.d.ts} +2 -2
- package/funcs/takeoutsTakeoutsGetByJobId.d.ts.map +1 -0
- package/funcs/{takeoutsGetTakeoutApiV1TakeoutsGetJobIdGet.js → takeoutsTakeoutsGetByJobId.js} +5 -5
- package/funcs/takeoutsTakeoutsGetByJobId.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/bodyoutboundbatchdelete.d.ts +1 -1
- package/models/components/bodyoutboundbatchdelete.d.ts.map +1 -1
- package/models/components/bodyoutboundbatchdelete.js +10 -1
- package/models/components/bodyoutboundbatchdelete.js.map +1 -1
- package/models/components/bodyoutboundbatchupload.d.ts +2 -2
- package/models/components/bodyoutboundbatchupload.d.ts.map +1 -1
- package/models/components/bodyoutboundbatchupload.js +2 -2
- package/models/components/bodyoutboundbatchupload.js.map +1 -1
- package/models/components/communicationrequest.d.ts +0 -11
- package/models/components/communicationrequest.d.ts.map +1 -1
- package/models/components/communicationrequest.js +0 -9
- package/models/components/communicationrequest.js.map +1 -1
- package/models/components/communicationrequestresult.d.ts +39 -14
- package/models/components/communicationrequestresult.d.ts.map +1 -1
- package/models/components/communicationrequestresult.js +38 -14
- package/models/components/communicationrequestresult.js.map +1 -1
- package/models/components/conversation.d.ts +10 -0
- package/models/components/conversation.d.ts.map +1 -1
- package/models/components/conversation.js +8 -0
- package/models/components/conversation.js.map +1 -1
- package/models/components/incidentcreaterequest.d.ts +75 -0
- package/models/components/incidentcreaterequest.d.ts.map +1 -0
- package/models/components/incidentcreaterequest.js +96 -0
- package/models/components/incidentcreaterequest.js.map +1 -0
- package/models/components/incidentorganizationresponse.d.ts +33 -0
- package/models/components/incidentorganizationresponse.d.ts.map +1 -0
- package/models/components/incidentorganizationresponse.js +72 -0
- package/models/components/incidentorganizationresponse.js.map +1 -0
- package/models/components/incidentproperties.d.ts +64 -0
- package/models/components/incidentproperties.d.ts.map +1 -0
- package/models/components/{requeststatus.js → incidentproperties.js} +25 -19
- package/models/components/incidentproperties.js.map +1 -0
- package/models/components/incidentresponse.d.ts +90 -0
- package/models/components/incidentresponse.d.ts.map +1 -0
- package/models/components/incidentresponse.js +106 -0
- package/models/components/incidentresponse.js.map +1 -0
- package/models/components/incidentupdaterequest.d.ts +90 -0
- package/models/components/incidentupdaterequest.d.ts.map +1 -0
- package/models/components/incidentupdaterequest.js +106 -0
- package/models/components/incidentupdaterequest.js.map +1 -0
- package/models/components/index.d.ts +9 -1
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +9 -1
- package/models/components/index.js.map +1 -1
- package/models/components/insighttooltestinput.d.ts +40 -0
- package/models/components/insighttooltestinput.d.ts.map +1 -0
- package/models/components/insighttooltestinput.js +72 -0
- package/models/components/insighttooltestinput.js.map +1 -0
- package/models/components/listresponsecommunicationbatch.d.ts +53 -0
- package/models/components/listresponsecommunicationbatch.d.ts.map +1 -0
- package/models/components/listresponsecommunicationbatch.js +81 -0
- package/models/components/listresponsecommunicationbatch.js.map +1 -0
- package/models/components/listresponseincidentresponse.d.ts +53 -0
- package/models/components/listresponseincidentresponse.d.ts.map +1 -0
- package/models/components/listresponseincidentresponse.js +81 -0
- package/models/components/listresponseincidentresponse.js.map +1 -0
- package/models/components/listresponseoutboundcampaign.d.ts +53 -0
- package/models/components/listresponseoutboundcampaign.d.ts.map +1 -0
- package/models/components/listresponseoutboundcampaign.js +81 -0
- package/models/components/listresponseoutboundcampaign.js.map +1 -0
- package/models/components/outboundcampaign.d.ts +10 -0
- package/models/components/outboundcampaign.d.ts.map +1 -1
- package/models/components/outboundcampaign.js +4 -0
- package/models/components/outboundcampaign.js.map +1 -1
- package/models/components/outboundcampaigninput.d.ts +10 -0
- package/models/components/outboundcampaigninput.d.ts.map +1 -1
- package/models/components/outboundcampaigninput.js +4 -0
- package/models/components/outboundcampaigninput.js.map +1 -1
- package/models/components/promptcreaterequest.d.ts +1 -1
- package/models/components/promptupdaterequest.d.ts +1 -1
- package/models/operations/incidentdelete.d.ts +31 -0
- package/models/operations/incidentdelete.d.ts.map +1 -0
- package/models/operations/incidentdelete.js +70 -0
- package/models/operations/incidentdelete.js.map +1 -0
- package/models/operations/incidentgetbyid.d.ts +29 -0
- package/models/operations/incidentgetbyid.d.ts.map +1 -0
- package/models/operations/incidentgetbyid.js +68 -0
- package/models/operations/incidentgetbyid.js.map +1 -0
- package/models/operations/incidentlist.d.ts +73 -0
- package/models/operations/incidentlist.d.ts.map +1 -0
- package/models/operations/incidentlist.js +101 -0
- package/models/operations/incidentlist.js.map +1 -0
- package/models/operations/index.d.ts +4 -1
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +4 -1
- package/models/operations/index.js.map +1 -1
- package/models/operations/outboundbatchresults.d.ts +4 -0
- package/models/operations/outboundbatchresults.d.ts.map +1 -1
- package/models/operations/outboundbatchresults.js +6 -0
- package/models/operations/outboundbatchresults.js.map +1 -1
- package/models/operations/outboundbatchupload.d.ts +2 -2
- package/models/operations/outboundbatchupload.d.ts.map +1 -1
- package/models/operations/outboundbatchupload.js +4 -2
- package/models/operations/outboundbatchupload.js.map +1 -1
- package/models/operations/takeoutsgetbyjobid.d.ts +29 -0
- package/models/operations/takeoutsgetbyjobid.d.ts.map +1 -0
- package/models/operations/{gettakeoutapiv1takeoutsgetjobidget.js → takeoutsgetbyjobid.js} +17 -17
- package/models/operations/takeoutsgetbyjobid.js.map +1 -0
- package/openapi.json +1449 -224
- package/package.json +1 -1
- package/sdk/batches.d.ts +4 -4
- package/sdk/batches.d.ts.map +1 -1
- package/sdk/batches.js +9 -9
- package/sdk/batches.js.map +1 -1
- package/sdk/campaigns.d.ts +1 -1
- package/sdk/campaigns.d.ts.map +1 -1
- package/sdk/incidents.d.ts +48 -0
- package/sdk/incidents.d.ts.map +1 -0
- package/sdk/incidents.js +72 -0
- package/sdk/incidents.js.map +1 -0
- package/sdk/insights.d.ts +1 -1
- package/sdk/insights.js +1 -1
- package/sdk/sdk.d.ts +3 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +4 -0
- package/sdk/sdk.js.map +1 -1
- package/sdk/syllablesdktools.d.ts +9 -2
- package/sdk/syllablesdktools.d.ts.map +1 -1
- package/sdk/syllablesdktools.js +12 -2
- package/sdk/syllablesdktools.js.map +1 -1
- package/sdk/takeouts.d.ts +2 -2
- package/sdk/takeouts.d.ts.map +1 -1
- package/sdk/takeouts.js +6 -6
- package/sdk/takeouts.js.map +1 -1
- package/sdk/workflows.d.ts +1 -1
- package/sdk/workflows.js +1 -1
- package/src/funcs/incidentsCreate.ts +135 -0
- package/src/funcs/incidentsDelete.ts +147 -0
- package/src/funcs/incidentsGetById.ts +142 -0
- package/src/funcs/incidentsIncidentGetOrganizations.ts +112 -0
- package/src/funcs/incidentsList.ts +148 -0
- package/src/funcs/incidentsUpdate.ts +135 -0
- package/src/funcs/insightsList.ts +1 -1
- package/src/funcs/insightsToolsCreate.ts +4 -4
- package/src/funcs/insightsToolsInsightsToolTest.ts +136 -0
- package/src/funcs/insightsToolsUpdate.ts +1 -1
- package/src/funcs/insightsWorkflowsQueueSessionsWorkflow.ts +1 -1
- package/src/funcs/{outboundBatchesOutboundBatchAdd.ts → outboundBatchesAdd.ts} +1 -1
- package/src/funcs/outboundBatchesList.ts +3 -4
- package/src/funcs/{outboundBatchesOutboundBatchRemove.ts → outboundBatchesRemove.ts} +1 -1
- package/src/funcs/{outboundBatchesOutboundBatchResults.ts → outboundBatchesResults.ts} +8 -2
- package/src/funcs/outboundBatchesUpload.ts +23 -20
- package/src/funcs/outboundCampaignsList.ts +3 -4
- package/src/funcs/{takeoutsCreateTakeoutApiV1TakeoutsCreatePost.ts → takeoutsCreate.ts} +2 -2
- package/src/funcs/{takeoutsGetTakeoutApiV1TakeoutsGetJobIdGet.ts → takeoutsTakeoutsGetByJobId.ts} +4 -7
- package/src/lib/config.ts +2 -2
- package/src/models/components/bodyoutboundbatchdelete.ts +11 -2
- package/src/models/components/bodyoutboundbatchupload.ts +4 -4
- package/src/models/components/communicationrequest.ts +0 -23
- package/src/models/components/communicationrequestresult.ts +78 -30
- package/src/models/components/conversation.ts +18 -0
- package/src/models/components/incidentcreaterequest.ts +153 -0
- package/src/models/components/incidentorganizationresponse.ts +85 -0
- package/src/models/components/incidentproperties.ts +49 -0
- package/src/models/components/incidentresponse.ts +182 -0
- package/src/models/components/incidentupdaterequest.ts +182 -0
- package/src/models/components/index.ts +9 -1
- package/src/models/components/insighttooltestinput.ts +90 -0
- package/src/models/components/listresponsecommunicationbatch.ts +118 -0
- package/src/models/components/listresponseincidentresponse.ts +118 -0
- package/src/models/components/listresponseoutboundcampaign.ts +118 -0
- package/src/models/components/outboundcampaign.ts +14 -0
- package/src/models/components/outboundcampaigninput.ts +14 -0
- package/src/models/components/promptcreaterequest.ts +1 -1
- package/src/models/components/promptupdaterequest.ts +1 -1
- package/src/models/operations/incidentdelete.ts +79 -0
- package/src/models/operations/incidentgetbyid.ts +75 -0
- package/src/models/operations/incidentlist.ts +151 -0
- package/src/models/operations/index.ts +4 -1
- package/src/models/operations/outboundbatchresults.ts +10 -0
- package/src/models/operations/outboundbatchupload.ts +8 -4
- package/src/models/operations/takeoutsgetbyjobid.ts +75 -0
- package/src/sdk/batches.ts +10 -10
- package/src/sdk/campaigns.ts +1 -1
- package/src/sdk/incidents.ts +116 -0
- package/src/sdk/insights.ts +1 -1
- package/src/sdk/sdk.ts +6 -0
- package/src/sdk/syllablesdktools.ts +20 -2
- package/src/sdk/takeouts.ts +7 -7
- package/src/sdk/workflows.ts +1 -1
- package/funcs/outboundBatchesOutboundBatchAdd.d.ts.map +0 -1
- package/funcs/outboundBatchesOutboundBatchAdd.js.map +0 -1
- package/funcs/outboundBatchesOutboundBatchRemove.d.ts.map +0 -1
- package/funcs/outboundBatchesOutboundBatchRemove.js.map +0 -1
- package/funcs/outboundBatchesOutboundBatchResults.d.ts.map +0 -1
- package/funcs/outboundBatchesOutboundBatchResults.js.map +0 -1
- package/funcs/takeoutsCreateTakeoutApiV1TakeoutsCreatePost.d.ts.map +0 -1
- package/funcs/takeoutsCreateTakeoutApiV1TakeoutsCreatePost.js.map +0 -1
- package/funcs/takeoutsGetTakeoutApiV1TakeoutsGetJobIdGet.d.ts.map +0 -1
- package/funcs/takeoutsGetTakeoutApiV1TakeoutsGetJobIdGet.js.map +0 -1
- package/models/components/requeststatus.d.ts +0 -46
- package/models/components/requeststatus.d.ts.map +0 -1
- package/models/components/requeststatus.js.map +0 -1
- package/models/operations/gettakeoutapiv1takeoutsgetjobidget.d.ts +0 -29
- package/models/operations/gettakeoutapiv1takeoutsgetjobidget.d.ts.map +0 -1
- package/models/operations/gettakeoutapiv1takeoutsgetjobidget.js.map +0 -1
- package/src/models/components/requeststatus.ts +0 -43
- package/src/models/operations/gettakeoutapiv1takeoutsgetjobidget.ts +0 -87
|
@@ -0,0 +1,527 @@
|
|
|
1
|
+
# Incidents
|
|
2
|
+
(*incidents*)
|
|
3
|
+
|
|
4
|
+
## Overview
|
|
5
|
+
|
|
6
|
+
Operations related to incidents.
|
|
7
|
+
|
|
8
|
+
### Available Operations
|
|
9
|
+
|
|
10
|
+
* [list](#list) - List Incidents
|
|
11
|
+
* [create](#create) - Create Incident
|
|
12
|
+
* [update](#update) - Update Incident
|
|
13
|
+
* [incidentGetOrganizations](#incidentgetorganizations) - Get Organizations
|
|
14
|
+
* [getById](#getbyid) - Get Incident By Id
|
|
15
|
+
* [delete](#delete) - Delete Incident
|
|
16
|
+
|
|
17
|
+
## list
|
|
18
|
+
|
|
19
|
+
List service incidents with pagination and filtering
|
|
20
|
+
|
|
21
|
+
### Example Usage
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
import { SyllableSDK } from "syllable-sdk";
|
|
25
|
+
|
|
26
|
+
const syllableSDK = new SyllableSDK({
|
|
27
|
+
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
async function run() {
|
|
31
|
+
const result = await syllableSDK.incidents.list({
|
|
32
|
+
page: 0,
|
|
33
|
+
searchFields: [
|
|
34
|
+
"start_datetime",
|
|
35
|
+
],
|
|
36
|
+
searchFieldValues: [
|
|
37
|
+
"Some Object Name",
|
|
38
|
+
],
|
|
39
|
+
startDatetime: "2023-01-01T00:00:00Z",
|
|
40
|
+
endDatetime: "2024-01-01T00:00:00Z",
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
// Handle the result
|
|
44
|
+
console.log(result);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
run();
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Standalone function
|
|
51
|
+
|
|
52
|
+
The standalone function version of this method:
|
|
53
|
+
|
|
54
|
+
```typescript
|
|
55
|
+
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
56
|
+
import { incidentsList } from "syllable-sdk/funcs/incidentsList.js";
|
|
57
|
+
|
|
58
|
+
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
59
|
+
// You can create one instance of it to use across an application.
|
|
60
|
+
const syllableSDK = new SyllableSDKCore({
|
|
61
|
+
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
async function run() {
|
|
65
|
+
const res = await incidentsList(syllableSDK, {
|
|
66
|
+
page: 0,
|
|
67
|
+
searchFields: [
|
|
68
|
+
"start_datetime",
|
|
69
|
+
],
|
|
70
|
+
searchFieldValues: [
|
|
71
|
+
"Some Object Name",
|
|
72
|
+
],
|
|
73
|
+
startDatetime: "2023-01-01T00:00:00Z",
|
|
74
|
+
endDatetime: "2024-01-01T00:00:00Z",
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
if (!res.ok) {
|
|
78
|
+
throw res.error;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const { value: result } = res;
|
|
82
|
+
|
|
83
|
+
// Handle the result
|
|
84
|
+
console.log(result);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
run();
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Parameters
|
|
91
|
+
|
|
92
|
+
| Parameter | Type | Required | Description |
|
|
93
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
94
|
+
| `request` | [operations.IncidentListRequest](../../models/operations/incidentlistrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
95
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
96
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
97
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
98
|
+
|
|
99
|
+
### Response
|
|
100
|
+
|
|
101
|
+
**Promise\<[components.ListResponseIncidentResponse](../../models/components/listresponseincidentresponse.md)\>**
|
|
102
|
+
|
|
103
|
+
### Errors
|
|
104
|
+
|
|
105
|
+
| Error Type | Status Code | Content Type |
|
|
106
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
107
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
108
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
109
|
+
|
|
110
|
+
## create
|
|
111
|
+
|
|
112
|
+
Create a new incident
|
|
113
|
+
|
|
114
|
+
### Example Usage
|
|
115
|
+
|
|
116
|
+
```typescript
|
|
117
|
+
import { SyllableSDK } from "syllable-sdk";
|
|
118
|
+
|
|
119
|
+
const syllableSDK = new SyllableSDK({
|
|
120
|
+
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
async function run() {
|
|
124
|
+
const result = await syllableSDK.incidents.create({
|
|
125
|
+
description: "Service outage in region X",
|
|
126
|
+
startDatetime: new Date("2023-10-01T08:00:00Z"),
|
|
127
|
+
resolutionDatetime: new Date("2023-10-01T12:00:00Z"),
|
|
128
|
+
impactCategory: "High",
|
|
129
|
+
sessionsImpacted: 1500,
|
|
130
|
+
markdown: "**Incident Details**",
|
|
131
|
+
organizationId: 123,
|
|
132
|
+
subOrganizationId: 456,
|
|
133
|
+
subOrganization: "SubOrg A",
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
// Handle the result
|
|
137
|
+
console.log(result);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
run();
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### Standalone function
|
|
144
|
+
|
|
145
|
+
The standalone function version of this method:
|
|
146
|
+
|
|
147
|
+
```typescript
|
|
148
|
+
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
149
|
+
import { incidentsCreate } from "syllable-sdk/funcs/incidentsCreate.js";
|
|
150
|
+
|
|
151
|
+
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
152
|
+
// You can create one instance of it to use across an application.
|
|
153
|
+
const syllableSDK = new SyllableSDKCore({
|
|
154
|
+
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
async function run() {
|
|
158
|
+
const res = await incidentsCreate(syllableSDK, {
|
|
159
|
+
description: "Service outage in region X",
|
|
160
|
+
startDatetime: new Date("2023-10-01T08:00:00Z"),
|
|
161
|
+
resolutionDatetime: new Date("2023-10-01T12:00:00Z"),
|
|
162
|
+
impactCategory: "High",
|
|
163
|
+
sessionsImpacted: 1500,
|
|
164
|
+
markdown: "**Incident Details**",
|
|
165
|
+
organizationId: 123,
|
|
166
|
+
subOrganizationId: 456,
|
|
167
|
+
subOrganization: "SubOrg A",
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
if (!res.ok) {
|
|
171
|
+
throw res.error;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
const { value: result } = res;
|
|
175
|
+
|
|
176
|
+
// Handle the result
|
|
177
|
+
console.log(result);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
run();
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### Parameters
|
|
184
|
+
|
|
185
|
+
| Parameter | Type | Required | Description |
|
|
186
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
187
|
+
| `request` | [components.IncidentCreateRequest](../../models/components/incidentcreaterequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
188
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
189
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
190
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
191
|
+
|
|
192
|
+
### Response
|
|
193
|
+
|
|
194
|
+
**Promise\<[components.IncidentResponse](../../models/components/incidentresponse.md)\>**
|
|
195
|
+
|
|
196
|
+
### Errors
|
|
197
|
+
|
|
198
|
+
| Error Type | Status Code | Content Type |
|
|
199
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
200
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
201
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
202
|
+
|
|
203
|
+
## update
|
|
204
|
+
|
|
205
|
+
Update an existing incident
|
|
206
|
+
|
|
207
|
+
### Example Usage
|
|
208
|
+
|
|
209
|
+
```typescript
|
|
210
|
+
import { SyllableSDK } from "syllable-sdk";
|
|
211
|
+
|
|
212
|
+
const syllableSDK = new SyllableSDK({
|
|
213
|
+
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
async function run() {
|
|
217
|
+
const result = await syllableSDK.incidents.update({
|
|
218
|
+
description: "Service outage in region X",
|
|
219
|
+
startDatetime: new Date("2023-10-01T08:00:00Z"),
|
|
220
|
+
resolutionDatetime: new Date("2023-10-01T12:00:00Z"),
|
|
221
|
+
impactCategory: "High",
|
|
222
|
+
sessionsImpacted: 1500,
|
|
223
|
+
markdown: "**Incident Details**",
|
|
224
|
+
organizationId: 123,
|
|
225
|
+
subOrganizationId: 456,
|
|
226
|
+
subOrganization: "SubOrg A",
|
|
227
|
+
id: 1,
|
|
228
|
+
createdAt: new Date("2023-10-01T08:00:00Z"),
|
|
229
|
+
updatedAt: new Date("2023-10-01T08:00:00Z"),
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
// Handle the result
|
|
233
|
+
console.log(result);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
run();
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
### Standalone function
|
|
240
|
+
|
|
241
|
+
The standalone function version of this method:
|
|
242
|
+
|
|
243
|
+
```typescript
|
|
244
|
+
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
245
|
+
import { incidentsUpdate } from "syllable-sdk/funcs/incidentsUpdate.js";
|
|
246
|
+
|
|
247
|
+
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
248
|
+
// You can create one instance of it to use across an application.
|
|
249
|
+
const syllableSDK = new SyllableSDKCore({
|
|
250
|
+
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
async function run() {
|
|
254
|
+
const res = await incidentsUpdate(syllableSDK, {
|
|
255
|
+
description: "Service outage in region X",
|
|
256
|
+
startDatetime: new Date("2023-10-01T08:00:00Z"),
|
|
257
|
+
resolutionDatetime: new Date("2023-10-01T12:00:00Z"),
|
|
258
|
+
impactCategory: "High",
|
|
259
|
+
sessionsImpacted: 1500,
|
|
260
|
+
markdown: "**Incident Details**",
|
|
261
|
+
organizationId: 123,
|
|
262
|
+
subOrganizationId: 456,
|
|
263
|
+
subOrganization: "SubOrg A",
|
|
264
|
+
id: 1,
|
|
265
|
+
createdAt: new Date("2023-10-01T08:00:00Z"),
|
|
266
|
+
updatedAt: new Date("2023-10-01T08:00:00Z"),
|
|
267
|
+
});
|
|
268
|
+
|
|
269
|
+
if (!res.ok) {
|
|
270
|
+
throw res.error;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
const { value: result } = res;
|
|
274
|
+
|
|
275
|
+
// Handle the result
|
|
276
|
+
console.log(result);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
run();
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
### Parameters
|
|
283
|
+
|
|
284
|
+
| Parameter | Type | Required | Description |
|
|
285
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
286
|
+
| `request` | [components.IncidentUpdateRequest](../../models/components/incidentupdaterequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
287
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
288
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
289
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
290
|
+
|
|
291
|
+
### Response
|
|
292
|
+
|
|
293
|
+
**Promise\<[components.IncidentResponse](../../models/components/incidentresponse.md)\>**
|
|
294
|
+
|
|
295
|
+
### Errors
|
|
296
|
+
|
|
297
|
+
| Error Type | Status Code | Content Type |
|
|
298
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
299
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
300
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
301
|
+
|
|
302
|
+
## incidentGetOrganizations
|
|
303
|
+
|
|
304
|
+
Get all organizations
|
|
305
|
+
|
|
306
|
+
### Example Usage
|
|
307
|
+
|
|
308
|
+
```typescript
|
|
309
|
+
import { SyllableSDK } from "syllable-sdk";
|
|
310
|
+
|
|
311
|
+
const syllableSDK = new SyllableSDK({
|
|
312
|
+
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
313
|
+
});
|
|
314
|
+
|
|
315
|
+
async function run() {
|
|
316
|
+
const result = await syllableSDK.incidents.incidentGetOrganizations();
|
|
317
|
+
|
|
318
|
+
// Handle the result
|
|
319
|
+
console.log(result);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
run();
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
### Standalone function
|
|
326
|
+
|
|
327
|
+
The standalone function version of this method:
|
|
328
|
+
|
|
329
|
+
```typescript
|
|
330
|
+
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
331
|
+
import { incidentsIncidentGetOrganizations } from "syllable-sdk/funcs/incidentsIncidentGetOrganizations.js";
|
|
332
|
+
|
|
333
|
+
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
334
|
+
// You can create one instance of it to use across an application.
|
|
335
|
+
const syllableSDK = new SyllableSDKCore({
|
|
336
|
+
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
337
|
+
});
|
|
338
|
+
|
|
339
|
+
async function run() {
|
|
340
|
+
const res = await incidentsIncidentGetOrganizations(syllableSDK);
|
|
341
|
+
|
|
342
|
+
if (!res.ok) {
|
|
343
|
+
throw res.error;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
const { value: result } = res;
|
|
347
|
+
|
|
348
|
+
// Handle the result
|
|
349
|
+
console.log(result);
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
run();
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
### Parameters
|
|
356
|
+
|
|
357
|
+
| Parameter | Type | Required | Description |
|
|
358
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
359
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
360
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
361
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
362
|
+
|
|
363
|
+
### Response
|
|
364
|
+
|
|
365
|
+
**Promise\<[components.IncidentOrganizationResponse[]](../../models/.md)\>**
|
|
366
|
+
|
|
367
|
+
### Errors
|
|
368
|
+
|
|
369
|
+
| Error Type | Status Code | Content Type |
|
|
370
|
+
| --------------- | --------------- | --------------- |
|
|
371
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
372
|
+
|
|
373
|
+
## getById
|
|
374
|
+
|
|
375
|
+
Get incident by ID
|
|
376
|
+
|
|
377
|
+
### Example Usage
|
|
378
|
+
|
|
379
|
+
```typescript
|
|
380
|
+
import { SyllableSDK } from "syllable-sdk";
|
|
381
|
+
|
|
382
|
+
const syllableSDK = new SyllableSDK({
|
|
383
|
+
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
384
|
+
});
|
|
385
|
+
|
|
386
|
+
async function run() {
|
|
387
|
+
const result = await syllableSDK.incidents.getById({
|
|
388
|
+
incidentId: 931598,
|
|
389
|
+
});
|
|
390
|
+
|
|
391
|
+
// Handle the result
|
|
392
|
+
console.log(result);
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
run();
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
### Standalone function
|
|
399
|
+
|
|
400
|
+
The standalone function version of this method:
|
|
401
|
+
|
|
402
|
+
```typescript
|
|
403
|
+
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
404
|
+
import { incidentsGetById } from "syllable-sdk/funcs/incidentsGetById.js";
|
|
405
|
+
|
|
406
|
+
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
407
|
+
// You can create one instance of it to use across an application.
|
|
408
|
+
const syllableSDK = new SyllableSDKCore({
|
|
409
|
+
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
410
|
+
});
|
|
411
|
+
|
|
412
|
+
async function run() {
|
|
413
|
+
const res = await incidentsGetById(syllableSDK, {
|
|
414
|
+
incidentId: 931598,
|
|
415
|
+
});
|
|
416
|
+
|
|
417
|
+
if (!res.ok) {
|
|
418
|
+
throw res.error;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
const { value: result } = res;
|
|
422
|
+
|
|
423
|
+
// Handle the result
|
|
424
|
+
console.log(result);
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
run();
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
### Parameters
|
|
431
|
+
|
|
432
|
+
| Parameter | Type | Required | Description |
|
|
433
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
434
|
+
| `request` | [operations.IncidentGetByIdRequest](../../models/operations/incidentgetbyidrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
435
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
436
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
437
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
438
|
+
|
|
439
|
+
### Response
|
|
440
|
+
|
|
441
|
+
**Promise\<[components.IncidentResponse](../../models/components/incidentresponse.md)\>**
|
|
442
|
+
|
|
443
|
+
### Errors
|
|
444
|
+
|
|
445
|
+
| Error Type | Status Code | Content Type |
|
|
446
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
447
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
448
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
449
|
+
|
|
450
|
+
## delete
|
|
451
|
+
|
|
452
|
+
Delete an incident by ID
|
|
453
|
+
|
|
454
|
+
### Example Usage
|
|
455
|
+
|
|
456
|
+
```typescript
|
|
457
|
+
import { SyllableSDK } from "syllable-sdk";
|
|
458
|
+
|
|
459
|
+
const syllableSDK = new SyllableSDK({
|
|
460
|
+
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
461
|
+
});
|
|
462
|
+
|
|
463
|
+
async function run() {
|
|
464
|
+
const result = await syllableSDK.incidents.delete({
|
|
465
|
+
incidentId: 545907,
|
|
466
|
+
reason: "<value>",
|
|
467
|
+
});
|
|
468
|
+
|
|
469
|
+
// Handle the result
|
|
470
|
+
console.log(result);
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
run();
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
### Standalone function
|
|
477
|
+
|
|
478
|
+
The standalone function version of this method:
|
|
479
|
+
|
|
480
|
+
```typescript
|
|
481
|
+
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
482
|
+
import { incidentsDelete } from "syllable-sdk/funcs/incidentsDelete.js";
|
|
483
|
+
|
|
484
|
+
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
485
|
+
// You can create one instance of it to use across an application.
|
|
486
|
+
const syllableSDK = new SyllableSDKCore({
|
|
487
|
+
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
488
|
+
});
|
|
489
|
+
|
|
490
|
+
async function run() {
|
|
491
|
+
const res = await incidentsDelete(syllableSDK, {
|
|
492
|
+
incidentId: 545907,
|
|
493
|
+
reason: "<value>",
|
|
494
|
+
});
|
|
495
|
+
|
|
496
|
+
if (!res.ok) {
|
|
497
|
+
throw res.error;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
const { value: result } = res;
|
|
501
|
+
|
|
502
|
+
// Handle the result
|
|
503
|
+
console.log(result);
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
run();
|
|
507
|
+
```
|
|
508
|
+
|
|
509
|
+
### Parameters
|
|
510
|
+
|
|
511
|
+
| Parameter | Type | Required | Description |
|
|
512
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
513
|
+
| `request` | [operations.IncidentDeleteRequest](../../models/operations/incidentdeleterequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
514
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
515
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
516
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
517
|
+
|
|
518
|
+
### Response
|
|
519
|
+
|
|
520
|
+
**Promise\<[any](../../models/.md)\>**
|
|
521
|
+
|
|
522
|
+
### Errors
|
|
523
|
+
|
|
524
|
+
| Error Type | Status Code | Content Type |
|
|
525
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
526
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
527
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
@@ -9,7 +9,7 @@ Syllable SDK gives you the power of awesome AI agentry. 🚀
|
|
|
9
9
|
|
|
10
10
|
## Overview
|
|
11
11
|
|
|
12
|
-
The Syllable SDK provides a comprehensive set of tools and APIs to integrate powerful AI
|
|
12
|
+
The Syllable SDK provides a comprehensive set of tools and APIs to integrate powerful AI
|
|
13
13
|
capabilities into your communication applications. Whether you're building chatbots, virtual
|
|
14
14
|
assistants, or any other AI-driven solutions, Syllable SDK has got you covered.
|
|
15
15
|
|