syllable-sdk 0.1.0-alpha.74 → 0.1.0-alpha.75

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 (163) hide show
  1. package/README.md +5 -15
  2. package/docs/sdks/batches/README.md +10 -24
  3. package/docs/sdks/campaigns/README.md +14 -6
  4. package/docs/sdks/latency/README.md +85 -0
  5. package/funcs/outboundBatchesUpdate.js +1 -1
  6. package/funcs/outboundBatchesUpdate.js.map +1 -1
  7. package/funcs/{v1PostListDashboard.d.ts → sessionsLatencyGetById.d.ts} +3 -9
  8. package/funcs/sessionsLatencyGetById.d.ts.map +1 -0
  9. package/funcs/{v1PostGetDashboard.js → sessionsLatencyGetById.js} +15 -19
  10. package/funcs/sessionsLatencyGetById.js.map +1 -0
  11. package/jsr.json +1 -1
  12. package/lib/config.d.ts +2 -2
  13. package/lib/config.js +2 -2
  14. package/models/components/batchdetails.d.ts +8 -3
  15. package/models/components/batchdetails.d.ts.map +1 -1
  16. package/models/components/batchdetails.js +8 -2
  17. package/models/components/batchdetails.js.map +1 -1
  18. package/models/components/batchstatus.d.ts +3 -3
  19. package/models/components/batchstatus.js +1 -1
  20. package/models/components/batchstatus.js.map +1 -1
  21. package/models/components/communicationbatch.d.ts +8 -3
  22. package/models/components/communicationbatch.d.ts.map +1 -1
  23. package/models/components/communicationbatch.js +8 -2
  24. package/models/components/communicationbatch.js.map +1 -1
  25. package/models/components/communicationbatchupdate.d.ts +37 -0
  26. package/models/components/communicationbatchupdate.d.ts.map +1 -0
  27. package/models/components/communicationbatchupdate.js +70 -0
  28. package/models/components/communicationbatchupdate.js.map +1 -0
  29. package/models/components/communicationrequestresult.d.ts +6 -0
  30. package/models/components/communicationrequestresult.d.ts.map +1 -1
  31. package/models/components/communicationrequestresult.js +5 -0
  32. package/models/components/communicationrequestresult.js.map +1 -1
  33. package/models/components/daysofweek.d.ts +49 -0
  34. package/models/components/daysofweek.d.ts.map +1 -0
  35. package/models/components/daysofweek.js +59 -0
  36. package/models/components/daysofweek.js.map +1 -0
  37. package/models/components/index.d.ts +8 -0
  38. package/models/components/index.d.ts.map +1 -1
  39. package/models/components/index.js +8 -0
  40. package/models/components/index.js.map +1 -1
  41. package/models/components/inspectlatencyresponse.d.ts +42 -0
  42. package/models/components/inspectlatencyresponse.d.ts.map +1 -0
  43. package/models/components/inspectlatencyresponse.js +74 -0
  44. package/models/components/inspectlatencyresponse.js.map +1 -0
  45. package/models/components/latencycategory.d.ts +37 -0
  46. package/models/components/latencycategory.d.ts.map +1 -0
  47. package/models/components/latencycategory.js +53 -0
  48. package/models/components/latencycategory.js.map +1 -0
  49. package/models/components/latencyentry.d.ts +50 -0
  50. package/models/components/latencyentry.d.ts.map +1 -0
  51. package/models/components/latencyentry.js +92 -0
  52. package/models/components/latencyentry.js.map +1 -0
  53. package/models/components/latencyunittype.d.ts +37 -0
  54. package/models/components/latencyunittype.d.ts.map +1 -0
  55. package/models/components/latencyunittype.js +53 -0
  56. package/models/components/latencyunittype.js.map +1 -0
  57. package/models/components/outboundcampaign.d.ts +7 -6
  58. package/models/components/outboundcampaign.d.ts.map +1 -1
  59. package/models/components/outboundcampaign.js +9 -6
  60. package/models/components/outboundcampaign.js.map +1 -1
  61. package/models/components/outboundcampaigninput.d.ts +7 -6
  62. package/models/components/outboundcampaigninput.d.ts.map +1 -1
  63. package/models/components/outboundcampaigninput.js +9 -6
  64. package/models/components/outboundcampaigninput.js.map +1 -1
  65. package/models/components/promptcreaterequest.d.ts +1 -1
  66. package/models/components/promptupdaterequest.d.ts +1 -1
  67. package/models/components/requeststatus.d.ts +46 -0
  68. package/models/components/requeststatus.d.ts.map +1 -0
  69. package/models/components/requeststatus.js +57 -0
  70. package/models/components/requeststatus.js.map +1 -0
  71. package/models/components/summaryentry.d.ts +46 -0
  72. package/models/components/summaryentry.d.ts.map +1 -0
  73. package/models/components/summaryentry.js +87 -0
  74. package/models/components/summaryentry.js.map +1 -0
  75. package/models/operations/index.d.ts +1 -0
  76. package/models/operations/index.d.ts.map +1 -1
  77. package/models/operations/index.js +1 -0
  78. package/models/operations/index.js.map +1 -1
  79. package/models/operations/outboundbatchupdate.d.ts +2 -2
  80. package/models/operations/outboundbatchupdate.d.ts.map +1 -1
  81. package/models/operations/outboundbatchupdate.js +4 -4
  82. package/models/operations/outboundbatchupdate.js.map +1 -1
  83. package/models/operations/outboundcampaigngetbyid.d.ts +2 -2
  84. package/models/operations/outboundcampaigngetbyid.js +2 -2
  85. package/models/operations/outboundcampaigngetbyid.js.map +1 -1
  86. package/models/operations/sessionlatencygetbyid.d.ts +29 -0
  87. package/models/operations/sessionlatencygetbyid.d.ts.map +1 -0
  88. package/models/operations/sessionlatencygetbyid.js +68 -0
  89. package/models/operations/sessionlatencygetbyid.js.map +1 -0
  90. package/openapi.json +488 -291
  91. package/package.json +1 -1
  92. package/sdk/latency.d.ts +10 -0
  93. package/sdk/latency.d.ts.map +1 -0
  94. package/sdk/latency.js +19 -0
  95. package/sdk/latency.js.map +1 -0
  96. package/sdk/sdk.d.ts +0 -3
  97. package/sdk/sdk.d.ts.map +1 -1
  98. package/sdk/sdk.js +0 -4
  99. package/sdk/sdk.js.map +1 -1
  100. package/sdk/sessions.d.ts +3 -0
  101. package/sdk/sessions.d.ts.map +1 -1
  102. package/sdk/sessions.js +4 -0
  103. package/sdk/sessions.js.map +1 -1
  104. package/src/funcs/outboundBatchesUpdate.ts +1 -1
  105. package/src/funcs/{v1PostGetDashboard.ts → sessionsLatencyGetById.ts} +18 -21
  106. package/src/lib/config.ts +2 -2
  107. package/src/models/components/batchdetails.ts +16 -5
  108. package/src/models/components/batchstatus.ts +1 -1
  109. package/src/models/components/communicationbatch.ts +16 -5
  110. package/src/models/components/communicationbatchupdate.ts +85 -0
  111. package/src/models/components/communicationrequestresult.ts +14 -0
  112. package/src/models/components/daysofweek.ts +42 -0
  113. package/src/models/components/index.ts +8 -0
  114. package/src/models/components/inspectlatencyresponse.ts +102 -0
  115. package/src/models/components/latencycategory.ts +36 -0
  116. package/src/models/components/latencyentry.ts +124 -0
  117. package/src/models/components/latencyunittype.ts +36 -0
  118. package/src/models/components/outboundcampaign.ts +19 -12
  119. package/src/models/components/outboundcampaigninput.ts +19 -12
  120. package/src/models/components/promptcreaterequest.ts +1 -1
  121. package/src/models/components/promptupdaterequest.ts +1 -1
  122. package/src/models/components/requeststatus.ts +43 -0
  123. package/src/models/components/summaryentry.ts +110 -0
  124. package/src/models/operations/index.ts +1 -0
  125. package/src/models/operations/outboundbatchupdate.ts +6 -6
  126. package/src/models/operations/outboundcampaigngetbyid.ts +4 -4
  127. package/src/models/operations/sessionlatencygetbyid.ts +77 -0
  128. package/src/sdk/latency.ts +25 -0
  129. package/src/sdk/sdk.ts +0 -6
  130. package/src/sdk/sessions.ts +6 -0
  131. package/docs/sdks/v1/README.md +0 -497
  132. package/funcs/v1PostGetDashboard.d.ts +0 -20
  133. package/funcs/v1PostGetDashboard.d.ts.map +0 -1
  134. package/funcs/v1PostGetDashboard.js.map +0 -1
  135. package/funcs/v1PostListDashboard.d.ts.map +0 -1
  136. package/funcs/v1PostListDashboard.js +0 -117
  137. package/funcs/v1PostListDashboard.js.map +0 -1
  138. package/funcs/v1PostSessionEventsDashboard.d.ts +0 -21
  139. package/funcs/v1PostSessionEventsDashboard.d.ts.map +0 -1
  140. package/funcs/v1PostSessionEventsDashboard.js +0 -94
  141. package/funcs/v1PostSessionEventsDashboard.js.map +0 -1
  142. package/funcs/v1PostSessionSummaryDashboard.d.ts +0 -21
  143. package/funcs/v1PostSessionSummaryDashboard.d.ts.map +0 -1
  144. package/funcs/v1PostSessionSummaryDashboard.js +0 -94
  145. package/funcs/v1PostSessionSummaryDashboard.js.map +0 -1
  146. package/funcs/v1PostSessionTransfersDashboard.d.ts +0 -21
  147. package/funcs/v1PostSessionTransfersDashboard.d.ts.map +0 -1
  148. package/funcs/v1PostSessionTransfersDashboard.js +0 -94
  149. package/funcs/v1PostSessionTransfersDashboard.js.map +0 -1
  150. package/funcs/v1PostSessionsDashboard.d.ts +0 -21
  151. package/funcs/v1PostSessionsDashboard.d.ts.map +0 -1
  152. package/funcs/v1PostSessionsDashboard.js +0 -94
  153. package/funcs/v1PostSessionsDashboard.js.map +0 -1
  154. package/sdk/v1.d.ts +0 -78
  155. package/sdk/v1.d.ts.map +0 -1
  156. package/sdk/v1.js +0 -102
  157. package/sdk/v1.js.map +0 -1
  158. package/src/funcs/v1PostListDashboard.ts +0 -151
  159. package/src/funcs/v1PostSessionEventsDashboard.ts +0 -117
  160. package/src/funcs/v1PostSessionSummaryDashboard.ts +0 -117
  161. package/src/funcs/v1PostSessionTransfersDashboard.ts +0 -117
  162. package/src/funcs/v1PostSessionsDashboard.ts +0 -117
  163. package/src/sdk/v1.ts +0 -140
