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

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 (106) hide show
  1. package/README.md +5 -15
  2. package/docs/sdks/batches/README.md +14 -14
  3. package/docs/sdks/latency/README.md +85 -0
  4. package/funcs/{v1PostListDashboard.d.ts → sessionsLatencyGetById.d.ts} +3 -9
  5. package/funcs/sessionsLatencyGetById.d.ts.map +1 -0
  6. package/funcs/{v1PostGetDashboard.js → sessionsLatencyGetById.js} +15 -19
  7. package/funcs/sessionsLatencyGetById.js.map +1 -0
  8. package/jsr.json +1 -1
  9. package/lib/config.d.ts +2 -2
  10. package/lib/config.js +2 -2
  11. package/models/components/index.d.ts +5 -0
  12. package/models/components/index.d.ts.map +1 -1
  13. package/models/components/index.js +5 -0
  14. package/models/components/index.js.map +1 -1
  15. package/models/components/inspectlatencyresponse.d.ts +42 -0
  16. package/models/components/inspectlatencyresponse.d.ts.map +1 -0
  17. package/models/components/inspectlatencyresponse.js +74 -0
  18. package/models/components/inspectlatencyresponse.js.map +1 -0
  19. package/models/components/latencycategory.d.ts +37 -0
  20. package/models/components/latencycategory.d.ts.map +1 -0
  21. package/models/components/latencycategory.js +53 -0
  22. package/models/components/latencycategory.js.map +1 -0
  23. package/models/components/latencyentry.d.ts +50 -0
  24. package/models/components/latencyentry.d.ts.map +1 -0
  25. package/models/components/latencyentry.js +92 -0
  26. package/models/components/latencyentry.js.map +1 -0
  27. package/models/components/latencyunittype.d.ts +37 -0
  28. package/models/components/latencyunittype.d.ts.map +1 -0
  29. package/models/components/latencyunittype.js +53 -0
  30. package/models/components/latencyunittype.js.map +1 -0
  31. package/models/components/promptcreaterequest.d.ts +1 -1
  32. package/models/components/promptupdaterequest.d.ts +1 -1
  33. package/models/components/summaryentry.d.ts +46 -0
  34. package/models/components/summaryentry.d.ts.map +1 -0
  35. package/models/components/summaryentry.js +87 -0
  36. package/models/components/summaryentry.js.map +1 -0
  37. package/models/operations/index.d.ts +1 -0
  38. package/models/operations/index.d.ts.map +1 -1
  39. package/models/operations/index.js +1 -0
  40. package/models/operations/index.js.map +1 -1
  41. package/models/operations/sessionlatencygetbyid.d.ts +29 -0
  42. package/models/operations/sessionlatencygetbyid.d.ts.map +1 -0
  43. package/models/operations/sessionlatencygetbyid.js +68 -0
  44. package/models/operations/sessionlatencygetbyid.js.map +1 -0
  45. package/openapi.json +18739 -18645
  46. package/package.json +1 -1
  47. package/sdk/latency.d.ts +10 -0
  48. package/sdk/latency.d.ts.map +1 -0
  49. package/sdk/latency.js +19 -0
  50. package/sdk/latency.js.map +1 -0
  51. package/sdk/sdk.d.ts +0 -3
  52. package/sdk/sdk.d.ts.map +1 -1
  53. package/sdk/sdk.js +0 -4
  54. package/sdk/sdk.js.map +1 -1
  55. package/sdk/sessions.d.ts +3 -0
  56. package/sdk/sessions.d.ts.map +1 -1
  57. package/sdk/sessions.js +4 -0
  58. package/sdk/sessions.js.map +1 -1
  59. package/src/funcs/{v1PostGetDashboard.ts → sessionsLatencyGetById.ts} +18 -21
  60. package/src/lib/config.ts +2 -2
  61. package/src/models/components/index.ts +5 -0
  62. package/src/models/components/inspectlatencyresponse.ts +102 -0
  63. package/src/models/components/latencycategory.ts +36 -0
  64. package/src/models/components/latencyentry.ts +124 -0
  65. package/src/models/components/latencyunittype.ts +36 -0
  66. package/src/models/components/promptcreaterequest.ts +1 -1
  67. package/src/models/components/promptupdaterequest.ts +1 -1
  68. package/src/models/components/summaryentry.ts +110 -0
  69. package/src/models/operations/index.ts +1 -0
  70. package/src/models/operations/sessionlatencygetbyid.ts +77 -0
  71. package/src/sdk/latency.ts +25 -0
  72. package/src/sdk/sdk.ts +0 -6
  73. package/src/sdk/sessions.ts +6 -0
  74. package/docs/sdks/v1/README.md +0 -497
  75. package/funcs/v1PostGetDashboard.d.ts +0 -20
  76. package/funcs/v1PostGetDashboard.d.ts.map +0 -1
  77. package/funcs/v1PostGetDashboard.js.map +0 -1
  78. package/funcs/v1PostListDashboard.d.ts.map +0 -1
  79. package/funcs/v1PostListDashboard.js +0 -117
  80. package/funcs/v1PostListDashboard.js.map +0 -1
  81. package/funcs/v1PostSessionEventsDashboard.d.ts +0 -21
  82. package/funcs/v1PostSessionEventsDashboard.d.ts.map +0 -1
  83. package/funcs/v1PostSessionEventsDashboard.js +0 -94
  84. package/funcs/v1PostSessionEventsDashboard.js.map +0 -1
  85. package/funcs/v1PostSessionSummaryDashboard.d.ts +0 -21
  86. package/funcs/v1PostSessionSummaryDashboard.d.ts.map +0 -1
  87. package/funcs/v1PostSessionSummaryDashboard.js +0 -94
  88. package/funcs/v1PostSessionSummaryDashboard.js.map +0 -1
  89. package/funcs/v1PostSessionTransfersDashboard.d.ts +0 -21
  90. package/funcs/v1PostSessionTransfersDashboard.d.ts.map +0 -1
  91. package/funcs/v1PostSessionTransfersDashboard.js +0 -94
  92. package/funcs/v1PostSessionTransfersDashboard.js.map +0 -1
  93. package/funcs/v1PostSessionsDashboard.d.ts +0 -21
  94. package/funcs/v1PostSessionsDashboard.d.ts.map +0 -1
  95. package/funcs/v1PostSessionsDashboard.js +0 -94
  96. package/funcs/v1PostSessionsDashboard.js.map +0 -1
  97. package/sdk/v1.d.ts +0 -78
  98. package/sdk/v1.d.ts.map +0 -1
  99. package/sdk/v1.js +0 -102
  100. package/sdk/v1.js.map +0 -1
  101. package/src/funcs/v1PostListDashboard.ts +0 -151
  102. package/src/funcs/v1PostSessionEventsDashboard.ts +0 -117
  103. package/src/funcs/v1PostSessionSummaryDashboard.ts +0 -117
  104. package/src/funcs/v1PostSessionTransfersDashboard.ts +0 -117
  105. package/src/funcs/v1PostSessionsDashboard.ts +0 -117
  106. package/src/sdk/v1.ts +0 -140
