import type { ActivityStore } from "./activity-log.js"; import type { DiscordClient } from "./discord-client.js"; import { type GlobalApplicationCommandDefinition, type GlobalApplicationCommandIntegrationType, type GlobalApplicationCommandType, type ProjectedGlobalApplicationCommand } from "./global-application-command-definition.js"; import { type OperationStore } from "./operation-store.js"; import type { ScopePolicy } from "./policy.js"; import type { DiscordApplication, RequestOptions } from "./types.js"; export declare const GLOBAL_APPLICATION_COMMAND_ACTIONS: readonly ["create", "delete", "update"]; export type GlobalApplicationCommandAction = typeof GLOBAL_APPLICATION_COMMAND_ACTIONS[number]; export interface CreateGlobalApplicationCommandRequest { acknowledgeGlobalExposure: true; action: "create"; definition: GlobalApplicationCommandDefinition; operationKey: string; } export interface UpdateGlobalApplicationCommandRequest { acknowledgeGlobalExposure: true; acknowledgePermissionResetAcrossGuilds?: true; action: "update"; commandId: string; definition: GlobalApplicationCommandDefinition; operationKey: string; } export interface DeleteGlobalApplicationCommandRequest { acknowledgeGlobalDeletion: true; acknowledgePermissionResetAcrossGuilds: true; action: "delete"; commandId: string; operationKey: string; } export type GlobalApplicationCommandChangeRequest = CreateGlobalApplicationCommandRequest | DeleteGlobalApplicationCommandRequest | UpdateGlobalApplicationCommandRequest; interface NormalizedRequestBase { action: GlobalApplicationCommandAction; operationKeyHash: string; } export type NormalizedGlobalApplicationCommandChangeRequest = (Omit & NormalizedRequestBase) | (Omit & NormalizedRequestBase) | (Omit & NormalizedRequestBase); export interface GlobalApplicationCommandInventoryEntry { commandId: string; definitionDigest: string; name: string; type: GlobalApplicationCommandType; version: string; } export interface GlobalApplicationCommandPlan { action: GlobalApplicationCommandAction; application: { embedded: boolean | null; installationTypes: GlobalApplicationCommandIntegrationType[]; installationTypesComplete: true; }; applicationId: string; botId: string; commandId: string | null; commandType: GlobalApplicationCommandType | null; createdAt: string; desiredDefinition: GlobalApplicationCommandDefinition | null; desiredDefinitionDigest: string | null; digest: string; effect: "change" | "none"; existingDefinition: GlobalApplicationCommandDefinition | null; existingDefinitionDigest: string | null; inventory: { counts: Record; digest: string; entries: GlobalApplicationCommandInventoryEntry[]; limits: Record; returned: number; totalLimit: number; }; operationKeyHash: string; permissionEffect: "all-guild-overwrites-cleared-by-discord" | "none"; privacy: { definitionsPersisted: false; namesPersisted: false; permissionTargetsEnumerated: false; planTextTransient: true; }; risks: string[]; schemaVersion: number; status: "already-absent" | "already-current" | "planned"; verification: { commandInventory: "exact-full-localization-api-readback"; clientPropagation: "discord-read-repair"; retriesAfterReservation: false; }; warnings: string[]; writeRequired: boolean; } export interface GlobalApplicationCommandResult { action: GlobalApplicationCommandAction; activityId: string | null; applicationId: string; commandId: string; commandType: GlobalApplicationCommandType | null; observed: ProjectedGlobalApplicationCommand | null; observedInventoryDigest: string; operationKeyHash: string; planDigest: string; readbackMatched: true; schemaVersion: number; status: "already-absent" | "already-current" | "completed"; } export interface GlobalApplicationCommandServiceClient extends Pick { } export interface GlobalApplicationCommandServiceOptions { activityStore: ActivityStore; client: GlobalApplicationCommandServiceClient; clock?: () => Date; operationStore: OperationStore; planKey?: Uint8Array; policy: Pick; randomId?: () => string; } export declare function normalizeGlobalApplicationCommandChangeRequest(request: GlobalApplicationCommandChangeRequest): NormalizedGlobalApplicationCommandChangeRequest; export declare class GlobalApplicationCommandService { #private; constructor(options: GlobalApplicationCommandServiceOptions); plan(application: DiscordApplication, botId: string, request: GlobalApplicationCommandChangeRequest, options?: RequestOptions): Promise; execute(application: DiscordApplication, botId: string, request: GlobalApplicationCommandChangeRequest, expectedDigest: string, options?: RequestOptions): Promise; } export {}; //# sourceMappingURL=global-application-command-service.d.ts.map