@@ -0,0 +1,42 @@
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
+ * Enum representing days of the week.
10
+ */
11
+ export const DaysOfWeek = {
12
+ Mon: "mon",
13
+ Tue: "tue",
14
+ Wed: "wed",
15
+ Thu: "thu",
16
+ Fri: "fri",
17
+ Sat: "sat",
18
+ Sun: "sun",
19
+ } as const;
20
+ /**
21
+ * Enum representing days of the week.
22
+ */
23
+ export type DaysOfWeek = ClosedEnum<typeof DaysOfWeek>;
24
+
25
+ /** @internal */
26
+ export const DaysOfWeek$inboundSchema: z.ZodNativeEnum<typeof DaysOfWeek> = z
27
+ .nativeEnum(DaysOfWeek);
28
+
29
+ /** @internal */
30
+ export const DaysOfWeek$outboundSchema: z.ZodNativeEnum<typeof DaysOfWeek> =
31
+ DaysOfWeek$inboundSchema;
32
+
33
+ /**
34
+ * @internal
35
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
36
+ */
37
+ export namespace DaysOfWeek$ {
38
+ /** @deprecated use `DaysOfWeek$inboundSchema` instead. */
39
+ export const inboundSchema = DaysOfWeek$inboundSchema;
40
+ /** @deprecated use `DaysOfWeek$outboundSchema` instead. */
41
+ export const outboundSchema = DaysOfWeek$outboundSchema;
42
+ }
@@ -33,6 +33,7 @@ export * from "./channeltargetresponse.js";
33
33
  export * from "./channeltargetupdaterequest.js";
