apick-api 3.2.0 → 3.4.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 +97 -77
- package/README.md +351 -299
- package/docs/guide.en.md +235 -206
- package/docs/guide.ko.md +243 -214
- package/examples/basic.mjs +10 -10
- package/examples/commonjs.cjs +12 -12
- package/examples/files.mjs +9 -9
- package/package.json +71 -71
- package/src/form.cjs +28 -0
- package/src/index.cjs +805 -694
- package/src/index.d.ts +298 -176
- package/src/index.js +1 -0
package/src/index.d.ts
CHANGED
|
@@ -1,176 +1,298 @@
|
|
|
1
|
-
export interface ApickClientOptions {
|
|
2
|
-
apiKey: string;
|
|
3
|
-
baseUrl?: string;
|
|
4
|
-
timeoutMs?: number;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
readonly
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
readonly
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
readonly
|
|
21
|
-
readonly
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
export type
|
|
32
|
-
export type
|
|
33
|
-
export type
|
|
34
|
-
export type
|
|
35
|
-
export
|
|
36
|
-
export interface
|
|
37
|
-
export interface
|
|
38
|
-
export interface
|
|
39
|
-
export interface
|
|
40
|
-
export interface
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
'
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
export
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
export
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
export
|
|
157
|
-
|
|
158
|
-
export
|
|
159
|
-
export interface
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
1
|
+
export interface ApickClientOptions {
|
|
2
|
+
apiKey: string;
|
|
3
|
+
baseUrl?: string;
|
|
4
|
+
timeoutMs?: number;
|
|
5
|
+
/** Requests with a body use native FormData; GET requests have no body. */
|
|
6
|
+
fetch?: typeof fetch;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface ApickMeta {
|
|
10
|
+
readonly cost: number | null;
|
|
11
|
+
readonly durationMs: number | null;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface ApickResult<T = Record<string, unknown>> {
|
|
15
|
+
readonly data: T;
|
|
16
|
+
readonly meta: ApickMeta;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface BinaryInput {
|
|
20
|
+
readonly size?: number;
|
|
21
|
+
readonly type?: string;
|
|
22
|
+
readonly name?: string;
|
|
23
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface OcrOptions {
|
|
27
|
+
filename?: string;
|
|
28
|
+
contentType?: 'image/png' | 'image/jpeg';
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export type ImageAiFormat = 'png' | 'jpeg' | 'webp';
|
|
32
|
+
export type ImageAiBackground = 'auto' | 'opaque' | 'transparent';
|
|
33
|
+
export type ImageAiSize = '1024x1024' | '1536x1024' | '1024x1536' | '1152x864' | '864x1152';
|
|
34
|
+
export type ImageAiStatus = 'waiting' | 'processing' | 'completed' | 'completed_partial' | 'failed';
|
|
35
|
+
export type ApickImageErrorCode = `APICK_IMAGE_${string}`;
|
|
36
|
+
export interface ImageAiOptions { imageCount?: number; size?: ImageAiSize; outputFormat?: ImageAiFormat; background?: ImageAiBackground; idempotencyKey?: string; }
|
|
37
|
+
export interface ImageAiGenerateOptions extends ImageAiOptions { referenceImage?: string|BinaryInput|ArrayBuffer|ArrayBufferView; referenceFilename?: string; referenceContentType?: 'image/png'|'image/jpeg'|'image/webp'; }
|
|
38
|
+
export interface ImageAiEditOptions extends ImageAiOptions { filename?: string; contentType?: 'image/png'|'image/jpeg'|'image/webp'; }
|
|
39
|
+
export interface ImageAiResultImage { index:number; b64_json:string; mime_type:'image/png'|'image/jpeg'|'image/webp'; width:number; height:number; }
|
|
40
|
+
export interface ImageAiResultData { request_id:string; image_count:number; images:ImageAiResultImage[]; idempotent_replay?:boolean; }
|
|
41
|
+
export interface ImageAiJobData { job_id:string; status:ImageAiStatus; requested_count:number; completed_count?:number; failed_count?:number; prepaid_point?:number; charged_point?:number; refunded_point?:number; result_available?:boolean; expires_at?:string|null; error_code?:ApickImageErrorCode|null; }
|
|
42
|
+
|
|
43
|
+
export interface MaskResidentNumberOptions extends OcrOptions {
|
|
44
|
+
type: 1 | 2 | 3 | 4;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export const AUTH_PROVIDERS: readonly [
|
|
48
|
+
'kakao', 'naver', 'toss', 'pass', 'samsung', 'kb', 'shinhan', 'hana', 'woori', 'ibk', 'nh', 'kakaobank', 'banksalad'
|
|
49
|
+
];
|
|
50
|
+
export type AuthProvider = typeof AUTH_PROVIDERS[number];
|
|
51
|
+
|
|
52
|
+
/** 간편인증 기반 조회 상품(재직·소득·연금·면허·건강검진 등)의 공통 입력. */
|
|
53
|
+
export interface DataRequestInput {
|
|
54
|
+
name: string;
|
|
55
|
+
birthDate: string;
|
|
56
|
+
phone: string;
|
|
57
|
+
authProvider: AuthProvider;
|
|
58
|
+
}
|
|
59
|
+
export interface RequestEmploymentInput extends DataRequestInput { insuranceYears?: number; }
|
|
60
|
+
export interface RequestPersonalIncomeInput extends DataRequestInput { incomeYears?: number; }
|
|
61
|
+
export interface RequestNpsJoinHistoryInput extends DataRequestInput { from?: string; to?: string; }
|
|
62
|
+
export interface RequestDrivingLicenseInput extends DataRequestInput {}
|
|
63
|
+
export interface RequestHealthCheckupInput extends DataRequestInput {}
|
|
64
|
+
|
|
65
|
+
export type DataRequestStatus =
|
|
66
|
+
| 'AUTH_REQUESTED' | 'AUTH_WAITING' | 'AUTH_COMPLETED' | 'AUTH_REJECTED' | 'AUTH_EXPIRED'
|
|
67
|
+
| 'COLLECTING' | 'COLLECTED' | 'PARTIAL_SUCCESS' | 'SUCCESS' | 'FAILED';
|
|
68
|
+
export type DataRequestErrorCode = 'RESULT_EXPIRED' | 'AUTH_EXPIRED' | 'AUTH_REJECTED' | 'COLLECT_FAILED';
|
|
69
|
+
export interface DataRequestSource { source: string; type: string; status: string; }
|
|
70
|
+
|
|
71
|
+
/** `request*()` (POST /rest/req_*) 응답의 `data`. */
|
|
72
|
+
export interface DataRequestAcceptedData {
|
|
73
|
+
schemaVersion: string;
|
|
74
|
+
transactionId: string;
|
|
75
|
+
product: string;
|
|
76
|
+
status: DataRequestStatus;
|
|
77
|
+
resultAvailable: boolean;
|
|
78
|
+
charged: boolean;
|
|
79
|
+
sources: DataRequestSource[];
|
|
80
|
+
message: string;
|
|
81
|
+
expiresAt: string;
|
|
82
|
+
success: number;
|
|
83
|
+
approvals?: number;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/** `get*()` (POST /rest/get_*) 응답의 `data`. `result`는 결과가 있을 때만 온다. */
|
|
87
|
+
export interface DataRequestResult<T> {
|
|
88
|
+
schemaVersion: string;
|
|
89
|
+
transactionId: string;
|
|
90
|
+
product: string;
|
|
91
|
+
status: DataRequestStatus;
|
|
92
|
+
resultAvailable: boolean;
|
|
93
|
+
charged: boolean;
|
|
94
|
+
sources: DataRequestSource[];
|
|
95
|
+
message: string;
|
|
96
|
+
expiresAt?: string;
|
|
97
|
+
success: number;
|
|
98
|
+
progress?: { total: number; completed: number };
|
|
99
|
+
checkedAt?: string;
|
|
100
|
+
resultExpiresAt?: string;
|
|
101
|
+
result?: T;
|
|
102
|
+
errorCode?: DataRequestErrorCode;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export interface EmploymentHistoryEntry { 사업장: string; 취득일: string; 상실일: string; 자격구분: string; }
|
|
106
|
+
export interface EmploymentPremiumEntry {
|
|
107
|
+
사업장: string; 고지년월: string; 보수월액: number;
|
|
108
|
+
'건강보험 산정보험료': number; '건강보험 정산보험료': number; '건강보험 고지보험료': number; '건강보험 연말정산보험료': number;
|
|
109
|
+
'장기요양 산정보험료': number; '장기요양 정산보험료': number; '장기요양 고지보험료': number; '장기요양 연말정산보험료': number;
|
|
110
|
+
가입자부담금: number;
|
|
111
|
+
}
|
|
112
|
+
export interface EmploymentInfo {
|
|
113
|
+
재직상태: 'EMPLOYED' | 'UNEMPLOYED' | 'UNKNOWN';
|
|
114
|
+
현재사업장?: string;
|
|
115
|
+
취득일?: string;
|
|
116
|
+
이력: EmploymentHistoryEntry[];
|
|
117
|
+
보험료연도: string[];
|
|
118
|
+
보험료: EmploymentPremiumEntry[];
|
|
119
|
+
}
|
|
120
|
+
export interface EmploymentResultPayload { employment: EmploymentInfo; }
|
|
121
|
+
|
|
122
|
+
export interface PersonalIncomeAmount { 건수: number; 소득금액: number; 소득세: number; 지방소득세: number; 농어촌특별세: number; 세액합계: number; }
|
|
123
|
+
export interface PersonalIncomeYear {
|
|
124
|
+
귀속연도: string;
|
|
125
|
+
소득종류별: { 이자소득?: PersonalIncomeAmount; 배당소득?: PersonalIncomeAmount };
|
|
126
|
+
합계: PersonalIncomeAmount;
|
|
127
|
+
}
|
|
128
|
+
export interface PersonalIncomeInfo { 조회연도: string[]; 연도별: PersonalIncomeYear[]; }
|
|
129
|
+
export interface PersonalIncomeResultPayload { personalIncome: PersonalIncomeInfo; }
|
|
130
|
+
|
|
131
|
+
export interface NpsJoinHistoryEntry {
|
|
132
|
+
시작: string; 종료: string; 기준소득월액: number;
|
|
133
|
+
납부개월: number; 납부금액: number; 미납개월: number; 미납금액: number;
|
|
134
|
+
가입자구분: string; 사업장: string;
|
|
135
|
+
}
|
|
136
|
+
export interface NpsJoinHistoryInfo {
|
|
137
|
+
조회기간: { 시작: string; 종료: string };
|
|
138
|
+
합계: { 납부개월: number; 납부금액: number; 미납개월: number; 미납금액: number };
|
|
139
|
+
가입내역: NpsJoinHistoryEntry[];
|
|
140
|
+
}
|
|
141
|
+
export interface NpsJoinHistoryResultPayload { npsJoinHistory: NpsJoinHistoryInfo; }
|
|
142
|
+
|
|
143
|
+
export interface DrivingLicenseAcquisition {
|
|
144
|
+
면허종류코드: string; 발급일자: string; 합격일자: string; 발급지역: string; 발급일련번호: string;
|
|
145
|
+
학원명: string; 졸업일자: string; 공고시험장: string; 등록일자: string; 면허조건: string;
|
|
146
|
+
}
|
|
147
|
+
export interface DrivingLicenseInfo {
|
|
148
|
+
이름?: string; 주소?: string; 면허번호?: string; 관할경찰서?: string; 국적?: string; 면허상태?: string;
|
|
149
|
+
취소일자?: string; 적성검사일자?: string; 적성검사기관?: string; 적성검사유효기간?: string;
|
|
150
|
+
적성검사시작?: string; 적성검사종료?: string; 정지기간?: string; 정지사유?: string;
|
|
151
|
+
재교부일자?: string; 재교부사유?: string;
|
|
152
|
+
subList?: unknown[];
|
|
153
|
+
취득이력?: DrivingLicenseAcquisition[];
|
|
154
|
+
조회결과?: string;
|
|
155
|
+
}
|
|
156
|
+
export interface DrivingLicenseResultPayload { drivingLicense: DrivingLicenseInfo; }
|
|
157
|
+
|
|
158
|
+
export interface HealthCheckupEntry { 검진연도: string; 검진종류: string; 검진일자: string; 검진기관: string; }
|
|
159
|
+
export interface HealthCheckupInfo { 이름: string; 건수: number; 검진내역: HealthCheckupEntry[]; }
|
|
160
|
+
export interface HealthCheckupResultPayload { healthCheckup: HealthCheckupInfo; }
|
|
161
|
+
|
|
162
|
+
export const TTS_VOICE_IDS: readonly [
|
|
163
|
+
'v2_ann_m_30s_01', 'v2_ann_m_30s_02', 'v2_ann_m_30s_04', 'v2_ann_m_30s_05', 'v2_ann_f_30s_01', 'v2_ann_f_30s_02', 'v2_ann_f_30s_03', 'v2_ann_f_30s_04', 'v2_ann_f_30s_05', 'v2_m_teen_01', 'v2_m_young_01', 'v2_m_mid_01', 'v2_m_senior_01', 'v2_f_teen_01', 'v2_f_young_01', 'v2_f_senior_01'
|
|
164
|
+
];
|
|
165
|
+
export type TtsVoiceId = typeof TTS_VOICE_IDS[number];
|
|
166
|
+
|
|
167
|
+
export interface TtsJobData {
|
|
168
|
+
job_id: string;
|
|
169
|
+
status: 'waiting' | 'processing' | 'completed' | 'cancelled' | 'failed';
|
|
170
|
+
voice_id?: TtsVoiceId;
|
|
171
|
+
character_count?: number;
|
|
172
|
+
result_available?: boolean;
|
|
173
|
+
subtitles_available?: boolean;
|
|
174
|
+
resume_revision?: number;
|
|
175
|
+
operation_revision?: number;
|
|
176
|
+
quality?: TtsQualityData | null;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export interface TtsQualityData {
|
|
180
|
+
job_id?: string;
|
|
181
|
+
resume_revision?: number;
|
|
182
|
+
phase?: string;
|
|
183
|
+
accepted_utterances?: number;
|
|
184
|
+
failed_utterances?: number;
|
|
185
|
+
total_utterances?: number;
|
|
186
|
+
utterances?: Array<{ id: string; status: string; attempt?: number; reasons?: string[];
|
|
187
|
+
speech_rate?: { chars: number; duration_sec: number; cps: number; expected_sec: number; duration_ratio: number | null; status: string } }>;
|
|
188
|
+
candidates?: Array<{ candidate_id: string; utterance_id: string; status: string; attempt: number; audio_available?: boolean }>;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export class ApickApiError extends Error {
|
|
192
|
+
readonly status: number;
|
|
193
|
+
readonly code: string;
|
|
194
|
+
readonly serviceCode?: string;
|
|
195
|
+
toJSON(): {
|
|
196
|
+
name: string;
|
|
197
|
+
message: string;
|
|
198
|
+
status: number;
|
|
199
|
+
code: string;
|
|
200
|
+
serviceCode?: string;
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
export class ApickBinaryResult {
|
|
205
|
+
readonly bytes: Uint8Array;
|
|
206
|
+
readonly contentType: string;
|
|
207
|
+
readonly filename: string;
|
|
208
|
+
readonly meta: ApickMeta;
|
|
209
|
+
readonly size: number;
|
|
210
|
+
toArrayBuffer(): ArrayBuffer;
|
|
211
|
+
toBlob(): Blob;
|
|
212
|
+
save(filePath: string): Promise<string>;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
export const DEFAULT_BASE_URL: 'https://apick.app';
|
|
216
|
+
|
|
217
|
+
export const SERVICES: Readonly<Record<string, Readonly<{
|
|
218
|
+
endpoint: string;
|
|
219
|
+
output: 'json' | 'binary';
|
|
220
|
+
}>>>;
|
|
221
|
+
|
|
222
|
+
export class ApickClient {
|
|
223
|
+
createVideoJob(model: VideoModel, prompt: string, options?: VideoJobOptions): Promise<ApickResult<VideoJobData>>;
|
|
224
|
+
getVideoJob(model: VideoModel, jobId: string): Promise<ApickResult<VideoJobData>>;
|
|
225
|
+
downloadVideoResult(model: VideoModel, jobId: string): Promise<ApickBinaryResult>;
|
|
226
|
+
constructor(apiKeyOrOptions: string | ApickClientOptions);
|
|
227
|
+
businessDetails(businessNumber: string): Promise<ApickResult>;
|
|
228
|
+
ventureBusiness(businessNumber: string): Promise<ApickResult>;
|
|
229
|
+
trackParcel(carrier: string, trackingNumber: string): Promise<ApickResult>;
|
|
230
|
+
trackParcelAuto(trackingNumber: string): Promise<ApickResult>;
|
|
231
|
+
validateEmail(email: string): Promise<ApickResult>;
|
|
232
|
+
validatePhone(number: string): Promise<ApickResult>;
|
|
233
|
+
holidays(year: number | string, month: number | string): Promise<ApickResult>;
|
|
234
|
+
searchAddress(query: string, options?: { page?: number }): Promise<ApickResult>;
|
|
235
|
+
ocr(image: string | BinaryInput | ArrayBuffer | ArrayBufferView, options?: OcrOptions): Promise<ApickResult>;
|
|
236
|
+
maskResidentNumber(image: string | BinaryInput | ArrayBuffer | ArrayBufferView, options: MaskResidentNumberOptions): Promise<ApickBinaryResult>;
|
|
237
|
+
maskResidenceCard(image: string | BinaryInput | ArrayBuffer | ArrayBufferView, options?: OcrOptions): Promise<ApickResult>;
|
|
238
|
+
maskPassport(image: string | BinaryInput | ArrayBuffer | ArrayBufferView, options?: OcrOptions): Promise<ApickResult>;
|
|
239
|
+
maskIdCard(image: string | BinaryInput | ArrayBuffer | ArrayBufferView, options?: OcrOptions): Promise<ApickResult>;
|
|
240
|
+
maskDriverLicense(image: string | BinaryInput | ArrayBuffer | ArrayBufferView, options?: OcrOptions): Promise<ApickResult>;
|
|
241
|
+
dnsLookup(domain: string): Promise<ApickResult>;
|
|
242
|
+
geolocate(address: string): Promise<ApickResult>;
|
|
243
|
+
whois(address: string): Promise<ApickResult>;
|
|
244
|
+
googleSearch(keyword: string, options?: { page?: number }): Promise<ApickResult>;
|
|
245
|
+
googleImageSearch(keyword: string, options?: { page?: number }): Promise<ApickResult>;
|
|
246
|
+
screenshot(url: string): Promise<ApickBinaryResult>;
|
|
247
|
+
createTtsJob(text: string, options?: { voiceId?: TtsVoiceId }): Promise<ApickResult<TtsJobData>>;
|
|
248
|
+
getTtsJob(jobId: string): Promise<ApickResult<TtsJobData>>;
|
|
249
|
+
cancelTtsJob(jobId: string): Promise<ApickResult<TtsJobData>>;
|
|
250
|
+
downloadTtsResult(jobId: string): Promise<ApickBinaryResult>;
|
|
251
|
+
downloadTtsSubtitles(jobId: string): Promise<ApickBinaryResult>;
|
|
252
|
+
getTtsQuality(jobId: string): Promise<ApickResult<TtsQualityData>>;
|
|
253
|
+
retryTtsJob(jobId: string, utteranceIds: string[], idempotencyKey: string): Promise<ApickResult<TtsJobData>>;
|
|
254
|
+
downloadTtsCandidate(jobId: string, candidateId: string): Promise<ApickBinaryResult>;
|
|
255
|
+
htmlToPdf(html: string, options?: { pagination?: boolean }): Promise<ApickBinaryResult>;
|
|
256
|
+
jsonToExcel(data: unknown[], options?: { sheetName?: string }): Promise<ApickBinaryResult>;
|
|
257
|
+
summarize(text: string): Promise<ApickResult>;
|
|
258
|
+
polish(text: string): Promise<ApickResult>;
|
|
259
|
+
generateImages(prompt:string, options?:ImageAiGenerateOptions): Promise<ApickResult<ImageAiResultData>>;
|
|
260
|
+
editImages(image:string|BinaryInput|ArrayBuffer|ArrayBufferView, prompt:string, options?:ImageAiEditOptions): Promise<ApickResult<ImageAiResultData>>;
|
|
261
|
+
createImageGenerationJob(prompt:string, options?:ImageAiGenerateOptions): Promise<ApickResult<ImageAiJobData>>;
|
|
262
|
+
createImageEditJob(image:string|BinaryInput|ArrayBuffer|ArrayBufferView, prompt:string, options?:ImageAiEditOptions): Promise<ApickResult<ImageAiJobData>>;
|
|
263
|
+
getImageJob(jobId:string): Promise<ApickResult<ImageAiJobData>>;
|
|
264
|
+
downloadImageJobImage(jobId:string,index:number): Promise<ApickBinaryResult>;
|
|
265
|
+
downloadImageJobArchive(jobId:string): Promise<ApickBinaryResult>;
|
|
266
|
+
requestEmployment(input: RequestEmploymentInput): Promise<ApickResult<DataRequestAcceptedData>>;
|
|
267
|
+
getEmployment(transactionId: string): Promise<ApickResult<DataRequestResult<EmploymentResultPayload>>>;
|
|
268
|
+
requestPersonalIncome(input: RequestPersonalIncomeInput): Promise<ApickResult<DataRequestAcceptedData>>;
|
|
269
|
+
getPersonalIncome(transactionId: string): Promise<ApickResult<DataRequestResult<PersonalIncomeResultPayload>>>;
|
|
270
|
+
requestNpsJoinHistory(input: RequestNpsJoinHistoryInput): Promise<ApickResult<DataRequestAcceptedData>>;
|
|
271
|
+
getNpsJoinHistory(transactionId: string): Promise<ApickResult<DataRequestResult<NpsJoinHistoryResultPayload>>>;
|
|
272
|
+
requestDrivingLicense(input: RequestDrivingLicenseInput): Promise<ApickResult<DataRequestAcceptedData>>;
|
|
273
|
+
getDrivingLicense(transactionId: string): Promise<ApickResult<DataRequestResult<DrivingLicenseResultPayload>>>;
|
|
274
|
+
requestHealthCheckup(input: RequestHealthCheckupInput): Promise<ApickResult<DataRequestAcceptedData>>;
|
|
275
|
+
getHealthCheckup(transactionId: string): Promise<ApickResult<DataRequestResult<HealthCheckupResultPayload>>>;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
export default ApickClient;
|
|
279
|
+
|
|
280
|
+
export type VideoModel = 'seedance' | 'veo' | 'kling';
|
|
281
|
+
export interface VideoJobOptions {
|
|
282
|
+
version?: string; tier?: string; mode?: 'text' | 'image' | 'reference'; duration?: number;
|
|
283
|
+
aspectRatio?: string; resolution?: string; audio?: boolean; negativePrompt?: string;
|
|
284
|
+
seed?: number; cfgScale?: number; idempotencyKey?: string;
|
|
285
|
+
image?: string | BinaryInput | ArrayBuffer | ArrayBufferView;
|
|
286
|
+
lastImage?: string | BinaryInput | ArrayBuffer | ArrayBufferView;
|
|
287
|
+
referenceImages?: Array<string | BinaryInput | ArrayBuffer | ArrayBufferView>;
|
|
288
|
+
referenceVideos?: Array<string | BinaryInput>;
|
|
289
|
+
referenceAudios?: Array<string | BinaryInput>;
|
|
290
|
+
}
|
|
291
|
+
export interface VideoJobData {
|
|
292
|
+
job_id: string; model: VideoModel; version: string; mode: string; tier: string;
|
|
293
|
+
status: 'waiting' | 'processing' | 'completed' | 'failed' | 'cancelled';
|
|
294
|
+
duration: number; resolution?: string; audio?: boolean; point_per_second?: number;
|
|
295
|
+
charged_point?: number; result_available?: boolean; result_url?: string;
|
|
296
|
+
result_expires_at?: string | null; idempotent_replay?: boolean;
|
|
297
|
+
error?: { code: string; message: string };
|
|
298
|
+
}
|