@teamlearners/clawops 0.37.0 → 0.38.0

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/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { A as APIClient, a as APIClientOptions, b as APIConnectionError, c as APIError, d as APIResponseValidationError, e as APIStatusError, f as APITimeoutError, g as AccountContext, h as AgentConnectionError, i as AgentError, j as AssignmentLink, k as AssignmentLinkAssignment, l as AssignmentLinkCreateResponse, m as AssignmentLinkStatus, n as AssignmentLinks, o as AuthenticationError, B as BadRequestError, p as BlockedChannel, q as BlockedRecipient, r as BlockedRecipientSource, s as BlockedRecipientStatus, t as BlockedRecipients, C as Call, u as CallContextParam, v as CallControlResponse, w as CallCreateParams, x as CallListParams, y as CallUpdateParams, z as Calls, D as ClawOps, E as ClawOpsError, F as ClawOpsErrorCode, G as ClawOpsOptions, H as ConflictError, I as InternalServerError, K as Kakao, J as KakaoChannel, L as KakaoChannelCategory, M as KakaoChannelCategoryList, N as KakaoChannelConnectParams, O as KakaoChannelListParams, P as KakaoChannelStatus, Q as KakaoChannels, R as KakaoFallbackParams, S as KakaoMessageCreateParams, T as KakaoSendParams, U as KakaoTemplate, V as KakaoTemplateListParams, W as KakaoTemplates, X as KakaoTokenRequest, Y as KakaoTokenRequestParams, Z as Message, _ as MessageCreateParams, $ as MessageListParams, a0 as Messages, a1 as NotFoundError, a2 as NumberCreateParams, a3 as NumberListItem, a4 as NumberUpdateParams, a5 as NumberUpdateResponse, a6 as Numbers, a7 as Page, a8 as PermissionDeniedError, a9 as PhoneNumber, aa as RateLimitError, ab as RecordingDownload, ac as Recordings, ad as RoutingType, ae as ServiceUnavailableError, af as SipCredential, ag as SipCredentials, ah as SipEndpoint, ai as SipEndpoints, aj as SolapiBridgeError, ak as TextMessageCreateParams, al as UnprocessableEntityError, am as WebhookLog, an as WebhookLogs, ao as WebhookVerificationError, ap as Webhooks, D as default } from './client-DKsEma11.js';
1
+ export { A as APIClient, a as APIClientOptions, b as APIConnectionError, c as APIError, d as APIResponseValidationError, e as APIStatusError, f as APITimeoutError, g as AccountContext, h as AgentConnectionError, i as AgentError, j as AssignmentLink, k as AssignmentLinkAssignment, l as AssignmentLinkCreateResponse, m as AssignmentLinkStatus, n as AssignmentLinks, o as AuthenticationError, B as BadRequestError, p as BlockedChannel, q as BlockedRecipient, r as BlockedRecipientSource, s as BlockedRecipientStatus, t as BlockedRecipients, C as Call, u as CallContextParam, v as CallControlResponse, w as CallCreateParams, x as CallListParams, y as CallUpdateParams, z as Calls, D as ClawOps, E as ClawOpsError, F as ClawOpsErrorCode, G as ClawOpsOptions, H as ConflictError, I as InternalServerError, K as Kakao, J as KakaoChannel, L as KakaoChannelCategory, M as KakaoChannelCategoryList, N as KakaoChannelConnectParams, O as KakaoChannelListParams, P as KakaoChannelStatus, Q as KakaoChannels, R as KakaoFallbackParams, S as KakaoMessageCreateParams, T as KakaoSendParams, U as KakaoTemplate, V as KakaoTemplateListParams, W as KakaoTemplates, X as KakaoTokenRequest, Y as KakaoTokenRequestParams, Z as Message, _ as MessageCreateParams, $ as MessageListParams, a0 as Messages, a1 as NotFoundError, a2 as NumberCreateParams, a3 as NumberListItem, a4 as NumberUpdateParams, a5 as NumberUpdateResponse, a6 as Numbers, a7 as Page, a8 as PermissionDeniedError, a9 as PhoneNumber, aa as RateLimitError, ab as RecordingDownload, ac as Recordings, ad as RoutingType, ae as ServiceUnavailableError, af as SipCredential, ag as SipCredentials, ah as SipEndpoint, ai as SipEndpoints, aj as SolapiBridgeError, ak as TextMessageCreateParams, al as UnprocessableEntityError, am as WebhookLog, an as WebhookLogs, ao as WebhookVerificationError, ap as Webhooks, D as default } from './client-ZOgpzAPe.js';
2
2
  import { z } from 'zod';
3
3
 