34
34
  export * from "./communicationbatch.js";
35
35
  export * from "./communicationbatchinput.js";
36
+ export * from "./communicationbatchupdate.js";
36
37
  export * from "./communicationrequest.js";
37
38
  export * from "./communicationrequestresult.js";
38
39
  export * from "./conversation.js";
@@ -53,6 +54,7 @@ export * from "./datasourcemetadataresponse.js";
53
54
  export * from "./datasourceproperties.js";
54
55
  export * from "./datasourceupdaterequest.js";
55
56
  export * from "./dayofweek.js";
57
+ export * from "./daysofweek.js";
56
58
  export * from "./dialogmessage.js";
57
59
  export * from "./dialogrole.js";
58
60
  export * from "./dialogtoolcall.js";
@@ -74,6 +76,7 @@ export * from "./insighttooltestinput.js";
74
76
  export * from "./insightworkflowinput.js";
75
77
  export * from "./insightworkflowoutput.js";
76
78
  export * from "./insightworkflowproperties.js";
79
+ export * from "./inspectlatencyresponse.js";
77
80
  export * from "./internaltool.js";
78
81
  export * from "./languagecode.js";
79
82
  export * from "./languageconfig.js";
@@ -82,6 +85,9 @@ export * from "./languagegroupcreaterequest.js";
82
85
  export * from "./languagegroupproperties.js";
83
86
  export * from "./languagegroupresponse.js";
84
87
  export * from "./languagegroupupdaterequest.js";
