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.
Files changed (278) hide show
  1. package/README.md +28 -11
  2. package/docs/sdks/batches/README.md +30 -32
  3. package/docs/sdks/campaigns/README.md +11 -3
  4. package/docs/sdks/incidents/README.md +527 -0
  5. package/docs/sdks/insights/README.md +1 -1
  6. package/docs/sdks/syllablesdk/README.md +1 -1
  7. package/docs/sdks/syllablesdktools/README.md +82 -2
  8. package/docs/sdks/takeouts/README.md +11 -11
  9. package/docs/sdks/workflows/README.md +1 -1
  10. package/funcs/{outboundBatchesOutboundBatchRemove.d.ts → incidentsCreate.d.ts} +7 -4
  11. package/funcs/incidentsCreate.d.ts.map +1 -0
  12. package/funcs/incidentsCreate.js +102 -0
  13. package/funcs/incidentsCreate.js.map +1 -0
  14. package/funcs/incidentsDelete.d.ts +16 -0
  15. package/funcs/incidentsDelete.d.ts.map +1 -0
  16. package/funcs/incidentsDelete.js +112 -0
  17. package/funcs/incidentsDelete.js.map +1 -0
  18. package/funcs/incidentsGetById.d.ts +17 -0
  19. package/funcs/incidentsGetById.d.ts.map +1 -0
  20. package/funcs/incidentsGetById.js +108 -0
  21. package/funcs/incidentsGetById.js.map +1 -0
  22. package/funcs/incidentsIncidentGetOrganizations.d.ts +15 -0
  23. package/funcs/incidentsIncidentGetOrganizations.d.ts.map +1 -0
  24. package/funcs/incidentsIncidentGetOrganizations.js +89 -0
  25. package/funcs/incidentsIncidentGetOrganizations.js.map +1 -0
  26. package/funcs/incidentsList.d.ts +17 -0
  27. package/funcs/incidentsList.d.ts.map +1 -0
  28. package/funcs/incidentsList.js +114 -0
  29. package/funcs/incidentsList.js.map +1 -0
  30. package/funcs/incidentsUpdate.d.ts +16 -0
  31. package/funcs/incidentsUpdate.d.ts.map +1 -0
  32. package/funcs/incidentsUpdate.js +102 -0
  33. package/funcs/incidentsUpdate.js.map +1 -0
  34. package/funcs/insightsList.d.ts +1 -1
  35. package/funcs/insightsList.js +1 -1
  36. package/funcs/insightsToolsCreate.d.ts +1 -1
  37. package/funcs/insightsToolsCreate.js +3 -3
  38. package/funcs/insightsToolsCreate.js.map +1 -1
  39. package/funcs/insightsToolsInsightsToolTest.d.ts +16 -0
  40. package/funcs/insightsToolsInsightsToolTest.d.ts.map +1 -0
  41. package/funcs/insightsToolsInsightsToolTest.js +103 -0
  42. package/funcs/insightsToolsInsightsToolTest.js.map +1 -0
  43. package/funcs/insightsToolsUpdate.d.ts +1 -1
  44. package/funcs/insightsToolsUpdate.js +1 -1
  45. package/funcs/insightsWorkflowsQueueSessionsWorkflow.d.ts +1 -1
  46. package/funcs/insightsWorkflowsQueueSessionsWorkflow.js +1 -1
  47. package/funcs/{outboundBatchesOutboundBatchAdd.d.ts → outboundBatchesAdd.d.ts} +2 -2
  48. package/funcs/outboundBatchesAdd.d.ts.map +1 -0
  49. package/funcs/{outboundBatchesOutboundBatchAdd.js → outboundBatchesAdd.js} +3 -3
  50. package/funcs/outboundBatchesAdd.js.map +1 -0
  51. package/funcs/outboundBatchesList.d.ts +1 -1
  52. package/funcs/outboundBatchesList.d.ts.map +1 -1
  53. package/funcs/outboundBatchesList.js +1 -2
  54. package/funcs/outboundBatchesList.js.map +1 -1
  55. package/funcs/outboundBatchesRemove.d.ts +13 -0
  56. package/funcs/outboundBatchesRemove.d.ts.map +1 -0
  57. package/funcs/{outboundBatchesOutboundBatchRemove.js → outboundBatchesRemove.js} +3 -3
  58. package/funcs/outboundBatchesRemove.js.map +1 -0
  59. package/funcs/{outboundBatchesOutboundBatchResults.d.ts → outboundBatchesResults.d.ts} +2 -2
  60. package/funcs/outboundBatchesResults.d.ts.map +1 -0
  61. package/funcs/{outboundBatchesOutboundBatchResults.js → outboundBatchesResults.js} +8 -3
  62. package/funcs/outboundBatchesResults.js.map +1 -0
  63. package/funcs/outboundBatchesUpload.d.ts.map +1 -1
  64. package/funcs/outboundBatchesUpload.js +16 -12
  65. package/funcs/outboundBatchesUpload.js.map +1 -1
  66. package/funcs/outboundCampaignsList.d.ts +1 -1
  67. package/funcs/outboundCampaignsList.d.ts.map +1 -1
  68. package/funcs/outboundCampaignsList.js +1 -2
  69. package/funcs/outboundCampaignsList.js.map +1 -1
  70. package/funcs/{takeoutsCreateTakeoutApiV1TakeoutsCreatePost.d.ts → takeoutsCreate.d.ts} +2 -2
  71. package/funcs/takeoutsCreate.d.ts.map +1 -0
  72. package/funcs/{takeoutsCreateTakeoutApiV1TakeoutsCreatePost.js → takeoutsCreate.js} +4 -4
  73. package/funcs/takeoutsCreate.js.map +1 -0
  74. package/funcs/{takeoutsGetTakeoutApiV1TakeoutsGetJobIdGet.d.ts → takeoutsTakeoutsGetByJobId.d.ts} +2 -2
  75. package/funcs/takeoutsTakeoutsGetByJobId.d.ts.map +1 -0
  76. package/funcs/{takeoutsGetTakeoutApiV1TakeoutsGetJobIdGet.js → takeoutsTakeoutsGetByJobId.js} +5 -5
  77. package/funcs/takeoutsTakeoutsGetByJobId.js.map +1 -0
  78. package/jsr.json +1 -1
  79. package/lib/config.d.ts +2 -2
  80. package/lib/config.js +2 -2
  81. package/models/components/bodyoutboundbatchdelete.d.ts +1 -1
  82. package/models/components/bodyoutboundbatchdelete.d.ts.map +1 -1
  83. package/models/components/bodyoutboundbatchdelete.js +10 -1
  84. package/models/components/bodyoutboundbatchdelete.js.map +1 -1
  85. package/models/components/bodyoutboundbatchupload.d.ts +2 -2
  86. package/models/components/bodyoutboundbatchupload.d.ts.map +1 -1
  87. package/models/components/bodyoutboundbatchupload.js +2 -2
  88. package/models/components/bodyoutboundbatchupload.js.map +1 -1
  89. package/models/components/communicationrequest.d.ts +0 -11
  90. package/models/components/communicationrequest.d.ts.map +1 -1
  91. package/models/components/communicationrequest.js +0 -9
  92. package/models/components/communicationrequest.js.map +1 -1
  93. package/models/components/communicationrequestresult.d.ts +39 -14
  94. package/models/components/communicationrequestresult.d.ts.map +1 -1
  95. package/models/components/communicationrequestresult.js +38 -14
  96. package/models/components/communicationrequestresult.js.map +1 -1
  97. package/models/components/conversation.d.ts +10 -0
  98. package/models/components/conversation.d.ts.map +1 -1
  99. package/models/components/conversation.js +8 -0
  100. package/models/components/conversation.js.map +1 -1
  101. package/models/components/incidentcreaterequest.d.ts +75 -0
  102. package/models/components/incidentcreaterequest.d.ts.map +1 -0
  103. package/models/components/incidentcreaterequest.js +96 -0
  104. package/models/components/incidentcreaterequest.js.map +1 -0
  105. package/models/components/incidentorganizationresponse.d.ts +33 -0
  106. package/models/components/incidentorganizationresponse.d.ts.map +1 -0
  107. package/models/components/incidentorganizationresponse.js +72 -0
  108. package/models/components/incidentorganizationresponse.js.map +1 -0
  109. package/models/components/incidentproperties.d.ts +64 -0
  110. package/models/components/incidentproperties.d.ts.map +1 -0
  111. package/models/components/{requeststatus.js → incidentproperties.js} +25 -19
  112. package/models/components/incidentproperties.js.map +1 -0
  113. package/models/components/incidentresponse.d.ts +90 -0
  114. package/models/components/incidentresponse.d.ts.map +1 -0
  115. package/models/components/incidentresponse.js +106 -0
  116. package/models/components/incidentresponse.js.map +1 -0
  117. package/models/components/incidentupdaterequest.d.ts +90 -0
  118. package/models/components/incidentupdaterequest.d.ts.map +1 -0
  119. package/models/components/incidentupdaterequest.js +106 -0
  120. package/models/components/incidentupdaterequest.js.map +1 -0
  121. package/models/components/index.d.ts +9 -1
  122. package/models/components/index.d.ts.map +1 -1
  123. package/models/components/index.js +9 -1
  124. package/models/components/index.js.map +1 -1
  125. package/models/components/insighttooltestinput.d.ts +40 -0
  126. package/models/components/insighttooltestinput.d.ts.map +1 -0
  127. package/models/components/insighttooltestinput.js +72 -0
  128. package/models/components/insighttooltestinput.js.map +1 -0
  129. package/models/components/listresponsecommunicationbatch.d.ts +53 -0
  130. package/models/components/listresponsecommunicationbatch.d.ts.map +1 -0
  131. package/models/components/listresponsecommunicationbatch.js +81 -0
  132. package/models/components/listresponsecommunicationbatch.js.map +1 -0
  133. package/models/components/listresponseincidentresponse.d.ts +53 -0
  134. package/models/components/listresponseincidentresponse.d.ts.map +1 -0
  135. package/models/components/listresponseincidentresponse.js +81 -0
  136. package/models/components/listresponseincidentresponse.js.map +1 -0
  137. package/models/components/listresponseoutboundcampaign.d.ts +53 -0
  138. package/models/components/listresponseoutboundcampaign.d.ts.map +1 -0
  139. package/models/components/listresponseoutboundcampaign.js +81 -0
  140. package/models/components/listresponseoutboundcampaign.js.map +1 -0
  141. package/models/components/outboundcampaign.d.ts +10 -0
  142. package/models/components/outboundcampaign.d.ts.map +1 -1
  143. package/models/components/outboundcampaign.js +4 -0
  144. package/models/components/outboundcampaign.js.map +1 -1
  145. package/models/components/outboundcampaigninput.d.ts +10 -0
  146. package/models/components/outboundcampaigninput.d.ts.map +1 -1
  147. package/models/components/outboundcampaigninput.js +4 -0
  148. package/models/components/outboundcampaigninput.js.map +1 -1
  149. package/models/components/promptcreaterequest.d.ts +1 -1
  150. package/models/components/promptupdaterequest.d.ts +1 -1
  151. package/models/operations/incidentdelete.d.ts +31 -0
  152. package/models/operations/incidentdelete.d.ts.map +1 -0
  153. package/models/operations/incidentdelete.js +70 -0
  154. package/models/operations/incidentdelete.js.map +1 -0
  155. package/models/operations/incidentgetbyid.d.ts +29 -0
  156. package/models/operations/incidentgetbyid.d.ts.map +1 -0
  157. package/models/operations/incidentgetbyid.js +68 -0
  158. package/models/operations/incidentgetbyid.js.map +1 -0
  159. package/models/operations/incidentlist.d.ts +73 -0
  160. package/models/operations/incidentlist.d.ts.map +1 -0
  161. package/models/operations/incidentlist.js +101 -0
  162. package/models/operations/incidentlist.js.map +1 -0
  163. package/models/operations/index.d.ts +4 -1
  164. package/models/operations/index.d.ts.map +1 -1
  165. package/models/operations/index.js +4 -1
  166. package/models/operations/index.js.map +1 -1
  167. package/models/operations/outboundbatchresults.d.ts +4 -0
  168. package/models/operations/outboundbatchresults.d.ts.map +1 -1
  169. package/models/operations/outboundbatchresults.js +6 -0
  170. package/models/operations/outboundbatchresults.js.map +1 -1
  171. package/models/operations/outboundbatchupload.d.ts +2 -2
  172. package/models/operations/outboundbatchupload.d.ts.map +1 -1
  173. package/models/operations/outboundbatchupload.js +4 -2
  174. package/models/operations/outboundbatchupload.js.map +1 -1
  175. package/models/operations/takeoutsgetbyjobid.d.ts +29 -0
  176. package/models/operations/takeoutsgetbyjobid.d.ts.map +1 -0
  177. package/models/operations/{gettakeoutapiv1takeoutsgetjobidget.js → takeoutsgetbyjobid.js} +17 -17
  178. package/models/operations/takeoutsgetbyjobid.js.map +1 -0
  179. package/openapi.json +1449 -224
  180. package/package.json +1 -1
  181. package/sdk/batches.d.ts +4 -4
  182. package/sdk/batches.d.ts.map +1 -1
  183. package/sdk/batches.js +9 -9
  184. package/sdk/batches.js.map +1 -1
  185. package/sdk/campaigns.d.ts +1 -1
  186. package/sdk/campaigns.d.ts.map +1 -1
  187. package/sdk/incidents.d.ts +48 -0
  188. package/sdk/incidents.d.ts.map +1 -0
  189. package/sdk/incidents.js +72 -0
  190. package/sdk/incidents.js.map +1 -0
  191. package/sdk/insights.d.ts +1 -1
  192. package/sdk/insights.js +1 -1
  193. package/sdk/sdk.d.ts +3 -0
  194. package/sdk/sdk.d.ts.map +1 -1
  195. package/sdk/sdk.js +4 -0
  196. package/sdk/sdk.js.map +1 -1
  197. package/sdk/syllablesdktools.d.ts +9 -2
  198. package/sdk/syllablesdktools.d.ts.map +1 -1
  199. package/sdk/syllablesdktools.js +12 -2
  200. package/sdk/syllablesdktools.js.map +1 -1
  201. package/sdk/takeouts.d.ts +2 -2
  202. package/sdk/takeouts.d.ts.map +1 -1
  203. package/sdk/takeouts.js +6 -6
  204. package/sdk/takeouts.js.map +1 -1
  205. package/sdk/workflows.d.ts +1 -1
  206. package/sdk/workflows.js +1 -1
  207. package/src/funcs/incidentsCreate.ts +135 -0
  208. package/src/funcs/incidentsDelete.ts +147 -0
  209. package/src/funcs/incidentsGetById.ts +142 -0
  210. package/src/funcs/incidentsIncidentGetOrganizations.ts +112 -0
  211. package/src/funcs/incidentsList.ts +148 -0
  212. package/src/funcs/incidentsUpdate.ts +135 -0
  213. package/src/funcs/insightsList.ts +1 -1
  214. package/src/funcs/insightsToolsCreate.ts +4 -4
  215. package/src/funcs/insightsToolsInsightsToolTest.ts +136 -0
  216. package/src/funcs/insightsToolsUpdate.ts +1 -1
  217. package/src/funcs/insightsWorkflowsQueueSessionsWorkflow.ts +1 -1
  218. package/src/funcs/{outboundBatchesOutboundBatchAdd.ts → outboundBatchesAdd.ts} +1 -1
  219. package/src/funcs/outboundBatchesList.ts +3 -4
  220. package/src/funcs/{outboundBatchesOutboundBatchRemove.ts → outboundBatchesRemove.ts} +1 -1
  221. package/src/funcs/{outboundBatchesOutboundBatchResults.ts → outboundBatchesResults.ts} +8 -2
  222. package/src/funcs/outboundBatchesUpload.ts +23 -20
  223. package/src/funcs/outboundCampaignsList.ts +3 -4
  224. package/src/funcs/{takeoutsCreateTakeoutApiV1TakeoutsCreatePost.ts → takeoutsCreate.ts} +2 -2
  225. package/src/funcs/{takeoutsGetTakeoutApiV1TakeoutsGetJobIdGet.ts → takeoutsTakeoutsGetByJobId.ts} +4 -7
  226. package/src/lib/config.ts +2 -2
  227. package/src/models/components/bodyoutboundbatchdelete.ts +11 -2
  228. package/src/models/components/bodyoutboundbatchupload.ts +4 -4
  229. package/src/models/components/communicationrequest.ts +0 -23
  230. package/src/models/components/communicationrequestresult.ts +78 -30
  231. package/src/models/components/conversation.ts +18 -0
  232. package/src/models/components/incidentcreaterequest.ts +153 -0
  233. package/src/models/components/incidentorganizationresponse.ts +85 -0
  234. package/src/models/components/incidentproperties.ts +49 -0
  235. package/src/models/components/incidentresponse.ts +182 -0
  236. package/src/models/components/incidentupdaterequest.ts +182 -0
  237. package/src/models/components/index.ts +9 -1
  238. package/src/models/components/insighttooltestinput.ts +90 -0
  239. package/src/models/components/listresponsecommunicationbatch.ts +118 -0
  240. package/src/models/components/listresponseincidentresponse.ts +118 -0
  241. package/src/models/components/listresponseoutboundcampaign.ts +118 -0
  242. package/src/models/components/outboundcampaign.ts +14 -0
  243. package/src/models/components/outboundcampaigninput.ts +14 -0
  244. package/src/models/components/promptcreaterequest.ts +1 -1
  245. package/src/models/components/promptupdaterequest.ts +1 -1
  246. package/src/models/operations/incidentdelete.ts +79 -0
  247. package/src/models/operations/incidentgetbyid.ts +75 -0
  248. package/src/models/operations/incidentlist.ts +151 -0
  249. package/src/models/operations/index.ts +4 -1
  250. package/src/models/operations/outboundbatchresults.ts +10 -0
  251. package/src/models/operations/outboundbatchupload.ts +8 -4
  252. package/src/models/operations/takeoutsgetbyjobid.ts +75 -0
  253. package/src/sdk/batches.ts +10 -10
  254. package/src/sdk/campaigns.ts +1 -1
  255. package/src/sdk/incidents.ts +116 -0
  256. package/src/sdk/insights.ts +1 -1
  257. package/src/sdk/sdk.ts +6 -0
  258. package/src/sdk/syllablesdktools.ts +20 -2
  259. package/src/sdk/takeouts.ts +7 -7
  260. package/src/sdk/workflows.ts +1 -1
  261. package/funcs/outboundBatchesOutboundBatchAdd.d.ts.map +0 -1
  262. package/funcs/outboundBatchesOutboundBatchAdd.js.map +0 -1
  263. package/funcs/outboundBatchesOutboundBatchRemove.d.ts.map +0 -1
  264. package/funcs/outboundBatchesOutboundBatchRemove.js.map +0 -1
  265. package/funcs/outboundBatchesOutboundBatchResults.d.ts.map +0 -1
  266. package/funcs/outboundBatchesOutboundBatchResults.js.map +0 -1
  267. package/funcs/takeoutsCreateTakeoutApiV1TakeoutsCreatePost.d.ts.map +0 -1
  268. package/funcs/takeoutsCreateTakeoutApiV1TakeoutsCreatePost.js.map +0 -1
  269. package/funcs/takeoutsGetTakeoutApiV1TakeoutsGetJobIdGet.d.ts.map +0 -1
  270. package/funcs/takeoutsGetTakeoutApiV1TakeoutsGetJobIdGet.js.map +0 -1
  271. package/models/components/requeststatus.d.ts +0 -46
  272. package/models/components/requeststatus.d.ts.map +0 -1
  273. package/models/components/requeststatus.js.map +0 -1
  274. package/models/operations/gettakeoutapiv1takeoutsgetjobidget.d.ts +0 -29
  275. package/models/operations/gettakeoutapiv1takeoutsgetjobidget.d.ts.map +0 -1
  276. package/models/operations/gettakeoutapiv1takeoutsgetjobidget.js.map +0 -1
  277. package/src/models/components/requeststatus.ts +0 -43
  278. package/src/models/operations/gettakeoutapiv1takeoutsgetjobidget.ts +0 -87
