@apicircle/core 1.0.6 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { BodyType, RequestAuth, Request, RequestRun, Folder, RequestBody, HttpMethod, EnvironmentVariable, Assertion, ContextExtraction, WorkspaceSynced, LinkedSnapshot, RequestOverride, EnvironmentVariableOverride, ExecutionPlan, PlanRun } from '@apicircle/shared';
2
- import { W as WorkspaceState, a as WorkspacePatch } from './patches-N7mvDpXn.cjs';
3
- export { b as WorkspacePatchKind } from './patches-N7mvDpXn.cjs';
2
+ import { W as WorkspaceState, a as WorkspacePatch, P as ParsedApicircleFolderExport } from './patches-ysO3y8pG.cjs';
3
+ export { A as APICIRCLE_FOLDER_EXPORT_FORMAT, b as ApicircleFolderExportDependencies, c as ApicircleFolderExportV1, C as CollectFolderExportArgs, d as CollectFolderExportResult, F as FolderExportCredential, e as FolderExportReport, f as WorkspacePatchKind, g as collectFolderExport, h as collectFolderExportCredentials, i as isApicircleFolderExport, p as parseApicircleFolderExport, j as parseApicircleFolderExportDoc, r as redactFolderExportCredentials, s as serializeFolderExport, k as suggestFolderExportFilename } from './patches-ysO3y8pG.cjs';
4
4
 
