syllable-sdk 0.1.0-alpha.73 → 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 (277) hide show
  1. package/README.md +17 -13
  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 +178 -84
  5. package/docs/sdks/insights/README.md +1 -1
  6. package/docs/sdks/syllablesdktools/README.md +82 -2
  7. package/docs/sdks/takeouts/README.md +11 -11
  8. package/docs/sdks/workflows/README.md +1 -1
  9. package/funcs/incidentsCreate.d.ts +1 -1
  10. package/funcs/incidentsCreate.d.ts.map +1 -1
  11. package/funcs/incidentsCreate.js +2 -2
  12. package/funcs/incidentsCreate.js.map +1 -1
  13. package/funcs/incidentsDelete.d.ts.map +1 -1
  14. package/funcs/incidentsDelete.js +4 -0
  15. package/funcs/incidentsDelete.js.map +1 -1
  16. package/funcs/incidentsGetById.d.ts +1 -1
  17. package/funcs/incidentsGetById.d.ts.map +1 -1
  18. package/funcs/incidentsGetById.js +1 -1
  19. package/funcs/incidentsGetById.js.map +1 -1
  20. package/funcs/incidentsIncidentGetOrganizations.d.ts +15 -0
  21. package/funcs/incidentsIncidentGetOrganizations.d.ts.map +1 -0
  22. package/funcs/incidentsIncidentGetOrganizations.js +89 -0
  23. package/funcs/incidentsIncidentGetOrganizations.js.map +1 -0
  24. package/funcs/incidentsList.d.ts +2 -2
  25. package/funcs/incidentsList.d.ts.map +1 -1
  26. package/funcs/incidentsList.js +10 -4
  27. package/funcs/incidentsList.js.map +1 -1
  28. package/funcs/incidentsUpdate.d.ts +1 -2
  29. package/funcs/incidentsUpdate.d.ts.map +1 -1
  30. package/funcs/incidentsUpdate.js +4 -13
  31. package/funcs/incidentsUpdate.js.map +1 -1
  32. package/funcs/insightsList.d.ts +1 -1
  33. package/funcs/insightsList.js +1 -1
  34. package/funcs/insightsToolsCreate.d.ts +1 -1
  35. package/funcs/insightsToolsCreate.js +3 -3
  36. package/funcs/insightsToolsCreate.js.map +1 -1
  37. package/funcs/insightsToolsInsightsToolTest.d.ts +16 -0
  38. package/funcs/insightsToolsInsightsToolTest.d.ts.map +1 -0
  39. package/funcs/insightsToolsInsightsToolTest.js +103 -0
  40. package/funcs/insightsToolsInsightsToolTest.js.map +1 -0
  41. package/funcs/insightsToolsUpdate.d.ts +1 -1
  42. package/funcs/insightsToolsUpdate.js +1 -1
  43. package/funcs/insightsWorkflowsQueueSessionsWorkflow.d.ts +1 -1
  44. package/funcs/insightsWorkflowsQueueSessionsWorkflow.js +1 -1
  45. package/funcs/{outboundBatchesOutboundBatchAdd.d.ts → outboundBatchesAdd.d.ts} +2 -2
  46. package/funcs/outboundBatchesAdd.d.ts.map +1 -0
  47. package/funcs/{outboundBatchesOutboundBatchAdd.js → outboundBatchesAdd.js} +3 -3
  48. package/funcs/outboundBatchesAdd.js.map +1 -0
  49. package/funcs/outboundBatchesList.d.ts +1 -1
  50. package/funcs/outboundBatchesList.d.ts.map +1 -1
  51. package/funcs/outboundBatchesList.js +1 -2
  52. package/funcs/outboundBatchesList.js.map +1 -1
  53. package/funcs/{outboundBatchesOutboundBatchRemove.d.ts → outboundBatchesRemove.d.ts} +2 -2
  54. package/funcs/outboundBatchesRemove.d.ts.map +1 -0
  55. package/funcs/{outboundBatchesOutboundBatchRemove.js → outboundBatchesRemove.js} +3 -3
  56. package/funcs/outboundBatchesRemove.js.map +1 -0
  57. package/funcs/{outboundBatchesOutboundBatchResults.d.ts → outboundBatchesResults.d.ts} +2 -2
  58. package/funcs/outboundBatchesResults.d.ts.map +1 -0
  59. package/funcs/{outboundBatchesOutboundBatchResults.js → outboundBatchesResults.js} +8 -3
  60. package/funcs/outboundBatchesResults.js.map +1 -0
  61. package/funcs/outboundBatchesUpload.d.ts.map +1 -1
  62. package/funcs/outboundBatchesUpload.js +16 -12
  63. package/funcs/outboundBatchesUpload.js.map +1 -1
  64. package/funcs/outboundCampaignsList.d.ts +1 -1
  65. package/funcs/outboundCampaignsList.d.ts.map +1 -1
  66. package/funcs/outboundCampaignsList.js +1 -2
  67. package/funcs/outboundCampaignsList.js.map +1 -1
  68. package/funcs/{takeoutsCreateTakeoutApiV1TakeoutsCreatePost.d.ts → takeoutsCreate.d.ts} +2 -2
  69. package/funcs/takeoutsCreate.d.ts.map +1 -0
  70. package/funcs/{takeoutsCreateTakeoutApiV1TakeoutsCreatePost.js → takeoutsCreate.js} +4 -4
  71. package/funcs/takeoutsCreate.js.map +1 -0
  72. package/funcs/{takeoutsGetTakeoutApiV1TakeoutsGetJobIdGet.d.ts → takeoutsTakeoutsGetByJobId.d.ts} +2 -2
  73. package/funcs/takeoutsTakeoutsGetByJobId.d.ts.map +1 -0
  74. package/funcs/{takeoutsGetTakeoutApiV1TakeoutsGetJobIdGet.js → takeoutsTakeoutsGetByJobId.js} +5 -5
  75. package/funcs/takeoutsTakeoutsGetByJobId.js.map +1 -0
  76. package/jsr.json +1 -1
  77. package/lib/config.d.ts +2 -2
  78. package/lib/config.js +2 -2
  79. package/models/components/bodyoutboundbatchdelete.d.ts +1 -1
  80. package/models/components/bodyoutboundbatchdelete.d.ts.map +1 -1
  81. package/models/components/bodyoutboundbatchdelete.js +10 -1
  82. package/models/components/bodyoutboundbatchdelete.js.map +1 -1
  83. package/models/components/bodyoutboundbatchupload.d.ts +2 -2
  84. package/models/components/bodyoutboundbatchupload.d.ts.map +1 -1
  85. package/models/components/bodyoutboundbatchupload.js +2 -2
  86. package/models/components/bodyoutboundbatchupload.js.map +1 -1
  87. package/models/components/communicationrequest.d.ts +0 -11
  88. package/models/components/communicationrequest.d.ts.map +1 -1
  89. package/models/components/communicationrequest.js +0 -9
  90. package/models/components/communicationrequest.js.map +1 -1
  91. package/models/components/communicationrequestresult.d.ts +39 -14
  92. package/models/components/communicationrequestresult.d.ts.map +1 -1
  93. package/models/components/communicationrequestresult.js +38 -14
  94. package/models/components/communicationrequestresult.js.map +1 -1
  95. package/models/components/conversation.d.ts +10 -0
  96. package/models/components/conversation.d.ts.map +1 -1
  97. package/models/components/conversation.js +8 -0
  98. package/models/components/conversation.js.map +1 -1
  99. package/models/components/incidentcreaterequest.d.ts +75 -0
  100. package/models/components/incidentcreaterequest.d.ts.map +1 -0
  101. package/models/components/{serviceincidentrequest.js → incidentcreaterequest.js} +29 -29
  102. package/models/components/incidentcreaterequest.js.map +1 -0
  103. package/models/components/incidentorganizationresponse.d.ts +33 -0
  104. package/models/components/incidentorganizationresponse.d.ts.map +1 -0
  105. package/models/components/incidentorganizationresponse.js +72 -0
  106. package/models/components/incidentorganizationresponse.js.map +1 -0
  107. package/models/components/incidentproperties.d.ts +64 -0
  108. package/models/components/incidentproperties.d.ts.map +1 -0
  109. package/models/components/{requeststatus.js → incidentproperties.js} +25 -19
  110. package/models/components/incidentproperties.js.map +1 -0
  111. package/models/components/incidentresponse.d.ts +90 -0
  112. package/models/components/incidentresponse.d.ts.map +1 -0
  113. package/models/components/{serviceincidentresponse.js → incidentresponse.js} +33 -33
  114. package/models/components/incidentresponse.js.map +1 -0
  115. package/models/components/incidentupdaterequest.d.ts +90 -0
  116. package/models/components/incidentupdaterequest.d.ts.map +1 -0
  117. package/models/{operations/incidentupdate.js → components/incidentupdaterequest.js} +43 -10
  118. package/models/components/incidentupdaterequest.js.map +1 -0
  119. package/models/components/index.d.ts +9 -3
  120. package/models/components/index.d.ts.map +1 -1
  121. package/models/components/index.js +9 -3
  122. package/models/components/index.js.map +1 -1
  123. package/models/components/insighttooltestinput.d.ts +40 -0
  124. package/models/components/insighttooltestinput.d.ts.map +1 -0
  125. package/models/components/insighttooltestinput.js +72 -0
  126. package/models/components/insighttooltestinput.js.map +1 -0
  127. package/models/components/listresponsecommunicationbatch.d.ts +53 -0
  128. package/models/components/listresponsecommunicationbatch.d.ts.map +1 -0
  129. package/models/components/listresponsecommunicationbatch.js +81 -0
  130. package/models/components/listresponsecommunicationbatch.js.map +1 -0
  131. package/models/components/listresponseincidentresponse.d.ts +53 -0
  132. package/models/components/listresponseincidentresponse.d.ts.map +1 -0
  133. package/models/components/listresponseincidentresponse.js +81 -0
  134. package/models/components/listresponseincidentresponse.js.map +1 -0
  135. package/models/components/listresponseoutboundcampaign.d.ts +53 -0
  136. package/models/components/listresponseoutboundcampaign.d.ts.map +1 -0
  137. package/models/components/listresponseoutboundcampaign.js +81 -0
  138. package/models/components/listresponseoutboundcampaign.js.map +1 -0
  139. package/models/components/outboundcampaign.d.ts +10 -0
  140. package/models/components/outboundcampaign.d.ts.map +1 -1
  141. package/models/components/outboundcampaign.js +4 -0
  142. package/models/components/outboundcampaign.js.map +1 -1
  143. package/models/components/outboundcampaigninput.d.ts +10 -0
  144. package/models/components/outboundcampaigninput.d.ts.map +1 -1
  145. package/models/components/outboundcampaigninput.js +4 -0
  146. package/models/components/outboundcampaigninput.js.map +1 -1
  147. package/models/components/promptcreaterequest.d.ts +1 -1
  148. package/models/components/promptupdaterequest.d.ts +1 -1
  149. package/models/operations/incidentdelete.d.ts +2 -0
  150. package/models/operations/incidentdelete.d.ts.map +1 -1
  151. package/models/operations/incidentdelete.js +2 -0
  152. package/models/operations/incidentdelete.js.map +1 -1
  153. package/models/operations/incidentlist.d.ts +44 -2
  154. package/models/operations/incidentlist.d.ts.map +1 -1
  155. package/models/operations/incidentlist.js +44 -4
  156. package/models/operations/incidentlist.js.map +1 -1
  157. package/models/operations/index.d.ts +1 -2
  158. package/models/operations/index.d.ts.map +1 -1
  159. package/models/operations/index.js +1 -2
  160. package/models/operations/index.js.map +1 -1
  161. package/models/operations/outboundbatchresults.d.ts +4 -0
  162. package/models/operations/outboundbatchresults.d.ts.map +1 -1
  163. package/models/operations/outboundbatchresults.js +6 -0
  164. package/models/operations/outboundbatchresults.js.map +1 -1
  165. package/models/operations/outboundbatchupload.d.ts +2 -2
  166. package/models/operations/outboundbatchupload.d.ts.map +1 -1
  167. package/models/operations/outboundbatchupload.js +4 -2
  168. package/models/operations/outboundbatchupload.js.map +1 -1
  169. package/models/operations/takeoutsgetbyjobid.d.ts +29 -0
  170. package/models/operations/takeoutsgetbyjobid.d.ts.map +1 -0
  171. package/models/operations/{gettakeoutapiv1takeoutsgetjobidget.js → takeoutsgetbyjobid.js} +17 -17
  172. package/models/operations/takeoutsgetbyjobid.js.map +1 -0
  173. package/openapi.json +1206 -423
  174. package/package.json +1 -1
  175. package/sdk/batches.d.ts +4 -4
  176. package/sdk/batches.d.ts.map +1 -1
  177. package/sdk/batches.js +9 -9
  178. package/sdk/batches.js.map +1 -1
  179. package/sdk/campaigns.d.ts +1 -1
  180. package/sdk/campaigns.d.ts.map +1 -1
  181. package/sdk/incidents.d.ts +20 -13
  182. package/sdk/incidents.d.ts.map +1 -1
  183. package/sdk/incidents.js +26 -16
  184. package/sdk/incidents.js.map +1 -1
  185. package/sdk/insights.d.ts +1 -1
  186. package/sdk/insights.js +1 -1
  187. package/sdk/syllablesdktools.d.ts +9 -2
  188. package/sdk/syllablesdktools.d.ts.map +1 -1
  189. package/sdk/syllablesdktools.js +12 -2
  190. package/sdk/syllablesdktools.js.map +1 -1
  191. package/sdk/takeouts.d.ts +2 -2
  192. package/sdk/takeouts.d.ts.map +1 -1
  193. package/sdk/takeouts.js +6 -6
  194. package/sdk/takeouts.js.map +1 -1
  195. package/sdk/workflows.d.ts +1 -1
  196. package/sdk/workflows.js +1 -1
  197. package/src/funcs/incidentsCreate.ts +5 -5
  198. package/src/funcs/incidentsDelete.ts +6 -1
  199. package/src/funcs/incidentsGetById.ts +3 -3
  200. package/src/funcs/incidentsIncidentGetOrganizations.ts +112 -0
  201. package/src/funcs/incidentsList.ts +12 -6
  202. package/src/funcs/incidentsUpdate.ts +8 -18
  203. package/src/funcs/insightsList.ts +1 -1
  204. package/src/funcs/insightsToolsCreate.ts +4 -4
  205. package/src/funcs/insightsToolsInsightsToolTest.ts +136 -0
  206. package/src/funcs/insightsToolsUpdate.ts +1 -1
  207. package/src/funcs/insightsWorkflowsQueueSessionsWorkflow.ts +1 -1
  208. package/src/funcs/{outboundBatchesOutboundBatchAdd.ts → outboundBatchesAdd.ts} +1 -1
  209. package/src/funcs/outboundBatchesList.ts +3 -4
  210. package/src/funcs/{outboundBatchesOutboundBatchRemove.ts → outboundBatchesRemove.ts} +1 -1
  211. package/src/funcs/{outboundBatchesOutboundBatchResults.ts → outboundBatchesResults.ts} +8 -2
  212. package/src/funcs/outboundBatchesUpload.ts +23 -20
  213. package/src/funcs/outboundCampaignsList.ts +3 -4
  214. package/src/funcs/{takeoutsCreateTakeoutApiV1TakeoutsCreatePost.ts → takeoutsCreate.ts} +2 -2
  215. package/src/funcs/{takeoutsGetTakeoutApiV1TakeoutsGetJobIdGet.ts → takeoutsTakeoutsGetByJobId.ts} +4 -7
  216. package/src/lib/config.ts +2 -2
  217. package/src/models/components/bodyoutboundbatchdelete.ts +11 -2
  218. package/src/models/components/bodyoutboundbatchupload.ts +4 -4
  219. package/src/models/components/communicationrequest.ts +0 -23
  220. package/src/models/components/communicationrequestresult.ts +78 -30
  221. package/src/models/components/conversation.ts +18 -0
  222. package/src/models/components/{serviceincidentrequest.ts → incidentcreaterequest.ts} +69 -39
  223. package/src/models/components/incidentorganizationresponse.ts +85 -0
  224. package/src/models/components/incidentproperties.ts +49 -0
  225. package/src/models/components/incidentresponse.ts +182 -0
  226. package/src/models/components/incidentupdaterequest.ts +182 -0
  227. package/src/models/components/index.ts +9 -3
  228. package/src/models/components/insighttooltestinput.ts +90 -0
  229. package/src/models/components/listresponsecommunicationbatch.ts +118 -0
  230. package/src/models/components/listresponseincidentresponse.ts +118 -0
  231. package/src/models/components/listresponseoutboundcampaign.ts +118 -0
  232. package/src/models/components/outboundcampaign.ts +14 -0
  233. package/src/models/components/outboundcampaigninput.ts +14 -0
  234. package/src/models/components/promptcreaterequest.ts +1 -1
  235. package/src/models/components/promptupdaterequest.ts +1 -1
  236. package/src/models/operations/incidentdelete.ts +4 -0
  237. package/src/models/operations/incidentlist.ts +87 -6
  238. package/src/models/operations/index.ts +1 -2
  239. package/src/models/operations/outboundbatchresults.ts +10 -0
  240. package/src/models/operations/outboundbatchupload.ts +8 -4
  241. package/src/models/operations/takeoutsgetbyjobid.ts +75 -0
  242. package/src/sdk/batches.ts +10 -10
  243. package/src/sdk/campaigns.ts +1 -1
  244. package/src/sdk/incidents.ts +43 -27
  245. package/src/sdk/insights.ts +1 -1
  246. package/src/sdk/syllablesdktools.ts +20 -2
  247. package/src/sdk/takeouts.ts +7 -7
  248. package/src/sdk/workflows.ts +1 -1
  249. package/funcs/outboundBatchesOutboundBatchAdd.d.ts.map +0 -1
  250. package/funcs/outboundBatchesOutboundBatchAdd.js.map +0 -1
  251. package/funcs/outboundBatchesOutboundBatchRemove.d.ts.map +0 -1
  252. package/funcs/outboundBatchesOutboundBatchRemove.js.map +0 -1
  253. package/funcs/outboundBatchesOutboundBatchResults.d.ts.map +0 -1
  254. package/funcs/outboundBatchesOutboundBatchResults.js.map +0 -1
  255. package/funcs/takeoutsCreateTakeoutApiV1TakeoutsCreatePost.d.ts.map +0 -1
  256. package/funcs/takeoutsCreateTakeoutApiV1TakeoutsCreatePost.js.map +0 -1
  257. package/funcs/takeoutsGetTakeoutApiV1TakeoutsGetJobIdGet.d.ts.map +0 -1
  258. package/funcs/takeoutsGetTakeoutApiV1TakeoutsGetJobIdGet.js.map +0 -1
  259. package/models/components/requeststatus.d.ts +0 -46
  260. package/models/components/requeststatus.d.ts.map +0 -1
  261. package/models/components/requeststatus.js.map +0 -1
  262. package/models/components/serviceincidentrequest.d.ts +0 -45
  263. package/models/components/serviceincidentrequest.d.ts.map +0 -1
  264. package/models/components/serviceincidentrequest.js.map +0 -1
  265. package/models/components/serviceincidentresponse.d.ts +0 -51
  266. package/models/components/serviceincidentresponse.d.ts.map +0 -1
  267. package/models/components/serviceincidentresponse.js.map +0 -1
  268. package/models/operations/gettakeoutapiv1takeoutsgetjobidget.d.ts +0 -29
  269. package/models/operations/gettakeoutapiv1takeoutsgetjobidget.d.ts.map +0 -1
  270. package/models/operations/gettakeoutapiv1takeoutsgetjobidget.js.map +0 -1
  271. package/models/operations/incidentupdate.d.ts +0 -32
  272. package/models/operations/incidentupdate.d.ts.map +0 -1
  273. package/models/operations/incidentupdate.js.map +0 -1
  274. package/src/models/components/requeststatus.ts +0 -43
  275. package/src/models/components/serviceincidentresponse.ts +0 -139
  276. package/src/models/operations/gettakeoutapiv1takeoutsgetjobidget.ts +0 -87
  277. package/src/models/operations/incidentupdate.ts +0 -82
