@gtmi/ramp-agent-client 0.0.1 → 0.0.2

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.
@@ -2,60 +2,240 @@
2
2
 
3
3
  import { z } from 'zod';
4
4
 
5
+ export const zErrorResponse = z.object({
6
+ error: z.string().optional(),
7
+ details: z.string().optional(),
8
+ });
9
+
10
+ /**
11
+ * Success
12
+ */
13
+ export const zGetCountryConfigsResponse = z.object({
14
+ configs: z.array(z.record(z.unknown())),
15
+ });
16
+
17
+ /**
18
+ * Success
19
+ */
20
+ export const zGetRecentlyActiveNumbersResponse = z.object({
21
+ numbers: z.array(z.record(z.unknown())),
22
+ });
23
+
24
+ /**
25
+ * Success
26
+ */
27
+ export const zGetStatsResponse = z.object({
28
+ activeCalls: z.number(),
29
+ deployedAt: z.string(),
30
+ });
31
+
5
32
  export const zGetPhoneLogsByPhoneNumberPath = z.object({
6
33
  phoneNumber: z.string(),
7
34
  });
8
35
 
36
+ /**
37
+ * Success
38
+ */
39
+ export const zGetPhoneLogsByPhoneNumberResponse = z.object({
40
+ success: z.boolean(),
41
+ phoneNumber: z.string(),
42
+ calls: z.array(z.record(z.unknown())),
43
+ logs: z.array(z.record(z.unknown())),
44
+ });
45
+
9
46
  export const zPostOutboundCallBody = z.object({
10
47
  to: z.string(),
11
48
  from: z.string(),
12
49
  });
13
50
 
51
+ /**
52
+ * Success
53
+ */
54
+ export const zPostOutboundCallResponse = z.object({
55
+ success: z.boolean(),
56
+ callSid: z.string(),
57
+ status: z.string(),
58
+ message: z.string(),
59
+ });
60
+
14
61
  export const zGetOutboundCallByCallSidPath = z.object({
15
62
  callSid: z.string(),
16
63
  });
17
64
 
65
+ /**
66
+ * Success
67
+ */
68
+ export const zGetOutboundCallByCallSidResponse = z.object({
69
+ callSid: z.string(),
70
+ status: z.string(),
71
+ duration: z.number(),
72
+ startTime: z.string(),
73
+ endTime: z.string(),
74
+ from: z.string(),
75
+ to: z.string(),
76
+ });
77
+
18
78
  export const zPostOutboundCommunicationTextBody = z.record(z.unknown());
19
79
 
80
+ /**
81
+ * Success
82
+ */
83
+ export const zPostOutboundCommunicationTextResponse = z.object({
84
+ channel: z.string(),
85
+ from: z.string(),
86
+ outboundMessage: z.string(),
87
+ to: z.string(),
88
+ });
89
+
90
+ /**
91
+ * Success
92
+ */
93
+ export const zPostExportLogsResponse = z.object({
94
+ success: z.boolean(),
95
+ exported: z.number(),
96
+ failed: z.number(),
97
+ skipped: z.number(),
98
+ details: z.array(z.record(z.unknown())),
99
+ });
100
+
101
+ /**
102
+ * Success
103
+ */
104
+ export const zDeleteLiveNumbersResponse = z.object({
105
+ clearedCount: z.number(),
106
+ clearedNumbers: z.array(z.string()),
107
+ message: z.string(),
108
+ terminatedCalls: z.array(z.string()),
109
+ });
110
+
111
+ /**
112
+ * Success
113
+ */
114
+ export const zGetLiveNumbersResponse = z.object({
115
+ liveNumbers: z.array(z.record(z.unknown())),
116
+ count: z.number(),
117
+ });
118
+
20
119
  export const zDeleteLiveNumbersByPhoneNumberPath = z.object({
21
120
  phoneNumber: z.string(),
22
121
  });
23
122
 
123
+ /**
124
+ * Success
125
+ */
126
+ export const zDeleteLiveNumbersByPhoneNumberResponse = z.object({
127
+ message: z.string(),
128
+ phoneNumber: z.string(),
129
+ terminatedCall: z.string(),
130
+ });
131
+
24
132
  export const zDeleteKillConversationByPhoneNumberPath = z.object({
25
133
  phoneNumber: z.string(),
26
134
  });
27
135
 
136
+ /**
137
+ * Success
138
+ */
139
+ export const zDeleteKillConversationByPhoneNumberResponse = z.object({
140
+ message: z.string(),
141
+ conversationsDeleted: z.array(z.string()),
142
+ conversationsFailed: z.array(z.record(z.unknown())),
143
+ callTerminated: z.string(),
144
+ activeConversationCleared: z.boolean(),
145
+ });
146
+
28
147
  export const zPostSendEmailBody = z.object({
29
148
  to: z.string(),
30
149
  subject: z.string(),
31
150
  text: z.string(),
32
151
  });
33
152
 
153
+ /**
154
+ * Success
155
+ */
156
+ export const zPostSendEmailResponse = z.object({
157
+ success: z.boolean(),
158
+ });
159
+
34
160
  export const zPostAddMessageBody = z.object({
35
161
  to: z.string(),
36
162
  content: z.string(),
37
163
  });
38
164
 
