@timbro/invoices 0.11.0 → 0.13.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.
Files changed (59) hide show
  1. package/README.md +46 -0
  2. package/dist/admin.d.ts +2 -1
  3. package/dist/admin.d.ts.map +1 -1
  4. package/dist/admin.js +1 -0
  5. package/dist/certification-workbook.d.ts +9 -0
  6. package/dist/certification-workbook.d.ts.map +1 -0
  7. package/dist/certification-workbook.js +13 -0
  8. package/dist/fiscal-engine-runtime.manifest.json +117 -112
  9. package/dist/fiscal-engine-runtime.provenance.json +194 -189
  10. package/dist/generated/certification-api-contract.d.ts +430 -0
  11. package/dist/generated/certification-api-contract.d.ts.map +1 -0
  12. package/dist/generated/certification-api-contract.js +483 -0
  13. package/dist/generated/hosted/index.d.ts +3 -3
  14. package/dist/generated/hosted/index.d.ts.map +1 -1
  15. package/dist/generated/hosted/index.js +2 -2
  16. package/dist/generated/hosted/sdk.gen.d.ts +31 -1
  17. package/dist/generated/hosted/sdk.gen.d.ts.map +1 -1
  18. package/dist/generated/hosted/sdk.gen.js +389 -1
  19. package/dist/generated/hosted/types.gen.d.ts +878 -36
  20. package/dist/generated/hosted/types.gen.d.ts.map +1 -1
  21. package/dist/generated/hosted/zod-response.gen.d.ts +6005 -192
  22. package/dist/generated/hosted/zod-response.gen.d.ts.map +1 -1
  23. package/dist/generated/hosted/zod-response.gen.js +766 -231
  24. package/dist/generated/hosted/zod.gen.d.ts +1622 -7
  25. package/dist/generated/hosted/zod.gen.d.ts.map +1 -1
  26. package/dist/generated/hosted/zod.gen.js +830 -215
  27. package/dist/generated/index.d.ts +3 -3
  28. package/dist/generated/index.d.ts.map +1 -1
  29. package/dist/generated/index.js +2 -2
  30. package/dist/generated/invoice-api-contract.d.ts +1345 -105
  31. package/dist/generated/invoice-api-contract.d.ts.map +1 -1
  32. package/dist/generated/invoice-api-contract.js +1755 -163
  33. package/dist/generated/problem-catalog.d.ts.map +1 -1
  34. package/dist/generated/problem-catalog.js +2 -0
  35. package/dist/generated/sdk.gen.d.ts +5 -1
  36. package/dist/generated/sdk.gen.d.ts.map +1 -1
  37. package/dist/generated/sdk.gen.js +109 -1
  38. package/dist/generated/types.gen.d.ts +534 -51
  39. package/dist/generated/types.gen.d.ts.map +1 -1
  40. package/dist/generated/zod-response.gen.d.ts +21272 -4130
  41. package/dist/generated/zod-response.gen.d.ts.map +1 -1
  42. package/dist/generated/zod-response.gen.js +230 -4
  43. package/dist/generated/zod.gen.d.ts +17458 -2747
  44. package/dist/generated/zod.gen.d.ts.map +1 -1
  45. package/dist/generated/zod.gen.js +2333 -1441
  46. package/dist/generated-operation-client.d.ts +2 -2
  47. package/dist/generated-operation-client.d.ts.map +1 -1
  48. package/dist/hosted-tenant.d.ts +9 -0
  49. package/dist/hosted-tenant.d.ts.map +1 -1
  50. package/dist/hosted-tenant.js +7 -0
  51. package/dist/index.d.ts +2 -1
  52. package/dist/index.d.ts.map +1 -1
  53. package/dist/invoice-hosted-controls.d.ts +31 -3
  54. package/dist/invoice-hosted-controls.d.ts.map +1 -1
  55. package/dist/invoice-hosted-controls.js +73 -12
  56. package/dist/problem-contract.d.ts +2 -0
  57. package/dist/problem-contract.d.ts.map +1 -1
  58. package/dist/timbro_fiscal_engine_bg.wasm +0 -0
  59. package/package.json +3 -3
