/*! * Copyright (C) Microsoft Corporation. All rights reserved. */ /** * MIRROR — keep in sync with * `packages/managed-apps-codegen/src/shared/swaggerUtils.ts`. * * The code-apps stack has no codegen package of its own, so the internal-action * filter is duplicated here rather than creating a dependency from * `power-apps-actions` onto the Managed Apps codegen package. The two copies must * behave identically; `src/__tests__/swaggerUtils.test.ts` mirrors the managed * suite case-for-case so behavioral drift fails a test on whichever side moved. */ /** Swagger 2.0 path-item keys that describe an HTTP operation. */ export declare const SWAGGER_HTTP_METHODS: ReadonlySet; /** * Returns true when a Swagger operation is marked `x-ms-visibility: internal`. * * Connector publishers use this marker for service-internal plumbing — metadata * lookups, webhook lifecycle callbacks, trigger continuations, evaluation * harnesses. Those operations are undocumented and unsupported for app * developers, so code generation hides them. * * Only the operation level is considered here. Parameter-level internal * visibility is handled separately (logic flows hardcode internal params that * carry a default). */ export declare function isInternalOperation(operation: unknown): boolean; /** Result of removing internal operations from a Swagger document. */ export type InternalOperationStripResult = { /** Number of operations present before stripping. */ totalCount: number; /** Number of operations removed because they are marked internal. */ removedCount: number; /** Operation IDs that were removed, in the order they were encountered. */ removedOperationIds: string[]; }; /** * Mutates a Swagger document in place, removing every operation marked * `x-ms-visibility: internal`, and dropping path entries left with no * operations. Operations are counted and removed regardless of whether they * carry an `operationId` — an internal operation without an ID would otherwise * survive into the persisted schema, and would not count toward the * "every operation is internal" check callers rely on. Only operations that do * carry a string ID are reported in `removedOperationIds`. * * Returns a summary of what was removed. Safe to call with any value; non-object * inputs and documents without a `paths` node are treated as empty. */ export declare function stripInternalOperations(swagger: unknown): InternalOperationStripResult; //# sourceMappingURL=swaggerUtils.d.ts.map