Skip to content

IWINVSendProvider

Defined in: packages/provider/src/iwinv/provider.send.ts:60

Core provider interface for sending messages.

All providers must implement this interface. Optional capabilities (balance, templates, delivery status) are exposed via separate interfaces.

class MyProvider implements Provider {
readonly id = "my-provider";
readonly name = "My Provider";
readonly supportedTypes = ["SMS", "LMS"] as const;
async healthCheck() { return { healthy: true, issues: [] }; }
async send(params) { ... }
}

new IWINVSendProvider(config): IWINVSendProvider

Defined in: packages/provider/src/iwinv/provider.send.ts:77

IWINVConfig

IWINVSendProvider

readonly id: "iwinv" = "iwinv"

Defined in: packages/provider/src/iwinv/provider.send.ts:61

Unique identifier for this provider instance. Used for routing and logging.

"solapi"

Provider.id


readonly name: "IWINV Messaging Provider" = "IWINV Messaging Provider"

Defined in: packages/provider/src/iwinv/provider.send.ts:62

Human-readable name for display purposes.

"SOLAPI"

Provider.name


readonly supportedTypes: readonly MessageType[]

Defined in: packages/provider/src/iwinv/provider.send.ts:63

Message types this provider supports. Messages of unsupported types will be rejected.

Provider.supportedTypes


readonly transportCapabilities: object

Defined in: packages/provider/src/iwinv/provider.send.ts:64

Per-operation transport features supported by this provider. Missing declarations must be treated as unsupported.

readonly abortSignal: "supported" = "supported"

readonly injectableFetch: "supported" = "supported"

Provider.transportCapabilities

getBalance(query?): Promise<Result<BalanceResult, KMsgError>>

Defined in: packages/provider/src/iwinv/provider.send.ts:218

Query the remaining balance/points for the provider account.

BalanceQuery

Promise<Result<BalanceResult, KMsgError>>

BalanceProvider.getBalance


getDeliveryStatus(query, context?): Promise<Result<DeliveryStatusResult | null, KMsgError>>

Defined in: packages/provider/src/iwinv/provider.send.ts:179

Query delivery status for a previously sent message. Optional capability - not all providers support this.

DeliveryStatusQuery

ProviderRequestContext

Promise<Result<DeliveryStatusResult | null, KMsgError>>

Provider.getDeliveryStatus


getOnboardingSpec(): ProviderOnboardingSpec

Defined in: packages/provider/src/iwinv/provider.send.ts:73

Get the onboarding specification for this provider. Used by tooling to guide provider configuration.

ProviderOnboardingSpec

Provider.getOnboardingSpec


healthCheck(): Promise<ProviderHealthStatus>

Defined in: packages/provider/src/iwinv/provider.send.ts:98

Check if the provider is operational. Used for health monitoring and circuit breaker decisions.

Promise<ProviderHealthStatus>

Provider.healthCheck


send(options, context?): Promise<Result<SendResult, KMsgError>>

Defined in: packages/provider/src/iwinv/provider.send.ts:133

Send a message through this provider.

SendOptions

ProviderRequestContext

Promise<Result<SendResult, KMsgError>>

Result with SendResult on success, KMsgError on failure.

Provider.send