@@ -0,0 +1,110 @@
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
+
16
+ /**
17
+ * A summary entry is an aggregation of latency entries by category and sub-category.
18
+ *
19
+ * @remarks
20
+ * It contains the total and average latency for each category.
21
+ */
22
+ export type SummaryEntry = {
23
+ category: LatencyCategory;
24
+ subCategory?: string | null | undefined;
25
+ sumMs: number;
26
+ sumStr: string;
27
+ averageMs: number;
28
+ averageStr: string;
29
+ };
30
+
31
+ /** @internal */
32
+ export const SummaryEntry$inboundSchema: z.ZodType<
33
+ SummaryEntry,
34
+ z.ZodTypeDef,
35
+ unknown
36
+ > = z.object({
37
+ category: LatencyCategory$inboundSchema,
38
+ sub_category: z.nullable(z.string()).optional(),
39
+ sum_ms: z.number(),
40
+ sum_str: z.string(),
41
+ average_ms: z.number(),
42
+ average_str: z.string(),
43
+ }).transform((v) => {
44
+ return remap$(v, {
45
+ "sub_category": "subCategory",
46
+ "sum_ms": "sumMs",
47
+ "sum_str": "sumStr",
48
+ "average_ms": "averageMs",
49
+ "average_str": "averageStr",
50
+ });
51
+ });
52
+
53
+ /** @internal */
54
+ export type SummaryEntry$Outbound = {
55
+ category: string;
56
+ sub_category?: string | null | undefined;
57
+ sum_ms: number;
58
+ sum_str: string;
59
+ average_ms: number;
60
+ average_str: string;
61
+ };
62
+
63
+ /** @internal */
64
+ export const SummaryEntry$outboundSchema: z.ZodType<
65
+ SummaryEntry$Outbound,
66
+ z.ZodTypeDef,
67
+ SummaryEntry
68
+ > = z.object({
69
+ category: LatencyCategory$outboundSchema,
70
+ subCategory: z.nullable(z.string()).optional(),
71
+ sumMs: z.number(),
72
+ sumStr: z.string(),
73
+ averageMs: z.number(),
74
+ averageStr: z.string(),
75
+ }).transform((v) => {
76
+ return remap$(v, {
77
+ subCategory: "sub_category",
78
+ sumMs: "sum_ms",
79
+ sumStr: "sum_str",
80
+ averageMs: "average_ms",
81
+ averageStr: "average_str",
82
+ });
83
+ });
84
+
85
+ /**
86
+ * @internal
87
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
88
+ */
89
+ export namespace SummaryEntry$ {
90
+ /** @deprecated use `SummaryEntry$inboundSchema` instead. */
91
+ export const inboundSchema = SummaryEntry$inboundSchema;
92
+ /** @deprecated use `SummaryEntry$outboundSchema` instead. */
93
+ export const outboundSchema = SummaryEntry$outboundSchema;
94
+ /** @deprecated use `SummaryEntry$Outbound` instead. */
95
+ export type Outbound = SummaryEntry$Outbound;
96
+ }
97
+
98
+ export function summaryEntryToJSON(summaryEntry: SummaryEntry): string {
99
+ return JSON.stringify(SummaryEntry$outboundSchema.parse(summaryEntry));
100
+ }
101
+
102
+ export function summaryEntryFromJSON(
103
+ jsonString: string,
104
+ ): SafeParseResult<SummaryEntry, SDKValidationError> {
105
+ return safeParse(
106
+ jsonString,
107
+ (x) => SummaryEntry$inboundSchema.parse(JSON.parse(x)),
108
+ `Failed to parse 'SummaryEntry' from JSON`,
109
+ );
110
+ }
@@ -62,6 +62,7 @@ export * from "./sessionfullsummarygetbyid.js";
62
62
  export * from "./sessiongetbyid.js";
