@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
|
@@ -601,6 +601,14 @@ interface CallUpdateParams {
|
|
|
601
601
|
status?: 'completed';
|
|
602
602
|
}
|
|
603
603
|
|
|
604
|
+
/**
|
|
605
|
+
* 화자 식별자. **2026-08 이후 전사는 `speaker_0`·`speaker_1`… 형식**이고, 전환 통화처럼
|
|
606
|
+
* 참여자가 셋 이상이면 그만큼 늘어난다. 그 이전 전사에는 `AGENT`·`CUSTOMER` 가 그대로
|
|
607
|
+
* 남아 있으므로 **두 형식을 모두 받아야 한다.** 화자와 역할의 연결은 보장되지 않는다.
|
|
608
|
+
*/
|
|
609
|
+
type TranscriptSpeaker = 'CUSTOMER' | 'AGENT' | (string & {});
|
|
610
|
+
/** 전사 실패 단계. `trigger` 는 시스템 실패라 재요청할 수 있다. */
|
|
611
|
+
type TranscriptStage = 'download' | 'runtime' | 'transcription' | 'trigger' | 'recover' | (string & {});
|
|
604
612
|
/**
|
|
605
613
|
* 통화 전사 상태. status 에 따라 채워지는 필드가 다름:
|
|
606
614
|
* - "completed": callId, segmentCount, segments
|
|
@@ -613,69 +621,129 @@ declare const TranscriptStatusSchema: z.ZodObject<{
|
|
|
613
621
|
callId: z.ZodOptional<z.ZodString>;
|
|
614
622
|
segmentCount: z.ZodOptional<z.ZodNumber>;
|
|
615
623
|
segments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
616
|
-
|
|
624
|
+
/**
|
|
625
|
+
* ⛔ **닫힌 enum 으로 두지 않는다.** 서버는 이미 `speaker_0` 을 보내고 있고, 세그먼트
|
|
626
|
+
* 하나가 어긋나면 `segments` 배열 때문에 **전사 응답 전체**가 실패한다.
|
|
627
|
+
*/
|
|
628
|
+
speaker: z.ZodType<TranscriptSpeaker>;
|
|
617
629
|
start: z.ZodNumber;
|
|
618
630
|
end: z.ZodNumber;
|
|
619
631
|
text: z.ZodString;
|
|
620
632
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
621
|
-
|
|
633
|
+
/**
|
|
634
|
+
* ⛔ **닫힌 enum 으로 두지 않는다.** 서버는 이미 `speaker_0` 을 보내고 있고, 세그먼트
|
|
635
|
+
* 하나가 어긋나면 `segments` 배열 때문에 **전사 응답 전체**가 실패한다.
|
|
636
|
+
*/
|
|
637
|
+
speaker: z.ZodType<TranscriptSpeaker>;
|
|
622
638
|
start: z.ZodNumber;
|
|
623
639
|
end: z.ZodNumber;
|
|
624
640
|
text: z.ZodString;
|
|
625
641
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
626
|
-
|
|
642
|
+
/**
|
|
643
|
+
* ⛔ **닫힌 enum 으로 두지 않는다.** 서버는 이미 `speaker_0` 을 보내고 있고, 세그먼트
|
|
644
|
+
* 하나가 어긋나면 `segments` 배열 때문에 **전사 응답 전체**가 실패한다.
|
|
645
|
+
*/
|
|
646
|
+
speaker: z.ZodType<TranscriptSpeaker>;
|
|
627
647
|
start: z.ZodNumber;
|
|
628
648
|
end: z.ZodNumber;
|
|
629
649
|
text: z.ZodString;
|
|
630
650
|
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
631
651
|
startedAt: z.ZodOptional<z.ZodString>;
|
|
632
|
-
|
|
652
|
+
/**
|
|
653
|
+
* ⛔ **실패 단계는 서버 코드가 만든다** — 전사 파이프라인이 `download`·`runtime`·
|
|
654
|
+
* `transcription`·`recover` 를 내보내고, 영구 실패는 예외 객체의 속성을 그대로 싣는다.
|
|
655
|
+
* 어휘가 열려 있어 스펙의 enum 조차 스냅샷일 뿐이다.
|
|
656
|
+
*
|
|
657
|
+
* ⚠️ 여기가 닫혀 있으면 **전사가 실패했을 때 그 이유를 물으면 던진다** — 고객이 가장
|
|
658
|
+
* 답을 필요로 하는 순간이다.
|
|
659
|
+
*/
|
|
660
|
+
stage: z.ZodOptional<z.ZodNullable<z.ZodType<TranscriptStage, z.ZodTypeDef, TranscriptStage>>>;
|
|
633
661
|
error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
634
662
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
635
663
|
status: z.ZodEnum<["completed", "pending", "failed", "not_requested"]>;
|
|
636
664
|
callId: z.ZodOptional<z.ZodString>;
|
|
637
665
|
segmentCount: z.ZodOptional<z.ZodNumber>;
|
|
638
666
|
segments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
639
|
-
|
|
667
|
+
/**
|
|
668
|
+
* ⛔ **닫힌 enum 으로 두지 않는다.** 서버는 이미 `speaker_0` 을 보내고 있고, 세그먼트
|
|
669
|
+
* 하나가 어긋나면 `segments` 배열 때문에 **전사 응답 전체**가 실패한다.
|
|
670
|
+
*/
|
|
671
|
+
speaker: z.ZodType<TranscriptSpeaker>;
|
|
640
672
|
start: z.ZodNumber;
|
|
641
673
|
end: z.ZodNumber;
|
|
642
674
|
text: z.ZodString;
|
|
643
675
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
644
|
-
|
|
676
|
+
/**
|
|
677
|
+
* ⛔ **닫힌 enum 으로 두지 않는다.** 서버는 이미 `speaker_0` 을 보내고 있고, 세그먼트
|
|
678
|
+
* 하나가 어긋나면 `segments` 배열 때문에 **전사 응답 전체**가 실패한다.
|
|
679
|
+
*/
|
|
680
|
+
speaker: z.ZodType<TranscriptSpeaker>;
|
|
645
681
|
start: z.ZodNumber;
|
|
646
682
|
end: z.ZodNumber;
|
|
647
683
|
text: z.ZodString;
|
|
648
684
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
649
|
-
|
|
685
|
+
/**
|
|
686
|
+
* ⛔ **닫힌 enum 으로 두지 않는다.** 서버는 이미 `speaker_0` 을 보내고 있고, 세그먼트
|
|
687
|
+
* 하나가 어긋나면 `segments` 배열 때문에 **전사 응답 전체**가 실패한다.
|
|
688
|
+
*/
|
|
689
|
+
speaker: z.ZodType<TranscriptSpeaker>;
|
|
650
690
|
start: z.ZodNumber;
|
|
651
691
|
end: z.ZodNumber;
|
|
652
692
|
text: z.ZodString;
|
|
653
693
|
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
654
694
|
startedAt: z.ZodOptional<z.ZodString>;
|
|
655
|
-
|
|
695
|
+
/**
|
|
696
|
+
* ⛔ **실패 단계는 서버 코드가 만든다** — 전사 파이프라인이 `download`·`runtime`·
|
|
697
|
+
* `transcription`·`recover` 를 내보내고, 영구 실패는 예외 객체의 속성을 그대로 싣는다.
|
|
698
|
+
* 어휘가 열려 있어 스펙의 enum 조차 스냅샷일 뿐이다.
|
|
699
|
+
*
|
|
700
|
+
* ⚠️ 여기가 닫혀 있으면 **전사가 실패했을 때 그 이유를 물으면 던진다** — 고객이 가장
|
|
701
|
+
* 답을 필요로 하는 순간이다.
|
|
702
|
+
*/
|
|
703
|
+
stage: z.ZodOptional<z.ZodNullable<z.ZodType<TranscriptStage, z.ZodTypeDef, TranscriptStage>>>;
|
|
656
704
|
error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
657
705
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
658
706
|
status: z.ZodEnum<["completed", "pending", "failed", "not_requested"]>;
|
|
659
707
|
callId: z.ZodOptional<z.ZodString>;
|
|
660
708
|
segmentCount: z.ZodOptional<z.ZodNumber>;
|
|
661
709
|
segments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
662
|
-
|
|
710
|
+
/**
|
|
711
|
+
* ⛔ **닫힌 enum 으로 두지 않는다.** 서버는 이미 `speaker_0` 을 보내고 있고, 세그먼트
|
|
712
|
+
* 하나가 어긋나면 `segments` 배열 때문에 **전사 응답 전체**가 실패한다.
|
|
713
|
+
*/
|
|
714
|
+
speaker: z.ZodType<TranscriptSpeaker>;
|
|
663
715
|
start: z.ZodNumber;
|
|
664
716
|
end: z.ZodNumber;
|
|
665
717
|
text: z.ZodString;
|
|
666
718
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
667
|
-
|
|
719
|
+
/**
|
|
720
|
+
* ⛔ **닫힌 enum 으로 두지 않는다.** 서버는 이미 `speaker_0` 을 보내고 있고, 세그먼트
|
|
721
|
+
* 하나가 어긋나면 `segments` 배열 때문에 **전사 응답 전체**가 실패한다.
|
|
722
|
+
*/
|
|
723
|
+
speaker: z.ZodType<TranscriptSpeaker>;
|
|
668
724
|
start: z.ZodNumber;
|
|
669
725
|
end: z.ZodNumber;
|
|
670
726
|
text: z.ZodString;
|
|
671
727
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
672
|
-
|
|
728
|
+
/**
|
|
729
|
+
* ⛔ **닫힌 enum 으로 두지 않는다.** 서버는 이미 `speaker_0` 을 보내고 있고, 세그먼트
|
|
730
|
+
* 하나가 어긋나면 `segments` 배열 때문에 **전사 응답 전체**가 실패한다.
|
|
731
|
+
*/
|
|
732
|
+
speaker: z.ZodType<TranscriptSpeaker>;
|
|
673
733
|
start: z.ZodNumber;
|
|
674
734
|
end: z.ZodNumber;
|
|
675
735
|
text: z.ZodString;
|
|
676
736
|
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
677
737
|
startedAt: z.ZodOptional<z.ZodString>;
|
|
678
|
-
|
|
738
|
+
/**
|
|
739
|
+
* ⛔ **실패 단계는 서버 코드가 만든다** — 전사 파이프라인이 `download`·`runtime`·
|
|
740
|
+
* `transcription`·`recover` 를 내보내고, 영구 실패는 예외 객체의 속성을 그대로 싣는다.
|
|
741
|
+
* 어휘가 열려 있어 스펙의 enum 조차 스냅샷일 뿐이다.
|
|
742
|
+
*
|
|
743
|
+
* ⚠️ 여기가 닫혀 있으면 **전사가 실패했을 때 그 이유를 물으면 던진다** — 고객이 가장
|
|
744
|
+
* 답을 필요로 하는 순간이다.
|
|
745
|
+
*/
|
|
746
|
+
stage: z.ZodOptional<z.ZodNullable<z.ZodType<TranscriptStage, z.ZodTypeDef, TranscriptStage>>>;
|
|
679
747
|
error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
680
748
|
}, z.ZodTypeAny, "passthrough">>;
|
|
681
749
|
type TranscriptStatus = z.infer<typeof TranscriptStatusSchema>;
|
|
@@ -974,6 +1042,81 @@ declare const KakaoTemplateSchema: z.ZodObject<{
|
|
|
974
1042
|
updatedAt: z.ZodString;
|
|
975
1043
|
}, z.ZodTypeAny, "passthrough">>;
|
|
976
1044
|
type KakaoTemplate = z.infer<typeof KakaoTemplateSchema>;
|
|
1045
|
+
/**
|
|
1046
|
+
* 브랜드 메시지 말풍선 유형. **이 값이 단가를 정한다** — 텍스트형이 가장 싸고
|
|
1047
|
+
* 와이드리스트·캐러셀·커머스가 가장 비싸다.
|
|
1048
|
+
*
|
|
1049
|
+
* `MessageType` 과 같은 이유로 열어 둔 유니온이다.
|
|
1050
|
+
*/
|
|
1051
|
+
type BrandBubbleType = 'TEXT' | 'IMAGE' | 'WIDE' | 'WIDE_ITEM_LIST' | 'CAROUSEL_FEED' | 'COMMERCE' | 'CAROUSEL_COMMERCE' | (string & {});
|
|
1052
|
+
/**
|
|
1053
|
+
* 브랜드 메시지 템플릿.
|
|
1054
|
+
*
|
|
1055
|
+
* ⭐ **알림톡과 달리 검수가 없다** — `status`·`dormant`·`sendable` 이 없는 이유이고,
|
|
1056
|
+
* 목록에 있으면 곧 발송할 수 있다.
|
|
1057
|
+
*/
|
|
1058
|
+
declare const KakaoBrandTemplateSchema: z.ZodObject<{
|
|
1059
|
+
/** ClawOps 템플릿 리소스 ID. 발송의 `brand.templateId` 에 이 값을 쓴다. */
|
|
1060
|
+
id: z.ZodString;
|
|
1061
|
+
/** ClawOps 채널 리소스 ID. 발송의 `brand.channelId` 와 같은 값이다. */
|
|
1062
|
+
channelId: z.ZodString;
|
|
1063
|
+
name: z.ZodString;
|
|
1064
|
+
chatBubbleType: z.ZodType<BrandBubbleType>;
|
|
1065
|
+
/**
|
|
1066
|
+
* 말풍선 본문.
|
|
1067
|
+
*
|
|
1068
|
+
* ⚠️ **유형에 따라 `null` 이다.** 본문이 담기는 자리가 유형마다 달라 `TEXT`·`IMAGE`·
|
|
1069
|
+
* `WIDE` 에만 채워진다 — 나머지는 헤더·카드·상품명이 그 자리를 대신한다.
|
|
1070
|
+
*/
|
|
1071
|
+
content: z.ZodNullable<z.ZodString>;
|
|
1072
|
+
/** 와이드리스트형의 머리말. 다른 유형에서는 `null`. */
|
|
1073
|
+
header: z.ZodNullable<z.ZodString>;
|
|
1074
|
+
/** 발송 시 `brand.variables` 에 모두 채워야 하는 변수 이름. */
|
|
1075
|
+
variables: z.ZodArray<z.ZodString, "many">;
|
|
1076
|
+
createdAt: z.ZodString;
|
|
1077
|
+
updatedAt: z.ZodString;
|
|
1078
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1079
|
+
/** ClawOps 템플릿 리소스 ID. 발송의 `brand.templateId` 에 이 값을 쓴다. */
|
|
1080
|
+
id: z.ZodString;
|
|
1081
|
+
/** ClawOps 채널 리소스 ID. 발송의 `brand.channelId` 와 같은 값이다. */
|
|
1082
|
+
channelId: z.ZodString;
|
|
1083
|
+
name: z.ZodString;
|
|
1084
|
+
chatBubbleType: z.ZodType<BrandBubbleType>;
|
|
1085
|
+
/**
|
|
1086
|
+
* 말풍선 본문.
|
|
1087
|
+
*
|
|
1088
|
+
* ⚠️ **유형에 따라 `null` 이다.** 본문이 담기는 자리가 유형마다 달라 `TEXT`·`IMAGE`·
|
|
1089
|
+
* `WIDE` 에만 채워진다 — 나머지는 헤더·카드·상품명이 그 자리를 대신한다.
|
|
1090
|
+
*/
|
|
1091
|
+
content: z.ZodNullable<z.ZodString>;
|
|
1092
|
+
/** 와이드리스트형의 머리말. 다른 유형에서는 `null`. */
|
|
1093
|
+
header: z.ZodNullable<z.ZodString>;
|
|
1094
|
+
/** 발송 시 `brand.variables` 에 모두 채워야 하는 변수 이름. */
|
|
1095
|
+
variables: z.ZodArray<z.ZodString, "many">;
|
|
1096
|
+
createdAt: z.ZodString;
|
|
1097
|
+
updatedAt: z.ZodString;
|
|
1098
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1099
|
+
/** ClawOps 템플릿 리소스 ID. 발송의 `brand.templateId` 에 이 값을 쓴다. */
|
|
1100
|
+
id: z.ZodString;
|
|
1101
|
+
/** ClawOps 채널 리소스 ID. 발송의 `brand.channelId` 와 같은 값이다. */
|
|
1102
|
+
channelId: z.ZodString;
|
|
1103
|
+
name: z.ZodString;
|
|
1104
|
+
chatBubbleType: z.ZodType<BrandBubbleType>;
|
|
1105
|
+
/**
|
|
1106
|
+
* 말풍선 본문.
|
|
1107
|
+
*
|
|
1108
|
+
* ⚠️ **유형에 따라 `null` 이다.** 본문이 담기는 자리가 유형마다 달라 `TEXT`·`IMAGE`·
|
|
1109
|
+
* `WIDE` 에만 채워진다 — 나머지는 헤더·카드·상품명이 그 자리를 대신한다.
|
|
1110
|
+
*/
|
|
1111
|
+
content: z.ZodNullable<z.ZodString>;
|
|
1112
|
+
/** 와이드리스트형의 머리말. 다른 유형에서는 `null`. */
|
|
1113
|
+
header: z.ZodNullable<z.ZodString>;
|
|
1114
|
+
/** 발송 시 `brand.variables` 에 모두 채워야 하는 변수 이름. */
|
|
1115
|
+
variables: z.ZodArray<z.ZodString, "many">;
|
|
1116
|
+
createdAt: z.ZodString;
|
|
1117
|
+
updatedAt: z.ZodString;
|
|
1118
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
1119
|
+
type KakaoBrandTemplate = z.infer<typeof KakaoBrandTemplateSchema>;
|
|
977
1120
|
/** 채널 업종 카테고리. **열린 집합이므로 코드에 하드코딩하지 말 것** — 이 응답이 정본이다. */
|
|
978
1121
|
declare const KakaoChannelCategorySchema: z.ZodObject<{
|
|
979
1122
|
/** 채널 연결의 `categoryCode` 에 그대로 보내는 값. */
|
|
@@ -1145,6 +1288,13 @@ interface KakaoTemplateListParams {
|
|
|
1145
1288
|
page?: number;
|
|
1146
1289
|
pageSize?: number;
|
|
1147
1290
|
}
|
|
1291
|
+
/** 브랜드 메시지 템플릿 목록. 알림톡과 같은 축(채널 필수)이다. */
|
|
1292
|
+
interface KakaoBrandTemplateListParams {
|
|
1293
|
+
/** ClawOps 채널 리소스 ID. **필수다** — 없으면 `400` 이다. */
|
|
1294
|
+
channelId: string;
|
|
1295
|
+
page?: number;
|
|
1296
|
+
pageSize?: number;
|
|
1297
|
+
}
|
|
1148
1298
|
|
|
1149
1299
|
type RequestOptions$1 = {
|
|
1150
1300
|
extraHeaders?: Record<string, string>;
|
|
@@ -1220,14 +1370,28 @@ declare class KakaoTemplates extends APIResource {
|
|
|
1220
1370
|
*/
|
|
1221
1371
|
list(params: KakaoTemplateListParams, options?: RequestOptions$1): Promise<Page<KakaoTemplate>>;
|
|
1222
1372
|
}
|
|
1373
|
+
declare class KakaoBrandTemplates extends APIResource {
|
|
1374
|
+
/**
|
|
1375
|
+
* 한 채널의 브랜드 메시지 템플릿 목록.
|
|
1376
|
+
*
|
|
1377
|
+
* 응답의 `data[].id` 를 발송의 `brand.templateId` 로, `data[].channelId` 를
|
|
1378
|
+
* `brand.channelId` 로 쓴다. `variables` 의 모든 항목을 `brand.variables` 에 채워야 한다.
|
|
1379
|
+
*
|
|
1380
|
+
* ⭐ **알림톡과 달리 검수가 없어** `sendable` 같은 칸이 없다 — 목록에 있으면 곧 보낼 수 있다.
|
|
1381
|
+
*/
|
|
1382
|
+
list(params: KakaoBrandTemplateListParams, options?: RequestOptions$1): Promise<Page<KakaoBrandTemplate>>;
|
|
1383
|
+
}
|
|
1223
1384
|
/**
|
|
1224
|
-
* 카카오
|
|
1385
|
+
* 카카오 알림톡·브랜드 메시지 관련 리소스.
|
|
1225
1386
|
*
|
|
1226
|
-
* 발송 자체는 `client.messages.create({ kakao: … })`
|
|
1387
|
+
* 발송 자체는 `client.messages.create({ kakao: … })` 또는 `({ brand: … })` 다 —
|
|
1388
|
+
* 여기서 얻은 채널·템플릿 ID 를 그대로 쓴다.
|
|
1227
1389
|
*/
|
|
1228
1390
|
declare class Kakao extends APIResource {
|
|
1229
1391
|
get channels(): KakaoChannels;
|
|
1230
1392
|
get templates(): KakaoTemplates;
|
|
1393
|
+
/** 브랜드 메시지 템플릿. 알림톡 템플릿(`templates`)과 **다른 표**다. */
|
|
1394
|
+
get brandTemplates(): KakaoBrandTemplates;
|
|
1231
1395
|
/**
|
|
1232
1396
|
* 채널 연결 시 지정할 업종 카테고리 목록.
|
|
1233
1397
|
*
|
|
@@ -1240,14 +1404,36 @@ declare class Kakao extends APIResource {
|
|
|
1240
1404
|
channelCategories(options?: RequestOptions$1): Promise<KakaoChannelCategoryList>;
|
|
1241
1405
|
}
|
|
1242
1406
|
|
|
1407
|
+
/**
|
|
1408
|
+
* 메시지 상태.
|
|
1409
|
+
*
|
|
1410
|
+
* ⚠️ 한때 여기 `'sending'` 이 있었는데 **서버가 한 번도 보낸 적 없는 값**이다 — 어휘를 손으로
|
|
1411
|
+
* 관리하면 없는 값이 들어오고 있는 값이 빠진다. 그래서 이 유니온은 자동완성용이고,
|
|
1412
|
+
* 검증은 하지 않는다.
|
|
1413
|
+
*/
|
|
1414
|
+
type MessageStatus = 'queued' | 'sent' | 'failed' | 'received' | (string & {});
|
|
1415
|
+
/**
|
|
1416
|
+
* 메시지 유형. `KakaoChannelStatus` 와 같은 이유로 **열린 유니온**이다 — 서버가 어휘를
|
|
1417
|
+
* 소유하므로 값이 하나 늘어도 조회는 살아 있어야 하고, 낡는 것은 자동완성뿐이다.
|
|
1418
|
+
*/
|
|
1419
|
+
type MessageType = 'sms' | 'lms' | 'mms'
|
|
1420
|
+
/** 카카오 알림톡. */
|
|
1421
|
+
| 'ata'
|
|
1422
|
+
/** 카카오 브랜드 메시지. */
|
|
1423
|
+
| 'bms' | (string & {});
|
|
1243
1424
|
declare const MessageSchema: z.ZodObject<{
|
|
1244
1425
|
messageId: z.ZodString;
|
|
1245
|
-
status: z.
|
|
1426
|
+
status: z.ZodType<MessageStatus>;
|
|
1246
1427
|
/**
|
|
1247
|
-
* `'ata'` 는
|
|
1248
|
-
* 버튼·아이템 리스트·강조 문구는 템플릿에
|
|
1428
|
+
* `'ata'`(알림톡)·`'bms'`(브랜드 메시지)는 카카오로 나간다. `body` 에는 템플릿에 변수를
|
|
1429
|
+
* 치환한 결과가 담기고, 버튼·아이템 리스트·강조 문구는 템플릿에 담긴 대로 발송되어
|
|
1430
|
+
* 이 값에는 담기지 않는다.
|
|
1431
|
+
*
|
|
1432
|
+
* ⛔ **닫힌 enum 으로 두지 않는다.** 어휘는 서버가 소유하므로, 유형이 하나 늘면 닫힌
|
|
1433
|
+
* enum 은 **목록을 통째로** 실패시킨다(`list()` 는 페이지를 한 번에 파싱한다). 실제로
|
|
1434
|
+
* 두 번 그렇게 터졌다 — `'ata'` 가 나왔을 때, 그리고 `'bms'` 가 나왔을 때.
|
|
1249
1435
|
*/
|
|
1250
|
-
type: z.
|
|
1436
|
+
type: z.ZodType<MessageType>;
|
|
1251
1437
|
to: z.ZodString;
|
|
1252
1438
|
from: z.ZodString;
|
|
1253
1439
|
body: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -1260,12 +1446,17 @@ declare const MessageSchema: z.ZodObject<{
|
|
|
1260
1446
|
dateUpdated: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1261
1447
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1262
1448
|
messageId: z.ZodString;
|
|
1263
|
-
status: z.
|
|
1449
|
+
status: z.ZodType<MessageStatus>;
|
|
1264
1450
|
/**
|
|
1265
|
-
* `'ata'` 는
|
|
1266
|
-
* 버튼·아이템 리스트·강조 문구는 템플릿에
|
|
1451
|
+
* `'ata'`(알림톡)·`'bms'`(브랜드 메시지)는 카카오로 나간다. `body` 에는 템플릿에 변수를
|
|
1452
|
+
* 치환한 결과가 담기고, 버튼·아이템 리스트·강조 문구는 템플릿에 담긴 대로 발송되어
|
|
1453
|
+
* 이 값에는 담기지 않는다.
|
|
1454
|
+
*
|
|
1455
|
+
* ⛔ **닫힌 enum 으로 두지 않는다.** 어휘는 서버가 소유하므로, 유형이 하나 늘면 닫힌
|
|
1456
|
+
* enum 은 **목록을 통째로** 실패시킨다(`list()` 는 페이지를 한 번에 파싱한다). 실제로
|
|
1457
|
+
* 두 번 그렇게 터졌다 — `'ata'` 가 나왔을 때, 그리고 `'bms'` 가 나왔을 때.
|
|
1267
1458
|
*/
|
|
1268
|
-
type: z.
|
|
1459
|
+
type: z.ZodType<MessageType>;
|
|
1269
1460
|
to: z.ZodString;
|
|
1270
1461
|
from: z.ZodString;
|
|
1271
1462
|
body: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -1278,12 +1469,17 @@ declare const MessageSchema: z.ZodObject<{
|
|
|
1278
1469
|
dateUpdated: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1279
1470
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1280
1471
|
messageId: z.ZodString;
|
|
1281
|
-
status: z.
|
|
1472
|
+
status: z.ZodType<MessageStatus>;
|
|
1282
1473
|
/**
|
|
1283
|
-
* `'ata'` 는
|
|
1284
|
-
* 버튼·아이템 리스트·강조 문구는 템플릿에
|
|
1474
|
+
* `'ata'`(알림톡)·`'bms'`(브랜드 메시지)는 카카오로 나간다. `body` 에는 템플릿에 변수를
|
|
1475
|
+
* 치환한 결과가 담기고, 버튼·아이템 리스트·강조 문구는 템플릿에 담긴 대로 발송되어
|
|
1476
|
+
* 이 값에는 담기지 않는다.
|
|
1477
|
+
*
|
|
1478
|
+
* ⛔ **닫힌 enum 으로 두지 않는다.** 어휘는 서버가 소유하므로, 유형이 하나 늘면 닫힌
|
|
1479
|
+
* enum 은 **목록을 통째로** 실패시킨다(`list()` 는 페이지를 한 번에 파싱한다). 실제로
|
|
1480
|
+
* 두 번 그렇게 터졌다 — `'ata'` 가 나왔을 때, 그리고 `'bms'` 가 나왔을 때.
|
|
1285
1481
|
*/
|
|
1286
|
-
type: z.
|
|
1482
|
+
type: z.ZodType<MessageType>;
|
|
1287
1483
|
to: z.ZodString;
|
|
1288
1484
|
from: z.ZodString;
|
|
1289
1485
|
body: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -1326,6 +1522,7 @@ interface TextMessageCreateParams extends MessageCreateBaseParams {
|
|
|
1326
1522
|
/** MMS 첨부 (최대 3개). jpg·jpeg·png·bmp, 장당 300KB 이하. */
|
|
1327
1523
|
mediaUrl?: string[];
|
|
1328
1524
|
kakao?: never;
|
|
1525
|
+
brand?: never;
|
|
1329
1526
|
fallback?: never;
|
|
1330
1527
|
}
|
|
1331
1528
|
/** 알림톡 템플릿 지정. 구조(본문·버튼·아이템·강조)는 검수된 템플릿이 정하고, 요청은 값만 채운다. */
|
|
@@ -1364,6 +1561,7 @@ interface KakaoFallbackParams {
|
|
|
1364
1561
|
*/
|
|
1365
1562
|
interface KakaoMessageCreateParams extends MessageCreateBaseParams {
|
|
1366
1563
|
kakao: KakaoSendParams;
|
|
1564
|
+
brand?: never;
|
|
1367
1565
|
fallback?: KakaoFallbackParams;
|
|
1368
1566
|
/** `kakao` 를 실으면 알림톡이다. 명시할 필요가 없고, 명시한다면 `'ata'` 뿐이다. */
|
|
1369
1567
|
type?: 'ata';
|
|
@@ -1371,12 +1569,49 @@ interface KakaoMessageCreateParams extends MessageCreateBaseParams {
|
|
|
1371
1569
|
subject?: never;
|
|
1372
1570
|
mediaUrl?: never;
|
|
1373
1571
|
}
|
|
1572
|
+
/** 브랜드 메시지 템플릿 지정. 구조(본문·버튼·이미지)는 등록한 템플릿이 정한다. */
|
|
1573
|
+
interface BrandSendParams {
|
|
1574
|
+
/** `kakao.channels.list()` 의 `data[].id` (ClawOps 리소스 ID). */
|
|
1575
|
+
channelId: string;
|
|
1576
|
+
/**
|
|
1577
|
+
* `kakao.brandTemplates.list()` 의 `data[].id` (ClawOps 리소스 ID).
|
|
1578
|
+
*/
|
|
1579
|
+
templateId: string;
|
|
1580
|
+
/**
|
|
1581
|
+
* 템플릿 변수. 키는 `고객명` 과 `#{고객명}` 을 모두 받는다.
|
|
1582
|
+
*
|
|
1583
|
+
* 채워야 할 이름은 `kakao.brandTemplates.list()` 응답의 `variables` 가 알려준다.
|
|
1584
|
+
*/
|
|
1585
|
+
variables?: Record<string, string>;
|
|
1586
|
+
}
|
|
1587
|
+
/**
|
|
1588
|
+
* 카카오 브랜드 메시지 발송 파라미터.
|
|
1589
|
+
*
|
|
1590
|
+
* 채널을 **추가한 친구**에게 나가는 광고성 메시지다. 알림톡과 갈리는 점 둘:
|
|
1591
|
+
*
|
|
1592
|
+
* - **야간에 못 보낸다.** 20:50~08:00(KST)은 `422 kakao_brand_night_blocked` 다.
|
|
1593
|
+
* - **대체발송이 없다.** `fallback` 을 실으면 `400 kakao_fallback_not_allowed` 라서
|
|
1594
|
+
* 타입에서도 막는다.
|
|
1595
|
+
*
|
|
1596
|
+
* `(광고)` 표기와 수신거부 안내는 카카오가 붙이므로 본문에 넣지 않는다.
|
|
1597
|
+
*/
|
|
1598
|
+
interface BrandMessageCreateParams extends MessageCreateBaseParams {
|
|
1599
|
+
brand: BrandSendParams;
|
|
1600
|
+
/** `brand` 를 실으면 브랜드 메시지다. 명시할 필요가 없고, 명시한다면 `'bms'` 뿐이다. */
|
|
1601
|
+
type?: 'bms';
|
|
1602
|
+
body?: never;
|
|
1603
|
+
subject?: never;
|
|
1604
|
+
mediaUrl?: never;
|
|
1605
|
+
kakao?: never;
|
|
1606
|
+
fallback?: never;
|
|
1607
|
+
}
|
|
1374
1608
|
/**
|
|
1375
|
-
* 발송 파라미터.
|
|
1609
|
+
* 발송 파라미터. 문자·알림톡·브랜드 메시지는 **서로 배타적**이다 — 서버 규칙이 그렇고,
|
|
1610
|
+
* 섞으면 컴파일 에러다.
|
|
1376
1611
|
*/
|
|
1377
|
-
type MessageCreateParams = TextMessageCreateParams | KakaoMessageCreateParams;
|
|
1612
|
+
type MessageCreateParams = TextMessageCreateParams | KakaoMessageCreateParams | BrandMessageCreateParams;
|
|
1378
1613
|
interface MessageListParams {
|
|
1379
|
-
type?: TextMessageType | 'ata';
|
|
1614
|
+
type?: TextMessageType | 'ata' | 'bms';
|
|
1380
1615
|
status?: 'queued' | 'sent' | 'failed' | 'received';
|
|
1381
1616
|
/** 발신 또는 수신 번호. 하이픈 유무를 모두 매칭한다. */
|
|
1382
1617
|
number?: string;
|
|
@@ -1386,10 +1621,10 @@ interface MessageListParams {
|
|
|
1386
1621
|
|
|
1387
1622
|
declare class Messages extends APIResource {
|
|
1388
1623
|
/**
|
|
1389
|
-
* 문자(SMS/LMS/MMS) 또는 카카오
|
|
1624
|
+
* 문자(SMS/LMS/MMS) 또는 카카오 알림톡·브랜드 메시지를 발송합니다.
|
|
1390
1625
|
*
|
|
1391
|
-
*
|
|
1392
|
-
* 실을 수 없습니다(본문은
|
|
1626
|
+
* 셋은 배타적입니다 — `kakao` 를 실으면 알림톡, `brand` 를 실으면 브랜드 메시지이고,
|
|
1627
|
+
* 이때 `body`·`subject`·`mediaUrl` 은 실을 수 없습니다(본문은 템플릿이 정합니다).
|
|
1393
1628
|
*
|
|
1394
1629
|
* ```ts
|
|
1395
1630
|
* // 문자
|
|
@@ -1402,6 +1637,14 @@ declare class Messages extends APIResource {
|
|
|
1402
1637
|
* kakao: { channelId, templateId, variables: { 고객명: '홍길동' } },
|
|
1403
1638
|
* fallback: { body: '주문이 접수되었습니다.' },
|
|
1404
1639
|
* });
|
|
1640
|
+
*
|
|
1641
|
+
* // 브랜드 메시지 — 채널을 추가한 친구에게 나가는 광고성 메시지
|
|
1642
|
+
* // ⚠️ 야간 제한과 대체발송 없음 — 제약은 `BrandMessageCreateParams` 참고.
|
|
1643
|
+
* await client.messages.create({
|
|
1644
|
+
* to: '010…',
|
|
1645
|
+
* from: '070…',
|
|
1646
|
+
* brand: { channelId, templateId, variables: { 고객명: '홍길동' } },
|
|
1647
|
+
* });
|
|
1405
1648
|
* ```
|
|
1406
1649
|
*/
|
|
1407
1650
|
create(params: MessageCreateParams, options?: {
|
|
@@ -1812,7 +2055,11 @@ declare class AccountContext {
|
|
|
1812
2055
|
* 그렇게 보내므로 SDK 가 임의로 정규화하지 않는다. 열린 유니온이라 목록에 없는 코드도
|
|
1813
2056
|
* 그대로 실린다(자동완성만 돕는다).
|
|
1814
2057
|
*/
|
|
1815
|
-
type ClawOpsErrorCode = 'invalid_phone' | 'invalid_type' | 'invalid_input' | 'from_not_registered' | 'body_too_long' | 'sms_no_subject' | 'sms_no_media' | 'lms_no_media' | 'too_many_media' | 'invalid_media_ext' | 'media_download_failed' | 'type_not_supported' | 'messaging_blocked' | 'recipient_blocked' | 'quota_exceeded' | 'override_quota_exceeded' | 'no_active_subscription' | 'kakao_required' | 'kakao_type_conflict' | 'kakao_body_not_allowed' | 'kakao_subject_not_allowed' | 'kakao_media_not_allowed' | 'kakao_channel_not_found' | 'kakao_template_not_found' | 'kakao_template_not_approved' | 'kakao_template_dormant' | 'kakao_variable_missing' | 'kakao_variable_unknown' | 'kakao_send_failed' | 'kakao_unavailable' | 'invalid_fallback_type' | '
|
|
2058
|
+
type ClawOpsErrorCode = 'invalid_phone' | 'invalid_type' | 'invalid_input' | 'from_not_registered' | 'body_too_long' | 'sms_no_subject' | 'sms_no_media' | 'lms_no_media' | 'too_many_media' | 'invalid_media_ext' | 'media_download_failed' | 'type_not_supported' | 'messaging_blocked' | 'recipient_blocked' | 'quota_exceeded' | 'override_quota_exceeded' | 'no_active_subscription' | 'kakao_required' | 'kakao_type_conflict' | 'kakao_body_not_allowed' | 'kakao_subject_not_allowed' | 'kakao_media_not_allowed' | 'kakao_channel_not_found' | 'kakao_template_not_found' | 'kakao_template_not_approved' | 'kakao_template_dormant' | 'kakao_variable_missing' | 'kakao_variable_unknown' | 'kakao_send_failed' | 'kakao_unavailable' | 'invalid_fallback_type' | 'kakao_brand_required' | 'kakao_brand_template_not_found'
|
|
2059
|
+
/** 광고성이라 20:50~08:00(KST)에는 접수되지 않는다. 하루 11시간 동안 나오므로 재시도 스케줄링이 이 분기에 달린다. */
|
|
2060
|
+
| 'kakao_brand_night_blocked'
|
|
2061
|
+
/** 브랜드는 대체발송이 없다 — `fallback` 을 실으면 이 코드다. */
|
|
2062
|
+
| 'kakao_fallback_not_allowed' | 'KAKAO_TOKEN_INVALID' | 'KAKAO_CHANNEL_ALREADY_LINKED' | 'KAKAO_CHANNEL_REJECTED' | 'KAKAO_RATE_LIMITED' | 'KAKAO_PROVIDER_UNAVAILABLE' | 'VALIDATION' | 'NOT_FOUND' | (string & {});
|
|
1816
2063
|
declare class ClawOpsError extends Error {
|
|
1817
2064
|
constructor(message: string);
|
|
1818
2065
|
}
|
|
@@ -2016,4 +2263,4 @@ declare class ClawOps extends APIClient {
|
|
|
2016
2263
|
accounts(accountId: string): AccountContext;
|
|
2017
2264
|
}
|
|
2018
2265
|
|
|
2019
|
-
export { type
|
|
2266
|
+
export { type KakaoTemplateListParams as $, APIClient as A, BadRequestError as B, type Call as C, type CallListParams as D, type CallUpdateParams as E, Calls as F, ClawOps as G, ClawOpsError as H, type ClawOpsErrorCode as I, type ClawOpsOptions as J, ConflictError as K, InternalServerError as L, Kakao as M, type KakaoBrandTemplate as N, type KakaoBrandTemplateListParams as O, KakaoBrandTemplates as P, type KakaoChannel as Q, type KakaoChannelCategory as R, type KakaoChannelCategoryList as S, type KakaoChannelConnectParams as T, type KakaoChannelListParams as U, type KakaoChannelStatus as V, KakaoChannels as W, type KakaoFallbackParams as X, type KakaoMessageCreateParams as Y, type KakaoSendParams as Z, type KakaoTemplate as _, type APIClientOptions as a, KakaoTemplates as a0, type KakaoTokenRequest as a1, type KakaoTokenRequestParams as a2, type Message as a3, type MessageCreateParams as a4, type MessageListParams as a5, Messages as a6, NotFoundError as a7, type NumberCreateParams as a8, type NumberListItem as a9, type NumberUpdateParams as aa, type NumberUpdateResponse as ab, Numbers as ac, Page as ad, PermissionDeniedError as ae, type PhoneNumber as af, RateLimitError as ag, type RecordingDownload as ah, Recordings as ai, type RoutingType as aj, ServiceUnavailableError as ak, type SipCredential as al, SipCredentials as am, type SipEndpoint as an, SipEndpoints as ao, SolapiBridgeError as ap, type TextMessageCreateParams as aq, UnprocessableEntityError as ar, type WebhookLog as as, WebhookLogs as at, WebhookVerificationError as au, Webhooks as av, APIConnectionError as b, APIError as c, APIResponseValidationError as d, APIStatusError as e, APITimeoutError as f, AccountContext as g, AgentConnectionError as h, AgentError as i, type AssignmentLink as j, type AssignmentLinkAssignment as k, type AssignmentLinkCreateResponse as l, type AssignmentLinkStatus as m, AssignmentLinks as n, AuthenticationError as o, type BlockedChannel as p, type BlockedRecipient as q, type BlockedRecipientSource as r, type BlockedRecipientStatus as s, BlockedRecipients as t, type BrandBubbleType as u, type BrandMessageCreateParams as v, type BrandSendParams as w, type CallContextParam as x, type CallControlResponse as y, type CallCreateParams as z };
|