@bolta-io/cli 0.0.14 → 0.0.15
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 +6 -0
- package/CLAUDE.md +17 -13
- package/README.md +19 -14
- package/dist/bin/bolta.js +28 -4
- package/dist/bin/bolta.js.map +1 -1
- package/dist/src/client/bolta-client.d.ts +18 -13
- package/dist/src/client/bolta-client.d.ts.map +1 -1
- package/dist/src/client/bolta-client.js +43 -22
- package/dist/src/client/bolta-client.js.map +1 -1
- package/dist/src/commands/certificate/index.d.ts.map +1 -1
- package/dist/src/commands/certificate/index.js +24 -15
- package/dist/src/commands/certificate/index.js.map +1 -1
- package/dist/src/commands/config/index.d.ts.map +1 -1
- package/dist/src/commands/config/index.js +32 -11
- package/dist/src/commands/config/index.js.map +1 -1
- package/dist/src/commands/examples/index.d.ts.map +1 -1
- package/dist/src/commands/examples/index.js +6 -4
- package/dist/src/commands/examples/index.js.map +1 -1
- package/dist/src/commands/guide/index.d.ts.map +1 -1
- package/dist/src/commands/guide/index.js +22 -20
- package/dist/src/commands/guide/index.js.map +1 -1
- package/dist/src/commands/invoice/amend.js +10 -10
- package/dist/src/commands/invoice/amend.js.map +1 -1
- package/dist/src/commands/invoice/issue-request.js +4 -4
- package/dist/src/commands/invoice/issue-request.js.map +1 -1
- package/dist/src/commands/invoice/issue.js +4 -4
- package/dist/src/commands/invoice/issue.js.map +1 -1
- package/dist/src/commands/schema/index.d.ts.map +1 -1
- package/dist/src/commands/schema/index.js +4 -2
- package/dist/src/commands/schema/index.js.map +1 -1
- package/dist/src/commands/{customer → supplier}/create.d.ts +1 -1
- package/dist/src/commands/{customer → supplier}/create.d.ts.map +1 -1
- package/dist/src/commands/{customer → supplier}/create.js +6 -6
- package/dist/src/commands/{customer → supplier}/create.js.map +1 -1
- package/dist/src/commands/{customer → supplier}/get.d.ts +1 -1
- package/dist/src/commands/{customer → supplier}/get.d.ts.map +1 -1
- package/dist/src/commands/{customer → supplier}/get.js +2 -2
- package/dist/src/commands/{customer → supplier}/get.js.map +1 -1
- package/dist/src/commands/supplier/index.d.ts +3 -0
- package/dist/src/commands/supplier/index.d.ts.map +1 -0
- package/dist/src/commands/supplier/index.js +56 -0
- package/dist/src/commands/supplier/index.js.map +1 -0
- package/dist/src/commands/supplier/legacy-customer.d.ts +5 -0
- package/dist/src/commands/supplier/legacy-customer.d.ts.map +1 -0
- package/dist/src/commands/supplier/legacy-customer.js +56 -0
- package/dist/src/commands/supplier/legacy-customer.js.map +1 -0
- package/dist/src/config/config-manager.d.ts +1 -1
- package/dist/src/config/config-manager.d.ts.map +1 -1
- package/dist/src/config/config-manager.js +23 -2
- package/dist/src/config/config-manager.js.map +1 -1
- package/dist/src/types/api.d.ts +20 -2
- package/dist/src/types/api.d.ts.map +1 -1
- package/dist/src/utils/output.d.ts +10 -0
- package/dist/src/utils/output.d.ts.map +1 -1
- package/dist/src/utils/output.js +23 -0
- package/dist/src/utils/output.js.map +1 -1
- package/dist/src/validators/schemas.d.ts +1 -1
- package/dist/src/validators/schemas.js +3 -3
- package/llms.txt +30 -26
- package/package.json +1 -1
- package/dist/src/commands/customer/index.d.ts +0 -3
- package/dist/src/commands/customer/index.d.ts.map +0 -1
- package/dist/src/commands/customer/index.js +0 -29
- package/dist/src/commands/customer/index.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/supplier/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAwD/D"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { createSupplierAction } from './create.js';
|
|
2
|
+
import { getSupplierAction } from './get.js';
|
|
3
|
+
import { createLegacyCustomerAction, getLegacyCustomerAction } from './legacy-customer.js';
|
|
4
|
+
export function registerSupplierCommands(program) {
|
|
5
|
+
const supplier = program
|
|
6
|
+
.command('supplier')
|
|
7
|
+
.description('공급자(Supplier) 관리');
|
|
8
|
+
supplier
|
|
9
|
+
.command('create')
|
|
10
|
+
.description('공급자 생성 (POST /v1/suppliers)')
|
|
11
|
+
.option('--data <json>', '인라인 JSON 데이터')
|
|
12
|
+
.option('--file <path>', 'JSON 파일 경로')
|
|
13
|
+
.option('--stdin', '표준 입력에서 읽기')
|
|
14
|
+
.addHelpText('after', `
|
|
15
|
+
Example:
|
|
16
|
+
bolta supplier create --data '{
|
|
17
|
+
"identificationNumber": "1234567890",
|
|
18
|
+
"organizationName": "주식회사 테스트",
|
|
19
|
+
"representativeName": "홍길동"
|
|
20
|
+
}'
|
|
21
|
+
|
|
22
|
+
bolta supplier create --file supplier.json`)
|
|
23
|
+
.action(createSupplierAction);
|
|
24
|
+
supplier
|
|
25
|
+
.command('get <supplierKey>')
|
|
26
|
+
.description('공급자 조회 (GET /v1/suppliers/{supplierKey})')
|
|
27
|
+
.addHelpText('after', `
|
|
28
|
+
Example:
|
|
29
|
+
bolta supplier get SupplierKey_bf8paz`)
|
|
30
|
+
.action(getSupplierAction);
|
|
31
|
+
const customer = program
|
|
32
|
+
.command('customer', { hidden: true })
|
|
33
|
+
.description('(deprecated) 공급자 관리. supplier 명령어를 사용하세요.');
|
|
34
|
+
customer
|
|
35
|
+
.command('create')
|
|
36
|
+
.description('(deprecated) 공급자 생성 (POST /v1/customers)')
|
|
37
|
+
.option('--data <json>', '인라인 JSON 데이터')
|
|
38
|
+
.option('--file <path>', 'JSON 파일 경로')
|
|
39
|
+
.option('--stdin', '표준 입력에서 읽기')
|
|
40
|
+
.addHelpText('after', `
|
|
41
|
+
Example:
|
|
42
|
+
bolta customer create --data '{
|
|
43
|
+
"identificationNumber": "1234567890",
|
|
44
|
+
"organizationName": "주식회사 테스트",
|
|
45
|
+
"representativeName": "홍길동"
|
|
46
|
+
}'`)
|
|
47
|
+
.action(createLegacyCustomerAction);
|
|
48
|
+
customer
|
|
49
|
+
.command('get <customerKey>')
|
|
50
|
+
.description('(deprecated) 공급자 조회 (GET /v1/customers/{customerKey})')
|
|
51
|
+
.addHelpText('after', `
|
|
52
|
+
Example:
|
|
53
|
+
bolta customer get CustomerKey_bf8paz`)
|
|
54
|
+
.action(getLegacyCustomerAction);
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/commands/supplier/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,0BAA0B,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAE3F,MAAM,UAAU,wBAAwB,CAAC,OAAgB;IACvD,MAAM,QAAQ,GAAG,OAAO;SACrB,OAAO,CAAC,UAAU,CAAC;SACnB,WAAW,CAAC,kBAAkB,CAAC,CAAC;IAEnC,QAAQ;SACL,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,6BAA6B,CAAC;SAC1C,MAAM,CAAC,eAAe,EAAE,cAAc,CAAC;SACvC,MAAM,CAAC,eAAe,EAAE,YAAY,CAAC;SACrC,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC;SAC/B,WAAW,CAAC,OAAO,EAAE;;;;;;;;6CAQmB,CAAC;SACzC,MAAM,CAAC,oBAAoB,CAAC,CAAC;IAEhC,QAAQ;SACL,OAAO,CAAC,mBAAmB,CAAC;SAC5B,WAAW,CAAC,0CAA0C,CAAC;SACvD,WAAW,CAAC,OAAO,EAAE;;wCAEc,CAAC;SACpC,MAAM,CAAC,iBAAiB,CAAC,CAAC;IAE7B,MAAM,QAAQ,GAAG,OAAO;SACrB,OAAO,CAAC,UAAU,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;SACrC,WAAW,CAAC,2CAA2C,CAAC,CAAC;IAE5D,QAAQ;SACL,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,0CAA0C,CAAC;SACvD,MAAM,CAAC,eAAe,EAAE,cAAc,CAAC;SACvC,MAAM,CAAC,eAAe,EAAE,YAAY,CAAC;SACrC,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC;SAC/B,WAAW,CAAC,OAAO,EAAE;;;;;;KAMrB,CAAC;SACD,MAAM,CAAC,0BAA0B,CAAC,CAAC;IAEtC,QAAQ;SACL,OAAO,CAAC,mBAAmB,CAAC;SAC5B,WAAW,CAAC,uDAAuD,CAAC;SACpE,WAAW,CAAC,OAAO,EAAE;;wCAEc,CAAC;SACpC,MAAM,CAAC,uBAAuB,CAAC,CAAC;AACrC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import type { DataInputOptions } from '../../types/api.js';
|
|
3
|
+
export declare function createLegacyCustomerAction(options: DataInputOptions, command: Command): Promise<void>;
|
|
4
|
+
export declare function getLegacyCustomerAction(customerKey: string, options: Record<string, unknown>, command: Command): Promise<void>;
|
|
5
|
+
//# sourceMappingURL=legacy-customer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legacy-customer.d.ts","sourceRoot":"","sources":["../../../../src/commands/supplier/legacy-customer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAK3D,wBAAsB,0BAA0B,CAAC,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAiC3G;AAED,wBAAsB,uBAAuB,CAC3C,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,OAAO,EAAE,OAAO,GACf,OAAO,CAAC,IAAI,CAAC,CAcf"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { resolveApiKey, resolveBaseUrl } from '../../config/config-manager.js';
|
|
2
|
+
import { BoltaClient } from '../../client/bolta-client.js';
|
|
3
|
+
import { resolveInput } from '../../utils/input.js';
|
|
4
|
+
import { deprecationWarning, outputError, outputSuccess, verbose } from '../../utils/output.js';
|
|
5
|
+
import { createSupplierSchema } from '../../validators/schemas.js';
|
|
6
|
+
import { BoltaAuthError, BoltaValidationError } from '../../utils/errors.js';
|
|
7
|
+
import { ZodError } from 'zod';
|
|
8
|
+
const LEGACY_CUSTOMER_COMMAND_WARNING = "'customer' 명령어는 'supplier'로 변경되었습니다. 'bolta supplier ...'를 사용하세요.";
|
|
9
|
+
export async function createLegacyCustomerAction(options, command) {
|
|
10
|
+
try {
|
|
11
|
+
deprecationWarning(LEGACY_CUSTOMER_COMMAND_WARNING);
|
|
12
|
+
const globalOpts = command.optsWithGlobals();
|
|
13
|
+
const apiKey = resolveApiKey(globalOpts.apiKey);
|
|
14
|
+
if (!apiKey)
|
|
15
|
+
throw new BoltaAuthError('API 키가 설정되지 않았습니다.');
|
|
16
|
+
const client = new BoltaClient({ apiKey, baseUrl: resolveBaseUrl() });
|
|
17
|
+
const raw = await resolveInput(options);
|
|
18
|
+
let validated;
|
|
19
|
+
try {
|
|
20
|
+
validated = createSupplierSchema.parse(raw);
|
|
21
|
+
}
|
|
22
|
+
catch (err) {
|
|
23
|
+
if (err instanceof ZodError) {
|
|
24
|
+
const details = Object.fromEntries(err.errors.map((e) => [e.path.join('.'), e.message]));
|
|
25
|
+
throw new BoltaValidationError('입력 데이터가 유효하지 않습니다.', details);
|
|
26
|
+
}
|
|
27
|
+
throw err;
|
|
28
|
+
}
|
|
29
|
+
if (globalOpts.dryRun) {
|
|
30
|
+
outputSuccess({ dryRun: true, requestBody: validated, endpoint: 'POST /v1/customers' });
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
verbose('공급자 생성 요청 (legacy customer)', { identificationNumber: validated.identificationNumber });
|
|
34
|
+
const result = await client.createCustomer(validated);
|
|
35
|
+
outputSuccess(result);
|
|
36
|
+
}
|
|
37
|
+
catch (err) {
|
|
38
|
+
outputError(err);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
export async function getLegacyCustomerAction(customerKey, options, command) {
|
|
42
|
+
try {
|
|
43
|
+
deprecationWarning(LEGACY_CUSTOMER_COMMAND_WARNING);
|
|
44
|
+
const globalOpts = command.optsWithGlobals();
|
|
45
|
+
const apiKey = resolveApiKey(globalOpts.apiKey);
|
|
46
|
+
if (!apiKey)
|
|
47
|
+
throw new BoltaAuthError('API 키가 설정되지 않았습니다.');
|
|
48
|
+
const client = new BoltaClient({ apiKey, baseUrl: resolveBaseUrl() });
|
|
49
|
+
const result = await client.getCustomer(customerKey);
|
|
50
|
+
outputSuccess(result);
|
|
51
|
+
}
|
|
52
|
+
catch (err) {
|
|
53
|
+
outputError(err);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=legacy-customer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legacy-customer.js","sourceRoot":"","sources":["../../../../src/commands/supplier/legacy-customer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChG,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAG/B,MAAM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AA6B,EAAE,EAAE,oBAAoB,EAAE,SAAS,CAAC,oBAAoB,EAAE,CAAC,CAAC;QACjG,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;QACtD,aAAa,CAAC,MAAM,CAAC,CAAC;IACxB,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,WAAW,CAAC,GAAG,CAAC,CAAC;IACnB,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,WAAmB,EACnB,OAAgC,EAChC,OAAgB;IAEhB,IAAI,CAAC;QACH,kBAAkB,CAAC,+BAA+B,CAAC,CAAC;QAEpD,MAAM,UAAU,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;QAC7C,MAAM,MAAM,GAAG,aAAa,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAChD,IAAI,CAAC,MAAM;YAAE,MAAM,IAAI,cAAc,CAAC,oBAAoB,CAAC,CAAC;QAC5D,MAAM,MAAM,GAAG,IAAI,WAAW,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE,CAAC,CAAC;QAEtE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;QACrD,aAAa,CAAC,MAAM,CAAC,CAAC;IACxB,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,WAAW,CAAC,GAAG,CAAC,CAAC;IACnB,CAAC;AACH,CAAC"}
|
|
@@ -2,7 +2,7 @@ import type { BoltaConfig } from '../types/api.js';
|
|
|
2
2
|
export declare function loadConfig(): BoltaConfig;
|
|
3
3
|
export declare function saveConfig(config: BoltaConfig): void;
|
|
4
4
|
export declare function resolveApiKey(cliFlag?: string): string | undefined;
|
|
5
|
-
export declare function
|
|
5
|
+
export declare function resolveSupplierKey(cliFlag?: string, legacyCliFlag?: string): string | undefined;
|
|
6
6
|
export declare function resolveBaseUrl(): string;
|
|
7
7
|
export declare function maskApiKey(key: string): string;
|
|
8
8
|
//# sourceMappingURL=config-manager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-manager.d.ts","sourceRoot":"","sources":["../../../src/config/config-manager.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"config-manager.d.ts","sourceRoot":"","sources":["../../../src/config/config-manager.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAMnD,wBAAgB,UAAU,IAAI,WAAW,CAOxC;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,CAGpD;AAED,wBAAgB,aAAa,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAElE;AAED,wBAAgB,kBAAkB,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAuB/F;AAED,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAG9C"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { readFileSync, writeFileSync, mkdirSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import { homedir } from 'node:os';
|
|
4
|
+
import { deprecationWarning } from '../utils/output.js';
|
|
4
5
|
const CONFIG_DIR = join(homedir(), '.bolta');
|
|
5
6
|
const CONFIG_FILE = join(CONFIG_DIR, 'config.json');
|
|
6
7
|
export function loadConfig() {
|
|
@@ -19,8 +20,28 @@ export function saveConfig(config) {
|
|
|
19
20
|
export function resolveApiKey(cliFlag) {
|
|
20
21
|
return cliFlag || process.env.BOLTA_API_KEY || loadConfig().apiKey;
|
|
21
22
|
}
|
|
22
|
-
export function
|
|
23
|
-
|
|
23
|
+
export function resolveSupplierKey(cliFlag, legacyCliFlag) {
|
|
24
|
+
if (cliFlag)
|
|
25
|
+
return cliFlag;
|
|
26
|
+
if (legacyCliFlag) {
|
|
27
|
+
deprecationWarning("'--customer-key' 플래그는 '--supplier-key'로 변경되었습니다.");
|
|
28
|
+
return legacyCliFlag;
|
|
29
|
+
}
|
|
30
|
+
const config = loadConfig();
|
|
31
|
+
if (process.env.BOLTA_SUPPLIER_KEY)
|
|
32
|
+
return process.env.BOLTA_SUPPLIER_KEY;
|
|
33
|
+
if (config.supplierKey)
|
|
34
|
+
return config.supplierKey;
|
|
35
|
+
// 하위호환 폴백: 구 환경변수 / config 필드
|
|
36
|
+
if (process.env.BOLTA_CUSTOMER_KEY) {
|
|
37
|
+
deprecationWarning("'BOLTA_CUSTOMER_KEY' 환경변수는 'BOLTA_SUPPLIER_KEY'로 변경되었습니다.");
|
|
38
|
+
return process.env.BOLTA_CUSTOMER_KEY;
|
|
39
|
+
}
|
|
40
|
+
if (config.customerKey) {
|
|
41
|
+
deprecationWarning("config의 'customer-key'는 'supplier-key'로 변경되었습니다. 'bolta config set supplier-key <값>'으로 갱신하세요.");
|
|
42
|
+
return config.customerKey;
|
|
43
|
+
}
|
|
44
|
+
return undefined;
|
|
24
45
|
}
|
|
25
46
|
export function resolveBaseUrl() {
|
|
26
47
|
return process.env.BOLTA_API_BASE_URL || loadConfig().baseUrl || 'https://xapi.bolta.io/v1';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-manager.js","sourceRoot":"","sources":["../../../src/config/config-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAa,MAAM,SAAS,CAAC;AAC5E,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"config-manager.js","sourceRoot":"","sources":["../../../src/config/config-manager.ts"],"names":[],"mappings":"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AED,MAAM,MAAM,GAAG,UAAU,EAAE,CAAC;IAE5B,IAAI,OAAO,CAAC,GAAG,CAAC,kBAAkB;QAAE,OAAO,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC;IAC1E,IAAI,MAAM,CAAC,WAAW;QAAE,OAAO,MAAM,CAAC,WAAW,CAAC;IAElD,8BAA8B;IAC9B,IAAI,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,CAAC;QACnC,kBAAkB,CAAC,2DAA2D,CAAC,CAAC;QAChF,OAAO,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC;IACxC,CAAC;IACD,IAAI,MAAM,CAAC,WAAW,EAAE,CAAC;QACvB,kBAAkB,CAAC,+FAA+F,CAAC,CAAC;QACpH,OAAO,MAAM,CAAC,WAAW,CAAC;IAC5B,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,MAAM,UAAU,cAAc;IAC5B,OAAO,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,UAAU,EAAE,CAAC,OAAO,IAAI,0BAA0B,CAAC;AAC9F,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,GAAW;IACpC,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC;QAAE,OAAO,KAAK,CAAC;IAClC,OAAO,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AACjD,CAAC"}
|
package/dist/src/types/api.d.ts
CHANGED
|
@@ -69,13 +69,27 @@ export interface AmendChangeSupplyCostRequest {
|
|
|
69
69
|
date: string;
|
|
70
70
|
items: TaxInvoiceItem[];
|
|
71
71
|
}
|
|
72
|
-
export interface
|
|
72
|
+
export interface CreateSupplierRequest {
|
|
73
73
|
identificationNumber: string;
|
|
74
74
|
organizationName: string;
|
|
75
75
|
representativeName: string;
|
|
76
76
|
taxRegistrationId?: string | null;
|
|
77
77
|
}
|
|
78
|
-
|
|
78
|
+
/** @deprecated 신규 코드에서는 CreateSupplierRequest를 사용하세요. */
|
|
79
|
+
export type CreateCustomerRequest = CreateSupplierRequest;
|
|
80
|
+
export interface SupplierResponse {
|
|
81
|
+
supplierKey: string;
|
|
82
|
+
identificationNumber: string;
|
|
83
|
+
organizationName: string;
|
|
84
|
+
representativeName: string;
|
|
85
|
+
taxRegistrationId?: string | null;
|
|
86
|
+
certificate?: {
|
|
87
|
+
issuedAt: string;
|
|
88
|
+
expiresAt: string;
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
/** @deprecated legacy `customer` CLI 응답 호환용입니다. */
|
|
92
|
+
export interface LegacyCustomerResponse {
|
|
79
93
|
customerKey: string;
|
|
80
94
|
identificationNumber: string;
|
|
81
95
|
organizationName: string;
|
|
@@ -109,6 +123,8 @@ export interface CliErrorResponse {
|
|
|
109
123
|
export type CliResponse<T = unknown> = CliSuccessResponse<T> | CliErrorResponse;
|
|
110
124
|
export interface BoltaConfig {
|
|
111
125
|
apiKey?: string;
|
|
126
|
+
supplierKey?: string;
|
|
127
|
+
/** @deprecated supplierKey로 대체됨. 읽기 폴백(마이그레이션) 용도로만 유지 */
|
|
112
128
|
customerKey?: string;
|
|
113
129
|
baseUrl?: string;
|
|
114
130
|
timeout?: number;
|
|
@@ -122,6 +138,8 @@ export interface GlobalOptions {
|
|
|
122
138
|
human?: boolean;
|
|
123
139
|
verbose?: boolean;
|
|
124
140
|
apiKey?: string;
|
|
141
|
+
supplierKey?: string;
|
|
142
|
+
/** @deprecated --supplier-key로 대체됨 */
|
|
125
143
|
customerKey?: string;
|
|
126
144
|
dryRun?: boolean;
|
|
127
145
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src/types/api.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC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|
|
1
1
|
export declare function outputSuccess<T>(data: T): void;
|
|
2
2
|
export declare function outputError(error: unknown): never;
|
|
3
3
|
export declare function verbose(message: string, data?: Record<string, unknown>): void;
|
|
4
|
+
/**
|
|
5
|
+
* Deprecation 경고를 stderr로 1회 출력한다.
|
|
6
|
+
* JSON 응답(stdout)을 오염시키지 않도록 항상 stderr를 사용한다.
|
|
7
|
+
*/
|
|
8
|
+
export declare function deprecationWarning(message: string): void;
|
|
9
|
+
/**
|
|
10
|
+
* 구 이름(alias)을 신규 이름으로 매핑한다. 매핑되면 deprecation 경고를 출력한다.
|
|
11
|
+
* schema/examples/guide의 customer-* → supplier-* 하위호환 처리에 공통 사용한다.
|
|
12
|
+
*/
|
|
13
|
+
export declare function resolveDeprecatedName(input: string, aliases: Record<string, string>, label: string): string;
|
|
4
14
|
//# sourceMappingURL=output.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../../src/utils/output.ts"],"names":[],"mappings":"AAGA,wBAAgB,aAAa,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,IAAI,CAG9C;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,CAyBjD;AAED,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAK7E"}
|
|
1
|
+
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../../src/utils/output.ts"],"names":[],"mappings":"AAGA,wBAAgB,aAAa,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,IAAI,CAG9C;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,CAyBjD;AAED,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAK7E;AAID;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAIxD;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/B,KAAK,EAAE,MAAM,GACZ,MAAM,CAOR"}
|
package/dist/src/utils/output.js
CHANGED
|
@@ -34,4 +34,27 @@ export function verbose(message, data) {
|
|
|
34
34
|
console.error(line);
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
+
const shownDeprecations = new Set();
|
|
38
|
+
/**
|
|
39
|
+
* Deprecation 경고를 stderr로 1회 출력한다.
|
|
40
|
+
* JSON 응답(stdout)을 오염시키지 않도록 항상 stderr를 사용한다.
|
|
41
|
+
*/
|
|
42
|
+
export function deprecationWarning(message) {
|
|
43
|
+
if (shownDeprecations.has(message))
|
|
44
|
+
return;
|
|
45
|
+
shownDeprecations.add(message);
|
|
46
|
+
console.error(`[bolta] ⚠ deprecated: ${message}`);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* 구 이름(alias)을 신규 이름으로 매핑한다. 매핑되면 deprecation 경고를 출력한다.
|
|
50
|
+
* schema/examples/guide의 customer-* → supplier-* 하위호환 처리에 공통 사용한다.
|
|
51
|
+
*/
|
|
52
|
+
export function resolveDeprecatedName(input, aliases, label) {
|
|
53
|
+
const mapped = aliases[input];
|
|
54
|
+
if (mapped) {
|
|
55
|
+
deprecationWarning(`${label} '${input}'는 '${mapped}'로 변경되었습니다.`);
|
|
56
|
+
return mapped;
|
|
57
|
+
}
|
|
58
|
+
return input;
|
|
59
|
+
}
|
|
37
60
|
//# sourceMappingURL=output.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output.js","sourceRoot":"","sources":["../../../src/utils/output.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AA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731
|
description?: string | null | undefined;
|
|
732
732
|
}>;
|
|
733
|
-
export declare const
|
|
733
|
+
export declare const createSupplierSchema: z.ZodObject<{
|
|
734
734
|
identificationNumber: z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodString>;
|
|
735
735
|
organizationName: z.ZodString;
|
|
736
736
|
representativeName: z.ZodString;
|
|
@@ -154,9 +154,9 @@ export const createTaxInvoiceIssueRequestSchema = taxInvoiceBaseSchema.superRefi
|
|
|
154
154
|
}
|
|
155
155
|
});
|
|
156
156
|
// ========================
|
|
157
|
-
//
|
|
157
|
+
// Supplier Schemas
|
|
158
158
|
// ========================
|
|
159
|
-
export const
|
|
159
|
+
export const createSupplierSchema = z.object({
|
|
160
160
|
identificationNumber: businessIdentificationNumberSchema,
|
|
161
161
|
organizationName: z.string().min(1, '상호명은 필수입니다').max(100),
|
|
162
162
|
representativeName: z.string().min(1, '대표자명은 필수입니다').max(50),
|
|
@@ -183,7 +183,7 @@ export const amendChangeSupplyCostSchema = z.object({
|
|
|
183
183
|
// JSON Schema Export (for `bolta schema` command)
|
|
184
184
|
// ========================
|
|
185
185
|
export const jsonSchemas = {
|
|
186
|
-
'
|
|
186
|
+
'supplier-create': {
|
|
187
187
|
type: 'object',
|
|
188
188
|
required: ['identificationNumber', 'organizationName', 'representativeName'],
|
|
189
189
|
properties: {
|
package/llms.txt
CHANGED
|
@@ -9,21 +9,23 @@ AI 에이전트(Claude Code 등)가 세금계산서 업무를 자동화할 때
|
|
|
9
9
|
|
|
10
10
|
환경변수로 설정:
|
|
11
11
|
- BOLTA_API_KEY: API 키 (test_ 접두사: 샌드박스, live_ 접두사: 프로덕션)
|
|
12
|
-
-
|
|
12
|
+
- BOLTA_SUPPLIER_KEY: 공급자 키 (세금계산서 발행 시 필요)
|
|
13
13
|
|
|
14
14
|
또는 CLI로 설정:
|
|
15
15
|
- bolta config set api-key <value>
|
|
16
|
-
- bolta config set
|
|
16
|
+
- bolta config set supplier-key <value>
|
|
17
17
|
|
|
18
18
|
## 핵심 개념
|
|
19
19
|
|
|
20
|
-
###
|
|
21
|
-
|
|
22
|
-
- 형식:
|
|
23
|
-
- 획득: 공급자의 사업자 정보로 bolta
|
|
24
|
-
- 설정:
|
|
20
|
+
### Supplier Key
|
|
21
|
+
supplierKey는 세금계산서를 발행하는 공급자 본인을 식별하는 키입니다.
|
|
22
|
+
- 형식: SupplierKey_ 접두사 문자열 (예: SupplierKey_bf8paz)
|
|
23
|
+
- 획득: 공급자의 사업자 정보로 bolta supplier create 호출 → 응답의 supplierKey
|
|
24
|
+
- 설정: BOLTA_SUPPLIER_KEY 환경변수, --supplier-key 플래그, 또는 bolta config set supplier-key
|
|
25
25
|
- API 키(test_/live_) 단위로 독립 관리. 상호 호환 안 됨
|
|
26
|
-
주의:
|
|
26
|
+
주의: Supplier-Key는 공급자(발행자) 본인의 키입니다. 세금계산서를 받는 거래처(공급받는자)의 정보는 Supplier-Key 헤더가 아니라 요청 본문의 supplied 필드에 포함합니다.
|
|
27
|
+
|
|
28
|
+
참고: 구 명칭(customer)은 deprecated이며 당분간 동작합니다. `bolta customer ...`, `--customer-key`, `BOLTA_CUSTOMER_KEY`, `config set customer-key` 사용 시 경고가 출력됩니다.
|
|
27
29
|
|
|
28
30
|
### 요금
|
|
29
31
|
Bolta API는 사전 충전 포인트 차감 방식 유료 서비스입니다.
|
|
@@ -33,32 +35,34 @@ Bolta API는 사전 충전 포인트 차감 방식 유료 서비스입니다.
|
|
|
33
35
|
- 포인트 충전: https://developers.bolta.io 개발자센터
|
|
34
36
|
|
|
35
37
|
### 개념 안내 커맨드
|
|
36
|
-
bolta guide 주요 개념 안내 (
|
|
38
|
+
bolta guide 주요 개념 안내 (supplier-key, payment, workflow, glossary)
|
|
37
39
|
|
|
38
40
|
## Commands
|
|
39
41
|
|
|
40
|
-
###
|
|
42
|
+
### Supplier Management
|
|
41
43
|
|
|
42
|
-
bolta
|
|
43
|
-
|
|
44
|
+
bolta supplier create --data '<json>'
|
|
45
|
+
공급자 생성. 필수: identificationNumber(10자리), organizationName, representativeName
|
|
44
46
|
|
|
45
|
-
bolta
|
|
46
|
-
|
|
47
|
+
bolta supplier get <supplierKey>
|
|
48
|
+
공급자 조회.
|
|
47
49
|
|
|
48
50
|
### Certificate Management
|
|
49
51
|
|
|
50
|
-
bolta certificate url <
|
|
52
|
+
bolta certificate url <supplierKey>
|
|
51
53
|
공동인증서 등록 URL 조회.
|
|
52
54
|
|
|
53
|
-
bolta certificate status <
|
|
55
|
+
bolta certificate status <supplierKey>
|
|
54
56
|
인증서 등록 내역 조회.
|
|
55
57
|
|
|
56
|
-
bolta certificate deregister <
|
|
58
|
+
bolta certificate deregister <supplierKey>
|
|
57
59
|
인증서 등록 해제.
|
|
58
60
|
|
|
61
|
+
deprecated CustomerKey_ 키도 인증서 명령에서 당분간 사용할 수 있습니다.
|
|
62
|
+
|
|
59
63
|
### Tax Invoice
|
|
60
64
|
|
|
61
|
-
bolta invoice issue --data '<json>' [--reference-id <id>] [--
|
|
65
|
+
bolta invoice issue --data '<json>' [--reference-id <id>] [--supplier-key <key>]
|
|
62
66
|
세금계산서 정발행. 필수 필드:
|
|
63
67
|
- date (YYYY-MM-DD)
|
|
64
68
|
- purpose (CLAIM | RECEIPT)
|
|
@@ -72,7 +76,7 @@ bolta invoice issue --data '<json>' [--reference-id <id>] [--customer-key <key>]
|
|
|
72
76
|
- description (최대 200자)
|
|
73
77
|
외국인등록번호 공급받는자는 정발행만 지원. 이 경우 supplied.taxRegistrationId와 최상위 description은 null/미입력이어야 함. 여권번호는 미지원.
|
|
74
78
|
|
|
75
|
-
bolta invoice issue-request --data '<json>' [--reference-id <id>] [--
|
|
79
|
+
bolta invoice issue-request --data '<json>' [--reference-id <id>] [--supplier-key <key>]
|
|
76
80
|
세금계산서 역발행 요청. supplied.identificationNumber는 사업자등록번호 10자리만 허용.
|
|
77
81
|
|
|
78
82
|
bolta invoice get <issuanceKey>
|
|
@@ -81,16 +85,16 @@ bolta invoice get <issuanceKey>
|
|
|
81
85
|
bolta invoice status --reference-id <id>
|
|
82
86
|
Client-Reference-Id로 세금계산서 상태 조회.
|
|
83
87
|
|
|
84
|
-
bolta invoice amend termination <issuanceKey> --date <YYYY-MM-DD> [--
|
|
88
|
+
bolta invoice amend termination <issuanceKey> --date <YYYY-MM-DD> [--supplier-key <key>]
|
|
85
89
|
수정발행: 계약 해제.
|
|
86
90
|
|
|
87
|
-
bolta invoice amend change-supply-cost <issuanceKey> --data '<json>' [--
|
|
91
|
+
bolta invoice amend change-supply-cost <issuanceKey> --data '<json>' [--supplier-key <key>]
|
|
88
92
|
수정발행: 공급가액 변동. JSON: {date, items: [{date, name, supplyCost, tax?}]}
|
|
89
93
|
|
|
90
94
|
### Configuration
|
|
91
95
|
|
|
92
96
|
bolta config set <key> <value>
|
|
93
|
-
설정 저장. key: api-key,
|
|
97
|
+
설정 저장. key: api-key, supplier-key, base-url
|
|
94
98
|
|
|
95
99
|
bolta config show
|
|
96
100
|
현재 설정 확인.
|
|
@@ -102,7 +106,7 @@ bolta config test
|
|
|
102
106
|
|
|
103
107
|
bolta examples [command]
|
|
104
108
|
샘플 JSON 출력. command 없이 실행하면 목록 표시.
|
|
105
|
-
사용 가능:
|
|
109
|
+
사용 가능: supplier-create, invoice-issue, invoice-issue-foreign-supplied, invoice-issue-request, amend-termination, amend-change-supply-cost
|
|
106
110
|
|
|
107
111
|
bolta schema [command]
|
|
108
112
|
입력 JSON 스키마 출력. command 없이 실행하면 목록 표시.
|
|
@@ -110,7 +114,7 @@ bolta schema [command]
|
|
|
110
114
|
## Global Options
|
|
111
115
|
|
|
112
116
|
--api-key <key> API 키 오버라이드
|
|
113
|
-
--
|
|
117
|
+
--supplier-key <key> Supplier Key 오버라이드
|
|
114
118
|
--verbose 상세 로그 (stderr)
|
|
115
119
|
--dry-run API 호출 없이 요청 데이터만 출력
|
|
116
120
|
|
|
@@ -127,7 +131,7 @@ bolta schema [command]
|
|
|
127
131
|
|
|
128
132
|
## Common Workflow
|
|
129
133
|
|
|
130
|
-
1. bolta
|
|
131
|
-
2. bolta certificate status <
|
|
134
|
+
1. bolta supplier create --data '{"identificationNumber":"1234567890","organizationName":"회사명","representativeName":"대표자"}'
|
|
135
|
+
2. bolta certificate status <supplierKey>
|
|
132
136
|
3. bolta invoice issue --data '<세금계산서 JSON>'
|
|
133
137
|
4. bolta invoice get <issuanceKey>
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/customer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA2B/D"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { createCustomerAction } from './create.js';
|
|
2
|
-
import { getCustomerAction } from './get.js';
|
|
3
|
-
export function registerCustomerCommands(program) {
|
|
4
|
-
const customer = program.command('customer').description('고객(Customer) 관리');
|
|
5
|
-
customer
|
|
6
|
-
.command('create')
|
|
7
|
-
.description('고객 생성 (POST /v1/customers)')
|
|
8
|
-
.option('--data <json>', '인라인 JSON 데이터')
|
|
9
|
-
.option('--file <path>', 'JSON 파일 경로')
|
|
10
|
-
.option('--stdin', '표준 입력에서 읽기')
|
|
11
|
-
.addHelpText('after', `
|
|
12
|
-
Example:
|
|
13
|
-
bolta customer create --data '{
|
|
14
|
-
"identificationNumber": "1234567890",
|
|
15
|
-
"organizationName": "주식회사 테스트",
|
|
16
|
-
"representativeName": "홍길동"
|
|
17
|
-
}'
|
|
18
|
-
|
|
19
|
-
bolta customer create --file customer.json`)
|
|
20
|
-
.action(createCustomerAction);
|
|
21
|
-
customer
|
|
22
|
-
.command('get <customerKey>')
|
|
23
|
-
.description('고객 조회 (GET /v1/customers/{customerKey})')
|
|
24
|
-
.addHelpText('after', `
|
|
25
|
-
Example:
|
|
26
|
-
bolta customer get customer_bf8paz`)
|
|
27
|
-
.action(getCustomerAction);
|
|
28
|
-
}
|
|
29
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/commands/customer/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,MAAM,UAAU,wBAAwB,CAAC,OAAgB;IACvD,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC;IAE5E,QAAQ;SACL,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,4BAA4B,CAAC;SACzC,MAAM,CAAC,eAAe,EAAE,cAAc,CAAC;SACvC,MAAM,CAAC,eAAe,EAAE,YAAY,CAAC;SACrC,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC;SAC/B,WAAW,CAAC,OAAO,EAAE;;;;;;;;6CAQmB,CAAC;SACzC,MAAM,CAAC,oBAAoB,CAAC,CAAC;IAEhC,QAAQ;SACL,OAAO,CAAC,mBAAmB,CAAC;SAC5B,WAAW,CAAC,yCAAyC,CAAC;SACtD,WAAW,CAAC,OAAO,EAAE;;qCAEW,CAAC;SACjC,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAC/B,CAAC"}
|