notification81 عملية

Notification API

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

Queries

QUERY

accountEmails

#

The emails sent to one person of the caller's workspace — a driver, a customer, a merchant, a provider — newest first, each with what its provider has reported since. Requires an admin of the workspace. An account of another workspace returns an empty page: the list is read under the caller's own workspace, whatever id is asked for.

الوسائط

  • input!
يُرجع!
QUERY

adminEmailSuppressions

#

The platform's opt-out list, most recent first (PlatformAdmin only).

الوسائط

  • input
يُرجع!
QUERY

adminEmailSuppressionsExport

#

The platform's whole opt-out list as CSV (PlatformAdmin only).

يُرجعString!
QUERY

adminListAnnouncements

#

List announcements with pagination (admin only)

الوسائط

  • input!
يُرجع!
QUERY

adminMailing

#

One mailing with its content and audiences (PlatformAdmin only).

الوسائط

  • id!
يُرجع!
QUERY

adminMailingAudience

#

One audience (PlatformAdmin only).

الوسائط

  • id!
يُرجع!
QUERY

adminMailingAudiencePreview

#

Who a source would reach right now, saved or not: the count, a sample, and how many are left out and why (PlatformAdmin only).

الوسائط

  • input
  • details
يُرجع!
QUERY

adminMailingAudiences

#

Saved audiences, newest first (PlatformAdmin only).

الوسائط

  • input
يُرجع!
QUERY

adminMailingContacts

#

The addresses of an imported audience (PlatformAdmin only).

الوسائط

  • input!
يُرجع!
QUERY

adminMailingPreflight

#

The launch checklist of a draft, and who it would reach (PlatformAdmin only).

الوسائط

  • id!
يُرجع!
QUERY

adminMailingPreview

#

The mailing exactly as one recipient would receive it, rendered by the path that sends it. Without recipientEmail it is rendered for the first recipient (PlatformAdmin only).

الوسائط

  • id!
  • recipientEmailString
يُرجع!
QUERY

adminMailingRecipients

#

A launched mailing's recipients in sending order, each with what its provider has reported since (PlatformAdmin only).

الوسائط

  • input!
يُرجع!
QUERY

adminMailingReport

#

A launched mailing in numbers (PlatformAdmin only).

الوسائط

  • id!
يُرجع!
QUERY

adminMailings

#

Mailings, newest first, each with its progress once launched (PlatformAdmin only).

الوسائط

  • input
يُرجع!
QUERY

adminMailingStreams

#

The sending streams that are set up (PlatformAdmin only).

يُرجع[!]!
QUERY

adminTenantEmails

#

The emails sent to a workspace, newest first, each with what its provider has reported since (PlatformAdmin only). audience: WORKSPACE is what BetterSuite sent the workspace itself, from its sign-up verification onwards. audience: USERS is what its people were sent — the sign-in codes and resets of its staff, and the mail the users of its apps received.

الوسائط

  • input!
يُرجع!
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

deliveryFailureSummary

#

How many of the workspace's texts, pushes and emails were attempted over the last days days, and how many failed, per gateway where the log knows it. Requires an admin of the workspace. days is held to between 1 and 90.

الوسائط

  • daysInt!

    افتراضي

    7
يُرجع!
QUERY

emailContent

#

What one logged email said, while it is kept (90 days from the send). A platform admin may read any email's; an admin of a workspace, those of the emails its own people were sent. Null for everything else: an email that does not exist, one whose content is not kept, and one the caller may not read all answer alike.

الوسائط

  • id!
يُرجع
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

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

messageDeliveries

#

The texts or pushes sent on behalf of the caller's workspace, newest first, each with how its gateway answered. Narrowed by outcome and by when it was sent. Requires an admin of the workspace. A text is kept for 90 days and a push for 14. What a message said is never kept.

الوسائط

  • input!
يُرجع!
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

سبب الإهمال: Use notificationsPage(app, status, pagination); legacy list retires through BET-204

الوسائط

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

notificationsPage

#

Durable notifications with the same app, role and status visibility as the list.

الوسائط

  • app!
  • status
  • pagination
يُرجع!
QUERY

pushProviders

مهجور#

سبب الإهمال: Use pushProvidersWithValues; BET-205

الوسائط

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

pushProvidersWithValues

#

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

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

smsTemplates

#

List all SMS templates for the tenant

يُرجع[!]!
QUERY

unreadCount

#

Get unread count for an app

الوسائط

  • app!
يُرجعInt!
QUERY

