@teamlearners/clawops 0.14.0 → 0.15.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.
- package/README.md +6 -0
- package/dist/agent/index.cjs +8 -8
- package/dist/agent/index.js +1 -1
- package/dist/{chunk-RRUQMSFD.cjs → chunk-RMN74YKI.cjs} +3 -3
- package/dist/{chunk-RRUQMSFD.cjs.map → chunk-RMN74YKI.cjs.map} +1 -1
- package/dist/{chunk-6S6PV2RY.js → chunk-Z4W4G7RD.js} +3 -3
- package/dist/{chunk-6S6PV2RY.js.map → chunk-Z4W4G7RD.js.map} +1 -1
- package/dist/index.cjs +134 -35
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +197 -1
- package/dist/index.d.ts +197 -1
- package/dist/index.js +101 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -86,6 +86,148 @@ declare class Page<T> {
|
|
|
86
86
|
autoPagingIter(): AsyncGenerator<T>;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
+
declare const AssignmentLinkAssignmentSchema: z.ZodObject<{
|
|
90
|
+
number: z.ZodString;
|
|
91
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
92
|
+
consumedAt: z.ZodString;
|
|
93
|
+
releasedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
94
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
95
|
+
number: z.ZodString;
|
|
96
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
97
|
+
consumedAt: z.ZodString;
|
|
98
|
+
releasedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
99
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
100
|
+
number: z.ZodString;
|
|
101
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
102
|
+
consumedAt: z.ZodString;
|
|
103
|
+
releasedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
104
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
105
|
+
declare const AssignmentLinkSchema: z.ZodObject<{
|
|
106
|
+
linkId: z.ZodString;
|
|
107
|
+
url: z.ZodString;
|
|
108
|
+
status: z.ZodEnum<["pending", "consumed", "expired", "revoked"]>;
|
|
109
|
+
createdAt: z.ZodString;
|
|
110
|
+
expiresAt: z.ZodString;
|
|
111
|
+
consumedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
112
|
+
webhookUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
113
|
+
webhookMethod: z.ZodOptional<z.ZodNullable<z.ZodEnum<["POST", "GET"]>>>;
|
|
114
|
+
note: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
115
|
+
assignment: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
116
|
+
number: z.ZodString;
|
|
117
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
118
|
+
consumedAt: z.ZodString;
|
|
119
|
+
releasedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
120
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
121
|
+
number: z.ZodString;
|
|
122
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
123
|
+
consumedAt: z.ZodString;
|
|
124
|
+
releasedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
125
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
126
|
+
number: z.ZodString;
|
|
127
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
128
|
+
consumedAt: z.ZodString;
|
|
129
|
+
releasedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
130
|
+
}, z.ZodTypeAny, "passthrough">>>>;
|
|
131
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
132
|
+
linkId: z.ZodString;
|
|
133
|
+
url: z.ZodString;
|
|
134
|
+
status: z.ZodEnum<["pending", "consumed", "expired", "revoked"]>;
|
|
135
|
+
createdAt: z.ZodString;
|
|
136
|
+
expiresAt: z.ZodString;
|
|
137
|
+
consumedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
138
|
+
webhookUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
139
|
+
webhookMethod: z.ZodOptional<z.ZodNullable<z.ZodEnum<["POST", "GET"]>>>;
|
|
140
|
+
note: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
141
|
+
assignment: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
142
|
+
number: z.ZodString;
|
|
143
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
144
|
+
consumedAt: z.ZodString;
|
|
145
|
+
releasedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
146
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
147
|
+
number: z.ZodString;
|
|
148
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
149
|
+
consumedAt: z.ZodString;
|
|
150
|
+
releasedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
151
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
152
|
+
number: z.ZodString;
|
|
153
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
154
|
+
consumedAt: z.ZodString;
|
|
155
|
+
releasedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
156
|
+
}, z.ZodTypeAny, "passthrough">>>>;
|
|
157
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
158
|
+
linkId: z.ZodString;
|
|
159
|
+
url: z.ZodString;
|
|
160
|
+
status: z.ZodEnum<["pending", "consumed", "expired", "revoked"]>;
|
|
161
|
+
createdAt: z.ZodString;
|
|
162
|
+
expiresAt: z.ZodString;
|
|
163
|
+
consumedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
164
|
+
webhookUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
165
|
+
webhookMethod: z.ZodOptional<z.ZodNullable<z.ZodEnum<["POST", "GET"]>>>;
|
|
166
|
+
note: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
167
|
+
assignment: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
168
|
+
number: z.ZodString;
|
|
169
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
170
|
+
consumedAt: z.ZodString;
|
|
171
|
+
releasedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
172
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
173
|
+
number: z.ZodString;
|
|
174
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
175
|
+
consumedAt: z.ZodString;
|
|
176
|
+
releasedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
177
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
178
|
+
number: z.ZodString;
|
|
179
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
180
|
+
consumedAt: z.ZodString;
|
|
181
|
+
releasedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
182
|
+
}, z.ZodTypeAny, "passthrough">>>>;
|
|
183
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
184
|
+
declare const AssignmentLinkCreateResponseSchema: z.ZodObject<{
|
|
185
|
+
token: z.ZodString;
|
|
186
|
+
url: z.ZodString;
|
|
187
|
+
expiresAt: z.ZodString;
|
|
188
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
189
|
+
token: z.ZodString;
|
|
190
|
+
url: z.ZodString;
|
|
191
|
+
expiresAt: z.ZodString;
|
|
192
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
193
|
+
token: z.ZodString;
|
|
194
|
+
url: z.ZodString;
|
|
195
|
+
expiresAt: z.ZodString;
|
|
196
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
197
|
+
type AssignmentLinkAssignment = z.infer<typeof AssignmentLinkAssignmentSchema>;
|
|
198
|
+
type AssignmentLink = z.infer<typeof AssignmentLinkSchema>;
|
|
199
|
+
type AssignmentLinkCreateResponse = z.infer<typeof AssignmentLinkCreateResponseSchema>;
|
|
200
|
+
type AssignmentLinkStatus = AssignmentLink['status'];
|
|
201
|
+
|
|
202
|
+
type RequestOptions = {
|
|
203
|
+
extraHeaders?: Record<string, string>;
|
|
204
|
+
extraQuery?: Record<string, unknown>;
|
|
205
|
+
timeout?: number;
|
|
206
|
+
};
|
|
207
|
+
/**
|
|
208
|
+
* 관리번호(External Assignment) 발급 링크 리소스.
|
|
209
|
+
*
|
|
210
|
+
* POST/DELETE는 `external_assignment` 애드온이 활성화된 계정에서만 가능합니다.
|
|
211
|
+
* GET 조회는 애드온 활성 여부와 무관하게 가능합니다.
|
|
212
|
+
*/
|
|
213
|
+
declare class AssignmentLinks extends APIResource {
|
|
214
|
+
create(params?: {
|
|
215
|
+
webhookUrl?: string;
|
|
216
|
+
webhookMethod?: 'POST' | 'GET';
|
|
217
|
+
note?: string;
|
|
218
|
+
}, options?: RequestOptions): Promise<AssignmentLinkCreateResponse>;
|
|
219
|
+
list(params?: {
|
|
220
|
+
status?: AssignmentLinkStatus;
|
|
221
|
+
page?: number;
|
|
222
|
+
pageSize?: number;
|
|
223
|
+
}, options?: RequestOptions): Promise<Page<AssignmentLink>>;
|
|
224
|
+
retrieve(linkId: string, options?: RequestOptions): Promise<AssignmentLink>;
|
|
225
|
+
revoke(linkId: string, options?: {
|
|
226
|
+
extraHeaders?: Record<string, string>;
|
|
227
|
+
timeout?: number;
|
|
228
|
+
}): Promise<void>;
|
|
229
|
+
}
|
|
230
|
+
|
|
89
231
|
declare const CallSchema: z.ZodObject<{
|
|
90
232
|
callId: z.ZodString;
|
|
91
233
|
status: z.ZodEnum<["queued", "ringing", "in-progress", "completed", "failed"]>;
|
|
@@ -307,6 +449,46 @@ declare const TranscriptRequestAcceptedSchema: z.ZodObject<{
|
|
|
307
449
|
}, z.ZodTypeAny, "passthrough">>;
|
|
308
450
|
type TranscriptRequestAccepted = z.infer<typeof TranscriptRequestAcceptedSchema>;
|
|
309
451
|
|
|
452
|
+
/**
|
|
453
|
+
* 통화 요약 상태. status 에 따라 채워지는 필드가 다름:
|
|
454
|
+
* - "completed": callId, resultJson, provider, model, promptVersion, schemaVersion, updatedAt
|
|
455
|
+
* - "pending": 이외 필드 비어있음
|
|
456
|
+
* - "failed": failedReason
|
|
457
|
+
* - "not_requested": 통화는 있지만 요약 row 가 아직 없음
|
|
458
|
+
*/
|
|
459
|
+
declare const SummaryStatusSchema: z.ZodObject<{
|
|
460
|
+
status: z.ZodEnum<["completed", "pending", "failed", "not_requested"]>;
|
|
461
|
+
callId: z.ZodOptional<z.ZodString>;
|
|
462
|
+
resultJson: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
463
|
+
provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
464
|
+
model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
465
|
+
promptVersion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
466
|
+
schemaVersion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
467
|
+
failedReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
468
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
469
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
470
|
+
status: z.ZodEnum<["completed", "pending", "failed", "not_requested"]>;
|
|
471
|
+
callId: z.ZodOptional<z.ZodString>;
|
|
472
|
+
resultJson: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
473
|
+
provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
474
|
+
model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
475
|
+
promptVersion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
476
|
+
schemaVersion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
477
|
+
failedReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
478
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
479
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
480
|
+
status: z.ZodEnum<["completed", "pending", "failed", "not_requested"]>;
|
|
481
|
+
callId: z.ZodOptional<z.ZodString>;
|
|
482
|
+
resultJson: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
483
|
+
provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
484
|
+
model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
485
|
+
promptVersion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
486
|
+
schemaVersion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
487
|
+
failedReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
488
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
489
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
490
|
+
type SummaryStatus = z.infer<typeof SummaryStatusSchema>;
|
|
491
|
+
|
|
310
492
|
declare class Calls extends APIResource {
|
|
311
493
|
create(params: CallCreateParams, options?: {
|
|
312
494
|
extraHeaders?: Record<string, string>;
|
|
@@ -358,6 +540,18 @@ declare class Calls extends APIResource {
|
|
|
358
540
|
extraQuery?: Record<string, unknown>;
|
|
359
541
|
timeout?: number;
|
|
360
542
|
}): Promise<TranscriptRequestAccepted>;
|
|
543
|
+
/**
|
|
544
|
+
* 통화 요약 상태 조회. transcript 가 완료된 통화에 대해 자동 생성된
|
|
545
|
+
* LLM 구조화 요약 결과를 반환합니다. completed 일 때 resultJson 채워짐.
|
|
546
|
+
*
|
|
547
|
+
* @throws NotFoundError (404) — 통화 없음
|
|
548
|
+
* @throws PermissionDeniedError (403) — accountId 불일치
|
|
549
|
+
*/
|
|
550
|
+
getSummary(callId: string, options?: {
|
|
551
|
+
extraHeaders?: Record<string, string>;
|
|
552
|
+
extraQuery?: Record<string, unknown>;
|
|
553
|
+
timeout?: number;
|
|
554
|
+
}): Promise<SummaryStatus>;
|
|
361
555
|
}
|
|
362
556
|
|
|
363
557
|
declare const MessageSchema: z.ZodObject<{
|
|
@@ -552,6 +746,7 @@ declare class AccountContext {
|
|
|
552
746
|
get messages(): Messages;
|
|
553
747
|
get numbers(): Numbers;
|
|
554
748
|
get webhookLogs(): WebhookLogs;
|
|
749
|
+
get assignmentLinks(): AssignmentLinks;
|
|
555
750
|
}
|
|
556
751
|
|
|
557
752
|
declare class ClawOpsError extends Error {
|
|
@@ -732,6 +927,7 @@ declare class ClawOps extends APIClient {
|
|
|
732
927
|
get messages(): Messages;
|
|
733
928
|
get numbers(): Numbers;
|
|
734
929
|
get webhookLogs(): WebhookLogs;
|
|
930
|
+
get assignmentLinks(): AssignmentLinks;
|
|
735
931
|
get webhooks(): Webhooks;
|
|
736
932
|
accounts(accountId: string): AccountContext;
|
|
737
933
|
}
|
|
@@ -761,4 +957,4 @@ interface NumberUpdateParams {
|
|
|
761
957
|
webhookMethod?: 'POST' | 'GET';
|
|
762
958
|
}
|
|
763
959
|
|
|
764
|
-
export { APIClient, type APIClientOptions, APIConnectionError, APIError, APIResponseValidationError, APIStatusError, APITimeoutError, AccountContext, AgentConnectionError, AgentError, AuthenticationError, BadRequestError, type Call, type CallControlResponse, type CallCreateParams, type CallListParams, type CallUpdateParams, Calls, ClawOps, ClawOpsError, type ClawOpsOptions, ConflictError, InternalServerError, type Message, type MessageCreateParams, type MessageListParams, Messages, NotFoundError, type NumberCreateParams, type NumberListItem, type NumberUpdateParams, type NumberUpdateResponse, Numbers, Page, type PaginationMeta, PermissionDeniedError, type PhoneNumber, RateLimitError, ServiceUnavailableError, UnprocessableEntityError, VERSION, type WebhookLog, WebhookLogs, WebhookVerificationError, Webhooks, ClawOps as default };
|
|
960
|
+
export { APIClient, type APIClientOptions, APIConnectionError, APIError, APIResponseValidationError, APIStatusError, APITimeoutError, AccountContext, AgentConnectionError, AgentError, type AssignmentLink, type AssignmentLinkAssignment, type AssignmentLinkCreateResponse, type AssignmentLinkStatus, AssignmentLinks, AuthenticationError, BadRequestError, type Call, type CallControlResponse, type CallCreateParams, type CallListParams, type CallUpdateParams, Calls, ClawOps, ClawOpsError, type ClawOpsOptions, ConflictError, InternalServerError, type Message, type MessageCreateParams, type MessageListParams, Messages, NotFoundError, type NumberCreateParams, type NumberListItem, type NumberUpdateParams, type NumberUpdateResponse, Numbers, Page, type PaginationMeta, PermissionDeniedError, type PhoneNumber, RateLimitError, ServiceUnavailableError, UnprocessableEntityError, VERSION, type WebhookLog, WebhookLogs, WebhookVerificationError, Webhooks, ClawOps as default };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DEFAULT_BASE_URL, DEFAULT_MAX_RETRIES, DEFAULT_TIMEOUT, VERSION, APITimeoutError, APIConnectionError, APIResponseValidationError, makeStatusError, ClawOpsError, INITIAL_RETRY_DELAY, MAX_RETRY_DELAY } from './chunk-
|
|
2
|
-
export { APIConnectionError, APIError, APIResponseValidationError, APIStatusError, APITimeoutError, AgentConnectionError, AgentError, AuthenticationError, BadRequestError, ClawOpsError, ConflictError, InternalServerError, NotFoundError, PermissionDeniedError, RateLimitError, ServiceUnavailableError, UnprocessableEntityError, VERSION } from './chunk-
|
|
1
|
+
import { DEFAULT_BASE_URL, DEFAULT_MAX_RETRIES, DEFAULT_TIMEOUT, VERSION, APITimeoutError, APIConnectionError, APIResponseValidationError, makeStatusError, ClawOpsError, INITIAL_RETRY_DELAY, MAX_RETRY_DELAY } from './chunk-Z4W4G7RD.js';
|
|
2
|
+
export { APIConnectionError, APIError, APIResponseValidationError, APIStatusError, APITimeoutError, AgentConnectionError, AgentError, AuthenticationError, BadRequestError, ClawOpsError, ConflictError, InternalServerError, NotFoundError, PermissionDeniedError, RateLimitError, ServiceUnavailableError, UnprocessableEntityError, VERSION } from './chunk-Z4W4G7RD.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { timingSafeEqual, createHmac } from 'crypto';
|
|
5
5
|
|
|
@@ -233,6 +233,74 @@ var Page = class _Page {
|
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
235
|
};
|
|
236
|
+
var AssignmentLinkAssignmentSchema = z.object({
|
|
237
|
+
number: z.string(),
|
|
238
|
+
name: z.string().nullable().optional(),
|
|
239
|
+
consumedAt: z.string(),
|
|
240
|
+
releasedAt: z.string().nullable().optional()
|
|
241
|
+
}).passthrough();
|
|
242
|
+
var AssignmentLinkSchema = z.object({
|
|
243
|
+
linkId: z.string(),
|
|
244
|
+
url: z.string(),
|
|
245
|
+
status: z.enum(["pending", "consumed", "expired", "revoked"]),
|
|
246
|
+
createdAt: z.string(),
|
|
247
|
+
expiresAt: z.string(),
|
|
248
|
+
consumedAt: z.string().nullable().optional(),
|
|
249
|
+
webhookUrl: z.string().nullable().optional(),
|
|
250
|
+
webhookMethod: z.enum(["POST", "GET"]).nullable().optional(),
|
|
251
|
+
note: z.string().nullable().optional(),
|
|
252
|
+
assignment: AssignmentLinkAssignmentSchema.nullable().optional()
|
|
253
|
+
}).passthrough();
|
|
254
|
+
var AssignmentLinkCreateResponseSchema = z.object({
|
|
255
|
+
token: z.string(),
|
|
256
|
+
url: z.string(),
|
|
257
|
+
expiresAt: z.string()
|
|
258
|
+
}).passthrough();
|
|
259
|
+
|
|
260
|
+
// src/resources/assignment-links.ts
|
|
261
|
+
var AssignmentLinks = class extends APIResource {
|
|
262
|
+
async create(params = {}, options = {}) {
|
|
263
|
+
const body = stripNotGiven({
|
|
264
|
+
webhookUrl: params.webhookUrl,
|
|
265
|
+
webhookMethod: params.webhookMethod,
|
|
266
|
+
note: params.note
|
|
267
|
+
});
|
|
268
|
+
return this._client._post(`${this._basePath}/assignment-links`, {
|
|
269
|
+
body: Object.keys(body).length ? body : void 0,
|
|
270
|
+
castTo: AssignmentLinkCreateResponseSchema,
|
|
271
|
+
...options
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
async list(params = {}, options = {}) {
|
|
275
|
+
const query = stripNotGiven({
|
|
276
|
+
status: params.status,
|
|
277
|
+
page: params.page,
|
|
278
|
+
pageSize: params.pageSize
|
|
279
|
+
});
|
|
280
|
+
const path = `${this._basePath}/assignment-links`;
|
|
281
|
+
const schema = PageSchema(AssignmentLinkSchema);
|
|
282
|
+
const raw = await this._client._get(path, {
|
|
283
|
+
castTo: schema,
|
|
284
|
+
query: Object.keys(query).length ? query : void 0,
|
|
285
|
+
...options
|
|
286
|
+
});
|
|
287
|
+
const page = new Page(raw.data, raw.meta);
|
|
288
|
+
page._setClient(this._client, path, AssignmentLinkSchema, query);
|
|
289
|
+
return page;
|
|
290
|
+
}
|
|
291
|
+
async retrieve(linkId, options = {}) {
|
|
292
|
+
return this._client._get(`${this._basePath}/assignment-links/${linkId}`, {
|
|
293
|
+
castTo: AssignmentLinkSchema,
|
|
294
|
+
...options
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
async revoke(linkId, options = {}) {
|
|
298
|
+
await this._client._delete(
|
|
299
|
+
`${this._basePath}/assignment-links/${linkId}`,
|
|
300
|
+
options
|
|
301
|
+
);
|
|
302
|
+
}
|
|
303
|
+
};
|
|
236
304
|
var CallSchema = z.object({
|
|
237
305
|
callId: z.string(),
|
|
238
306
|
status: z.enum(["queued", "ringing", "in-progress", "completed", "failed"]),
|
|
@@ -267,6 +335,17 @@ var TranscriptRequestAcceptedSchema = z.object({
|
|
|
267
335
|
status: z.literal("pending"),
|
|
268
336
|
callId: z.string()
|
|
269
337
|
}).passthrough();
|
|
338
|
+
var SummaryStatusSchema = z.object({
|
|
339
|
+
status: z.enum(["completed", "pending", "failed", "not_requested"]),
|
|
340
|
+
callId: z.string().optional(),
|
|
341
|
+
resultJson: z.record(z.string(), z.unknown()).nullable().optional(),
|
|
342
|
+
provider: z.string().nullable().optional(),
|
|
343
|
+
model: z.string().nullable().optional(),
|
|
344
|
+
promptVersion: z.string().nullable().optional(),
|
|
345
|
+
schemaVersion: z.string().nullable().optional(),
|
|
346
|
+
failedReason: z.string().nullable().optional(),
|
|
347
|
+
updatedAt: z.string().optional()
|
|
348
|
+
}).passthrough();
|
|
270
349
|
|
|
271
350
|
// src/resources/calls.ts
|
|
272
351
|
var Calls = class extends APIResource {
|
|
@@ -360,6 +439,19 @@ var Calls = class extends APIResource {
|
|
|
360
439
|
...options
|
|
361
440
|
});
|
|
362
441
|
}
|
|
442
|
+
/**
|
|
443
|
+
* 통화 요약 상태 조회. transcript 가 완료된 통화에 대해 자동 생성된
|
|
444
|
+
* LLM 구조화 요약 결과를 반환합니다. completed 일 때 resultJson 채워짐.
|
|
445
|
+
*
|
|
446
|
+
* @throws NotFoundError (404) — 통화 없음
|
|
447
|
+
* @throws PermissionDeniedError (403) — accountId 불일치
|
|
448
|
+
*/
|
|
449
|
+
async getSummary(callId, options = {}) {
|
|
450
|
+
return this._client._get(`${this._basePath}/calls/${callId}/summary`, {
|
|
451
|
+
castTo: SummaryStatusSchema,
|
|
452
|
+
...options
|
|
453
|
+
});
|
|
454
|
+
}
|
|
363
455
|
};
|
|
364
456
|
var MessageSchema = z.object({
|
|
365
457
|
messageId: z.string(),
|
|
@@ -513,6 +605,9 @@ var AccountContext = class {
|
|
|
513
605
|
get webhookLogs() {
|
|
514
606
|
return new WebhookLogs(this._client, this._accountId);
|
|
515
607
|
}
|
|
608
|
+
get assignmentLinks() {
|
|
609
|
+
return new AssignmentLinks(this._client, this._accountId);
|
|
610
|
+
}
|
|
516
611
|
};
|
|
517
612
|
var WebhookVerificationError = class extends ClawOpsError {
|
|
518
613
|
constructor(message = "Webhook \uC11C\uBA85\uC774 \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.") {
|
|
@@ -573,6 +668,9 @@ var ClawOps = class extends APIClient {
|
|
|
573
668
|
get webhookLogs() {
|
|
574
669
|
return new WebhookLogs(this, this._defaultAccountId);
|
|
575
670
|
}
|
|
671
|
+
get assignmentLinks() {
|
|
672
|
+
return new AssignmentLinks(this, this._defaultAccountId);
|
|
673
|
+
}
|
|
576
674
|
get webhooks() {
|
|
577
675
|
return new Webhooks();
|
|
578
676
|
}
|
|
@@ -584,6 +682,6 @@ var ClawOps = class extends APIClient {
|
|
|
584
682
|
// src/client-default.ts
|
|
585
683
|
var client_default_default = ClawOps;
|
|
586
684
|
|
|
587
|
-
export { APIClient, AccountContext, Calls, ClawOps, Messages, Numbers, Page, WebhookLogs, WebhookVerificationError, Webhooks, client_default_default as default };
|
|
685
|
+
export { APIClient, AccountContext, AssignmentLinks, Calls, ClawOps, Messages, Numbers, Page, WebhookLogs, WebhookVerificationError, Webhooks, client_default_default as default };
|
|
588
686
|
//# sourceMappingURL=index.js.map
|
|
589
687
|
//# sourceMappingURL=index.js.map
|