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.
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).
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.
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.
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.
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.
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.
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.
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.
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.
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.
Argumente
countryCodes[String!]!
ISO 3166-1 alpha-2 codes the gateway must serve, e.g. ["GB", "SA"].
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.
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).
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).
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).
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.
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).
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.