@@ -7,22 +7,15 @@ import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
8
  import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
- import {
11
- RequestStatus,
12
- RequestStatus$inboundSchema,
13
- RequestStatus$outboundSchema,
14
- } from "./requeststatus.js";
15
10
 
16
11
  /**
17
12
  * Variables for request
18
13
  */
19
14
  export type RequestVariables = {};
20
15
 
16
+ export type Insights = {};
17
+
21
18
  export type CommunicationRequestResult = {
22
- /**
23
- * Unique ID for conversation batch
24
- */
25
- batchId: string;
26
19
  /**
27
20
  * ID for target outreach (unique within batch)
28
21
  */
@@ -31,18 +24,14 @@ export type CommunicationRequestResult = {
31
24
  * Target phone number or email address
32
25
  */
33
26
  target: string;
34
- /**
35
- * Status of a communication request.
36
- */
37
- requestStatus?: RequestStatus | undefined;
38
27
  /**
39
28
  * Variables for request
40
29
  */
41
30
  requestVariables: RequestVariables;
42
31
  /**
43
- * Call manager SID
32
+ * Channel manager SID
44
33
  */
45
- callManagerSid?: string | null | undefined;
34
+ channelManagerSid?: string | null | undefined;
46
35
  /**
47
36
  * Timestamp of request creation
48
37
  */
@@ -63,6 +52,18 @@ export type CommunicationRequestResult = {
63
52
  * Unique ID for conversation
64
53
  */
65
54
  conversationId?: number | null | undefined;
55
+ /**
56
+ * Status of request in channel manager
57
+ */
58
+ channelManagerStatus?: string | null | undefined;
59
+ /**
60
+ * Status of session in insight workflow
61
+ */
62
+ insightsStatus?: string | null | undefined;
63
+ /**
64
+ * Insights from call
65
+ */
66
+ insights?: Insights | null | undefined;
66
67
  };
67
68
 
68
69
  /** @internal */
@@ -113,51 +114,97 @@ export function requestVariablesFromJSON(
113
114
  );
114
115
  }
115
116
 
117
+ /** @internal */
118
+ export const Insights$inboundSchema: z.ZodType<
119
+ Insights,
120
+ z.ZodTypeDef,
121
+ unknown
122
+ > = z.object({});
123
+
124
+ /** @internal */
125
+ export type Insights$Outbound = {};
126
+
127
+ /** @internal */
128
+ export const Insights$outboundSchema: z.ZodType<
129
+ Insights$Outbound,
130
+ z.ZodTypeDef,
131
+ Insights
132
+ > = z.object({});
133
+
134
+ /**
135
+ * @internal
136
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
137
+ */
138
+ export namespace Insights$ {
139
+ /** @deprecated use `Insights$inboundSchema` instead. */
140
+ export const inboundSchema = Insights$inboundSchema;
141
+ /** @deprecated use `Insights$outboundSchema` instead. */
142
+ export const outboundSchema = Insights$outboundSchema;
143
+ /** @deprecated use `Insights$Outbound` instead. */
144
+ export type Outbound = Insights$Outbound;
145
+ }
146
+
147
+ export function insightsToJSON(insights: Insights): string {
148
+ return JSON.stringify(Insights$outboundSchema.parse(insights));
149
+ }
150
+
151
+ export function insightsFromJSON(
152
+ jsonString: string,
153
+ ): SafeParseResult<Insights, SDKValidationError> {
154
+ return safeParse(
155
+ jsonString,
156
+ (x) => Insights$inboundSchema.parse(JSON.parse(x)),
157
+ `Failed to parse 'Insights' from JSON`,
158
+ );
159
+ }
160
+
116
161
  /** @internal */
117
162
  export const CommunicationRequestResult$inboundSchema: z.ZodType<
118
163
  CommunicationRequestResult,
119
164
  z.ZodTypeDef,
120
165
  unknown
121
166
  > = z.object({
122
- batch_id: z.string(),
123
167
  reference_id: z.string(),
124
168
  target: z.string(),
125
- request_status: RequestStatus$inboundSchema.optional(),
126
169
  request_variables: z.lazy(() => RequestVariables$inboundSchema),
127
- call_manager_sid: z.nullable(z.string()).optional(),
170
+ channel_manager_sid: z.nullable(z.string()).optional(),
128
171
  created_at: z.string().optional(),
129
172
  sent_at: z.nullable(z.string()).optional(),
130
173
  attempt_count: z.number().int().default(0),
131
174
  session_id: z.nullable(z.number().int()).optional(),
132
175
  conversation_id: z.nullable(z.number().int()).optional(),
176
+ channel_manager_status: z.nullable(z.string()).optional(),
177
+ insights_status: z.nullable(z.string()).optional(),
178
+ insights: z.nullable(z.lazy(() => Insights$inboundSchema)).optional(),
133
179
  }).transform((v) => {
134
180
  return remap$(v, {
135
- "batch_id": "batchId",
136
181
  "reference_id": "referenceId",
137
- "request_status": "requestStatus",
138
182
  "request_variables": "requestVariables",
139
- "call_manager_sid": "callManagerSid",
183
+ "channel_manager_sid": "channelManagerSid",
140
184
  "created_at": "createdAt",
141
185
  "sent_at": "sentAt",
142
186
  "attempt_count": "attemptCount",
143
187
  "session_id": "sessionId",
144
188
  "conversation_id": "conversationId",
189
+ "channel_manager_status": "channelManagerStatus",
190
+ "insights_status": "insightsStatus",
145
191
  });
146
192
  });
147
193
 
148
194
  /** @internal */
149
195
  export type CommunicationRequestResult$Outbound = {
150
- batch_id: string;
151
196
  reference_id: string;
152
197
  target: string;
153
- request_status?: string | undefined;
154
198
  request_variables: RequestVariables$Outbound;
155
- call_manager_sid?: string | null | undefined;
199
+ channel_manager_sid?: string | null | undefined;
156
200
  created_at?: string | undefined;
157
201
  sent_at?: string | null | undefined;
158
202
  attempt_count: number;
159
203
  session_id?: number | null | undefined;
160
204
  conversation_id?: number | null | undefined;
205
+ channel_manager_status?: string | null | undefined;
206
+ insights_status?: string | null | undefined;
207
+ insights?: Insights$Outbound | null | undefined;
161
208
  };
162
209
 
163
210
  /** @internal */
@@ -166,29 +213,30 @@ export const CommunicationRequestResult$outboundSchema: z.ZodType<
166
213
  z.ZodTypeDef,
167
214
  CommunicationRequestResult
168
215
  > = z.object({
169
- batchId: z.string(),
170
216
  referenceId: z.string(),
171
217
  target: z.string(),
172
- requestStatus: RequestStatus$outboundSchema.optional(),
173
218
  requestVariables: z.lazy(() => RequestVariables$outboundSchema),
174
- callManagerSid: z.nullable(z.string()).optional(),
219
+ channelManagerSid: z.nullable(z.string()).optional(),
175
220
  createdAt: z.string().optional(),
176
221
  sentAt: z.nullable(z.string()).optional(),
177
222
  attemptCount: z.number().int().default(0),
178
223
  sessionId: z.nullable(z.number().int()).optional(),
179
224
  conversationId: z.nullable(z.number().int()).optional(),
225
+ channelManagerStatus: z.nullable(z.string()).optional(),
226
+ insightsStatus: z.nullable(z.string()).optional(),
227
+ insights: z.nullable(z.lazy(() => Insights$outboundSchema)).optional(),
180
228
  }).transform((v) => {
181
229
  return remap$(v, {
182
- batchId: "batch_id",
183
230
  referenceId: "reference_id",
184
- requestStatus: "request_status",
185
231
  requestVariables: "request_variables",
186
- callManagerSid: "call_manager_sid",
232
+ channelManagerSid: "channel_manager_sid",
187
233
  createdAt: "created_at",
188
234
  sentAt: "sent_at",
189
235
  attemptCount: "attempt_count",
190
236
  sessionId: "session_id",
191
237
  conversationId: "conversation_id",
238
+ channelManagerStatus: "channel_manager_status",
239
+ insightsStatus: "insights_status",
192
240
  });
193
241
  });
194
242
 
@@ -59,6 +59,14 @@ export type Conversation = {
59
59
  * Version for the LLM used in the conversation (see PromptResponse.llm_config.version)
60
60
  */
61
61
  llmVersion?: string | null | undefined;
62
+ /**
63
+ * Temperature for the LLM used in the conversation (see PromptResponse.llm_config.temperature)
64
+ */
65
+ llmTemperature?: number | null | undefined;
66
+ /**
67
+ * Seed for the LLM used in the conversation (see PromptResponse.llm_config.seed).
68
+ */
69
+ llmSeed?: number | null | undefined;
62
70
  /**
63
71
  * Whether the conversation occurred on the legacy Syllable system
64
72
  */
@@ -82,6 +90,8 @@ export const Conversation$inboundSchema: z.ZodType<
82
90
  llm_provider: z.nullable(z.string()).optional(),
83
91
  llm_model: z.nullable(z.string()).optional(),
84
92
  llm_version: z.nullable(z.string()).optional(),
93
+ llm_temperature: z.nullable(z.number()).optional(),
94
+ llm_seed: z.nullable(z.number().int()).optional(),
85
95
  is_legacy: z.nullable(z.boolean()).optional(),
86
96
  }).transform((v) => {
87
97
  return remap$(v, {
@@ -95,6 +105,8 @@ export const Conversation$inboundSchema: z.ZodType<
95
105
  "llm_provider": "llmProvider",
96
106
  "llm_model": "llmModel",
97
107
  "llm_version": "llmVersion",
108
+ "llm_temperature": "llmTemperature",
109
+ "llm_seed": "llmSeed",
98
110
  "is_legacy": "isLegacy",
99
111
  });
100
112
  });