165
+ /**
166
+ * Success
167
+ */
168
+ export const zPostAddMessageResponse = z.object({
169
+ message: z.string(),
170
+ success: z.boolean(),
171
+ });
172
+
39
173
  export const zPostActiveConversationsAgentClaimBody = z.record(z.unknown());
40
174
 
175
+ /**
176
+ * Success
177
+ */
178
+ export const zPostActiveConversationsAgentClaimResponse = z.object({
179
+ success: z.boolean(),
180
+ });
181
+
41
182
  export const zGetActiveConversationsAgentByAgentNumberPath = z.object({
42
183
  agentNumber: z.string(),
43
184
  });
44
185
 
186
+ /**
187
+ * Success
188
+ */
189
+ export const zGetActiveConversationsAgentByAgentNumberResponse = z.object({
190
+ activeConversation: z.record(z.unknown()),
191
+ });
192
+
45
193
  export const zGetActiveConversationsByCustomerNumberPath = z.object({
46
194
  customerNumber: z.string(),
47
195
  });
48
196
 
197
+ /**
198
+ * Success
199
+ */
200
+ export const zGetActiveConversationsByCustomerNumberResponse = z.object({
201
+ activeConversation: z.record(z.unknown()),
202
+ });
203
+
204
+ /**
205
+ * Success
206
+ */
207
+ export const zGetHealthResponse = z.object({
208
+ status: z.string(),
209
+ });
210
+
49
211
  export const zPostCallBody = z.record(z.unknown());
50
212
 
213
+ /**
214
+ * TwiML XML response connecting the call to ConversationRelay (or a Say if setup failed)
215
+ */
216
+ export const zPostCallResponse = z.string();
217
+
51
218
  export const zPostLiveAgentBody = z.object({
52
219
  From: z.string(),
53
220
  To: z.string(),
54
221
  Direction: z.string(),
55
222
  });
56
223
 
224
+ /**
225
+ * TwiML XML response (Dial, Enqueue, or external Flex handoff) — TwiML
226
+ */
227
+ export const zPostLiveAgentResponse = z.string();
228
+
57
229
  export const zPostRedirectToLiveAgentBody = z.record(z.unknown());
58
230
 
231
+ /**
232
+ * Success
233
+ */
234
+ export const zPostRedirectToLiveAgentResponse = z.object({
235
+ callSid: z.string(),
236
+ success: z.boolean(),
237
+ });
238
+
59
239
  export const zGetStressTestQuery = z.object({
60
240
  From: z.string().optional(),
61
241
  To: z.string().optional(),
@@ -65,25 +245,68 @@ export const zGetStressTestQuery = z.object({
65
245
  CallStatus: z.string().optional(),
66
246
  });
67
247
 
68
- export const zPostStressTestSmsBody = z.record(z.unknown());
248
+ /**
249
+ * TwiML XML response with a Say/Gather/Redirect (or Hangup if the call closes) — TwiML
250
+ */
251
+ export const zGetStressTestResponse = z.string();
69
252
 
70
- export const zPostStressTestSmsQuery = z.object({
71
- From: z.string().optional(),
72
- To: z.string().optional(),
73
- CallSid: z.string().optional(),
74
- SpeechResult: z.string().optional(),
75
- Confidence: z.string().optional(),
76
- CallStatus: z.string().optional(),
253
+ export const zPostStressTestSmsBody = z.object({
254
+ From: z.string(),
255
+ To: z.string(),
256
+ Body: z.string(),
77
257
  });
78
258
 
259
+ /**
260
+ * TwiML XML response that reads the SMS body aloud, then gathers speech — TwiML
261
+ */
262
+ export const zPostStressTestSmsResponse = z.string();
263
+
79
264
  export const zPostWebchatSendBody = z.record(z.unknown());
80
265
 
266
+ /**
267
+ * Success
268
+ */
269
+ export const zPostWebchatSendResponse = z.object({
270
+ agentNumber: z.string(),
271
+ conversationId: z.string(),
272
+ identity: z.string(),
273
+ response: z.string(),
274
+ status: z.string(),
275
+ });
276
+
81
277
  export const zPostCintelOperatorsBody = z.record(z.unknown());
82
278
 
279
+ /**
280
+ * Success
281
+ */
282
+ export const zPostCintelOperatorsResponse = z.object({
283
+ success: z.boolean(),
284
+ });
285
+
83
286
  export const zPostFlexTranscriptionBody = z.record(z.unknown());
84
287
 
288
+ /**
289
+ * "OK" (Express default sendStatus body, no JSON payload)
290
+ */
291
+ export const zPostFlexTranscriptionResponse = z.string();
292
+
85
293
  export const zPostTaskrouterWebhookBody = z.record(z.unknown());
86
294
 
295
+ /**
296
+ * "OK" (Express default sendStatus body, no JSON payload)
297
+ */
298
+ export const zPostTaskrouterWebhookResponse = z.string();
299
+
87
300
  export const zPostResolvePhoneBody = z.record(z.unknown());
88
301
 
89
302
  export const zPostCommunicationTextBody = z.record(z.unknown());
303
+
304
+ /**
305
+ * TwiML XML response, optionally containing the LLM's reply message
306
+ */
307
+ export const zPostCommunicationTextResponse = z.string();
308
+
309
+ /**
310
+ * The OpenAPI 3.1 spec document
311
+ */
312
+ export const zGetDocsOpenapiJsonResponse = z.record(z.unknown());