/** * @getpeppr/sdk — Send Peppol e-invoices in under 20 lines of code. * * @example * ```ts * import { Peppol } from "@getpeppr/sdk"; * * const peppol = new Peppol({ apiKey: "your-api-key" }); * const identity = await peppol.identity.get(); * if (identity.sandboxFirstSend?.status !== "ready") { * throw new Error(identity.sandboxFirstSend?.message ?? "Sandbox profile unavailable"); * } * * const result = await peppol.invoices.send({ * number: "INV-2026-001", * // Sandbox delivers only to test recipients — in production, * // use your customer's Peppol ID. * to: { * name: "SPF Economie (test receiver)", * peppolId: "9925:BE0314595348", * street: "Rue du Progrès 50", * city: "Brussels", * postalCode: "1210", * country: "BE", * }, * lines: [ * { description: "Arc Reactor Maintenance", quantity: 1, unitPrice: 50000, * ...identity.sandboxFirstSend.line } * ] * }); * * console.log(`Invoice sent! Status: ${result.status}`); * ``` */ export { Peppol, PeppolError, PeppolValidationError, PeppolApiError, PeppolProtocolError, webhooks } from "./core/client.js"; /** * The canonical API result contract (GPR-1178). * * `API_RESULT_HEADER_NAMES` is exported so a caller reading raw `fetch` * responses — outside the SDK client — can find the same six headers without * re-deriving their spelling. `parseApiResultHeaders` is deliberately NOT * exported: inside the SDK the parse has already happened, so exporting the * parser would only invite a second, divergent read. * * ⚠️ "Already happened" is not "always produced something". `result` is * `undefined` whenever no header was present, and that is a real case rather * than a defensive one: some responses on the public API are written by the * hosting platform before our runtime runs — a verb outside the seven Next * dispatches answers `405 text/plain` from the edge, carrying none of the six. * `api-result.ts` returns `undefined` there on purpose so a caller can tell * "getpeppr said nothing" from "getpeppr said nothing useful"; do not paper * over it with a fabricated result. Measured and inventoried in the console's * `lib/api/results/platform-terminations.ts` (GPR-1181). */ export { API_RESULT_HEADER_NAMES } from "./core/api-result.js"; export type { ApiResult, ApiResultCode, ApiResultRemediation } from "./core/api-result.js"; export type { BackendAdapter } from "./core/client.js"; export { STATUS_PRECEDENCE, statusFamily, TERMINAL_FAILURE_STATUSES } from "./core/status-precedence.js"; export type { StatusFamily, StatusPrecedenceEntry } from "./core/status-precedence.js"; export { buildInvoiceXml, buildCreditNoteXml, computeUblMonetaryAmounts, computeUblPayableAmount, roundUblCurrencyAmount, } from "./core/ubl-builder.js"; export type { UblMonetaryAmounts, UblMonetaryInput } from "./core/ubl-builder.js"; export { validateInvoice } from "./core/validator.js"; export { validateSchematron, SENDABLE_VAT_CATEGORIES, VALID_VAT_CATEGORIES, SDK_SCHEMATRON_RULE_IDS } from "./core/schematron.js"; export type { SchematronResult, SchematronViolation } from "./core/schematron.js"; export { validateCountryRules } from "./core/country-rules.js"; export type { CountryValidationResult } from "./core/country-rules.js"; export { getCountryName, getAllCountries, getEasScheme, getAllEasSchemes, resolveUnit, getAllUnits, getVatCategories, getPaymentMeansCodes, getCurrency, getAllCurrencies, getInvoiceTypeCodes, getCreditNoteTypeCodes, } from "./core/code-lists.js"; export type { EasScheme, VatCategory, PaymentMeansCode, Currency } from "./core/code-lists.js"; export { SCHEMES_BY_COUNTRY, validatePeppolIdentifier, } from "./core/peppol-identifier-rules.js"; export type { SchemeOption, IdentifierUsage, ValidateIdentifierOptions, IdentifierValidationResult, } from "./core/peppol-identifier-rules.js"; export { PEPPOL_ICD_CODES, isPeppolIcdCode, } from "./core/peppol-icd-codes.js"; export { ISO6523_ICD_CODES, isIso6523IcdCode, } from "./core/iso6523-icd-codes.js"; export { canonicalScheme, lookupCanonicalScheme, countryForScheme, CANONICAL_SCHEME_COUNT, CANONICAL_SCHEMES_VERSION, SCHEME_COUNTRY_COUNT, } from "./core/canonical-schemes.js"; export { buildFranceLegalMentions, validateFranceNotes, FRANCE_LEGAL_MENTION_DEFAULTS, type FranceNoteProblem, } from "./core/france-legal-mentions.js"; export { parsePeppolId, isWellFormedPeppolId, NON_ENDPOINT_SCHEMES } from "./core/peppol-id.js"; export { WEBHOOK_EVENT_TYPES } from "./types/invoice.js"; export type { PeppolConfig, PeppolId, CurrencyCode, CountryCode, Party, BuyerParty, InvoiceLine, InvoiceInput, FranceDeclaration, FrCadreDeFacturation, FranceLegalMentions, InvoiceTypeCode, CreditNoteInput, Attachment, AllowanceCharge, LineAllowanceCharge, ItemProperty, InvoicePeriod, Delivery, DeliveryAddress, SendResult, StatusDetail, StatusDetailEntry, ReceivedInvoice, DocumentStatus, ValidationResult, ValidationError, ValidationWarning, WebhookEvent, WebhookEventType, WebhookEnvironment, RetryConfig, WaitForOptions, PaginatedResult, PaginationMeta, ListInvoicesOptions, InvoiceSummary, DirectoryEntry, DirectorySearchOptions, DirectorySearchResult, DocumentFormat, ServerValidationResult, ServerValidationMessage, EventEntry, ListEventsOptions, BatchSendOptions, BatchSendResult, InvoiceOperationOptions, IdempotentRequestOptions, RequestLogEntry, ResponseLogEntry, Contact, ContactInput, ListContactsOptions, BankAccount, BankAccountInput, ListBankAccountsOptions, ImportInvoiceOptions, TransportType, Transport, TransportInput, TransportUpdateInput, MarkAsState, MarkAsOptions, InvoiceUpdateInput, InvoiceUpdateLine, Sender, LegalEntityInput, LegalEntity, LegalEntityStatus, LegalEntityRegistrationFailureReason, LegalEntityRegistrationDetail, NetworkDiscoveryState, NetworkDiscoveryFailureReason, NetworkDiscoveryDetail, ListLegalEntitiesOptions, ArchiveLegalEntityResult, AttestationInput, AttestationResult, LegalEntityRequestOptions, AccountIdentity, AccountIdentityLegalEntity, AccountIdentityAddress, AccountIdentifier, SandboxFirstSendProfile, } from "./types/invoice.js"; //# sourceMappingURL=index.d.ts.map