@@ -112,6 +124,8 @@ export type Conversation$Outbound = {
112
124
  llm_provider?: string | null | undefined;
113
125
  llm_model?: string | null | undefined;
114
126
  llm_version?: string | null | undefined;
127
+ llm_temperature?: number | null | undefined;
128
+ llm_seed?: number | null | undefined;
115
129
  is_legacy?: boolean | null | undefined;
116
130
  };
117
131
 
@@ -132,6 +146,8 @@ export const Conversation$outboundSchema: z.ZodType<
132
146
  llmProvider: z.nullable(z.string()).optional(),
133
147
  llmModel: z.nullable(z.string()).optional(),
134
148
  llmVersion: z.nullable(z.string()).optional(),
149
+ llmTemperature: z.nullable(z.number()).optional(),
150
+ llmSeed: z.nullable(z.number().int()).optional(),
135
151
  isLegacy: z.nullable(z.boolean()).optional(),
136
152
  }).transform((v) => {
137
153
  return remap$(v, {
@@ -145,6 +161,8 @@ export const Conversation$outboundSchema: z.ZodType<
145
161
  llmProvider: "llm_provider",
146
162
  llmModel: "llm_model",
147
163
  llmVersion: "llm_version",
164
+ llmTemperature: "llm_temperature",
165
+ llmSeed: "llm_seed",
148
166
  isLegacy: "is_legacy",
149
167
  });
150
168
  });
