Skip to content

v0.11.0

Choose a tag to compare

@github-actions github-actions released this 17 Oct 20:15
· 17 commits to main since this release
9c24f3b

Minor Changes

  • #19 141b8c6 Thanks @Chelu97! - Regenerate the SDK from the account model contract and expose it from the
    client. This adds to the pending company-axis changeset: both ship together in
    the next minor. Nothing here is published by this change.

    Breaking, in the same single window (axis-and-payload-breaking-window).
    The account-model announcement will be at account-model.

    The claim voucher becomes the NIF transfer. Each of the three retired voucher
    methods is listed next to the transfer method that replaces it:

    Retired Replaced by
    account.claimTokens.create account.nifTransfers.create
    account.claimTokens.list account.nifTransfers.list
    account.claimTokens.accept account.nifTransfers.accept

    account.nifTransfers.revoke is NEW: the voucher had no revoke method to replace.

    The only voucher left is managedAccounts.claimTokens.create, which reissues the
    voucher of a managed account (an addition of the contract, not a leftover).

    New client resources. factuarea.companies (the account's NIF portfolio, with
    stats) and factuarea.managedAccounts (list, create, show, imports,
    accessLevel, plan, management and claimTokens) are now properties of the
    client, next to account. account gains nifTransfers, webhooks (with
    deliveries), requestLogs and provisioningUsage(). The bulk import
    (managedAccounts.imports.create and .preview) takes a FormData and is sent as
    multipart/form-data; the SDK adds no JSON content type.

    The account argument is positional. Account-scoped methods take the account
    id as their first argument, before any other id and before the body. TypeScript
    callers get a compile error, but plain JavaScript callers would shift every
    argument by one place WITHOUT an error: review each call to account.*,
    companies.* and managedAccounts.* when upgrading.

    Webhook verification is unchanged: factuarea.webhooks.verify accepts an account
    envelope and returns it with account, account_relationship and company_id
    intact.

    Six taxes methods are removed, with no replacement (breaking): the contract
    no longer declares them. TaxesResource keeps only list and show; calling any
    of taxes.create, taxes.update, taxes.delete, taxes.setDefault,
    taxes.setDefaultForDocument or taxes.toggle is now a compile error in
    TypeScript and a TypeError in plain JavaScript.

    Two verbs change with the document (breaking, same signatures):
    contacts.restore goes from PATCH to POST (no other contacts method
    changes), and recurringInvoices.update goes from PUT to PATCH.

    Also new on the account axis, besides what is listed above:
    account.members.show; account.members.grants.{list,show,update,delete};
    account.invitations.show; account.apiKeys.updateNifScope (the API-key method
    for the NIF scope); and companies.stats.

    Final axis contract, with the surfaces that landed on flat URLs in 0.8.0 and
    0.9.0.
    The 613-operation contract is regenerated: tasks, projects,
    taskLabels, taskTimers, purchaseScans, purchaseScanEmails, notifications,
    agenda, users, verifactu.representation, contacts.imports and
    series.update now take the company id as their first argument and hang off
    /v1/companies/{company}/…. The scanner paths are purchase-scans (hyphen).

    Every partial update is a PATCH (breaking, same signatures): besides
    recurringInvoices.update, the update methods of contacts, products,
    invoices, quotes, proformas, deliveryNotes, purchaseInvoices, series,
    tasks, projects, webhookEndpoints, employees, workSchedules, absence
    types and policies, and purchaseScans.review, among others, stop using PUT.
    Money amounts in responses are decimal strings ("4.13"), not numbers.

    While the SDK is in 0.x a breaking change stays a minor; 1.0.0 remains
    reserved for the API's GA (docs/VERSIONING.md).

  • #19 03f0e9b Thanks @Chelu97! - Regenerate the SDK from the company-axis contract: every company resource now
    hangs off /v1/companies/{company}/… and the account surface off
    /v1/accounts/{account}/…. 481 operations in 396 paths, up from 469 in 387
    (+17 / −5).

    Breaking — every company-scoped method takes the company first. The company
    stops being inferred in silence from the credential and travels in the URL, where
    it is visible, logged and auditable:

    // Before
    await factuarea.invoices.list({ status: "paid" });
    
    // Now
    await factuarea.invoices.list(company, { status: "paid" });

    company is the company id — the one factuarea.account.show() returns in
    data.scope[].id — never its tax ID or its name.

    Also breaking, in the same single window:

    • factuarea.account.show() keeps its name and now answers on /v1/me,
      returning the credential's scope (data.scope[]) alongside its API key.
    • The X-Active-Profile header is retired: the contract no longer declares it,
      and the axis segment replaces it.
    • Updates use PATCH (contacts.restore, contacts.updateCustomerProfile,
      contacts.updateSupplierProfile, contacts.updateBankAccounts…), and amounts
      travel as decimal strings.
    • The five API-key operations move from the company to the account axis:
      companies.apiKeys.* → account.apiKeys.* on /v1/accounts/{account}/api-keys.

    Added: the account axis (members and their module access, invitations, claim
    tokens, owner transfer, usage), companies.issuingReadiness and
    recurringInvoices.bulkStatus.

    Removed: the ContactRoleV1Request type export. The role of contacts.assignContactRole travels in the path (/contacts/{contact}/roles/{role}), so the operation no longer has a body.

    While the SDK is in 0.x a breaking change stays a minor; 1.0.0 remains
    reserved for the API's GA (docs/VERSIONING.md).