@teamlearners/clawops 0.37.0 → 0.39.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/README.md +36 -0
- package/dist/agent/index.cjs +77 -77
- package/dist/agent/index.js +4 -4
- package/dist/agent/livekit/index.cjs +9 -9
- package/dist/agent/livekit/index.js +2 -2
- package/dist/{chunk-VYGIWHRU.js → chunk-54GBFYZT.js} +2 -2
- package/dist/chunk-54GBFYZT.js.map +1 -0
- package/dist/chunk-FI2WH67N.cjs +8 -0
- package/dist/{chunk-EYI3ULDU.cjs.map → chunk-FI2WH67N.cjs.map} +1 -1
- package/dist/chunk-NDFDYCFM.js +6 -0
- package/dist/{chunk-CKPVV6SZ.js.map → chunk-NDFDYCFM.js.map} +1 -1
- package/dist/{chunk-IYSPOOKH.cjs → chunk-OBGKLTIN.cjs} +2 -2
- package/dist/chunk-OBGKLTIN.cjs.map +1 -0
- package/dist/{chunk-7TEOYLZI.cjs → chunk-UOUNMCXE.cjs} +4 -4
- package/dist/{chunk-7TEOYLZI.cjs.map → chunk-UOUNMCXE.cjs.map} +1 -1
- package/dist/{chunk-2OGQSWTW.js → chunk-W4XFMJFU.js} +3 -3
- package/dist/{chunk-2OGQSWTW.js.map → chunk-W4XFMJFU.js.map} +1 -1
- package/dist/{client-DKsEma11.d.cts → client-B_GblPxW.d.cts} +281 -34
- package/dist/{client-DKsEma11.d.ts → client-B_GblPxW.d.ts} +281 -34
- package/dist/index.cjs +121 -46
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +93 -19
- package/dist/index.js.map +1 -1
- package/dist/solapi/index.cjs +7 -7
- package/dist/solapi/index.d.cts +2 -2
- package/dist/solapi/index.d.ts +2 -2
- package/dist/solapi/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-CKPVV6SZ.js +0 -6
- package/dist/chunk-EYI3ULDU.cjs +0 -8
- package/dist/chunk-IYSPOOKH.cjs.map +0 -1
- package/dist/chunk-VYGIWHRU.js.map +0 -1
package/dist/index.d.cts
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,
|
|
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, u as BrandBubbleType, v as BrandMessageCreateParams, w as BrandSendParams, C as Call, x as CallContextParam, y as CallControlResponse, z as CallCreateParams, D as CallListParams, E as CallUpdateParams, F as Calls, G as ClawOps, H as ClawOpsError, I as ClawOpsErrorCode, J as ClawOpsOptions, K as ConflictError, L as InternalServerError, M as Kakao, N as KakaoBrandTemplate, O as KakaoBrandTemplateListParams, P as KakaoBrandTemplates, Q as KakaoChannel, R as KakaoChannelCategory, S as KakaoChannelCategoryList, T as KakaoChannelConnectParams, U as KakaoChannelListParams, V as KakaoChannelStatus, W as KakaoChannels, X as KakaoFallbackParams, Y as KakaoMessageCreateParams, Z as KakaoSendParams, _ as KakaoTemplate, $ as KakaoTemplateListParams, a0 as KakaoTemplates, a1 as KakaoTokenRequest, a2 as KakaoTokenRequestParams, a3 as Message, a4 as MessageCreateParams, a5 as MessageListParams, a6 as Messages, a7 as NotFoundError, a8 as NumberCreateParams, a9 as NumberListItem, aa as NumberUpdateParams, ab as NumberUpdateResponse, ac as Numbers, ad as Page, ae as PermissionDeniedError, af as PhoneNumber, ag as RateLimitError, ah as RecordingDownload, ai as Recordings, aj as RoutingType, ak as ServiceUnavailableError, al as SipCredential, am as SipCredentials, an as SipEndpoint, ao as SipEndpoints, ap as SolapiBridgeError, aq as TextMessageCreateParams, ar as UnprocessableEntityError, as as WebhookLog, at as WebhookLogs, au as WebhookVerificationError, av as Webhooks, G as default } from './client-B_GblPxW.cjs';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
declare const VERSION: string;
|
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,
|
|
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, u as BrandBubbleType, v as BrandMessageCreateParams, w as BrandSendParams, C as Call, x as CallContextParam, y as CallControlResponse, z as CallCreateParams, D as CallListParams, E as CallUpdateParams, F as Calls, G as ClawOps, H as ClawOpsError, I as ClawOpsErrorCode, J as ClawOpsOptions, K as ConflictError, L as InternalServerError, M as Kakao, N as KakaoBrandTemplate, O as KakaoBrandTemplateListParams, P as KakaoBrandTemplates, Q as KakaoChannel, R as KakaoChannelCategory, S as KakaoChannelCategoryList, T as KakaoChannelConnectParams, U as KakaoChannelListParams, V as KakaoChannelStatus, W as KakaoChannels, X as KakaoFallbackParams, Y as KakaoMessageCreateParams, Z as KakaoSendParams, _ as KakaoTemplate, $ as KakaoTemplateListParams, a0 as KakaoTemplates, a1 as KakaoTokenRequest, a2 as KakaoTokenRequestParams, a3 as Message, a4 as MessageCreateParams, a5 as MessageListParams, a6 as Messages, a7 as NotFoundError, a8 as NumberCreateParams, a9 as NumberListItem, aa as NumberUpdateParams, ab as NumberUpdateResponse, ac as Numbers, ad as Page, ae as PermissionDeniedError, af as PhoneNumber, ag as RateLimitError, ah as RecordingDownload, ai as Recordings, aj as RoutingType, ak as ServiceUnavailableError, al as SipCredential, am as SipCredentials, an as SipEndpoint, ao as SipEndpoints, ap as SolapiBridgeError, aq as TextMessageCreateParams, ar as UnprocessableEntityError, as as WebhookLog, at as WebhookLogs, au as WebhookVerificationError, av as Webhooks, G as default } from './client-B_GblPxW.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
|
-
import { APITimeoutError, APIConnectionError, makeStatusError, APIResponseValidationError, ClawOpsError } from './chunk-
|
|
3
|
-
export { APIConnectionError, APIError, APIResponseValidationError, APIStatusError, APITimeoutError, AgentConnectionError, AgentError, AuthenticationError, BadRequestError, ClawOpsError, ConflictError, InternalServerError, NotFoundError, PermissionDeniedError, RateLimitError, ServiceUnavailableError, SolapiBridgeError, UnprocessableEntityError } from './chunk-
|
|
4
|
-
import { VERSION } from './chunk-
|
|
5
|
-
export { VERSION } from './chunk-
|
|
2
|
+
import { APITimeoutError, APIConnectionError, makeStatusError, APIResponseValidationError, ClawOpsError } from './chunk-54GBFYZT.js';
|
|
3
|
+
export { APIConnectionError, APIError, APIResponseValidationError, APIStatusError, APITimeoutError, AgentConnectionError, AgentError, AuthenticationError, BadRequestError, ClawOpsError, ConflictError, InternalServerError, NotFoundError, PermissionDeniedError, RateLimitError, ServiceUnavailableError, SolapiBridgeError, UnprocessableEntityError } from './chunk-54GBFYZT.js';
|
|
4
|
+
import { VERSION } from './chunk-NDFDYCFM.js';
|
|
5
|
+
export { VERSION } from './chunk-NDFDYCFM.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
|
-
|
|
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
|
-
|
|
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({
|
|
@@ -677,6 +689,27 @@ var KakaoTemplateSchema = z.object({
|
|
|
677
689
|
createdAt: z.string(),
|
|
678
690
|
updatedAt: z.string()
|
|
679
691
|
}).passthrough();
|
|
692
|
+
var KakaoBrandTemplateSchema = z.object({
|
|
693
|
+
/** ClawOps 템플릿 리소스 ID. 발송의 `brand.templateId` 에 이 값을 쓴다. */
|
|
694
|
+
id: z.string(),
|
|
695
|
+
/** ClawOps 채널 리소스 ID. 발송의 `brand.channelId` 와 같은 값이다. */
|
|
696
|
+
channelId: z.string(),
|
|
697
|
+
name: z.string(),
|
|
698
|
+
chatBubbleType: z.string(),
|
|
699
|
+
/**
|
|
700
|
+
* 말풍선 본문.
|
|
701
|
+
*
|
|
702
|
+
* ⚠️ **유형에 따라 `null` 이다.** 본문이 담기는 자리가 유형마다 달라 `TEXT`·`IMAGE`·
|
|
703
|
+
* `WIDE` 에만 채워진다 — 나머지는 헤더·카드·상품명이 그 자리를 대신한다.
|
|
704
|
+
*/
|
|
705
|
+
content: z.string().nullable(),
|
|
706
|
+
/** 와이드리스트형의 머리말. 다른 유형에서는 `null`. */
|
|
707
|
+
header: z.string().nullable(),
|
|
708
|
+
/** 발송 시 `brand.variables` 에 모두 채워야 하는 변수 이름. */
|
|
709
|
+
variables: z.array(z.string()),
|
|
710
|
+
createdAt: z.string(),
|
|
711
|
+
updatedAt: z.string()
|
|
712
|
+
}).passthrough();
|
|
680
713
|
var KakaoChannelCategorySchema = z.object({
|
|
681
714
|
/** 채널 연결의 `categoryCode` 에 그대로 보내는 값. */
|
|
682
715
|
code: z.string(),
|
|
@@ -822,6 +855,32 @@ var KakaoTemplates = class extends APIResource {
|
|
|
822
855
|
return page;
|
|
823
856
|
}
|
|
824
857
|
};
|
|
858
|
+
var KakaoBrandTemplates = class extends APIResource {
|
|
859
|
+
/**
|
|
860
|
+
* 한 채널의 브랜드 메시지 템플릿 목록.
|
|
861
|
+
*
|
|
862
|
+
* 응답의 `data[].id` 를 발송의 `brand.templateId` 로, `data[].channelId` 를
|
|
863
|
+
* `brand.channelId` 로 쓴다. `variables` 의 모든 항목을 `brand.variables` 에 채워야 한다.
|
|
864
|
+
*
|
|
865
|
+
* ⭐ **알림톡과 달리 검수가 없어** `sendable` 같은 칸이 없다 — 목록에 있으면 곧 보낼 수 있다.
|
|
866
|
+
*/
|
|
867
|
+
async list(params, options = {}) {
|
|
868
|
+
const query = stripNotGiven({
|
|
869
|
+
channelId: params.channelId,
|
|
870
|
+
page: params.page,
|
|
871
|
+
pageSize: params.pageSize
|
|
872
|
+
});
|
|
873
|
+
const path = `${this._basePath}/kakao/brand-templates`;
|
|
874
|
+
const raw = await this._client._get(path, {
|
|
875
|
+
castTo: PageSchema(KakaoBrandTemplateSchema),
|
|
876
|
+
query: Object.keys(query).length ? query : void 0,
|
|
877
|
+
...options
|
|
878
|
+
});
|
|
879
|
+
const page = new Page(raw.data, raw.meta);
|
|
880
|
+
page._setClient(this._client, path, KakaoBrandTemplateSchema, query);
|
|
881
|
+
return page;
|
|
882
|
+
}
|
|
883
|
+
};
|
|
825
884
|
var Kakao = class extends APIResource {
|
|
826
885
|
get channels() {
|
|
827
886
|
return new KakaoChannels(this._client, this._accountId);
|
|
@@ -829,6 +888,10 @@ var Kakao = class extends APIResource {
|
|
|
829
888
|
get templates() {
|
|
830
889
|
return new KakaoTemplates(this._client, this._accountId);
|
|
831
890
|
}
|
|
891
|
+
/** 브랜드 메시지 템플릿. 알림톡 템플릿(`templates`)과 **다른 표**다. */
|
|
892
|
+
get brandTemplates() {
|
|
893
|
+
return new KakaoBrandTemplates(this._client, this._accountId);
|
|
894
|
+
}
|
|
832
895
|
/**
|
|
833
896
|
* 채널 연결 시 지정할 업종 카테고리 목록.
|
|
834
897
|
*
|
|
@@ -847,12 +910,17 @@ var Kakao = class extends APIResource {
|
|
|
847
910
|
};
|
|
848
911
|
var MessageSchema = z.object({
|
|
849
912
|
messageId: z.string(),
|
|
850
|
-
status: z.
|
|
913
|
+
status: z.string(),
|
|
851
914
|
/**
|
|
852
|
-
* `'ata'` 는
|
|
853
|
-
* 버튼·아이템 리스트·강조 문구는 템플릿에
|
|
915
|
+
* `'ata'`(알림톡)·`'bms'`(브랜드 메시지)는 카카오로 나간다. `body` 에는 템플릿에 변수를
|
|
916
|
+
* 치환한 결과가 담기고, 버튼·아이템 리스트·강조 문구는 템플릿에 담긴 대로 발송되어
|
|
917
|
+
* 이 값에는 담기지 않는다.
|
|
918
|
+
*
|
|
919
|
+
* ⛔ **닫힌 enum 으로 두지 않는다.** 어휘는 서버가 소유하므로, 유형이 하나 늘면 닫힌
|
|
920
|
+
* enum 은 **목록을 통째로** 실패시킨다(`list()` 는 페이지를 한 번에 파싱한다). 실제로
|
|
921
|
+
* 두 번 그렇게 터졌다 — `'ata'` 가 나왔을 때, 그리고 `'bms'` 가 나왔을 때.
|
|
854
922
|
*/
|
|
855
|
-
type: z.
|
|
923
|
+
type: z.string(),
|
|
856
924
|
to: z.string(),
|
|
857
925
|
from: z.string(),
|
|
858
926
|
body: z.string().nullable().optional(),
|
|
@@ -866,12 +934,13 @@ var MessageSchema = z.object({
|
|
|
866
934
|
}).passthrough();
|
|
867
935
|
|
|
868
936
|
// src/resources/messages.ts
|
|
937
|
+
var templateBlock = (p) => p && stripNotGiven({ ChannelId: p.channelId, TemplateId: p.templateId, Variables: p.variables });
|
|
869
938
|
var Messages = class extends APIResource {
|
|
870
939
|
/**
|
|
871
|
-
* 문자(SMS/LMS/MMS) 또는 카카오
|
|
940
|
+
* 문자(SMS/LMS/MMS) 또는 카카오 알림톡·브랜드 메시지를 발송합니다.
|
|
872
941
|
*
|
|
873
|
-
*
|
|
874
|
-
* 실을 수 없습니다(본문은
|
|
942
|
+
* 셋은 배타적입니다 — `kakao` 를 실으면 알림톡, `brand` 를 실으면 브랜드 메시지이고,
|
|
943
|
+
* 이때 `body`·`subject`·`mediaUrl` 은 실을 수 없습니다(본문은 템플릿이 정합니다).
|
|
875
944
|
*
|
|
876
945
|
* ```ts
|
|
877
946
|
* // 문자
|
|
@@ -884,6 +953,14 @@ var Messages = class extends APIResource {
|
|
|
884
953
|
* kakao: { channelId, templateId, variables: { 고객명: '홍길동' } },
|
|
885
954
|
* fallback: { body: '주문이 접수되었습니다.' },
|
|
886
955
|
* });
|
|
956
|
+
*
|
|
957
|
+
* // 브랜드 메시지 — 채널을 추가한 친구에게 나가는 광고성 메시지
|
|
958
|
+
* // ⚠️ 야간 제한과 대체발송 없음 — 제약은 `BrandMessageCreateParams` 참고.
|
|
959
|
+
* await client.messages.create({
|
|
960
|
+
* to: '010…',
|
|
961
|
+
* from: '070…',
|
|
962
|
+
* brand: { channelId, templateId, variables: { 고객명: '홍길동' } },
|
|
963
|
+
* });
|
|
887
964
|
* ```
|
|
888
965
|
*/
|
|
889
966
|
async create(params, options = {}) {
|
|
@@ -896,11 +973,8 @@ var Messages = class extends APIResource {
|
|
|
896
973
|
MediaUrl: params.mediaUrl,
|
|
897
974
|
IdempotencyKey: params.idempotencyKey,
|
|
898
975
|
// 중첩 객체는 손으로 조립한다 — stripNotGiven 은 한 겹만 훑는다.
|
|
899
|
-
Kakao: params.kakao
|
|
900
|
-
|
|
901
|
-
TemplateId: params.kakao.templateId,
|
|
902
|
-
Variables: params.kakao.variables
|
|
903
|
-
}),
|
|
976
|
+
Kakao: templateBlock(params.kakao),
|
|
977
|
+
Brand: templateBlock(params.brand),
|
|
904
978
|
Fallback: params.fallback && stripNotGiven({
|
|
905
979
|
Type: params.fallback.type,
|
|
906
980
|
Subject: params.fallback.subject,
|
|
@@ -1308,6 +1382,6 @@ var ClawOps = class extends APIClient {
|
|
|
1308
1382
|
// src/client-default.ts
|
|
1309
1383
|
var client_default_default = ClawOps;
|
|
1310
1384
|
|
|
1311
|
-
export { APIClient, AccountContext, AssignmentLinks, BlockedRecipients, Calls, ClawOps, Kakao, KakaoChannels, KakaoTemplates, Messages, Numbers, Page, Recordings, SipCredentials, SipEndpoints, WebhookLogs, WebhookVerificationError, Webhooks, client_default_default as default };
|
|
1385
|
+
export { APIClient, AccountContext, AssignmentLinks, BlockedRecipients, Calls, ClawOps, Kakao, KakaoBrandTemplates, KakaoChannels, KakaoTemplates, Messages, Numbers, Page, Recordings, SipCredentials, SipEndpoints, WebhookLogs, WebhookVerificationError, Webhooks, client_default_default as default };
|
|
1312
1386
|
//# sourceMappingURL=index.js.map
|
|
1313
1387
|
//# sourceMappingURL=index.js.map
|