88
+ export * from "./latencycategory.js";
89
+ export * from "./latencyentry.js";
90
+ export * from "./latencyunittype.js";
85
91
  export * from "./listresponseagentresponse.js";
86
92
  export * from "./listresponseavailabletarget.js";
87
93
  export * from "./listresponsechannel.js";
@@ -113,6 +119,7 @@ export * from "./promptllmprovider.js";
113
119
  export * from "./promptproperties.js";
114
120
  export * from "./promptresponse.js";
115
121
  export * from "./promptupdaterequest.js";
122
+ export * from "./requeststatus.js";
116
123
  export * from "./security.js";
117
124
  export * from "./servicecreaterequest.js";
118
125
  export * from "./serviceproperties.js";
@@ -132,6 +139,7 @@ export * from "./sessiontext.js";
132
139
  export * from "./sessiontranscriptionresponse.js";
133
140
  export * from "./statictoolparameter.js";
134
141
  export * from "./statictoolparametertype.js";
142
+ export * from "./summaryentry.js";
135
143
  export * from "./supportedllm.js";
136
144
  export * from "./takeoutrequeststatus.js";
137
145
  export * from "./takeoutstatusresponse.js";
@@ -0,0 +1,102 @@
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
+ import {
11
+ LatencyEntry,
12
+ LatencyEntry$inboundSchema,
13
+ LatencyEntry$Outbound,
14
+ LatencyEntry$outboundSchema,
15
+ } from "./latencyentry.js";
16
+ import {
17
+ SummaryEntry,
18
+ SummaryEntry$inboundSchema,
19
+ SummaryEntry$Outbound,
20
+ SummaryEntry$outboundSchema,
21
+ } from "./summaryentry.js";
22
+
23
+ /**
24
+ * This is a report of the time spent in each operation during this session. It contains a timeline,
25
+ *
26
+ * @remarks
27
+ * which lists the operations in the order they were executed, and a summary, which aggregates the
28
+ * operations by category and sub-category.
29
+ */
30
+ export type InspectLatencyResponse = {
31
+ sessionId: string;
32
+ timeline: Array<LatencyEntry>;
33
+ summary?: Array<SummaryEntry> | undefined;
34
+ };
35
+
36
+ /** @internal */
37
+ export const InspectLatencyResponse$inboundSchema: z.ZodType<
38
+ InspectLatencyResponse,
39
+ z.ZodTypeDef,
40
+ unknown
41
+ > = z.object({
42
+ session_id: z.string(),
43
+ timeline: z.array(LatencyEntry$inboundSchema),
44
+ summary: z.array(SummaryEntry$inboundSchema).optional(),
45
+ }).transform((v) => {
46
+ return remap$(v, {
47
+ "session_id": "sessionId",
48
+ });
49
+ });
50
+
51
+ /** @internal */
52
+ export type InspectLatencyResponse$Outbound = {
53
+ session_id: string;
54
+ timeline: Array<LatencyEntry$Outbound>;
55
+ summary?: Array<SummaryEntry$Outbound> | undefined;
56
+ };
57
+
58
+ /** @internal */
59
+ export const InspectLatencyResponse$outboundSchema: z.ZodType<
60
+ InspectLatencyResponse$Outbound,
61
+ z.ZodTypeDef,
62
+ InspectLatencyResponse
63
+ > = z.object({
64
+ sessionId: z.string(),
65
+ timeline: z.array(LatencyEntry$outboundSchema),
66
+ summary: z.array(SummaryEntry$outboundSchema).optional(),
67
+ }).transform((v) => {
68
+ return remap$(v, {
69
+ sessionId: "session_id",
70
+ });
71
+ });
72
+
73
+ /**
74
+ * @internal
75
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
76
+ */
77
+ export namespace InspectLatencyResponse$ {
78
+ /** @deprecated use `InspectLatencyResponse$inboundSchema` instead. */
79
+ export const inboundSchema = InspectLatencyResponse$inboundSchema;
80
+ /** @deprecated use `InspectLatencyResponse$outboundSchema` instead. */
81
+ export const outboundSchema = InspectLatencyResponse$outboundSchema;
82
+ /** @deprecated use `InspectLatencyResponse$Outbound` instead. */
83
+ export type Outbound = InspectLatencyResponse$Outbound;
84
+ }
85
+
86
+ export function inspectLatencyResponseToJSON(
87
+ inspectLatencyResponse: InspectLatencyResponse,
88
+ ): string {
89
+ return JSON.stringify(
90
+ InspectLatencyResponse$outboundSchema.parse(inspectLatencyResponse),
91
+ );
92
+ }
93
+
94
+ export function inspectLatencyResponseFromJSON(
95
+ jsonString: string,
96
+ ): SafeParseResult<InspectLatencyResponse, SDKValidationError> {
97
+ return safeParse(
98
+ jsonString,
99
+ (x) => InspectLatencyResponse$inboundSchema.parse(JSON.parse(x)),
100
+ `Failed to parse 'InspectLatencyResponse' from JSON`,
101
+ );
102
+ }
@@ -0,0 +1,36 @@
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
+ export const LatencyCategory = {
9
+ Tts: "tts",
10
+ Stt: "stt",
11
+ Llm: "llm",
12
+ Tool: "tool",
13
+ Http: "http",
14
+ } as const;
15
+ export type LatencyCategory = ClosedEnum<typeof LatencyCategory>;
16
+
17
+ /** @internal */
18
+ export const LatencyCategory$inboundSchema: z.ZodNativeEnum<
19
+ typeof LatencyCategory
20
+ > = z.nativeEnum(LatencyCategory);
21
+
22
+ /** @internal */
23
+ export const LatencyCategory$outboundSchema: z.ZodNativeEnum<
24
+ typeof LatencyCategory
25
+ > = LatencyCategory$inboundSchema;
26
+
27
+ /**
28
+ * @internal
29
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
30
+ */
31
+ export namespace LatencyCategory$ {
32
+ /** @deprecated use `LatencyCategory$inboundSchema` instead. */
33
+ export const inboundSchema = LatencyCategory$inboundSchema;
34
+ /** @deprecated use `LatencyCategory$outboundSchema` instead. */
35
+ export const outboundSchema = LatencyCategory$outboundSchema;
36
+ }
@@ -0,0 +1,124 @@
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
+ import {
11
+ LatencyCategory,
12
+ LatencyCategory$inboundSchema,
13
+ LatencyCategory$outboundSchema,
14
+ } from "./latencycategory.js";
15
+ import {
16
+ LatencyUnitType,
17
+ LatencyUnitType$inboundSchema,
18
+ LatencyUnitType$outboundSchema,
19
+ } from "./latencyunittype.js";
20
+
21
+ /**
22
+ * Data model for latency entries.
23
+ */
24
+ export type LatencyEntry = {
25
+ timestamp: Date;
26
+ measurementStart: Date;
27
+ category: LatencyCategory;
28
+ label: string;
29
+ metadata?: Array<string> | null | undefined;
30
+ unitType: LatencyUnitType;
31
+ value: number;
32
+ valueStr: string;
33
+ timeDelta: string;
34
+ };
35
+
36
+ /** @internal */
37
+ export const LatencyEntry$inboundSchema: z.ZodType<
38
+ LatencyEntry,
39
+ z.ZodTypeDef,
40
+ unknown
41
+ > = z.object({
42
+ timestamp: z.string().datetime({ offset: true }).transform(v => new Date(v)),
43
+ measurement_start: z.string().datetime({ offset: true }).transform(v =>
44
+ new Date(v)
45
+ ),
46
+ category: LatencyCategory$inboundSchema,
47
+ label: z.string(),
48
+ metadata: z.nullable(z.array(z.string())).optional(),
49
+ unit_type: LatencyUnitType$inboundSchema,
50
+ value: z.number(),
51
+ value_str: z.string(),
52
+ time_delta: z.string(),
53
+ }).transform((v) => {
54
+ return remap$(v, {
55
+ "measurement_start": "measurementStart",
56
+ "unit_type": "unitType",
57
+ "value_str": "valueStr",
58
+ "time_delta": "timeDelta",
59
+ });
60
+ });
61
+
62
+ /** @internal */
63
+ export type LatencyEntry$Outbound = {
64
+ timestamp: string;
65
+ measurement_start: string;
66
+ category: string;
67
+ label: string;
68
+ metadata?: Array<string> | null | undefined;
69
+ unit_type: string;
70
+ value: number;
71
+ value_str: string;
72
+ time_delta: string;
73
+ };
74
+
75
+ /** @internal */
76
+ export const LatencyEntry$outboundSchema: z.ZodType<
77
+ LatencyEntry$Outbound,
78
+ z.ZodTypeDef,
79
+ LatencyEntry
80
+ > = z.object({
81
+ timestamp: z.date().transform(v => v.toISOString()),
82
+ measurementStart: z.date().transform(v => v.toISOString()),
83
+ category: LatencyCategory$outboundSchema,
84
+ label: z.string(),
85
+ metadata: z.nullable(z.array(z.string())).optional(),
86
+ unitType: LatencyUnitType$outboundSchema,
87
+ value: z.number(),
88
+ valueStr: z.string(),
89
+ timeDelta: z.string(),
90
+ }).transform((v) => {
91
+ return remap$(v, {
92
+ measurementStart: "measurement_start",
93
+ unitType: "unit_type",
94
+ valueStr: "value_str",
95
+ timeDelta: "time_delta",
96
+ });
97
+ });
98
+
99
+ /**
100
+ * @internal
101
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
102
+ */
103
+ export namespace LatencyEntry$ {
104
+ /** @deprecated use `LatencyEntry$inboundSchema` instead. */
105
+ export const inboundSchema = LatencyEntry$inboundSchema;
106
+ /** @deprecated use `LatencyEntry$outboundSchema` instead. */
107
+ export const outboundSchema = LatencyEntry$outboundSchema;
108
+ /** @deprecated use `LatencyEntry$Outbound` instead. */
109
+ export type Outbound = LatencyEntry$Outbound;
110
+ }
111
+
112
+ export function latencyEntryToJSON(latencyEntry: LatencyEntry): string {
113
+ return JSON.stringify(LatencyEntry$outboundSchema.parse(latencyEntry));
114
+ }
115
+
116
+ export function latencyEntryFromJSON(
117
+ jsonString: string,
118
+ ): SafeParseResult<LatencyEntry, SDKValidationError> {
119
+ return safeParse(
120
+ jsonString,
121
+ (x) => LatencyEntry$inboundSchema.parse(JSON.parse(x)),
122
+ `Failed to parse 'LatencyEntry' from JSON`,
123
+ );
124
+ }
@@ -0,0 +1,36 @@
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
+ export const LatencyUnitType = {
9
+ Minutes: "minutes",
10
+ Seconds: "seconds",
11
+ Milliseconds: "milliseconds",
12
+ Microseconds: "microseconds",
13
+ Nanoseconds: "nanoseconds",
14
+ } as const;
15
+ export type LatencyUnitType = ClosedEnum<typeof LatencyUnitType>;
16
+
17
+ /** @internal */
18
+ export const LatencyUnitType$inboundSchema: z.ZodNativeEnum<
19
+ typeof LatencyUnitType
20
+ > = z.nativeEnum(LatencyUnitType);
21
+
22
+ /** @internal */
23
+ export const LatencyUnitType$outboundSchema: z.ZodNativeEnum<
24
+ typeof LatencyUnitType
25
+ > = LatencyUnitType$inboundSchema;
26
+
27
+ /**
28
+ * @internal
29
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
30
+ */
31
+ export namespace LatencyUnitType$ {
32
+ /** @deprecated use `LatencyUnitType$inboundSchema` instead. */
33
+ export const inboundSchema = LatencyUnitType$inboundSchema;
34
+ /** @deprecated use `LatencyUnitType$outboundSchema` instead. */
35
+ export const outboundSchema = LatencyUnitType$outboundSchema;
36
+ }
@@ -7,6 +7,11 @@ 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
+ DaysOfWeek,
12
+ DaysOfWeek$inboundSchema,
13
+ DaysOfWeek$outboundSchema,
14
+ } from "./daysofweek.js";
10
15
 
