@roarkanalytics/sdk 2.22.0 → 2.23.1

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 (137) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/client.d.mts +31 -10
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +31 -10
  5. package/client.d.ts.map +1 -1
  6. package/client.js +34 -6
  7. package/client.js.map +1 -1
  8. package/client.mjs +34 -6
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/agent-endpoint.d.mts +309 -0
  12. package/resources/agent-endpoint.d.mts.map +1 -0
  13. package/resources/agent-endpoint.d.ts +309 -0
  14. package/resources/agent-endpoint.d.ts.map +1 -0
  15. package/resources/agent-endpoint.js +35 -0
  16. package/resources/agent-endpoint.js.map +1 -0
  17. package/resources/agent-endpoint.mjs +31 -0
  18. package/resources/agent-endpoint.mjs.map +1 -0
  19. package/resources/agent.d.mts +193 -0
  20. package/resources/agent.d.mts.map +1 -0
  21. package/resources/agent.d.ts +193 -0
  22. package/resources/agent.d.ts.map +1 -0
  23. package/resources/agent.js +34 -0
  24. package/resources/agent.js.map +1 -0
  25. package/resources/agent.mjs +30 -0
  26. package/resources/agent.mjs.map +1 -0
  27. package/resources/call.d.mts +120 -1
  28. package/resources/call.d.mts.map +1 -1
  29. package/resources/call.d.ts +120 -1
  30. package/resources/call.d.ts.map +1 -1
  31. package/resources/call.js +7 -0
  32. package/resources/call.js.map +1 -1
  33. package/resources/call.mjs +7 -0
  34. package/resources/call.mjs.map +1 -1
  35. package/resources/evaluation.d.mts +2097 -617
  36. package/resources/evaluation.d.mts.map +1 -1
  37. package/resources/evaluation.d.ts +2097 -617
  38. package/resources/evaluation.d.ts.map +1 -1
  39. package/resources/evaluation.js +14 -0
  40. package/resources/evaluation.js.map +1 -1
  41. package/resources/evaluation.mjs +14 -0
  42. package/resources/evaluation.mjs.map +1 -1
  43. package/resources/http-request-definition.d.mts +339 -0
  44. package/resources/http-request-definition.d.mts.map +1 -0
  45. package/resources/http-request-definition.d.ts +339 -0
  46. package/resources/http-request-definition.d.ts.map +1 -0
  47. package/resources/http-request-definition.js +36 -0
  48. package/resources/http-request-definition.js.map +1 -0
  49. package/resources/http-request-definition.mjs +32 -0
  50. package/resources/http-request-definition.mjs.map +1 -0
  51. package/resources/index.d.mts +11 -4
  52. package/resources/index.d.mts.map +1 -1
  53. package/resources/index.d.ts +11 -4
  54. package/resources/index.d.ts.map +1 -1
  55. package/resources/index.js +19 -5
  56. package/resources/index.js.map +1 -1
  57. package/resources/index.mjs +9 -2
  58. package/resources/index.mjs.map +1 -1
  59. package/resources/simulation-job.d.mts +393 -0
  60. package/resources/simulation-job.d.mts.map +1 -0
  61. package/resources/simulation-job.d.ts +393 -0
  62. package/resources/simulation-job.d.ts.map +1 -0
  63. package/resources/simulation-job.js +38 -0
  64. package/resources/simulation-job.js.map +1 -0
  65. package/resources/simulation-job.mjs +34 -0
  66. package/resources/simulation-job.mjs.map +1 -0
  67. package/resources/{persona.d.mts → simulation-persona.d.mts} +62 -33
  68. package/resources/simulation-persona.d.mts.map +1 -0
  69. package/resources/{persona.d.ts → simulation-persona.d.ts} +62 -33
  70. package/resources/simulation-persona.d.ts.map +1 -0
  71. package/resources/{persona.js → simulation-persona.js} +18 -13
  72. package/resources/simulation-persona.js.map +1 -0
  73. package/resources/{persona.mjs → simulation-persona.mjs} +16 -11
  74. package/resources/simulation-persona.mjs.map +1 -0
  75. package/resources/simulation-run-plan-job.d.mts +359 -0
  76. package/resources/simulation-run-plan-job.d.mts.map +1 -0
  77. package/resources/simulation-run-plan-job.d.ts +359 -0
  78. package/resources/simulation-run-plan-job.d.ts.map +1 -0
  79. package/resources/simulation-run-plan-job.js +50 -0
  80. package/resources/simulation-run-plan-job.js.map +1 -0
  81. package/resources/simulation-run-plan-job.mjs +46 -0
  82. package/resources/simulation-run-plan-job.mjs.map +1 -0
  83. package/resources/simulation-run-plan.d.mts +660 -0
  84. package/resources/simulation-run-plan.d.mts.map +1 -0
  85. package/resources/simulation-run-plan.d.ts +660 -0
  86. package/resources/simulation-run-plan.d.ts.map +1 -0
  87. package/resources/simulation-run-plan.js +93 -0
  88. package/resources/simulation-run-plan.js.map +1 -0
  89. package/resources/simulation-run-plan.mjs +89 -0
  90. package/resources/simulation-run-plan.mjs.map +1 -0
  91. package/resources/simulation-scenario.d.mts +335 -0
  92. package/resources/simulation-scenario.d.mts.map +1 -0
  93. package/resources/simulation-scenario.d.ts +335 -0
  94. package/resources/simulation-scenario.d.ts.map +1 -0
  95. package/resources/simulation-scenario.js +40 -0
  96. package/resources/simulation-scenario.js.map +1 -0
  97. package/resources/simulation-scenario.mjs +36 -0
  98. package/resources/simulation-scenario.mjs.map +1 -0
  99. package/resources/webhook.d.mts +212 -0
  100. package/resources/webhook.d.mts.map +1 -0
  101. package/resources/webhook.d.ts +212 -0
  102. package/resources/webhook.d.ts.map +1 -0
  103. package/resources/webhook.js +35 -0
  104. package/resources/webhook.js.map +1 -0
  105. package/resources/webhook.mjs +31 -0
  106. package/resources/webhook.mjs.map +1 -0
  107. package/src/client.ts +208 -43
  108. package/src/resources/agent-endpoint.ts +400 -0
  109. package/src/resources/agent.ts +263 -0
  110. package/src/resources/call.ts +149 -0
  111. package/src/resources/evaluation.ts +3044 -1154
  112. package/src/resources/http-request-definition.ts +410 -0
  113. package/src/resources/index.ts +89 -21
  114. package/src/resources/simulation-job.ts +527 -0
  115. package/src/resources/{persona.ts → simulation-persona.ts} +78 -40
  116. package/src/resources/simulation-run-plan-job.ts +521 -0
  117. package/src/resources/simulation-run-plan.ts +840 -0
  118. package/src/resources/simulation-scenario.ts +463 -0
  119. package/src/resources/webhook.ts +318 -0
  120. package/src/version.ts +1 -1
  121. package/version.d.mts +1 -1
  122. package/version.d.ts +1 -1
  123. package/version.js +1 -1
  124. package/version.mjs +1 -1
  125. package/resources/persona.d.mts.map +0 -1
  126. package/resources/persona.d.ts.map +0 -1
  127. package/resources/persona.js.map +0 -1
  128. package/resources/persona.mjs.map +0 -1
  129. package/resources/simulation.d.mts +0 -802
  130. package/resources/simulation.d.mts.map +0 -1
  131. package/resources/simulation.d.ts +0 -802
  132. package/resources/simulation.d.ts.map +0 -1
  133. package/resources/simulation.js +0 -90
  134. package/resources/simulation.js.map +0 -1
  135. package/resources/simulation.mjs +0 -86
  136. package/resources/simulation.mjs.map +0 -1
  137. package/src/resources/simulation.ts +0 -1069
