@connextable/popbill 1.0.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.
@@ -0,0 +1,2256 @@
1
+ import { PopbillApiError, PopbillErrorStage, PopbillErrorType } from "@connextable/popbill-compat/errors";
2
+
3
+ //#region src/services/tax-invoice/types/document.d.ts
4
+ /**
5
+ * 작성일/일시 문자열 타입입니다.
6
+ */
7
+ type TaxInvoiceDateString = string;
8
+ /**
9
+ * 세금계산서 과금 방향 값입니다.
10
+ */
11
+ declare const TaxInvoiceChargeDirectionValues: {
12
+ /**
13
+ * 값: `정과금`, 의미: 공급자에게 과금되는 일반 방향
14
+ */
15
+ readonly NormalCharge: "정과금";
16
+ /**
17
+ * 값: `역과금`, 의미: 공급받는자에게 과금되는 역방향
18
+ */
19
+ readonly ReverseCharge: "역과금";
20
+ };
21
+ /**
22
+ * 세금계산서 과금 방향 타입입니다.
23
+ */
24
+ type TaxInvoiceChargeDirection = (typeof TaxInvoiceChargeDirectionValues)[keyof typeof TaxInvoiceChargeDirectionValues];
25
+ /**
26
+ * 세금계산서 발행 형태 값입니다.
27
+ */
28
+ declare const TaxInvoiceIssueTypes: {
29
+ /**
30
+ * 값: `정발행`, 의미: 공급자 중심의 일반 발행
31
+ */
32
+ readonly Normal: "정발행";
33
+ /**
34
+ * 값: `역발행`, 의미: 공급받는자 요청 기반 발행
35
+ */
36
+ readonly Reverse: "역발행";
37
+ /**
38
+ * 값: `위수탁`, 의미: 수탁자 대행 발행
39
+ */
40
+ readonly Trustee: "위수탁";
41
+ };
42
+ /**
43
+ * 세금계산서 발행 형태 타입입니다.
44
+ */
45
+ type TaxInvoiceIssueType = (typeof TaxInvoiceIssueTypes)[keyof typeof TaxInvoiceIssueTypes];
46
+ /**
47
+ * 세금계산서 영수/청구 값입니다.
48
+ */
49
+ declare const TaxInvoicePurposeTypes: {
50
+ /**
51
+ * 값: `영수`, 의미: 영수 목적
52
+ */
53
+ readonly Receipt: "영수";
54
+ /**
55
+ * 값: `청구`, 의미: 청구 목적
56
+ */
57
+ readonly Claim: "청구";
58
+ /**
59
+ * 값: `없음`, 의미: 목적 구분 없음
60
+ */
61
+ readonly None: "없음";
62
+ };
63
+ /**
64
+ * 세금계산서 영수/청구 타입입니다.
65
+ */
66
+ type TaxInvoicePurposeType = (typeof TaxInvoicePurposeTypes)[keyof typeof TaxInvoicePurposeTypes];
67
+ /**
68
+ * 세금계산서 과세 유형 값입니다.
69
+ */
70
+ declare const TaxInvoiceTaxationTypes: {
71
+ /**
72
+ * 값: `과세`, 의미: 일반 과세
73
+ */
74
+ readonly Taxable: "과세";
75
+ /**
76
+ * 값: `영세`, 의미: 영세율
77
+ */
78
+ readonly ZeroRated: "영세";
79
+ /**
80
+ * 값: `면세`, 의미: 면세
81
+ */
82
+ readonly Exempt: "면세";
83
+ };
84
+ /**
85
+ * 세금계산서 과세 유형 타입입니다.
86
+ */
87
+ type TaxInvoiceTaxationType = (typeof TaxInvoiceTaxationTypes)[keyof typeof TaxInvoiceTaxationTypes];
88
+ /**
89
+ * 공급받는자 구분 값입니다.
90
+ */
91
+ declare const TaxInvoiceRecipientTypes: {
92
+ /**
93
+ * 값: `사업자`, 의미: 사업자 번호 기반
94
+ */
95
+ readonly Business: "사업자";
96
+ /**
97
+ * 값: `개인`, 의미: 주민등록번호 기반
98
+ */
99
+ readonly Individual: "개인";
100
+ /**
101
+ * 값: `외국인`, 의미: 외국인 식별번호 기반
102
+ */
103
+ readonly Foreigner: "외국인";
104
+ };
105
+ /**
106
+ * 공급받는자 구분 타입입니다.
107
+ */
108
+ type TaxInvoiceRecipientType = (typeof TaxInvoiceRecipientTypes)[keyof typeof TaxInvoiceRecipientTypes];
109
+ /**
110
+ * 공급받는자 휴폐업 상태 값입니다.
111
+ */
112
+ declare const TaxInvoiceBusinessStatusValues: {
113
+ /**
114
+ * 값: `null`, 의미: 미확인
115
+ */
116
+ readonly NotChecked: null;
117
+ /**
118
+ * 값: `0`, 의미: 미등록
119
+ */
120
+ readonly NotRegistered: 0;
121
+ /**
122
+ * 값: `1`, 의미: 사업중
123
+ */
124
+ readonly Operating: 1;
125
+ /**
126
+ * 값: `2`, 의미: 폐업
127
+ */
128
+ readonly Closed: 2;
129
+ /**
130
+ * 값: `3`, 의미: 휴업
131
+ */
132
+ readonly Suspended: 3;
133
+ /**
134
+ * 값: `4`, 의미: 확인실패
135
+ */
136
+ readonly CheckFailed: 4;
137
+ };
138
+ /**
139
+ * 공급받는자 휴폐업 상태 타입입니다.
140
+ */
141
+ type TaxInvoiceBusinessStatus = (typeof TaxInvoiceBusinessStatusValues)[keyof typeof TaxInvoiceBusinessStatusValues];
142
+ /**
143
+ * 수정세금계산서 사유코드 값입니다.
144
+ */
145
+ declare const TaxInvoiceModificationReasonCodes: {
146
+ /**
147
+ * 값: `1`, 의미: 기재사항 착오 정정
148
+ */
149
+ readonly CorrectingEntryErrors: 1;
150
+ /**
151
+ * 값: `2`, 의미: 공급가액 변동
152
+ */
153
+ readonly SupplyAmountAdjustment: 2;
154
+ /**
155
+ * 값: `3`, 의미: 환입
156
+ */
157
+ readonly Return: 3;
158
+ /**
159
+ * 값: `4`, 의미: 계약의 해제
160
+ */
161
+ readonly ContractCancellation: 4;
162
+ /**
163
+ * 값: `5`, 의미: 내국신용장 사후 개설
164
+ */
165
+ readonly PostIssuedDomesticLetterOfCredit: 5;
166
+ /**
167
+ * 값: `6`, 의미: 착오에 의한 이중 발급
168
+ */
169
+ readonly DuplicateIssuanceByMistake: 6;
170
+ };
171
+ /**
172
+ * 수정세금계산서 사유코드 타입입니다.
173
+ */
174
+ type TaxInvoiceModificationReasonCode = (typeof TaxInvoiceModificationReasonCodes)[keyof typeof TaxInvoiceModificationReasonCodes];
175
+ /**
176
+ * 세금계산서 상세 품목 입력입니다.
177
+ */
178
+ interface TaxInvoiceLineItemInput {
179
+ /**
180
+ * 상세 품목의 순번입니다.
181
+ */
182
+ lineNumber: number;
183
+ /**
184
+ * 거래일자(yyyyMMdd)입니다.
185
+ */
186
+ transactionDate?: TaxInvoiceDateString;
187
+ /**
188
+ * 품목명입니다.
189
+ */
190
+ itemName?: string;
191
+ /**
192
+ * 규격입니다.
193
+ */
194
+ specification?: string;
195
+ /**
196
+ * 수량입니다.
197
+ */
198
+ quantity?: string;
199
+ /**
200
+ * 단가입니다.
201
+ */
202
+ unitCostAmount?: string;
203
+ /**
204
+ * 공급가액입니다.
205
+ */
206
+ supplyCostAmount?: string;
207
+ /**
208
+ * 세액입니다.
209
+ */
210
+ taxAmount?: string;
211
+ /**
212
+ * 품목 비고입니다.
213
+ */
214
+ remark?: string;
215
+ }
216
+ /**
217
+ * 세금계산서 추가 담당자 입력입니다.
218
+ */
219
+ interface TaxInvoiceAdditionalContactInput {
220
+ /**
221
+ * 추가 담당자의 순번입니다.
222
+ */
223
+ sequenceNumber: number;
224
+ /**
225
+ * 추가 담당자 이름입니다.
226
+ */
227
+ contactName?: string;
228
+ /**
229
+ * 추가 담당자 이메일 주소입니다.
230
+ */
231
+ emailAddress: string;
232
+ }
233
+ /**
234
+ * 세금계산서 당사자 공통 입력입니다.
235
+ */
236
+ interface TaxInvoicePartyInput {
237
+ /**
238
+ * 사업자번호입니다.
239
+ */
240
+ businessNumber?: string;
241
+ /**
242
+ * 문서 관리번호입니다.
243
+ */
244
+ managementKey?: string;
245
+ /**
246
+ * 종사업장 식별번호입니다.
247
+ */
248
+ taxRegistrationIdentifier?: string;
249
+ /**
250
+ * 상호입니다.
251
+ */
252
+ companyName?: string;
253
+ /**
254
+ * 대표자 성명입니다.
255
+ */
256
+ chiefExecutiveOfficerName?: string;
257
+ /**
258
+ * 주소입니다.
259
+ */
260
+ address?: string;
261
+ /**
262
+ * 업태입니다.
263
+ */
264
+ businessClass?: string;
265
+ /**
266
+ * 종목입니다.
267
+ */
268
+ businessType?: string;
269
+ /**
270
+ * 담당자 이름입니다.
271
+ */
272
+ contactName?: string;
273
+ /**
274
+ * 담당자 전화번호입니다.
275
+ */
276
+ telephoneNumber?: string;
277
+ /**
278
+ * 담당자 휴대폰번호입니다.
279
+ */
280
+ mobilePhoneNumber?: string;
281
+ /**
282
+ * 담당자 이메일 주소입니다.
283
+ */
284
+ emailAddress?: string;
285
+ /**
286
+ * 담당자 휴대폰 문자 발송 여부입니다.
287
+ */
288
+ sendTextMessage?: boolean;
289
+ /**
290
+ * 인쇄 여부입니다.
291
+ */
292
+ printEnabled?: boolean;
293
+ /**
294
+ * 주민등록번호입니다.
295
+ */
296
+ residentRegistrationNumber?: string;
297
+ /**
298
+ * 외국인 등록번호입니다.
299
+ */
300
+ foreignerRegistrationNumber?: string;
301
+ /**
302
+ * 종사업자번호입니다.
303
+ */
304
+ branchBusinessNumber?: string;
305
+ /**
306
+ * 종사업자 일련번호입니다.
307
+ */
308
+ branchSerialNumber?: string;
309
+ /**
310
+ * 법인 구분값입니다.
311
+ */
312
+ corporationClassification?: string;
313
+ /**
314
+ * 부서명입니다.
315
+ */
316
+ departmentName?: string;
317
+ }
318
+ /**
319
+ * 세금계산서 공급받는자 입력입니다.
320
+ */
321
+ interface TaxInvoiceBuyerInput extends TaxInvoicePartyInput {
322
+ /**
323
+ * 공급받는자 구분입니다.
324
+ */
325
+ recipientType?: TaxInvoiceRecipientType;
326
+ /**
327
+ * 예비 담당자 이름입니다.
328
+ */
329
+ secondaryContactName?: string;
330
+ /**
331
+ * 예비 담당자 전화번호입니다.
332
+ */
333
+ secondaryTelephoneNumber?: string;
334
+ /**
335
+ * 예비 담당자 휴대폰번호입니다.
336
+ */
337
+ secondaryMobilePhoneNumber?: string;
338
+ /**
339
+ * 예비 담당자 이메일 주소입니다.
340
+ */
341
+ secondaryEmailAddress?: string;
342
+ /**
343
+ * 주 담당 부서명입니다.
344
+ */
345
+ primaryDepartmentName?: string;
346
+ /**
347
+ * 예비 담당 부서명입니다.
348
+ */
349
+ secondaryDepartmentName?: string;
350
+ /**
351
+ * 휴폐업 상태입니다.
352
+ */
353
+ businessStatus?: TaxInvoiceBusinessStatus;
354
+ /**
355
+ * 휴폐업일자(yyyyMMdd)입니다.
356
+ */
357
+ businessStatusDate?: TaxInvoiceDateString;
358
+ }
359
+ /**
360
+ * 세금계산서 결제/합계 금액 입력입니다.
361
+ */
362
+ interface TaxInvoicePaymentSummaryInput {
363
+ /**
364
+ * 세액 합계입니다.
365
+ */
366
+ totalTaxAmount?: string;
367
+ /**
368
+ * 공급가액 합계입니다.
369
+ */
370
+ totalSupplyCostAmount?: string;
371
+ /**
372
+ * 합계 금액입니다.
373
+ */
374
+ totalAmount?: string;
375
+ /**
376
+ * 현금 금액입니다.
377
+ */
378
+ cashAmount?: string;
379
+ /**
380
+ * 수표 금액입니다.
381
+ */
382
+ checkAmount?: string;
383
+ /**
384
+ * 어음 금액입니다.
385
+ */
386
+ promissoryNoteAmount?: string;
387
+ /**
388
+ * 외상 금액입니다.
389
+ */
390
+ creditAmount?: string;
391
+ }
392
+ /**
393
+ * 세금계산서 수정 사유 입력입니다.
394
+ */
395
+ interface TaxInvoiceModificationInput {
396
+ /**
397
+ * 수정 사유코드입니다.
398
+ */
399
+ modificationReasonCode?: TaxInvoiceModificationReasonCode;
400
+ /**
401
+ * 원본 문서의 국세청 승인번호입니다.
402
+ */
403
+ originalNationalTaxServiceConfirmationNumber?: string;
404
+ }
405
+ /**
406
+ * 세금계산서 문서 입력입니다.
407
+ */
408
+ interface TaxInvoiceDocumentInput {
409
+ /**
410
+ * 거래명세서 동시작성 여부입니다.
411
+ */
412
+ writeSpecificationEnabled?: boolean;
413
+ /**
414
+ * 작성일자(yyyyMMdd)입니다.
415
+ */
416
+ writtenDate?: TaxInvoiceDateString;
417
+ /**
418
+ * 과금 방향입니다.
419
+ */
420
+ chargeDirection?: TaxInvoiceChargeDirection;
421
+ /**
422
+ * 발행 형태입니다.
423
+ */
424
+ issueType?: TaxInvoiceIssueType;
425
+ /**
426
+ * 영수/청구 구분입니다.
427
+ */
428
+ purposeType?: TaxInvoicePurposeType;
429
+ /**
430
+ * 발행시기 코드입니다.
431
+ */
432
+ issueTimingCode?: string;
433
+ /**
434
+ * 과세 유형입니다.
435
+ */
436
+ taxType?: TaxInvoiceTaxationType;
437
+ /**
438
+ * 공급자 정보입니다.
439
+ */
440
+ supplier?: TaxInvoicePartyInput;
441
+ /**
442
+ * 공급받는자 정보입니다.
443
+ */
444
+ buyer?: TaxInvoiceBuyerInput;
445
+ /**
446
+ * 수탁자 정보입니다.
447
+ */
448
+ trustee?: TaxInvoicePartyInput;
449
+ /**
450
+ * 금액 정보입니다.
451
+ */
452
+ paymentSummary?: TaxInvoicePaymentSummaryInput;
453
+ /**
454
+ * 수정세금계산서 정보입니다.
455
+ */
456
+ modification?: TaxInvoiceModificationInput;
457
+ /**
458
+ * 기재상 일련번호입니다.
459
+ */
460
+ taxInvoiceSerialNumber?: string;
461
+ /**
462
+ * 비고1입니다.
463
+ */
464
+ remarkOne?: string;
465
+ /**
466
+ * 비고2입니다.
467
+ */
468
+ remarkTwo?: string;
469
+ /**
470
+ * 비고3입니다.
471
+ */
472
+ remarkThree?: string;
473
+ /**
474
+ * 책번호 권 항목입니다.
475
+ */
476
+ bookVolumeNumber?: string;
477
+ /**
478
+ * 책번호 호 항목입니다.
479
+ */
480
+ bookIssueNumber?: string;
481
+ /**
482
+ * 사업자등록증 이미지 첨부 여부입니다.
483
+ */
484
+ includeBusinessLicenseImage?: boolean;
485
+ /**
486
+ * 통장사본 이미지 첨부 여부입니다.
487
+ */
488
+ includeBankBookImage?: boolean;
489
+ /**
490
+ * 상세 품목 목록입니다.
491
+ */
492
+ lineItems?: TaxInvoiceLineItemInput[];
493
+ /**
494
+ * 추가 담당자 목록입니다.
495
+ */
496
+ additionalContacts?: TaxInvoiceAdditionalContactInput[];
497
+ }
498
+ //#endregion
499
+ //#region src/services/tax-invoice/types/response.d.ts
500
+ /**
501
+ * 세금계산서 공통 처리 결과입니다.
502
+ */
503
+ interface TaxInvoiceOperationResult {
504
+ /**
505
+ * 처리 결과 코드입니다.
506
+ */
507
+ resultCode: number;
508
+ /**
509
+ * 처리 결과 메시지입니다.
510
+ */
511
+ resultMessage: string;
512
+ }
513
+ /**
514
+ * 발행 처리 결과입니다.
515
+ */
516
+ interface TaxInvoiceIssueResult extends TaxInvoiceOperationResult {
517
+ /**
518
+ * 국세청 승인번호입니다.
519
+ */
520
+ nationalTaxServiceConfirmationNumber?: string;
521
+ /**
522
+ * 발행일시(yyyyMMddHHmmss)입니다.
523
+ */
524
+ issuedAt?: string;
525
+ }
526
+ /**
527
+ * 초대량 접수 결과입니다.
528
+ */
529
+ interface TaxInvoiceBulkSubmitResult extends TaxInvoiceOperationResult {
530
+ /**
531
+ * 접수 식별자입니다.
532
+ */
533
+ receiptIdentifier?: string;
534
+ }
535
+ /**
536
+ * 초대량 처리 상태 값입니다.
537
+ */
538
+ declare const TaxInvoiceBulkIssueSubmissionTransactionStates: {
539
+ /**
540
+ * 값: `0`, 의미: 미처리 상태
541
+ */
542
+ readonly NotProcessed: 0;
543
+ /**
544
+ * 값: `1`, 의미: 처리중 상태
545
+ */
546
+ readonly Processing: 1;
547
+ /**
548
+ * 값: `2`, 의미: 완료 상태
549
+ */
550
+ readonly Completed: 2;
551
+ };
552
+ /**
553
+ * 초대량 처리 상태 타입입니다.
554
+ */
555
+ type TaxInvoiceBulkIssueSubmissionTransactionState = (typeof TaxInvoiceBulkIssueSubmissionTransactionStates)[keyof typeof TaxInvoiceBulkIssueSubmissionTransactionStates];
556
+ /**
557
+ * 초대량 발행 개별 처리 결과입니다.
558
+ */
559
+ interface TaxInvoiceBulkIssueSubmissionResultItem {
560
+ /**
561
+ * 문서번호 유형 코드입니다.
562
+ */
563
+ invoiceDocumentKeyTypeCode?: string;
564
+ /**
565
+ * 공급자 문서번호입니다.
566
+ */
567
+ supplierInvoiceManagementKey?: string;
568
+ /**
569
+ * 수탁자 문서번호입니다.
570
+ */
571
+ trusteeInvoiceManagementKey?: string;
572
+ /**
573
+ * 개별 처리 결과 코드입니다.
574
+ */
575
+ resultCode?: number;
576
+ /**
577
+ * 개별 처리 결과 메시지입니다.
578
+ */
579
+ resultMessage?: string;
580
+ /**
581
+ * 국세청 승인번호입니다.
582
+ */
583
+ nationalTaxServiceConfirmationNumber?: string;
584
+ /**
585
+ * 접수일시(yyyyMMddHHmmss)입니다.
586
+ */
587
+ receivedAt?: string;
588
+ /**
589
+ * 발행일시(yyyyMMddHHmmss)입니다.
590
+ */
591
+ issuedAt?: string;
592
+ }
593
+ /**
594
+ * 초대량 접수결과 조회 결과입니다.
595
+ */
596
+ interface TaxInvoiceBulkIssueSubmissionResult extends TaxInvoiceOperationResult {
597
+ /**
598
+ * 접수 식별자입니다.
599
+ */
600
+ receiptIdentifier?: string;
601
+ /**
602
+ * 제출 식별자입니다.
603
+ */
604
+ submissionIdentifier?: string;
605
+ /**
606
+ * 제출 건수입니다.
607
+ */
608
+ submittedDocumentCount?: number;
609
+ /**
610
+ * 성공 건수입니다.
611
+ */
612
+ succeededDocumentCount?: number;
613
+ /**
614
+ * 실패 건수입니다.
615
+ */
616
+ failedDocumentCount?: number;
617
+ /**
618
+ * 처리 상태입니다.
619
+ */
620
+ transactionState?: TaxInvoiceBulkIssueSubmissionTransactionState;
621
+ /**
622
+ * 처리 시작일시(yyyyMMddHHmmss)입니다.
623
+ */
624
+ transactionStartedAt?: string;
625
+ /**
626
+ * 처리 완료일시(yyyyMMddHHmmss)입니다.
627
+ */
628
+ transactionCompletedAt?: string;
629
+ /**
630
+ * 처리 결과 코드입니다.
631
+ */
632
+ transactionResultCode?: number;
633
+ /**
634
+ * 개별 처리 결과 목록입니다.
635
+ */
636
+ issueResults?: TaxInvoiceBulkIssueSubmissionResultItem[];
637
+ }
638
+ /**
639
+ * 문서 요약정보 조회 결과입니다.
640
+ */
641
+ interface TaxInvoiceInfo {
642
+ /**
643
+ * 팝빌 문서 식별키(ItemKey)입니다.
644
+ */
645
+ itemKey: string;
646
+ /**
647
+ * 과세유형입니다.
648
+ */
649
+ taxType: TaxInvoiceTaxationType;
650
+ /**
651
+ * 작성일자(yyyyMMdd)입니다.
652
+ */
653
+ writtenDate: string;
654
+ /**
655
+ * 등록일시(yyyyMMddHHmmss)입니다.
656
+ */
657
+ registeredAt: string;
658
+ /**
659
+ * 발행유형입니다.
660
+ */
661
+ issueType: TaxInvoiceIssueType;
662
+ /**
663
+ * 공급가액 합계입니다.
664
+ */
665
+ totalSupplyCost: string;
666
+ /**
667
+ * 세액 합계입니다.
668
+ */
669
+ totalTax: string;
670
+ /**
671
+ * 영수/청구 구분입니다.
672
+ */
673
+ purposeType: TaxInvoicePurposeType;
674
+ /**
675
+ * 발행일시(yyyyMMddHHmmss)입니다.
676
+ */
677
+ issuedAt: string;
678
+ /**
679
+ * 지연발행 여부입니다.
680
+ */
681
+ isLateIssued: boolean;
682
+ /**
683
+ * 개봉 여부입니다.
684
+ */
685
+ isOpen: boolean;
686
+ /**
687
+ * 개봉일시(yyyyMMddHHmmss)입니다.
688
+ */
689
+ openedAt?: string;
690
+ /**
691
+ * 상태 메모입니다.
692
+ */
693
+ stateMemo: string;
694
+ /**
695
+ * 상태 코드입니다.
696
+ */
697
+ stateCode: number;
698
+ /**
699
+ * 상태 변경일시(yyyyMMddHHmmss)입니다.
700
+ */
701
+ stateChangedAt: string;
702
+ /**
703
+ * 국세청 승인번호입니다.
704
+ */
705
+ nationalTaxServiceConfirmationNumber?: string;
706
+ /**
707
+ * 국세청 전송 결과 코드입니다.
708
+ */
709
+ nationalTaxServiceResult?: string;
710
+ /**
711
+ * 국세청 전송일시(yyyyMMddHHmmss)입니다.
712
+ */
713
+ nationalTaxServiceSentAt?: string;
714
+ /**
715
+ * 국세청 결과 수신일시(yyyyMMddHHmmss)입니다.
716
+ */
717
+ nationalTaxServiceResultReceivedAt?: string;
718
+ /**
719
+ * 국세청 전송 오류 코드입니다.
720
+ */
721
+ nationalTaxServiceSendErrorCode?: string;
722
+ /**
723
+ * 수정사유코드입니다.
724
+ */
725
+ modificationCode?: TaxInvoiceModificationReasonCode;
726
+ /**
727
+ * 연동 문서 여부입니다.
728
+ */
729
+ isApiLinkedDocument: boolean;
730
+ /**
731
+ * 공급자 상호입니다.
732
+ */
733
+ supplierCompanyName: string;
734
+ /**
735
+ * 공급자 사업자번호입니다.
736
+ */
737
+ supplierBusinessNumber: string;
738
+ /**
739
+ * 공급자 문서번호입니다.
740
+ */
741
+ supplierManagementKey?: string;
742
+ /**
743
+ * 공급자 인쇄 여부입니다.
744
+ */
745
+ isSupplierPrinted: boolean;
746
+ /**
747
+ * 공급받는자 상호입니다.
748
+ */
749
+ buyerCompanyName: string;
750
+ /**
751
+ * 공급받는자 사업자번호입니다.
752
+ */
753
+ buyerBusinessNumber: string;
754
+ /**
755
+ * 공급받는자 문서번호입니다.
756
+ */
757
+ buyerManagementKey?: string;
758
+ /**
759
+ * 공급받는자 인쇄 여부입니다.
760
+ */
761
+ isBuyerPrinted: boolean;
762
+ /**
763
+ * 공급받는자 휴폐업 상태입니다.
764
+ */
765
+ buyerBusinessStatus?: TaxInvoiceBusinessStatus;
766
+ /**
767
+ * 공급받는자 휴폐업일자(yyyyMMdd)입니다.
768
+ */
769
+ buyerBusinessStatusDate?: string;
770
+ /**
771
+ * 수탁자 상호입니다.
772
+ */
773
+ trusteeCompanyName?: string;
774
+ /**
775
+ * 수탁자 사업자번호입니다.
776
+ */
777
+ trusteeBusinessNumber?: string;
778
+ /**
779
+ * 수탁자 문서번호입니다.
780
+ */
781
+ trusteeManagementKey?: string;
782
+ /**
783
+ * 수탁자 인쇄 여부입니다.
784
+ */
785
+ isTrusteePrinted?: boolean;
786
+ }
787
+ /**
788
+ * 문서 상세조회 결과입니다.
789
+ */
790
+ interface TaxInvoiceDocumentOutput extends TaxInvoiceDocumentInput {
791
+ /**
792
+ * 발행일시(yyyyMMddHHmmss)입니다.
793
+ */
794
+ issuedAt?: string;
795
+ /**
796
+ * 상태 코드입니다.
797
+ */
798
+ stateCode?: number;
799
+ /**
800
+ * 상태 변경일시(yyyyMMddHHmmss)입니다.
801
+ */
802
+ stateChangedAt?: string;
803
+ /**
804
+ * 지연발행 여부입니다.
805
+ */
806
+ isLateIssued?: boolean;
807
+ /**
808
+ * 개봉 여부입니다.
809
+ */
810
+ isOpen?: boolean;
811
+ /**
812
+ * 개봉일시(yyyyMMddHHmmss)입니다.
813
+ */
814
+ openedAt?: string;
815
+ /**
816
+ * 국세청 승인번호입니다.
817
+ */
818
+ nationalTaxServiceConfirmationNumber?: string;
819
+ /**
820
+ * 국세청 전송 결과 코드입니다.
821
+ */
822
+ nationalTaxServiceResultCode?: string;
823
+ /**
824
+ * 국세청 전송일시(yyyyMMddHHmmss)입니다.
825
+ */
826
+ nationalTaxServiceSentAt?: string;
827
+ /**
828
+ * 국세청 결과 수신일시(yyyyMMddHHmmss)입니다.
829
+ */
830
+ nationalTaxServiceResultReceivedAt?: string;
831
+ /**
832
+ * 국세청 전송 오류 코드입니다.
833
+ */
834
+ nationalTaxServiceSendErrorCode?: string;
835
+ /**
836
+ * API 연동 문서 여부입니다.
837
+ */
838
+ isApiLinkedDocument?: boolean;
839
+ }
840
+ /**
841
+ * 문서번호 사용 여부 조회 결과입니다.
842
+ */
843
+ interface TaxInvoiceInvoiceManagementKeyUsage {
844
+ /**
845
+ * 문서번호 사용 여부입니다.
846
+ */
847
+ isInUse: boolean;
848
+ /**
849
+ * 사용중인 경우 팝빌 문서 식별키입니다.
850
+ */
851
+ itemKey?: string;
852
+ }
853
+ /**
854
+ * XML 조회 결과입니다.
855
+ */
856
+ interface TaxInvoiceXmlResult {
857
+ /**
858
+ * 처리 결과입니다.
859
+ */
860
+ operationResult?: TaxInvoiceOperationResult;
861
+ /**
862
+ * 팝빌 문서 식별키입니다.
863
+ */
864
+ itemKey?: string;
865
+ /**
866
+ * 문서번호입니다.
867
+ */
868
+ invoiceManagementKey?: string;
869
+ /**
870
+ * XML 원문입니다.
871
+ */
872
+ xmlContent?: string;
873
+ }
874
+ /**
875
+ * 검색 조회 결과입니다.
876
+ */
877
+ interface TaxInvoiceSearchResult {
878
+ /**
879
+ * 처리 결과입니다.
880
+ */
881
+ operationResult: TaxInvoiceOperationResult;
882
+ /**
883
+ * 총 검색 건수입니다.
884
+ */
885
+ totalCount?: number;
886
+ /**
887
+ * 페이지당 건수입니다.
888
+ */
889
+ pageSize?: number;
890
+ /**
891
+ * 현재 페이지 번호입니다.
892
+ */
893
+ pageNumber?: number;
894
+ /**
895
+ * 전체 페이지 수입니다.
896
+ */
897
+ pageCount?: number;
898
+ /**
899
+ * 문서 요약 목록입니다.
900
+ */
901
+ invoiceSummaries: TaxInvoiceInfo[];
902
+ }
903
+ /**
904
+ * 문서 상태 이력 항목입니다.
905
+ */
906
+ interface TaxInvoiceLogEntry {
907
+ /**
908
+ * 문서 이력 유형 코드입니다.
909
+ */
910
+ documentLogTypeCode?: number;
911
+ /**
912
+ * 로그 메시지입니다.
913
+ */
914
+ logMessage?: string;
915
+ /**
916
+ * 처리 유형 코드입니다.
917
+ */
918
+ processTypeCode?: string;
919
+ /**
920
+ * 처리 회사명입니다.
921
+ */
922
+ processCompanyName?: string;
923
+ /**
924
+ * 처리 담당자명입니다.
925
+ */
926
+ processContactName?: string;
927
+ /**
928
+ * 처리 설명입니다.
929
+ */
930
+ processDescription?: string;
931
+ /**
932
+ * 등록일시(yyyyMMddHHmmss)입니다.
933
+ */
934
+ registeredAt?: string;
935
+ /**
936
+ * 처리 IP 주소입니다.
937
+ */
938
+ ipAddress?: string;
939
+ }
940
+ /**
941
+ * URL 응답 결과입니다.
942
+ */
943
+ interface TaxInvoiceAccessUrl {
944
+ /**
945
+ * 접근 URL입니다.
946
+ */
947
+ accessUrl: string;
948
+ }
949
+ /**
950
+ * 첨부파일 메타데이터입니다.
951
+ */
952
+ interface TaxInvoiceAttachedFile {
953
+ /**
954
+ * 첨부 순번입니다.
955
+ */
956
+ sequenceNumber?: number;
957
+ /**
958
+ * 파일 식별자입니다.
959
+ */
960
+ fileIdentifier?: string;
961
+ /**
962
+ * 표시 이름입니다.
963
+ */
964
+ displayName?: string;
965
+ /**
966
+ * 등록일시(yyyyMMddHHmmss)입니다.
967
+ */
968
+ registeredAt?: string;
969
+ }
970
+ /**
971
+ * 이메일 전송 설정 항목입니다.
972
+ */
973
+ interface TaxInvoiceEmailSendSetting {
974
+ /**
975
+ * 메일 유형 코드입니다.
976
+ */
977
+ emailTypeCode?: string;
978
+ /**
979
+ * 전송 활성화 여부입니다.
980
+ */
981
+ sendEnabled?: boolean;
982
+ }
983
+ /**
984
+ * 국세청 전송 설정입니다.
985
+ */
986
+ interface TaxInvoiceSendToNationalTaxServiceSetting {
987
+ /**
988
+ * 즉시 전송 여부입니다.
989
+ */
990
+ sendToNationalTaxServiceEnabled: boolean;
991
+ }
992
+ /**
993
+ * 인증서 만료일 조회 결과입니다.
994
+ */
995
+ interface TaxInvoiceTaxCertificateExpiration {
996
+ /**
997
+ * 만료일시(yyyyMMddHHmmss)입니다.
998
+ */
999
+ expirationDateTime: string;
1000
+ }
1001
+ /**
1002
+ * 인증서 정보 조회 결과입니다.
1003
+ */
1004
+ interface TaxInvoiceTaxCertificateInfo {
1005
+ /**
1006
+ * 등록일시(yyyyMMddHHmmss)입니다.
1007
+ */
1008
+ registeredAt?: string;
1009
+ /**
1010
+ * 만료일시(yyyyMMddHHmmss)입니다.
1011
+ */
1012
+ expiredAt?: string;
1013
+ /**
1014
+ * 발급자 DN입니다.
1015
+ */
1016
+ issuerDistinguishedName?: string;
1017
+ /**
1018
+ * 인증서 DN입니다.
1019
+ */
1020
+ subjectDistinguishedName?: string;
1021
+ /**
1022
+ * 인증서 종류명입니다.
1023
+ */
1024
+ issuerName?: string;
1025
+ /**
1026
+ * 인증서 정책 OID입니다.
1027
+ */
1028
+ policyObjectIdentifier?: string;
1029
+ /**
1030
+ * 등록 담당자 이름입니다.
1031
+ */
1032
+ registeredContactName?: string;
1033
+ /**
1034
+ * 등록 담당자 아이디입니다.
1035
+ */
1036
+ registeredContactIdentifier?: string;
1037
+ }
1038
+ //#endregion
1039
+ //#region src/services/tax-invoice/types/index.d.ts
1040
+ /**
1041
+ * 세금계산서 문서번호 유형 상수입니다.
1042
+ */
1043
+ declare const TaxInvoiceDocumentKeyTypes: {
1044
+ /**
1045
+ * 코드: `SELL`, 설명: 매출 문서번호 유형
1046
+ */
1047
+ readonly Sales: "SELL";
1048
+ /**
1049
+ * 코드: `BUY`, 설명: 매입 문서번호 유형
1050
+ */
1051
+ readonly Purchase: "BUY";
1052
+ /**
1053
+ * 코드: `TRUSTEE`, 설명: 위수탁 문서번호 유형
1054
+ */
1055
+ readonly Trustee: "TRUSTEE";
1056
+ };
1057
+ /**
1058
+ * 세금계산서 문서번호 유형입니다.
1059
+ */
1060
+ type TaxInvoiceDocumentKeyType = (typeof TaxInvoiceDocumentKeyTypes)[keyof typeof TaxInvoiceDocumentKeyTypes];
1061
+ type TaxInvoiceOutboundDocumentKeyType = Extract<TaxInvoiceDocumentKeyType, typeof TaxInvoiceDocumentKeyTypes.Sales | typeof TaxInvoiceDocumentKeyTypes.Trustee>;
1062
+ type TaxInvoiceReverseRequestDocumentKeyType = typeof TaxInvoiceDocumentKeyTypes.Purchase;
1063
+ type TaxInvoiceReverseRefuseDocumentKeyType = typeof TaxInvoiceDocumentKeyTypes.Sales;
1064
+ /**
1065
+ * 세금계산서 문서함 범위 상수입니다.
1066
+ */
1067
+ declare const TaxInvoiceBoxScopes: {
1068
+ /**
1069
+ * 코드: `TBOX`, 설명: 임시 문서함
1070
+ */
1071
+ readonly TemporaryDocumentBox: "TBOX";
1072
+ /**
1073
+ * 코드: `SWBOX`, 설명: 매출 발행 대기함
1074
+ */
1075
+ readonly SalesIssueWaitingBox: "SWBOX";
1076
+ /**
1077
+ * 코드: `SBOX`, 설명: 매출 문서함
1078
+ */
1079
+ readonly SalesDocumentBox: "SBOX";
1080
+ /**
1081
+ * 코드: `PWBOX`, 설명: 매입 발행 대기함
1082
+ */
1083
+ readonly PurchaseIssueWaitingBox: "PWBOX";
1084
+ /**
1085
+ * 코드: `PBOX`, 설명: 매입 문서함
1086
+ */
1087
+ readonly PurchaseDocumentBox: "PBOX";
1088
+ /**
1089
+ * 코드: `WRITE`, 설명: 정발행 작성
1090
+ */
1091
+ readonly WriteInvoice: "WRITE";
1092
+ };
1093
+ /**
1094
+ * 세금계산서 문서함 범위 값입니다.
1095
+ */
1096
+ type TaxInvoiceBoxScope = (typeof TaxInvoiceBoxScopes)[keyof typeof TaxInvoiceBoxScopes];
1097
+ /**
1098
+ * 검색일자 유형 상수입니다.
1099
+ */
1100
+ declare const TaxInvoiceDateType: {
1101
+ /**
1102
+ * 코드: `R`, 설명: 등록일자
1103
+ */
1104
+ readonly Registered: "R";
1105
+ /**
1106
+ * 코드: `W`, 설명: 작성일자
1107
+ */
1108
+ readonly Written: "W";
1109
+ /**
1110
+ * 코드: `I`, 설명: 발행일자
1111
+ */
1112
+ readonly Issued: "I";
1113
+ };
1114
+ /**
1115
+ * 검색일자 유형입니다.
1116
+ */
1117
+ type TaxInvoiceDateType = (typeof TaxInvoiceDateType)[keyof typeof TaxInvoiceDateType];
1118
+ /**
1119
+ * `packages/popbill` 검색 입력에서 허용하는 일자 타입입니다.
1120
+ */
1121
+ type TaxInvoiceDateInput = TaxInvoiceDateString | Date;
1122
+ /**
1123
+ * 검색 정렬 방향 상수입니다.
1124
+ */
1125
+ declare const TaxInvoiceSortOrder: {
1126
+ /**
1127
+ * 코드: `D`, 설명: 내림차순
1128
+ */
1129
+ readonly Descending: "D";
1130
+ /**
1131
+ * 코드: `A`, 설명: 오름차순
1132
+ */
1133
+ readonly Ascending: "A";
1134
+ };
1135
+ /**
1136
+ * 검색 정렬 방향 코드입니다.
1137
+ */
1138
+ type TaxInvoiceSortOrder = (typeof TaxInvoiceSortOrder)[keyof typeof TaxInvoiceSortOrder];
1139
+ /**
1140
+ * 검색 상태코드 패턴입니다.
1141
+ *
1142
+ * 첫 자리는 숫자, 2/3번째 자리는 숫자 또는 `*`를 허용합니다.
1143
+ * 예) `300`, `3**`, `60*`
1144
+ */
1145
+ type TaxInvoiceSearchStateCode = string;
1146
+ /**
1147
+ * 검색 문서유형 코드 상수입니다.
1148
+ */
1149
+ declare const TaxInvoiceSearchInvoiceTypeCodes: {
1150
+ /**
1151
+ * 코드: `N`, 설명: 세금계산서
1152
+ */
1153
+ readonly Normal: "N";
1154
+ /**
1155
+ * 코드: `M`, 설명: 수정세금계산서
1156
+ */
1157
+ readonly Modified: "M";
1158
+ };
1159
+ /**
1160
+ * 검색 문서유형 코드입니다.
1161
+ */
1162
+ type TaxInvoiceSearchInvoiceTypeCode = (typeof TaxInvoiceSearchInvoiceTypeCodes)[keyof typeof TaxInvoiceSearchInvoiceTypeCodes];
1163
+ /**
1164
+ * 검색 과세형태 코드 상수입니다.
1165
+ */
1166
+ declare const TaxInvoiceSearchTaxationTypeCodes: {
1167
+ /**
1168
+ * 코드: `T`, 설명: 과세
1169
+ */
1170
+ readonly Taxable: "T";
1171
+ /**
1172
+ * 코드: `N`, 설명: 면세
1173
+ */
1174
+ readonly Exempt: "N";
1175
+ /**
1176
+ * 코드: `Z`, 설명: 영세
1177
+ */
1178
+ readonly ZeroRated: "Z";
1179
+ };
1180
+ /**
1181
+ * 검색 과세형태 코드입니다.
1182
+ */
1183
+ type TaxInvoiceSearchTaxationTypeCode = (typeof TaxInvoiceSearchTaxationTypeCodes)[keyof typeof TaxInvoiceSearchTaxationTypeCodes];
1184
+ /**
1185
+ * 검색 발행형태 코드 상수입니다.
1186
+ */
1187
+ declare const TaxInvoiceSearchIssueTypeCodes: {
1188
+ /**
1189
+ * 코드: `N`, 설명: 정발행
1190
+ */
1191
+ readonly Normal: "N";
1192
+ /**
1193
+ * 코드: `R`, 설명: 역발행
1194
+ */
1195
+ readonly Reverse: "R";
1196
+ /**
1197
+ * 코드: `T`, 설명: 위수탁
1198
+ */
1199
+ readonly Trustee: "T";
1200
+ };
1201
+ /**
1202
+ * 검색 발행형태 코드입니다.
1203
+ */
1204
+ type TaxInvoiceSearchIssueTypeCode = (typeof TaxInvoiceSearchIssueTypeCodes)[keyof typeof TaxInvoiceSearchIssueTypeCodes];
1205
+ /**
1206
+ * 검색 종사업장번호 주체 코드 상수입니다.
1207
+ */
1208
+ declare const TaxInvoiceSearchTaxRegistrationIdentifierTypes: {
1209
+ /**
1210
+ * 코드: `S`, 설명: 공급자
1211
+ */
1212
+ readonly Supplier: "S";
1213
+ /**
1214
+ * 코드: `B`, 설명: 공급받는자
1215
+ */
1216
+ readonly Buyer: "B";
1217
+ /**
1218
+ * 코드: `T`, 설명: 수탁자
1219
+ */
1220
+ readonly Trustee: "T";
1221
+ };
1222
+ /**
1223
+ * 검색 종사업장번호 주체 코드입니다.
1224
+ */
1225
+ type TaxInvoiceSearchTaxRegistrationIdentifierType = (typeof TaxInvoiceSearchTaxRegistrationIdentifierTypes)[keyof typeof TaxInvoiceSearchTaxRegistrationIdentifierTypes];
1226
+ /**
1227
+ * 검색 종사업장번호 유무 코드 상수입니다.
1228
+ */
1229
+ declare const TaxInvoiceSearchTaxRegistrationIdentifierAvailabilities: {
1230
+ /**
1231
+ * 코드: `0`, 설명: 종사업장번호 없음
1232
+ */
1233
+ readonly No: "0";
1234
+ /**
1235
+ * 코드: `1`, 설명: 종사업장번호 있음
1236
+ */
1237
+ readonly Yes: "1";
1238
+ };
1239
+ /**
1240
+ * 검색 종사업장번호 유무 코드입니다.
1241
+ */
1242
+ type TaxInvoiceSearchTaxRegistrationIdentifierAvailability = (typeof TaxInvoiceSearchTaxRegistrationIdentifierAvailabilities)[keyof typeof TaxInvoiceSearchTaxRegistrationIdentifierAvailabilities];
1243
+ /**
1244
+ * 검색 작성유형 코드 상수입니다.
1245
+ */
1246
+ declare const TaxInvoiceSearchInteroperabilityTypes: {
1247
+ /**
1248
+ * 코드: `0`, 설명: 팝빌 웹 작성
1249
+ */
1250
+ readonly PopbillWeb: "0";
1251
+ /**
1252
+ * 코드: `1`, 설명: API 작성
1253
+ */
1254
+ readonly Api: "1";
1255
+ };
1256
+ /**
1257
+ * 검색 작성유형 코드입니다.
1258
+ */
1259
+ type TaxInvoiceSearchInteroperabilityType = (typeof TaxInvoiceSearchInteroperabilityTypes)[keyof typeof TaxInvoiceSearchInteroperabilityTypes];
1260
+ /**
1261
+ * 검색 등록유형 코드 상수입니다.
1262
+ */
1263
+ declare const TaxInvoiceSearchRegistrationTypeCodes: {
1264
+ /**
1265
+ * 코드: `P`, 설명: 팝빌 등록(발행)
1266
+ */
1267
+ readonly Popbill: "P";
1268
+ /**
1269
+ * 코드: `H`, 설명: 홈택스/ASP 등록(발행)
1270
+ */
1271
+ readonly HomeTax: "H";
1272
+ };
1273
+ /**
1274
+ * 검색 등록유형 코드입니다.
1275
+ */
1276
+ type TaxInvoiceSearchRegistrationTypeCode = (typeof TaxInvoiceSearchRegistrationTypeCodes)[keyof typeof TaxInvoiceSearchRegistrationTypeCodes];
1277
+ /**
1278
+ * 검색 조건의 휴폐업 상태 상수입니다.
1279
+ */
1280
+ declare const TaxInvoiceCloseDownStateCodes: {
1281
+ /**
1282
+ * 코드: `N`, 설명: 미확인
1283
+ */
1284
+ readonly NotChecked: "N";
1285
+ /**
1286
+ * 코드: `0`, 설명: 미등록
1287
+ */
1288
+ readonly NotRegistered: "0";
1289
+ /**
1290
+ * 코드: `1`, 설명: 사업중
1291
+ */
1292
+ readonly Operating: "1";
1293
+ /**
1294
+ * 코드: `2`, 설명: 폐업
1295
+ */
1296
+ readonly Closed: "2";
1297
+ /**
1298
+ * 코드: `3`, 설명: 휴업
1299
+ */
1300
+ readonly Suspended: "3";
1301
+ /**
1302
+ * 코드: `4`, 설명: 확인실패
1303
+ */
1304
+ readonly CheckFailed: "4";
1305
+ };
1306
+ /**
1307
+ * 검색 조건의 휴폐업 상태 코드입니다.
1308
+ */
1309
+ type TaxInvoiceCloseDownStateCode = (typeof TaxInvoiceCloseDownStateCodes)[keyof typeof TaxInvoiceCloseDownStateCodes];
1310
+ /**
1311
+ * 전자명세서 문서유형 코드 상수입니다.
1312
+ */
1313
+ declare const TaxInvoiceStatementItemCodes: {
1314
+ /**
1315
+ * 코드: `121`, 설명: 거래명세서
1316
+ */
1317
+ readonly TradeStatement: 121;
1318
+ /**
1319
+ * 코드: `122`, 설명: 청구서
1320
+ */
1321
+ readonly Invoice: 122;
1322
+ /**
1323
+ * 코드: `123`, 설명: 견적서
1324
+ */
1325
+ readonly Estimate: 123;
1326
+ /**
1327
+ * 코드: `124`, 설명: 발주서
1328
+ */
1329
+ readonly PurchaseOrder: 124;
1330
+ /**
1331
+ * 코드: `125`, 설명: 입금표
1332
+ */
1333
+ readonly Deposit: 125;
1334
+ /**
1335
+ * 코드: `126`, 설명: 영수증
1336
+ */
1337
+ readonly Receipt: 126;
1338
+ };
1339
+ /**
1340
+ * 전자명세서 문서유형 코드입니다.
1341
+ */
1342
+ type TaxInvoiceStatementItemCode = (typeof TaxInvoiceStatementItemCodes)[keyof typeof TaxInvoiceStatementItemCodes];
1343
+ /**
1344
+ * 메일 전송 유형 코드 상수입니다.
1345
+ */
1346
+ declare const TaxInvoiceEmailTypes: {
1347
+ /**
1348
+ * 코드: `ETC_CERT_EXPIRATION`, 설명: 인증서 만료 안내
1349
+ */
1350
+ readonly EtcCertExpiration: "ETC_CERT_EXPIRATION";
1351
+ /**
1352
+ * 코드: `TAX_CANCEL_ISSUE`, 설명: 발행취소
1353
+ */
1354
+ readonly TaxCancelIssue: "TAX_CANCEL_ISSUE";
1355
+ /**
1356
+ * 코드: `TAX_CANCEL_REQUEST`, 설명: 역발행 요청 취소
1357
+ */
1358
+ readonly TaxCancelRequest: "TAX_CANCEL_REQUEST";
1359
+ /**
1360
+ * 코드: `TAX_CHECK`, 설명: 수신확인
1361
+ */
1362
+ readonly TaxCheck: "TAX_CHECK";
1363
+ /**
1364
+ * 코드: `TAX_CLOSEDOWN`, 설명: 휴폐업 알림
1365
+ */
1366
+ readonly TaxClosedown: "TAX_CLOSEDOWN";
1367
+ /**
1368
+ * 코드: `TAX_ISSUE`, 설명: 발행완료(수신자)
1369
+ */
1370
+ readonly TaxIssue: "TAX_ISSUE";
1371
+ /**
1372
+ * 코드: `TAX_ISSUE_INVOICER`, 설명: 발행완료(공급자)
1373
+ */
1374
+ readonly TaxIssueInvoicer: "TAX_ISSUE_INVOICER";
1375
+ /**
1376
+ * 코드: `TAX_NTSFAIL_INVOICER`, 설명: 국세청 전송실패(공급자)
1377
+ */
1378
+ readonly TaxNtsFailInvoicer: "TAX_NTSFAIL_INVOICER";
1379
+ /**
1380
+ * 코드: `TAX_REFUSE`, 설명: 역발행 거부
1381
+ */
1382
+ readonly TaxRefuse: "TAX_REFUSE";
1383
+ /**
1384
+ * 코드: `TAX_REQUEST`, 설명: 역발행 요청
1385
+ */
1386
+ readonly TaxRequest: "TAX_REQUEST";
1387
+ /**
1388
+ * 코드: `TAX_REVERSE_ISSUE`, 설명: 역발행 완료
1389
+ */
1390
+ readonly TaxReverseIssue: "TAX_REVERSE_ISSUE";
1391
+ /**
1392
+ * 코드: `TAX_TRUST_CANCEL_ISSUE`, 설명: 위수탁 발행취소
1393
+ */
1394
+ readonly TaxTrustCancelIssue: "TAX_TRUST_CANCEL_ISSUE";
1395
+ /**
1396
+ * 코드: `TAX_TRUST_CANCEL_ISSUE_INVOICER`, 설명: 위수탁 발행취소(공급자)
1397
+ */
1398
+ readonly TaxTrustCancelIssueInvoicer: "TAX_TRUST_CANCEL_ISSUE_INVOICER";
1399
+ /**
1400
+ * 코드: `TAX_TRUST_ISSUE`, 설명: 위수탁 발행완료
1401
+ */
1402
+ readonly TaxTrustIssue: "TAX_TRUST_ISSUE";
1403
+ /**
1404
+ * 코드: `TAX_TRUST_ISSUE_INVOICER`, 설명: 위수탁 발행완료(공급자)
1405
+ */
1406
+ readonly TaxTrustIssueInvoicer: "TAX_TRUST_ISSUE_INVOICER";
1407
+ /**
1408
+ * 코드: `TAX_TRUST_ISSUE_TRUSTEE`, 설명: 위수탁 발행완료(수탁자)
1409
+ */
1410
+ readonly TaxTrustIssueTrustee: "TAX_TRUST_ISSUE_TRUSTEE";
1411
+ /**
1412
+ * 코드: `TAX_ACCEPT`, 설명: 역발행 승인(legacy)
1413
+ */
1414
+ readonly TaxAccept: "TAX_ACCEPT";
1415
+ /**
1416
+ * 코드: `TAX_DENY`, 설명: 역발행 거부(legacy)
1417
+ */
1418
+ readonly TaxDeny: "TAX_DENY";
1419
+ /**
1420
+ * 코드: `TAX_CANCEL_SEND`, 설명: 발행안함 취소(legacy)
1421
+ */
1422
+ readonly TaxCancelSend: "TAX_CANCEL_SEND";
1423
+ };
1424
+ /**
1425
+ * 메일 전송 유형 코드입니다.
1426
+ */
1427
+ type TaxInvoiceEmailType = (typeof TaxInvoiceEmailTypes)[keyof typeof TaxInvoiceEmailTypes];
1428
+ /**
1429
+ * 수정세금계산서 사유코드입니다.
1430
+ */
1431
+ declare const TaxInvoiceModificationCodes: {
1432
+ readonly CorrectingEntryErrors: 1;
1433
+ readonly SupplyAmountAdjustment: 2;
1434
+ readonly Return: 3;
1435
+ readonly ContractCancellation: 4;
1436
+ readonly PostIssuedDomesticLetterOfCredit: 5;
1437
+ readonly DuplicateIssuanceByMistake: 6;
1438
+ };
1439
+ /**
1440
+ * 수정세금계산서 사유코드입니다.
1441
+ */
1442
+ type TaxInvoiceModificationCode = TaxInvoiceModificationReasonCode;
1443
+ /**
1444
+ * 사업자번호 입력이 필요한 요청의 공통 필드입니다.
1445
+ */
1446
+ interface TaxInvoiceBusinessRequest {
1447
+ /**
1448
+ * 팝빌 회원 사업자번호입니다.
1449
+ */
1450
+ businessNumber: string;
1451
+ }
1452
+ /**
1453
+ * 문서 식별(문서번호 유형 + 문서번호)이 필요한 요청의 공통 필드입니다.
1454
+ */
1455
+ interface TaxInvoiceDocumentRequest<TKeyType extends TaxInvoiceDocumentKeyType = TaxInvoiceDocumentKeyType> extends TaxInvoiceBusinessRequest {
1456
+ /**
1457
+ * 문서번호 유형입니다.
1458
+ */
1459
+ invoiceDocumentKeyType: TKeyType;
1460
+ /**
1461
+ * 파트너가 관리하는 문서번호입니다.
1462
+ */
1463
+ invoiceManagementKey: string;
1464
+ }
1465
+ /**
1466
+ * 즉시 발행 요청 입력입니다.
1467
+ */
1468
+ interface IssueInvoiceImmediatelyInput extends TaxInvoiceBusinessRequest {
1469
+ /**
1470
+ * 발행할 세금계산서 문서 원본입니다.
1471
+ */
1472
+ taxInvoiceDocument: TaxInvoiceDocumentInput;
1473
+ /**
1474
+ * 거래명세서 동시작성 여부입니다.
1475
+ */
1476
+ writeSpecification?: boolean;
1477
+ /**
1478
+ * 지연발행 허용 여부입니다.
1479
+ */
1480
+ forceIssue?: boolean;
1481
+ /**
1482
+ * 상태 이력에 남길 메모입니다.
1483
+ */
1484
+ historyMemo?: string;
1485
+ /**
1486
+ * 발행 안내 메일 제목입니다.
1487
+ */
1488
+ emailSubject?: string;
1489
+ /**
1490
+ * 거래명세서 관리번호입니다.
1491
+ */
1492
+ dealInvoiceManagementKey?: string;
1493
+ }
1494
+ /**
1495
+ * 초대량 발행 접수 요청 입력입니다.
1496
+ */
1497
+ interface SubmitBulkIssueInput extends TaxInvoiceBusinessRequest {
1498
+ /**
1499
+ * 초대량 접수 식별자(SubmitID)입니다.
1500
+ */
1501
+ submissionIdentifier: string;
1502
+ /**
1503
+ * 접수할 세금계산서 문서 목록입니다.
1504
+ */
1505
+ taxInvoiceDocuments: TaxInvoiceDocumentInput[];
1506
+ /**
1507
+ * 지연발행 허용 여부입니다.
1508
+ */
1509
+ forceIssue?: boolean;
1510
+ }
1511
+ /**
1512
+ * 초대량 접수결과 조회 요청 입력입니다.
1513
+ */
1514
+ interface GetBulkIssueSubmissionResultInput extends TaxInvoiceBusinessRequest {
1515
+ /**
1516
+ * 조회할 초대량 접수 식별자(SubmitID)입니다.
1517
+ */
1518
+ submissionIdentifier: string;
1519
+ }
1520
+ /**
1521
+ * 임시저장 요청 입력입니다.
1522
+ */
1523
+ interface RegisterInvoiceInput extends TaxInvoiceBusinessRequest {
1524
+ /**
1525
+ * 임시저장할 세금계산서 문서 원본입니다.
1526
+ */
1527
+ taxInvoiceDocument: TaxInvoiceDocumentInput;
1528
+ }
1529
+ /**
1530
+ * 문서 수정 요청 입력입니다.
1531
+ */
1532
+ interface UpdateInvoiceInput extends TaxInvoiceDocumentRequest<TaxInvoiceOutboundDocumentKeyType> {
1533
+ /**
1534
+ * 수정 대상 문서번호 유형입니다. 매출(`SELL`) 또는 위수탁(`TRUSTEE`)만 사용할 수 있습니다.
1535
+ */
1536
+ invoiceDocumentKeyType: TaxInvoiceOutboundDocumentKeyType;
1537
+ /**
1538
+ * 수정할 세금계산서 문서 원본입니다.
1539
+ */
1540
+ taxInvoiceDocument: TaxInvoiceDocumentInput;
1541
+ }
1542
+ /**
1543
+ * 저장된 문서 발행 요청 입력입니다.
1544
+ */
1545
+ interface IssueInvoiceInput extends TaxInvoiceDocumentRequest<TaxInvoiceOutboundDocumentKeyType> {
1546
+ /**
1547
+ * 발행 대상 문서번호 유형입니다. 매출(`SELL`) 또는 위수탁(`TRUSTEE`)만 사용할 수 있습니다.
1548
+ */
1549
+ invoiceDocumentKeyType: TaxInvoiceOutboundDocumentKeyType;
1550
+ /**
1551
+ * 상태 이력에 남길 메모입니다.
1552
+ */
1553
+ historyMemo: string;
1554
+ /**
1555
+ * 발행 안내 메일 제목입니다.
1556
+ */
1557
+ emailSubject?: string;
1558
+ /**
1559
+ * 지연발행 허용 여부입니다.
1560
+ */
1561
+ forceIssue?: boolean;
1562
+ }
1563
+ /**
1564
+ * 발행취소 요청 입력입니다.
1565
+ */
1566
+ interface CancelIssuedInvoiceInput extends TaxInvoiceDocumentRequest<TaxInvoiceOutboundDocumentKeyType> {
1567
+ /**
1568
+ * 발행취소 대상 문서번호 유형입니다. 매출(`SELL`) 또는 위수탁(`TRUSTEE`)만 사용할 수 있습니다.
1569
+ */
1570
+ invoiceDocumentKeyType: TaxInvoiceOutboundDocumentKeyType;
1571
+ /**
1572
+ * 상태 이력에 남길 메모입니다.
1573
+ */
1574
+ historyMemo: string;
1575
+ }
1576
+ /**
1577
+ * 역발행 즉시 요청 입력입니다.
1578
+ */
1579
+ interface RequestReverseIssueImmediatelyInput extends TaxInvoiceBusinessRequest {
1580
+ /**
1581
+ * 역발행 요청할 세금계산서 문서 원본입니다.
1582
+ */
1583
+ taxInvoiceDocument: TaxInvoiceDocumentInput;
1584
+ /**
1585
+ * 상태 이력에 남길 메모입니다.
1586
+ */
1587
+ historyMemo: string;
1588
+ }
1589
+ /**
1590
+ * 역발행 요청 입력입니다.
1591
+ */
1592
+ interface RequestReverseIssueInput extends TaxInvoiceDocumentRequest<TaxInvoiceReverseRequestDocumentKeyType> {
1593
+ /**
1594
+ * 역발행 요청 대상 문서번호 유형입니다. 매입(`BUY`)만 사용할 수 있습니다.
1595
+ */
1596
+ invoiceDocumentKeyType: TaxInvoiceReverseRequestDocumentKeyType;
1597
+ /**
1598
+ * 상태 이력에 남길 메모입니다.
1599
+ */
1600
+ historyMemo: string;
1601
+ }
1602
+ /**
1603
+ * 역발행 요청취소 입력입니다.
1604
+ */
1605
+ interface CancelReverseIssueRequestInput extends TaxInvoiceDocumentRequest<TaxInvoiceReverseRequestDocumentKeyType> {
1606
+ /**
1607
+ * 역발행 요청취소 대상 문서번호 유형입니다. 매입(`BUY`)만 사용할 수 있습니다.
1608
+ */
1609
+ invoiceDocumentKeyType: TaxInvoiceReverseRequestDocumentKeyType;
1610
+ /**
1611
+ * 상태 이력에 남길 메모입니다.
1612
+ */
1613
+ historyMemo: string;
1614
+ }
1615
+ /**
1616
+ * 역발행 요청거부 입력입니다.
1617
+ */
1618
+ interface RefuseReverseIssueRequestInput extends TaxInvoiceDocumentRequest<TaxInvoiceReverseRefuseDocumentKeyType> {
1619
+ /**
1620
+ * 역발행 요청거부 대상 문서번호 유형입니다. 매출(`SELL`)만 사용할 수 있습니다.
1621
+ */
1622
+ invoiceDocumentKeyType: TaxInvoiceReverseRefuseDocumentKeyType;
1623
+ /**
1624
+ * 상태 이력에 남길 메모입니다.
1625
+ */
1626
+ historyMemo: string;
1627
+ }
1628
+ /**
1629
+ * 국세청 즉시 전송 입력입니다.
1630
+ */
1631
+ interface SendInvoiceToNationalTaxServiceInput extends TaxInvoiceDocumentRequest<TaxInvoiceOutboundDocumentKeyType> {
1632
+ /**
1633
+ * 국세청 전송 대상 문서번호 유형입니다. 매출(`SELL`) 또는 위수탁(`TRUSTEE`)만 사용할 수 있습니다.
1634
+ */
1635
+ invoiceDocumentKeyType: TaxInvoiceOutboundDocumentKeyType;
1636
+ }
1637
+ /**
1638
+ * 다건 상태 조회 요청 입력입니다.
1639
+ */
1640
+ interface GetInvoicesInfoInput extends TaxInvoiceBusinessRequest {
1641
+ /**
1642
+ * 조회 대상 문서번호 유형입니다.
1643
+ */
1644
+ invoiceDocumentKeyType: TaxInvoiceDocumentKeyType;
1645
+ /**
1646
+ * 조회 대상 문서번호 목록입니다.
1647
+ */
1648
+ invoiceManagementKeys: string[];
1649
+ }
1650
+ /**
1651
+ * 검색 요청 입력입니다.
1652
+ */
1653
+ interface SearchInvoicesInput extends TaxInvoiceBusinessRequest {
1654
+ /**
1655
+ * 조회 대상 문서번호 유형입니다.
1656
+ */
1657
+ invoiceDocumentKeyType: TaxInvoiceDocumentKeyType;
1658
+ /**
1659
+ * 검색 기준 일자 유형입니다.
1660
+ */
1661
+ searchDateType: TaxInvoiceDateType;
1662
+ /**
1663
+ * 검색 시작일자(yyyyMMdd)입니다. `Date` 입력 시 KST 기준으로 변환됩니다.
1664
+ */
1665
+ startDate: TaxInvoiceDateInput;
1666
+ /**
1667
+ * 검색 종료일자(yyyyMMdd)입니다. `Date` 입력 시 KST 기준으로 변환됩니다.
1668
+ */
1669
+ endDate: TaxInvoiceDateInput;
1670
+ /**
1671
+ * 세금계산서 상태코드 필터입니다. 2/3번째 자리는 와일드카드(`*`)를 허용합니다. 예) `3**`, `60*`
1672
+ */
1673
+ invoiceStateCodes: TaxInvoiceSearchStateCode[];
1674
+ /**
1675
+ * 문서 유형 필터입니다.
1676
+ */
1677
+ invoiceTypeCodes: TaxInvoiceSearchInvoiceTypeCode[];
1678
+ /**
1679
+ * 과세형태 필터입니다.
1680
+ */
1681
+ taxationTypeCodes: TaxInvoiceSearchTaxationTypeCode[];
1682
+ /**
1683
+ * 지연발행 문서만 조회할지 여부입니다.
1684
+ */
1685
+ lateIssueOnly: boolean | null;
1686
+ /**
1687
+ * 정렬 방향입니다.
1688
+ */
1689
+ sortOrder: TaxInvoiceSortOrder;
1690
+ /**
1691
+ * 조회할 페이지 번호입니다.
1692
+ */
1693
+ pageNumber: number;
1694
+ /**
1695
+ * 페이지당 조회 건수입니다.
1696
+ */
1697
+ pageSize: number;
1698
+ /**
1699
+ * 종사업장번호 주체 필터입니다.
1700
+ */
1701
+ taxRegistrationIdentifierType?: TaxInvoiceSearchTaxRegistrationIdentifierType;
1702
+ /**
1703
+ * 종사업장번호 존재 여부 필터입니다.
1704
+ */
1705
+ taxRegistrationIdentifierAvailability?: TaxInvoiceSearchTaxRegistrationIdentifierAvailability;
1706
+ /**
1707
+ * 종사업장번호 필터입니다.
1708
+ */
1709
+ taxRegistrationIdentifier?: string;
1710
+ /**
1711
+ * 검색어(상호/사업자번호/문서번호 등)입니다.
1712
+ */
1713
+ queryText?: string;
1714
+ /**
1715
+ * 작성유형(연동/API) 필터입니다.
1716
+ */
1717
+ interoperabilityType?: TaxInvoiceSearchInteroperabilityType;
1718
+ /**
1719
+ * 발행형태 필터입니다.
1720
+ */
1721
+ issueTypeCodes?: TaxInvoiceSearchIssueTypeCode[];
1722
+ /**
1723
+ * 등록유형 필터입니다.
1724
+ */
1725
+ registrationTypeCodes?: TaxInvoiceSearchRegistrationTypeCode[];
1726
+ /**
1727
+ * 휴폐업상태 필터입니다.
1728
+ */
1729
+ closeDownStateCodes?: TaxInvoiceCloseDownStateCode[];
1730
+ /**
1731
+ * 문서번호 또는 국세청승인번호 필터입니다.
1732
+ */
1733
+ invoiceManagementKeyOrNationalTaxServiceConfirmationNumber?: string;
1734
+ }
1735
+ /**
1736
+ * 문서함 URL 조회 요청 입력입니다.
1737
+ */
1738
+ interface GetTaxInvoiceBoxURLInput extends TaxInvoiceBusinessRequest {
1739
+ /**
1740
+ * 조회할 세금계산서 문서함 범위입니다.
1741
+ */
1742
+ taxInvoiceBoxScope: TaxInvoiceBoxScope;
1743
+ }
1744
+ /**
1745
+ * 다건 인쇄 URL 요청 입력입니다.
1746
+ */
1747
+ interface GetBulkInvoicePrintURLInput extends TaxInvoiceBusinessRequest {
1748
+ /**
1749
+ * 인쇄 대상 문서번호 유형입니다.
1750
+ */
1751
+ invoiceDocumentKeyType: TaxInvoiceDocumentKeyType;
1752
+ /**
1753
+ * 인쇄 대상 문서번호 목록입니다.
1754
+ */
1755
+ invoiceManagementKeys: string[];
1756
+ }
1757
+ /**
1758
+ * 인감 및 첨부문서 등록 URL 조회 요청 입력입니다.
1759
+ */
1760
+ type GetSealAndAttachmentRegistrationURLInput = TaxInvoiceBusinessRequest;
1761
+ /**
1762
+ * 파일 경로 기반 첨부 요청 입력입니다.
1763
+ */
1764
+ interface AttachFileFromPathInput extends TaxInvoiceDocumentRequest {
1765
+ /**
1766
+ * 팝빌에 표시할 첨부파일명입니다.
1767
+ */
1768
+ displayName: string;
1769
+ /**
1770
+ * 업로드할 파일의 로컬 경로입니다.
1771
+ */
1772
+ filePath: string;
1773
+ }
1774
+ /**
1775
+ * 바이너리 기반 첨부 요청 입력입니다.
1776
+ */
1777
+ interface AttachFileFromBinaryInput extends TaxInvoiceDocumentRequest {
1778
+ /**
1779
+ * 업로드할 파일명입니다.
1780
+ */
1781
+ fileName: string;
1782
+ /**
1783
+ * 업로드할 파일 바이너리 데이터입니다.
1784
+ */
1785
+ fileData: Buffer;
1786
+ }
1787
+ /**
1788
+ * 첨부파일 삭제 요청 입력입니다.
1789
+ */
1790
+ interface DeleteAttachedFileInput extends TaxInvoiceDocumentRequest {
1791
+ /**
1792
+ * 삭제할 첨부파일 식별자(FileID)입니다.
1793
+ */
1794
+ fileIdentifier: string;
1795
+ }
1796
+ /**
1797
+ * 이메일 재전송 요청 입력입니다.
1798
+ */
1799
+ interface ResendInvoiceEmailInput extends TaxInvoiceDocumentRequest {
1800
+ /**
1801
+ * 재전송할 수신자 이메일 주소입니다.
1802
+ */
1803
+ receiverEmailAddress: string;
1804
+ }
1805
+ /**
1806
+ * 문자 재전송 요청 입력입니다.
1807
+ */
1808
+ interface ResendInvoiceSMSInput extends TaxInvoiceDocumentRequest {
1809
+ /**
1810
+ * 발신자 전화번호입니다.
1811
+ */
1812
+ senderPhoneNumber: string;
1813
+ /**
1814
+ * 수신자 전화번호입니다.
1815
+ */
1816
+ receiverPhoneNumber: string;
1817
+ /**
1818
+ * 재전송할 문자 본문입니다.
1819
+ */
1820
+ messageBody: string;
1821
+ }
1822
+ /**
1823
+ * 팩스 재전송 요청 입력입니다.
1824
+ */
1825
+ interface ResendInvoiceFAXInput extends TaxInvoiceDocumentRequest {
1826
+ /**
1827
+ * 발신 팩스번호입니다.
1828
+ */
1829
+ senderNumber: string;
1830
+ /**
1831
+ * 수신 팩스번호입니다.
1832
+ */
1833
+ receiverNumber: string;
1834
+ }
1835
+ /**
1836
+ * 전자명세서 첨부 요청 입력입니다.
1837
+ */
1838
+ interface AttachInvoiceStatementInput extends TaxInvoiceDocumentRequest {
1839
+ /**
1840
+ * 첨부할 전자명세서 문서 유형 코드입니다.
1841
+ */
1842
+ statementItemCode: TaxInvoiceStatementItemCode;
1843
+ /**
1844
+ * 첨부할 전자명세서 관리번호입니다.
1845
+ */
1846
+ statementManagementKey: string;
1847
+ }
1848
+ /**
1849
+ * 전자명세서 첨부해제 요청 입력입니다.
1850
+ */
1851
+ interface DetachInvoiceStatementInput extends TaxInvoiceDocumentRequest {
1852
+ /**
1853
+ * 첨부해제할 전자명세서 문서 유형 코드입니다.
1854
+ */
1855
+ statementItemCode: TaxInvoiceStatementItemCode;
1856
+ /**
1857
+ * 첨부해제할 전자명세서 관리번호입니다.
1858
+ */
1859
+ statementManagementKey: string;
1860
+ }
1861
+ /**
1862
+ * 문서번호 할당 요청 입력입니다.
1863
+ */
1864
+ interface AssignInvoiceManagementKeyInput extends TaxInvoiceBusinessRequest {
1865
+ /**
1866
+ * 할당 대상 문서번호 유형입니다.
1867
+ */
1868
+ invoiceDocumentKeyType: TaxInvoiceDocumentKeyType;
1869
+ /**
1870
+ * 팝빌 문서 식별키(ItemKey)입니다.
1871
+ */
1872
+ itemKey: string;
1873
+ /**
1874
+ * 새로 할당할 문서번호입니다.
1875
+ */
1876
+ invoiceManagementKey: string;
1877
+ }
1878
+ /**
1879
+ * 이메일 전송설정 수정 입력입니다.
1880
+ */
1881
+ interface UpdateEmailSendSettingsInput extends TaxInvoiceBusinessRequest {
1882
+ /**
1883
+ * 수정할 메일 전송 유형 코드입니다.
1884
+ */
1885
+ emailType: TaxInvoiceEmailType;
1886
+ /**
1887
+ * 전송 활성화 여부입니다.
1888
+ */
1889
+ sendEnabled: boolean;
1890
+ }
1891
+ /**
1892
+ * TaxInvoice modern facade 서비스 인터페이스입니다.
1893
+ *
1894
+ * 모든 메서드는 `input`만 받으며,
1895
+ * 실패 시 `PopbillApiError`를 throw 합니다.
1896
+ */
1897
+ interface TaxInvoiceService {
1898
+ /**
1899
+ * 등록과 동시에 세금계산서를 즉시 발행합니다.
1900
+ *
1901
+ * Compat: `registIssue`
1902
+ */
1903
+ issueInvoiceImmediately(input: IssueInvoiceImmediatelyInput): Promise<TaxInvoiceIssueResult>;
1904
+ /**
1905
+ * 초대량 발행을 접수합니다.
1906
+ *
1907
+ * Compat: `bulkSubmit`
1908
+ */
1909
+ submitBulkIssue(input: SubmitBulkIssueInput): Promise<TaxInvoiceBulkSubmitResult>;
1910
+ /**
1911
+ * 초대량 발행 접수결과를 조회합니다.
1912
+ *
1913
+ * Compat: `getBulkResult`
1914
+ */
1915
+ getBulkIssueSubmissionResult(input: GetBulkIssueSubmissionResultInput): Promise<TaxInvoiceBulkIssueSubmissionResult>;
1916
+ /**
1917
+ * 세금계산서를 임시저장합니다.
1918
+ *
1919
+ * Compat: `register`
1920
+ */
1921
+ registerInvoice(input: RegisterInvoiceInput): Promise<TaxInvoiceOperationResult>;
1922
+ /**
1923
+ * 임시저장 문서를 수정합니다.
1924
+ *
1925
+ * Compat: `update`
1926
+ */
1927
+ updateInvoice(input: UpdateInvoiceInput): Promise<TaxInvoiceOperationResult>;
1928
+ /**
1929
+ * 저장된 문서를 발행합니다.
1930
+ *
1931
+ * Compat: `issue`
1932
+ */
1933
+ issueInvoice(input: IssueInvoiceInput): Promise<TaxInvoiceIssueResult>;
1934
+ /**
1935
+ * 발행된 문서를 취소합니다.
1936
+ *
1937
+ * Compat: `cancelIssue`
1938
+ */
1939
+ cancelIssuedInvoice(input: CancelIssuedInvoiceInput): Promise<TaxInvoiceOperationResult>;
1940
+ /**
1941
+ * 등록과 동시에 역발행 요청을 보냅니다.
1942
+ *
1943
+ * Compat: `registRequest`
1944
+ */
1945
+ requestReverseIssueImmediately(input: RequestReverseIssueImmediatelyInput): Promise<TaxInvoiceOperationResult>;
1946
+ /**
1947
+ * 저장된 문서로 역발행 요청을 보냅니다.
1948
+ *
1949
+ * Compat: `request`
1950
+ */
1951
+ requestReverseIssue(input: RequestReverseIssueInput): Promise<TaxInvoiceOperationResult>;
1952
+ /**
1953
+ * 역발행 요청을 취소합니다.
1954
+ *
1955
+ * Compat: `cancelRequest`
1956
+ */
1957
+ cancelReverseIssueRequest(input: CancelReverseIssueRequestInput): Promise<TaxInvoiceOperationResult>;
1958
+ /**
1959
+ * 역발행 요청을 거부합니다.
1960
+ *
1961
+ * Compat: `refuse`
1962
+ */
1963
+ refuseReverseIssueRequest(input: RefuseReverseIssueRequestInput): Promise<TaxInvoiceOperationResult>;
1964
+ /**
1965
+ * 문서를 삭제합니다.
1966
+ *
1967
+ * Compat: `delete`
1968
+ */
1969
+ deleteInvoice(input: TaxInvoiceDocumentRequest): Promise<TaxInvoiceOperationResult>;
1970
+ /**
1971
+ * 문서를 국세청으로 즉시 전송합니다.
1972
+ *
1973
+ * Compat: `sendToNTS`
1974
+ */
1975
+ sendInvoiceToNTS(input: SendInvoiceToNationalTaxServiceInput): Promise<TaxInvoiceOperationResult>;
1976
+ /**
1977
+ * 문서 1건의 상태 요약정보를 조회합니다.
1978
+ *
1979
+ * Compat: `getInfo`
1980
+ */
1981
+ getInvoiceInfo(input: TaxInvoiceDocumentRequest): Promise<TaxInvoiceInfo>;
1982
+ /**
1983
+ * 문서 다건의 상태 요약정보를 조회합니다.
1984
+ *
1985
+ * Compat: `getInfos`
1986
+ */
1987
+ getInvoicesInfo(input: GetInvoicesInfoInput): Promise<TaxInvoiceInfo[]>;
1988
+ /**
1989
+ * 문서 1건의 상세정보를 조회합니다.
1990
+ *
1991
+ * Compat: `getDetailInfo`
1992
+ */
1993
+ getInvoiceDetailInfo(input: TaxInvoiceDocumentRequest): Promise<TaxInvoiceDocumentOutput>;
1994
+ /**
1995
+ * 문서번호 사용 여부를 확인합니다.
1996
+ *
1997
+ * Compat: `checkMgtKeyInUse`
1998
+ */
1999
+ checkInvoiceManagementKeyInUse(input: TaxInvoiceDocumentRequest): Promise<TaxInvoiceInvoiceManagementKeyUsage>;
2000
+ /**
2001
+ * 문서 XML 정보를 조회합니다.
2002
+ *
2003
+ * Compat: `getXML`
2004
+ */
2005
+ getInvoiceXML(input: TaxInvoiceDocumentRequest): Promise<TaxInvoiceXmlResult>;
2006
+ /**
2007
+ * 검색조건으로 문서를 조회합니다.
2008
+ *
2009
+ * Compat: `search`
2010
+ */
2011
+ searchInvoices(input: SearchInvoicesInput): Promise<TaxInvoiceSearchResult>;
2012
+ /**
2013
+ * 문서 상태 변경이력을 조회합니다.
2014
+ *
2015
+ * Compat: `getLogs`
2016
+ */
2017
+ getInvoiceLogs(input: TaxInvoiceDocumentRequest): Promise<TaxInvoiceLogEntry[]>;
2018
+ /**
2019
+ * 세금계산서 문서함 팝업 URL을 조회합니다.
2020
+ *
2021
+ * Compat: `getURL`
2022
+ */
2023
+ getTaxInvoiceBoxURL(input: GetTaxInvoiceBoxURLInput): Promise<TaxInvoiceAccessUrl>;
2024
+ /**
2025
+ * 문서 팝업 URL을 조회합니다.
2026
+ *
2027
+ * Compat: `getPopUpURL`
2028
+ */
2029
+ getInvoicePopupURL(input: TaxInvoiceDocumentRequest): Promise<TaxInvoiceAccessUrl>;
2030
+ /**
2031
+ * 보기 전용 팝업 URL을 조회합니다.
2032
+ *
2033
+ * Compat: `getViewURL`
2034
+ */
2035
+ getInvoiceViewURL(input: TaxInvoiceDocumentRequest): Promise<TaxInvoiceAccessUrl>;
2036
+ /**
2037
+ * 공급자 인쇄 팝업 URL을 조회합니다.
2038
+ *
2039
+ * Compat: `getPrintURL`
2040
+ */
2041
+ getSupplierInvoicePrintURL(input: TaxInvoiceDocumentRequest): Promise<TaxInvoiceAccessUrl>;
2042
+ /**
2043
+ * 공급받는자 인쇄 팝업 URL을 조회합니다.
2044
+ *
2045
+ * Compat: `getEPrintURL`
2046
+ */
2047
+ getBuyerInvoicePrintURL(input: TaxInvoiceDocumentRequest): Promise<TaxInvoiceAccessUrl>;
2048
+ /**
2049
+ * 다건 인쇄 팝업 URL을 조회합니다.
2050
+ *
2051
+ * Compat: `getMassPrintURL`
2052
+ */
2053
+ getBulkInvoicePrintURL(input: GetBulkInvoicePrintURLInput): Promise<TaxInvoiceAccessUrl>;
2054
+ /**
2055
+ * 메일 보기 URL을 조회합니다.
2056
+ *
2057
+ * Compat: `getMailURL`
2058
+ */
2059
+ getInvoiceMailURL(input: TaxInvoiceDocumentRequest): Promise<TaxInvoiceAccessUrl>;
2060
+ /**
2061
+ * PDF 다운로드 URL을 조회합니다.
2062
+ *
2063
+ * Compat: `getPDFURL`
2064
+ */
2065
+ getInvoicePDFURL(input: TaxInvoiceDocumentRequest): Promise<TaxInvoiceAccessUrl>;
2066
+ /**
2067
+ * 인감 및 첨부문서 등록 URL을 조회합니다.
2068
+ *
2069
+ * Compat: `getSealURL`
2070
+ */
2071
+ getSealAndAttachmentRegistrationURL(input: GetSealAndAttachmentRegistrationURLInput): Promise<TaxInvoiceAccessUrl>;
2072
+ /**
2073
+ * 파일 경로 기반 첨부를 수행합니다.
2074
+ *
2075
+ * Compat: `attachFile`
2076
+ */
2077
+ attachFileFromPath(input: AttachFileFromPathInput): Promise<TaxInvoiceOperationResult>;
2078
+ /**
2079
+ * 바이너리 기반 첨부를 수행합니다.
2080
+ *
2081
+ * Compat: `attachFileBinary`
2082
+ */
2083
+ attachFileFromBinary(input: AttachFileFromBinaryInput): Promise<TaxInvoiceOperationResult>;
2084
+ /**
2085
+ * 첨부파일을 삭제합니다.
2086
+ *
2087
+ * Compat: `deleteFile`
2088
+ */
2089
+ deleteAttachedFile(input: DeleteAttachedFileInput): Promise<TaxInvoiceOperationResult>;
2090
+ /**
2091
+ * 첨부파일 목록을 조회합니다.
2092
+ *
2093
+ * Compat: `getFiles`
2094
+ */
2095
+ getAttachedFiles(input: TaxInvoiceDocumentRequest): Promise<TaxInvoiceAttachedFile[]>;
2096
+ /**
2097
+ * 안내 메일을 재전송합니다.
2098
+ *
2099
+ * Compat: `sendEmail`
2100
+ */
2101
+ resendInvoiceEmail(input: ResendInvoiceEmailInput): Promise<TaxInvoiceOperationResult>;
2102
+ /**
2103
+ * 안내 문자를 재전송합니다.
2104
+ *
2105
+ * Compat: `sendSMS`
2106
+ */
2107
+ resendInvoiceSMS(input: ResendInvoiceSMSInput): Promise<TaxInvoiceOperationResult>;
2108
+ /**
2109
+ * 안내 팩스를 재전송합니다.
2110
+ *
2111
+ * Compat: `sendFAX`
2112
+ */
2113
+ resendInvoiceFAX(input: ResendInvoiceFAXInput): Promise<TaxInvoiceOperationResult>;
2114
+ /**
2115
+ * 전자명세서를 첨부합니다.
2116
+ *
2117
+ * Compat: `attachStatement`
2118
+ */
2119
+ attachInvoiceStatement(input: AttachInvoiceStatementInput): Promise<TaxInvoiceOperationResult>;
2120
+ /**
2121
+ * 전자명세서 첨부를 해제합니다.
2122
+ *
2123
+ * Compat: `detachStatement`
2124
+ */
2125
+ detachInvoiceStatement(input: DetachInvoiceStatementInput): Promise<TaxInvoiceOperationResult>;
2126
+ /**
2127
+ * 문서번호를 할당합니다.
2128
+ *
2129
+ * Compat: `assignMgtKey`
2130
+ */
2131
+ assignInvoiceManagementKey(input: AssignInvoiceManagementKeyInput): Promise<TaxInvoiceOperationResult>;
2132
+ /**
2133
+ * 이메일 발송설정을 조회합니다.
2134
+ *
2135
+ * Compat: `listEmailConfig`
2136
+ */
2137
+ getEmailSendSettings(input: TaxInvoiceBusinessRequest): Promise<TaxInvoiceEmailSendSetting[]>;
2138
+ /**
2139
+ * 이메일 발송설정을 수정합니다.
2140
+ *
2141
+ * Compat: `updateEmailConfig`
2142
+ */
2143
+ updateEmailSendSettings(input: UpdateEmailSendSettingsInput): Promise<TaxInvoiceOperationResult>;
2144
+ /**
2145
+ * 국세청 전송설정을 조회합니다.
2146
+ *
2147
+ * Compat: `getSendToNTSConfig`
2148
+ */
2149
+ getSendToNTSSettings(input: TaxInvoiceBusinessRequest): Promise<TaxInvoiceSendToNationalTaxServiceSetting>;
2150
+ /**
2151
+ * 인증서 등록 URL을 조회합니다.
2152
+ *
2153
+ * Compat: `getTaxCertURL`
2154
+ */
2155
+ getTaxCertificateRegistrationURL(input: TaxInvoiceBusinessRequest): Promise<TaxInvoiceAccessUrl>;
2156
+ /**
2157
+ * 인증서 만료일을 조회합니다.
2158
+ *
2159
+ * Compat: `getCertificateExpireDate`
2160
+ */
2161
+ getTaxCertificateExpirationDate(input: TaxInvoiceBusinessRequest): Promise<TaxInvoiceTaxCertificateExpiration>;
2162
+ /**
2163
+ * 인증서 유효성을 점검합니다.
2164
+ *
2165
+ * Compat: `checkCertValidation`
2166
+ */
2167
+ checkTaxCertificateValidation(input: TaxInvoiceBusinessRequest): Promise<TaxInvoiceOperationResult>;
2168
+ /**
2169
+ * 인증서 정보를 조회합니다.
2170
+ *
2171
+ * Compat: `getTaxCertInfo`
2172
+ */
2173
+ getTaxCertificateInfo(input: TaxInvoiceBusinessRequest): Promise<TaxInvoiceTaxCertificateInfo>;
2174
+ }
2175
+ //#endregion
2176
+ //#region src/client/types.d.ts
2177
+ interface PopbillClientConfig {
2178
+ linkId: string;
2179
+ secretKey: string;
2180
+ userId: string;
2181
+ /**
2182
+ * 팝빌 테스트 연동 여부입니다.
2183
+ *
2184
+ * @default false
2185
+ */
2186
+ isTest?: boolean;
2187
+ /**
2188
+ * 스태틱 IP 사용 여부입니다.
2189
+ *
2190
+ * @default false
2191
+ */
2192
+ useStaticIp?: boolean;
2193
+ /**
2194
+ * GA IP 사용 여부입니다.
2195
+ *
2196
+ * @default false
2197
+ */
2198
+ useGaIp?: boolean;
2199
+ /**
2200
+ * 로컬 시간 사용 여부입니다.
2201
+ *
2202
+ * @default true
2203
+ */
2204
+ useLocalTime?: boolean;
2205
+ /**
2206
+ * IP 제한 사용 여부입니다.
2207
+ *
2208
+ * @default true
2209
+ */
2210
+ ipRestrictOnOff?: boolean;
2211
+ /**
2212
+ * 요청 `Accept-Encoding` 헤더 값입니다.
2213
+ *
2214
+ * @default 'gzip'
2215
+ */
2216
+ acceptEncoding?: string | null;
2217
+ /**
2218
+ * 요청 `Accept-Language` 헤더 값입니다.
2219
+ *
2220
+ * @default ko-KR
2221
+ */
2222
+ acceptLanguage?: string;
2223
+ /**
2224
+ * 요청 타임아웃(ms)입니다.
2225
+ *
2226
+ * @default 180_000 (3분)
2227
+ */
2228
+ requestTimeoutMs?: number;
2229
+ /**
2230
+ * SDK 에러 콜백입니다.
2231
+ */
2232
+ onError?: (error: PopbillApiError) => void;
2233
+ }
2234
+ /**
2235
+ * Popbill SDK 클라이언트입니다.
2236
+ */
2237
+ interface PopbillClient {
2238
+ services: {
2239
+ taxInvoice: TaxInvoiceService;
2240
+ };
2241
+ }
2242
+ //#endregion
2243
+ //#region src/client/index.d.ts
2244
+ /**
2245
+ * modern Popbill client를 생성합니다.
2246
+ */
2247
+ declare function createPopbillClient(config: PopbillClientConfig): PopbillClient;
2248
+ //#endregion
2249
+ //#region src/services/tax-invoice/methods.d.ts
2250
+ /**
2251
+ * TaxInvoice modern facade 공개 메서드 목록입니다.
2252
+ * 문서 섹션(발행/전송, 정보확인, 보기/인쇄, 부가기능, 인증서 관리) 순서를 유지합니다.
2253
+ */
2254
+ declare const TAX_INVOICE_METHODS: readonly ["issueInvoiceImmediately", "submitBulkIssue", "getBulkIssueSubmissionResult", "registerInvoice", "updateInvoice", "issueInvoice", "cancelIssuedInvoice", "requestReverseIssueImmediately", "requestReverseIssue", "cancelReverseIssueRequest", "refuseReverseIssueRequest", "deleteInvoice", "sendInvoiceToNTS", "getInvoiceInfo", "getInvoicesInfo", "getInvoiceDetailInfo", "checkInvoiceManagementKeyInUse", "getInvoiceXML", "searchInvoices", "getInvoiceLogs", "getTaxInvoiceBoxURL", "getInvoicePopupURL", "getInvoiceViewURL", "getSupplierInvoicePrintURL", "getBuyerInvoicePrintURL", "getBulkInvoicePrintURL", "getInvoiceMailURL", "getInvoicePDFURL", "getSealAndAttachmentRegistrationURL", "attachFileFromPath", "attachFileFromBinary", "deleteAttachedFile", "getAttachedFiles", "resendInvoiceEmail", "resendInvoiceSMS", "resendInvoiceFAX", "attachInvoiceStatement", "detachInvoiceStatement", "assignInvoiceManagementKey", "getEmailSendSettings", "updateEmailSendSettings", "getSendToNTSSettings", "getTaxCertificateRegistrationURL", "getTaxCertificateExpirationDate", "checkTaxCertificateValidation", "getTaxCertificateInfo"];
2255
+ //#endregion
2256
+ export { AssignInvoiceManagementKeyInput, AttachFileFromBinaryInput, AttachFileFromPathInput, AttachInvoiceStatementInput, CancelIssuedInvoiceInput, CancelReverseIssueRequestInput, DeleteAttachedFileInput, DetachInvoiceStatementInput, GetBulkInvoicePrintURLInput, GetBulkIssueSubmissionResultInput, GetInvoicesInfoInput, GetSealAndAttachmentRegistrationURLInput, GetTaxInvoiceBoxURLInput, IssueInvoiceImmediatelyInput, IssueInvoiceInput, type PopbillApiError, PopbillErrorStage, PopbillErrorType, RefuseReverseIssueRequestInput, RegisterInvoiceInput, RequestReverseIssueImmediatelyInput, RequestReverseIssueInput, ResendInvoiceEmailInput, ResendInvoiceFAXInput, ResendInvoiceSMSInput, SearchInvoicesInput, SendInvoiceToNationalTaxServiceInput, SubmitBulkIssueInput, TAX_INVOICE_METHODS, TaxInvoiceAccessUrl, type TaxInvoiceAdditionalContactInput, TaxInvoiceAttachedFile, TaxInvoiceBoxScope, TaxInvoiceBoxScopes, TaxInvoiceBulkIssueSubmissionResult, TaxInvoiceBulkIssueSubmissionResultItem, TaxInvoiceBulkIssueSubmissionTransactionState, TaxInvoiceBulkIssueSubmissionTransactionStates, TaxInvoiceBulkSubmitResult, TaxInvoiceBusinessRequest, type TaxInvoiceBusinessStatus, TaxInvoiceBusinessStatusValues, type TaxInvoiceBuyerInput, type TaxInvoiceChargeDirection, TaxInvoiceChargeDirectionValues, TaxInvoiceCloseDownStateCode, TaxInvoiceCloseDownStateCodes, TaxInvoiceDateInput, type TaxInvoiceDateString, TaxInvoiceDateType, type TaxInvoiceDocumentInput, TaxInvoiceDocumentKeyType, TaxInvoiceDocumentKeyTypes, TaxInvoiceDocumentOutput, TaxInvoiceDocumentRequest, TaxInvoiceEmailSendSetting, TaxInvoiceEmailType, TaxInvoiceEmailTypes, TaxInvoiceInfo, TaxInvoiceInvoiceManagementKeyUsage, TaxInvoiceIssueResult, type TaxInvoiceIssueType, TaxInvoiceIssueTypes, type TaxInvoiceLineItemInput, TaxInvoiceLogEntry, TaxInvoiceModificationCode, TaxInvoiceModificationCodes, type TaxInvoiceModificationReasonCode, TaxInvoiceModificationReasonCodes, TaxInvoiceOperationResult, TaxInvoiceOutboundDocumentKeyType, type TaxInvoicePartyInput, type TaxInvoicePurposeType, TaxInvoicePurposeTypes, type TaxInvoiceRecipientType, TaxInvoiceRecipientTypes, TaxInvoiceReverseRefuseDocumentKeyType, TaxInvoiceReverseRequestDocumentKeyType, TaxInvoiceSearchInteroperabilityType, TaxInvoiceSearchInteroperabilityTypes, TaxInvoiceSearchInvoiceTypeCode, TaxInvoiceSearchInvoiceTypeCodes, TaxInvoiceSearchIssueTypeCode, TaxInvoiceSearchIssueTypeCodes, TaxInvoiceSearchRegistrationTypeCode, TaxInvoiceSearchRegistrationTypeCodes, TaxInvoiceSearchResult, TaxInvoiceSearchStateCode, TaxInvoiceSearchTaxRegistrationIdentifierAvailabilities, TaxInvoiceSearchTaxRegistrationIdentifierAvailability, TaxInvoiceSearchTaxRegistrationIdentifierType, TaxInvoiceSearchTaxRegistrationIdentifierTypes, TaxInvoiceSearchTaxationTypeCode, TaxInvoiceSearchTaxationTypeCodes, TaxInvoiceSendToNationalTaxServiceSetting, TaxInvoiceService, TaxInvoiceSortOrder, TaxInvoiceStatementItemCode, TaxInvoiceStatementItemCodes, TaxInvoiceTaxCertificateExpiration, TaxInvoiceTaxCertificateInfo, type TaxInvoiceTaxationType, TaxInvoiceTaxationTypes, TaxInvoiceXmlResult, UpdateEmailSendSettingsInput, UpdateInvoiceInput, createPopbillClient };