UNPKG

@k-msg/provider

Version:

Complete provider system with adapters and implementations for K-Message platform

29 lines (28 loc) 1.75 kB
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 { NormalizedIwinvConfig } from "./iwinv.internal.types"; import type { IWINVConfig } from "./types/iwinv"; export declare function resolveDefaultIWINVConfig(): IWINVConfig; export declare class IWINVSendProvider implements Provider, BalanceProvider { readonly id = "iwinv"; readonly name = "IWINV Messaging Provider"; readonly supportedTypes: readonly MessageType[]; readonly transportCapabilities: { readonly abortSignal: "supported"; readonly injectableFetch: "supported"; }; protected readonly config: NormalizedIwinvConfig; getOnboardingSpec(): import("@k-msg/core").ProviderOnboardingSpec; constructor(config: IWINVConfig); 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>>; private getAlimTalkBalance; private getSmsBalance; } export declare const createIWINVSendProvider: (config: IWINVConfig) => IWINVSendProvider; export declare const createDefaultIWINVSendProvider: () => IWINVSendProvider; export declare class IWINVSendProviderFactory { static create(config: IWINVConfig): IWINVSendProvider; static createDefault(): IWINVSendProvider; }