@@ -0,0 +1,31 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../core/resource.mjs";
3
+ import { path } from "../internal/utils/path.mjs";
4
+ export class AgentEndpoint extends APIResource {
5
+ /**
6
+ * Creates a new agent endpoint for the authenticated project.
7
+ */
8
+ create(body, options) {
9
+ return this._client.post('/v1/agent/endpoint', { body, ...options });
10
+ }
11
+ /**
12
+ * Updates an existing agent endpoint by its ID. Only environment and
13
+ * outboundDialType can be modified.
14
+ */
15
+ update(endpointID, body = {}, options) {
16
+ return this._client.put(path `/v1/agent/endpoint/${endpointID}`, { body, ...options });
17
+ }
18
+ /**
19
+ * Returns a paginated list of agent endpoints for the authenticated project.
20
+ */
21
+ list(query = {}, options) {
22
+ return this._client.get('/v1/agent/endpoint', { query, ...options });
23
+ }
24
+ /**
25
+ * Returns a specific agent endpoint by its ID.
26
+ */
27
+ getByID(endpointID, options) {
28
+ return this._client.get(path `/v1/agent/endpoint/${endpointID}`, options);
29
+ }
30
+ }
31
+ //# sourceMappingURL=agent-endpoint.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-endpoint.mjs","sourceRoot":"","sources":["../src/resources/agent-endpoint.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,aAAc,SAAQ,WAAW;IAC5C;;OAEG;IACH,MAAM,CAAC,IAA+B,EAAE,OAAwB;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;IAED;;;OAGG;IACH,MAAM,CACJ,UAAkB,EAClB,OAAqD,EAAE,EACvD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,sBAAsB,UAAU,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxF,CAAC;IAED;;OAEG;IACH,IAAI,CACF,QAAoD,EAAE,EACtD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;IAED;;OAEG;IACH,OAAO,CAAC,UAAkB,EAAE,OAAwB;QAClD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,sBAAsB,UAAU,EAAE,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC;CACF"}
@@ -0,0 +1,193 @@
1
+ import { APIResource } from "../core/resource.mjs";
2
+ import { APIPromise } from "../core/api-promise.mjs";
3
+ import { RequestOptions } from "../internal/request-options.mjs";
4
+ export declare class Agent extends APIResource {
5
+ /**
6
+ * Creates a new agent for the authenticated project.
7
+ */
8
+ create(body: AgentCreateParams, options?: RequestOptions): APIPromise<AgentCreateResponse>;
9
+ /**
10
+ * Updates an existing agent by its ID.
11
+ */
12
+ update(agentID: string, body?: AgentUpdateParams | null | undefined, options?: RequestOptions): APIPromise<AgentUpdateResponse>;
13
+ /**
14
+ * Returns a paginated list of agents for the authenticated project.
15
+ */
16
+ list(query?: AgentListParams | null | undefined, options?: RequestOptions): APIPromise<AgentListResponse>;
17
+ /**
18
+ * Returns a specific agent by its ID.
19
+ */
20
+ getByID(agentID: string, options?: RequestOptions): APIPromise<AgentGetByIDResponse>;
21
+ }
22
+ export interface AgentCreateResponse {
23
+ data: AgentCreateResponse.Data;
24
+ }
25
+ export declare namespace AgentCreateResponse {
26
+ interface Data {
27
+ /**
28
+ * Unique identifier of the agent
29
+ */
30
+ id: string;
31
+ /**
32
+ * Creation timestamp in ISO 8601 format
33
+ */
34
+ createdAt: string;
35
+ /**
36
+ * Custom identifier for the agent
37
+ */
38
+ customId: string | null;
39
+ /**
40
+ * Description of the agent
41
+ */
42
+ description: string | null;
43
+ /**
44
+ * Name of the agent
45
+ */
46
+ name: string;
47
+ /**
48
+ * Last update timestamp in ISO 8601 format
49
+ */
50
+ updatedAt: string;
51
+ }
52
+ }
53
+ export interface AgentUpdateResponse {
54
+ data: AgentUpdateResponse.Data;
55
+ }
56
+ export declare namespace AgentUpdateResponse {
57
+ interface Data {
58
+ /**
59
+ * Unique identifier of the agent
60
+ */
61
+ id: string;
62
+ /**
63
+ * Creation timestamp in ISO 8601 format
64
+ */
65
+ createdAt: string;
66
+ /**
67
+ * Custom identifier for the agent
68
+ */
69
+ customId: string | null;
70
+ /**
71
+ * Description of the agent
72
+ */
73
+ description: string | null;
74
+ /**
75
+ * Name of the agent
76
+ */
77
+ name: string;
78
+ /**
79
+ * Last update timestamp in ISO 8601 format
80
+ */
81
+ updatedAt: string;
82
+ }
83
+ }
84
+ export interface AgentListResponse {
85
+ data: Array<AgentListResponse.Data>;
86
+ pagination: AgentListResponse.Pagination;
87
+ }
88
+ export declare namespace AgentListResponse {
89
+ interface Data {
90
+ /**
91
+ * Unique identifier of the agent
92
+ */
93
+ id: string;
94
+ /**
95
+ * Creation timestamp in ISO 8601 format
96
+ */
97
+ createdAt: string;
98
+ /**
99
+ * Custom identifier for the agent
100
+ */
101
+ customId: string | null;
102
+ /**
103
+ * Description of the agent
104
+ */
105
+ description: string | null;
106
+ /**
107
+ * Name of the agent
108
+ */
109
+ name: string;
110
+ /**
111
+ * Last update timestamp in ISO 8601 format
112
+ */
113
+ updatedAt: string;
114
+ }
115
+ interface Pagination {
116
+ /**
117
+ * Whether there are more items to fetch
118
+ */
119
+ hasMore: boolean;
120
+ /**
121
+ * Cursor for the next page of items
122
+ */
123
+ nextCursor: string | null;
124
+ /**
125
+ * Total number of items
126
+ */
127
+ total: number;
128
+ }
129
+ }
130
+ export interface AgentGetByIDResponse {
131
+ data: AgentGetByIDResponse.Data;
132
+ }
133
+ export declare namespace AgentGetByIDResponse {
134
+ interface Data {
135
+ /**
136
+ * Unique identifier of the agent
137
+ */
138
+ id: string;
139
+ /**
140
+ * Creation timestamp in ISO 8601 format
141
+ */
142
+ createdAt: string;
143
+ /**
144
+ * Custom identifier for the agent
145
+ */
146
+ customId: string | null;
147
+ /**
148
+ * Description of the agent
149
+ */
150
+ description: string | null;
151
+ /**
152
+ * Name of the agent
153
+ */
154
+ name: string;
155
+ /**
156
+ * Last update timestamp in ISO 8601 format
157
+ */
158
+ updatedAt: string;
159
+ }
160
+ }
161
+ export interface AgentCreateParams {
162
+ /**
163
+ * Name of the agent
164
+ */
165
+ name: string;
166
+ /**
167
+ * Custom identifier for the agent
168
+ */
169
+ customId?: string | null;
170
+ /**
171
+ * Description of the agent
172
+ */
173
+ description?: string | null;
174
+ }
175
+ export interface AgentUpdateParams {
176
+ /**
177
+ * Description of the agent
178
+ */
179
+ description?: string | null;
180
+ /**
181
+ * Name of the agent
182
+ */
183
+ name?: string;
184
+ }
185
+ export interface AgentListParams {
186
+ after?: string;
187
+ limit?: number;
188
+ searchText?: string;
189
+ }
190
+ export declare namespace Agent {
191
+ export { type AgentCreateResponse as AgentCreateResponse, type AgentUpdateResponse as AgentUpdateResponse, type AgentListResponse as AgentListResponse, type AgentGetByIDResponse as AgentGetByIDResponse, type AgentCreateParams as AgentCreateParams, type AgentUpdateParams as AgentUpdateParams, type AgentListParams as AgentListParams, };
192
+ }
193
+ //# sourceMappingURL=agent.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent.d.mts","sourceRoot":"","sources":["../src/resources/agent.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;O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,MAAM,CAAC;KACnB;CACF;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,GACxC,CAAC;CACH"}
@@ -0,0 +1,193 @@
1
+ import { APIResource } from "../core/resource.js";
2
+ import { APIPromise } from "../core/api-promise.js";
3
+ import { RequestOptions } from "../internal/request-options.js";
4
+ export declare class Agent extends APIResource {
5
+ /**
6
+ * Creates a new agent for the authenticated project.
7
+ */
8
+ create(body: AgentCreateParams, options?: RequestOptions): APIPromise<AgentCreateResponse>;
9
+ /**
10
+ * Updates an existing agent by its ID.
11
+ */
12
+ update(agentID: string, body?: AgentUpdateParams | null | undefined, options?: RequestOptions): APIPromise<AgentUpdateResponse>;
13
+ /**
14
+ * Returns a paginated list of agents for the authenticated project.
15
+ */
16
+ list(query?: AgentListParams | null | undefined, options?: RequestOptions): APIPromise<AgentListResponse>;
17
+ /**
18
+ * Returns a specific agent by its ID.
19
+ */
20
+ getByID(agentID: string, options?: RequestOptions): APIPromise<AgentGetByIDResponse>;
21
+ }
22
+ export interface AgentCreateResponse {
23
+ data: AgentCreateResponse.Data;
24
+ }
25
+ export declare namespace AgentCreateResponse {
26
+ interface Data {
27
+ /**
28
+ * Unique identifier of the agent
29
+ */
30
+ id: string;
31
+ /**
32
+ * Creation timestamp in ISO 8601 format
33
+ */
34
+ createdAt: string;
35
+ /**
36
+ * Custom identifier for the agent
37
+ */
38
+ customId: string | null;
39
+ /**
40
+ * Description of the agent
41
+ */
42
+ description: string | null;
43
+ /**
44
+ * Name of the agent
45
+ */
46
+ name: string;
47
+ /**
48
+ * Last update timestamp in ISO 8601 format
49
+ */
50
+ updatedAt: string;
51
+ }
52
+ }
53
+ export interface AgentUpdateResponse {
54
+ data: AgentUpdateResponse.Data;
55
+ }
56
+ export declare namespace AgentUpdateResponse {
57
+ interface Data {
58
+ /**
59
+ * Unique identifier of the agent
60
+ */
61
+ id: string;
62
+ /**
63
+ * Creation timestamp in ISO 8601 format
64
+ */
65
+ createdAt: string;
66
+ /**
67
+ * Custom identifier for the agent
68
+ */
69
+ customId: string | null;
70
+ /**
71
+ * Description of the agent
72
+ */
73
+ description: string | null;
74
+ /**
75
+ * Name of the agent
76
+ */
77
+ name: string;
78
+ /**
79
+ * Last update timestamp in ISO 8601 format
80
+ */
81
+ updatedAt: string;
82
+ }
83
+ }
84
+ export interface AgentListResponse {
85
+ data: Array<AgentListResponse.Data>;
86
+ pagination: AgentListResponse.Pagination;
87
+ }
88
+ export declare namespace AgentListResponse {
89
+ interface Data {
90
+ /**
91
+ * Unique identifier of the agent
92
+ */
93
+ id: string;
94
+ /**
95
+ * Creation timestamp in ISO 8601 format
96
+ */
97
+ createdAt: string;
98
+ /**
99
+ * Custom identifier for the agent
100
+ */
101
+ customId: string | null;
102
+ /**
103
+ * Description of the agent
104
+ */
105
+ description: string | null;
106
+ /**
107
+ * Name of the agent
108
+ */
109
+ name: string;
110
+ /**
111
+ * Last update timestamp in ISO 8601 format
112
+ */
113
+ updatedAt: string;
114
+ }
115
+ interface Pagination {
116
+ /**
117
+ * Whether there are more items to fetch
118
+ */
119
+ hasMore: boolean;
120
+ /**
121
+ * Cursor for the next page of items
122
+ */
123
+ nextCursor: string | null;
124
+ /**
125
+ * Total number of items
126
+ */
127
+ total: number;
128
+ }
129
+ }
130
+ export interface AgentGetByIDResponse {
131
+ data: AgentGetByIDResponse.Data;
132
+ }
133
+ export declare namespace AgentGetByIDResponse {
134
+ interface Data {
135
+ /**
136
+ * Unique identifier of the agent
137
+ */
138
+ id: string;
139
+ /**
140
+ * Creation timestamp in ISO 8601 format
141
+ */
142
+ createdAt: string;
143
+ /**
144
+ * Custom identifier for the agent
145
+ */
146
+ customId: string | null;
147
+ /**
148
+ * Description of the agent
149
+ */
150
+ description: string | null;
151
+ /**
152
+ * Name of the agent
153
+ */
154
+ name: string;
155
+ /**
156
+ * Last update timestamp in ISO 8601 format
157
+ */
158
+ updatedAt: string;
159
+ }
160
+ }
161
+ export interface AgentCreateParams {
162
+ /**
163
+ * Name of the agent
164
+ */
165
+ name: string;
166
+ /**
167
+ * Custom identifier for the agent
168
+ */
169
+ customId?: string | null;
170
+ /**
171
+ * Description of the agent
172
+ */
173
+ description?: string | null;
174
+ }
175
+ export interface AgentUpdateParams {
176
+ /**
177
+ * Description of the agent
178
+ */
179
+ description?: string | null;
180
+ /**
181
+ * Name of the agent
182
+ */
183
+ name?: string;
184
+ }
185
+ export interface AgentListParams {
186
+ after?: string;
187
+ limit?: number;
188
+ searchText?: string;
189
+ }
190
+ export declare namespace Agent {
191
+ export { type AgentCreateResponse as AgentCreateResponse, type AgentUpdateResponse as AgentUpdateResponse, type AgentListResponse as AgentListResponse, type AgentGetByIDResponse as AgentGetByIDResponse, type AgentCreateParams as AgentCreateParams, type AgentUpdateParams as AgentUpdateParams, type AgentListParams as AgentListParams, };
192
+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,GAAG,IAAI,CAAC;QAExB;;WAEG;QACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;QAE3B;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb;;WAEG;QACH,SAAS,EAAE,MAAM,CAAC;KACnB;CACF;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,GACxC,CAAC;CACH"}
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Agent = void 0;
5
+ const resource_1 = require("../core/resource.js");
6
+ const path_1 = require("../internal/utils/path.js");
7
+ class Agent extends resource_1.APIResource {
8
+ /**
9
+ * Creates a new agent for the authenticated project.
10
+ */
11
+ create(body, options) {
12
+ return this._client.post('/v1/agent', { body, ...options });
13
+ }
14
+ /**
15
+ * Updates an existing agent by its ID.
16
+ */
17
+ update(agentID, body = {}, options) {
18
+ return this._client.put((0, path_1.path) `/v1/agent/${agentID}`, { body, ...options });
19
+ }
20
+ /**
21
+ * Returns a paginated list of agents for the authenticated project.
22
+ */
23
+ list(query = {}, options) {
24
+ return this._client.get('/v1/agent', { query, ...options });
25
+ }
26
+ /**
27
+ * Returns a specific agent by its ID.
28
+ */
29
+ getByID(agentID, options) {
30
+ return this._client.get((0, path_1.path) `/v1/agent/${agentID}`, options);
31
+ }
32
+ }
33
+ exports.Agent = Agent;
34
+ //# sourceMappingURL=agent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent.js","sourceRoot":"","sources":["../src/resources/agent.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAA8C;AAE9C,MAAa,KAAM,SAAQ,sBAAW;IACpC;;OAEG;IACH,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED;;OAEG;IACH,MAAM,CACJ,OAAe,EACf,OAA6C,EAAE,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,aAAa,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED;;OAEG;IACH,IAAI,CACF,QAA4C,EAAE,EAC9C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED;;OAEG;IACH,OAAO,CAAC,OAAe,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,aAAa,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;CACF;AAnCD,sBAmCC"}
@@ -0,0 +1,30 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../core/resource.mjs";
3
+ import { path } from "../internal/utils/path.mjs";
4
+ export class Agent extends APIResource {
5
+ /**
6
+ * Creates a new agent for the authenticated project.
7
+ */
8
+ create(body, options) {
9
+ return this._client.post('/v1/agent', { body, ...options });
10
+ }
11
+ /**
12
+ * Updates an existing agent by its ID.
13
+ */
14
+ update(agentID, body = {}, options) {
15
+ return this._client.put(path `/v1/agent/${agentID}`, { body, ...options });
16
+ }
17
+ /**
18
+ * Returns a paginated list of agents for the authenticated project.
19
+ */
20
+ list(query = {}, options) {
21
+ return this._client.get('/v1/agent', { query, ...options });
22
+ }
23
+ /**
24
+ * Returns a specific agent by its ID.
25
+ */
26
+ getByID(agentID, options) {
27
+ return this._client.get(path `/v1/agent/${agentID}`, options);
28
+ }
29
+ }
30
+ //# sourceMappingURL=agent.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent.mjs","sourceRoot":"","sources":["../src/resources/agent.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;OAEG;IACH,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED;;OAEG;IACH,MAAM,CACJ,OAAe,EACf,OAA6C,EAAE,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,aAAa,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED;;OAEG;IACH,IAAI,CACF,QAA4C,EAAE,EAC9C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED;;OAEG;IACH,OAAO,CAAC,OAAe,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,aAAa,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;CACF"}
@@ -14,6 +14,11 @@ export declare class Call extends APIResource {
14
14
  * Retrieve an existing call by its unique identifier
15
15
  */
16
16
  getByID(callID: string, options?: RequestOptions): APIPromise<CallGetByIDResponse>;
17
+ /**
18
+ * Fetch the full transcript for a specific call. Optionally specify a
19
+ * transcription source; otherwise the best available source is used automatically.
20
+ */
21
+ getTranscript(callID: string, query?: CallGetTranscriptParams | null | undefined, options?: RequestOptions): APIPromise<CallGetTranscriptResponse>;
17
22
  /**
18
23
  * Fetch all evaluation run results for a specific call.
19
24
  */
@@ -299,6 +304,112 @@ export declare namespace CallGetByIDResponse {
299
304
  }
300
305
  }
301
306
  }
