JavaScript SDK'sı: bildirim referansı
İmzasıyla birlikte bildirim gönderme ve yönetmeye yönelik her yöntem.
6 dk. oku·Seviye referans·12 Eki 2026 tarihinde revize edildi
Bu İngilizce metin, Fransızca orijinalinden otomatik olarak oluşturulmuştur ve henüz incelenmemiştir.
Bu sayfa otomatik olarak çevrildi. İngilizce versiyonu yetkilidir.
#
Sınıf
Bildirim Hizmeti
| Mülkiyet | Açıklama |
|---|---|
readonly admin: NotificationsAdminService | Yönetim alt istemcisi: istatistikler, kuyruk, hurda (DLQ), tedarikçi günlükleri, olaylar, kurallar ve ayarlar. |
| Yöntem | Açıklama |
|---|---|
send(options: SendNotificationOptions): Promise<AuraResponse<Notification>>send(channel: NotificationChannel, recipient: string, body: string, options?: { subject?: string; templateId?: string; variables?: Record<string, unknown>; metadata?: Record<string, unknown>; idempotencyKey?: string; }): Promise<AuraResponse<Notification>> | Gönderilecek bir bildirimi sıraya koyar (Modern Nesne API'si). |
sendBatch(items: Array<SendNotificationRequest | SendNotificationItem>): Promise<AuraResponse<BatchSendResponse>> | Bir toplu bildirim gönderir (POST /send/batch). |
sendEmail(recipient: string, subject: string, body: string, options?: SendEmailOptions): Promise<AuraResponse<Notification>> | İşlemsel bir e-posta gönderir (channel: 'email'). |
sendSms(recipient: string, body: string, options?: SendSmsOptions): Promise<AuraResponse<Notification>> | İşlemsel bir SMS (channel: 'sms') gönderir. |
sendPush(recipient: string, title: string, body: string, options?: SendPushOptions): Promise<AuraResponse<Notification>> | Bir mobil anında bildirim gönderir (channel: 'push', FCM veya APN'ler). |
sendWebhook(targetUrl: string, event: string, payload: string | Record<string, unknown>, options?: SendWebhookOptions): Promise<AuraResponse<Notification>> | Giden bir HTTP POST web kancası (channel: 'webhook') yayınlar. |
retry(id: string): Promise<AuraResponse<Notification>> | Başarısız bir bildirimi yeniden deneyin (status: 'failed' veya 'dead_lettered'). |
list(options?: { channel?: NotificationChannel; status?: NotificationStatus; search?: string; sort?: 'created_at' | 'updated_at' | 'status'; order?: 'asc' | 'desc'; limit?: number; offset?: number; }): Promise<AuraResponse<Notification[]>> | Projenin bildirim geçmişini, channel, status ve search ölçülerine göre filtrelenebilir, created_at, updated_at veya status öğesine göre sıralanmış olarak, limit / offset sayfalandırmayla listeler. |
get(id: string): Promise<AuraResponse<Notification>> | Bir bildirimi tanımlayıcısına göre okur. |
listTemplates(): Promise<AuraResponse<NotificationTemplate[]>> | Proje mesajı şablonlarını listeler. |
getTemplate(id: string): Promise<AuraResponse<NotificationTemplate>> | Bir mesaj şablonunu tanımlayıcısına göre okur. |
createTemplate(template: Omit<NotificationTemplate, 'id' | 'project_id' | 'created_at' | 'updated_at'>): Promise<AuraResponse<NotificationTemplate>> | Bir şablon oluşturur — name, channel, subject, body ve başka hiçbir şey oluşturmaz. |
updateTemplate(id: string, updates: Partial<Pick<NotificationTemplate, 'name' | 'subject' | 'body'>>): Promise<AuraResponse<NotificationTemplate>> | Bir şablonu günceller: name, subject ve/veya body. |
deleteTemplate(id: string): Promise<AuraResponse<null>> | Bir mesaj şablonunu siler. |
#
Sınıf
BildirimlerYöneticiHizmet
| Yöntem | Açıklama |
|---|---|
getSettings(): Promise<AuraResponse<NotificationSettingsPublic>> | Projenin genel tedarikçisini ve kota ayarlarını (GET /settings) alır. |
updateSettings(settings: NotificationSettingsPatch | Partial<NotificationSettings>): Promise<AuraResponse<NotificationSettingsPublic>> | Projenin tedarikçi veya kota ayarlarını günceller (PATCH /settings). |
getStats(options?: { window?: NotificationStatsWindow; channel?: NotificationChannel; }): Promise<AuraResponse<NotificationStats>> | Toplu gönderme istatistikleri (GET /stats). |
getQueue(): Promise<AuraResponse<NotificationQueueStats>> | Gönderme kuyruğunun durumunu okur: bekleyen bildirimlerin derinliği ve dağıtımı. |
listAttempts(notificationId: string): Promise<AuraResponse<NotificationAttempt[]>> | Sağlayıcının her birine verdiği yanıtı içeren bir bildirim gönderme girişimlerini listeler. |
listDeadLetters(options?: { channel?: NotificationChannel; search?: string; limit?: number; offset?: number; }): Promise<AuraResponse<NotificationDeadLetter[]>> | Çöp kuyruğuna (DLQ) yerleştirilen ve channel ve search tarafından filtrelenebilen bildirimleri listeler. |
retryDeadLetter(id: string): Promise<AuraResponse<Notification>> | Hurda kuyruğundan (DLQ) belirli bir bildirimi yeniden gönderir. |
listEvents(options?: { status?: 'received' | 'matched' | 'ignored' | 'failed' | 'enqueued'; limit?: number; offset?: number; }): Promise<AuraResponse<NotificationEvent[]>> | Kural motoru tarafından alınan olayları, status tarafından filtrelenebilir şekilde listeler. |
listProviderLogs(options?: { channel?: NotificationChannel; status?: NotificationAttemptStatus; limit?: number; offset?: number; }): Promise<AuraResponse<NotificationProviderLog[]>> | Üçüncü taraf satıcı yürütme günlükleri (GET /providers/logs). |
previewTemplate(id: string, variables: Record<string, unknown>): Promise<AuraResponse<NotificationTemplatePreview>> | Bir ileti göndermeden, önizleme için verilen variables ile bir model oluşturur. |
listRules(): Promise<AuraResponse<NotificationRule[]>> | Proje bildirim kurallarını listeler (bir gönderimin otomatik tetiklenmesi). |
createRule(rule: CreateNotificationRuleRequest): Promise<AuraResponse<NotificationRule>> | Bir bildirim kuralı oluşturur: condition öğesini kontrol eden trigger_type türündeki her olay için, channel üzerinden recipient_expr tarafından verilen alıcıya isteğe bağlı bir gecikmeyle bir mesaj gönderilir. |
getRule(id: string): Promise<AuraResponse<NotificationRule>> | Tanımlayıcısına göre bir bildirim kuralını okur. |
updateRule(id: string, updates: UpdateNotificationRuleRequest): Promise<AuraResponse<NotificationRule>> | Bir bildirim kuralını günceller: yalnızca sağlanan alanlar değişir (örneğin enabled). |
deleteRule(id: string): Promise<AuraResponse<null>> | Bir bildirim kuralını siler. |
Oluşturulan sayfa
Bu sayfa, SDK'nın tür bildirimlerinden ve yorumlarından oluşturulduğundan, yayınlanan koddan sapamaz. Çalışılan örnekler için kılavuzları okuyun.
Son güncelleme · 12 Eki 2026