Types: Power Query
Compute Contract type definitions — queries, steps, connectors, source privacy, and mashups. Names: 86.
Definitions of the names from the “TypeScript type” column on the operation pages.
Other dictionary topics: session, workbook, and sheets · cells and ranges · formulas and calculation · formatting · data and sheet objects · pivot tables · charts and graphics · printing and page layout · Power Query · VBA and macros · protection and review · general and utility.
Types on this page — 86
AppliedStepAppliedStepsProjectionApprovedMacroDescriptorApprovedMacroExecutionModeApprovedMacroScopeApprovedODataFeedDescriptorApprovedSourceDescriptorApprovedWebConnectorDescriptorApprovedWebConnectorHeaderApprovedWebSourceDescriptorContractForeignMashupGroupContractForeignMashupLoadDestinationContractForeignMashupProjectionContractForeignMashupQueryEntryContractForeignMashupRefreshResultContractForeignMashupRefusalContractMashupWriteEditContractMashupWriteResultContractPowerQueryCellContractPowerQueryCellKindContractPowerQueryTransformOutcomeContractPrivacyInspectorIntentContractPrivacyInspectorResultContractQueryDependencyEdgeContractRecomputedQueryStatusFoldingNativeQueryODataFeedCredentialODataQueryOptionsPowerQueryInspectorSnapshotPowerQueryLoadDestinationPowerQueryLoadModePowerQueryLoadPlanPqDataSourceEntryPqDataSourceSettingsOutcomePqPostgresConnectorBoundsPqPostgresDeniedWirePqPostgresDialogDescriptorPqPostgresInspectHintPqPostgresLanGrantWirePqPostgresNavTableWirePqPostgresNavigationItemWirePqPostgresNavigationSchemaWirePqPostgresPreviewTableRefPqPrivacyEvaluationInputPqPrivacyGraphNodePqPrivacyLevelAssignmentPqPrivacyLevelListEntryPqPrivacyLevelWriteOutcomePqProductRibbonColumnPayloadPqProductRibbonDeniedPqProductRibbonQueryPayloadPqQueryGraphDiagnosticPqQueryGraphEdgePqQueryGraphExplainPqQueryGraphNodePqQueryGraphNodePublicationPqQueryGraphPartitionSummaryPqQueryGraphRefreshOutcomePqQueryGraphSnapshotPqScaleBackpressureStatePqScaleBudgetPqScaleDeniedPqScaleDeniedReasonPqScaleProgressCancelPayloadPqScaleProgressOpenPayloadPqScaleProgressPullPayloadPqScaleProgressSnapshotPayloadPqScaleProgressStatusPqSourceScopeWirePqSqlServerDeniedWirePqSqlServerDescriptorPqSqlServerNavigationItemWirePqSqlServerTableRefPrivacyCapabilityStatePrivacyCategoryPrivacyCategorySummaryPrivacyFindingPrivacyInventoryReportPrivacyMutationReportPrivacyRiskLevelProductTableRangeRefreshQueryOutcomeTableRangeQueryMutationPreviewTableRangeQueryPreviewWebConnectorCacheRetryPolicyWebConnectorCredentialModeWebConnectorCredentialScope
AppliedStep
Section titled “AppliedStep”interface AppliedStep {
stepId: string;
displayName: string;
canonicalM: string;
span: MWireSpan;
inputs: string[];
kind: "source" | "transform" | "output";
astNodeId?: string;}AppliedStepsProjection
Section titled “AppliedStepsProjection”interface AppliedStepsProjection {
queryStableId: string;
steps: AppliedStep[];
canonicalM: string;
diagnostics: InspectorDiagnostic[];
foldExplainPlan?: FoldExplainPlan;}ApprovedMacroDescriptor
Section titled “ApprovedMacroDescriptor”interface ApprovedMacroDescriptor { macroId: string; displayName: string; entrypoint: string; scope: ApprovedMacroScope; sourceLabel: string; sourceText: string; mode: ApprovedMacroExecutionMode; summary: string; effectRangeA1: string; limitations: string[];}ApprovedMacroExecutionMode
Section titled “ApprovedMacroExecutionMode”type ApprovedMacroExecutionMode = "approved-demo";ApprovedMacroScope
Section titled “ApprovedMacroScope”type ApprovedMacroScope = "workbook-local";ApprovedODataFeedDescriptor
Section titled “ApprovedODataFeedDescriptor”interface ApprovedODataFeedDescriptor {
serviceUrl: string;
approvedHeaders?: [string, string][];
timeoutMs: number;
maxResponseBytes: number;
maxPageCount: number;
maxTotalRows: number;
queryOptions?: ODataQueryOptions;
credential: ODataFeedCredential;
testAllowlist?: WebSourceTestAllowlist;}ApprovedSourceDescriptor
Section titled “ApprovedSourceDescriptor”type ApprovedSourceDescriptor = | ({ kind: "workbook" } & WorkbookSourceDescriptor) | ({ kind: "file" } & FileSourceDescriptor) | ({ kind: "folder" } & FolderSourceDescriptor);ApprovedWebConnectorDescriptor
Section titled “ApprovedWebConnectorDescriptor”interface ApprovedWebConnectorDescriptor {
source: ApprovedWebSourceDescriptor;
relativePath?: string;
query?: ApprovedWebConnectorHeader[];
headers?: ApprovedWebConnectorHeader[];
cacheRetry?: WebConnectorCacheRetryPolicy;
credentialMode?: WebConnectorCredentialMode;
credentialScope?: WebConnectorCredentialScope;}ApprovedWebConnectorHeader
Section titled “ApprovedWebConnectorHeader”interface ApprovedWebConnectorHeader { name: string; value: string;}ApprovedWebSourceDescriptor
Section titled “ApprovedWebSourceDescriptor”interface ApprovedWebSourceDescriptor {
url: string;
workbookId: string;
queryId?: string;
timeoutMs?: number;
revoked?: boolean;
testAllowlist?: WebSourceTestAllowlist;}ContractForeignMashupGroup
Section titled “ContractForeignMashupGroup”interface ContractForeignMashupGroup { id: string; name?: string;}ContractForeignMashupLoadDestination
Section titled “ContractForeignMashupLoadDestination”type ContractForeignMashupLoadDestination = | { mode: "existing_sheet"; sheetName: string; anchor: string } | { mode: "new_sheet"; sheetName: string } | { mode: "connection_only" };ContractForeignMashupProjection
Section titled “ContractForeignMashupProjection”interface ContractForeignMashupProjection { readOnly: boolean; revision: number; refused?: ContractForeignMashupRefusal; queries: ContractForeignMashupQueryEntry[]; groups: ContractForeignMashupGroup[]; connections: ContractWorkbookConnectionEntry[]; loadLinks: ContractWorkbookConnectionLoadLink[]; sourceScopes?: PqSourceScopeWire[]; unknownElements: string[]; sectionName?: string; sectionDeclarationCount: number; sectionHasErrors: boolean; hasConfig: boolean;}ContractForeignMashupQueryEntry
Section titled “ContractForeignMashupQueryEntry”interface ContractForeignMashupQueryEntry { identity: string; name: string; dependencyIdentities?: string[]; stableGuid?: string; itemPath?: string; queryGroupId?: string; isPrivate?: boolean; loadEnabled?: boolean; loadObjectType?: string; loadToDataModel?: boolean; resultType?: string; expressionParseOk?: boolean; expressionPreview?: string; expressionSha256?: string; previewSanitized: boolean; hasSectionDeclaration: boolean;}ContractForeignMashupRefreshResult
Section titled “ContractForeignMashupRefreshResult”interface ContractForeignMashupRefreshResult { status: string; revision: number; generation: number; queryIdentity: string; valueKind?: string; rowCount?: number; columnCount?: number; packageHash?: string; code?: string; detail?: string;}ContractForeignMashupRefusal
Section titled “ContractForeignMashupRefusal”interface ContractForeignMashupRefusal { code: string; detail: string;}ContractMashupWriteEdit
Section titled “ContractMashupWriteEdit”type ContractMashupWriteEdit = | { kind: "replace_expression"; query: string; newExpression: string } | { kind: "rename_query"; query: string; newName: string } | { kind: "delete_query"; query: string } | { kind: "duplicate_query"; query: string; newName: string } | { kind: "reference_query"; query: string; newName: string } | { kind: "load_to"; query: string; destination: ContractForeignMashupLoadDestination; } | { kind: "create_connection"; sourceSubsetId: string; name: string; destination: ContractWorkbookConnectionDestination; refreshOnOpen?: boolean; } | { kind: "edit_connection"; connection: string; sourceSubsetId?: string; name?: string; destination?: ContractWorkbookConnectionDestination; refreshOnOpen?: boolean; } | { kind: "rename_connection"; connection: string; newName: string } | { kind: "delete_connection"; connection: string } | { kind: "duplicate_connection"; connection: string; newName: string } | { kind: "reference_connection"; connection: string; newName: string };ContractMashupWriteResult
Section titled “ContractMashupWriteResult”interface ContractMashupWriteResult { status: string; revision: number; envelopeHash?: string; code?: string; detail?: string;}ContractPowerQueryCell
Section titled “ContractPowerQueryCell”interface ContractPowerQueryCell { kind: ContractPowerQueryCellKind; text?: string; number?: number; integer?: number; logical?: boolean; date?: string; errorSourceText?: string; errorTargetType?: string;}ContractPowerQueryCellKind
Section titled “ContractPowerQueryCellKind”type ContractPowerQueryCellKind = "null" | "text" | "number" | "integer" | "logical" | "date" | "error";ContractPowerQueryTransformOutcome
Section titled “ContractPowerQueryTransformOutcome”type ContractPowerQueryTransformOutcome = | { status: "evaluated"; sourceId: string; mSource: string; supportedSubset: string; columns: string[]; rows: ContractPowerQueryCell[][]; cellErrorCount: number; } | { status: "blocked"; sourceId: string; mSource: string; reason: string; detail: string; };ContractPrivacyInspectorIntent
Section titled “ContractPrivacyInspectorIntent”type ContractPrivacyInspectorIntent = | { action: "scan" } | { action: "remove_to_copy"; destinationUri: string; selectedCategories: PrivacyCategory[]; expectedSourceSha256: string; };ContractPrivacyInspectorResult
Section titled “ContractPrivacyInspectorResult”type ContractPrivacyInspectorResult = | { status: "scanned"; inspection: PrivacyInventoryReport } | { status: "removed_to_copy"; sanitization: PrivacyMutationReport };ContractQueryDependencyEdge
Section titled “ContractQueryDependencyEdge”interface ContractQueryDependencyEdge { dependentStableId: string; upstreamStableId: string;}ContractRecomputedQueryStatus
Section titled “ContractRecomputedQueryStatus”interface ContractRecomputedQueryStatus { queryStableId: string; recomputed: boolean;}FoldingNativeQuery
Section titled “FoldingNativeQuery”interface FoldingNativeQuery { transport: "odata" | "sql" | string; text: string;}ODataFeedCredential
Section titled “ODataFeedCredential”interface ODataFeedCredential {
mode?: WebConnectorCredentialMode;
scope: WebConnectorCredentialScope;}ODataQueryOptions
Section titled “ODataQueryOptions”interface ODataQueryOptions {
select?: string[];
filter?: string;
top?: number;}PowerQueryInspectorSnapshot
Section titled “PowerQueryInspectorSnapshot”interface PowerQueryInspectorSnapshot {
source: string; ast?: InspectorAstNode;
bindings: InspectorBinding[]; outcome: InspectorOutcome;
diagnostics: InspectorDiagnostic[]; lineage: InspectorLineage;
foldExplainPlan?: FoldExplainPlan;
foldingVerdict: FoldingVerdict;
}PowerQueryLoadDestination
Section titled “PowerQueryLoadDestination”interface PowerQueryLoadDestination { mode: PowerQueryLoadMode; sheetName?: string;
sheet_name?: string;
anchor?: CellAnchor;}PowerQueryLoadMode
Section titled “PowerQueryLoadMode”type PowerQueryLoadMode = "new-sheet" | "current-anchor" | "existing-range" | "connection-only";PowerQueryLoadPlan
Section titled “PowerQueryLoadPlan”interface PowerQueryLoadPlan { requests: ComputeRequest[]; outputRect: CellRect; sheetKey: string; staleClearCount: number; createdSheet: boolean;}PqDataSourceEntry
Section titled “PqDataSourceEntry”interface PqDataSourceEntry {
scopeId: string; scopeKind: "workbook" | "file" | "folder" | "web" | "odata" | "database";
queryCount: number;
pathChangeable: boolean;}PqDataSourceSettingsOutcome
Section titled “PqDataSourceSettingsOutcome”interface PqDataSourceSettingsOutcome { action: string;
requestedScopeId: string;
scopeId?: string; accepted: boolean; reason?: string;
workbookChanged: boolean;}PqPostgresConnectorBounds
Section titled “PqPostgresConnectorBounds”interface PqPostgresConnectorBounds { maxPreviewRows?: number; maxTotalRows?: number; statementTimeoutMs?: number;}PqPostgresDeniedWire
Section titled “PqPostgresDeniedWire”interface PqPostgresDeniedWire { reason: string; message: string;}PqPostgresDialogDescriptor
Section titled “PqPostgresDialogDescriptor”interface PqPostgresDialogDescriptor { providerId?: "postgres"; host: string; port: number; database: string;
credentialMode?: "stored" | "anonymous"; credentialScope?: WebConnectorCredentialScope;
options?: Record<string, string>; bounds?: PqPostgresConnectorBounds; revoked?: boolean;}PqPostgresInspectHint
Section titled “PqPostgresInspectHint”interface PqPostgresInspectHint {
canonicalM: string;
descriptorJson: string;
schema?: string;
item?: string;}PqPostgresLanGrantWire
Section titled “PqPostgresLanGrantWire”interface PqPostgresLanGrantWire { scopeOrigin: string; allowPrivateNetwork: boolean;}PqPostgresNavTableWire
Section titled “PqPostgresNavTableWire”interface PqPostgresNavTableWire { schema: string; name: string; kind: string;}PqPostgresNavigationItemWire
Section titled “PqPostgresNavigationItemWire”interface PqPostgresNavigationItemWire { name: string;
kind: string;}PqPostgresNavigationSchemaWire
Section titled “PqPostgresNavigationSchemaWire”interface PqPostgresNavigationSchemaWire { name: string; items: PqPostgresNavigationItemWire[];}PqPostgresPreviewTableRef
Section titled “PqPostgresPreviewTableRef”interface PqPostgresPreviewTableRef { schema: string; table: string;}PqPrivacyEvaluationInput
Section titled “PqPrivacyEvaluationInput”interface PqPrivacyEvaluationInput { rootQueryId: string; graph?: PqPrivacyGraphNode[]; levels?: PqPrivacyLevelAssignment[];}PqPrivacyGraphNode
Section titled “PqPrivacyGraphNode”interface PqPrivacyGraphNode { queryId: string; references?: string[]; parameters?: string[]; dynamicSource?: boolean; directScopes?: PqSourceScopeWire[];}PqPrivacyLevelAssignment
Section titled “PqPrivacyLevelAssignment”interface PqPrivacyLevelAssignment { canonicalScope: string; level: string; invalid?: boolean;}PqPrivacyLevelListEntry
Section titled “PqPrivacyLevelListEntry”interface PqPrivacyLevelListEntry { scopeId: string; scopeKind: "workbook" | "file" | "folder" | "web" | "odata" | "unknown"; displayResource: string; level: string; origin: "user-store" | "workbook-declared" | "effective"; reason?: string;}PqPrivacyLevelWriteOutcome
Section titled “PqPrivacyLevelWriteOutcome”interface PqPrivacyLevelWriteOutcome { canonicalScope: string; level?: string; scopeId?: string; accepted: boolean; reason?: string;}PqProductRibbonColumnPayload
Section titled “PqProductRibbonColumnPayload”interface PqProductRibbonColumnPayload { name: string; inferredType: string;}PqProductRibbonDenied
Section titled “PqProductRibbonDenied”interface PqProductRibbonDenied { reason: string; message: string;}PqProductRibbonQueryPayload
Section titled “PqProductRibbonQueryPayload”interface PqProductRibbonQueryPayload { queryId: string; sheetName: string; selectorKind: "table" | "range"; selectorName: string; columns: PqProductRibbonColumnPayload[]; totalRows: number; sampledRows: number; truncated: boolean; stepCount: number; canonicalM: string; editorAvailable: boolean; loaded: boolean;
loadedQueryStableId?: string;}PqQueryGraphDiagnostic
Section titled “PqQueryGraphDiagnostic”interface PqQueryGraphDiagnostic { code: string; nodes: string[]; message: string;}PqQueryGraphEdge
Section titled “PqQueryGraphEdge”interface PqQueryGraphEdge { from: string; to: string; kind: "query-ref" | "parameter-ref" | "source-read" | string;}PqQueryGraphExplain
Section titled “PqQueryGraphExplain”interface PqQueryGraphExplain { query_stable_id: string; display_name: string; dependencies: string[];
plan_availability: string; fold_explain_plan?: FoldExplainPlan;
folding_verdict: FoldingVerdict; partition_summary?: PqQueryGraphPartitionSummary; diagnostics: PqQueryGraphDiagnostic[];
postgres_inspect_hint?: PqPostgresInspectHint;}PqQueryGraphNode
Section titled “PqQueryGraphNode”interface PqQueryGraphNode { id: string; kind: "query" | "parameter" | "source" | string; display_name: string;
status: string; generation: number;
diagnostic_code?: string;}PqQueryGraphNodePublication
Section titled “PqQueryGraphNodePublication”interface PqQueryGraphNodePublication { query_stable_id: string; load_plan?: PowerQueryLoadPlan; refresh_outcome: unknown; persisted_query?: unknown;}PqQueryGraphPartitionSummary
Section titled “PqQueryGraphPartitionSummary”interface PqQueryGraphPartitionSummary { transitive_query_ids: string[]; transitive_scope_ids: string[];}PqQueryGraphRefreshOutcome
Section titled “PqQueryGraphRefreshOutcome”interface PqQueryGraphRefreshOutcome { generation: number; workbook_revision?: number;
states: Record<string, string>; diagnostics: PqQueryGraphDiagnostic[];
node_reasons?: Record<string, string>;}PqQueryGraphSnapshot
Section titled “PqQueryGraphSnapshot”interface PqQueryGraphSnapshot { schema_version: number; workbook_revision?: number; nodes: PqQueryGraphNode[]; edges: PqQueryGraphEdge[]; diagnostics: PqQueryGraphDiagnostic[];}PqScaleBackpressureState
Section titled “PqScaleBackpressureState”type PqScaleBackpressureState = { state: "ready" } | { state: "throttled"; retryAfterMs: number };PqScaleBudget
Section titled “PqScaleBudget”interface PqScaleBudget { maxRows: number; maxResultBytes: number; maxRowBytes: number; maxSpillBytes: number; maxBatchRows: number; timeBudgetMs: number;}PqScaleDenied
Section titled “PqScaleDenied”interface PqScaleDenied { reason: PqScaleDeniedReason; message: string;}PqScaleDeniedReason
Section titled “PqScaleDeniedReason”type PqScaleDeniedReason = | "row-budget-exceeded" | "byte-budget-exceeded" | "oversized-row" | "time-budget-exceeded" | "spill-cap-exceeded" | "cancelled" | "superseded" | "firewall-blocked" | "unsupported";PqScaleProgressCancelPayload
Section titled “PqScaleProgressCancelPayload”interface PqScaleProgressCancelPayload { cancelled: boolean;}PqScaleProgressOpenPayload
Section titled “PqScaleProgressOpenPayload”interface PqScaleProgressOpenPayload { sessionId: string; rowsTotal: number; budget: PqScaleBudget;}PqScaleProgressPullPayload
Section titled “PqScaleProgressPullPayload”interface PqScaleProgressPullPayload { status: PqScaleProgressStatus; rowsInBatch: number; rowsEmitted: number; rowsTotal: number; bytesEmitted: number; backpressure: PqScaleBackpressureState; elapsedMs: number; batchesPulled: number; denied?: PqScaleDenied;}PqScaleProgressSnapshotPayload
Section titled “PqScaleProgressSnapshotPayload”interface PqScaleProgressSnapshotPayload { status: PqScaleProgressStatus; rowsEmitted: number; rowsTotal: number; bytesEmitted: number; backpressure: PqScaleBackpressureState; elapsedMs: number; batchesPulled: number; denied?: PqScaleDenied;}PqScaleProgressStatus
Section titled “PqScaleProgressStatus”type PqScaleProgressStatus = "batch" | "done" | "denied";PqSourceScopeWire
Section titled “PqSourceScopeWire”type PqSourceScopeWire = | { kind: "workbook"; workbookStableId: string } | { kind: "file"; path: string } | { kind: "folder"; root: string } | { kind: "web"; origin: string } | { kind: "odata"; serviceOrigin: string } | { kind: "database"; resource: string };PqSqlServerDeniedWire
Section titled “PqSqlServerDeniedWire”interface PqSqlServerDeniedWire { reason: string; message: string;}PqSqlServerDescriptor
Section titled “PqSqlServerDescriptor”interface PqSqlServerDescriptor { host: string; port?: number; database: string; user: string; credentialScope: string; timeoutMs?: number; revoked?: boolean;}PqSqlServerNavigationItemWire
Section titled “PqSqlServerNavigationItemWire”interface PqSqlServerNavigationItemWire { schema: string; name: string; kind: string;}PqSqlServerTableRef
Section titled “PqSqlServerTableRef”interface PqSqlServerTableRef { schema: string; table: string;}PrivacyCapabilityState
Section titled “PrivacyCapabilityState”type PrivacyCapabilityState = "remove_live" | "detect_only" | "blocked";PrivacyCategory
Section titled “PrivacyCategory”type PrivacyCategory = | "core_properties" | "app_properties" | "custom_properties" | "custom_xml" | "thumbnail" | "document_server_metadata" | "comments_notes" | "hidden_sheets" | "hidden_rows_columns" | "external_links" | "custom_views" | "drawings";PrivacyCategorySummary
Section titled “PrivacyCategorySummary”interface PrivacyCategorySummary { category: PrivacyCategory; findingCount: number; capabilityState: PrivacyCapabilityState; reasonCodes: string[];}PrivacyFinding
Section titled “PrivacyFinding”interface PrivacyFinding { category: PrivacyCategory; reasonCode: string; count: number; riskLevel: PrivacyRiskLevel;}PrivacyInventoryReport
Section titled “PrivacyInventoryReport”interface PrivacyInventoryReport { schemaVersion: number; sourceSha256: string; signedPackage: boolean; totalFindingCount: number; findings: PrivacyFinding[]; categories: PrivacyCategorySummary[]; packageReasonCodes: string[];}PrivacyMutationReport
Section titled “PrivacyMutationReport”interface PrivacyMutationReport { schemaVersion: number; sourceSha256: string; outputSha256: string; removedCategories: PrivacyCategory[]; removedPartCount: number; modifiedPartCount: number; after: PrivacyInventoryReport;}PrivacyRiskLevel
Section titled “PrivacyRiskLevel”type PrivacyRiskLevel = "high" | "medium" | "low" | "none";ProductTableRangeRefreshQueryOutcome
Section titled “ProductTableRangeRefreshQueryOutcome”interface ProductTableRangeRefreshQueryOutcome { queryStableId: string; status: "refreshed" | "blocked" | "skipped"; loadPlan?: PowerQueryLoadPlan;
persistedQuery?: unknown; reason?: string; detail?: string;}TableRangeQueryMutationPreview
Section titled “TableRangeQueryMutationPreview”interface TableRangeQueryMutationPreview { mutation: StepMutationResult; preview: TableRangeQueryPreview;}TableRangeQueryPreview
Section titled “TableRangeQueryPreview”interface TableRangeQueryPreview {
outcome: MExpressionOutcome;
totalRows?: number;
sampledRows?: number;
truncated: boolean;}WebConnectorCacheRetryPolicy
Section titled “WebConnectorCacheRetryPolicy”interface WebConnectorCacheRetryPolicy {
cacheEnabled?: boolean;
maxRetries?: number;}WebConnectorCredentialMode
Section titled “WebConnectorCredentialMode”type WebConnectorCredentialMode = "anonymous" | "webApi";WebConnectorCredentialScope
Section titled “WebConnectorCredentialScope”interface WebConnectorCredentialScope {
origin: string;
queryId?: string;}