Download the PHP package byte8/module-client without Composer

On this page you can find all versions of the php package byte8/module-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package module-client

Byte8 Client

Shared chassis for every Byte8 SaaS connector module on Magento 2. Not directly merchant-facing — installed transitively as a dependency of the per-provider modules (byte8/module-sage-accounting, future byte8/module-xero, …).

If you're a merchant, install one of the connector metapackages (e.g. byte8/magento-sage-accounting) — this module gets pulled in automatically.

If you're a Byte8 platform engineer building a new connector, this is the module you build on top of.

Role in the stack

This module owns the wire: outbox, JWT auth (both directions), canonical entity REST endpoints, and the Magento-side mirror of ledger sync state. Per-provider modules own the events that publish into this wire and the admin UI surfaces that the merchant sees.

By design, no PHP-side OAuth — that lives in the Byte8 Ledger SaaS, which talks to the actual provider APIs (api.accounting.sage.com, api.xero.com, …). Magento never touches a provider API directly.

What this module provides

ByteClient — outbound publish API

Byte8\Client\Api\ByteClientInterface. The single entry point per-provider observers use:

Outbox

byte8_event_outbox table with three terminal states: pending / succeeded / dead_lettered. The classifier:

Operator triage:

Dead-letter count surfaces as a banner on the admin config page (via the ConnectionStatus block in per-provider modules).

Inbound REST surface

Under the Byte8_Client::byte8_webapi ACL, JWT-authed via JwtUserContext:

Method Path Purpose
GET /V1/byte8/ping Liveness probe (ledger's proactive health loop)
GET /V1/byte8/payment-methods Installed payment methods (for ledger's payment_method_map UI)
GET /V1/byte8/invoice/:id Canonical invoice (snake_case shape per ledger-core/src/canonical/invoice.rs)
GET /V1/byte8/customer/:id Canonical customer / contact
GET /V1/byte8/creditmemo/:id Canonical credit memo (handles offline-payment refunds with no parent invoice)
GET /V1/byte8/payment/:id Canonical payment
GET /V1/byte8/product/:id Canonical product (with stock data)
POST /V1/byte8/sync-state Inbound from ledger worker — UPSERT byte8_entity_sync_state

JWT auth

Sync-state mirror (PR7)

byte8_entity_sync_state table, UNIQUE on (entity_type, magento_id, provider). Read model only — never the source of truth. Two writers:

Per-provider modules render this via grid columns + admin info blocks — see byte8/module-sage-accounting/Block/Adminhtml/SyncStatus/EntityInfo.php for the canonical example.

Adding a new connector module

A new byte8/module-<provider> module needs:

  1. composer.json requiring byte8/module-core + byte8/module-client.
  2. etc/module.xml with <sequence> listing Byte8_Core + Byte8_Client.
  3. Per-provider config interface (mirror Byte8\SageAccounting\Api\SageConfigInterface) with a stable PROVIDER_KEY constant ('sage_accounting', 'xero', …) — used as the $providerForMirror arg to enqueueEvent.
  4. Observers on the entity events you want to sync — call $this->byteClient->enqueueEvent($eventName, $payload, $idempotencyKey, ProviderConfig::PROVIDER_KEY). Stable idempotency keys (invoice.created:{id}).
  5. Per-provider admin UI surfaces (Connect-flow blocks, settings page, sync-status grid columns) — copy the layout from byte8/module-sage-accounting.

You don't need to implement: outbox, drain cron, JWT auth, canonical entity getters, sync-state mirror table, dead-letter banner, retry logic, OAuth handshake. All in this module already.

Database

byte8_event_outbox and byte8_entity_sync_state. Both managed via etc/db_schema.xml — bin/magento setup:upgrade applies them.

Requirements

Console commands

(The byte8:sage: prefix is historical — these commands are provider-agnostic and work for any connector.)

Security

See SECURITY.md for the full operator runbook covering JWT key rotation, dead-letter triage, and incident-response playbooks.

License

MIT

Support

Byte8 Ltd — [email protected]


All versions of module-client with dependencies

PHP Build Version
Package Version
Requires php Version ~8.1.0||~8.2.0||~8.3.0||~8.4.0
byte8/module-core Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package byte8/module-client contains the following files

Loading the files please wait ...