apick-api 3.6.2 → 3.7.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/CHANGELOG.md +8 -0
- package/README.md +6 -0
- package/docs/guide.en.md +5 -1
- package/docs/guide.ko.md +5 -1
- package/package.json +1 -1
- package/src/index.cjs +8 -0
- package/src/index.d.ts +15 -1
- package/src/index.js +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.7.0 — 2026-10-02
|
|
4
|
+
|
|
5
|
+
- `searchSkills()` 에 `sort` 를 추가했습니다: `recommended`(추천)·`popular`(인기)·`used`(많이 사용)·`likes`(좋아요순)·`rating`(평점순)·`new`(최신)·`mine`(내 계정이 많이 실행한 Skill)·`liked`(내 계정이 좋아요한 Skill). 생략하면 예전처럼 등록 순서입니다. 지원하지 않는 값은 요청 전에 `RangeError` 가 발생합니다. `SKILL_SORTS` 상수와 `SkillSort` 타입을 공개했습니다.
|
|
6
|
+
- Add `sort` to `searchSkills()`: `recommended`, `popular`, `used`, `likes`, `rating`, `new`, `mine` and `liked` (the last two are scoped to the API key's account). Omitting it keeps registration order. Unsupported values throw a `RangeError` before the request is sent. Export `SKILL_SORTS` and the `SkillSort` type.
|
|
7
|
+
- 검색·상세 응답 타입(`SkillSummary`·`SkillDetail`)에 `usage_label`(사용 건수 구간: `1,000회 미만`, `1,000+`, `1만+` …)·`like_count`·`review_count`·`rating_average` 를 추가했습니다. 검색어는 Skill 의 이름·요약·설명과 판매자 이름에서 찾습니다.
|
|
8
|
+
- Add `usage_label` (a usage tier, not an exact count), `like_count`, `review_count` and `rating_average` to the search and detail response types (`SkillSummary`, `SkillDetail`). The search query now matches a Skill's name, summary, description and seller name.
|
|
9
|
+
- 기존 메서드와 요청·응답 형식은 그대로입니다. / Existing methods and request/response formats are unchanged.
|
|
10
|
+
|
|
3
11
|
## 3.6.2 — 2026-10-02
|
|
4
12
|
|
|
5
13
|
- `TTS_VOICE_IDS`를 현재 지원하는 14개로 갱신했습니다. 제공이 종료된 `v2_ann_f_30s_01`, `v2_f_teen_01`을 상수·타입·문서에서 제거했으며, 이 값을 `voiceId`로 넘기면 요청 전에 `RangeError`가 발생합니다.
|
package/README.md
CHANGED
|
@@ -130,6 +130,12 @@ while (!['succeeded', 'failed', 'timed_out', 'cancelled'].includes(run.status))
|
|
|
130
130
|
console.log(run.status, run.billing, run.result);
|
|
131
131
|
```
|
|
132
132
|
|
|
133
|
+
`searchSkills({ sort })` 로 추천(`recommended`)·인기(`popular`)·많이 사용(`used`)·좋아요순(`likes`)·평점순(`rating`)·최신(`new`) 순서를 고르고, 검색·상세 응답의 `usage_label`(사용 건수 구간)·`like_count`·`review_count`·`rating_average` 로 Skill 을 비교할 수 있습니다.
|
|
134
|
+
Pick an order with `searchSkills({ sort })` (`recommended`, `popular`, `used`, `likes`, `rating`, `new`) and compare Skills with `usage_label` (a usage tier), `like_count`, `review_count` and `rating_average` in search and detail responses.
|
|
135
|
+
|
|
136
|
+
`searchSkills({ sort })` 로 추천(`recommended`)·인기(`popular`)·많이 사용(`used`)·좋아요순(`likes`)·평점순(`rating`)·최신(`new`) 순서를 고르고, 검색·상세 응답의 `usage_label`(사용 건수 구간)·`like_count`·`review_count`·`rating_average` 로 Skill 을 비교할 수 있습니다.
|
|
137
|
+
Pick an order with `searchSkills({ sort })` (`recommended`, `popular`, `used`, `likes`, `rating`, `new`) and compare Skills with `usage_label` (a usage tier), `like_count`, `review_count` and `rating_average` in search and detail responses.
|
|
138
|
+
|
|
133
139
|
Skills 응답은 다른 API 와 달리 봉투 없이 그대로 `data` 에 담깁니다. 과금 상태는 `data.billing`(`reserved`·`captured`·`released`…)에서 확인하며 `meta.cost` 는 채워지지 않습니다. 응답을 받지 못했을 때는 **같은 `idempotencyKey`** 로 다시 호출하세요. 포인트는 한 번만 차감됩니다. 같은 키에 다른 입력을 보내면 `IDEMPOTENCY_CONFLICT` 로 거부됩니다.
|
|
134
140
|
Skills responses are returned as-is in `data`. Read the charge from `data.billing`; `meta.cost` is not populated. If a response is lost, call again with the **same `idempotencyKey`** — points are charged once. The same key with a different input is rejected with `IDEMPOTENCY_CONFLICT`.
|
|
135
141
|
|
package/docs/guide.en.md
CHANGED
|
@@ -300,7 +300,7 @@ console.log(run.status, run.billing, run.result);
|
|
|
300
300
|
|
|
301
301
|
| Method | Description |
|
|
302
302
|
| --- | --- |
|
|
303
|
-
| `searchSkills({ query, category, cursor, limit })` | Search. `limit` 1-20; `category` is one of `SKILL_CATEGORIES` |
|
|
303
|
+
| `searchSkills({ query, category, sort, cursor, limit })` | Search. `limit` 1-20; `category` is one of `SKILL_CATEGORIES`, `sort` one of `SKILL_SORTS` |
|
|
304
304
|
| `getSkill(skillId)` | Input and output formats, price, limits, examples |
|
|
305
305
|
| `quoteSkill(skillId, input, { version })` | Validates the input and reports the points to be charged. Does not run |
|
|
306
306
|
| `runSkill(skillId, input, { idempotencyKey, quoteId, maxCostPoints, version, waitSeconds })` | Run. `idempotencyKey` is required; `waitSeconds` 0-20 (default 20) |
|
|
@@ -308,6 +308,10 @@ console.log(run.status, run.billing, run.result);
|
|
|
308
308
|
| `cancelSkillRun(runId)` | Cancel an unfinished run. Cancelled runs are not charged |
|
|
309
309
|
| `skillUsage({ cursor, limit })` | Your runs. `limit` 1-50 |
|
|
310
310
|
|
|
311
|
+
- `sort` is one of `recommended`, `popular`, `used` (most run), `likes`, `rating`, `new`, `mine` (Skills your account runs most) and `liked` (Skills your account liked). Omit it for registration order.
|
|
312
|
+
- Search and detail responses include `usage_label` (a usage tier such as `1,000회 미만` (under 1,000), `1,000+`, `1만+` (10,000+), not an exact count), `like_count`, `review_count` and `rating_average` (1-5, `null` without reviews). Likes and reviews are left on the Skill page of the APICK website.
|
|
313
|
+
- `sort` is one of `recommended`, `popular`, `used` (most run), `likes`, `rating`, `new`, `mine` (Skills your account runs most) and `liked` (Skills your account liked). Omit it for registration order.
|
|
314
|
+
- Search and detail responses include `usage_label` (a usage tier such as `1,000회 미만` (under 1,000), `1,000+`, `1만+` (10,000+), not an exact count), `like_count`, `review_count` and `rating_average` (1-5, `null` without reviews). Likes and reviews are left on the Skill page of the APICK website.
|
|
311
315
|
- Skills responses are returned as-is in `data`. Read the charge from `data.billing.status` (`reserved`, `captured`, `released`, `partially_refunded`, `refunded`); `meta.cost` is not populated.
|
|
312
316
|
- If a run does not finish within 20 seconds it comes back as `queued` or `running`; poll `getSkillRun`.
|
|
313
317
|
- If a response is lost, call again with the same `idempotencyKey`. Points are charged once. The same key with a different input is rejected with `IDEMPOTENCY_CONFLICT`.
|
package/docs/guide.ko.md
CHANGED
|
@@ -302,7 +302,7 @@ console.log(run.status, run.billing, run.result);
|
|
|
302
302
|
|
|
303
303
|
| 메서드 | 설명 |
|
|
304
304
|
| --- | --- |
|
|
305
|
-
| `searchSkills({ query, category, cursor, limit })` | 검색. `limit` 1~20, `category` 는 `SKILL_CATEGORIES` 중 하나 |
|
|
305
|
+
| `searchSkills({ query, category, sort, cursor, limit })` | 검색. `limit` 1~20, `category` 는 `SKILL_CATEGORIES`, `sort` 는 `SKILL_SORTS` 중 하나 |
|
|
306
306
|
| `getSkill(skillId)` | 입력·결과 형식, 가격, 처리 상한, 예제 |
|
|
307
307
|
| `quoteSkill(skillId, input, { version })` | 입력 검사와 차감될 포인트 확인. 실행하지 않습니다 |
|
|
308
308
|
| `runSkill(skillId, input, { idempotencyKey, quoteId, maxCostPoints, version, waitSeconds })` | 실행. `idempotencyKey` 필수, `waitSeconds` 0~20(기본 20) |
|
|
@@ -310,6 +310,10 @@ console.log(run.status, run.billing, run.result);
|
|
|
310
310
|
| `cancelSkillRun(runId)` | 끝나지 않은 실행 취소. 취소된 실행은 차감되지 않습니다 |
|
|
311
311
|
| `skillUsage({ cursor, limit })` | 내 실행 내역. `limit` 1~50 |
|
|
312
312
|
|
|
313
|
+
- `sort` 는 `recommended`(추천)·`popular`(인기)·`used`(많이 사용)·`likes`(좋아요순)·`rating`(평점순)·`new`(최신)·`mine`(내 계정이 많이 실행한 Skill)·`liked`(내 계정이 좋아요한 Skill) 가운데 하나입니다. 생략하면 등록 순서입니다.
|
|
314
|
+
- 검색·상세 응답에는 고를 때 참고하는 `usage_label`(사용 건수 구간: `1,000회 미만`, `1,000+`, `1만+` …), `like_count`, `review_count`, `rating_average`(1~5, 리뷰가 없으면 `null`)가 있습니다. 좋아요와 리뷰는 에이픽 웹의 Skill 화면에서 남깁니다.
|
|
315
|
+
- `sort` 는 `recommended`(추천)·`popular`(인기)·`used`(많이 사용)·`likes`(좋아요순)·`rating`(평점순)·`new`(최신)·`mine`(내 계정이 많이 실행한 Skill)·`liked`(내 계정이 좋아요한 Skill) 가운데 하나입니다. 생략하면 등록 순서입니다.
|
|
316
|
+
- 검색·상세 응답에는 고를 때 참고하는 `usage_label`(사용 건수 구간: `1,000회 미만`, `1,000+`, `1만+` …), `like_count`, `review_count`, `rating_average`(1~5, 리뷰가 없으면 `null`)가 있습니다. 좋아요와 리뷰는 에이픽 웹의 Skill 화면에서 남깁니다.
|
|
313
317
|
- Skills 응답은 봉투 없이 `data` 에 그대로 담기며, 과금 상태는 `data.billing.status`(`reserved`·`captured`·`released`·`partially_refunded`·`refunded`)로 확인합니다. `meta.cost` 는 채워지지 않습니다.
|
|
314
318
|
- 20초 안에 끝나지 않으면 `status` 가 `queued`·`running` 인 채로 돌아오므로 `getSkillRun` 으로 확인하세요.
|
|
315
319
|
- 응답을 받지 못했을 때는 같은 `idempotencyKey` 로 다시 호출하세요. 포인트는 한 번만 차감됩니다. 같은 키에 다른 입력을 보내면 `IDEMPOTENCY_CONFLICT` 입니다.
|
package/package.json
CHANGED
package/src/index.cjs
CHANGED
|
@@ -177,6 +177,8 @@ function dataRequestInput(input) {
|
|
|
177
177
|
|
|
178
178
|
const SKILL_CATEGORIES = Object.freeze(['data', 'ai', 'dev', 'document', 'marketing', 'finance', 'productivity', 'video', 'etc']);
|
|
179
179
|
const SKILL_CATEGORY_SET = new Set(SKILL_CATEGORIES);
|
|
180
|
+
const SKILL_SORTS = Object.freeze(['recommended', 'popular', 'used', 'likes', 'rating', 'new', 'mine', 'liked']);
|
|
181
|
+
const SKILL_SORT_SET = new Set(SKILL_SORTS);
|
|
180
182
|
|
|
181
183
|
function normalizeSkillId(value) {
|
|
182
184
|
return encodeURIComponent(requiredString('skillId', value, 80));
|
|
@@ -935,6 +937,11 @@ class ApickClient {
|
|
|
935
937
|
if (!SKILL_CATEGORY_SET.has(category)) throw new RangeError('category must be one of the supported Skill categories.');
|
|
936
938
|
query.category = category;
|
|
937
939
|
}
|
|
940
|
+
if (config.sort !== undefined && config.sort !== null && config.sort !== '') {
|
|
941
|
+
const sort = requiredString('sort', config.sort);
|
|
942
|
+
if (!SKILL_SORT_SET.has(sort)) throw new RangeError('sort must be one of the supported Skill sort orders.');
|
|
943
|
+
query.sort = sort;
|
|
944
|
+
}
|
|
938
945
|
if (config.cursor !== undefined && config.cursor !== null && config.cursor !== '') query.cursor = requiredString('cursor', String(config.cursor), 20);
|
|
939
946
|
const limit = optionalRangeInteger('limit', config.limit, 1, 20);
|
|
940
947
|
if (limit !== undefined) query.limit = String(limit);
|
|
@@ -1001,5 +1008,6 @@ module.exports = {
|
|
|
1001
1008
|
TTS_VOICE_IDS,
|
|
1002
1009
|
AUTH_PROVIDERS,
|
|
1003
1010
|
SKILL_CATEGORIES,
|
|
1011
|
+
SKILL_SORTS,
|
|
1004
1012
|
DEFAULT_BASE_URL
|
|
1005
1013
|
};
|
package/src/index.d.ts
CHANGED
|
@@ -335,6 +335,9 @@ export class ApickClient {
|
|
|
335
335
|
|
|
336
336
|
export const SKILL_CATEGORIES: readonly ['data', 'ai', 'dev', 'document', 'marketing', 'finance', 'productivity', 'video', 'etc'];
|
|
337
337
|
export type SkillCategory = typeof SKILL_CATEGORIES[number];
|
|
338
|
+
/** 검색 순서. 생략하면 등록 순서 / search order; registration order when omitted */
|
|
339
|
+
export const SKILL_SORTS: readonly ['recommended', 'popular', 'used', 'likes', 'rating', 'new', 'mine', 'liked'];
|
|
340
|
+
export type SkillSort = typeof SKILL_SORTS[number];
|
|
338
341
|
export type SkillRunStatus = 'queued' | 'running' | 'completing' | 'succeeded' | 'failed' | 'timed_out' | 'cancelled';
|
|
339
342
|
export type SkillBillingStatus = 'reserved' | 'captured' | 'released' | 'partially_refunded' | 'refunded';
|
|
340
343
|
export type SkillFailureCode = 'EXECUTION_FAILED' | 'OUTPUT_INVALID' | 'TIMED_OUT' | 'CANCELLED' | 'UPSTREAM_UNAVAILABLE';
|
|
@@ -344,7 +347,12 @@ export type SkillErrorCode =
|
|
|
344
347
|
| 'IDEMPOTENCY_KEY_REQUIRED' | 'IDEMPOTENCY_CONFLICT' | 'QUOTE_EXPIRED' | 'VERSION_UNAVAILABLE'
|
|
345
348
|
| 'PRICE_EXCEEDS_LIMIT' | 'RUN_NOT_CANCELLABLE' | 'RESULT_NOT_READY' | 'RESULT_EXPIRED'
|
|
346
349
|
| 'INSUFFICIENT_POINTS' | 'RATE_LIMITED' | 'BUDGET_EXCEEDED' | 'TEMPORARILY_UNAVAILABLE';
|
|
347
|
-
export interface SkillSearchOptions {
|
|
350
|
+
export interface SkillSearchOptions {
|
|
351
|
+
query?: string; category?: SkillCategory;
|
|
352
|
+
/** `mine`·`liked` 는 인증키의 계정 기준 / `mine` and `liked` are scoped to the API key's account */
|
|
353
|
+
sort?: SkillSort;
|
|
354
|
+
cursor?: string; limit?: number;
|
|
355
|
+
}
|
|
348
356
|
export interface SkillRunOptions {
|
|
349
357
|
/** 이 실행을 구분하는 고유 값. 재시도할 때 같은 값을 씁니다. 영문·숫자와 `. _ : -` 1~128자 */
|
|
350
358
|
idempotencyKey: string;
|
|
@@ -367,6 +375,12 @@ export interface SkillSummary {
|
|
|
367
375
|
/** true 면 실행마다 실제 사용량만큼 금액이 달라집니다 / amount varies per run with actual usage */
|
|
368
376
|
usage_priced: boolean;
|
|
369
377
|
seller: { name: string }; uses_generative_ai: boolean;
|
|
378
|
+
/** 사용 건수 구간. 예: `1,000회 미만`, `1,000+`, `1만+` / usage tier label, not an exact count */
|
|
379
|
+
usage_label: string;
|
|
380
|
+
like_count: number;
|
|
381
|
+
review_count: number;
|
|
382
|
+
/** 평점(1~5, 소수 첫째 자리). 리뷰가 없으면 null / average rating, null without reviews */
|
|
383
|
+
rating_average: number | null;
|
|
370
384
|
}
|
|
371
385
|
export interface SkillDetail extends SkillSummary {
|
|
372
386
|
description: string; billing_rule: 'validated_result'; limits: SkillLimits;
|