4
4
  declare const VERSION: string;
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { DEFAULT_BASE_URL, DEFAULT_MAX_RETRIES, DEFAULT_TIMEOUT, INITIAL_RETRY_DELAY, MAX_RETRY_DELAY } from './chunk-35XJNMFU.js';
2
2
  import { APITimeoutError, APIConnectionError, makeStatusError, APIResponseValidationError, ClawOpsError } from './chunk-VYGIWHRU.js';
3
3
  export { APIConnectionError, APIError, APIResponseValidationError, APIStatusError, APITimeoutError, AgentConnectionError, AgentError, AuthenticationError, BadRequestError, ClawOpsError, ConflictError, InternalServerError, NotFoundError, PermissionDeniedError, RateLimitError, ServiceUnavailableError, SolapiBridgeError, UnprocessableEntityError } from './chunk-VYGIWHRU.js';
4
- import { VERSION } from './chunk-CKPVV6SZ.js';
5
- export { VERSION } from './chunk-CKPVV6SZ.js';
4
+ import { VERSION } from './chunk-J7UIB4EA.js';
5
+ export { VERSION } from './chunk-J7UIB4EA.js';
6
6
  import { z } from 'zod';
7
7
  import { timingSafeEqual, createHmac } from 'crypto';
8
8
 
@@ -488,7 +488,11 @@ var CallControlResponseSchema = z.object({
488
488
  status: z.string()
489
489
  }).passthrough();
490
490
  var TranscriptSegmentSchema = z.object({
491
- speaker: z.enum(["CUSTOMER", "AGENT"]),
491
+ /**
492
+ * ⛔ **닫힌 enum 으로 두지 않는다.** 서버는 이미 `speaker_0` 을 보내고 있고, 세그먼트
493
+ * 하나가 어긋나면 `segments` 배열 때문에 **전사 응답 전체**가 실패한다.
494
+ */
495
+ speaker: z.string(),
492
496
  start: z.number(),
493
497
  end: z.number(),
494
498
  text: z.string()
@@ -499,7 +503,15 @@ var TranscriptStatusSchema = z.object({
499
503
  segmentCount: z.number().optional(),
500
504
  segments: z.array(TranscriptSegmentSchema).optional(),
501
505
  startedAt: z.string().optional(),
502
- stage: z.enum(["download", "runtime", "trigger"]).nullable().optional(),
506
+ /**
507
+ * ⛔ **실패 단계는 서버 코드가 만든다** — 전사 파이프라인이 `download`·`runtime`·
508
+ * `transcription`·`recover` 를 내보내고, 영구 실패는 예외 객체의 속성을 그대로 싣는다.
509
+ * 어휘가 열려 있어 스펙의 enum 조차 스냅샷일 뿐이다.
510
+ *
511
+ * ⚠️ 여기가 닫혀 있으면 **전사가 실패했을 때 그 이유를 물으면 던진다** — 고객이 가장
512
+ * 답을 필요로 하는 순간이다.
513
+ */
514
+ stage: z.string().nullable().optional(),
503
515
  error: z.string().nullable().optional()
504
516
  }).passthrough();
505
517
  var TranscriptRequestAcceptedSchema = z.object({
@@ -847,12 +859,17 @@ var Kakao = class extends APIResource {
847
859
  };
848
860
  var MessageSchema = z.object({
849
861
  messageId: z.string(),
850
- status: z.enum(["queued", "sending", "sent", "failed", "received"]),
862
+ status: z.string(),
851
863
  /**
852
- * `'ata'` 는 카카오 알림톡이다. `body` 에는 템플릿에 변수를 치환한 결과가 담기고,
853
- * 버튼·아이템 리스트·강조 문구는 템플릿에 검수된 대로 발송되어 이 값에는 담기지 않는다.
864
+ * `'ata'`(알림톡)·`'bms'`(브랜드 메시지)카카오로 나간다. `body` 에는 템플릿에 변수를
865
+ * 치환한 결과가 담기고, 버튼·아이템 리스트·강조 문구는 템플릿에 담긴 대로 발송되어
866
+ * 이 값에는 담기지 않는다.
867
+ *
868
+ * ⛔ **닫힌 enum 으로 두지 않는다.** 어휘는 서버가 소유하므로, 유형이 하나 늘면 닫힌
869
+ * enum 은 **목록을 통째로** 실패시킨다(`list()` 는 페이지를 한 번에 파싱한다). 실제로
870
+ * 두 번 그렇게 터졌다 — `'ata'` 가 나왔을 때, 그리고 `'bms'` 가 나왔을 때.
854
871
  */
855
- type: z.enum(["sms", "lms", "mms", "rcs", "ata"]),
872
+ type: z.string(),
856
873
  to: z.string(),
857
874
  from: z.string(),
858
875
  body: z.string().nullable().optional(),