/** * #pushnotif.ts * * Code generated by ts-proto. DO NOT EDIT. * @packageDocumentation */ /** Request to queue a push notification for a user */ export type QueuePushNotificationRequest = { /** The Reddit user ID to send the notification to (e.g. "t2_abc123") */ recipientId: string; /** The title of the push notification */ title: string; /** The body text of the push notification */ body: string; /** The fullname of a comment (e.g., "t1_abc123") */ comment?: string | undefined; /** The fullname of a post (e.g., "t3_abc123") */ post?: string | undefined; }; /** Response from queuing a push notification */ export type QueuePushNotificationResponse = { /** Whether the notification was successfully queued */ success: boolean; /** Optional message providing additional context about the operation */ message: string; /** Unix timestamp when the notification was queued */ timestamp: number; }; /** Request to queue multiple push notifications */ export type BulkQueuePushNotificationRequest = { /** The title of the push notification (mustache template supported) */ title: string; /** The body text of the push notification (mustache template supported) */ body: string; /** List of recipients to send the notification to */ recipients: Recipient[]; }; /** Response from queuing multiple push notifications */ export type BulkQueuePushNotificationResponse = { /** Number of notifications successfully queued */ successCount: number; /** Number of notifications that failed to queue */ failureCount: number; /** Array of errors for notifications that failed to queue */ errors: PushNotificationError[]; /** Unix timestamp when the bulk operation was performed */ timestamp: number; }; export type Recipient = { /** The Reddit user ID to send the notification to (e.g. "t2_abc123") */ userId: string; /** The fullname of a comment (e.g., "t1_abc123") */ comment?: string | undefined; /** The fullname of a post (e.g., "t3_abc123") */ post?: string | undefined; /** Additional data to include with the notification's mustache template */ data?: { [key: string]: any; } | undefined; }; export type PushNotificationError = { /** The Reddit user ID for which the notification failed to queue (e.g. "t2_abc123") */ userId: string; /** Error message describing why the notification failed to queue */ message: string; }; export type OptInCurrentUserResponse = { /** Whether the user successfully opted in */ success: boolean; /** Optional message providing additional context about the operation */ message: string; }; export type OptOutCurrentUserResponse = { /** Whether the user successfully opted out */ success: boolean; /** Optional message providing additional context about the operation */ message: string; }; export type ListOptedInUsersRequest = { /** The maximum number of users to return. If this is greater than our max page size, it will be capped. */ limit?: number | undefined; /** Cursor to start listing AFTER. Interpreted as a timestamp in milliseconds. */ after?: string | undefined; }; export type ListOptedInUsersResponse = { /** List of T2 user IDs who have opted in to receive push notifications (e.g. "t2_abc123", "t2_def456") */ userIds: string[]; /** Next page cursor. Interpreted as a timestamp in milliseconds, pass back as `after`. */ next?: string | undefined; }; //# sourceMappingURL=pushnotif.d.ts.map