Skip to main content

QSMSEngine

@quik/communication


@quik/communication / QSMSEngine

Abstract Class: QSMSEngine

Defined in: communication/src/sms/definition.ts:4

Base class for SMS engines.

Extends​

Constructors​

Constructor​

new QSMSEngine(): QSMSEngine

Returns​

QSMSEngine

Inherited from​

QCommunicationEngine.constructor

Accessors​

defaultFrom​

Get Signature​

get defaultFrom(): string

Defined in: communication/src/engine.ts:21

Default address used when no sender is provided.

Returns​

string

Inherited from​

QCommunicationEngine.defaultFrom


engineType​

Get Signature​

get protected engineType(): string

Defined in: communication/src/sms/definition.ts:5

Engine identifier used for configuration lookups.

Returns​

string

Overrides​

QCommunicationEngine.engineType


isEnabled​

Get Signature​

get isEnabled(): boolean

Defined in: communication/src/engine.ts:16

Indicates whether the engine is enabled.

Returns​

boolean

Inherited from​

QCommunicationEngine.isEnabled


logger​

Get Signature​

get protected logger(): IQLogger

Defined in: core/src/QObject.ts:15

The logger getter for the object.

Returns​

IQLogger

Inherited from​

QCommunicationEngine.logger


name​

Get Signature​

get name(): string

Defined in: core/src/QObject.ts:8

Returns​

string

Inherited from​

QCommunicationEngine.name


retryAttempts​

Get Signature​

get protected retryAttempts(): number

Defined in: communication/src/engine.ts:110

Number of retry attempts for provider calls.

Returns​

number

Inherited from​

QCommunicationEngine.retryAttempts


retryBackoffFactor​

Get Signature​

get protected retryBackoffFactor(): number

Defined in: communication/src/engine.ts:122

Backoff factor applied to the retry delay.

Returns​

number

Inherited from​

QCommunicationEngine.retryBackoffFactor


retryDelayMilliseconds​

Get Signature​

get protected retryDelayMilliseconds(): number

Defined in: communication/src/engine.ts:116

Base delay between retries in milliseconds.

Returns​

number

Inherited from​

QCommunicationEngine.retryDelayMilliseconds


timeoutMilliseconds​

Get Signature​

get protected timeoutMilliseconds(): number

Defined in: communication/src/engine.ts:105

Timeout for provider calls in milliseconds. Use 0 to disable.

Returns​

number

Inherited from​

QCommunicationEngine.timeoutMilliseconds


transportType​

Get Signature​

get abstract protected transportType(): QSMSEngineType

Defined in: communication/src/sms/definition.ts:10

Type of transport for the engine.

Returns​

QSMSEngineType

Methods​

_send()​

abstract protected _send(message): Promise<void>

Defined in: communication/src/engine.ts:102

Implementation specific send logic.

Parameters​

message​

IQSMSOptions

Message definition to send.

Returns​

Promise<void>

Inherited from​

QCommunicationEngine._send


endSpan()​

protected endSpan(span): void

Defined in: core/src/QObject.ts:35

End a span returned by startSpan.

Parameters​

span​

TelemetrySpan

The span to end.

Returns​

void

Inherited from​

QCommunicationEngine.endSpan


recordSpanError()​

protected recordSpanError(span, err): void

Defined in: core/src/QObject.ts:45

Record an exception on an active span.

Parameters​

span​

TelemetrySpan

The span to record the error on.

err​

unknown

The error to record.

Returns​

void

Inherited from​

QCommunicationEngine.recordSpanError


send()​

send(message): Promise<void>

Defined in: communication/src/engine.ts:33

Dispatches a message if the engine is enabled.

Parameters​

message​

IQSMSOptions

Message definition to send.

Returns​

Promise<void>

Inherited from​

QCommunicationEngine.send


setSpanAttribute()​

protected setSpanAttribute(span, key, value): void

Defined in: core/src/QObject.ts:64

Set a single attribute on an active span.

Parameters​

span​

TelemetrySpan

The span to update.

key​

string

Attribute key.

value​

string | number | boolean

Attribute value.

Returns​

void

Inherited from​

QCommunicationEngine.setSpanAttribute


sleep()​

protected sleep(delayMs): Promise<void>

Defined in: communication/src/engine.ts:150

Sleep helper for retry delays.

Parameters​

delayMs​

number

Returns​

Promise<void>

Inherited from​

QCommunicationEngine.sleep


startSpan()​

protected startSpan(spanName, options?): TelemetrySpan

Defined in: core/src/QObject.ts:26

Start a telemetry span for the given operation name. Returns undefined when no telemetry provider is active.

Parameters​

spanName​

string

Name of the span.

options?​

TelemetrySpanOptions

Optional span attributes and kind.

Returns​

TelemetrySpan

Inherited from​

QCommunicationEngine.startSpan


withTimeout()​

protected withTimeout<T>(task, timeoutMs): Promise<T>

Defined in: communication/src/engine.ts:128

Applies a timeout to a provider call when configured.

Type Parameters​

T​

T

Parameters​

task​

Promise<T>

timeoutMs​

number

Returns​

Promise<T>

Inherited from​

QCommunicationEngine.withTimeout