11
16
  /**
12
17
  * Variables for campaign
@@ -51,9 +56,9 @@ export type OutboundCampaign = {
51
56
  */
52
57
  callerId: string | null;
53
58
  /**
54
- * Target number of outreach calls per minute
59
+ * Target number of outreach calls per hour
55
60
  */
56
- rate?: number | undefined;
61
+ hourlyRate?: number | undefined;
57
62
  /**
58
63
  * Number of retries per target
59
64
  */
@@ -63,9 +68,9 @@ export type OutboundCampaign = {
63
68
  */
64
69
  retryInterval?: string | null | undefined;
65
70
  /**
66
- * How many seconds to pause between queueing calls. Useful when rate should be less than 1 per minute
71
+ * Days of the week when campaign is active
67
72
  */
68
- pauseSeconds?: number | null | undefined;
73
+ activeDays: Array<DaysOfWeek>;
69
74
  /**
70
75
  * Unique ID for campaign
71
76
  */
@@ -147,10 +152,10 @@ export const OutboundCampaign$inboundSchema: z.ZodType<
147
152
  timezone: z.string(),
148
153
  source: z.nullable(z.string()).optional(),
149
154
  caller_id: z.nullable(z.string()),
150
- rate: z.number().int().default(1),
155
+ hourly_rate: z.number().int().default(1),
151
156
  retry_count: z.number().int().default(0),
152
157
  retry_interval: z.nullable(z.string()).optional(),
153
- pause_seconds: z.nullable(z.number().int()).optional(),
158
+ active_days: z.array(DaysOfWeek$inboundSchema),
154
159
  id: z.number().int(),
155
160
  created_at: z.string().optional(),
156
161
  updated_at: z.string().optional(),
@@ -162,9 +167,10 @@ export const OutboundCampaign$inboundSchema: z.ZodType<
162
167
  "daily_start_time": "dailyStartTime",
163
168
  "daily_end_time": "dailyEndTime",
164
169
  "caller_id": "callerId",
170
+ "hourly_rate": "hourlyRate",
165
171
  "retry_count": "retryCount",
166
172
  "retry_interval": "retryInterval",
167
- "pause_seconds": "pauseSeconds",
173
+ "active_days": "activeDays",
168
174
  "created_at": "createdAt",
169
175
  "updated_at": "updatedAt",
170
176
  "last_updated_by": "lastUpdatedBy",
@@ -182,10 +188,10 @@ export type OutboundCampaign$Outbound = {
182
188
  timezone: string;
183
189
  source?: string | null | undefined;
184
190
  caller_id: string | null;
185
- rate: number;
191
+ hourly_rate: number;
186
192
  retry_count: number;
187
193
  retry_interval?: string | null | undefined;
188
- pause_seconds?: number | null | undefined;
194
+ active_days: Array<string>;
189
195
  id: number;
190
196
  created_at?: string | undefined;
191
197
  updated_at?: string | undefined;
@@ -207,10 +213,10 @@ export const OutboundCampaign$outboundSchema: z.ZodType<
207
213
  timezone: z.string(),
208
214
  source: z.nullable(z.string()).optional(),
209
215
  callerId: z.nullable(z.string()),
210
- rate: z.number().int().default(1),
216
+ hourlyRate: z.number().int().default(1),
211
217
  retryCount: z.number().int().default(0),
212
218
  retryInterval: z.nullable(z.string()).optional(),
213
- pauseSeconds: z.nullable(z.number().int()).optional(),
219
+ activeDays: z.array(DaysOfWeek$outboundSchema),
214
220
  id: z.number().int(),
215
221
  createdAt: z.string().optional(),
216
222
  updatedAt: z.string().optional(),
@@ -222,9 +228,10 @@ export const OutboundCampaign$outboundSchema: z.ZodType<
222
228
  dailyStartTime: "daily_start_time",
223
229
  dailyEndTime: "daily_end_time",
224
230
  callerId: "caller_id",
231
+ hourlyRate: "hourly_rate",
225
232
  retryCount: "retry_count",
226
233
  retryInterval: "retry_interval",
227
- pauseSeconds: "pause_seconds",
234
+ activeDays: "active_days",
228
235
  createdAt: "created_at",
229
236
  updatedAt: "updated_at",
230
237
  lastUpdatedBy: "last_updated_by",
@@ -7,6 +7,11 @@ 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
+ DaysOfWeek,
12
+ DaysOfWeek$inboundSchema,
13
+ DaysOfWeek$outboundSchema,
14
+ } from "./daysofweek.js";
10
15
 
11
16
  /**
12
17
  * Variables for campaign
@@ -51,9 +56,9 @@ export type OutboundCampaignInput = {
51
56
  */
52
57
  callerId: string | null;
53
58
  /**
54
- * Target number of outreach calls per minute
59
+ * Target number of outreach calls per hour
55
60
  */
56
- rate?: number | undefined;
61
+ hourlyRate?: number | undefined;
57
62
  /**
58
63
  * Number of retries per target
59
64
  */
@@ -63,9 +68,9 @@ export type OutboundCampaignInput = {
63
68
  */
64
69
  retryInterval?: string | null | undefined;
65
70
  /**
66
- * How many seconds to pause between queueing calls. Useful when rate should be less than 1 per minute
71
+ * Days of the week when campaign is active
67
72
  */
68
- pauseSeconds?: number | null | undefined;
73
+ activeDays: Array<DaysOfWeek>;
69
74
  };
70
75
 
71
76
  /** @internal */
@@ -139,10 +144,10 @@ export const OutboundCampaignInput$inboundSchema: z.ZodType<
139
144
  timezone: z.string(),
140
145
  source: z.nullable(z.string()).optional(),
141
146
  caller_id: z.nullable(z.string()),
142
- rate: z.number().int().default(1),
147
+ hourly_rate: z.number().int().default(1),
143
148
  retry_count: z.number().int().default(0),
144
149
  retry_interval: z.nullable(z.string()).optional(),
145
- pause_seconds: z.nullable(z.number().int()).optional(),
150
+ active_days: z.array(DaysOfWeek$inboundSchema),
146
151
  }).transform((v) => {
147
152
  return remap$(v, {
148
153
  "campaign_name": "campaignName",
@@ -150,9 +155,10 @@ export const OutboundCampaignInput$inboundSchema: z.ZodType<
150
155
  "daily_start_time": "dailyStartTime",
151
156
  "daily_end_time": "dailyEndTime",
152
157
  "caller_id": "callerId",
158
+ "hourly_rate": "hourlyRate",
153
159
  "retry_count": "retryCount",
154
160
  "retry_interval": "retryInterval",
155
- "pause_seconds": "pauseSeconds",
161
+ "active_days": "activeDays",
156
162
  });
157
163
  });