@@ -154,7 +154,7 @@ export type Problem = {
154
154
  /**
155
155
  * Stable machine-readable code. Branch on this, never on `title`.
156
156
  */
157
- code: "merchant_authentication_unavailable" | "platform_test_profile_unavailable" | "merchant_fiscal_binding_unavailable" | "merchant_fiscal_setup_unavailable" | "merchant_contact_email_confirmation_required" | "merchant_service_scope_required" | "merchant_business_address_required" | "merchant_business_contact_required" | "merchant_business_location_official_codes_required" | "merchant_business_details_invalid" | "merchant_current_payment_methods_required" | "merchant_current_sales_channels_required" | "merchant_existing_card_service_not_applicable" | "merchant_existing_card_service_other_provider_name_invalid" | "merchant_existing_card_service_other_provider_name_not_allowed" | "merchant_existing_card_service_other_provider_name_required" | "merchant_existing_card_service_providers_exclusive_choice" | "merchant_existing_card_service_providers_required" | "merchant_existing_card_service_required" | "merchant_location_catalog_changed" | "merchant_location_catalog_unavailable" | "merchant_location_selection_invalid" | "merchant_payment_methods_not_applicable" | "merchant_sales_channels_exclusive_choice" | "merchant_sales_channels_not_applicable" | "merchant_business_type_not_applicable" | "merchant_charge_timing_not_applicable" | "merchant_charge_timing_required" | "merchant_payment_methods_exclusive_choice" | "merchant_session_missing" | "merchant_guest_notice_acceptance_required" | "merchant_workspace_organization_required" | "merchant_onboarding_revision_conflict" | "merchant_checkout_policy_revision_conflict" | "merchant_business_already_claimed" | "merchant_business_attachment_conflict" | "merchant_business_identity_required" | "merchant_business_not_member" | "merchant_business_revision_conflict" | "merchant_business_capabilities_required" | "merchant_fiscal_setup_incomplete" | "merchant_payment_setup_assessment_incomplete" | "merchant_certificate_conflict" | "merchant_test_fiscal_document_blocked" | "merchant_dgii_assistance_not_applicable" | "merchant_dgii_assistance_notes_invalid" | "parameter_missing" | "parameter_invalid" | "provider_not_available" | "currency_not_supported" | "amount_below_minimum" | "amount_above_maximum" | "checkout_reference_invalid" | "checkout_reference_expired" | "fiscal_buyer_tax_id_invalid" | "fiscal_lines_required" | "payment_split_invalid" | "submission_token_invalid" | "submission_token_expired" | "request_body_malformed" | "collection_cursor_invalid" | "webhook_replay_scope_invalid" | "api_key_missing" | "api_key_invalid" | "checkout_token_invalid" | "checkout_token_expired" | "payer_session_missing" | "operation_not_permitted" | "invoice_delivery_not_permitted" | "journey_scope_mismatch" | "journey_report_timeout" | "merchant_fiscal_binding_conflict" | "live_mode_not_enabled" | "origin_not_allowed" | "payer_step_up_required" | "certificate_handoff_person_mismatch" | "route_not_found" | "api_key_not_found" | "payment_not_found" | "payment_reference_conflict" | "refund_reference_conflict" | "payment_reference_invalid" | "refund_reference_invalid" | "payment_tax_required" | "payment_tax_invalid" | "payment_items_invalid" | "payment_totals_mismatch" | "payment_invoice_item_fields_required" | "payments_contract_migration_required" | "merchant_payments_api_paused" | "refund_not_found" | "refund_invoice_not_ready" | "refund_invoice_not_accepted" | "refund_invoice_mismatch" | "refund_invoice_conflict" | "payment_part_not_found" | "payment_split_not_found" | "fiscal_document_not_found" | "merchant_account_not_found" | "merchant_account_card_capability_not_found" | "merchant_business_not_found" | "agent_client_not_found" | "connected_agent_not_found" | "certificate_handoff_not_found" | "webhook_endpoint_not_found" | "webhook_event_not_found" | "three_ds_not_found" | "payer_not_found" | "saved_card_not_found" | "payer_credential_not_found" | "payer_purchase_not_found" | "payer_fiscal_profile_not_found" | "idempotency_key_reused" | "idempotency_request_in_progress" | "idempotency_key_expired" | "api_key_retired" | "payment_method_already_in_progress" | "payment_not_payable" | "payment_awaiting_verification" | "payment_attempt_invalid" | "payment_attempt_mismatch" | "payment_attempt_stale" | "payment_method_mismatch" | "provider_response_invalid" | "checkout_window_closed" | "payment_not_editable" | "payment_cancel_not_allowed" | "payment_cancellation_pending" | "invoicing_locked" | "source_identity_conflict" | "refund_source_identity_conflict" | "refund_payment_not_captured" | "refund_exceeds_captured" | "refund_allocation_not_found" | "refund_allocation_conflict" | "refund_allocation_ledger_unavailable" | "fiscal_buyer_required" | "fiscal_artifact_not_ready" | "payment_invoice_not_ready" | "payment_invoice_not_allowed" | "invoice_reference_stale" | "fiscal_delivery_not_ready" | "payment_split_not_allowed" | "payment_split_exists" | "payment_split_locked" | "payment_split_not_capturable" | "payment_split_not_expired" | "payment_split_not_renewable" | "payment_split_complete" | "payment_split_part_required" | "payment_part_not_payable" | "webhook_endpoint_deleted" | "webhook_endpoint_suspended" | "three_ds_binding_mismatch" | "payer_enrollment_unavailable" | "payer_claim_unavailable" | "payer_claim_conflict" | "payer_claim_proof_invalid" | "payer_delivery_address_unavailable" | "payer_fiscal_profile_unavailable" | "certificate_handoff_used" | "receipt_retention_elapsed" | "certificate_handoff_expired" | "request_body_too_large" | "unsupported_media_type" | "merchant_account_not_ready" | "merchant_checkout_policy_invalid" | "merchant_account_provider_mismatch" | "merchant_account_identity_mismatch" | "merchant_profile_incomplete" | "payment_description_required" | "sale_amount_invalid" | "credential_storage_unavailable" | "provider_not_eligible" | "no_eligible_provider" | "currency_not_supported_by_provider" | "currency_not_supported_for_fiscal_document" | "fiscal_total_mismatch" | "fiscal_line_total_invalid" | "fiscal_line_legal_tip_invalid" | "fiscal_document_kind_not_allowed" | "fiscal_document_kind_unsupported" | "fiscal_government_eligibility_required" | "fiscal_government_eligibility_not_allowed" | "certificate_p12_password_invalid" | "certificate_pkcs12_invalid" | "certificate_expired" | "certificate_not_yet_valid" | "certificate_archive_not_supported" | "certificate_not_supported" | "taxpayer_unregistered" | "taxpayer_inactive" | "voluntary_tip_currency_mismatch" | "voluntary_tip_not_allowed_for_split" | "voluntary_tip_not_available" | "voluntary_tip_exceeds_maximum" | "refund_tip_amount_invalid" | "refund_tip_allocation_unknown" | "refund_amount_invalid" | "refund_currency_mismatch" | "payer_fiscal_profile_invalid" | "rate_limit_exceeded" | "internal_error" | "provider_unavailable" | "provider_rejected_request" | "taxpayer_directory_unavailable" | "fiscal_artifact_retrieval_unavailable" | "fiscal_delivery_unavailable" | "journey_marks_unavailable" | "contact_request_delivery_unavailable" | "unauthenticated" | "invalid_login" | "email_already_registered" | "organization_slug_taken" | "organization_not_found" | "hosted_tenant_conflict" | "insufficient_role" | "service_role_not_permitted" | "invalid_fiscal_identity" | "invalid_certificate_custody_signer_identity" | "custody_certificate_malformed" | "custody_certificate_not_yet_valid" | "custody_certificate_expired" | "custody_p12_work_limit_exceeded" | "custody_signature_algorithm_unsupported" | "custody_certificate_trust_profile_unsupported" | "custody_certificate_chain_untrusted" | "custody_certificate_purpose_unsupported" | "legal_issuer_already_registered" | "onboarding_legal_issuer_identity_conflict" | "legal_issuer_profile_incomplete" | "legal_issuer_not_found" | "invitation_invalid" | "invitation_expired" | "already_a_member" | "environment_not_active" | "certificate_custody_binding_not_found" | "certificate_custody_binding_conflict" | "certificate_custody_certificate_version_not_active" | "source_connection_not_found" | "source_connection_not_connected" | "source_provider_unavailable" | "source_provider_authorization_required" | "source_provider_installation_disabled" | "source_provider_installation_removed" | "source_provider_scope_insufficient" | "source_provider_target_access_removed" | "source_provider_throttled" | "source_provider_outcome_unknown" | "source_provider_authorization_not_found" | "source_provider_authorization_conflict" | "source_provider_installation_request_invalid" | "source_provider_installation_request_expired" | "source_provider_installation_callback_replayed" | "source_connection_creation_conflict" | "source_connection_activation_conflict" | "source_connection_activation_verification_rejected" | "delegated_authorization_verifier_forbidden" | "invalid_credential" | "credential_revoked" | "issuer_not_authorized" | "missing_idempotency_key" | "invalid_idempotency_key" | "request_too_large" | "request_body_timeout" | "malformed_json" | "invalid_request" | "invalid_collection_query" | "invalid_collection_cursor" | "document_type_not_enabled" | "fiscal_intent_rejected" | "idempotency_key_conflict" | "fiscal_number_already_used" | "fiscal_number_authorization_changed" | "fiscal_number_authorization_source_record_conflict" | "source_version_stale" | "source_predecessor_conflict" | "source_history_requires_reconciliation" | "source_content_conflict" | "source_action_conflict" | "source_command_conflict" | "invoice_reference_conflict" | "invoice_totals_mismatch" | "printed_representation_profile_conflict" | "source_record_already_fiscalized" | "source_operation_pending" | "source_outcome_unknown" | "authority_rejected_replacement" | "correction_target_unsettled" | "unsupported_printed_representation_profile" | "affected_fiscal_operation_unsupported" | "fiscal_issuance_blocked" | "fiscal_operation_not_found" | "invoice_not_found" | "fiscal_artifact_not_found" | "fiscal_artifact_unverified" | "fiscal_artifact_unavailable" | "invoice_receipt_not_found" | "invoice_receipt_not_ready" | "invoice_receipt_unavailable" | "fiscal_delivery_not_found" | "fiscal_delivery_outcome_conflict" | "webhook_endpoint_registration_conflict" | "invalid_replay_scope" | "webhook_destination_not_allowed" | "unsigned_document_schema_invalid" | "signed_document_schema_invalid" | "custody_unavailable" | "received_document_not_found" | "commercial_response_motive_invalid" | "commercial_response_decision_conflict" | "method_not_allowed";
157
+ code: "authorization_not_found" | "authorization_checkout_reference_invalid" | "authorization_reference_conflict" | "authorization_capture_conflict" | "authorization_capture_exceeds_hold" | "authorization_not_capturable" | "authorization_not_cancelable" | "authorization_not_editable" | "authorization_submission_invalid" | "authorization_authentication_pending" | "authorization_credentials_unavailable" | "authorization_dispatch_refused" | "authorization_hold_evidence_missing" | "provider_qualification_required" | "merchant_authentication_unavailable" | "platform_test_profile_unavailable" | "merchant_fiscal_binding_unavailable" | "merchant_fiscal_setup_unavailable" | "merchant_contact_email_confirmation_required" | "merchant_service_scope_required" | "merchant_business_address_required" | "merchant_business_contact_required" | "merchant_business_location_official_codes_required" | "merchant_business_details_invalid" | "merchant_current_payment_methods_required" | "merchant_current_sales_channels_required" | "merchant_existing_card_service_not_applicable" | "merchant_existing_card_service_other_provider_name_invalid" | "merchant_existing_card_service_other_provider_name_not_allowed" | "merchant_existing_card_service_other_provider_name_required" | "merchant_existing_card_service_providers_exclusive_choice" | "merchant_existing_card_service_providers_required" | "merchant_existing_card_service_required" | "merchant_location_catalog_changed" | "merchant_location_catalog_unavailable" | "merchant_location_selection_invalid" | "merchant_payment_methods_not_applicable" | "merchant_sales_channels_exclusive_choice" | "merchant_sales_channels_not_applicable" | "merchant_business_type_not_applicable" | "merchant_charge_timing_not_applicable" | "merchant_charge_timing_required" | "merchant_payment_methods_exclusive_choice" | "merchant_session_missing" | "merchant_guest_notice_acceptance_required" | "merchant_workspace_organization_required" | "merchant_onboarding_revision_conflict" | "merchant_checkout_policy_revision_conflict" | "merchant_business_already_claimed" | "merchant_business_attachment_conflict" | "merchant_business_identity_required" | "merchant_business_not_member" | "merchant_business_revision_conflict" | "merchant_business_capabilities_required" | "merchant_business_certification_path_unavailable" | "merchant_business_certification_requirements_unmet" | "merchant_business_certification_revision_conflict" | "merchant_business_certification_unavailable" | "merchant_business_certification_evidence_not_found" | "merchant_fiscal_setup_incomplete" | "merchant_payment_setup_assessment_incomplete" | "merchant_certificate_conflict" | "merchant_test_fiscal_document_blocked" | "merchant_dgii_assistance_not_applicable" | "merchant_dgii_assistance_notes_invalid" | "parameter_missing" | "parameter_invalid" | "provider_not_available" | "currency_not_supported" | "amount_below_minimum" | "amount_above_maximum" | "checkout_reference_invalid" | "checkout_reference_expired" | "fiscal_buyer_tax_id_invalid" | "fiscal_lines_required" | "payment_split_invalid" | "submission_token_invalid" | "submission_token_expired" | "request_body_malformed" | "collection_cursor_invalid" | "webhook_replay_scope_invalid" | "api_key_missing" | "api_key_invalid" | "checkout_token_invalid" | "checkout_token_expired" | "payer_session_missing" | "operation_not_permitted" | "invoice_delivery_not_permitted" | "journey_scope_mismatch" | "journey_report_timeout" | "merchant_fiscal_binding_conflict" | "live_mode_not_enabled" | "origin_not_allowed" | "payer_step_up_required" | "certificate_handoff_person_mismatch" | "route_not_found" | "api_key_not_found" | "payment_not_found" | "payment_reference_conflict" | "refund_reference_conflict" | "payment_reference_invalid" | "refund_reference_invalid" | "payment_tax_required" | "payment_tax_invalid" | "payment_items_invalid" | "payment_totals_mismatch" | "payment_invoice_item_fields_required" | "payments_contract_migration_required" | "merchant_payments_api_paused" | "refund_not_found" | "refund_invoice_not_ready" | "refund_invoice_not_accepted" | "refund_invoice_mismatch" | "refund_invoice_conflict" | "payment_part_not_found" | "payment_split_not_found" | "fiscal_document_not_found" | "merchant_account_not_found" | "merchant_account_card_capability_not_found" | "merchant_business_not_found" | "agent_client_not_found" | "connected_agent_not_found" | "certificate_handoff_not_found" | "webhook_endpoint_not_found" | "webhook_event_not_found" | "three_ds_not_found" | "payer_not_found" | "saved_card_not_found" | "payer_credential_not_found" | "payer_purchase_not_found" | "payer_fiscal_profile_not_found" | "idempotency_key_reused" | "idempotency_request_in_progress" | "idempotency_key_expired" | "api_key_retired" | "payment_method_already_in_progress" | "payment_not_payable" | "payment_awaiting_verification" | "payment_attempt_invalid" | "payment_attempt_mismatch" | "payment_attempt_stale" | "payment_method_mismatch" | "provider_response_invalid" | "checkout_window_closed" | "payment_not_editable" | "payment_cancel_not_allowed" | "payment_cancellation_pending" | "invoicing_locked" | "source_identity_conflict" | "refund_source_identity_conflict" | "refund_payment_not_captured" | "refund_exceeds_captured" | "refund_allocation_not_found" | "refund_allocation_conflict" | "refund_allocation_ledger_unavailable" | "fiscal_buyer_required" | "fiscal_artifact_not_ready" | "payment_invoice_not_ready" | "payment_invoice_not_allowed" | "invoice_reference_stale" | "fiscal_delivery_not_ready" | "payment_split_not_allowed" | "payment_split_exists" | "payment_split_locked" | "payment_split_not_capturable" | "payment_split_not_expired" | "payment_split_not_renewable" | "payment_split_complete" | "payment_split_part_required" | "payment_part_not_payable" | "webhook_endpoint_deleted" | "webhook_endpoint_suspended" | "three_ds_binding_mismatch" | "payer_enrollment_unavailable" | "payer_claim_unavailable" | "payer_claim_conflict" | "payer_claim_proof_invalid" | "payer_delivery_address_unavailable" | "payer_fiscal_profile_unavailable" | "certificate_handoff_used" | "receipt_retention_elapsed" | "certificate_handoff_expired" | "request_body_too_large" | "unsupported_media_type" | "merchant_account_not_ready" | "merchant_checkout_policy_invalid" | "merchant_account_provider_mismatch" | "merchant_account_identity_mismatch" | "merchant_profile_incomplete" | "payment_description_required" | "sale_amount_invalid" | "credential_storage_unavailable" | "provider_not_eligible" | "no_eligible_provider" | "currency_not_supported_by_provider" | "currency_not_supported_for_fiscal_document" | "fiscal_total_mismatch" | "fiscal_line_total_invalid" | "fiscal_line_legal_tip_invalid" | "fiscal_document_kind_not_allowed" | "fiscal_document_kind_unsupported" | "fiscal_government_eligibility_required" | "fiscal_government_eligibility_not_allowed" | "certificate_p12_password_invalid" | "certificate_pkcs12_invalid" | "certificate_expired" | "certificate_not_yet_valid" | "certificate_archive_not_supported" | "certificate_not_supported" | "taxpayer_unregistered" | "taxpayer_inactive" | "voluntary_tip_currency_mismatch" | "voluntary_tip_not_allowed_for_split" | "voluntary_tip_not_available" | "voluntary_tip_exceeds_maximum" | "refund_tip_amount_invalid" | "refund_tip_allocation_unknown" | "refund_amount_invalid" | "refund_tax_amount_invalid" | "refund_tax_amount_required" | "refund_tax_allocation_unknown" | "refund_currency_mismatch" | "payer_fiscal_profile_invalid" | "rate_limit_exceeded" | "internal_error" | "provider_unavailable" | "provider_rejected_request" | "taxpayer_directory_unavailable" | "fiscal_artifact_retrieval_unavailable" | "fiscal_delivery_unavailable" | "journey_marks_unavailable" | "contact_request_delivery_unavailable" | "unauthenticated" | "invalid_login" | "email_already_registered" | "organization_slug_taken" | "organization_not_found" | "hosted_tenant_conflict" | "insufficient_role" | "service_role_not_permitted" | "invalid_fiscal_identity" | "invalid_certificate_custody_signer_identity" | "custody_certificate_malformed" | "custody_certificate_not_yet_valid" | "custody_certificate_expired" | "custody_p12_work_limit_exceeded" | "custody_signature_algorithm_unsupported" | "custody_certificate_trust_profile_unsupported" | "custody_certificate_chain_untrusted" | "custody_certificate_purpose_unsupported" | "legal_issuer_already_registered" | "onboarding_legal_issuer_identity_conflict" | "legal_issuer_profile_incomplete" | "legal_issuer_not_found" | "invitation_invalid" | "invitation_expired" | "already_a_member" | "environment_not_active" | "certificate_custody_binding_not_found" | "certificate_custody_binding_conflict" | "certificate_custody_certificate_version_not_active" | "source_connection_not_found" | "source_connection_not_connected" | "source_provider_unavailable" | "source_provider_authorization_required" | "source_provider_installation_disabled" | "source_provider_installation_removed" | "source_provider_scope_insufficient" | "source_provider_target_access_removed" | "source_provider_throttled" | "source_provider_outcome_unknown" | "source_provider_authorization_not_found" | "source_provider_authorization_conflict" | "source_provider_installation_request_invalid" | "source_provider_installation_request_expired" | "source_provider_installation_callback_replayed" | "source_connection_creation_conflict" | "source_connection_activation_conflict" | "source_connection_activation_verification_rejected" | "delegated_authorization_verifier_forbidden" | "invalid_credential" | "credential_revoked" | "issuer_not_authorized" | "missing_idempotency_key" | "invalid_idempotency_key" | "request_too_large" | "request_body_timeout" | "malformed_json" | "invalid_request" | "certification_environment_required" | "certification_test_set_invalid" | "invalid_collection_query" | "invalid_collection_cursor" | "document_type_not_enabled" | "fiscal_intent_rejected" | "idempotency_key_conflict" | "fiscal_number_already_used" | "fiscal_number_authorization_changed" | "fiscal_number_authorization_source_record_conflict" | "source_version_stale" | "source_predecessor_conflict" | "source_history_requires_reconciliation" | "source_content_conflict" | "source_action_conflict" | "source_command_conflict" | "invoice_reference_conflict" | "invoice_totals_mismatch" | "printed_representation_profile_conflict" | "source_record_already_fiscalized" | "source_operation_pending" | "source_outcome_unknown" | "authority_rejected_replacement" | "correction_target_unsettled" | "unsupported_printed_representation_profile" | "affected_fiscal_operation_unsupported" | "fiscal_issuance_blocked" | "fiscal_operation_not_found" | "invoice_not_found" | "fiscal_artifact_not_found" | "fiscal_artifact_unverified" | "fiscal_artifact_unavailable" | "invoice_receipt_not_found" | "invoice_receipt_not_ready" | "invoice_receipt_unavailable" | "fiscal_delivery_not_found" | "fiscal_delivery_outcome_conflict" | "webhook_endpoint_registration_conflict" | "invalid_replay_scope" | "webhook_destination_not_allowed" | "unsigned_document_schema_invalid" | "signed_document_schema_invalid" | "custody_unavailable" | "received_document_not_found" | "commercial_response_motive_invalid" | "commercial_response_decision_conflict" | "method_not_allowed";
158
158
  detail?: string;
159
159
  /**
160
160
  * Present only when the rejected request produced a Fiscal operation.
@@ -180,6 +180,92 @@ export type Problem = {
180
180
  */
181
181
  type: "about:blank";
182
182
  };