package/src/lib/config.ts CHANGED
@@ -57,8 +57,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
57
57
  export const SDK_METADATA = {
58
58
  language: "typescript",
59
59
  openapiDocVersion: "0.0.2",
60
- sdkVersion: "0.1.0-alpha.73",
60
+ sdkVersion: "0.1.0-alpha.74",
61
61
  genVersion: "2.512.4",
62
62
  userAgent:
63
- "speakeasy-sdk/typescript 0.1.0-alpha.73 2.512.4 0.0.2 syllable-sdk",
63
+ "speakeasy-sdk/typescript 0.1.0-alpha.74 2.512.4 0.0.2 syllable-sdk",
64
64
  } as const;
@@ -3,6 +3,7 @@
3
3
  */
4
4
 
5
5
  import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
6
7
  import { safeParse } from "../../lib/schemas.js";
7
8
  import { Result as SafeParseResult } from "../../types/fp.js";
8
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
@@ -17,12 +18,16 @@ export const BodyOutboundBatchDelete$inboundSchema: z.ZodType<
17
18
  z.ZodTypeDef,
18
19
  unknown
19
20
  > = z.object({
20
- deleteReason: z.string(),
21
+ delete_reason: z.string(),
22
+ }).transform((v) => {
23
+ return remap$(v, {
24
+ "delete_reason": "deleteReason",
25
+ });
21
26
  });