63
63
  export * from "./sessionlabelgetbyid.js";
64
64
  export * from "./sessionlabelslist.js";
65
+ export * from "./sessionlatencygetbyid.js";
65
66
  export * from "./sessionrecordingstream.js";
66
67
  export * from "./sessionslist.js";
67
68
  export * from "./sessiontranscriptgetbyid.js";
@@ -0,0 +1,77 @@
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 SessionLatencyGetByIdRequest = {
12
+ sessionId: string;
13
+ };
14
+
15
+ /** @internal */
16
+ export const SessionLatencyGetByIdRequest$inboundSchema: z.ZodType<
17
+ SessionLatencyGetByIdRequest,
18
+ z.ZodTypeDef,
19
+ unknown
20
+ > = z.object({
21
+ session_id: z.string(),
22
+ }).transform((v) => {
23
+ return remap$(v, {
24
+ "session_id": "sessionId",
25
+ });
26
+ });
27
+
28
+ /** @internal */
29
+ export type SessionLatencyGetByIdRequest$Outbound = {
30
+ session_id: string;
31
+ };
32
+
33
+ /** @internal */
34
+ export const SessionLatencyGetByIdRequest$outboundSchema: z.ZodType<
35
+ SessionLatencyGetByIdRequest$Outbound,
36
+ z.ZodTypeDef,
37
+ SessionLatencyGetByIdRequest
38
+ > = z.object({
39
+ sessionId: z.string(),
40
+ }).transform((v) => {
41
+ return remap$(v, {
42
+ sessionId: "session_id",
43
+ });
44
+ });
45
+
46
+ /**
47
+ * @internal
48
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
49
+ */
50
+ export namespace SessionLatencyGetByIdRequest$ {
51
+ /** @deprecated use `SessionLatencyGetByIdRequest$inboundSchema` instead. */
52
+ export const inboundSchema = SessionLatencyGetByIdRequest$inboundSchema;
53
+ /** @deprecated use `SessionLatencyGetByIdRequest$outboundSchema` instead. */
54
+ export const outboundSchema = SessionLatencyGetByIdRequest$outboundSchema;
55
+ /** @deprecated use `SessionLatencyGetByIdRequest$Outbound` instead. */
56
+ export type Outbound = SessionLatencyGetByIdRequest$Outbound;
57
+ }
58
+
59
+ export function sessionLatencyGetByIdRequestToJSON(
60
+ sessionLatencyGetByIdRequest: SessionLatencyGetByIdRequest,
61
+ ): string {
62
+ return JSON.stringify(
63
+ SessionLatencyGetByIdRequest$outboundSchema.parse(
64
+ sessionLatencyGetByIdRequest,
65
+ ),
66
+ );
67
+ }
68
+
69
+ export function sessionLatencyGetByIdRequestFromJSON(
70
+ jsonString: string,
71
+ ): SafeParseResult<SessionLatencyGetByIdRequest, SDKValidationError> {
72
+ return safeParse(
73
+ jsonString,
74
+ (x) => SessionLatencyGetByIdRequest$inboundSchema.parse(JSON.parse(x)),
75
+ `Failed to parse 'SessionLatencyGetByIdRequest' from JSON`,
76
+ );
77
+ }
@@ -0,0 +1,25 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { sessionsLatencyGetById } from "../funcs/sessionsLatencyGetById.js";
6
+ import { ClientSDK, RequestOptions } from "../lib/sdks.js";
7
+ import * as components from "../models/components/index.js";
8
+ import * as operations from "../models/operations/index.js";
9
+ import { unwrapAsync } from "../types/fp.js";
10
+
11
+ export class Latency extends ClientSDK {
12
+ /**
13
+ * Inspect Latency For Session
14
+ */
15
+ async getById(
16
+ request: operations.SessionLatencyGetByIdRequest,
17
+ options?: RequestOptions,
18
+ ): Promise<components.InspectLatencyResponse> {
19
+ return unwrapAsync(sessionsLatencyGetById(
20
+ this,
21
+ request,
22
+ options,
23
+ ));
24
+ }
25
+ }
package/src/sdk/sdk.ts CHANGED
@@ -21,7 +21,6 @@ import { SessionLabels } from "./sessionlabels.js";
21
21
  import { Sessions } from "./sessions.js";
