ggez-banking-sdk
Version:
A Node.js package to handle GGEZ Banking API endpoints, Simplify the process of managing CRUD operations with this efficient and easy-to-use package.
29 lines (28 loc) • 843 B
TypeScript
import type { GeoHelper } from "../../../helper/geoHelper";
type InitialContext = {
baseUrl: string;
nodeUrl: string;
programId: string;
lang?: string;
installationId?: string;
token?: string;
userId?: number;
};
/**
* Source of truth for per-request credential + config state.
*
* Services read via getters at the moment a request is issued — never from
* captured constructor values — so fresh credentials always win.
*
* Proxy methods write via setters after a successful auth operation.
* Nothing outside the SDK should call the setters.
*/
interface ClientContextProvider {
getBaseUrl(): string;
getNodeUrl(): string;
getProgramId(): number;
getLang(): string;
setLang(lang: string): void;
getGeoHelper(): GeoHelper;
}
export type { InitialContext, ClientContextProvider };