@adiba-banking-cloud/backoffice-console-ob-api-sdk
v0.1.3
Published
An ADIBA Open Banking API SDK for backoffice console applications
Readme
@adiba-banking-cloud/backoffice-console-ob-api-sdk
Open Banking API SDK for ADIBA backoffice console applications.
This package follows the same runtime/client/export paradigm as the Retail
Engine SDK, but is sourced from the Open Banking OpenAPI document at
document.yaml.
Collections
The SDK currently includes typed support for:
ApplicationsConsentsCustomersDashboardHealthMerchantsProvidersPurposes
Installation
npm install @adiba-banking-cloud/backoffice-console-ob-api-sdkConfiguration
Configure the SDK once at app startup:
import { configureBackofficeOpenBankingSdk } from "@adiba-banking-cloud/backoffice-console-ob-api-sdk";
configureBackofficeOpenBankingSdk({
baseURL: "https://api.s2.adiba.app/automation/bo",
requireAuth: true,
getAccessToken: async () => {
return localStorage.getItem("access_token") ?? undefined;
},
onUnauthorized: async () => {
// handle token expiry / redirect to login
},
});The SDK prefixes requests with "/ob/0.0.1" by default. If the API version or
mount path changes, override it from one place:
configureBackofficeOpenBankingSdk({
baseURL: "https://api.s2.adiba.app/automation/bo",
apiPathPrefix: "/ob/1.0.0",
});Usage
Applications
import { ApplicationsApi } from "@adiba-banking-cloud/backoffice-console-ob-api-sdk";
const response = await ApplicationsApi.listApplications({
page: 1,
limit: 10,
applicationStatus: "ACTIVE",
});
console.log(response.data.data);List-style collections also expose OData-friendly helpers for search and filter use cases:
import { CustomersApi } from "@adiba-banking-cloud/backoffice-console-ob-api-sdk";
const filteredCustomers = await CustomersApi.queryCustomers("Acme", {
customerType: "BUSINESS",
consentStatus: "ACTIVE",
});Providers
import { ProvidersApi } from "@adiba-banking-cloud/backoffice-console-ob-api-sdk";
const response = await ProvidersApi.getProviderByCode("TPP-001");
console.log(response.data.tppName);Public API
Runtime exports
configureBackofficeOpenBankingSdksetApiBaseUrlsetAccessTokenProviderapiClientAPI_ENDPOINTS
Feature exports
ApplicationsApiConsentsApiCustomersApiDashboardApiHealthApiMerchantsApiProvidersApiPurposesApi
Type exports
The package re-exports feature types from each collection barrel, including:
- list query params and paginated response shapes
- create and update request payloads
- entity summary and detail payloads
- bulk operation payloads and success responses
Notes on typing
This SDK follows document.yaml as the source of truth.
Where the spec provides concrete request or response structures, those are typed directly. Where the spec has malformed inline schemas or underspecified payloads (for example the bulk merchant hold and purpose update bodies), the SDK keeps those payloads intentionally conservative and documented instead of inventing fields that were not reliably described.
The provider creation endpoint is documented as multipart/form-data. The SDK
accepts either a browser FormData instance or a typed field object and will
prepare multipart data when FormData is available at runtime.
Development
Build the package:
npm run buildType-check the package:
npx tsc --noEmit