307
+ export interface CallGetTranscriptResponse {
308
+ /**
309
+ * Call transcript response
310
+ */
311
+ data: CallGetTranscriptResponse.Data;
312
+ }
313
+ export declare namespace CallGetTranscriptResponse {
314
+ /**
315
+ * Call transcript response
316
+ */
317
+ interface Data {
318
+ /**
319
+ * Ordered list of transcript entries from the call
320
+ */
321
+ entries: Array<Data.Entry>;
322
+ /**
323
+ * All participants in this transcript, referenced by participantId on each entry
324
+ */
325
+ participants: Array<Data.UnionMember0 | Data.UnionMember1 | Data.UnionMember2 | Data.UnionMember3>;
326
+ /**
327
+ * The transcription source used for this transcript. Null if no transcript is
328
+ * available.
329
+ */
330
+ transcriptionSource: 'ROARK_POST_CALL' | 'SIMULATION_AGENT_REALTIME' | 'CUSTOMER_AGENT_REALTIME' | null;
331
+ }
332
+ namespace Data {
333
+ /**
334
+ * A single transcript entry
335
+ */
336
+ interface Entry {
337
+ /**
338
+ * End time offset in milliseconds from the start of the call
339
+ */
340
+ endOffsetMs: number;
341
+ /**
342
+ * ID of the conversation participant who spoke this entry. References
343
+ * participants[].id.
344
+ */
345
+ participantId: string | null;
346
+ /**
347
+ * Convenience role derived from participant type
348
+ */
349
+ role: 'AGENT' | 'CUSTOMER' | null;
350
+ /**
351
+ * Start time offset in milliseconds from the start of the call
352
+ */
353
+ startOffsetMs: number;
354
+ /**
355
+ * Transcript text for this entry
356
+ */
357
+ text: string;
358
+ }
359
+ /**
360
+ * An agent participant
361
+ */
362
+ interface UnionMember0 {
363
+ /**
364
+ * Conversation participant ID
365
+ */
366
+ id: string;
367
+ /**
368
+ * ID of the agent entity
369
+ */
370
+ agentId: string | null;
371
+ type: 'AGENT';
372
+ }
373
+ /**
374
+ * A customer participant
375
+ */
376
+ interface UnionMember1 {
377
+ /**
378
+ * Conversation participant ID
379
+ */
380
+ id: string;
381
+ /**
382
+ * ID of the conversation customer record
383
+ */
384
+ customerId: string | null;
385
+ type: 'CUSTOMER';
386
+ }
387
+ /**
388
+ * A simulated customer participant
389
+ */
390
+ interface UnionMember2 {
391
+ /**
392
+ * Conversation participant ID
393
+ */
394
+ id: string;
395
+ /**
396
+ * ID of the conversation customer record
397
+ */
398
+ customerId: string | null;
399
+ type: 'SIMULATED_CUSTOMER';
400
+ }
401
+ /**
402
+ * A background speaker participant
403
+ */
404
+ interface UnionMember3 {
405
+ /**
406
+ * Conversation participant ID
407
+ */
408
+ id: string;
409
+ type: 'BACKGROUND_SPEAKER';
410
+ }
411
+ }
412
+ }
302
413
  export interface CallListEvaluationRunsResponse {
303
414
  /**
304
415
  * Evaluation run response payload
@@ -1194,6 +1305,14 @@ export interface CallListParams {
1194
1305
  */
1195
1306
  status?: 'RINGING' | 'IN_PROGRESS' | 'ENDED';
1196
1307
  }
