Skip to content

@mbanq/core-sdk-js v0.50.0


@mbanq/core-sdk-js / commands / GetSubscription

Function: GetSubscription()

GetSubscription(subscriptionId): Command<{ subscriptionId: number; }, { action: "CREATE" | "UPDATE" | "DELETE"; entity: string; id: string; subscriberId: number; template: { id: number; identifier: string; isTrapDoor: boolean; metaData: Record<string, any>; name: string; placeholders: string[]; text: string; type: "EMAIL" | "PUSH_NOTIFICATION" | "DOCUMENT" | "SMS"; }; }>

Defined in: src/commands/rest/notification.ts:500

Retrieves detailed information about a specific subscription.

Parameters

subscriptionId

number

The ID of the subscription to retrieve

Returns

Command<{ subscriptionId: number; }, { action: "CREATE" | "UPDATE" | "DELETE"; entity: string; id: string; subscriberId: number; template: { id: number; identifier: string; isTrapDoor: boolean; metaData: Record<string, any>; name: string; placeholders: string[]; text: string; type: "EMAIL" | "PUSH_NOTIFICATION" | "DOCUMENT" | "SMS"; }; }>

A Command that when executed returns the subscription details

Example

typescript
const getSubscriptionCmd = GetSubscription(123);
const subscription = await getSubscriptionCmd.execute(config);
console.log(subscription);

Released under the MIT License.