158
164
 
@@ -167,10 +173,10 @@ export type OutboundCampaignInput$Outbound = {
167
173
  timezone: string;
168
174
  source?: string | null | undefined;
169
175
  caller_id: string | null;
170
- rate: number;
176
+ hourly_rate: number;
171
177
  retry_count: number;
172
178
  retry_interval?: string | null | undefined;
173
- pause_seconds?: number | null | undefined;
179
+ active_days: Array<string>;
174
180
  };
175
181
 
176
182
  /** @internal */
@@ -190,10 +196,10 @@ export const OutboundCampaignInput$outboundSchema: z.ZodType<
190
196
  timezone: z.string(),
191
197
  source: z.nullable(z.string()).optional(),
192
198
  callerId: z.nullable(z.string()),
193
- rate: z.number().int().default(1),
199
+ hourlyRate: z.number().int().default(1),
194
200
  retryCount: z.number().int().default(0),
195
201
  retryInterval: z.nullable(z.string()).optional(),
196
- pauseSeconds: z.nullable(z.number().int()).optional(),
202
+ activeDays: z.array(DaysOfWeek$outboundSchema),
197
203
  }).transform((v) => {
198
204
  return remap$(v, {
199
205
  campaignName: "campaign_name",
@@ -201,9 +207,10 @@ export const OutboundCampaignInput$outboundSchema: z.ZodType<
201
207
  dailyStartTime: "daily_start_time",
202
208
  dailyEndTime: "daily_end_time",
203
209
  callerId: "caller_id",
210
+ hourlyRate: "hourly_rate",
204
211
  retryCount: "retry_count",
205
212
  retryInterval: "retry_interval",
206
- pauseSeconds: "pause_seconds",
213
+ activeDays: "active_days",
207
214
  });
208
215
  });