22
22
  import { Takeouts } from "./takeouts.js";
23
23
  import { Tools } from "./tools.js";
24
- import { V1 } from "./v1.js";
25
24
 
26
25
  export class SyllableSDK extends ClientSDK {
27
26
  private _agents?: Agents;
@@ -99,11 +98,6 @@ export class SyllableSDK extends ClientSDK {
99
98
  return (this._dashboards ??= new Dashboards(this._options));
100
99
  }
101
100
 
102
- private _v1?: V1;
103
- get v1(): V1 {
104
- return (this._v1 ??= new V1(this._options));
105
- }
106
-
107
101
  private _outbound?: Outbound;
108
102
  get outbound(): Outbound {
109
103
  return (this._outbound ??= new Outbound(this._options));
@@ -11,6 +11,7 @@ import * as components from "../models/components/index.js";
11
11
  import * as operations from "../models/operations/index.js";
12
12
  import { unwrapAsync } from "../types/fp.js";
13
13
  import { FullSummary } from "./fullsummary.js";
14
+ import { Latency } from "./latency.js";
14
15
  import { Transcript } from "./transcript.js";
15
16
 
16
17
  export class Sessions extends ClientSDK {
@@ -24,6 +25,11 @@ export class Sessions extends ClientSDK {
24
25
  return (this._fullSummary ??= new FullSummary(this._options));
25
26
  }
26
27
 
28
+ private _latency?: Latency;
29
+ get latency(): Latency {
30
+ return (this._latency ??= new Latency(this._options));
31
+ }
32
+
27
33
  /**
28
34
  * Sessions List
29
35
  */