@teamlearners/clawops 0.13.1 → 0.15.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 +17 -0
- package/dist/agent/index.cjs +8 -8
- package/dist/agent/index.js +1 -1
- package/dist/{chunk-7IYMRCGL.cjs → chunk-ENZ4B3I7.cjs} +3 -3
- package/dist/{chunk-7IYMRCGL.cjs.map → chunk-ENZ4B3I7.cjs.map} +1 -1
- package/dist/{chunk-FQOH42FH.js → chunk-JTLOQURG.js} +3 -3
- package/dist/{chunk-FQOH42FH.js.map → chunk-JTLOQURG.js.map} +1 -1
- package/dist/index.cjs +108 -35
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +171 -0
- package/dist/index.d.ts +171 -0
- package/dist/index.js +75 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -182,6 +182,23 @@ const detail = await client.calls.get('CAabcdef1234567890');
|
|
|
182
182
|
|
|
183
183
|
// 통화 종료
|
|
184
184
|
await client.calls.update('CAabcdef1234567890', { status: 'completed' });
|
|
185
|
+
|
|
186
|
+
// 통화 전사 상태 조회 (completed 시 segments 까지 inline)
|
|
187
|
+
const state = await client.calls.getTranscript('CAabcdef1234567890');
|
|
188
|
+
if (state.status === 'completed') {
|
|
189
|
+
for (const seg of state.segments ?? []) {
|
|
190
|
+
console.log(`[${seg.speaker}] ${seg.text}`);
|
|
191
|
+
}
|
|
192
|
+
} else if (state.status === 'not_requested') {
|
|
193
|
+
// 조직 설정 off 거나 아직 요청 안 된 상태 — 명시 요청 (사용량 과금)
|
|
194
|
+
await client.calls.requestTranscript('CAabcdef1234567890');
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// 통화 요약 상태 조회 (completed 시 resultJson 까지 inline)
|
|
198
|
+
const summary = await client.calls.getSummary('CAabcdef1234567890');
|
|
199
|
+
if (summary.status === 'completed') {
|
|
200
|
+
console.log(summary.resultJson); // { coreSummary, decisions, followUps, sentiment }
|
|
201
|
+
}
|
|
185
202
|
```
|
|
186
203
|
|
|
187
204
|
### 전화번호 (Numbers)
|
package/dist/agent/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkENZ4B3I7_cjs = require('../chunk-ENZ4B3I7.cjs');
|
|
4
4
|
var pino = require('pino');
|
|
5
5
|
var fs = require('fs');
|
|
6
6
|
var path = require('path');
|
|
@@ -1043,7 +1043,7 @@ var MAX_ERROR_MESSAGE_LENGTH = 200;
|
|
|
1043
1043
|
function getSdkInfo() {
|
|
1044
1044
|
return {
|
|
1045
1045
|
name: "clawops-node",
|
|
1046
|
-
version:
|
|
1046
|
+
version: chunkENZ4B3I7_cjs.VERSION,
|
|
1047
1047
|
runtime: `node/${process.versions.node}`,
|
|
1048
1048
|
os: `${process.platform}/${os__default.default.arch()}`
|
|
1049
1049
|
};
|
|
@@ -1724,7 +1724,7 @@ var ClawOpsAgent = class {
|
|
|
1724
1724
|
constructor(options) {
|
|
1725
1725
|
this._apiKey = options.apiKey ?? process.env["CLAWOPS_API_KEY"] ?? "";
|
|
1726
1726
|
this._accountId = options.accountId ?? process.env["CLAWOPS_ACCOUNT_ID"] ?? "";
|
|
1727
|
-
this._baseUrl = options.baseUrl ??
|
|
1727
|
+
this._baseUrl = options.baseUrl ?? chunkENZ4B3I7_cjs.DEFAULT_BASE_URL;
|
|
1728
1728
|
this._fromNumber = options.from;
|
|
1729
1729
|
this._session = options.session;
|
|
1730
1730
|
this._recording = options.recording ?? false;
|
|
@@ -1752,7 +1752,7 @@ var ClawOpsAgent = class {
|
|
|
1752
1752
|
tool(nameOrTool, description, parameters, handler) {
|
|
1753
1753
|
if (typeof nameOrTool === "string") {
|
|
1754
1754
|
if (!description || !parameters || !handler) {
|
|
1755
|
-
throw new
|
|
1755
|
+
throw new chunkENZ4B3I7_cjs.AgentError(
|
|
1756
1756
|
"tool(name, description, parameters, handler) requires all arguments."
|
|
1757
1757
|
);
|
|
1758
1758
|
}
|
|
@@ -1788,10 +1788,10 @@ var ClawOpsAgent = class {
|
|
|
1788
1788
|
async connect() {
|
|
1789
1789
|
if (this._controlWs) return;
|
|
1790
1790
|
if (!this._apiKey) {
|
|
1791
|
-
throw new
|
|
1791
|
+
throw new chunkENZ4B3I7_cjs.AgentError("API key is required. Set CLAWOPS_API_KEY or pass apiKey option.");
|
|
1792
1792
|
}
|
|
1793
1793
|
if (!this._accountId) {
|
|
1794
|
-
throw new
|
|
1794
|
+
throw new chunkENZ4B3I7_cjs.AgentError(
|
|
1795
1795
|
"Account ID is required. Set CLAWOPS_ACCOUNT_ID or pass accountId option."
|
|
1796
1796
|
);
|
|
1797
1797
|
}
|
|
@@ -1815,7 +1815,7 @@ var ClawOpsAgent = class {
|
|
|
1815
1815
|
} catch {
|
|
1816
1816
|
}
|
|
1817
1817
|
} catch (err) {
|
|
1818
|
-
throw new
|
|
1818
|
+
throw new chunkENZ4B3I7_cjs.AgentConnectionError(
|
|
1819
1819
|
`Failed to connect to ClawOps: ${err instanceof Error ? err.message : String(err)}`
|
|
1820
1820
|
);
|
|
1821
1821
|
}
|
|
@@ -1866,7 +1866,7 @@ var ClawOpsAgent = class {
|
|
|
1866
1866
|
});
|
|
1867
1867
|
if (resp.status !== 201) {
|
|
1868
1868
|
const error = await resp.json();
|
|
1869
|
-
throw new
|
|
1869
|
+
throw new chunkENZ4B3I7_cjs.AgentError(`\uBC1C\uC2E0 \uC2E4\uD328 (${resp.status}): ${error["error"] ?? ""}`);
|
|
1870
1870
|
}
|
|
1871
1871
|
const data = await resp.json();
|
|
1872
1872
|
const callSession = new CallSession({
|
package/dist/agent/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DEFAULT_BASE_URL, AgentError, AgentConnectionError, VERSION } from '../chunk-
|
|
1
|
+
import { DEFAULT_BASE_URL, AgentError, AgentConnectionError, VERSION } from '../chunk-JTLOQURG.js';
|
|
2
2
|
import pino from 'pino';
|
|
3
3
|
import * as fs from 'fs';
|
|
4
4
|
import * as path from 'path';
|
|
@@ -151,7 +151,7 @@ function makeStatusError(status, body, headers, request) {
|
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
// src/version.ts
|
|
154
|
-
var VERSION = "0.
|
|
154
|
+
var VERSION = "0.15.0" ;
|
|
155
155
|
|
|
156
156
|
// src/constants.ts
|
|
157
157
|
var DEFAULT_BASE_URL = "https://api.claw-ops.com";
|
|
@@ -184,5 +184,5 @@ exports.ServiceUnavailableError = ServiceUnavailableError;
|
|
|
184
184
|
exports.UnprocessableEntityError = UnprocessableEntityError;
|
|
185
185
|
exports.VERSION = VERSION;
|
|
186
186
|
exports.makeStatusError = makeStatusError;
|
|
187
|
-
//# sourceMappingURL=chunk-
|
|
188
|
-
//# sourceMappingURL=chunk-
|
|
187
|
+
//# sourceMappingURL=chunk-ENZ4B3I7.cjs.map
|
|
188
|
+
//# sourceMappingURL=chunk-ENZ4B3I7.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/error.ts","../src/version.ts","../src/constants.ts"],"names":[],"mappings":";;;AAAO,IAAM,YAAA,GAAN,cAA2B,KAAA,CAAM;AAAA,EACtC,YAAY,OAAA,EAAiB;AAC3B,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAA,IAAA,CAAK,IAAA,GAAO,cAAA;AAAA,EACd;AACF;AAEO,IAAM,QAAA,GAAN,cAAuB,YAAA,CAAa;AAAA,EAChC,OAAA;AAAA,EAET,WAAA,CAAY,SAAiB,OAAA,EAA0C;AACrE,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAA,IAAA,CAAK,IAAA,GAAO,UAAA;AACZ,IAAA,IAAA,CAAK,OAAA,GAAU,OAAA;AAAA,EACjB;AACF;AAEO,IAAM,cAAA,GAAN,cAA6B,QAAA,CAAS;AAAA,EAClC,MAAA;AAAA,EACA,IAAA;AAAA,EACA,O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B;AAC5B,IAAM,eAAA,GAAkB","file":"chunk-7IYMRCGL.cjs","sourcesContent":["export class ClawOpsError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'ClawOpsError';\n }\n}\n\nexport class APIError extends ClawOpsError {\n readonly request: { method: string; url: string };\n\n constructor(message: string, request: { method: string; url: string }) {\n super(message);\n this.name = 'APIError';\n this.request = request;\n }\n}\n\nexport class APIStatusError extends APIError {\n readonly status: number;\n readonly body: unknown;\n readonly headers: Headers | undefined;\n\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, request);\n this.name = 'APIStatusError';\n this.status = response.status;\n this.body = body;\n this.headers = response.headers;\n }\n}\n\nexport class BadRequestError extends APIStatusError {\n override readonly status = 400 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'BadRequestError';\n }\n}\n\nexport class AuthenticationError extends APIStatusError {\n override readonly status = 401 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'AuthenticationError';\n }\n}\n\nexport class PermissionDeniedError extends APIStatusError {\n override readonly status = 403 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'PermissionDeniedError';\n }\n}\n\nexport class NotFoundError extends APIStatusError {\n override readonly status = 404 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'NotFoundError';\n }\n}\n\nexport class ConflictError extends APIStatusError {\n override readonly status = 409 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'ConflictError';\n }\n}\n\nexport class UnprocessableEntityError extends APIStatusError {\n override readonly status = 422 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'UnprocessableEntityError';\n }\n}\n\n/**\n * HTTP 429 Too Many Requests.\n *\n * 동시 통화 한도 초과 등 일시적 제한. SDK는 자동 재시도(최대 2회, 지수 backoff)를 수행한다.\n * 즉각 피드백이 필요하면 client 생성 시 maxRetries: 0으로 재시도를 비활성화하라.\n */\nexport class RateLimitError extends APIStatusError {\n override readonly status = 429 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'RateLimitError';\n }\n}\n\nexport class InternalServerError extends APIStatusError {\n override readonly status = 500 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'InternalServerError';\n }\n}\n\nexport class ServiceUnavailableError extends APIStatusError {\n override readonly status = 503 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'ServiceUnavailableError';\n }\n}\n\nexport class APIConnectionError extends APIError {\n constructor(request: { method: string; url: string }, message = 'Connection error.') {\n super(message, request);\n this.name = 'APIConnectionError';\n }\n}\n\nexport class APITimeoutError extends APIConnectionError {\n constructor(request: { method: string; url: string }) {\n super(request, 'Request timed out.');\n this.name = 'APITimeoutError';\n }\n}\n\nexport class APIResponseValidationError extends APIError {\n readonly status: number;\n\n constructor(response: { status: number }, request: { method: string; url: string }) {\n super('API response validation failed.', request);\n this.name = 'APIResponseValidationError';\n this.status = response.status;\n }\n}\n\nexport class AgentError extends ClawOpsError {\n constructor(message: string) {\n super(message);\n this.name = 'AgentError';\n }\n}\n\nexport class AgentConnectionError extends AgentError {\n constructor(message = 'Agent WebSocket connection failed.') {\n super(message);\n this.name = 'AgentConnectionError';\n }\n}\n\nconst STATUS_CODE_TO_ERROR: Record<\n number,\n new (\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) => APIStatusError\n> = {\n 400: BadRequestError,\n 401: AuthenticationError,\n 403: PermissionDeniedError,\n 404: NotFoundError,\n 409: ConflictError,\n 422: UnprocessableEntityError,\n 429: RateLimitError,\n 500: InternalServerError,\n 503: ServiceUnavailableError,\n};\n\nexport function makeStatusError(\n status: number,\n body: unknown,\n headers: Headers | undefined,\n request: { method: string; url: string },\n): APIStatusError {\n let message = '';\n if (body && typeof body === 'object' && 'error' in body) {\n message = (body as { error: string }).error;\n } else {\n message = `HTTP ${status}`;\n }\n\n const ErrorClass = STATUS_CODE_TO_ERROR[status];\n if (ErrorClass) {\n return new ErrorClass(message, { status, headers }, body, request);\n }\n if (status >= 500) {\n return new InternalServerError(message, { status, headers }, body, request);\n }\n return new APIStatusError(message, { status, headers }, body, request);\n}\n","declare const __PKG_VERSION__: string;\n\nexport const VERSION: string = typeof __PKG_VERSION__ !== 'undefined'\n ? __PKG_VERSION__\n : 'dev';\n","export const DEFAULT_BASE_URL = 'https://api.claw-ops.com';\nexport const DEFAULT_MAX_RETRIES = 2;\nexport const DEFAULT_TIMEOUT = 600_000; // ms\nexport const INITIAL_RETRY_DELAY = 500; // ms\nexport const MAX_RETRY_DELAY = 8_000; // ms\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/error.ts","../src/version.ts","../src/constants.ts"],"names":[],"mappings":";;;AAAO,IAAM,YAAA,GAAN,cAA2B,KAAA,CAAM;AAAA,EACtC,YAAY,OAAA,EAAiB;AAC3B,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAA,IAAA,CAAK,IAAA,GAAO,cAAA;AAAA,EACd;AACF;AAEO,IAAM,QAAA,GAAN,cAAuB,YAAA,CAAa;AAAA,EAChC,OAAA;AAAA,EAET,WAAA,CAAY,SAAiB,OAAA,EAA0C;AACrE,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAA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OAAA,EAAQ,EAAG,MAAM,OAAO,CAAA;AACvE;;;AC5OO,IAAM,OAAA,GACT,QAAA;;;ACHG,IAAM,gBAAA,GAAmB;AACzB,IAAM,mBAAA,GAAsB;AAC5B,IAAM,eAAA,GAAkB;AACxB,IAAM,mBAAA,GAAsB;AAC5B,IAAM,eAAA,GAAkB","file":"chunk-ENZ4B3I7.cjs","sourcesContent":["export class ClawOpsError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'ClawOpsError';\n }\n}\n\nexport class APIError extends ClawOpsError {\n readonly request: { method: string; url: string };\n\n constructor(message: string, request: { method: string; url: string }) {\n super(message);\n this.name = 'APIError';\n this.request = request;\n }\n}\n\nexport class APIStatusError extends APIError {\n readonly status: number;\n readonly body: unknown;\n readonly headers: Headers | undefined;\n\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, request);\n this.name = 'APIStatusError';\n this.status = response.status;\n this.body = body;\n this.headers = response.headers;\n }\n}\n\nexport class BadRequestError extends APIStatusError {\n override readonly status = 400 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'BadRequestError';\n }\n}\n\nexport class AuthenticationError extends APIStatusError {\n override readonly status = 401 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'AuthenticationError';\n }\n}\n\nexport class PermissionDeniedError extends APIStatusError {\n override readonly status = 403 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'PermissionDeniedError';\n }\n}\n\nexport class NotFoundError extends APIStatusError {\n override readonly status = 404 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'NotFoundError';\n }\n}\n\nexport class ConflictError extends APIStatusError {\n override readonly status = 409 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'ConflictError';\n }\n}\n\nexport class UnprocessableEntityError extends APIStatusError {\n override readonly status = 422 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'UnprocessableEntityError';\n }\n}\n\n/**\n * HTTP 429 Too Many Requests.\n *\n * 동시 통화 한도 초과 등 일시적 제한. SDK는 자동 재시도(최대 2회, 지수 backoff)를 수행한다.\n * 즉각 피드백이 필요하면 client 생성 시 maxRetries: 0으로 재시도를 비활성화하라.\n */\nexport class RateLimitError extends APIStatusError {\n override readonly status = 429 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'RateLimitError';\n }\n}\n\nexport class InternalServerError extends APIStatusError {\n override readonly status = 500 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'InternalServerError';\n }\n}\n\nexport class ServiceUnavailableError extends APIStatusError {\n override readonly status = 503 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'ServiceUnavailableError';\n }\n}\n\nexport class APIConnectionError extends APIError {\n constructor(request: { method: string; url: string }, message = 'Connection error.') {\n super(message, request);\n this.name = 'APIConnectionError';\n }\n}\n\nexport class APITimeoutError extends APIConnectionError {\n constructor(request: { method: string; url: string }) {\n super(request, 'Request timed out.');\n this.name = 'APITimeoutError';\n }\n}\n\nexport class APIResponseValidationError extends APIError {\n readonly status: number;\n\n constructor(response: { status: number }, request: { method: string; url: string }) {\n super('API response validation failed.', request);\n this.name = 'APIResponseValidationError';\n this.status = response.status;\n }\n}\n\nexport class AgentError extends ClawOpsError {\n constructor(message: string) {\n super(message);\n this.name = 'AgentError';\n }\n}\n\nexport class AgentConnectionError extends AgentError {\n constructor(message = 'Agent WebSocket connection failed.') {\n super(message);\n this.name = 'AgentConnectionError';\n }\n}\n\nconst STATUS_CODE_TO_ERROR: Record<\n number,\n new (\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) => APIStatusError\n> = {\n 400: BadRequestError,\n 401: AuthenticationError,\n 403: PermissionDeniedError,\n 404: NotFoundError,\n 409: ConflictError,\n 422: UnprocessableEntityError,\n 429: RateLimitError,\n 500: InternalServerError,\n 503: ServiceUnavailableError,\n};\n\nexport function makeStatusError(\n status: number,\n body: unknown,\n headers: Headers | undefined,\n request: { method: string; url: string },\n): APIStatusError {\n let message = '';\n if (body && typeof body === 'object' && 'error' in body) {\n message = (body as { error: string }).error;\n } else {\n message = `HTTP ${status}`;\n }\n\n const ErrorClass = STATUS_CODE_TO_ERROR[status];\n if (ErrorClass) {\n return new ErrorClass(message, { status, headers }, body, request);\n }\n if (status >= 500) {\n return new InternalServerError(message, { status, headers }, body, request);\n }\n return new APIStatusError(message, { status, headers }, body, request);\n}\n","declare const __PKG_VERSION__: string;\n\nexport const VERSION: string = typeof __PKG_VERSION__ !== 'undefined'\n ? __PKG_VERSION__\n : 'dev';\n","export const DEFAULT_BASE_URL = 'https://api.claw-ops.com';\nexport const DEFAULT_MAX_RETRIES = 2;\nexport const DEFAULT_TIMEOUT = 600_000; // ms\nexport const INITIAL_RETRY_DELAY = 500; // ms\nexport const MAX_RETRY_DELAY = 8_000; // ms\n"]}
|
|
@@ -149,7 +149,7 @@ function makeStatusError(status, body, headers, request) {
|
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
// src/version.ts
|
|
152
|
-
var VERSION = "0.
|
|
152
|
+
var VERSION = "0.15.0" ;
|
|
153
153
|
|
|
154
154
|
// src/constants.ts
|
|
155
155
|
var DEFAULT_BASE_URL = "https://api.claw-ops.com";
|
|
@@ -159,5 +159,5 @@ var INITIAL_RETRY_DELAY = 500;
|
|
|
159
159
|
var MAX_RETRY_DELAY = 8e3;
|
|
160
160
|
|
|
161
161
|
export { APIConnectionError, APIError, APIResponseValidationError, APIStatusError, APITimeoutError, AgentConnectionError, AgentError, AuthenticationError, BadRequestError, ClawOpsError, ConflictError, DEFAULT_BASE_URL, DEFAULT_MAX_RETRIES, DEFAULT_TIMEOUT, INITIAL_RETRY_DELAY, InternalServerError, MAX_RETRY_DELAY, NotFoundError, PermissionDeniedError, RateLimitError, ServiceUnavailableError, UnprocessableEntityError, VERSION, makeStatusError };
|
|
162
|
-
//# sourceMappingURL=chunk-
|
|
163
|
-
//# sourceMappingURL=chunk-
|
|
162
|
+
//# sourceMappingURL=chunk-JTLOQURG.js.map
|
|
163
|
+
//# sourceMappingURL=chunk-JTLOQURG.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/error.ts","../src/version.ts","../src/constants.ts"],"names":[],"mappings":";AAAO,IAAM,YAAA,GAAN,cAA2B,KAAA,CAAM;AAAA,EACtC,YAAY,OAAA,EAAiB;AAC3B,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAA,IAAA,CAAK,IAAA,GAAO,cAAA;AAAA,EACd;AACF;AAEO,IAAM,QAAA,GAAN,cAAuB,YAAA,CAAa;AAAA,EAChC,OAAA;AAAA,EAET,WAAA,CAAY,SAAiB,OAAA,EAA0C;AACrE,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAA,IAAA,CAAK,IAAA,GAAO,UAAA;AACZ,IAAA,IAAA,CAAK,OAAA,GAAU,OAAA;AAAA,EACjB;AACF;AAEO,IAAM,cAAA,GAAN,cAA6B,QAAA,CAAS;AAAA,EAClC,MAAA;AAAA,EACA,IAAA;AAAA,EACA,OAAA;AAAA,EAET,WAAA,CACE,OAAA,EACA,QAAA,EACA,IAAA,EACA,OAAA,EACA;AACA,IAAA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ructor(message: string) {\n super(message);\n this.name = 'ClawOpsError';\n }\n}\n\nexport class APIError extends ClawOpsError {\n readonly request: { method: string; url: string };\n\n constructor(message: string, request: { method: string; url: string }) {\n super(message);\n this.name = 'APIError';\n this.request = request;\n }\n}\n\nexport class APIStatusError extends APIError {\n readonly status: number;\n readonly body: unknown;\n readonly headers: Headers | undefined;\n\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, request);\n this.name = 'APIStatusError';\n this.status = response.status;\n this.body = body;\n this.headers = response.headers;\n }\n}\n\nexport class BadRequestError extends APIStatusError {\n override readonly status = 400 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'BadRequestError';\n }\n}\n\nexport class AuthenticationError extends APIStatusError {\n override readonly status = 401 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'AuthenticationError';\n }\n}\n\nexport class PermissionDeniedError extends APIStatusError {\n override readonly status = 403 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'PermissionDeniedError';\n }\n}\n\nexport class NotFoundError extends APIStatusError {\n override readonly status = 404 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'NotFoundError';\n }\n}\n\nexport class ConflictError extends APIStatusError {\n override readonly status = 409 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'ConflictError';\n }\n}\n\nexport class UnprocessableEntityError extends APIStatusError {\n override readonly status = 422 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'UnprocessableEntityError';\n }\n}\n\n/**\n * HTTP 429 Too Many Requests.\n *\n * 동시 통화 한도 초과 등 일시적 제한. SDK는 자동 재시도(최대 2회, 지수 backoff)를 수행한다.\n * 즉각 피드백이 필요하면 client 생성 시 maxRetries: 0으로 재시도를 비활성화하라.\n */\nexport class RateLimitError extends APIStatusError {\n override readonly status = 429 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'RateLimitError';\n }\n}\n\nexport class InternalServerError extends APIStatusError {\n override readonly status = 500 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'InternalServerError';\n }\n}\n\nexport class ServiceUnavailableError extends APIStatusError {\n override readonly status = 503 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'ServiceUnavailableError';\n }\n}\n\nexport class APIConnectionError extends APIError {\n constructor(request: { method: string; url: string }, message = 'Connection error.') {\n super(message, request);\n this.name = 'APIConnectionError';\n }\n}\n\nexport class APITimeoutError extends APIConnectionError {\n constructor(request: { method: string; url: string }) {\n super(request, 'Request timed out.');\n this.name = 'APITimeoutError';\n }\n}\n\nexport class APIResponseValidationError extends APIError {\n readonly status: number;\n\n constructor(response: { status: number }, request: { method: string; url: string }) {\n super('API response validation failed.', request);\n this.name = 'APIResponseValidationError';\n this.status = response.status;\n }\n}\n\nexport class AgentError extends ClawOpsError {\n constructor(message: string) {\n super(message);\n this.name = 'AgentError';\n }\n}\n\nexport class AgentConnectionError extends AgentError {\n constructor(message = 'Agent WebSocket connection failed.') {\n super(message);\n this.name = 'AgentConnectionError';\n }\n}\n\nconst STATUS_CODE_TO_ERROR: Record<\n number,\n new (\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) => APIStatusError\n> = {\n 400: BadRequestError,\n 401: AuthenticationError,\n 403: PermissionDeniedError,\n 404: NotFoundError,\n 409: ConflictError,\n 422: UnprocessableEntityError,\n 429: RateLimitError,\n 500: InternalServerError,\n 503: ServiceUnavailableError,\n};\n\nexport function makeStatusError(\n status: number,\n body: unknown,\n headers: Headers | undefined,\n request: { method: string; url: string },\n): APIStatusError {\n let message = '';\n if (body && typeof body === 'object' && 'error' in body) {\n message = (body as { error: string }).error;\n } else {\n message = `HTTP ${status}`;\n }\n\n const ErrorClass = STATUS_CODE_TO_ERROR[status];\n if (ErrorClass) {\n return new ErrorClass(message, { status, headers }, body, request);\n }\n if (status >= 500) {\n return new InternalServerError(message, { status, headers }, body, request);\n }\n return new APIStatusError(message, { status, headers }, body, request);\n}\n","declare const __PKG_VERSION__: string;\n\nexport const VERSION: string = typeof __PKG_VERSION__ !== 'undefined'\n ? __PKG_VERSION__\n : 'dev';\n","export const DEFAULT_BASE_URL = 'https://api.claw-ops.com';\nexport const DEFAULT_MAX_RETRIES = 2;\nexport const DEFAULT_TIMEOUT = 600_000; // ms\nexport const INITIAL_RETRY_DELAY = 500; // ms\nexport const MAX_RETRY_DELAY = 8_000; // ms\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/error.ts","../src/version.ts","../src/constants.ts"],"names":[],"mappings":";AAAO,IAAM,YAAA,GAAN,cAA2B,KAAA,CAAM;AAAA,EACtC,YAAY,OAAA,EAAiB;AAC3B,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAA,IAAA,CAAK,IAAA,GAAO,cAAA;AAAA,EACd;AACF;AAEO,IAAM,QAAA,GAAN,cAAuB,YAAA,CAAa;AAAA,EAChC,OAAA;AAAA,EAET,WAAA,CAAY,SAAiB,OAAA,EAA0C;AACrE,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAA,IAAA,CAAK,IAAA,GAAO,UAAA;AACZ,IAAA,IAAA,CAAK,OAAA,GAAU,OAAA;AAAA,EACjB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AAM,gBAAA,GAAmB;AACzB,IAAM,mBAAA,GAAsB;AAC5B,IAAM,eAAA,GAAkB;AACxB,IAAM,mBAAA,GAAsB;AAC5B,IAAM,eAAA,GAAkB","file":"chunk-JTLOQURG.js","sourcesContent":["export class ClawOpsError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'ClawOpsError';\n }\n}\n\nexport class APIError extends ClawOpsError {\n readonly request: { method: string; url: string };\n\n constructor(message: string, request: { method: string; url: string }) {\n super(message);\n this.name = 'APIError';\n this.request = request;\n }\n}\n\nexport class APIStatusError extends APIError {\n readonly status: number;\n readonly body: unknown;\n readonly headers: Headers | undefined;\n\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, request);\n this.name = 'APIStatusError';\n this.status = response.status;\n this.body = body;\n this.headers = response.headers;\n }\n}\n\nexport class BadRequestError extends APIStatusError {\n override readonly status = 400 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'BadRequestError';\n }\n}\n\nexport class AuthenticationError extends APIStatusError {\n override readonly status = 401 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'AuthenticationError';\n }\n}\n\nexport class PermissionDeniedError extends APIStatusError {\n override readonly status = 403 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'PermissionDeniedError';\n }\n}\n\nexport class NotFoundError extends APIStatusError {\n override readonly status = 404 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'NotFoundError';\n }\n}\n\nexport class ConflictError extends APIStatusError {\n override readonly status = 409 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'ConflictError';\n }\n}\n\nexport class UnprocessableEntityError extends APIStatusError {\n override readonly status = 422 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'UnprocessableEntityError';\n }\n}\n\n/**\n * HTTP 429 Too Many Requests.\n *\n * 동시 통화 한도 초과 등 일시적 제한. SDK는 자동 재시도(최대 2회, 지수 backoff)를 수행한다.\n * 즉각 피드백이 필요하면 client 생성 시 maxRetries: 0으로 재시도를 비활성화하라.\n */\nexport class RateLimitError extends APIStatusError {\n override readonly status = 429 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'RateLimitError';\n }\n}\n\nexport class InternalServerError extends APIStatusError {\n override readonly status = 500 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'InternalServerError';\n }\n}\n\nexport class ServiceUnavailableError extends APIStatusError {\n override readonly status = 503 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'ServiceUnavailableError';\n }\n}\n\nexport class APIConnectionError extends APIError {\n constructor(request: { method: string; url: string }, message = 'Connection error.') {\n super(message, request);\n this.name = 'APIConnectionError';\n }\n}\n\nexport class APITimeoutError extends APIConnectionError {\n constructor(request: { method: string; url: string }) {\n super(request, 'Request timed out.');\n this.name = 'APITimeoutError';\n }\n}\n\nexport class APIResponseValidationError extends APIError {\n readonly status: number;\n\n constructor(response: { status: number }, request: { method: string; url: string }) {\n super('API response validation failed.', request);\n this.name = 'APIResponseValidationError';\n this.status = response.status;\n }\n}\n\nexport class AgentError extends ClawOpsError {\n constructor(message: string) {\n super(message);\n this.name = 'AgentError';\n }\n}\n\nexport class AgentConnectionError extends AgentError {\n constructor(message = 'Agent WebSocket connection failed.') {\n super(message);\n this.name = 'AgentConnectionError';\n }\n}\n\nconst STATUS_CODE_TO_ERROR: Record<\n number,\n new (\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) => APIStatusError\n> = {\n 400: BadRequestError,\n 401: AuthenticationError,\n 403: PermissionDeniedError,\n 404: NotFoundError,\n 409: ConflictError,\n 422: UnprocessableEntityError,\n 429: RateLimitError,\n 500: InternalServerError,\n 503: ServiceUnavailableError,\n};\n\nexport function makeStatusError(\n status: number,\n body: unknown,\n headers: Headers | undefined,\n request: { method: string; url: string },\n): APIStatusError {\n let message = '';\n if (body && typeof body === 'object' && 'error' in body) {\n message = (body as { error: string }).error;\n } else {\n message = `HTTP ${status}`;\n }\n\n const ErrorClass = STATUS_CODE_TO_ERROR[status];\n if (ErrorClass) {\n return new ErrorClass(message, { status, headers }, body, request);\n }\n if (status >= 500) {\n return new InternalServerError(message, { status, headers }, body, request);\n }\n return new APIStatusError(message, { status, headers }, body, request);\n}\n","declare const __PKG_VERSION__: string;\n\nexport const VERSION: string = typeof __PKG_VERSION__ !== 'undefined'\n ? __PKG_VERSION__\n : 'dev';\n","export const DEFAULT_BASE_URL = 'https://api.claw-ops.com';\nexport const DEFAULT_MAX_RETRIES = 2;\nexport const DEFAULT_TIMEOUT = 600_000; // ms\nexport const INITIAL_RETRY_DELAY = 500; // ms\nexport const MAX_RETRY_DELAY = 8_000; // ms\n"]}
|
package/dist/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var chunkENZ4B3I7_cjs = require('./chunk-ENZ4B3I7.cjs');
|
|
6
6
|
var zod = require('zod');
|
|
7
7
|
var crypto = require('crypto');
|
|
8
8
|
|
|
@@ -13,11 +13,11 @@ function validateBaseUrl(url) {
|
|
|
13
13
|
try {
|
|
14
14
|
parsed = new URL(url);
|
|
15
15
|
} catch {
|
|
16
|
-
throw new
|
|
16
|
+
throw new chunkENZ4B3I7_cjs.ClawOpsError(`Invalid base_url: ${url}`);
|
|
17
17
|
}
|
|
18
18
|
if (parsed.protocol === "https:") return url;
|
|
19
19
|
if (parsed.protocol === "http:" && LOCALHOST_HOSTS.has(parsed.hostname)) return url;
|
|
20
|
-
throw new
|
|
20
|
+
throw new chunkENZ4B3I7_cjs.ClawOpsError(
|
|
21
21
|
`base_url\uC740 HTTPS\uB97C \uC0AC\uC6A9\uD574\uC57C \uD569\uB2C8\uB2E4 (\uBC1B\uC740 \uAC12: '${url}'). \uB85C\uCEEC \uAC1C\uBC1C \uC2DC\uC5D0\uB294 http://localhost\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.`
|
|
22
22
|
);
|
|
23
23
|
}
|
|
@@ -30,9 +30,9 @@ var APIClient = class {
|
|
|
30
30
|
_defaultHeaders;
|
|
31
31
|
constructor(options) {
|
|
32
32
|
this._apiKey = options.apiKey;
|
|
33
|
-
this._baseURL = validateBaseUrl((options.baseURL ??
|
|
34
|
-
this._maxRetries = options.maxRetries ??
|
|
35
|
-
this._timeout = options.timeout ??
|
|
33
|
+
this._baseURL = validateBaseUrl((options.baseURL ?? chunkENZ4B3I7_cjs.DEFAULT_BASE_URL).replace(/\/+$/, ""));
|
|
34
|
+
this._maxRetries = options.maxRetries ?? chunkENZ4B3I7_cjs.DEFAULT_MAX_RETRIES;
|
|
35
|
+
this._timeout = options.timeout ?? chunkENZ4B3I7_cjs.DEFAULT_TIMEOUT;
|
|
36
36
|
this._fetch = options.fetch ?? globalThis.fetch;
|
|
37
37
|
this._defaultHeaders = options.defaultHeaders ?? {};
|
|
38
38
|
}
|
|
@@ -41,7 +41,7 @@ var APIClient = class {
|
|
|
41
41
|
Authorization: `Bearer ${this._apiKey}`,
|
|
42
42
|
"Content-Type": "application/json",
|
|
43
43
|
Accept: "application/json",
|
|
44
|
-
"User-Agent": `claw-ops-node/${
|
|
44
|
+
"User-Agent": `claw-ops-node/${chunkENZ4B3I7_cjs.VERSION}`,
|
|
45
45
|
...this._defaultHeaders
|
|
46
46
|
};
|
|
47
47
|
if (extra) Object.assign(headers, extra);
|
|
@@ -77,14 +77,14 @@ var APIClient = class {
|
|
|
77
77
|
await this._sleep(this._retryDelay(this._maxRetries - retriesLeft));
|
|
78
78
|
continue;
|
|
79
79
|
}
|
|
80
|
-
throw new
|
|
80
|
+
throw new chunkENZ4B3I7_cjs.APITimeoutError({ method: method2, url });
|
|
81
81
|
}
|
|
82
82
|
if (retriesLeft > 0) {
|
|
83
83
|
retriesLeft--;
|
|
84
84
|
await this._sleep(this._retryDelay(this._maxRetries - retriesLeft));
|
|
85
85
|
continue;
|
|
86
86
|
}
|
|
87
|
-
throw new
|
|
87
|
+
throw new chunkENZ4B3I7_cjs.APIConnectionError({ method: method2, url });
|
|
88
88
|
} finally {
|
|
89
89
|
clearTimeout(timeoutId);
|
|
90
90
|
}
|
|
@@ -96,11 +96,11 @@ var APIClient = class {
|
|
|
96
96
|
try {
|
|
97
97
|
json = await response.json();
|
|
98
98
|
} catch {
|
|
99
|
-
throw new
|
|
99
|
+
throw new chunkENZ4B3I7_cjs.APIResponseValidationError({ status: response.status }, { method: method2, url });
|
|
100
100
|
}
|
|
101
101
|
const parsed = options.castTo.safeParse(json);
|
|
102
102
|
if (!parsed.success) {
|
|
103
|
-
throw new
|
|
103
|
+
throw new chunkENZ4B3I7_cjs.APIResponseValidationError({ status: response.status }, { method: method2, url });
|
|
104
104
|
}
|
|
105
105
|
return parsed.data;
|
|
106
106
|
}
|
|
@@ -115,14 +115,14 @@ var APIClient = class {
|
|
|
115
115
|
} catch {
|
|
116
116
|
body = null;
|
|
117
117
|
}
|
|
118
|
-
throw
|
|
118
|
+
throw chunkENZ4B3I7_cjs.makeStatusError(response.status, body, response.headers, { method: method2, url });
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
_shouldRetry(status) {
|
|
122
122
|
return status === 408 || status === 409 || status === 429 || status >= 500;
|
|
123
123
|
}
|
|
124
124
|
_retryDelay(retriesTaken) {
|
|
125
|
-
const delay = Math.min(
|
|
125
|
+
const delay = Math.min(chunkENZ4B3I7_cjs.INITIAL_RETRY_DELAY * 2 ** retriesTaken, chunkENZ4B3I7_cjs.MAX_RETRY_DELAY);
|
|
126
126
|
return delay * (1 + Math.random());
|
|
127
127
|
}
|
|
128
128
|
_sleep(ms) {
|
|
@@ -251,6 +251,36 @@ var CallControlResponseSchema = zod.z.object({
|
|
|
251
251
|
callId: zod.z.string(),
|
|
252
252
|
status: zod.z.string()
|
|
253
253
|
}).passthrough();
|
|
254
|
+
var TranscriptSegmentSchema = zod.z.object({
|
|
255
|
+
speaker: zod.z.enum(["CUSTOMER", "AGENT"]),
|
|
256
|
+
start: zod.z.number(),
|
|
257
|
+
end: zod.z.number(),
|
|
258
|
+
text: zod.z.string()
|
|
259
|
+
}).passthrough();
|
|
260
|
+
var TranscriptStatusSchema = zod.z.object({
|
|
261
|
+
status: zod.z.enum(["completed", "pending", "failed", "not_requested"]),
|
|
262
|
+
callId: zod.z.string().optional(),
|
|
263
|
+
segmentCount: zod.z.number().optional(),
|
|
264
|
+
segments: zod.z.array(TranscriptSegmentSchema).optional(),
|
|
265
|
+
startedAt: zod.z.string().optional(),
|
|
266
|
+
stage: zod.z.enum(["download", "runtime", "trigger"]).nullable().optional(),
|
|
267
|
+
error: zod.z.string().nullable().optional()
|
|
268
|
+
}).passthrough();
|
|
269
|
+
var TranscriptRequestAcceptedSchema = zod.z.object({
|
|
270
|
+
status: zod.z.literal("pending"),
|
|
271
|
+
callId: zod.z.string()
|
|
272
|
+
}).passthrough();
|
|
273
|
+
var SummaryStatusSchema = zod.z.object({
|
|
274
|
+
status: zod.z.enum(["completed", "pending", "failed", "not_requested"]),
|
|
275
|
+
callId: zod.z.string().optional(),
|
|
276
|
+
resultJson: zod.z.record(zod.z.string(), zod.z.unknown()).nullable().optional(),
|
|
277
|
+
provider: zod.z.string().nullable().optional(),
|
|
278
|
+
model: zod.z.string().nullable().optional(),
|
|
279
|
+
promptVersion: zod.z.string().nullable().optional(),
|
|
280
|
+
schemaVersion: zod.z.string().nullable().optional(),
|
|
281
|
+
failedReason: zod.z.string().nullable().optional(),
|
|
282
|
+
updatedAt: zod.z.string().optional()
|
|
283
|
+
}).passthrough();
|
|
254
284
|
|
|
255
285
|
// src/resources/calls.ts
|
|
256
286
|
var Calls = class extends APIResource {
|
|
@@ -314,6 +344,49 @@ var Calls = class extends APIResource {
|
|
|
314
344
|
...options
|
|
315
345
|
});
|
|
316
346
|
}
|
|
347
|
+
/**
|
|
348
|
+
* 통화 전사 상태 조회. 완료된 경우 segment 배열까지 한 번에 반환합니다.
|
|
349
|
+
*
|
|
350
|
+
* @throws NotFoundError (404) — 통화 없음
|
|
351
|
+
* @throws PermissionDeniedError (403) — accountId 불일치
|
|
352
|
+
*/
|
|
353
|
+
async getTranscript(callId, options = {}) {
|
|
354
|
+
return this._client._get(`${this._basePath}/calls/${callId}/transcript`, {
|
|
355
|
+
castTo: TranscriptStatusSchema,
|
|
356
|
+
...options
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
/**
|
|
360
|
+
* 특정 통화 1 건에 대해 전사를 명시 요청.
|
|
361
|
+
* 조직 설정 "통화 받아쓰기" 가 꺼져 있어도 해당 통화만 전사됩니다.
|
|
362
|
+
* 재실행 금지 — 이미 요청된 통화는 ConflictError(409) 발생.
|
|
363
|
+
* 시스템 레벨 트리거 실패(stage=trigger) 만 재시도 가능.
|
|
364
|
+
* 전사된 오디오 길이만큼 사용량 기반으로 과금됩니다.
|
|
365
|
+
*
|
|
366
|
+
* @throws BadRequestError (400) — 녹음 없음
|
|
367
|
+
* @throws NotFoundError (404) — 통화 없음
|
|
368
|
+
* @throws PermissionDeniedError (403) — accountId 불일치
|
|
369
|
+
* @throws ConflictError (409) — 이미 요청됨
|
|
370
|
+
*/
|
|
371
|
+
async requestTranscript(callId, options = {}) {
|
|
372
|
+
return this._client._post(`${this._basePath}/calls/${callId}/transcript`, {
|
|
373
|
+
castTo: TranscriptRequestAcceptedSchema,
|
|
374
|
+
...options
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* 통화 요약 상태 조회. transcript 가 완료된 통화에 대해 자동 생성된
|
|
379
|
+
* LLM 구조화 요약 결과를 반환합니다. completed 일 때 resultJson 채워짐.
|
|
380
|
+
*
|
|
381
|
+
* @throws NotFoundError (404) — 통화 없음
|
|
382
|
+
* @throws PermissionDeniedError (403) — accountId 불일치
|
|
383
|
+
*/
|
|
384
|
+
async getSummary(callId, options = {}) {
|
|
385
|
+
return this._client._get(`${this._basePath}/calls/${callId}/summary`, {
|
|
386
|
+
castTo: SummaryStatusSchema,
|
|
387
|
+
...options
|
|
388
|
+
});
|
|
389
|
+
}
|
|
317
390
|
};
|
|
318
391
|
var MessageSchema = zod.z.object({
|
|
319
392
|
messageId: zod.z.string(),
|
|
@@ -468,7 +541,7 @@ var AccountContext = class {
|
|
|
468
541
|
return new WebhookLogs(this._client, this._accountId);
|
|
469
542
|
}
|
|
470
543
|
};
|
|
471
|
-
var WebhookVerificationError = class extends
|
|
544
|
+
var WebhookVerificationError = class extends chunkENZ4B3I7_cjs.ClawOpsError {
|
|
472
545
|
constructor(message = "Webhook \uC11C\uBA85\uC774 \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.") {
|
|
473
546
|
super(message);
|
|
474
547
|
this.name = "WebhookVerificationError";
|
|
@@ -498,13 +571,13 @@ var ClawOps = class extends APIClient {
|
|
|
498
571
|
constructor(options = {}) {
|
|
499
572
|
let apiKey = options.apiKey ?? process.env.CLAWOPS_API_KEY;
|
|
500
573
|
if (!apiKey) {
|
|
501
|
-
throw new
|
|
574
|
+
throw new chunkENZ4B3I7_cjs.ClawOpsError("apiKey\uB97C \uC9C0\uC815\uD558\uAC70\uB098 CLAWOPS_API_KEY \uD658\uACBD\uBCC0\uC218\uB97C \uC124\uC815\uD558\uC138\uC694.");
|
|
502
575
|
}
|
|
503
576
|
let accountId = options.accountId ?? process.env.CLAWOPS_ACCOUNT_ID;
|
|
504
577
|
if (!accountId) {
|
|
505
|
-
throw new
|
|
578
|
+
throw new chunkENZ4B3I7_cjs.ClawOpsError("accountId\uB97C \uC9C0\uC815\uD558\uAC70\uB098 CLAWOPS_ACCOUNT_ID \uD658\uACBD\uBCC0\uC218\uB97C \uC124\uC815\uD558\uC138\uC694.");
|
|
506
579
|
}
|
|
507
|
-
const baseURL = options.baseURL ?? process.env.CLAWOPS_BASE_URL ??
|
|
580
|
+
const baseURL = options.baseURL ?? process.env.CLAWOPS_BASE_URL ?? chunkENZ4B3I7_cjs.DEFAULT_BASE_URL;
|
|
508
581
|
super({
|
|
509
582
|
apiKey,
|
|
510
583
|
baseURL,
|
|
@@ -540,75 +613,75 @@ var client_default_default = ClawOps;
|
|
|
540
613
|
|
|
541
614
|
Object.defineProperty(exports, "APIConnectionError", {
|
|
542
615
|
enumerable: true,
|
|
543
|
-
get: function () { return
|
|
616
|
+
get: function () { return chunkENZ4B3I7_cjs.APIConnectionError; }
|
|
544
617
|
});
|
|
545
618
|
Object.defineProperty(exports, "APIError", {
|
|
546
619
|
enumerable: true,
|
|
547
|
-
get: function () { return
|
|
620
|
+
get: function () { return chunkENZ4B3I7_cjs.APIError; }
|
|
548
621
|
});
|
|
549
622
|
Object.defineProperty(exports, "APIResponseValidationError", {
|
|
550
623
|
enumerable: true,
|
|
551
|
-
get: function () { return
|
|
624
|
+
get: function () { return chunkENZ4B3I7_cjs.APIResponseValidationError; }
|
|
552
625
|
});
|
|
553
626
|
Object.defineProperty(exports, "APIStatusError", {
|
|
554
627
|
enumerable: true,
|
|
555
|
-
get: function () { return
|
|
628
|
+
get: function () { return chunkENZ4B3I7_cjs.APIStatusError; }
|
|
556
629
|
});
|
|
557
630
|
Object.defineProperty(exports, "APITimeoutError", {
|
|
558
631
|
enumerable: true,
|
|
559
|
-
get: function () { return
|
|
632
|
+
get: function () { return chunkENZ4B3I7_cjs.APITimeoutError; }
|
|
560
633
|
});
|
|
561
634
|
Object.defineProperty(exports, "AgentConnectionError", {
|
|
562
635
|
enumerable: true,
|
|
563
|
-
get: function () { return
|
|
636
|
+
get: function () { return chunkENZ4B3I7_cjs.AgentConnectionError; }
|
|
564
637
|
});
|
|
565
638
|
Object.defineProperty(exports, "AgentError", {
|
|
566
639
|
enumerable: true,
|
|
567
|
-
get: function () { return
|
|
640
|
+
get: function () { return chunkENZ4B3I7_cjs.AgentError; }
|
|
568
641
|
});
|
|
569
642
|
Object.defineProperty(exports, "AuthenticationError", {
|
|
570
643
|
enumerable: true,
|
|
571
|
-
get: function () { return
|
|
644
|
+
get: function () { return chunkENZ4B3I7_cjs.AuthenticationError; }
|
|
572
645
|
});
|
|
573
646
|
Object.defineProperty(exports, "BadRequestError", {
|
|
574
647
|
enumerable: true,
|
|
575
|
-
get: function () { return
|
|
648
|
+
get: function () { return chunkENZ4B3I7_cjs.BadRequestError; }
|
|
576
649
|
});
|
|
577
650
|
Object.defineProperty(exports, "ClawOpsError", {
|
|
578
651
|
enumerable: true,
|
|
579
|
-
get: function () { return
|
|
652
|
+
get: function () { return chunkENZ4B3I7_cjs.ClawOpsError; }
|
|
580
653
|
});
|
|
581
654
|
Object.defineProperty(exports, "ConflictError", {
|
|
582
655
|
enumerable: true,
|
|
583
|
-
get: function () { return
|
|
656
|
+
get: function () { return chunkENZ4B3I7_cjs.ConflictError; }
|
|
584
657
|
});
|
|
585
658
|
Object.defineProperty(exports, "InternalServerError", {
|
|
586
659
|
enumerable: true,
|
|
587
|
-
get: function () { return
|
|
660
|
+
get: function () { return chunkENZ4B3I7_cjs.InternalServerError; }
|
|
588
661
|
});
|
|
589
662
|
Object.defineProperty(exports, "NotFoundError", {
|
|
590
663
|
enumerable: true,
|
|
591
|
-
get: function () { return
|
|
664
|
+
get: function () { return chunkENZ4B3I7_cjs.NotFoundError; }
|
|
592
665
|
});
|
|
593
666
|
Object.defineProperty(exports, "PermissionDeniedError", {
|
|
594
667
|
enumerable: true,
|
|
595
|
-
get: function () { return
|
|
668
|
+
get: function () { return chunkENZ4B3I7_cjs.PermissionDeniedError; }
|
|
596
669
|
});
|
|
597
670
|
Object.defineProperty(exports, "RateLimitError", {
|
|
598
671
|
enumerable: true,
|
|
599
|
-
get: function () { return
|
|
672
|
+
get: function () { return chunkENZ4B3I7_cjs.RateLimitError; }
|
|
600
673
|
});
|
|
601
674
|
Object.defineProperty(exports, "ServiceUnavailableError", {
|
|
602
675
|
enumerable: true,
|
|
603
|
-
get: function () { return
|
|
676
|
+
get: function () { return chunkENZ4B3I7_cjs.ServiceUnavailableError; }
|
|
604
677
|
});
|
|
605
678
|
Object.defineProperty(exports, "UnprocessableEntityError", {
|
|
606
679
|
enumerable: true,
|
|
607
|
-
get: function () { return
|
|
680
|
+
get: function () { return chunkENZ4B3I7_cjs.UnprocessableEntityError; }
|
|
608
681
|
});
|
|
609
682
|
Object.defineProperty(exports, "VERSION", {
|
|
610
683
|
enumerable: true,
|
|
611
|
-
get: function () { return
|
|
684
|
+
get: function () { return chunkENZ4B3I7_cjs.VERSION; }
|
|
612
685
|
});
|
|
613
686
|
exports.APIClient = APIClient;
|
|
614
687
|
exports.AccountContext = AccountContext;
|