209
216
 
@@ -43,7 +43,7 @@ export type PromptCreateRequest = {
43
43
  */
44
44
  llmConfig: PromptLlmConfig;
45
45
  /**
46
- * Whether to include the default tools (`summary`, `hangup`) in the list of tools for the prompt. If you disable this during creation, you might want to disable it during updates as well, otherwise the default tools will be added when updating the prompt.
46
+ * Whether to include the default tools (`hangup`, `summary`) in the list of tools for the prompt. If you disable this during creation, you might want to disable it during updates as well, otherwise the default tools will be added when updating the prompt.
47
47
  */
48
48
  includeDefaultTools?: boolean | undefined;
49
49
  };
@@ -51,7 +51,7 @@ export type PromptUpdateRequest = {
51
51
  */
52
52
  editComments?: string | null | undefined;
53
53
  /**
54
- * Whether to include the default tools (`summary`, `hangup`) in the list of tools for the prompt. If you remove one of the default tools from your prompt, you might want to disable this option so that the tool is not added again when updated.
54
+ * Whether to include the default tools (`hangup`, `summary`) in the list of tools for the prompt. If you remove one of the default tools from your prompt, you might want to disable this option so that the tool is not added again when updated.
55
55
  */
56
56
  includeDefaultTools?: boolean | undefined;
57
57
  };