5
5
  type HeaderEntry$1 = {
6
6
  key: string;
@@ -1164,6 +1164,95 @@ declare function parsePostmanEnvironment(input: string): ParsedPostmanEnvironmen
1164
1164
  declare function isInsomniaExport(doc: unknown): boolean;
1165
1165
  declare function parseInsomniaCollection(input: string): ParsedPostmanCollection;
1166
1166
 
1167
+ interface ParsedApicircleEnvironment {
1168
+ name: string;
1169
+ /**
1170
+ * The variables that should land in the destination env, in the same
1171
+ * order as the source. Encrypted rows arrive with the SOURCE'S
1172
+ * `secretKeyId`; the caller is responsible for re-pointing the binding
1173
+ * to a destination-local slot id (or leaving it dangling until the user
1174
+ * fixes it).
1175
+ *
1176
+ * In v2, encrypted rows arrive with their ciphertext intact in `value`;
1177
+ * the importer can choose to land it as-is so the request-execute path
1178
+ * decrypts naturally when the user provides the matching slot value.
1179
+ * In v1, encrypted rows arrive with `value: ''` and the importer must
1180
+ * surface a pendingBinding for the user to type a fresh plaintext.
1181
+ */
1182
+ variables: EnvironmentVariable[];
1183
+ /**
1184
+ * Per encrypted row, the slot metadata the export carried. The store
1185
+ * action uses this to (a) reuse an existing destination slot by label
1186
+ * match, (b) reuse by `originSecretKeyId` for same-workspace re-imports,
1187
+ * or (c) surface a pendingBinding so the UI can prompt the user.
1188
+ * Indices line up with `variables` for the corresponding row only —
1189
+ * plain rows do not appear here.
1190
+ */
1191
+ encryptedBindingHints: EncryptedBindingHint[];
1192
+ /**
1193
+ * The envelope version the export advertised — `1` (label-only, prompt
1194
+ * user for value) or `2` (ciphertext + salt carry, attempt decrypt with
1195
+ * local slot value). Importers fork on this to decide whether to land
1196
+ * the ciphertext or surface a pendingBinding.
1197
+ */
1198
+ payloadVersion: 1 | 2;
1199
+ /**
1200
+ * Soft notes the parser surfaced about the import — dropped rows,
1201
+ * demoted encrypted rows, etc. Importers forward these to the UI as
1202
+ * warnings.
1203
+ */
1204
+ warnings: string[];
1205
+ }
1206
+ interface EncryptedBindingHint {
1207
+ /** The var the hint belongs to (matches the row's `key`). */
1208
+ varKey: string;
1209
+ /**
1210
+ * The slot's display label from the source workspace. Older exports
1211
+ * (before `secret.label` shipped) didn't carry this; the parser falls
1212
+ * back to `varKey` so the UI always has SOMETHING to render.
1213
+ */
1214
+ label: string;
1215
+ /**
1216
+ * The slot id the source workspace bound to. Useful for round-tripping
1217
+ * inside the same workspace (the destination's slot id matches), but
1218
+ * meaningless on a different machine. Optional — newer exports may
1219
+ * stop carrying it once enough time passes.
1220
+ */
1221
+ originSecretKeyId?: string;
1222
+ /** `true` when the export carried no `secret.label` and the label was synthesized. */
1223
+ labelFromFallback: boolean;
1224
+ /**
1225
+ * v2 only: the source's ciphertext (`enc:v1:<iv>:<base64>`) so the
1226
+ * destination can land an encrypted row whose value the user can
1227
+ * decrypt by providing the matching slot plaintext. `null` on v1 — the
1228
+ * caller must instead prompt the user for a plaintext value and
1229
+ * re-encrypt locally.
1230
+ */
1231
+ ciphertext: string | null;
1232
+ /**
1233
+ * v2 only: the source slot's salt (base64). Required to derive the same
1234
+ * AES-GCM key the source used. `null` on v1.
1235
+ */
1236
+ salt: string | null;
1237
+ }
1238
+ /** Lightweight discriminator — `true` when `doc.apicircleEnvironment` is 1 or 2. */
1239
+ declare function isApicircleEnvironment(doc: unknown): doc is {
1240
+ apicircleEnvironment: 1 | 2;
1241
+ name: string;
1242
+ variables: unknown[];
1243
+ };
1244
+ /**
1245
+ * Parse + validate a raw JSON string. Throws with a single, user-readable
1246
+ * message when the input is malformed; otherwise returns a parsed shape
1247
+ * ready for the store to graft in.
1248
+ */
1249
+ declare function parseApicircleEnvironment(input: string): ParsedApicircleEnvironment;
1250
+ /**
1251
+ * Same as `parseApicircleEnvironment` but skips the JSON.parse step —
1252
+ * used by callers that already deserialized the document.
1253
+ */
1254
+ declare function parseApicircleEnvironmentDoc(doc: unknown): ParsedApicircleEnvironment;
1255
+
1167
1256
  /**
1168
1257
  * Result of evaluating one assertion against a response. Carries a snapshot
1169
1258
  * of the assertion definition so downstream UI (History detail view, run
@@ -1568,6 +1657,37 @@ interface ApplyMutationResult {
1568
1657
  }
1569
1658
  declare function applyMutation(state: WorkspaceState, patch: WorkspacePatch, options?: ApplyMutationOptions): ApplyMutationResult;
1570
1659
 
1660
+ interface ImportApicircleFolderResult {
1661
+ synced: WorkspaceSynced;
1662
+ /** Id of the newly-created root folder in the destination workspace. */
1663
+ rootFolderId: string;
1664
+ /** Final display name (uniquified) of the imported root folder. */
1665
+ rootFolderName: string;
1666
+ counts: {
1667
+ folders: number;
1668
+ requests: number;
1669
+ schemasAdded: number;
1670
+ schemasReused: number;
1671
+ graphqlAdded: number;
1672
+ graphqlReused: number;
1673
+ filesAdded: number;
1674
+ filesReused: number;
1675
+ };
1676
+ /**
1677
+ * File-asset ids whose metadata landed in `globalAssets.files`
1678
+ * without a backing slot (because the export envelope carries
1679
+ * metadata only — bytes stay in their Git LFS sidecar). UIs use this
1680
+ * to surface a "re-attach these files" cue after import.
1681
+ */
1682
+ filesRequiringReattachment: string[];
1683
+ }
1684
+ /**
1685
+ * Graft a parsed API Circle folder export into `synced` under
1686
+ * `parentFolderId` (root when `null`). Returns the patched workspace +
1687
+ * counts the UI / CLI / MCP can surface.
1688
+ */
1689
+ declare function importApicircleFolderInto(synced: WorkspaceSynced, parsed: ParsedApicircleFolderExport, parentFolderId: string | null): ImportApicircleFolderResult;
1690
+
1571
1691
  /**
1572
1692
  * Best-known identity of whoever launched a plan run. Recorded for display
1573
1693
  * and handed to the `authorize` hook. `unknown` is the headless default when
@@ -1800,4 +1920,4 @@ interface TransformSavings {
1800
1920
  declare function computeTransformSavings(body: string, contentType?: string): TransformSavings;
1801
1921
  declare const TRANSFORM_FORMAT_LABELS: Record<TransformFormat, string>;
1802
1922
 
1803
- export { ANONYMOUS_ACTOR, type ApplyMutationOptions, type ApplyMutationResult, type AssertionResult, type AttachmentResolver, type AttachmentSlotRef, type AuthApplyOptions, type AuthApplyResult, type AuthApplyTarget, type AuthApplyWarning, type AuthCodeExchangeArgs, type AutoHeaderOverrides, type BranchNameOptions, type BuildDigestArgs, type BuildNtlmType3Args, type BuildRequestOptions, type BuiltRequest, type ClientCredentialsArgs, type ConflictResolution, type HeaderEntry$1 as ContentTypeHeaderEntry, type ContextExtractionResult, DESKTOP_APP_ORIGIN, type DeviceAuthorizationArgs, type DeviceAuthorizationResponse, type DiffEntry, type DiffStatus, type DigestChallenge, EMPTY_UNPUSHED_SUMMARY, type EncryptedPayload, type EntityBucket, type ExecuteOptions, type ExecutionResult, type FetchOAuth2TokenArgs, type GraphQLField, type GraphQLSchemaInfo, HTTP_HEADERS_MAP, type HawkSignArgs, type HeaderEntry, type HeaderSuggestionMode, type ImportedFolder, type ImportedRequest, type JwtAlgorithm, type JwtSignArgs, type ApplyArgs as LinkedApplyArgs, type ApplyResult as LinkedApplyResult, type PreviewArgs as LinkedPreviewArgs, type LinkedUpdateBucket, type LinkedUpdateEntry, type LinkedUpdatePreview, type LinkedUpdateResolutionMap, type LinkedUpdateStatus, type MonacoLanguage, type NtlmType2Challenge, type OAuth2ErrorResponse, OAuth2TokenError, type OAuth2TokenResponse, type ParsedCurl, type ParsedPostmanCollection, type ParsedPostmanEnvironment, type ParsedVersion, type PkceExchangeArgs, type PkceMethod, type PlanRunAuthorizationContext, PlanRunDeniedError, type PlanStepResult, type PollDeviceFlowArgs, type PreSendBlocker, type PreSendValidationInput, type PreSendValidationResult, type PreSendWarning, type PublishReleaseArgs, type RefreshTokenArgs, RemoteWorkspaceParseError, type ResolutionMap, type ResolutionScope, type ResolveInheritedAuthArgs, type ResolvePlanRefResult, type ResolveResult, type RopcArgs, type RunActor, type RunPlanOptions, type RunPlanResult, type SigV4SignArgs, type SigV4SignResult, TRANSFORM_FORMAT_LABELS, type ThreeWayDiff, type TransformCandidate, type TransformFormat, type TransformSavings, type UnpushedChange, type UnpushedSummary, type VariableSource, type VariableSuggestion, WorkspacePatch, WorkspaceState, applyAuth, applyAwsSigV4, applyContentTypeForBodyType, applyLinkedUpdate, applyMerge, applyMutation, applyPathParams, assertNoPlaintextCredentials, buildAuthorizeUrl, buildAutoHeaders, buildDigestAuthHeader, buildHawkAuthHeader, buildNtlmType1Negotiate, buildNtlmType3Authenticate, buildRequest, buildScope, collectAttachmentSlots, collectVariableSuggestions, compareSemver, composeBody, composeCookieHeader, composeHeaders, composeUrl, composeUrlWithQuery, computeCodeChallenge, computeThreeWayDiff, computeTransformSavings, decryptString, deprecateRelease, deriveKeyFromSlotValue, encryptString, exchangeAuthCode, exchangePkce, executeRequest, exportKey, extractContext, fetchOAuth2Token, findPathPlaceholders, generateAesKey, generateCodeVerifier, generateSlotSalt, generateSpanId, generateTraceParent, generateWorkingBranchName, getBodyTypeForContentType, getContentTypeForBodyType, getHeaderEntry, getHeaderValues, getLanguageFromBodyType, getLanguageFromContentType, getVariableAutocomplete, hasUnpushedChanges, importKey, isDesktop, isInsomniaExport, isPostmanEnvironment, isPostmanV2Collection, isValidSemver, lookup, mergeWithAutoHeaders, normalizeContentType, parseCurl, parseDigestChallenge, parseGraphqlSchema, parseInsomniaCollection, parseNtlmType2Challenge, parsePostmanCollection, parsePostmanEnvironment, parseSemver, parseUrlQuery, parseWorkspaceJson, pollDeviceFlow, preSendValidation, previewLinkedUpdate, publishRelease, readJsonPath, redactForGit, refreshToken, requestDeviceAuthorization, requestRunToExecutionResult, resolveInheritedAuth, resolvePlanRef, resolveString, resolveStringMap, runAssertions, runClientCredentials, runPlan, runRopc, serializePayload, serializeWorkspaceForGit, signJwt, slugify, sortVersionsDesc, suggestHeaders, summarizeUnpushedChanges, supportedContentTypeLanguageMap, toCsv, toToon, toYaml, tokenizeCurl, tryParsePayload, validateBranchName, yankRelease };
1923
+ export { ANONYMOUS_ACTOR, type ApplyMutationOptions, type ApplyMutationResult, type AssertionResult, type AttachmentResolver, type AttachmentSlotRef, type AuthApplyOptions, type AuthApplyResult, type AuthApplyTarget, type AuthApplyWarning, type AuthCodeExchangeArgs, type AutoHeaderOverrides, type BranchNameOptions, type BuildDigestArgs, type BuildNtlmType3Args, type BuildRequestOptions, type BuiltRequest, type ClientCredentialsArgs, type ConflictResolution, type HeaderEntry$1 as ContentTypeHeaderEntry, type ContextExtractionResult, DESKTOP_APP_ORIGIN, type DeviceAuthorizationArgs, type DeviceAuthorizationResponse, type DiffEntry, type DiffStatus, type DigestChallenge, EMPTY_UNPUSHED_SUMMARY, type EncryptedBindingHint, type EncryptedPayload, type EntityBucket, type ExecuteOptions, type ExecutionResult, type FetchOAuth2TokenArgs, type GraphQLField, type GraphQLSchemaInfo, HTTP_HEADERS_MAP, type HawkSignArgs, type HeaderEntry, type HeaderSuggestionMode, type ImportApicircleFolderResult, type ImportedFolder, type ImportedRequest, type JwtAlgorithm, type JwtSignArgs, type ApplyArgs as LinkedApplyArgs, type ApplyResult as LinkedApplyResult, type PreviewArgs as LinkedPreviewArgs, type LinkedUpdateBucket, type LinkedUpdateEntry, type LinkedUpdatePreview, type LinkedUpdateResolutionMap, type LinkedUpdateStatus, type MonacoLanguage, type NtlmType2Challenge, type OAuth2ErrorResponse, OAuth2TokenError, type OAuth2TokenResponse, type ParsedApicircleEnvironment, ParsedApicircleFolderExport, type ParsedCurl, type ParsedPostmanCollection, type ParsedPostmanEnvironment, type ParsedVersion, type PkceExchangeArgs, type PkceMethod, type PlanRunAuthorizationContext, PlanRunDeniedError, type PlanStepResult, type PollDeviceFlowArgs, type PreSendBlocker, type PreSendValidationInput, type PreSendValidationResult, type PreSendWarning, type PublishReleaseArgs, type RefreshTokenArgs, RemoteWorkspaceParseError, type ResolutionMap, type ResolutionScope, type ResolveInheritedAuthArgs, type ResolvePlanRefResult, type ResolveResult, type RopcArgs, type RunActor, type RunPlanOptions, type RunPlanResult, type SigV4SignArgs, type SigV4SignResult, TRANSFORM_FORMAT_LABELS, type ThreeWayDiff, type TransformCandidate, type TransformFormat, type TransformSavings, type UnpushedChange, type UnpushedSummary, type VariableSource, type VariableSuggestion, WorkspacePatch, WorkspaceState, applyAuth, applyAwsSigV4, applyContentTypeForBodyType, applyLinkedUpdate, applyMerge, applyMutation, applyPathParams, assertNoPlaintextCredentials, buildAuthorizeUrl, buildAutoHeaders, buildDigestAuthHeader, buildHawkAuthHeader, buildNtlmType1Negotiate, buildNtlmType3Authenticate, buildRequest, buildScope, collectAttachmentSlots, collectVariableSuggestions, compareSemver, composeBody, composeCookieHeader, composeHeaders, composeUrl, composeUrlWithQuery, computeCodeChallenge, computeThreeWayDiff, computeTransformSavings, decryptString, deprecateRelease, deriveKeyFromSlotValue, encryptString, exchangeAuthCode, exchangePkce, executeRequest, exportKey, extractContext, fetchOAuth2Token, findPathPlaceholders, generateAesKey, generateCodeVerifier, generateSlotSalt, generateSpanId, generateTraceParent, generateWorkingBranchName, getBodyTypeForContentType, getContentTypeForBodyType, getHeaderEntry, getHeaderValues, getLanguageFromBodyType, getLanguageFromContentType, getVariableAutocomplete, hasUnpushedChanges, importApicircleFolderInto, importKey, isApicircleEnvironment, isDesktop, isInsomniaExport, isPostmanEnvironment, isPostmanV2Collection, isValidSemver, lookup, mergeWithAutoHeaders, normalizeContentType, parseApicircleEnvironment, parseApicircleEnvironmentDoc, parseCurl, parseDigestChallenge, parseGraphqlSchema, parseInsomniaCollection, parseNtlmType2Challenge, parsePostmanCollection, parsePostmanEnvironment, parseSemver, parseUrlQuery, parseWorkspaceJson, pollDeviceFlow, preSendValidation, previewLinkedUpdate, publishRelease, readJsonPath, redactForGit, refreshToken, requestDeviceAuthorization, requestRunToExecutionResult, resolveInheritedAuth, resolvePlanRef, resolveString, resolveStringMap, runAssertions, runClientCredentials, runPlan, runRopc, serializePayload, serializeWorkspaceForGit, signJwt, slugify, sortVersionsDesc, suggestHeaders, summarizeUnpushedChanges, supportedContentTypeLanguageMap, toCsv, toToon, toYaml, tokenizeCurl, tryParsePayload, validateBranchName, yankRelease };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { BodyType, RequestAuth, Request, RequestRun, Folder, RequestBody, HttpMethod, EnvironmentVariable, Assertion, ContextExtraction, WorkspaceSynced, LinkedSnapshot, RequestOverride, EnvironmentVariableOverride, ExecutionPlan, PlanRun } from '@apicircle/shared';
2
- import { W as WorkspaceState, a as WorkspacePatch } from './patches-N7mvDpXn.js';
3
- export { b as WorkspacePatchKind } from './patches-N7mvDpXn.js';
2
+ import { W as WorkspaceState, a as WorkspacePatch, P as ParsedApicircleFolderExport } from './patches-ysO3y8pG.js';
3
+ export { A as APICIRCLE_FOLDER_EXPORT_FORMAT, b as ApicircleFolderExportDependencies, c as ApicircleFolderExportV1, C as CollectFolderExportArgs, d as CollectFolderExportResult, F as FolderExportCredential, e as FolderExportReport, f as WorkspacePatchKind, g as collectFolderExport, h as collectFolderExportCredentials, i as isApicircleFolderExport, p as parseApicircleFolderExport, j as parseApicircleFolderExportDoc, r as redactFolderExportCredentials, s as serializeFolderExport, k as suggestFolderExportFilename } from './patches-ysO3y8pG.js';
4
4
 
5
5
  type HeaderEntry$1 = {
6
6
  key: string;
@@ -1164,6 +1164,95 @@ declare function parsePostmanEnvironment(input: string): ParsedPostmanEnvironmen
1164
1164
  declare function isInsomniaExport(doc: unknown): boolean;
1165
1165
  declare function parseInsomniaCollection(input: string): ParsedPostmanCollection;
1166
1166
 
1167
+ interface ParsedApicircleEnvironment {
1168
+ name: string;
1169
+ /**
1170
+ * The variables that should land in the destination env, in the same
1171
+ * order as the source. Encrypted rows arrive with the SOURCE'S
1172
+ * `secretKeyId`; the caller is responsible for re-pointing the binding
1173
+ * to a destination-local slot id (or leaving it dangling until the user
1174
+ * fixes it).
1175
+ *
1176
+ * In v2, encrypted rows arrive with their ciphertext intact in `value`;
1177
+ * the importer can choose to land it as-is so the request-execute path
1178
+ * decrypts naturally when the user provides the matching slot value.
1179
+ * In v1, encrypted rows arrive with `value: ''` and the importer must
1180
+ * surface a pendingBinding for the user to type a fresh plaintext.
1181
+ */
1182
+ variables: EnvironmentVariable[];
1183
+ /**
1184
+ * Per encrypted row, the slot metadata the export carried. The store
1185
+ * action uses this to (a) reuse an existing destination slot by label
1186
+ * match, (b) reuse by `originSecretKeyId` for same-workspace re-imports,
1187
+ * or (c) surface a pendingBinding so the UI can prompt the user.
1188
+ * Indices line up with `variables` for the corresponding row only —
1189
+ * plain rows do not appear here.
1190
+ */
1191
+ encryptedBindingHints: EncryptedBindingHint[];
1192
+ /**
1193
+ * The envelope version the export advertised — `1` (label-only, prompt
1194
+ * user for value) or `2` (ciphertext + salt carry, attempt decrypt with
1195
+ * local slot value). Importers fork on this to decide whether to land
1196
+ * the ciphertext or surface a pendingBinding.
1197
+ */
1198
+ payloadVersion: 1 | 2;
1199
+ /**
1200
+ * Soft notes the parser surfaced about the import — dropped rows,
1201
+ * demoted encrypted rows, etc. Importers forward these to the UI as
1202
+ * warnings.
1203
+ */
1204
+ warnings: string[];
1205
+ }
1206
+ interface EncryptedBindingHint {
1207
+ /** The var the hint belongs to (matches the row's `key`). */
1208
+ varKey: string;
1209
+ /**
1210
+ * The slot's display label from the source workspace. Older exports
1211
+ * (before `secret.label` shipped) didn't carry this; the parser falls
1212
+ * back to `varKey` so the UI always has SOMETHING to render.
1213
+ */
1214
+ label: string;
1215
+ /**
1216
+ * The slot id the source workspace bound to. Useful for round-tripping
1217
+ * inside the same workspace (the destination's slot id matches), but
1218
+ * meaningless on a different machine. Optional — newer exports may
1219
+ * stop carrying it once enough time passes.
1220
+ */
1221
+ originSecretKeyId?: string;
1222
+ /** `true` when the export carried no `secret.label` and the label was synthesized. */
1223
+ labelFromFallback: boolean;
1224
+ /**
1225
+ * v2 only: the source's ciphertext (`enc:v1:<iv>:<base64>`) so the
1226
+ * destination can land an encrypted row whose value the user can
1227
+ * decrypt by providing the matching slot plaintext. `null` on v1 — the
1228
+ * caller must instead prompt the user for a plaintext value and
1229
+ * re-encrypt locally.
1230
+ */
1231
+ ciphertext: string | null;
1232
+ /**
1233
+ * v2 only: the source slot's salt (base64). Required to derive the same
1234
+ * AES-GCM key the source used. `null` on v1.
1235
+ */
1236
+ salt: string | null;
1237
+ }
1238
+ /** Lightweight discriminator — `true` when `doc.apicircleEnvironment` is 1 or 2. */
1239
+ declare function isApicircleEnvironment(doc: unknown): doc is {
1240
+ apicircleEnvironment: 1 | 2;
1241
+ name: string;
1242
+ variables: unknown[];
1243
+ };
1244
+ /**
1245
+ * Parse + validate a raw JSON string. Throws with a single, user-readable
1246
+ * message when the input is malformed; otherwise returns a parsed shape
1247
+ * ready for the store to graft in.
1248
+ */
1249
+ declare function parseApicircleEnvironment(input: string): ParsedApicircleEnvironment;
1250
+ /**
1251
+ * Same as `parseApicircleEnvironment` but skips the JSON.parse step —
1252
+ * used by callers that already deserialized the document.
1253
+ */
1254
+ declare function parseApicircleEnvironmentDoc(doc: unknown): ParsedApicircleEnvironment;
1255
+
1167
1256
  /**
1168
1257
  * Result of evaluating one assertion against a response. Carries a snapshot
1169
1258
  * of the assertion definition so downstream UI (History detail view, run
@@ -1568,6 +1657,37 @@ interface ApplyMutationResult {
1568
1657
  }
1569
1658
  declare function applyMutation(state: WorkspaceState, patch: WorkspacePatch, options?: ApplyMutationOptions): ApplyMutationResult;
1570
1659
 
1660
+ interface ImportApicircleFolderResult {
1661
+ synced: WorkspaceSynced;
1662
+ /** Id of the newly-created root folder in the destination workspace. */
1663
+ rootFolderId: string;
1664
+ /** Final display name (uniquified) of the imported root folder. */
1665
+ rootFolderName: string;
1666
+ counts: {
1667
+ folders: number;
1668
+ requests: number;
1669
+ schemasAdded: number;
1670
+ schemasReused: number;
1671
+ graphqlAdded: number;
1672
+ graphqlReused: number;
1673
+ filesAdded: number;
1674
+ filesReused: number;
1675
+ };
1676
+ /**
1677
+ * File-asset ids whose metadata landed in `globalAssets.files`
1678
+ * without a backing slot (because the export envelope carries
1679
+ * metadata only — bytes stay in their Git LFS sidecar). UIs use this
1680
+ * to surface a "re-attach these files" cue after import.
1681
+ */
1682
+ filesRequiringReattachment: string[];
1683
+ }
1684
+ /**
1685
+ * Graft a parsed API Circle folder export into `synced` under
1686
+ * `parentFolderId` (root when `null`). Returns the patched workspace +
1687
+ * counts the UI / CLI / MCP can surface.
1688
+ */
1689
+ declare function importApicircleFolderInto(synced: WorkspaceSynced, parsed: ParsedApicircleFolderExport, parentFolderId: string | null): ImportApicircleFolderResult;
1690
+
1571
1691
  /**
1572
1692
  * Best-known identity of whoever launched a plan run. Recorded for display
1573
1693
  * and handed to the `authorize` hook. `unknown` is the headless default when
@@ -1800,4 +1920,4 @@ interface TransformSavings {
1800
1920
  declare function computeTransformSavings(body: string, contentType?: string): TransformSavings;
1801
1921
  declare const TRANSFORM_FORMAT_LABELS: Record<TransformFormat, string>;
1802
1922
 
1803
- export { ANONYMOUS_ACTOR, type ApplyMutationOptions, type ApplyMutationResult, type AssertionResult, type AttachmentResolver, type AttachmentSlotRef, type AuthApplyOptions, type AuthApplyResult, type AuthApplyTarget, type AuthApplyWarning, type AuthCodeExchangeArgs, type AutoHeaderOverrides, type BranchNameOptions, type BuildDigestArgs, type BuildNtlmType3Args, type BuildRequestOptions, type BuiltRequest, type ClientCredentialsArgs, type ConflictResolution, type HeaderEntry$1 as ContentTypeHeaderEntry, type ContextExtractionResult, DESKTOP_APP_ORIGIN, type DeviceAuthorizationArgs, type DeviceAuthorizationResponse, type DiffEntry, type DiffStatus, type DigestChallenge, EMPTY_UNPUSHED_SUMMARY, type EncryptedPayload, type EntityBucket, type ExecuteOptions, type ExecutionResult, type FetchOAuth2TokenArgs, type GraphQLField, type GraphQLSchemaInfo, HTTP_HEADERS_MAP, type HawkSignArgs, type HeaderEntry, type HeaderSuggestionMode, type ImportedFolder, type ImportedRequest, type JwtAlgorithm, type JwtSignArgs, type ApplyArgs as LinkedApplyArgs, type ApplyResult as LinkedApplyResult, type PreviewArgs as LinkedPreviewArgs, type LinkedUpdateBucket, type LinkedUpdateEntry, type LinkedUpdatePreview, type LinkedUpdateResolutionMap, type LinkedUpdateStatus, type MonacoLanguage, type NtlmType2Challenge, type OAuth2ErrorResponse, OAuth2TokenError, type OAuth2TokenResponse, type ParsedCurl, type ParsedPostmanCollection, type ParsedPostmanEnvironment, type ParsedVersion, type PkceExchangeArgs, type PkceMethod, type PlanRunAuthorizationContext, PlanRunDeniedError, type PlanStepResult, type PollDeviceFlowArgs, type PreSendBlocker, type PreSendValidationInput, type PreSendValidationResult, type PreSendWarning, type PublishReleaseArgs, type RefreshTokenArgs, RemoteWorkspaceParseError, type ResolutionMap, type ResolutionScope, type ResolveInheritedAuthArgs, type ResolvePlanRefResult, type ResolveResult, type RopcArgs, type RunActor, type RunPlanOptions, type RunPlanResult, type SigV4SignArgs, type SigV4SignResult, TRANSFORM_FORMAT_LABELS, type ThreeWayDiff, type TransformCandidate, type TransformFormat, type TransformSavings, type UnpushedChange, type UnpushedSummary, type VariableSource, type VariableSuggestion, WorkspacePatch, WorkspaceState, applyAuth, applyAwsSigV4, applyContentTypeForBodyType, applyLinkedUpdate, applyMerge, applyMutation, applyPathParams, assertNoPlaintextCredentials, buildAuthorizeUrl, buildAutoHeaders, buildDigestAuthHeader, buildHawkAuthHeader, buildNtlmType1Negotiate, buildNtlmType3Authenticate, buildRequest, buildScope, collectAttachmentSlots, collectVariableSuggestions, compareSemver, composeBody, composeCookieHeader, composeHeaders, composeUrl, composeUrlWithQuery, computeCodeChallenge, computeThreeWayDiff, computeTransformSavings, decryptString, deprecateRelease, deriveKeyFromSlotValue, encryptString, exchangeAuthCode, exchangePkce, executeRequest, exportKey, extractContext, fetchOAuth2Token, findPathPlaceholders, generateAesKey, generateCodeVerifier, generateSlotSalt, generateSpanId, generateTraceParent, generateWorkingBranchName, getBodyTypeForContentType, getContentTypeForBodyType, getHeaderEntry, getHeaderValues, getLanguageFromBodyType, getLanguageFromContentType, getVariableAutocomplete, hasUnpushedChanges, importKey, isDesktop, isInsomniaExport, isPostmanEnvironment, isPostmanV2Collection, isValidSemver, lookup, mergeWithAutoHeaders, normalizeContentType, parseCurl, parseDigestChallenge, parseGraphqlSchema, parseInsomniaCollection, parseNtlmType2Challenge, parsePostmanCollection, parsePostmanEnvironment, parseSemver, parseUrlQuery, parseWorkspaceJson, pollDeviceFlow, preSendValidation, previewLinkedUpdate, publishRelease, readJsonPath, redactForGit, refreshToken, requestDeviceAuthorization, requestRunToExecutionResult, resolveInheritedAuth, resolvePlanRef, resolveString, resolveStringMap, runAssertions, runClientCredentials, runPlan, runRopc, serializePayload, serializeWorkspaceForGit, signJwt, slugify, sortVersionsDesc, suggestHeaders, summarizeUnpushedChanges, supportedContentTypeLanguageMap, toCsv, toToon, toYaml, tokenizeCurl, tryParsePayload, validateBranchName, yankRelease };
1923
+ export { ANONYMOUS_ACTOR, type ApplyMutationOptions, type ApplyMutationResult, type AssertionResult, type AttachmentResolver, type AttachmentSlotRef, type AuthApplyOptions, type AuthApplyResult, type AuthApplyTarget, type AuthApplyWarning, type AuthCodeExchangeArgs, type AutoHeaderOverrides, type BranchNameOptions, type BuildDigestArgs, type BuildNtlmType3Args, type BuildRequestOptions, type BuiltRequest, type ClientCredentialsArgs, type ConflictResolution, type HeaderEntry$1 as ContentTypeHeaderEntry, type ContextExtractionResult, DESKTOP_APP_ORIGIN, type DeviceAuthorizationArgs, type DeviceAuthorizationResponse, type DiffEntry, type DiffStatus, type DigestChallenge, EMPTY_UNPUSHED_SUMMARY, type EncryptedBindingHint, type EncryptedPayload, type EntityBucket, type ExecuteOptions, type ExecutionResult, type FetchOAuth2TokenArgs, type GraphQLField, type GraphQLSchemaInfo, HTTP_HEADERS_MAP, type HawkSignArgs, type HeaderEntry, type HeaderSuggestionMode, type ImportApicircleFolderResult, type ImportedFolder, type ImportedRequest, type JwtAlgorithm, type JwtSignArgs, type ApplyArgs as LinkedApplyArgs, type ApplyResult as LinkedApplyResult, type PreviewArgs as LinkedPreviewArgs, type LinkedUpdateBucket, type LinkedUpdateEntry, type LinkedUpdatePreview, type LinkedUpdateResolutionMap, type LinkedUpdateStatus, type MonacoLanguage, type NtlmType2Challenge, type OAuth2ErrorResponse, OAuth2TokenError, type OAuth2TokenResponse, type ParsedApicircleEnvironment, ParsedApicircleFolderExport, type ParsedCurl, type ParsedPostmanCollection, type ParsedPostmanEnvironment, type ParsedVersion, type PkceExchangeArgs, type PkceMethod, type PlanRunAuthorizationContext, PlanRunDeniedError, type PlanStepResult, type PollDeviceFlowArgs, type PreSendBlocker, type PreSendValidationInput, type PreSendValidationResult, type PreSendWarning, type PublishReleaseArgs, type RefreshTokenArgs, RemoteWorkspaceParseError, type ResolutionMap, type ResolutionScope, type ResolveInheritedAuthArgs, type ResolvePlanRefResult, type ResolveResult, type RopcArgs, type RunActor, type RunPlanOptions, type RunPlanResult, type SigV4SignArgs, type SigV4SignResult, TRANSFORM_FORMAT_LABELS, type ThreeWayDiff, type TransformCandidate, type TransformFormat, type TransformSavings, type UnpushedChange, type UnpushedSummary, type VariableSource, type VariableSuggestion, WorkspacePatch, WorkspaceState, applyAuth, applyAwsSigV4, applyContentTypeForBodyType, applyLinkedUpdate, applyMerge, applyMutation, applyPathParams, assertNoPlaintextCredentials, buildAuthorizeUrl, buildAutoHeaders, buildDigestAuthHeader, buildHawkAuthHeader, buildNtlmType1Negotiate, buildNtlmType3Authenticate, buildRequest, buildScope, collectAttachmentSlots, collectVariableSuggestions, compareSemver, composeBody, composeCookieHeader, composeHeaders, composeUrl, composeUrlWithQuery, computeCodeChallenge, computeThreeWayDiff, computeTransformSavings, decryptString, deprecateRelease, deriveKeyFromSlotValue, encryptString, exchangeAuthCode, exchangePkce, executeRequest, exportKey, extractContext, fetchOAuth2Token, findPathPlaceholders, generateAesKey, generateCodeVerifier, generateSlotSalt, generateSpanId, generateTraceParent, generateWorkingBranchName, getBodyTypeForContentType, getContentTypeForBodyType, getHeaderEntry, getHeaderValues, getLanguageFromBodyType, getLanguageFromContentType, getVariableAutocomplete, hasUnpushedChanges, importApicircleFolderInto, importKey, isApicircleEnvironment, isDesktop, isInsomniaExport, isPostmanEnvironment, isPostmanV2Collection, isValidSemver, lookup, mergeWithAutoHeaders, normalizeContentType, parseApicircleEnvironment, parseApicircleEnvironmentDoc, parseCurl, parseDigestChallenge, parseGraphqlSchema, parseInsomniaCollection, parseNtlmType2Challenge, parsePostmanCollection, parsePostmanEnvironment, parseSemver, parseUrlQuery, parseWorkspaceJson, pollDeviceFlow, preSendValidation, previewLinkedUpdate, publishRelease, readJsonPath, redactForGit, refreshToken, requestDeviceAuthorization, requestRunToExecutionResult, resolveInheritedAuth, resolvePlanRef, resolveString, resolveStringMap, runAssertions, runClientCredentials, runPlan, runRopc, serializePayload, serializeWorkspaceForGit, signJwt, slugify, sortVersionsDesc, suggestHeaders, summarizeUnpushedChanges, supportedContentTypeLanguageMap, toCsv, toToon, toYaml, tokenizeCurl, tryParsePayload, validateBranchName, yankRelease };