1308
+ export interface CallGetTranscriptParams {
1309
+ /**
1310
+ * Transcription source to fetch. When omitted, uses the preferred source based on
1311
+ * availability: CUSTOMER_AGENT_REALTIME > SIMULATION_AGENT_REALTIME >
1312
+ * ROARK_POST_CALL
1313
+ */
1314
+ source?: 'ROARK_POST_CALL' | 'SIMULATION_AGENT_REALTIME' | 'CUSTOMER_AGENT_REALTIME';
1315
+ }
1197
1316
  export interface CallListMetricsParams {
1198
1317
  /**
1199
1318
  * Whether to return a flat list instead of grouped by metric definition (default:
@@ -1202,6 +1321,6 @@ export interface CallListMetricsParams {
1202
1321
  flatten?: string;
1203
1322
  }
1204
1323
  export declare namespace Call {
1205
- export { type CallCreateResponse as CallCreateResponse, type CallListResponse as CallListResponse, type CallGetByIDResponse as CallGetByIDResponse, type CallListEvaluationRunsResponse as CallListEvaluationRunsResponse, type CallListMetricsResponse as CallListMetricsResponse, type CallListSentimentRunsResponse as CallListSentimentRunsResponse, type CallCreateParams as CallCreateParams, type CallListParams as CallListParams, type CallListMetricsParams as CallListMetricsParams, };
1324
+ export { type CallCreateResponse as CallCreateResponse, type CallListResponse as CallListResponse, type CallGetByIDResponse as CallGetByIDResponse, type CallGetTranscriptResponse as CallGetTranscriptResponse, type CallListEvaluationRunsResponse as CallListEvaluationRunsResponse, type CallListMetricsResponse as CallListMetricsResponse, type CallListSentimentRunsResponse as CallListSentimentRunsResponse, type CallCreateParams as CallCreateParams, type CallListParams as CallListParams, type CallGetTranscriptParams as CallGetTranscriptParams, type CallListMetricsParams as CallListMetricsParams, };
1206
1325
  }
1207
1326
  //# sourceMappingURL=call.d.mts.map