notification59 عملية

Notification API

Push, SMS, and email notifications with per-channel providers and templates.

Queries

QUERY

adminListAnnouncements

#

List announcements with pagination (admin only)

الوسائط

  • input!
يُرجع!
QUERY

adminTenantEmailProviders

#

List the email providers of a specific tenant (PlatformAdmin only). Mirrors emailProviders but takes the target tenant from the argument instead of the request context, so platform admins can inspect a tenant they're not impersonating. Used by the admin tenant detail page.

الوسائط

  • tenantId!
يُرجع[!]!
QUERY

adminTenantPushProviders

#

List the tenant-owned push providers of a specific tenant (PlatformAdmin only). Mirrors pushProviders(ownership: TENANT) but takes the target tenant from the argument instead of the request context, so platform admins can inspect a tenant they're not impersonating. Used by the admin tenant detail page.

الوسائط

  • tenantId!
يُرجع[!]!
QUERY

adminTenantSmsProviders

#

List the SMS providers of a specific tenant (PlatformAdmin only). Mirrors smsProviders but takes the target tenant from the argument instead of the request context, so platform admins can inspect a tenant they're not impersonating. Used by the admin tenant detail page.

الوسائط

  • tenantId!
  • input!

    افتراضي

    {
      "search": null,
      "pagination": {
        "limit": 10,
        "page": 1,
        "after": null
      }
    }
يُرجع!
QUERY

announcement

#

Get a single announcement by ID (admin only)

الوسائط

  • id!
يُرجع
QUERY

announcements

#

Query active announcements targeted at the current account. The app is taken from the x-app request header.

الوسائط

  • limitInt
يُرجع[!]!
QUERY

emailProvider

#

Get a specific email provider by ID

الوسائط

  • idString!
يُرجع
QUERY

emailProviderDefinition

#

Get a specific email provider definition by ID

الوسائط

  • idString!
يُرجع
QUERY

emailProviderDefinitions

#

List all available email provider definitions for the tenant

يُرجع[!]!
QUERY

emailProviders

#

List all email providers for the tenant

يُرجع[!]!
QUERY

emailScenarioDefinitions

#

List the email scenario definitions configurable from the caller's panel. Platform admins get platform + shared scenarios; tenant owners/admins get tenant + shared scenarios. Each definition carries its default subject, description, and the variables the system provides. # Authorization Requires PlatformAdmin, TenantOwner, or TenantAdmin role.

يُرجع[!]!
QUERY

emailTemplate

#

Get a specific email template by ID. Returns None when the template's scenario is outside the caller's panel, so existence is not leaked across roles. # Authorization Requires PlatformAdmin, TenantOwner, or TenantAdmin role.

الوسائط

  • idString!
يُرجع
QUERY

emailTemplateByScenario

#

Get the active email template for a specific scenario. Returns None when the scenario is outside the caller's panel. # Authorization Requires PlatformAdmin, TenantOwner, or TenantAdmin role.

الوسائط

  • scenario!
يُرجع
QUERY

emailTemplates

#

List the email templates configurable from the caller's panel. Templates whose scenario is outside the caller's role (e.g. a platform billing scenario for a tenant admin) are filtered out so the list stays coherent with [super::EmailScenarioDefinitionQuery]. # Authorization Requires PlatformAdmin, TenantOwner, or TenantAdmin role.

يُرجع[!]!
QUERY

liveActivities

#

Query live activities for the current account

الوسائط

  • app!
  • topics[String!]
يُرجع[!]!
QUERY

myNotificationPreferences

#

Get the current user's notification preferences. Returns preferences grouped by category, filtered for the caller's app and role. Merges tenant defaults with user overrides.

يُرجع!
QUERY

notifications

#

Query durable notifications for the current account

الوسائط

  • app!
  • status
  • limitInt
  • offsetInt
يُرجع[!]!
QUERY

pushProvider

#

Get a single push provider by id (admin only).

الوسائط

  • idString!
يُرجع
QUERY

pushProviders

#

List push providers for an owner scope (admin only). Defaults to the caller's tenant-owned providers; ownership: PLATFORM lists the shared platform providers and requires a platform admin.

الوسائط

  • ownership
يُرجع[!]!
QUERY

smsProvider

#

Get a specific SMS provider by ID (admin only)

الوسائط

  • idString!
يُرجع
QUERY

smsProviderCatalog

#

Every SMS gateway, ranked for the given countries. Pass the tenant's operating countries (from myOperationFootprint) to get per-country prices, a coverage verdict, and a recommendation. Pass an empty list to get the bare catalog — credential schemas and integration status, with no pricing.

الوسائط

  • countryCodes[String!]!

    ISO 3166-1 alpha-2 codes the gateway must serve, e.g. ["GB", "SA"].

    افتراضي

    []
يُرجع[!]!
QUERY

smsProviderCoverage

#

Full SMS provider coverage matrix. Globally-available providers report an empty country_codes list with is_global = true.

يُرجع[!]!
QUERY

smsProviders

#

List all SMS providers for the tenant (admin only)

الوسائط

  • input!

    افتراضي

    {
      "search": null,
      "pagination": {
        "limit": 10,
        "page": 1,
        "after": null
      }
    }
يُرجع!
QUERY

smsProvidersForCountry

#

SMS providers available in the given country. Includes globally- available providers (Twilio, Infobip, etc.) in every response. country_code must be an ISO 3166-1 alpha-2 code (case-insensitive).

