@k-msg/provider
Version:
Complete provider system with adapters and implementations for K-Message platform
28 lines (27 loc) • 1.68 kB
TypeScript
import { type BalanceProvider, type BalanceQuery, type BalanceResult, type DeliveryStatusQuery, type DeliveryStatusResult, KMsgError, type MessageType, type Provider, type ProviderHealthStatus, type ProviderRequestContext, type Result, type SendOptions, type SendResult } from "@k-msg/core";
import type { SolapiSdkClient } from "./solapi.internal.types";
import type { SolapiConfig } from "./types/solapi";
export declare class SolapiProvider implements Provider, BalanceProvider {
readonly id = "solapi";
readonly name = "SOLAPI Messaging Provider";
readonly supportedTypes: readonly MessageType[];
readonly transportCapabilities: {
readonly abortSignal: "unsupported";
readonly injectableFetch: "unsupported";
};
private readonly config;
private readonly client;
getOnboardingSpec(): import("@k-msg/core").ProviderOnboardingSpec;
constructor(config: SolapiConfig, client?: SolapiSdkClient);
healthCheck(): Promise<ProviderHealthStatus>;
send(options: SendOptions, _context?: ProviderRequestContext): Promise<Result<SendResult, KMsgError>>;
getDeliveryStatus(query: DeliveryStatusQuery, _context?: ProviderRequestContext): Promise<Result<DeliveryStatusResult | null, KMsgError>>;
getBalance(query?: BalanceQuery): Promise<Result<BalanceResult, KMsgError>>;
}
export declare const createSolapiProvider: (config: SolapiConfig) => SolapiProvider;
export declare const createDefaultSolapiProvider: () => SolapiProvider;
export declare class SolapiProviderFactory {
static create(config: SolapiConfig): SolapiProvider;
static createDefault(): SolapiProvider;
}
export declare function initializeSolapi(): void;