@@ -0,0 +1,43 @@
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
+ * Status of a communication request.
10
+ */
11
+ export const RequestStatus = {
12
+ Pending: "PENDING",
13
+ Duplicate: "DUPLICATE",
14
+ Initiated: "INITIATED",
15
+ Connected: "CONNECTED",
16
+ Failed: "FAILED",
17
+ Canceled: "CANCELED",
18
+ } as const;
19
+ /**
20
+ * Status of a communication request.
21
+ */
22
+ export type RequestStatus = ClosedEnum<typeof RequestStatus>;
23
+
24
+ /** @internal */
25
+ export const RequestStatus$inboundSchema: z.ZodNativeEnum<
26
+ typeof RequestStatus
27
+ > = z.nativeEnum(RequestStatus);
28
+
29
+ /** @internal */
30
+ export const RequestStatus$outboundSchema: z.ZodNativeEnum<
31
+ typeof RequestStatus
32
+ > = RequestStatus$inboundSchema;
33
+
34
+ /**
35
+ * @internal
36
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
37
+ */
38
+ export namespace RequestStatus$ {
39
+ /** @deprecated use `RequestStatus$inboundSchema` instead. */
40
+ export const inboundSchema = RequestStatus$inboundSchema;
41
+ /** @deprecated use `RequestStatus$outboundSchema` instead. */
42
+ export const outboundSchema = RequestStatus$outboundSchema;
43
+ }