الوسائط

  • countryCodeString!

    ISO 3166-1 alpha-2 country code (e.g. "KW", "US").

يُرجع[!]!
QUERY

smsTemplate

#

Get a specific SMS template by ID

الوسائط

  • idString!
يُرجع
QUERY

smsTemplates

#

List all SMS templates for the tenant

يُرجع[!]!
QUERY

unreadCount

#

Get unread count for an app

الوسائط

  • app!
يُرجعInt!

Mutations

MUTATION

createAnnouncement

#

Create an announcement (admin only)

الوسائط

  • input!
يُرجع!
MUTATION

createEmailProvider

#

Create a new email provider configuration

الوسائط

  • input!
يُرجع!
MUTATION

createEmailProviderDefinition

#

Create a custom email provider definition (SMTP or HTTP Webhook)

الوسائط

  • input!
يُرجع!
MUTATION

createEmailTemplate

#

Create a new email template. # Authorization Requires an admin-tier role *and* that the scenario belongs to the caller's panel (tenant admins cannot create platform templates, and vice versa).

الوسائط

  • input!
يُرجع!
MUTATION

createNotification

#

Create a new durable notification

الوسائط

  • input!
يُرجع!
MUTATION

createSmsProvider

#

Create a new SMS provider (admin only)

الوسائط

  • input!
يُرجع!
MUTATION

createSmsTemplate

#

Create a new SMS template

الوسائط

  • input!
يُرجع!
MUTATION

deactivateEmailProviderDefinition

#

Deactivate a custom email provider definition

الوسائط

  • idString!
يُرجعBoolean!
MUTATION

deleteAnnouncement

#

Delete an announcement (admin only)

الوسائط

  • id!
يُرجعBoolean!
MUTATION

deleteEmailProvider

#

Delete an email provider

الوسائط

  • idString!
يُرجعBoolean!
MUTATION

deleteEmailTemplate

#

Delete an email template. # Authorization Requires an admin-tier role; the template's scenario must belong to the caller's panel (enforced in the use case once the template is loaded).

الوسائط

  • idString!
يُرجعBoolean!
MUTATION

deleteSmsProvider

#

Delete an SMS provider (admin only)

الوسائط

  • idString!
يُرجعBoolean!
MUTATION

deleteSmsTemplate

#

Delete an SMS template

الوسائط

  • idString!
يُرجعBoolean!
MUTATION

dismissNotification

#

Dismiss a notification

الوسائط

  • input!
يُرجعBoolean!
MUTATION

endLiveActivity

#

End a live activity

الوسائط

  • input!
يُرجعBoolean!
MUTATION

markAllRead

#

Mark all notifications as read

الوسائط

  • input!
يُرجعInt!
MUTATION

markNotificationRead

#

Mark a notification as read

الوسائط

  • input!
يُرجعBoolean!
MUTATION

registerLiveActivityToken

#

Register an iOS ActivityKit Live Activity push token for direct APNs delivery of content-state updates.

الوسائط

  • input!
يُرجع!
MUTATION

registerPushToken

#

Register a push notification token for the authenticated device

الوسائط

  • input!
يُرجع!
MUTATION

removePushToken

#

Remove the push token for the authenticated device (call on logout).

يُرجعBoolean!
MUTATION

sendTestEmail

#

Send a test email for the given scenario, using the caller's tenant's default email provider and its configured template. Always returns the rendered preview. When dryRun is true the email is rendered but not dispatched, so admins can verify placeholder substitution before committing to a real send. # Authorization Requires an admin-tier role *and* that the scenario belongs to the caller's panel — a tenant cannot test-send a platform scenario, and vice versa.

الوسائط

  • input!
يُرجع!
MUTATION

setDefaultEmailProvider

#

Set an email provider as the default for the tenant

الوسائط

  • idString!
يُرجعBoolean!
MUTATION

setDefaultSmsProvider

#

Set an SMS provider as the default (admin only)

الوسائط

  • idString!
يُرجعBoolean!
MUTATION

testSmsProvider

#

Test an SMS provider by sending a test message (admin only)

الوسائط

  • idString!
  • phoneNumberString!
يُرجع!
MUTATION

updateAnnouncement

#

Update an announcement (admin only)

الوسائط

  • input!
يُرجع!
MUTATION

updateEmailProvider

#

Update an existing email provider

الوسائط

  • input!
يُرجع!
MUTATION

updateEmailProviderDefinition

#

Update a custom email provider definition

الوسائط

  • input!
يُرجع!
MUTATION

updateEmailTemplate

#

Update an existing email template. # Authorization Requires an admin-tier role; the template's scenario must belong to the caller's panel (enforced in the use case once the template is loaded).

الوسائط

  • input!
يُرجع!
MUTATION

updateLiveActivity

#

Update a live activity

الوسائط

  • input!
يُرجع!
MUTATION

updateMyNotificationPreferences

#

Update the current user's notification preferences. Accepts a list of preference changes (subject + channel + enabled). Only marketing/optable subjects can be toggled — transactional and OTP subjects are rejected. Returns the full updated preferences after applying changes.

الوسائط

  • input!
يُرجع!
MUTATION

updateSmsProvider

#

Update an existing SMS provider (admin only)

الوسائط

  • input!
يُرجع!
MUTATION

updateSmsTemplate

#

Update an existing SMS template

الوسائط

  • input!
يُرجع!