22
27
 
23
28
  /** @internal */
24
29
  export type BodyOutboundBatchDelete$Outbound = {
25
- deleteReason: string;
30
+ delete_reason: string;
26
31
  };
27
32
 
28
33
  /** @internal */
@@ -32,6 +37,10 @@ export const BodyOutboundBatchDelete$outboundSchema: z.ZodType<
32
37
  BodyOutboundBatchDelete
33
38
  > = z.object({
34
39
  deleteReason: z.string(),
40
+ }).transform((v) => {
41
+ return remap$(v, {
42
+ deleteReason: "delete_reason",
43
+ });
35
44
  });
36
45
 
37
46
  /**
@@ -14,7 +14,7 @@ export type FileT = {
14
14
  };
15
15
 
16
16
  export type BodyOutboundBatchUpload = {
17
- file: FileT | Blob;
17
+ file?: FileT | Blob | undefined;
18
18
  };
19
19
 
20
20
  /** @internal */
@@ -83,12 +83,12 @@ export const BodyOutboundBatchUpload$inboundSchema: z.ZodType<
83
83
  z.ZodTypeDef,
84
84
  unknown
85
85
  > = z.object({
86
- file: z.lazy(() => FileT$inboundSchema),
86
+ file: z.lazy(() => FileT$inboundSchema).optional(),
87
87
  });
