import type { ActivityStore } from "./activity-log.js"; import type { DiscordClient } from "./discord-client.js"; import { InteractionLimiter } from "./interaction-limiter.js"; import { type OperationStore } from "./operation-store.js"; import type { ScopePolicy } from "./policy.js"; import type { RequestOptions } from "./types.js"; import type { WebhookCredentialStore } from "./webhook-credential-store.js"; export interface WebhookMessageLookupRequest { messageId: string; webhookId: string; } export interface WebhookMessageSendRequest { content: string; notifyUserIds?: readonly string[]; operationKey: string; webhookId: string; } export interface WebhookMessageEditRequest extends WebhookMessageSendRequest { messageId: string; } export interface WebhookMessageDeletionRequest { messageId: string; operationKey: string; reviewReason: string; webhookId: string; } export interface NormalizedWebhookMessageSendRequest { content: string; notifyUserIds: string[]; operationKey: string; operationKeyHash: string; webhookId: string; } export interface NormalizedWebhookMessageEditRequest extends NormalizedWebhookMessageSendRequest { messageId: string; } export interface NormalizedWebhookMessageDeletionRequest { messageId: string; operationKey: string; operationKeyHash: string; reviewReason: string; webhookId: string; } export interface ProjectedWebhookMessage { attachmentCount: number; channelId: string; componentCount: number; content: string; editedAt: string | null; embedCount: number; flags: number; guildId: string; mentionEveryone: boolean; mentionedRoleCount: number; mentionedUserCount: number; messageId: string; pinned: boolean; pollPresent: boolean; stickerCount: number; timestamp: string; tts: boolean; type: number; url: string; webhookId: string; } export interface WebhookMessageLookupResult { message: ProjectedWebhookMessage; privacy: WebhookMessagePrivacyProjection; schemaVersion: number; status: "found"; } export interface WebhookMessageWriteResult { action: "edit" | "send"; activityId: string | null; channelId: string; guildId: string; localReplay: boolean; messageId: string; operationKeyHash: string; planDigest: string; schemaVersion: number; status: "completed" | "noop"; url: string; webhookId: string; } export interface WebhookMessagePrivacyProjection { credentialPaths: "omitted"; credentials: "connector-private"; durableRecords: "content-free"; executionUrls: "omitted"; messageContentPersistence: "none"; rawPayloads: "omitted"; } export interface WebhookMessageDeletionPlan { action: "delete"; applicationId: string; botId: string; channel: { guildId: string; id: string; type: number; }; createdAt: string; digest: string; guild: { id: string; name: string; }; operationKeyHash: string; privacy: WebhookMessagePrivacyProjection; reviewReason: string; schemaVersion: number; status: "planned"; target: ProjectedWebhookMessage; warnings: string[]; webhook: { applicationId: string | null; id: string; type: "incoming"; }; } export interface WebhookMessageDeletionResult { activityId: string; channelId: string; guildId: string; messageId: string; operationKeyHash: string; planDigest: string; readbackMatched: boolean; schemaVersion: number; status: "completed" | "completed-with-drift"; url: string; webhookId: string; } export interface WebhookMessageServiceClient extends Pick { } export interface WebhookMessageServiceOptions { activityStore: ActivityStore; client: WebhookMessageServiceClient; clock?: () => Date; credentialStore: Pick; intentKey?: Uint8Array; limiter: InteractionLimiter; operationStore: OperationStore; planKey?: Uint8Array; policy: ScopePolicy; randomId?: () => string; } export declare function normalizeWebhookMessageLookupRequest(request: WebhookMessageLookupRequest): WebhookMessageLookupRequest; export declare function normalizeWebhookMessageSendRequest(request: WebhookMessageSendRequest): NormalizedWebhookMessageSendRequest; export declare function normalizeWebhookMessageEditRequest(request: WebhookMessageEditRequest): NormalizedWebhookMessageEditRequest; export declare function normalizeWebhookMessageDeletionRequest(request: WebhookMessageDeletionRequest): NormalizedWebhookMessageDeletionRequest; export declare function webhookMessageIntentKey(botToken: string): Uint8Array; export declare class WebhookMessageService { #private; constructor(options: WebhookMessageServiceOptions); sendDigest(request: WebhookMessageSendRequest): string; editDigest(request: WebhookMessageEditRequest): string; get(request: WebhookMessageLookupRequest, options?: RequestOptions): Promise; send(request: WebhookMessageSendRequest, options?: RequestOptions): Promise; edit(request: WebhookMessageEditRequest, options?: RequestOptions): Promise; planDeletion(applicationId: string, botId: string, request: WebhookMessageDeletionRequest, options?: RequestOptions): Promise; executeDeletion(applicationId: string, botId: string, request: WebhookMessageDeletionRequest, expectedDigest: string, options?: RequestOptions): Promise; } //# sourceMappingURL=webhook-message-service.d.ts.map