workspaceEmails

#

The emails the people of the caller's workspace were sent — its customers, drivers, merchants, providers, and its own staff signing in — newest first, each with what its provider has reported since. Narrowed by outcome and by when it was sent. Requires an admin of the workspace. The workspace is the session's. What BetterSuite sent the workspace itself is not in this list.

الوسائط

  • input!
يُرجع!

Mutations

MUTATION

adminAddEmailSuppressions

#

Opt addresses out of every topic, at most 1,000 a call. An address already opted out is left as it is (PlatformAdmin only).

الوسائط

  • input!
يُرجع!
MUTATION

adminArchiveMailingAudience

#

Take an audience out of the lists; mailings that use it keep it (PlatformAdmin only).

الوسائط

  • id!
يُرجعBoolean!
MUTATION

adminCancelMailing

#

Stop a launched mailing for good; what was sent stays sent (PlatformAdmin only).

الوسائط

  • id!
يُرجع!
MUTATION

adminCreateMailing

#

Start a draft on a stream (PlatformAdmin only).

الوسائط

  • input!
يُرجع!
MUTATION

adminCreateMailingAudience

#

Save a new audience (PlatformAdmin only).

الوسائط

  • input
  • details
يُرجع!
MUTATION

adminDeleteMailing

#

Delete a draft (PlatformAdmin only).

الوسائط

  • id!
يُرجعBoolean!
MUTATION

adminImportMailingContacts

#

Add rows to an imported audience, at most 1,000 a call; a row whose address is already there refreshes it (PlatformAdmin only).

الوسائط

  • input!
يُرجع!
MUTATION

adminLaunchMailing

#

Freeze a draft's recipients and start sending, at once or at startAt. Refused until every check of the launch checklist passes (PlatformAdmin only).

الوسائط

  • id!
  • startAt
يُرجع!
MUTATION

adminLiftEmailSuppression

#

Lift an opt-out an admin or an import added. One the recipient made, or that a bounce or complaint wrote, stays (PlatformAdmin only).

الوسائط

  • emailString!
يُرجعBoolean!
MUTATION

adminPauseMailing

#

Hold a launched mailing (PlatformAdmin only).

الوسائط

  • id!
يُرجع!
MUTATION

adminResumeMailing

#

Release a paused mailing (PlatformAdmin only).

الوسائط

  • id!
يُرجع!
MUTATION

adminResumeMailingStream

#

Let a halted stream send again (PlatformAdmin only).

الوسائط

  • id!
يُرجع!
MUTATION

adminSaveMailingStream

#

Set up the stream of a kind, or change the one that is there (PlatformAdmin only).

الوسائط

  • input!
يُرجع!
MUTATION

adminSendMailingTest

#

Send the mailing as it stands to one address, through its stream and with its unsubscribe header. It does not count in the mailing's numbers (PlatformAdmin only).

الوسائط

  • id!
  • toEmailString!
يُرجعBoolean!
MUTATION

adminUpdateMailing

#

Edit a draft; a launched mailing's content is locked (PlatformAdmin only).

الوسائط

  • id!
  • input!
يُرجع!
MUTATION

adminUpdateMailingAudience

#

Change an audience's name, filter or provenance. Its kind is fixed (PlatformAdmin only).

الوسائط

  • id!
  • input
  • details
يُرجع!
MUTATION

createAnnouncement

#

Create an announcement (admin only)

الوسائط

  • input!
يُرجع!
MUTATION

createEmailProvider

#

Create a new email provider configuration

الوسائط

  • 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

createSmsProvider

#

Create a new SMS provider (admin only)

الوسائط

  • input
  • details
يُرجع!
MUTATION

createSmsTemplate

#

Create a new SMS template

الوسائط

  • input!
يُرجع!
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

markAllRead

#

Mark all notifications as read

الوسائط

  • input!
يُرجعInt!
MUTATION

markNotificationRead

#

Mark a notification as read

الوسائط

  • input!
يُرجعBoolean!
MUTATION

registerLiveActivityToken

مهجور#

سبب الإهمال: Use registerLiveActivityTokenResult; BET-205

الوسائط

  • input!
يُرجع!
MUTATION

registerLiveActivityTokenResult

#

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

مهجور#

سبب الإهمال: Use testSmsProviderResult; BET-205

الوسائط

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

testSmsProviderResult

#

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

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

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
  • details
يُرجع!
MUTATION

updateSmsTemplate

#

Update an existing SMS template

الوسائط

  • input!
يُرجع!