88
88
 
89
89
  /** @internal */
90
90
  export type BodyOutboundBatchUpload$Outbound = {
91
- file: FileT$Outbound | Blob;
91
+ file?: FileT$Outbound | Blob | undefined;
92
92
  };
93
93
 
94
94
  /** @internal */
@@ -97,7 +97,7 @@ export const BodyOutboundBatchUpload$outboundSchema: z.ZodType<
97
97
  z.ZodTypeDef,
98
98
  BodyOutboundBatchUpload
99
99
  > = z.object({
100
- file: z.lazy(() => FileT$outboundSchema).or(blobLikeSchema),
100
+ file: z.lazy(() => FileT$outboundSchema).or(blobLikeSchema).optional(),
101
101
  });
102
102
 
103
103
  /**
@@ -7,11 +7,6 @@ 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
@@ -19,10 +14,6 @@ import {
19
14
  export type CommunicationRequestRequestVariables = {};
20
15
 
21
16
  export type CommunicationRequest = {
22
- /**
23
- * Unique ID for conversation batch
24
- */
25
- batchId: string;
26
17
  /**
27
18
  * ID for target outreach (unique within batch)
28
19
  */
@@ -31,10 +22,6 @@ export type CommunicationRequest = {
31
22
  * Target phone number or email address
32
23
  */
33
24
  target: string;
34
- /**
35
- * Status of a communication request.
36
- */
37
- requestStatus?: RequestStatus | undefined;
38
25
  /**
39
26
  * Variables for request
40
27
  */
@@ -100,28 +87,22 @@ export const CommunicationRequest$inboundSchema: z.ZodType<
100
87
  z.ZodTypeDef,
101
88
  unknown
102
89
  > = z.object({
103
- batch_id: z.string(),
104
90
  reference_id: z.string(),
105
91
  target: z.string(),
106
- request_status: RequestStatus$inboundSchema.optional(),
107
92
  request_variables: z.lazy(() =>
108
93
  CommunicationRequestRequestVariables$inboundSchema
109
94
  ),
110
95
  }).transform((v) => {
111
96
  return remap$(v, {
112
- "batch_id": "batchId",
113
97
  "reference_id": "referenceId",
114
- "request_status": "requestStatus",
115
98
  "request_variables": "requestVariables",
116
99
  });
117
100
  });
118
101
 
119
102
  /** @internal */
120
103
  export type CommunicationRequest$Outbound = {
121
- batch_id: string;
122
104
  reference_id: string;
123
105
  target: string;
124
- request_status?: string | undefined;
125
106
  request_variables: CommunicationRequestRequestVariables$Outbound;
126
107
  };
127
108
 
@@ -131,18 +112,14 @@ export const CommunicationRequest$outboundSchema: z.ZodType<
131
112
  z.ZodTypeDef,
132
113
  CommunicationRequest
133
114
  > = z.object({
134
- batchId: z.string(),
135
115
  referenceId: z.string(),
136
116
  target: z.string(),
137
- requestStatus: RequestStatus$outboundSchema.optional(),
138
117
  requestVariables: z.lazy(() =>
139
118
  CommunicationRequestRequestVariables$outboundSchema
140
119
  ),
141
120
  }).transform((v) => {
142
121
  return remap$(v, {
143
- batchId: "batch_id",
144
122
  referenceId: "reference_id",
145
- requestStatus: "request_status",
146
123
  requestVariables: "request_variables",
147
124
  });
148
125
  });
@@ -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
  });