@@ -0,0 +1,153 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ /**
12
+ * Request model to create a service incident.
13
+ */
14
+ export type IncidentCreateRequest = {
15
+ /**
16
+ * Description of the service incident
17
+ */
18
+ description: string;
19
+ /**
20
+ * Start time of the incident
21
+ */
22
+ startDatetime: Date;
23
+ /**
24
+ * Resolution time of the incident
25
+ */
26
+ resolutionDatetime: Date;
27
+ /**
28
+ * Category of the impact
29
+ */
30
+ impactCategory: string;
31
+ /**
32
+ * Number of sessions impacted
33
+ */
34
+ sessionsImpacted: number;
35
+ /**
36
+ * Detailed markdown description of the incident
37
+ */
38
+ markdown: string;
39
+ /**
40
+ * The ID of the organization
41
+ */
42
+ organizationId?: number | null | undefined;
43
+ /**
44
+ * The ID of the sub-organization
45
+ */
46
+ subOrganizationId?: number | null | undefined;
47
+ /**
48
+ * The name of the sub-organization
49
+ */
50
+ subOrganization?: string | null | undefined;
51
+ };
52
+
53
+ /** @internal */
54
+ export const IncidentCreateRequest$inboundSchema: z.ZodType<
55
+ IncidentCreateRequest,
56
+ z.ZodTypeDef,
57
+ unknown
58
+ > = z.object({
59
+ description: z.string(),
60
+ start_datetime: z.string().datetime({ offset: true }).transform(v =>
61
+ new Date(v)
62
+ ),
63
+ resolution_datetime: z.string().datetime({ offset: true }).transform(v =>
64
+ new Date(v)
65
+ ),
66
+ impact_category: z.string(),
67
+ sessions_impacted: z.number().int(),
68
+ markdown: z.string(),
69
+ organization_id: z.nullable(z.number().int()).optional(),
70
+ sub_organization_id: z.nullable(z.number().int()).optional(),
71
+ sub_organization: z.nullable(z.string()).optional(),
72
+ }).transform((v) => {
73
+ return remap$(v, {
74
+ "start_datetime": "startDatetime",
75
+ "resolution_datetime": "resolutionDatetime",
76
+ "impact_category": "impactCategory",
77
+ "sessions_impacted": "sessionsImpacted",
78
+ "organization_id": "organizationId",
79
+ "sub_organization_id": "subOrganizationId",
80
+ "sub_organization": "subOrganization",
81
+ });
82
+ });
83
+
84
+ /** @internal */
85
+ export type IncidentCreateRequest$Outbound = {
86
+ description: string;
87
+ start_datetime: string;
88
+ resolution_datetime: string;
89
+ impact_category: string;
90
+ sessions_impacted: number;
91
+ markdown: string;
92
+ organization_id?: number | null | undefined;
93
+ sub_organization_id?: number | null | undefined;
94
+ sub_organization?: string | null | undefined;
95
+ };
96
+
97
+ /** @internal */
98
+ export const IncidentCreateRequest$outboundSchema: z.ZodType<
99
+ IncidentCreateRequest$Outbound,
100
+ z.ZodTypeDef,
101
+ IncidentCreateRequest
102
+ > = z.object({
103
+ description: z.string(),
104
+ startDatetime: z.date().transform(v => v.toISOString()),
105
+ resolutionDatetime: z.date().transform(v => v.toISOString()),
106
+ impactCategory: z.string(),
107
+ sessionsImpacted: z.number().int(),
108
+ markdown: z.string(),
109
+ organizationId: z.nullable(z.number().int()).optional(),
110
+ subOrganizationId: z.nullable(z.number().int()).optional(),
111
+ subOrganization: z.nullable(z.string()).optional(),
112
+ }).transform((v) => {
113
+ return remap$(v, {
114
+ startDatetime: "start_datetime",
115
+ resolutionDatetime: "resolution_datetime",
116
+ impactCategory: "impact_category",
117
+ sessionsImpacted: "sessions_impacted",
118
+ organizationId: "organization_id",
119
+ subOrganizationId: "sub_organization_id",
120
+ subOrganization: "sub_organization",
121
+ });
122
+ });
123
+
124
+ /**
125
+ * @internal
126
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
127
+ */
128
+ export namespace IncidentCreateRequest$ {
129
+ /** @deprecated use `IncidentCreateRequest$inboundSchema` instead. */
130
+ export const inboundSchema = IncidentCreateRequest$inboundSchema;
131
+ /** @deprecated use `IncidentCreateRequest$outboundSchema` instead. */
132
+ export const outboundSchema = IncidentCreateRequest$outboundSchema;
133
+ /** @deprecated use `IncidentCreateRequest$Outbound` instead. */
134
+ export type Outbound = IncidentCreateRequest$Outbound;
135
+ }
136
+
137
+ export function incidentCreateRequestToJSON(
138
+ incidentCreateRequest: IncidentCreateRequest,
139
+ ): string {
140
+ return JSON.stringify(
141
+ IncidentCreateRequest$outboundSchema.parse(incidentCreateRequest),
142
+ );
143
+ }
144
+
145
+ export function incidentCreateRequestFromJSON(
146
+ jsonString: string,
147
+ ): SafeParseResult<IncidentCreateRequest, SDKValidationError> {
148
+ return safeParse(
149
+ jsonString,
150
+ (x) => IncidentCreateRequest$inboundSchema.parse(JSON.parse(x)),
151
+ `Failed to parse 'IncidentCreateRequest' from JSON`,
152
+ );
153
+ }
@@ -0,0 +1,85 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ export type IncidentOrganizationResponse = {
12
+ id: number;
13
+ name: string;
14
+ displayName: string;
15
+ };
16
+
17
+ /** @internal */
18
+ export const IncidentOrganizationResponse$inboundSchema: z.ZodType<
19
+ IncidentOrganizationResponse,
20
+ z.ZodTypeDef,
21
+ unknown
22
+ > = z.object({
23
+ id: z.number().int(),
24
+ name: z.string(),
25
+ display_name: z.string(),
26
+ }).transform((v) => {
27
+ return remap$(v, {
28
+ "display_name": "displayName",
29
+ });
30
+ });
31
+
32
+ /** @internal */
33
+ export type IncidentOrganizationResponse$Outbound = {
34
+ id: number;
35
+ name: string;
36
+ display_name: string;
37
+ };
38
+
39
+ /** @internal */
40
+ export const IncidentOrganizationResponse$outboundSchema: z.ZodType<
41
+ IncidentOrganizationResponse$Outbound,
42
+ z.ZodTypeDef,
43
+ IncidentOrganizationResponse
44
+ > = z.object({
45
+ id: z.number().int(),
46
+ name: z.string(),
47
+ displayName: z.string(),
48
+ }).transform((v) => {
49
+ return remap$(v, {
50
+ displayName: "display_name",
51
+ });
52
+ });
53
+
54
+ /**
55
+ * @internal
56
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
57
+ */
58
+ export namespace IncidentOrganizationResponse$ {
59
+ /** @deprecated use `IncidentOrganizationResponse$inboundSchema` instead. */
60
+ export const inboundSchema = IncidentOrganizationResponse$inboundSchema;
61
+ /** @deprecated use `IncidentOrganizationResponse$outboundSchema` instead. */
62
+ export const outboundSchema = IncidentOrganizationResponse$outboundSchema;
63
+ /** @deprecated use `IncidentOrganizationResponse$Outbound` instead. */
64
+ export type Outbound = IncidentOrganizationResponse$Outbound;
65
+ }
66
+
67
+ export function incidentOrganizationResponseToJSON(
68
+ incidentOrganizationResponse: IncidentOrganizationResponse,
69
+ ): string {
70
+ return JSON.stringify(
71
+ IncidentOrganizationResponse$outboundSchema.parse(
72
+ incidentOrganizationResponse,
73
+ ),
74
+ );
75
+ }
76
+
77
+ export function incidentOrganizationResponseFromJSON(
78
+ jsonString: string,
79
+ ): SafeParseResult<IncidentOrganizationResponse, SDKValidationError> {
80
+ return safeParse(
81
+ jsonString,
82
+ (x) => IncidentOrganizationResponse$inboundSchema.parse(JSON.parse(x)),
83
+ `Failed to parse 'IncidentOrganizationResponse' from JSON`,
84
+ );
85
+ }
@@ -0,0 +1,49 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { ClosedEnum } from "../../types/enums.js";
7
+
8
+ /**
9
+ * Names of agent fields supported for filtering/sorting on list endpoint.
10
+ */
11
+ export const IncidentProperties = {
12
+ Id: "id",
13
+ Description: "description",
14
+ ImpactCategory: "impact_category",
15
+ SessionsImpacted: "sessions_impacted",
16
+ Markdown: "markdown",
17
+ CreatedAt: "created_at",
18
+ UpdatedAt: "updated_at",
19
+ OrganizationId: "organization_id",
20
+ SubOrganizationId: "sub_organization_id",
21
+ StartDatetime: "start_datetime",
22
+ EndDatetime: "end_datetime",
23
+ ResolutionDatetime: "resolution_datetime",
24
+ } as const;
25
+ /**
26
+ * Names of agent fields supported for filtering/sorting on list endpoint.
27
+ */
28
+ export type IncidentProperties = ClosedEnum<typeof IncidentProperties>;
29
+
30
+ /** @internal */
31
+ export const IncidentProperties$inboundSchema: z.ZodNativeEnum<
32
+ typeof IncidentProperties
33
+ > = z.nativeEnum(IncidentProperties);
34
+
35
+ /** @internal */
36
+ export const IncidentProperties$outboundSchema: z.ZodNativeEnum<
37
+ typeof IncidentProperties
38
+ > = IncidentProperties$inboundSchema;
39
+
40
+ /**
41
+ * @internal
42
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
43
+ */
44
+ export namespace IncidentProperties$ {
45
+ /** @deprecated use `IncidentProperties$inboundSchema` instead. */
46
+ export const inboundSchema = IncidentProperties$inboundSchema;
47
+ /** @deprecated use `IncidentProperties$outboundSchema` instead. */
48
+ export const outboundSchema = IncidentProperties$outboundSchema;
49
+ }