183
+ /**
184
+ * MerchantBusinessCertificationRequirement
185
+ */
186
+ export type MerchantBusinessCertificationRequirement = {
187
+ code: "invoices_not_requested" | "fiscal_details_incomplete" | "certification_binding_required" | "certification_certificate_required" | "provider_eligibility_unverified" | "certification_receiver_urls_pending" | "certification_test_set_processing_unavailable";
188
+ owner: "merchant" | "dgii" | "timbro" | "operator";
189
+ blocks: Array<"start" | "step_1" | "step_2" | "step_7">;
190
+ field?: string;
191
+ };
192
+ /**
193
+ * MerchantBusinessCertificationStep
194
+ */
195
+ export type MerchantBusinessCertificationStep = {
196
+ number: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15;
197
+ code: string;
198
+ title: string;
199
+ actor: "merchant" | "dgii" | "timbro";
200
+ status: "blocked" | "action_required" | "awaiting_dgii" | "reported" | "verified";
201
+ evidence: Array<MerchantBusinessCertificationEvidence>;
202
+ };
203
+ /**
204
+ * MerchantBusinessCertificationEvidence
205
+ *
206
+ * A business-reported DGII outcome. It remains unverified until an authorized evidence review confirms it.
207
+ */
208
+ export type MerchantBusinessCertificationEvidence = {
209
+ id: string;
210
+ outcome: "submitted" | "approved" | "rejected" | "needs_correction";
211
+ verification: "user_reported" | "operator_verified" | "operator_rejected";
212
+ reference: string | null;
213
+ createdAt: string;
214
+ reviewedAt?: string;
215
+ reviewReference?: string;
216
+ };
217
+ /**
218
+ * RetainedCertificationWorkbook
219
+ */
220
+ export type RetainedCertificationWorkbook = {
221
+ name: string;
222
+ sha256: string;
223
+ sizeBytes: number;
224
+ };
225
+ /**
226
+ * CertificationTestSetKind
227
+ */
228
+ export type CertificationTestSetKind = "ecf";
229
+ /**
230
+ * CertificationTestSetObject
231
+ */
232
+ export type CertificationTestSetObject = "certification_test_set";
233
+ /**
234
+ * CertificationTestSetReview
235
+ */
236
+ export type CertificationTestSetReview = {
237
+ requirements: Array<CertificationTestSetRequirement>;
238
+ status: "review_required";
239
+ worksheets: Array<CertificationWorksheetSummary>;
240
+ };
241
+ /**
242
+ * CertificationTestSetRequirement
243
+ */
244
+ export type CertificationTestSetRequirement = "case_mapping_pending";
245
+ /**
246
+ * CertificationWorksheetSummary
247
+ */
248
+ export type CertificationWorksheetSummary = {
249
+ caseCount: number;
250
+ name: CertificationWorksheetName;
251
+ };
252
+ /**
253
+ * CertificationWorksheetName
254
+ */
255
+ export type CertificationWorksheetName = "ECF" | "RFCE";
256
+ /**
257
+ * CertificationTestSetResource
258
+ */
259
+ export type CertificationTestSetResource = {
260
+ attemptReference: string;
261
+ createdAt: string;
262
+ file: RetainedCertificationWorkbook;
263
+ generation: string;
264
+ id: string;
265
+ kind: CertificationTestSetKind;
266
+ object: CertificationTestSetObject;
267
+ review: CertificationTestSetReview;
268
+ };
183
269
  export type RetrieveBusinessData = {
184
270
  body?: never;
185
271
  path?: never;
@@ -667,21 +753,130 @@ export type UpdateBusinessResponses = {
667
753
  };
668
754
  };