@@ -8,27 +8,54 @@ 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
10
 
11
- export type ServiceIncidentRequest = {
12
- organizationId: number | null;
13
- subOrganizationId: number | null;
14
- subOrganization: string | null;
11
+ /**
12
+ * Request model to create a service incident.
13
+ */
14
+ export type IncidentCreateRequest = {
15
+ /**
16
+ * Description of the service incident
17
+ */
15
18
  description: string;
19
+ /**
20
+ * Start time of the incident
21
+ */
16
22
  startDatetime: Date;
23
+ /**
24
+ * Resolution time of the incident
25
+ */
17
26
  resolutionDatetime: Date;
27
+ /**
28
+ * Category of the impact
29
+ */
18
30
  impactCategory: string;
31
+ /**
32
+ * Number of sessions impacted
33
+ */
19
34
  sessionsImpacted: number;
35
+ /**
36
+ * Detailed markdown description of the incident
37
+ */
20
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;
21
51
  };
22
52
 
23
53
  /** @internal */
24
- export const ServiceIncidentRequest$inboundSchema: z.ZodType<
25
- ServiceIncidentRequest,
54
+ export const IncidentCreateRequest$inboundSchema: z.ZodType<
55
+ IncidentCreateRequest,
26
56
  z.ZodTypeDef,
27
57
  unknown
28
58
  > = z.object({
29
- organization_id: z.nullable(z.number().int()),
30
- sub_organization_id: z.nullable(z.number().int()),
31
- sub_organization: z.nullable(z.string()),
32
59
  description: z.string(),
33
60
  start_datetime: z.string().datetime({ offset: true }).transform(v =>
34
61
  new Date(v)
@@ -39,55 +66,58 @@ export const ServiceIncidentRequest$inboundSchema: z.ZodType<
39
66
  impact_category: z.string(),
40
67
  sessions_impacted: z.number().int(),
41
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(),
42
72
  }).transform((v) => {
43
73
  return remap$(v, {
44
- "organization_id": "organizationId",
45
- "sub_organization_id": "subOrganizationId",
46
- "sub_organization": "subOrganization",
47
74
  "start_datetime": "startDatetime",
48
75
  "resolution_datetime": "resolutionDatetime",
49
76
  "impact_category": "impactCategory",
50
77
  "sessions_impacted": "sessionsImpacted",
78
+ "organization_id": "organizationId",
79
+ "sub_organization_id": "subOrganizationId",
80
+ "sub_organization": "subOrganization",
51
81
  });
52
82
  });
53
83
 
54
84
  /** @internal */
55
- export type ServiceIncidentRequest$Outbound = {
56
- organization_id: number | null;
57
- sub_organization_id: number | null;
58
- sub_organization: string | null;
85
+ export type IncidentCreateRequest$Outbound = {
59
86
  description: string;
60
87
  start_datetime: string;
61
88
  resolution_datetime: string;
62
89
  impact_category: string;
63
90
  sessions_impacted: number;
64
91
  markdown: string;
92
+ organization_id?: number | null | undefined;
93
+ sub_organization_id?: number | null | undefined;
94
+ sub_organization?: string | null | undefined;
65
95
  };
66
96
 
67
97
  /** @internal */
68
- export const ServiceIncidentRequest$outboundSchema: z.ZodType<
69
- ServiceIncidentRequest$Outbound,
98
+ export const IncidentCreateRequest$outboundSchema: z.ZodType<
99
+ IncidentCreateRequest$Outbound,
70
100
  z.ZodTypeDef,
71
- ServiceIncidentRequest
101
+ IncidentCreateRequest
72
102
  > = z.object({
73
- organizationId: z.nullable(z.number().int()),
74
- subOrganizationId: z.nullable(z.number().int()),
75
- subOrganization: z.nullable(z.string()),
76
103
  description: z.string(),
77
104
  startDatetime: z.date().transform(v => v.toISOString()),
78
105
  resolutionDatetime: z.date().transform(v => v.toISOString()),
79
106
  impactCategory: z.string(),
80
107
  sessionsImpacted: z.number().int(),
81
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(),
82
112
  }).transform((v) => {
83
113
  return remap$(v, {
84
- organizationId: "organization_id",
85
- subOrganizationId: "sub_organization_id",
86
- subOrganization: "sub_organization",
87
114
  startDatetime: "start_datetime",
88
115
  resolutionDatetime: "resolution_datetime",
89
116
  impactCategory: "impact_category",
90
117
  sessionsImpacted: "sessions_impacted",
118
+ organizationId: "organization_id",
119
+ subOrganizationId: "sub_organization_id",
120
+ subOrganization: "sub_organization",
91
121
  });
92
122
  });
93
123
 
@@ -95,29 +125,29 @@ export const ServiceIncidentRequest$outboundSchema: z.ZodType<
95
125
  * @internal
96
126
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
97
127
  */
98
- export namespace ServiceIncidentRequest$ {
99
- /** @deprecated use `ServiceIncidentRequest$inboundSchema` instead. */
100
- export const inboundSchema = ServiceIncidentRequest$inboundSchema;
101
- /** @deprecated use `ServiceIncidentRequest$outboundSchema` instead. */
102
- export const outboundSchema = ServiceIncidentRequest$outboundSchema;
103
- /** @deprecated use `ServiceIncidentRequest$Outbound` instead. */
104
- export type Outbound = ServiceIncidentRequest$Outbound;
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;
105
135
  }
106
136
 
107
- export function serviceIncidentRequestToJSON(
108
- serviceIncidentRequest: ServiceIncidentRequest,
137
+ export function incidentCreateRequestToJSON(
138
+ incidentCreateRequest: IncidentCreateRequest,
109
139
  ): string {
110
140
  return JSON.stringify(
111
- ServiceIncidentRequest$outboundSchema.parse(serviceIncidentRequest),
141
+ IncidentCreateRequest$outboundSchema.parse(incidentCreateRequest),
112
142
  );
113
143
  }
114
144
 
115
- export function serviceIncidentRequestFromJSON(
145
+ export function incidentCreateRequestFromJSON(
116
146
  jsonString: string,
117
- ): SafeParseResult<ServiceIncidentRequest, SDKValidationError> {
147
+ ): SafeParseResult<IncidentCreateRequest, SDKValidationError> {
118
148
  return safeParse(
119
149
  jsonString,
120
- (x) => ServiceIncidentRequest$inboundSchema.parse(JSON.parse(x)),
121
- `Failed to parse 'ServiceIncidentRequest' from JSON`,
150
+ (x) => IncidentCreateRequest$inboundSchema.parse(JSON.parse(x)),
151
+ `Failed to parse 'IncidentCreateRequest' from JSON`,
122
152
  );
123
153
  }