apick-api 4.8.2 → 4.12.1
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 +45 -3
- package/LICENSE +21 -21
- package/README.md +98 -16
- package/SECURITY.md +11 -11
- package/docs/guide.en.md +33 -1
- package/docs/guide.ko.md +34 -2
- package/docs/skill-artifacts.md +2 -2
- package/docs/subagent.md +2 -2
- package/docs/tts.md +2 -2
- package/package.json +71 -71
- package/src/index.cjs +318 -1
- package/src/index.d.ts +346 -1
package/package.json
CHANGED
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "apick-api",
|
|
3
|
-
"version": "4.
|
|
4
|
-
"description": "Official zero-dependency Node.js client for APICK data, AI, and image APIs. 에이픽 데이터·AI·이미지 API 공식 Node.js SDK.",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./src/index.cjs",
|
|
7
|
-
"module": "./src/index.js",
|
|
8
|
-
"types": "./src/index.d.ts",
|
|
9
|
-
"exports": {
|
|
10
|
-
".": {
|
|
11
|
-
"types": "./src/index.d.ts",
|
|
12
|
-
"import": "./src/index.js",
|
|
13
|
-
"require": "./src/index.cjs"
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
"files": [
|
|
17
|
-
"src",
|
|
18
|
-
"docs",
|
|
19
|
-
"examples",
|
|
20
|
-
"README.md",
|
|
21
|
-
"CHANGELOG.md",
|
|
22
|
-
"SECURITY.md",
|
|
23
|
-
"LICENSE"
|
|
24
|
-
],
|
|
25
|
-
"sideEffects": false,
|
|
26
|
-
"engines": {
|
|
27
|
-
"node": ">=18"
|
|
28
|
-
},
|
|
29
|
-
"scripts": {
|
|
30
|
-
"test": "node --test && npm run test:types",
|
|
31
|
-
"test:types": "tsc -p tsconfig.json",
|
|
32
|
-
"test:coverage": "node --test --experimental-test-coverage",
|
|
33
|
-
"prepublishOnly": "npm test"
|
|
34
|
-
},
|
|
35
|
-
"devDependencies": {
|
|
36
|
-
"typescript": "^7.0.2"
|
|
37
|
-
},
|
|
38
|
-
"repository": {
|
|
39
|
-
"type": "git",
|
|
40
|
-
"url": "git+https://github.com/lead788/apick-api.git"
|
|
41
|
-
},
|
|
42
|
-
"bugs": {
|
|
43
|
-
"url": "https://github.com/lead788/apick-api/issues"
|
|
44
|
-
},
|
|
45
|
-
"homepage": "https://apick.app/dev_guide",
|
|
46
|
-
"license": "MIT",
|
|
47
|
-
"author": "APICK",
|
|
48
|
-
"publishConfig": {
|
|
49
|
-
"access": "public",
|
|
50
|
-
"provenance": false
|
|
51
|
-
},
|
|
52
|
-
"keywords": [
|
|
53
|
-
"apick",
|
|
54
|
-
"api",
|
|
55
|
-
"sdk",
|
|
56
|
-
"korea",
|
|
57
|
-
"korean-api",
|
|
58
|
-
"business-registry",
|
|
59
|
-
"parcel-tracking",
|
|
60
|
-
"address",
|
|
61
|
-
"ocr",
|
|
62
|
-
"whois",
|
|
63
|
-
"dns",
|
|
64
|
-
"google-search",
|
|
65
|
-
"pdf",
|
|
66
|
-
"excel",
|
|
67
|
-
"tts-jobs",
|
|
68
|
-
"text-summary",
|
|
69
|
-
"image-generation"
|
|
70
|
-
]
|
|
71
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "apick-api",
|
|
3
|
+
"version": "4.12.1",
|
|
4
|
+
"description": "Official zero-dependency Node.js client for APICK data, AI, and image APIs. 에이픽 데이터·AI·이미지 API 공식 Node.js SDK.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./src/index.cjs",
|
|
7
|
+
"module": "./src/index.js",
|
|
8
|
+
"types": "./src/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./src/index.d.ts",
|
|
12
|
+
"import": "./src/index.js",
|
|
13
|
+
"require": "./src/index.cjs"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"src",
|
|
18
|
+
"docs",
|
|
19
|
+
"examples",
|
|
20
|
+
"README.md",
|
|
21
|
+
"CHANGELOG.md",
|
|
22
|
+
"SECURITY.md",
|
|
23
|
+
"LICENSE"
|
|
24
|
+
],
|
|
25
|
+
"sideEffects": false,
|
|
26
|
+
"engines": {
|
|
27
|
+
"node": ">=18"
|
|
28
|
+
},
|
|
29
|
+
"scripts": {
|
|
30
|
+
"test": "node --test && npm run test:types",
|
|
31
|
+
"test:types": "tsc -p tsconfig.json",
|
|
32
|
+
"test:coverage": "node --test --experimental-test-coverage",
|
|
33
|
+
"prepublishOnly": "npm test"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"typescript": "^7.0.2"
|
|
37
|
+
},
|
|
38
|
+
"repository": {
|
|
39
|
+
"type": "git",
|
|
40
|
+
"url": "git+https://github.com/lead788/apick-api.git"
|
|
41
|
+
},
|
|
42
|
+
"bugs": {
|
|
43
|
+
"url": "https://github.com/lead788/apick-api/issues"
|
|
44
|
+
},
|
|
45
|
+
"homepage": "https://apick.app/dev_guide",
|
|
46
|
+
"license": "MIT",
|
|
47
|
+
"author": "APICK",
|
|
48
|
+
"publishConfig": {
|
|
49
|
+
"access": "public",
|
|
50
|
+
"provenance": false
|
|
51
|
+
},
|
|
52
|
+
"keywords": [
|
|
53
|
+
"apick",
|
|
54
|
+
"api",
|
|
55
|
+
"sdk",
|
|
56
|
+
"korea",
|
|
57
|
+
"korean-api",
|
|
58
|
+
"business-registry",
|
|
59
|
+
"parcel-tracking",
|
|
60
|
+
"address",
|
|
61
|
+
"ocr",
|
|
62
|
+
"whois",
|
|
63
|
+
"dns",
|
|
64
|
+
"google-search",
|
|
65
|
+
"pdf",
|
|
66
|
+
"excel",
|
|
67
|
+
"tts-jobs",
|
|
68
|
+
"text-summary",
|
|
69
|
+
"image-generation"
|
|
70
|
+
]
|
|
71
|
+
}
|
package/src/index.cjs
CHANGED
|
@@ -16,6 +16,13 @@ const AUTH_PROVIDERS = Object.freeze([
|
|
|
16
16
|
'kakao', 'naver', 'toss', 'pass', 'samsung', 'kb', 'shinhan', 'hana', 'woori', 'ibk', 'nh', 'kakaobank', 'banksalad'
|
|
17
17
|
]);
|
|
18
18
|
const AUTH_PROVIDER_SET = new Set(AUTH_PROVIDERS);
|
|
19
|
+
// 정부24 통합 조회에서 고를 수 있는 상품 키. 서버 공개 목록과 같다.
|
|
20
|
+
const GOV24_BUNDLE_PRODUCTS = Object.freeze([
|
|
21
|
+
'resident_registration', 'resident_registration_cho', 'driving_license', 'health_checkup',
|
|
22
|
+
'police_penalty', 'parking_fine_target', 'mortgage_loan', 'housing_refund_balance',
|
|
23
|
+
'housing_pension_balance', 'housing_loan_stage', 'mortgage_application', 'confirm_verify', 'power_bill'
|
|
24
|
+
]);
|
|
25
|
+
const GOV24_BUNDLE_PRODUCT_SET = new Set(GOV24_BUNDLE_PRODUCTS);
|
|
19
26
|
|
|
20
27
|
const SERVICE_DEFINITIONS = Object.freeze({
|
|
21
28
|
businessDetails: { endpoint: '/rest/biz_detail', timeoutMs: 50_000, output: 'json' },
|
|
@@ -53,6 +60,12 @@ const SERVICE_DEFINITIONS = Object.freeze({
|
|
|
53
60
|
linkedinProfile: { endpoint: '/rest/linkedin_profile', timeoutMs: 110_000, output: 'json' },
|
|
54
61
|
linkedinCompany: { endpoint: '/rest/linkedin_company', timeoutMs: 110_000, output: 'json' },
|
|
55
62
|
linkedinJob: { endpoint: '/rest/linkedin_job', timeoutMs: 110_000, output: 'json' },
|
|
63
|
+
courtAuction: { endpoint: '/rest/court_auction', timeoutMs: 45_000, output: 'json' },
|
|
64
|
+
bidNotice: { endpoint: '/rest/bid_notice', timeoutMs: 45_000, output: 'json' },
|
|
65
|
+
bidAward: { endpoint: '/rest/bid_award', timeoutMs: 45_000, output: 'json' },
|
|
66
|
+
rtmsTrade: { endpoint: '/rest/rtms_trade', timeoutMs: 45_000, output: 'json' },
|
|
67
|
+
rtmsRent: { endpoint: '/rest/rtms_rent', timeoutMs: 45_000, output: 'json' },
|
|
68
|
+
registryDocVerify: { endpoint: '/rest/registry_doc_verify', timeoutMs: 30_000, output: 'json' },
|
|
56
69
|
screenshot: { endpoint: '/rest/url_screenshot', timeoutMs: 75_000, output: 'binary', filename: 'screenshot.jpeg' },
|
|
57
70
|
youtubeMetadata: { endpoint: '/rest/youtube_metadata', timeoutMs: 60_000, output: 'json' },
|
|
58
71
|
youtubeThumbnail: { endpoint: '/rest/youtube_thumbnail', timeoutMs: 60_000, output: 'binary', filename: 'thumbnail.jpg' },
|
|
@@ -78,7 +91,20 @@ const SERVICE_DEFINITIONS = Object.freeze({
|
|
|
78
91
|
requestDrivingLicense: { endpoint: '/rest/req_driving_license', timeoutMs: 35_000, output: 'json' },
|
|
79
92
|
requestHealthCheckup: { endpoint: '/rest/req_health_checkup', timeoutMs: 35_000, output: 'json' },
|
|
80
93
|
requestCashReceiptDeduction: { endpoint: '/rest/req_cash_receipt_deduction', timeoutMs: 35_000, output: 'json' },
|
|
81
|
-
requestTaxReturnHistory: { endpoint: '/rest/req_tax_return_history', timeoutMs: 35_000, output: 'json' }
|
|
94
|
+
requestTaxReturnHistory: { endpoint: '/rest/req_tax_return_history', timeoutMs: 35_000, output: 'json' },
|
|
95
|
+
requestIncomeAmountCert: { endpoint: '/rest/req_income_amount_cert', timeoutMs: 60_000, output: 'json' },
|
|
96
|
+
requestPensionCreditCert: { endpoint: '/rest/req_pension_credit_cert', timeoutMs: 60_000, output: 'json' },
|
|
97
|
+
requestFactCert: { endpoint: '/rest/req_fact_cert', timeoutMs: 60_000, output: 'json' },
|
|
98
|
+
requestTaxClearanceCert: { endpoint: '/rest/req_tax_clearance_cert', timeoutMs: 60_000, output: 'json' },
|
|
99
|
+
requestIncomeCertBundle: { endpoint: '/rest/req_income_cert_bundle', timeoutMs: 60_000, output: 'json' },
|
|
100
|
+
requestBusinessCertBundle: { endpoint: '/rest/req_business_cert_bundle', timeoutMs: 60_000, output: 'json' },
|
|
101
|
+
requestBusinessRegistrationCert: { endpoint: '/rest/req_business_registration_cert', timeoutMs: 60_000, output: 'json' },
|
|
102
|
+
requestVatTaxBaseCert: { endpoint: '/rest/req_vat_tax_base_cert', timeoutMs: 60_000, output: 'json' },
|
|
103
|
+
requestFinancialStatementCert: { endpoint: '/rest/req_financial_statement_cert', timeoutMs: 60_000, output: 'json' },
|
|
104
|
+
requestClosureCert: { endpoint: '/rest/req_closure_cert', timeoutMs: 60_000, output: 'json' },
|
|
105
|
+
requestResidentRegistration: { endpoint: '/rest/req_resident_registration', timeoutMs: 35_000, output: 'json' },
|
|
106
|
+
requestResidentRegistrationCho: { endpoint: '/rest/req_resident_registration_cho', timeoutMs: 35_000, output: 'json' },
|
|
107
|
+
requestGov24Bundle: { endpoint: '/rest/req_gov24_bundle', timeoutMs: 35_000, output: 'json' }
|
|
82
108
|
});
|
|
83
109
|
|
|
84
110
|
const SERVICES = Object.freeze(Object.fromEntries(
|
|
@@ -151,6 +177,57 @@ function normalizeBusinessNumber(value) {
|
|
|
151
177
|
return normalized;
|
|
152
178
|
}
|
|
153
179
|
|
|
180
|
+
const BID_BIZ_TYPES = ['물품', '공사', '용역', '외자'];
|
|
181
|
+
const RTMS_PROPERTY_TYPES = ['apt', 'rh', 'sh', 'offi'];
|
|
182
|
+
|
|
183
|
+
// 입찰공고·낙찰 조회 입력. bizType·기간·공고번호·업종코드·페이지를 정규화한다.
|
|
184
|
+
function bidQueryInput(options) {
|
|
185
|
+
const config = options || {};
|
|
186
|
+
const input = {};
|
|
187
|
+
if (config.bizType !== undefined) {
|
|
188
|
+
if (!BID_BIZ_TYPES.includes(config.bizType)) {
|
|
189
|
+
throw new TypeError('bizType must be one of 물품, 공사, 용역, 외자.');
|
|
190
|
+
}
|
|
191
|
+
input.bizType = config.bizType;
|
|
192
|
+
}
|
|
193
|
+
for (const key of ['startDate', 'endDate']) {
|
|
194
|
+
if (config[key] === undefined) continue;
|
|
195
|
+
const digits = requiredString(key, config[key], 12).replace(/[^0-9]/g, '');
|
|
196
|
+
if (digits.length !== 8 && digits.length !== 12) {
|
|
197
|
+
throw new TypeError(`${key} must be YYYYMMDD or YYYYMMDDHHMM.`);
|
|
198
|
+
}
|
|
199
|
+
input[key] = digits;
|
|
200
|
+
}
|
|
201
|
+
if (config.bidNtceNo !== undefined) {
|
|
202
|
+
input.bidNtceNo = requiredString('bidNtceNo', config.bidNtceNo, 20).replace(/[^0-9]/g, '');
|
|
203
|
+
}
|
|
204
|
+
if (config.indstrytyCd !== undefined) {
|
|
205
|
+
input.indstrytyCd = requiredString('indstrytyCd', config.indstrytyCd, 10).replace(/[^0-9]/g, '');
|
|
206
|
+
}
|
|
207
|
+
if (config.pageNo !== undefined) input.pageNo = positiveInteger('pageNo', config.pageNo);
|
|
208
|
+
if (config.numOfRows !== undefined) input.numOfRows = positiveInteger('numOfRows', config.numOfRows);
|
|
209
|
+
return input;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// 실거래 분석 입력. 지역코드 5자리와 계약년월 6자리를 요구한다.
|
|
213
|
+
function rtmsQueryInput(lawdCd, dealYmd, options) {
|
|
214
|
+
const code = requiredString('lawdCd', lawdCd, 5).replace(/[^0-9]/g, '');
|
|
215
|
+
if (!/^\d{5}$/.test(code)) throw new TypeError('lawdCd must contain exactly 5 digits.');
|
|
216
|
+
const month = requiredString('dealYmd', dealYmd, 6).replace(/[^0-9]/g, '');
|
|
217
|
+
if (!/^\d{6}$/.test(month)) throw new TypeError('dealYmd must be YYYYMM.');
|
|
218
|
+
const config = options || {};
|
|
219
|
+
const input = { lawdCd: code, dealYmd: month };
|
|
220
|
+
if (config.propertyType !== undefined) {
|
|
221
|
+
if (!RTMS_PROPERTY_TYPES.includes(config.propertyType)) {
|
|
222
|
+
throw new TypeError('propertyType must be one of apt, rh, sh, offi.');
|
|
223
|
+
}
|
|
224
|
+
input.propertyType = config.propertyType;
|
|
225
|
+
}
|
|
226
|
+
if (config.pageNo !== undefined) input.pageNo = positiveInteger('pageNo', config.pageNo);
|
|
227
|
+
if (config.numOfRows !== undefined) input.numOfRows = positiveInteger('numOfRows', config.numOfRows);
|
|
228
|
+
return input;
|
|
229
|
+
}
|
|
230
|
+
|
|
154
231
|
function normalizeUrl(value) {
|
|
155
232
|
const input = requiredString('url', value);
|
|
156
233
|
let parsed;
|
|
@@ -241,6 +318,81 @@ function dataRequestInput(input) {
|
|
|
241
318
|
};
|
|
242
319
|
}
|
|
243
320
|
|
|
321
|
+
// 홈택스 민원증명. 발급 조건은 REST 필드명 그대로 보낸다(서버가 최상위 평면 이름을 읽는다).
|
|
322
|
+
// 공통 인증 입력(name·birthDate·phone·authProvider)은 dataRequestInput 이 만든다.
|
|
323
|
+
const INCOME_AMOUNT_CERT_OPTIONS = Object.freeze(['year', 'use_purpose', 'submit_to', 'delivery', 'format', 'engl_yn', 'quantity', 'email', 'fax_no', 'wallet_address']);
|
|
324
|
+
const PENSION_CREDIT_CERT_OPTIONS = Object.freeze(['year', 'use_purpose', 'submit_to', 'delivery', 'format', 'address_open_yn', 'resno_open_yn', 'quantity', 'email', 'fax_no', 'wallet_address']);
|
|
325
|
+
const FACT_CERT_OPTIONS = Object.freeze(['year', 'start_month', 'end_month', 'itrf_cd', 'issuance', 'engl_yn', 'use_purpose', 'submit_to', 'delivery', 'format', 'quantity', 'email', 'fax_no', 'wallet_address']);
|
|
326
|
+
const TAX_CLEARANCE_CERT_OPTIONS = Object.freeze(['cert_type', 'year', 'start_month', 'end_month', 'itrf_cd', 'issuance', 'submit_to', 'delivery', 'format', 'quantity', 'email', 'fax_no', 'wallet_address']);
|
|
327
|
+
const BUSINESS_REGISTRATION_CERT_OPTIONS = Object.freeze(['business_no', 'engl_yn', 'use_purpose', 'submit_to', 'delivery', 'format', 'quantity', 'email', 'fax_no', 'wallet_address']);
|
|
328
|
+
const VAT_TAX_BASE_CERT_OPTIONS = Object.freeze(['business_no', 'year', 'period', 'engl_yn', 'use_purpose', 'submit_to', 'delivery', 'format', 'quantity', 'email', 'fax_no', 'wallet_address']);
|
|
329
|
+
const FINANCIAL_STATEMENT_CERT_OPTIONS = Object.freeze(['business_no', 'year', 'engl_yn', 'use_purpose', 'submit_to', 'delivery', 'format', 'quantity', 'email', 'fax_no', 'wallet_address']);
|
|
330
|
+
const CLOSURE_CERT_OPTIONS = Object.freeze(['business_no', 'engl_yn', 'use_purpose', 'submit_to', 'delivery', 'format', 'quantity', 'email', 'fax_no', 'wallet_address']);
|
|
331
|
+
|
|
332
|
+
// 증빙서류 묶음. 승인 한 번으로 담긴 증명을 함께 발급하며 담긴 증명이 같은 발급 입력을 공유한다.
|
|
333
|
+
const INCOME_CERT_BUNDLE_OPTIONS = Object.freeze(['year', 'use_purpose', 'submit_to', 'delivery', 'format', 'amount_open_yn', 'income_source_open_yn', 'withholding_all_print_yn', 'address_open_yn', 'resno_open_yn', 'quantity', 'email', 'fax_no', 'wallet_address']);
|
|
334
|
+
const BUSINESS_CERT_BUNDLE_OPTIONS = Object.freeze(['year', 'period', 'engl_yn', 'use_purpose', 'submit_to', 'delivery', 'format', 'quantity', 'email', 'fax_no', 'wallet_address', 'bind_id']);
|
|
335
|
+
|
|
336
|
+
function hometaxCertInput(input, keys) {
|
|
337
|
+
const config = input || {};
|
|
338
|
+
const payload = dataRequestInput(config);
|
|
339
|
+
keys.forEach(function (key) {
|
|
340
|
+
const value = config[key];
|
|
341
|
+
if (value === undefined || value === null || value === '') return;
|
|
342
|
+
payload[key] = String(value);
|
|
343
|
+
});
|
|
344
|
+
if (payload.format === undefined) payload.format = 'both';
|
|
345
|
+
return payload;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
// 사업자 증빙서류 묶음은 대표자 본인 확인을 받는다. bind_id 가 없으면 agreed=true 가 있어야
|
|
349
|
+
// 서버가 접수하므로, 빠진 요청은 서버를 부르기 전에 막는다.
|
|
350
|
+
function businessCertBundleInput(input) {
|
|
351
|
+
const config = input || {};
|
|
352
|
+
const payload = hometaxCertInput(config, BUSINESS_CERT_BUNDLE_OPTIONS);
|
|
353
|
+
payload.business_no = normalizeBusinessNumber(config.business_no);
|
|
354
|
+
if (config.agreed === true) payload.agreed = 'true';
|
|
355
|
+
else if (config.agreed !== undefined && config.agreed !== false) throw new TypeError('agreed must be a boolean.');
|
|
356
|
+
if (!payload.bind_id && payload.agreed !== 'true') {
|
|
357
|
+
throw new TypeError('agreed must be true when bind_id is not provided.');
|
|
358
|
+
}
|
|
359
|
+
return payload;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
// 주민등록표 발급은 주민등록 주소지(시도·시군구)로 처리기관을 정한다. 서버가 이 값을 필수로 본다.
|
|
363
|
+
function residentAddressInput(config) {
|
|
364
|
+
return {
|
|
365
|
+
sido: requiredString('sido', config.sido, 40),
|
|
366
|
+
sigungu: requiredString('sigungu', config.sigungu, 40)
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
// 등본·초본의 선택 입력. Y/N 은 서버가 그대로 해석하므로 다른 값은 보내지 않는다.
|
|
371
|
+
function residentOptionsInput(config, payload) {
|
|
372
|
+
const purposeCd = optionalText('purposeCd', config.purposeCd, 8);
|
|
373
|
+
if (purposeCd !== undefined) payload.purposeCd = purposeCd;
|
|
374
|
+
const submitTarget = optionalText('submitTarget', config.submitTarget, 100);
|
|
375
|
+
if (submitTarget !== undefined) payload.submitTarget = submitTarget;
|
|
376
|
+
const includeAddressHistory = optionalChoice('includeAddressHistory', config.includeAddressHistory, ['Y', 'N']);
|
|
377
|
+
if (includeAddressHistory !== undefined) payload.includeAddressHistory = includeAddressHistory;
|
|
378
|
+
const includeHousehold = optionalChoice('includeHousehold', config.includeHousehold, ['Y', 'N']);
|
|
379
|
+
if (includeHousehold !== undefined) payload.includeHousehold = includeHousehold;
|
|
380
|
+
return payload;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
// 통합 조회는 고른 상품 키를 쉼표로 이어 보낸다. 서버는 배열과 쉼표 문자열을 모두 받는다.
|
|
384
|
+
function gov24BundleProductsInput(value) {
|
|
385
|
+
const list = Array.isArray(value) ? value : String(value === undefined || value === null ? '' : value).split(',');
|
|
386
|
+
const keys = list.map(function(item) { return String(item).trim(); }).filter(Boolean);
|
|
387
|
+
if (!keys.length) throw new TypeError('products must select at least one product key.');
|
|
388
|
+
keys.forEach(function(key) {
|
|
389
|
+
if (!GOV24_BUNDLE_PRODUCT_SET.has(key)) {
|
|
390
|
+
throw new RangeError(`products contains an unsupported key: ${key}.`);
|
|
391
|
+
}
|
|
392
|
+
});
|
|
393
|
+
return Array.from(new Set(keys)).join(',');
|
|
394
|
+
}
|
|
395
|
+
|
|
244
396
|
const SKILL_CATEGORIES = Object.freeze(['data', 'ai', 'dev', 'document', 'marketing', 'finance', 'productivity', 'video', 'etc']);
|
|
245
397
|
const SKILL_CATEGORY_SET = new Set(SKILL_CATEGORIES);
|
|
246
398
|
const SKILL_SORTS = Object.freeze(['recommended', 'popular', 'used', 'likes', 'rating', 'new', 'mine', 'liked']);
|
|
@@ -715,6 +867,42 @@ class ApickClient {
|
|
|
715
867
|
return this._call('linkedinJob', linkedinInput(url));
|
|
716
868
|
}
|
|
717
869
|
|
|
870
|
+
// 법원 경매사건. 사건번호와 법원(이름 또는 법원 코드)이 함께 필요하다.
|
|
871
|
+
courtAuction(caseNo, court) {
|
|
872
|
+
return this._call('courtAuction', {
|
|
873
|
+
case_no: requiredString('caseNo', caseNo, 64),
|
|
874
|
+
court: requiredString('court', court, 64)
|
|
875
|
+
});
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
// 등기사항증명서 등 발급확인. issueNo 는 증명서에 인쇄된 발급확인번호 12자리다.
|
|
879
|
+
registryDocVerify(issueNo, options) {
|
|
880
|
+
const config = options || {};
|
|
881
|
+
const input = { issue_no: requiredString('issueNo', issueNo, 32) };
|
|
882
|
+
if (config.kind !== undefined) input.kind = requiredString('kind', config.kind, 16);
|
|
883
|
+
return this._call('registryDocVerify', input);
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
// 입찰공고 분석. bizType 미지정 시 용역이며, 기간은 최대 31일이다.
|
|
887
|
+
bidNotice(options) {
|
|
888
|
+
return this._call('bidNotice', bidQueryInput(options));
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
// 낙찰 경쟁 분석. 입력은 bidNotice 와 같다.
|
|
892
|
+
bidAward(options) {
|
|
893
|
+
return this._call('bidAward', bidQueryInput(options));
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
// 매매 실거래 분석. 지역코드 5자리와 계약년월 6자리가 필요하다.
|
|
897
|
+
rtmsTrade(lawdCd, dealYmd, options) {
|
|
898
|
+
return this._call('rtmsTrade', rtmsQueryInput(lawdCd, dealYmd, options));
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
// 전월세 실거래 분석. 같은 단지 매매가로 전세가율을 계산해 돌려준다.
|
|
902
|
+
rtmsRent(lawdCd, dealYmd, options) {
|
|
903
|
+
return this._call('rtmsRent', rtmsQueryInput(lawdCd, dealYmd, options));
|
|
904
|
+
}
|
|
905
|
+
|
|
718
906
|
screenshot(url) {
|
|
719
907
|
return this._call('screenshot', { url: normalizeUrl(url) });
|
|
720
908
|
}
|
|
@@ -1125,6 +1313,134 @@ class ApickClient {
|
|
|
1125
1313
|
return this._call('requestTaxReturnHistory', { transactionId: normalizeTransactionId(transactionId) }, null, { endpoint: '/rest/get_tax_return_history' });
|
|
1126
1314
|
}
|
|
1127
1315
|
|
|
1316
|
+
// 홈택스 민원증명 발급. 신청인 본인명의이고 발급 1건 60P 정액이다.
|
|
1317
|
+
// 응답은 format(pdf·json·both)으로 고른다. json 이면 발급된 PDF를 파싱한 PDF데이터가 함께 온다.
|
|
1318
|
+
requestIncomeAmountCert(input) {
|
|
1319
|
+
return this._call('requestIncomeAmountCert', hometaxCertInput(input, INCOME_AMOUNT_CERT_OPTIONS));
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1322
|
+
getIncomeAmountCert(transactionId) {
|
|
1323
|
+
return this._call('requestIncomeAmountCert', { transactionId: normalizeTransactionId(transactionId) }, null, { endpoint: '/rest/get_income_amount_cert' });
|
|
1324
|
+
}
|
|
1325
|
+
|
|
1326
|
+
requestPensionCreditCert(input) {
|
|
1327
|
+
return this._call('requestPensionCreditCert', hometaxCertInput(input, PENSION_CREDIT_CERT_OPTIONS));
|
|
1328
|
+
}
|
|
1329
|
+
|
|
1330
|
+
getPensionCreditCert(transactionId) {
|
|
1331
|
+
return this._call('requestPensionCreditCert', { transactionId: normalizeTransactionId(transactionId) }, null, { endpoint: '/rest/get_pension_credit_cert' });
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1334
|
+
requestFactCert(input) {
|
|
1335
|
+
return this._call('requestFactCert', hometaxCertInput(input, FACT_CERT_OPTIONS));
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1338
|
+
getFactCert(transactionId) {
|
|
1339
|
+
return this._call('requestFactCert', { transactionId: normalizeTransactionId(transactionId) }, null, { endpoint: '/rest/get_fact_cert' });
|
|
1340
|
+
}
|
|
1341
|
+
|
|
1342
|
+
requestTaxClearanceCert(input) {
|
|
1343
|
+
return this._call('requestTaxClearanceCert', hometaxCertInput(input, TAX_CLEARANCE_CERT_OPTIONS));
|
|
1344
|
+
}
|
|
1345
|
+
|
|
1346
|
+
getTaxClearanceCert(transactionId) {
|
|
1347
|
+
return this._call('requestTaxClearanceCert', { transactionId: normalizeTransactionId(transactionId) }, null, { endpoint: '/rest/get_tax_clearance_cert' });
|
|
1348
|
+
}
|
|
1349
|
+
|
|
1350
|
+
// 소득 증빙서류 통합발급. 소득금액증명·연금보험료등 소득세액 공제확인서를 승인 한 번으로 발급한다.
|
|
1351
|
+
// 결과는 result.incomeAmountCert·result.pensionCreditCert 로 나뉘어 온다. 접수 20P, 최초 결과 84P.
|
|
1352
|
+
requestIncomeCertBundle(input) {
|
|
1353
|
+
return this._call('requestIncomeCertBundle', hometaxCertInput(input, INCOME_CERT_BUNDLE_OPTIONS));
|
|
1354
|
+
}
|
|
1355
|
+
|
|
1356
|
+
getIncomeCertBundle(transactionId) {
|
|
1357
|
+
return this._call('requestIncomeCertBundle', { transactionId: normalizeTransactionId(transactionId) }, null, { endpoint: '/rest/get_income_cert_bundle' });
|
|
1358
|
+
}
|
|
1359
|
+
|
|
1360
|
+
// 사업자 증빙서류 통합발급. 사업자등록증명·부가가치세 과세표준증명·표준재무제표증명을 함께 발급한다.
|
|
1361
|
+
// 결과는 result.businessRegistrationCert·vatTaxBaseCert·financialStatementCert 로 나뉜다. 최초 결과 126P.
|
|
1362
|
+
requestBusinessCertBundle(input) {
|
|
1363
|
+
return this._call('requestBusinessCertBundle', businessCertBundleInput(input));
|
|
1364
|
+
}
|
|
1365
|
+
|
|
1366
|
+
getBusinessCertBundle(transactionId) {
|
|
1367
|
+
return this._call('requestBusinessCertBundle', { transactionId: normalizeTransactionId(transactionId) }, null, { endpoint: '/rest/get_business_cert_bundle' });
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1370
|
+
// 사업자 단위 증명. business_no 는 증명 대상 사업자등록번호 10자리다.
|
|
1371
|
+
requestBusinessRegistrationCert(input) {
|
|
1372
|
+
return this._call('requestBusinessRegistrationCert', hometaxCertInput(input, BUSINESS_REGISTRATION_CERT_OPTIONS));
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
getBusinessRegistrationCert(transactionId) {
|
|
1376
|
+
return this._call('requestBusinessRegistrationCert', { transactionId: normalizeTransactionId(transactionId) }, null, { endpoint: '/rest/get_business_registration_cert' });
|
|
1377
|
+
}
|
|
1378
|
+
|
|
1379
|
+
requestVatTaxBaseCert(input) {
|
|
1380
|
+
return this._call('requestVatTaxBaseCert', hometaxCertInput(input, VAT_TAX_BASE_CERT_OPTIONS));
|
|
1381
|
+
}
|
|
1382
|
+
|
|
1383
|
+
getVatTaxBaseCert(transactionId) {
|
|
1384
|
+
return this._call('requestVatTaxBaseCert', { transactionId: normalizeTransactionId(transactionId) }, null, { endpoint: '/rest/get_vat_tax_base_cert' });
|
|
1385
|
+
}
|
|
1386
|
+
|
|
1387
|
+
requestFinancialStatementCert(input) {
|
|
1388
|
+
return this._call('requestFinancialStatementCert', hometaxCertInput(input, FINANCIAL_STATEMENT_CERT_OPTIONS));
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1391
|
+
getFinancialStatementCert(transactionId) {
|
|
1392
|
+
return this._call('requestFinancialStatementCert', { transactionId: normalizeTransactionId(transactionId) }, null, { endpoint: '/rest/get_financial_statement_cert' });
|
|
1393
|
+
}
|
|
1394
|
+
|
|
1395
|
+
requestClosureCert(input) {
|
|
1396
|
+
return this._call('requestClosureCert', hometaxCertInput(input, CLOSURE_CERT_OPTIONS));
|
|
1397
|
+
}
|
|
1398
|
+
|
|
1399
|
+
getClosureCert(transactionId) {
|
|
1400
|
+
return this._call('requestClosureCert', { transactionId: normalizeTransactionId(transactionId) }, null, { endpoint: '/rest/get_closure_cert' });
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1403
|
+
// 주민등록표 등본·초본 발급. 건당 80P 정액이고 결과에 PDF 원본(base64)·해시가 함께 온다.
|
|
1404
|
+
requestResidentRegistration(input) {
|
|
1405
|
+
const config = input || {};
|
|
1406
|
+
const payload = Object.assign(dataRequestInput(config), residentAddressInput(config));
|
|
1407
|
+
residentOptionsInput(config, payload);
|
|
1408
|
+
return this._call('requestResidentRegistration', payload);
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1411
|
+
getResidentRegistration(transactionId) {
|
|
1412
|
+
return this._call('requestResidentRegistration', { transactionId: normalizeTransactionId(transactionId) }, null, { endpoint: '/rest/get_resident_registration' });
|
|
1413
|
+
}
|
|
1414
|
+
|
|
1415
|
+
requestResidentRegistrationCho(input) {
|
|
1416
|
+
const config = input || {};
|
|
1417
|
+
const payload = Object.assign(dataRequestInput(config), residentAddressInput(config));
|
|
1418
|
+
residentOptionsInput(config, payload);
|
|
1419
|
+
return this._call('requestResidentRegistrationCho', payload);
|
|
1420
|
+
}
|
|
1421
|
+
|
|
1422
|
+
getResidentRegistrationCho(transactionId) {
|
|
1423
|
+
return this._call('requestResidentRegistrationCho', { transactionId: normalizeTransactionId(transactionId) }, null, { endpoint: '/rest/get_resident_registration_cho' });
|
|
1424
|
+
}
|
|
1425
|
+
|
|
1426
|
+
// 정부24 통합 조회. 한 번의 인증으로 고른 상품만 조회하고, 단가는 고른 상품의 합으로 정해진다.
|
|
1427
|
+
requestGov24Bundle(input) {
|
|
1428
|
+
const config = input || {};
|
|
1429
|
+
const products = gov24BundleProductsInput(config.products);
|
|
1430
|
+
const payload = dataRequestInput(config);
|
|
1431
|
+
payload.products = products;
|
|
1432
|
+
// 등본·초본을 고를 때만 주민등록 주소지가 필요하다.
|
|
1433
|
+
if (products.split(',').some(function(key) { return key.indexOf('resident_registration') === 0; })) {
|
|
1434
|
+
Object.assign(payload, residentAddressInput(config));
|
|
1435
|
+
residentOptionsInput(config, payload);
|
|
1436
|
+
}
|
|
1437
|
+
return this._call('requestGov24Bundle', payload);
|
|
1438
|
+
}
|
|
1439
|
+
|
|
1440
|
+
getGov24Bundle(transactionId) {
|
|
1441
|
+
return this._call('requestGov24Bundle', { transactionId: normalizeTransactionId(transactionId) }, null, { endpoint: '/rest/get_gov24_bundle' });
|
|
1442
|
+
}
|
|
1443
|
+
|
|
1128
1444
|
// Skills: 요청·응답이 모두 JSON 이고 data·api 봉투 없이 응답 항목이 최상위에 온다.
|
|
1129
1445
|
// 오류는 { error: { code, message, details } } 형식이며 code 를 serviceCode 로 돌려준다.
|
|
1130
1446
|
async _skills(method, path, options) {
|
|
@@ -1314,6 +1630,7 @@ module.exports = {
|
|
|
1314
1630
|
SERVICES,
|
|
1315
1631
|
TTS_VOICE_IDS,
|
|
1316
1632
|
AUTH_PROVIDERS,
|
|
1633
|
+
GOV24_BUNDLE_PRODUCTS,
|
|
1317
1634
|
SKILL_CATEGORIES,
|
|
1318
1635
|
SKILL_SORTS,
|
|
1319
1636
|
DEFAULT_BASE_URL
|