669
755
  export type UpdateBusinessResponse = UpdateBusinessResponses[keyof UpdateBusinessResponses];
670
- export type ConfigureInvoicingData = {
756
+ export type RetrieveMerchantBusinessCertificationData = {
757
+ body?: never;
758
+ path?: never;
759
+ query?: never;
760
+ url: "/v1/business/certification";
761
+ };
762
+ export type RetrieveMerchantBusinessCertificationErrors = {
671
763
  /**
672
- * MerchantBusinessConfigureInvoicingRequest
764
+ * The request could not be understood.
765
+ */
766
+ 400: Problem & {
767
+ status: 400;
768
+ /**
769
+ * Stable machine-readable code. Branch on this, never on `title`.
770
+ */
771
+ code: "parameter_invalid";
772
+ };
773
+ /**
774
+ * The credential is missing, malformed, or no longer valid.
775
+ */
776
+ 401: Problem & {
777
+ status: 401;
778
+ /**
779
+ * Stable machine-readable code. Branch on this, never on `title`.
780
+ */
781
+ code: "api_key_missing" | "api_key_invalid" | "checkout_token_invalid" | "checkout_token_expired" | "merchant_session_missing";
782
+ };
783
+ /**
784
+ * The credential is valid but not permitted to perform this operation.
785
+ */
786
+ 403: Problem & {
787
+ status: 403;
788
+ /**
789
+ * Stable machine-readable code. Branch on this, never on `title`.
790
+ */
791
+ code: "operation_not_permitted";
792
+ };
793
+ /**
794
+ * No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.
795
+ */
796
+ 404: Problem & {
797
+ status: 404;
798
+ /**
799
+ * Stable machine-readable code. Branch on this, never on `title`.
800
+ */
801
+ code: "merchant_business_not_found";
802
+ };
803
+ /**
804
+ * The request could not complete. Recover by the retained resource reference or retry with the same command identity.
805
+ */
806
+ 500: Problem & {
807
+ status: 500;
808
+ /**
809
+ * Stable machine-readable code. Branch on this, never on `title`.
810
+ */
811
+ code: "internal_error";
812
+ };
813
+ };
814
+ export type RetrieveMerchantBusinessCertificationError = RetrieveMerchantBusinessCertificationErrors[keyof RetrieveMerchantBusinessCertificationErrors];
815
+ export type RetrieveMerchantBusinessCertificationResponses = {
816
+ /**
817
+ * MerchantBusinessCertification
818
+ *
819
+ * Durable certification preparation and user-reported DGII progress for the authenticated business.
820
+ */
821
+ 200: {
822
+ object: "merchant_business_certification";
823
+ status: "not_started";
824
+ requirements: Array<MerchantBusinessCertificationRequirement>;
825
+ availablePaths: Array<"own_software" | "external_software">;
826
+ recommendedPath: "own_software" | "external_software";
827
+ actions: Array<"start">;
828
+ } | {
829
+ object: "merchant_business_certification";
830
+ id: string;
831
+ revision: number;
832
+ status: "in_progress";
833
+ path: "own_software" | "external_software";
834
+ software: {
835
+ name: string;
836
+ version: string;
837
+ };
838
+ phase: "preparation" | "application" | "tests" | "authorization";
839
+ serviceUrls: {
840
+ reception: string;
841
+ commercialApproval: string;
842
+ } | null;
843
+ requirements: Array<MerchantBusinessCertificationRequirement>;
844
+ actions: Array<"report_evidence" | "import_certificate" | "upload_test_set">;
845
+ steps: [
846
+ MerchantBusinessCertificationStep,
847
+ MerchantBusinessCertificationStep,
848
+ MerchantBusinessCertificationStep,
849
+ MerchantBusinessCertificationStep,
850
+ MerchantBusinessCertificationStep,
851
+ MerchantBusinessCertificationStep,
852
+ MerchantBusinessCertificationStep,
853
+ MerchantBusinessCertificationStep,
854
+ MerchantBusinessCertificationStep,
855
+ MerchantBusinessCertificationStep,
856
+ MerchantBusinessCertificationStep,
857
+ MerchantBusinessCertificationStep,
858
+ MerchantBusinessCertificationStep,
859
+ MerchantBusinessCertificationStep,
860
+ MerchantBusinessCertificationStep
861
+ ];
862
+ };
863
+ };
864
+ export type RetrieveMerchantBusinessCertificationResponse = RetrieveMerchantBusinessCertificationResponses[keyof RetrieveMerchantBusinessCertificationResponses];
865
+ export type StartMerchantBusinessCertificationData = {
866
+ /**
867
+ * MerchantBusinessCertificationStartRequest
673
868
  */
674
869
  body: {
675
- mode: "test" | "live";
870
+ path: "own_software" | "external_software";
676
871
  };
677
872
  headers: {
678
873
  "idempotency-key": string;
679
874
  };
680
875
  path?: never;
681
876
  query?: never;
682
- url: "/v1/business/configure-invoicing";
877
+ url: "/v1/business/certification";
683
878
  };
684
- export type ConfigureInvoicingErrors = {
879
+ export type StartMerchantBusinessCertificationErrors = {
685
880
  /**
686
881
  * The request could not be understood.
687
882
  */
@@ -730,7 +925,7 @@ export type ConfigureInvoicingErrors = {
730
925
  /**
731
926
  * Stable machine-readable code. Branch on this, never on `title`.
732
927
  */
733
- code: "idempotency_key_reused" | "idempotency_request_in_progress" | "idempotency_key_expired" | "merchant_fiscal_setup_incomplete";
928
+ code: "idempotency_key_reused" | "idempotency_request_in_progress" | "idempotency_key_expired" | "merchant_business_certification_path_unavailable" | "merchant_business_certification_requirements_unmet";
734
929
  };
735
930
  /**
736
931
  * The request body is larger than this endpoint accepts.
@@ -773,33 +968,122 @@ export type ConfigureInvoicingErrors = {
773
968
  code: "merchant_fiscal_setup_unavailable";
774
969
  };
775
970
  };
776
- export type ConfigureInvoicingError = ConfigureInvoicingErrors[keyof ConfigureInvoicingErrors];
777
- export type ConfigureInvoicingResponses = {
971
+ export type StartMerchantBusinessCertificationError = StartMerchantBusinessCertificationErrors[keyof StartMerchantBusinessCertificationErrors];
972
+ export type StartMerchantBusinessCertificationResponses = {
778
973
  /**
779
- * MerchantBusinessConfigureInvoicingResponse
974
+ * MerchantBusinessCertification
780
975
  *
781
- * Default Response
976
+ * Durable certification preparation and user-reported DGII progress for the authenticated business.
977
+ */
978
+ 200: {
979
+ object: "merchant_business_certification";
980
+ status: "not_started";
981
+ requirements: Array<MerchantBusinessCertificationRequirement>;
982
+ availablePaths: Array<"own_software" | "external_software">;
983
+ recommendedPath: "own_software" | "external_software";
984
+ actions: Array<"start">;
985
+ } | {
986
+ object: "merchant_business_certification";
987
+ id: string;
988
+ revision: number;
989
+ status: "in_progress";
990
+ path: "own_software" | "external_software";
991
+ software: {
992
+ name: string;
993
+ version: string;
994
+ };
995
+ phase: "preparation" | "application" | "tests" | "authorization";
996
+ serviceUrls: {
997
+ reception: string;
998
+ commercialApproval: string;
999
+ } | null;
1000
+ requirements: Array<MerchantBusinessCertificationRequirement>;
1001
+ actions: Array<"report_evidence" | "import_certificate" | "upload_test_set">;
1002
+ steps: [
1003
+ MerchantBusinessCertificationStep,
1004
+ MerchantBusinessCertificationStep,
1005
+ MerchantBusinessCertificationStep,
1006
+ MerchantBusinessCertificationStep,
1007
+ MerchantBusinessCertificationStep,
1008
+ MerchantBusinessCertificationStep,
1009
+ MerchantBusinessCertificationStep,
1010
+ MerchantBusinessCertificationStep,
1011
+ MerchantBusinessCertificationStep,
1012
+ MerchantBusinessCertificationStep,
1013
+ MerchantBusinessCertificationStep,
1014
+ MerchantBusinessCertificationStep,
1015
+ MerchantBusinessCertificationStep,
1016
+ MerchantBusinessCertificationStep,
1017
+ MerchantBusinessCertificationStep
1018
+ ];
1019
+ };
1020
+ /**
1021
+ * MerchantBusinessCertification
1022
+ *
1023
+ * Durable certification preparation and user-reported DGII progress for the authenticated business.
782
1024
  */
783
1025
  201: {
784
- object: "merchant_business_invoicing_setup";
785
- mode: "test" | "live";
1026
+ object: "merchant_business_certification";
1027
+ status: "not_started";
1028
+ requirements: Array<MerchantBusinessCertificationRequirement>;
1029
+ availablePaths: Array<"own_software" | "external_software">;
1030
+ recommendedPath: "own_software" | "external_software";
1031
+ actions: Array<"start">;
1032
+ } | {
1033
+ object: "merchant_business_certification";
1034
+ id: string;
1035
+ revision: number;
1036
+ status: "in_progress";
1037
+ path: "own_software" | "external_software";
1038
+ software: {
1039
+ name: string;
1040
+ version: string;
1041
+ };
1042
+ phase: "preparation" | "application" | "tests" | "authorization";
1043
+ serviceUrls: {
1044
+ reception: string;
1045
+ commercialApproval: string;
1046
+ } | null;
1047
+ requirements: Array<MerchantBusinessCertificationRequirement>;
1048
+ actions: Array<"report_evidence" | "import_certificate" | "upload_test_set">;
1049
+ steps: [
1050
+ MerchantBusinessCertificationStep,
1051
+ MerchantBusinessCertificationStep,
1052
+ MerchantBusinessCertificationStep,
1053
+ MerchantBusinessCertificationStep,
1054
+ MerchantBusinessCertificationStep,
1055
+ MerchantBusinessCertificationStep,
1056
+ MerchantBusinessCertificationStep,
1057
+ MerchantBusinessCertificationStep,
1058
+ MerchantBusinessCertificationStep,
1059
+ MerchantBusinessCertificationStep,
1060
+ MerchantBusinessCertificationStep,
1061
+ MerchantBusinessCertificationStep,
1062
+ MerchantBusinessCertificationStep,
1063
+ MerchantBusinessCertificationStep,
1064
+ MerchantBusinessCertificationStep
1065
+ ];
786
1066
  };
787
1067
  };
788
- export type ConfigureInvoicingResponse = ConfigureInvoicingResponses[keyof ConfigureInvoicingResponses];
789
- export type ImportSigningCertificateData = {
1068
+ export type StartMerchantBusinessCertificationResponse = StartMerchantBusinessCertificationResponses[keyof StartMerchantBusinessCertificationResponses];
1069
+ export type SubmitMerchantBusinessCertificationEvidenceData = {
790
1070
  /**
791
- * MerchantBusinessSigningCertificateRequest
1071
+ * MerchantBusinessCertificationEvidenceRequest
792
1072
  */
793
1073
  body: {
794
- mode: "test" | "live";
795
- certificateP12Base64: string;
796
- password: string;
1074
+ expectedRevision: number;
1075
+ step: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15;
1076
+ outcome: "submitted" | "approved" | "rejected" | "needs_correction";
1077
+ reference?: string;
1078
+ };
1079
+ headers: {
1080
+ "idempotency-key": string;
797
1081
  };
798
1082
  path?: never;
799
1083
  query?: never;
800
- url: "/v1/business/import-signing-certificate";
1084
+ url: "/v1/business/certification/evidence";
801
1085
  };
802
- export type ImportSigningCertificateErrors = {
1086
+ export type SubmitMerchantBusinessCertificationEvidenceErrors = {
803
1087
  /**
804
1088
  * The request could not be understood.
805
1089
  */
@@ -848,7 +1132,7 @@ export type ImportSigningCertificateErrors = {
848
1132
  /**
849
1133
  * Stable machine-readable code. Branch on this, never on `title`.
850
1134
  */
851
- code: "merchant_certificate_conflict" | "merchant_fiscal_setup_incomplete";
1135
+ code: "idempotency_key_reused" | "idempotency_request_in_progress" | "idempotency_key_expired" | "merchant_business_certification_requirements_unmet" | "merchant_business_certification_revision_conflict";
852
1136
  };
853
1137
  /**
854
1138
  * The request body is larger than this endpoint accepts.
@@ -870,6 +1154,163 @@ export type ImportSigningCertificateErrors = {
870
1154
  */
871
1155
  code: "unsupported_media_type";
872
1156
  };
1157
+ /**
1158
+ * The request could not complete. Recover by the retained resource reference or retry with the same command identity.
1159
+ */
1160
+ 500: Problem & {
1161
+ status: 500;
1162
+ /**
1163
+ * Stable machine-readable code. Branch on this, never on `title`.
1164
+ */
1165
+ code: "internal_error";
1166
+ };
1167
+ };
1168
+ export type SubmitMerchantBusinessCertificationEvidenceError = SubmitMerchantBusinessCertificationEvidenceErrors[keyof SubmitMerchantBusinessCertificationEvidenceErrors];
1169
+ export type SubmitMerchantBusinessCertificationEvidenceResponses = {
1170
+ /**
1171
+ * MerchantBusinessCertification
1172
+ *
1173
+ * Durable certification preparation and user-reported DGII progress for the authenticated business.
1174
+ */
1175
+ 200: {
1176
+ object: "merchant_business_certification";
1177
+ status: "not_started";
1178
+ requirements: Array<MerchantBusinessCertificationRequirement>;
1179
+ availablePaths: Array<"own_software" | "external_software">;
1180
+ recommendedPath: "own_software" | "external_software";
1181
+ actions: Array<"start">;
1182
+ } | {
1183
+ object: "merchant_business_certification";
1184
+ id: string;
1185
+ revision: number;
1186
+ status: "in_progress";
1187
+ path: "own_software" | "external_software";
1188
+ software: {
1189
+ name: string;
1190
+ version: string;
1191
+ };
1192
+ phase: "preparation" | "application" | "tests" | "authorization";
1193
+ serviceUrls: {
1194
+ reception: string;
1195
+ commercialApproval: string;
1196
+ } | null;
1197
+ requirements: Array<MerchantBusinessCertificationRequirement>;
1198
+ actions: Array<"report_evidence" | "import_certificate" | "upload_test_set">;
1199
+ steps: [
1200
+ MerchantBusinessCertificationStep,
1201
+ MerchantBusinessCertificationStep,
1202
+ MerchantBusinessCertificationStep,
1203
+ MerchantBusinessCertificationStep,
1204
+ MerchantBusinessCertificationStep,
1205
+ MerchantBusinessCertificationStep,
1206
+ MerchantBusinessCertificationStep,
1207
+ MerchantBusinessCertificationStep,
1208
+ MerchantBusinessCertificationStep,
1209
+ MerchantBusinessCertificationStep,
1210
+ MerchantBusinessCertificationStep,
1211
+ MerchantBusinessCertificationStep,
1212
+ MerchantBusinessCertificationStep,
1213
+ MerchantBusinessCertificationStep,
1214
+ MerchantBusinessCertificationStep
1215
+ ];
1216
+ };
1217
+ };
1218
+ export type SubmitMerchantBusinessCertificationEvidenceResponse = SubmitMerchantBusinessCertificationEvidenceResponses[keyof SubmitMerchantBusinessCertificationEvidenceResponses];
1219
+ export type UploadMerchantBusinessCertificationTestSetData = {
1220
+ /**
1221
+ * CertificationTestSetUploadRequest
1222
+ */
1223
+ body: {
1224
+ /**
1225
+ * CertificationWorkbookFile
1226
+ */
1227
+ file: {
1228
+ contentBase64: string;
1229
+ name: string;
1230
+ };
1231
+ /**
1232
+ * CertificationTestSetKind
1233
+ */
1234
+ kind: "ecf";
1235
+ };
1236
+ headers: {
1237
+ "idempotency-key": string;
1238
+ };
1239
+ path?: never;
1240
+ query?: never;
1241
+ url: "/v1/business/certification/test-sets";
1242
+ };
1243
+ export type UploadMerchantBusinessCertificationTestSetErrors = {
1244
+ /**
1245
+ * The request could not be understood.
1246
+ */
1247
+ 400: Problem & {
1248
+ status: 400;
1249
+ /**
1250
+ * Stable machine-readable code. Branch on this, never on `title`.
1251
+ */
1252
+ code: "parameter_invalid" | "parameter_missing" | "request_body_malformed";
1253
+ };
1254
+ /**
1255
+ * The credential is missing, malformed, or no longer valid.
1256
+ */
1257
+ 401: Problem & {
1258
+ status: 401;
1259
+ /**
1260
+ * Stable machine-readable code. Branch on this, never on `title`.
1261
+ */
1262
+ code: "api_key_missing" | "api_key_invalid" | "checkout_token_invalid" | "checkout_token_expired" | "merchant_session_missing";
1263
+ };
1264
+ /**
1265
+ * The credential is valid but not permitted to perform this operation.
1266
+ */
1267
+ 403: Problem & {
1268
+ status: 403;
1269
+ /**
1270
+ * Stable machine-readable code. Branch on this, never on `title`.
1271
+ */
1272
+ code: "operation_not_permitted";
1273
+ };
1274
+ /**
1275
+ * No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.
1276
+ */
1277
+ 404: Problem & {
1278
+ status: 404;
1279
+ /**
1280
+ * Stable machine-readable code. Branch on this, never on `title`.
1281
+ */
1282
+ code: "merchant_business_not_found";
1283
+ };
1284
+ /**
1285
+ * The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.
1286
+ */
1287
+ 409: Problem & {
1288
+ status: 409;
1289
+ /**
1290
+ * Stable machine-readable code. Branch on this, never on `title`.
1291
+ */
1292
+ code: "merchant_business_certification_requirements_unmet" | "certification_environment_required" | "idempotency_key_conflict";
1293
+ };
1294
+ /**
1295
+ * The request body is larger than this endpoint accepts.
1296
+ */
1297
+ 413: Problem & {
1298
+ status: 413;
1299
+ /**
1300
+ * Stable machine-readable code. Branch on this, never on `title`.
1301
+ */
1302
+ code: "request_body_too_large" | "request_too_large";
1303
+ };
1304
+ /**
1305
+ * The request body carries a content type this endpoint does not accept.
1306
+ */
1307
+ 415: Problem & {
1308
+ status: 415;
1309
+ /**
1310
+ * Stable machine-readable code. Branch on this, never on `title`.
1311
+ */
1312
+ code: "unsupported_media_type";
1313
+ };
873
1314
  /**
874
1315
  * The request is well-formed but cannot be carried out.
875
1316
  */
@@ -878,7 +1319,7 @@ export type ImportSigningCertificateErrors = {
878
1319
  /**
879
1320
  * Stable machine-readable code. Branch on this, never on `title`.
880
1321
  */
881
- code: "certificate_expired" | "certificate_not_yet_valid" | "certificate_archive_not_supported" | "certificate_pkcs12_invalid" | "certificate_not_supported" | "certificate_p12_password_invalid";
1322
+ code: "certification_test_set_invalid";
882
1323
  };
883
1324
  /**
884
1325
  * The request could not complete. Recover by the retained resource reference or retry with the same command identity.
@@ -898,26 +1339,386 @@ export type ImportSigningCertificateErrors = {
898
1339
  /**
899
1340
  * Stable machine-readable code. Branch on this, never on `title`.
900
1341
  */
901
- code: "merchant_fiscal_setup_unavailable";
1342
+ code: "merchant_business_certification_unavailable";
902
1343
  };
903
1344
  };
904
- export type ImportSigningCertificateError = ImportSigningCertificateErrors[keyof ImportSigningCertificateErrors];
905
- export type ImportSigningCertificateResponses = {
1345
+ export type UploadMerchantBusinessCertificationTestSetError = UploadMerchantBusinessCertificationTestSetErrors[keyof UploadMerchantBusinessCertificationTestSetErrors];
1346
+ export type UploadMerchantBusinessCertificationTestSetResponses = {
906
1347
  /**
907
- * MerchantBusiness
1348
+ * CertificationTestSetResource
908
1349
  *
909
- * The business the credential selects, its capabilities, and the requirements that remain.
1350
+ * Default Response
910
1351
  */
911
1352
  200: {
912
- object: "merchant_business";
1353
+ attemptReference: string;
1354
+ createdAt: string;
1355
+ file: RetainedCertificationWorkbook;
1356
+ generation: string;
913
1357
  id: string;
914
- rnc: string;
915
- legalName: string;
916
- revision: number;
917
- capabilities: {
918
- /**
919
- * MerchantBusinessCapabilityState
920
- */
1358
+ kind: CertificationTestSetKind;
1359
+ object: CertificationTestSetObject;
1360
+ review: CertificationTestSetReview;
1361
+ };
1362
+ /**
1363
+ * CertificationTestSetResource
1364
+ *
1365
+ * Default Response
1366
+ */
1367
+ 201: {
1368
+ attemptReference: string;
1369
+ createdAt: string;
1370
+ file: RetainedCertificationWorkbook;
1371
+ generation: string;
1372
+ id: string;
1373
+ kind: CertificationTestSetKind;
1374
+ object: CertificationTestSetObject;
1375
+ review: CertificationTestSetReview;
1376
+ };
1377
+ };
1378
+ export type UploadMerchantBusinessCertificationTestSetResponse = UploadMerchantBusinessCertificationTestSetResponses[keyof UploadMerchantBusinessCertificationTestSetResponses];
1379
+ export type RetrieveMerchantBusinessCertificationTestSetData = {
1380
+ body?: never;
1381
+ path?: never;
1382
+ query?: never;
1383
+ url: "/v1/business/certification/test-sets/current";
1384
+ };
1385
+ export type RetrieveMerchantBusinessCertificationTestSetErrors = {
1386
+ /**
1387
+ * The request could not be understood.
1388
+ */
1389
+ 400: Problem & {
1390
+ status: 400;
1391
+ /**
1392
+ * Stable machine-readable code. Branch on this, never on `title`.
1393
+ */
1394
+ code: "parameter_invalid";
1395
+ };
1396
+ /**
1397
+ * The credential is missing, malformed, or no longer valid.
1398
+ */
1399
+ 401: Problem & {
1400
+ status: 401;
1401
+ /**
1402
+ * Stable machine-readable code. Branch on this, never on `title`.
1403
+ */
1404
+ code: "api_key_missing" | "api_key_invalid" | "checkout_token_invalid" | "checkout_token_expired" | "merchant_session_missing";
1405
+ };
1406
+ /**
1407
+ * The credential is valid but not permitted to perform this operation.
1408
+ */
1409
+ 403: Problem & {
1410
+ status: 403;
1411
+ /**
1412
+ * Stable machine-readable code. Branch on this, never on `title`.
1413
+ */
1414
+ code: "operation_not_permitted";
1415
+ };
1416
+ /**
1417
+ * No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.
1418
+ */
1419
+ 404: Problem & {
1420
+ status: 404;
1421
+ /**
1422
+ * Stable machine-readable code. Branch on this, never on `title`.
1423
+ */
1424
+ code: "merchant_business_not_found";
1425
+ };
1426
+ /**
1427
+ * The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.
1428
+ */
1429
+ 409: Problem & {
1430
+ status: 409;
1431
+ /**
1432
+ * Stable machine-readable code. Branch on this, never on `title`.
1433
+ */
1434
+ code: "merchant_business_certification_requirements_unmet" | "certification_environment_required";
1435
+ };
1436
+ /**
1437
+ * The request could not complete. Recover by the retained resource reference or retry with the same command identity.
1438
+ */
1439
+ 500: Problem & {
1440
+ status: 500;
1441
+ /**
1442
+ * Stable machine-readable code. Branch on this, never on `title`.
1443
+ */
1444
+ code: "internal_error";
1445
+ };
1446
+ /**
1447
+ * A required service is temporarily unavailable. Retry with the same reference or command identity.
1448
+ */
1449
+ 503: Problem & {
1450
+ status: 503;
1451
+ /**
1452
+ * Stable machine-readable code. Branch on this, never on `title`.
1453
+ */
1454
+ code: "merchant_business_certification_unavailable";
1455
+ };
1456
+ };
1457
+ export type RetrieveMerchantBusinessCertificationTestSetError = RetrieveMerchantBusinessCertificationTestSetErrors[keyof RetrieveMerchantBusinessCertificationTestSetErrors];
1458
+ export type RetrieveMerchantBusinessCertificationTestSetResponses = {
1459
+ /**
1460
+ * CurrentCertificationTestSet
1461
+ *
1462
+ * Default Response
1463
+ */
1464
+ 200: {
1465
+ current: null | CertificationTestSetResource;
1466
+ };
1467
+ };
1468
+ export type RetrieveMerchantBusinessCertificationTestSetResponse = RetrieveMerchantBusinessCertificationTestSetResponses[keyof RetrieveMerchantBusinessCertificationTestSetResponses];
1469
+ export type ConfigureInvoicingData = {
1470
+ /**
1471
+ * MerchantBusinessConfigureInvoicingRequest
1472
+ */
1473
+ body: {
1474
+ mode: "test" | "live";
1475
+ };
1476
+ headers: {
1477
+ "idempotency-key": string;
1478
+ };
1479
+ path?: never;
1480
+ query?: never;
1481
+ url: "/v1/business/configure-invoicing";
1482
+ };
1483
+ export type ConfigureInvoicingErrors = {
1484
+ /**
1485
+ * The request could not be understood.
1486
+ */
1487
+ 400: Problem & {
1488
+ status: 400;
1489
+ /**
1490
+ * Stable machine-readable code. Branch on this, never on `title`.
1491
+ */
1492
+ code: "parameter_invalid" | "parameter_missing" | "request_body_malformed";
1493
+ };
1494
+ /**
1495
+ * The credential is missing, malformed, or no longer valid.
1496
+ */
1497
+ 401: Problem & {
1498
+ status: 401;
1499
+ /**
1500
+ * Stable machine-readable code. Branch on this, never on `title`.
1501
+ */
1502
+ code: "api_key_missing" | "api_key_invalid" | "checkout_token_invalid" | "checkout_token_expired" | "merchant_session_missing";
1503
+ };
1504
+ /**
1505
+ * The credential is valid but not permitted to perform this operation.
1506
+ */
1507
+ 403: Problem & {
1508
+ status: 403;
1509
+ /**
1510
+ * Stable machine-readable code. Branch on this, never on `title`.
1511
+ */
1512
+ code: "operation_not_permitted";
1513
+ };
1514
+ /**
1515
+ * No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.
1516
+ */
1517
+ 404: Problem & {
1518
+ status: 404;
1519
+ /**
1520
+ * Stable machine-readable code. Branch on this, never on `title`.
1521
+ */
1522
+ code: "merchant_business_not_found";
1523
+ };
1524
+ /**
1525
+ * The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.
1526
+ */
1527
+ 409: Problem & {
1528
+ status: 409;
1529
+ /**
1530
+ * Stable machine-readable code. Branch on this, never on `title`.
1531
+ */
1532
+ code: "idempotency_key_reused" | "idempotency_request_in_progress" | "idempotency_key_expired" | "merchant_fiscal_setup_incomplete";
1533
+ };
1534
+ /**
1535
+ * The request body is larger than this endpoint accepts.
1536
+ */
1537
+ 413: Problem & {
1538
+ status: 413;
1539
+ /**
1540
+ * Stable machine-readable code. Branch on this, never on `title`.
1541
+ */
1542
+ code: "request_body_too_large";
1543
+ };
1544
+ /**
1545
+ * The request body carries a content type this endpoint does not accept.
1546
+ */
1547
+ 415: Problem & {
1548
+ status: 415;
1549
+ /**
1550
+ * Stable machine-readable code. Branch on this, never on `title`.
1551
+ */
1552
+ code: "unsupported_media_type";
1553
+ };
1554
+ /**
1555
+ * The request could not complete. Recover by the retained resource reference or retry with the same command identity.
1556
+ */
1557
+ 500: Problem & {
1558
+ status: 500;
1559
+ /**
1560
+ * Stable machine-readable code. Branch on this, never on `title`.
1561
+ */
1562
+ code: "internal_error";
1563
+ };
1564
+ /**
1565
+ * A required service is temporarily unavailable. Retry with the same reference or command identity.
1566
+ */
1567
+ 503: Problem & {
1568
+ status: 503;
1569
+ /**
1570
+ * Stable machine-readable code. Branch on this, never on `title`.
1571
+ */
1572
+ code: "merchant_fiscal_setup_unavailable";
1573
+ };
1574
+ };
1575
+ export type ConfigureInvoicingError = ConfigureInvoicingErrors[keyof ConfigureInvoicingErrors];
1576
+ export type ConfigureInvoicingResponses = {
1577
+ /**
1578
+ * MerchantBusinessConfigureInvoicingResponse
1579
+ *
1580
+ * Default Response
1581
+ */
1582
+ 201: {
1583
+ object: "merchant_business_invoicing_setup";
1584
+ mode: "test" | "live";
1585
+ };
1586
+ };
1587
+ export type ConfigureInvoicingResponse = ConfigureInvoicingResponses[keyof ConfigureInvoicingResponses];
1588
+ export type ImportSigningCertificateData = {
1589
+ /**
1590
+ * MerchantBusinessSigningCertificateRequest
1591
+ */
1592
+ body: {
1593
+ mode: "test" | "live";
1594
+ certificateP12Base64: string;
1595
+ password: string;
1596
+ } | {
1597
+ purpose: "certification";
1598
+ certificateP12Base64: string;
1599
+ password: string;
1600
+ };
1601
+ path?: never;
1602
+ query?: never;
1603
+ url: "/v1/business/import-signing-certificate";
1604
+ };
1605
+ export type ImportSigningCertificateErrors = {
1606
+ /**
1607
+ * The request could not be understood.
1608
+ */
1609
+ 400: Problem & {
1610
+ status: 400;
1611
+ /**
1612
+ * Stable machine-readable code. Branch on this, never on `title`.
1613
+ */
1614
+ code: "parameter_invalid" | "parameter_missing" | "request_body_malformed";
1615
+ };
1616
+ /**
1617
+ * The credential is missing, malformed, or no longer valid.
1618
+ */
1619
+ 401: Problem & {
1620
+ status: 401;
1621
+ /**
1622
+ * Stable machine-readable code. Branch on this, never on `title`.
1623
+ */
1624
+ code: "api_key_missing" | "api_key_invalid" | "checkout_token_invalid" | "checkout_token_expired" | "merchant_session_missing";
1625
+ };
1626
+ /**
1627
+ * The credential is valid but not permitted to perform this operation.
1628
+ */
1629
+ 403: Problem & {
1630
+ status: 403;
1631
+ /**
1632
+ * Stable machine-readable code. Branch on this, never on `title`.
1633
+ */
1634
+ code: "operation_not_permitted";
1635
+ };
1636
+ /**
1637
+ * No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.
1638
+ */
1639
+ 404: Problem & {
1640
+ status: 404;
1641
+ /**
1642
+ * Stable machine-readable code. Branch on this, never on `title`.
1643
+ */
1644
+ code: "merchant_business_not_found";
1645
+ };
1646
+ /**
1647
+ * The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.
1648
+ */
1649
+ 409: Problem & {
1650
+ status: 409;
1651
+ /**
1652
+ * Stable machine-readable code. Branch on this, never on `title`.
1653
+ */
1654
+ code: "merchant_certificate_conflict" | "merchant_fiscal_setup_incomplete";
1655
+ };
1656
+ /**
1657
+ * The request body is larger than this endpoint accepts.
1658
+ */
1659
+ 413: Problem & {
1660
+ status: 413;
1661
+ /**
1662
+ * Stable machine-readable code. Branch on this, never on `title`.
1663
+ */
1664
+ code: "request_body_too_large";
1665
+ };
1666
+ /**
1667
+ * The request body carries a content type this endpoint does not accept.
1668
+ */
1669
+ 415: Problem & {
1670
+ status: 415;
1671
+ /**
1672
+ * Stable machine-readable code. Branch on this, never on `title`.
1673
+ */
1674
+ code: "unsupported_media_type";
1675
+ };
1676
+ /**
1677
+ * The request is well-formed but cannot be carried out.
1678
+ */
1679
+ 422: Problem & {
1680
+ status: 422;
1681
+ /**
1682
+ * Stable machine-readable code. Branch on this, never on `title`.
1683
+ */
1684
+ code: "certificate_expired" | "certificate_not_yet_valid" | "certificate_archive_not_supported" | "certificate_pkcs12_invalid" | "certificate_not_supported" | "certificate_p12_password_invalid";
1685
+ };
1686
+ /**
1687
+ * The request could not complete. Recover by the retained resource reference or retry with the same command identity.
1688
+ */
1689
+ 500: Problem & {
1690
+ status: 500;
1691
+ /**
1692
+ * Stable machine-readable code. Branch on this, never on `title`.
1693
+ */
1694
+ code: "internal_error";
1695
+ };
1696
+ /**
1697
+ * A required service is temporarily unavailable. Retry with the same reference or command identity.
1698
+ */
1699
+ 503: Problem & {
1700
+ status: 503;
1701
+ /**
1702
+ * Stable machine-readable code. Branch on this, never on `title`.
1703
+ */
1704
+ code: "merchant_fiscal_setup_unavailable";
1705
+ };
1706
+ };
1707
+ export type ImportSigningCertificateError = ImportSigningCertificateErrors[keyof ImportSigningCertificateErrors];
1708
+ export type ImportSigningCertificateResponses = {
1709
+ /**
1710
+ * Default Response
1711
+ */
1712
+ 200: {
1713
+ object: "merchant_business";
1714
+ id: string;
1715
+ rnc: string;
1716
+ legalName: string;
1717
+ revision: number;
1718
+ capabilities: {
1719
+ /**
1720
+ * MerchantBusinessCapabilityState
1721
+ */
921
1722
  payments: {
922
1723
  requested: boolean;
923
1724
  /**
@@ -1026,6 +1827,47 @@ export type ImportSigningCertificateResponses = {
1026
1827
  }>;
1027
1828
  }>;
1028
1829
  onboardingUrl: string;
1830
+ } | {
1831
+ object: "merchant_business_certification";
1832
+ status: "not_started";
1833
+ requirements: Array<MerchantBusinessCertificationRequirement>;
1834
+ availablePaths: Array<"own_software" | "external_software">;
1835
+ recommendedPath: "own_software" | "external_software";
1836
+ actions: Array<"start">;
1837
+ } | {
1838
+ object: "merchant_business_certification";
1839
+ id: string;
1840
+ revision: number;
1841
+ status: "in_progress";
1842
+ path: "own_software" | "external_software";
1843
+ software: {
1844
+ name: string;
1845
+ version: string;
1846
+ };
1847
+ phase: "preparation" | "application" | "tests" | "authorization";
1848
+ serviceUrls: {
1849
+ reception: string;
1850
+ commercialApproval: string;
1851
+ } | null;
1852
+ requirements: Array<MerchantBusinessCertificationRequirement>;
1853
+ actions: Array<"report_evidence" | "import_certificate" | "upload_test_set">;
1854
+ steps: [
1855
+ MerchantBusinessCertificationStep,
1856
+ MerchantBusinessCertificationStep,
1857
+ MerchantBusinessCertificationStep,
1858
+ MerchantBusinessCertificationStep,
1859
+ MerchantBusinessCertificationStep,
1860
+ MerchantBusinessCertificationStep,
1861
+ MerchantBusinessCertificationStep,
1862
+ MerchantBusinessCertificationStep,
1863
+ MerchantBusinessCertificationStep,
1864
+ MerchantBusinessCertificationStep,
1865
+ MerchantBusinessCertificationStep,
1866
+ MerchantBusinessCertificationStep,
1867
+ MerchantBusinessCertificationStep,
1868
+ MerchantBusinessCertificationStep,
1869
+ MerchantBusinessCertificationStep
1870
+ ];
1029
1871
  };
1030
1872
  };
1031
1873
  export type ImportSigningCertificateResponse = ImportSigningCertificateResponses[keyof ImportSigningCertificateResponses];