@apicircle/shared 1.0.2 → 1.0.4
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/README.md +9 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +51 -1
- package/dist/index.d.ts +51 -1
- package/dist/index.js.map +1 -1
- package/package.json +19 -26
package/dist/index.d.cts
CHANGED
|
@@ -347,6 +347,7 @@ interface WorkspaceSynced {
|
|
|
347
347
|
globalAssets: {
|
|
348
348
|
schemas: Record<string, GlobalSchema>;
|
|
349
349
|
graphql: Record<string, GlobalGraphQL>;
|
|
350
|
+
files?: Record<string, GlobalFileAsset>;
|
|
350
351
|
};
|
|
351
352
|
mockServers: Record<string, MockServer>;
|
|
352
353
|
/**
|
|
@@ -485,6 +486,18 @@ interface GlobalGraphQL {
|
|
|
485
486
|
createdAt: string;
|
|
486
487
|
updatedAt: string;
|
|
487
488
|
}
|
|
489
|
+
interface GlobalFileAsset {
|
|
490
|
+
id: string;
|
|
491
|
+
name: string;
|
|
492
|
+
description?: string;
|
|
493
|
+
slotId: string;
|
|
494
|
+
filename: string;
|
|
495
|
+
size: number;
|
|
496
|
+
mimeType: string;
|
|
497
|
+
sha256?: string;
|
|
498
|
+
createdAt: string;
|
|
499
|
+
updatedAt: string;
|
|
500
|
+
}
|
|
488
501
|
type RequestAuth = {
|
|
489
502
|
type: 'none';
|
|
490
503
|
} | {
|
|
@@ -640,6 +653,7 @@ type FormDataRow = {
|
|
|
640
653
|
kind: 'file';
|
|
641
654
|
key: string;
|
|
642
655
|
slotId: string | null;
|
|
656
|
+
globalFileAssetId?: string | null;
|
|
643
657
|
filename?: string;
|
|
644
658
|
size?: number;
|
|
645
659
|
mimeType?: string;
|
|
@@ -648,11 +662,33 @@ type FormDataRow = {
|
|
|
648
662
|
};
|
|
649
663
|
interface AttachmentRef {
|
|
650
664
|
slotId: string | null;
|
|
665
|
+
globalFileAssetId?: string | null;
|
|
651
666
|
filename?: string;
|
|
652
667
|
size?: number;
|
|
653
668
|
mimeType?: string;
|
|
654
669
|
sha256?: string;
|
|
655
670
|
}
|
|
671
|
+
interface LocalAttachmentCacheEntry {
|
|
672
|
+
slotId: string;
|
|
673
|
+
filename: string;
|
|
674
|
+
mimeType: string;
|
|
675
|
+
size: number;
|
|
676
|
+
sha256?: string;
|
|
677
|
+
/**
|
|
678
|
+
* Local-only path or storage URI where this device can read the bytes for
|
|
679
|
+
* execution. Browser builds use an IndexedDB URI; CLI runs use an absolute
|
|
680
|
+
* filesystem path under `.apicircle/attachments/`.
|
|
681
|
+
*/
|
|
682
|
+
localPath: string;
|
|
683
|
+
storage: 'indexeddb' | 'filesystem';
|
|
684
|
+
source: 'workspace' | 'linked-workspace';
|
|
685
|
+
linkedWorkspaceId?: string;
|
|
686
|
+
requiredBy: Array<{
|
|
687
|
+
requestId: string;
|
|
688
|
+
requestName: string;
|
|
689
|
+
}>;
|
|
690
|
+
downloadedAt: string;
|
|
691
|
+
}
|
|
656
692
|
interface Assertion {
|
|
657
693
|
id: string;
|
|
658
694
|
kind: 'status' | 'header' | 'json-path' | 'duration';
|
|
@@ -813,6 +849,13 @@ interface WorkspaceLocal {
|
|
|
813
849
|
retiredBranch: RetiredBranch | null;
|
|
814
850
|
sync: SyncSnapshot;
|
|
815
851
|
linkedCollections: Record<string, LinkedSnapshot>;
|
|
852
|
+
/**
|
|
853
|
+
* Local-only attachment cache metadata. The bytes themselves live outside
|
|
854
|
+
* workspace.json (IndexedDB in the web app, `.apicircle/attachments` for
|
|
855
|
+
* the CLI). This tells execution where the bytes are available locally and
|
|
856
|
+
* which request(s) require each file.
|
|
857
|
+
*/
|
|
858
|
+
attachmentCache?: Record<string, LocalAttachmentCacheEntry>;
|
|
816
859
|
globalContext: Record<string, string>;
|
|
817
860
|
mockRuntime: MockRuntime;
|
|
818
861
|
ui: {
|
|
@@ -920,6 +963,13 @@ interface LinkedSnapshot {
|
|
|
920
963
|
ref: string;
|
|
921
964
|
collections: WorkspaceSynced['collections'];
|
|
922
965
|
environments: WorkspaceSynced['environments'];
|
|
966
|
+
/**
|
|
967
|
+
* Source workspace assets referenced by linked requests
|
|
968
|
+
* (`bodySchemaId` / `graphqlSchemaId`). Cached locally with the linked
|
|
969
|
+
* collections so linked editors and execution can resolve schema refs
|
|
970
|
+
* without copying assets into the consumer's synced workspace.
|
|
971
|
+
*/
|
|
972
|
+
globalAssets?: WorkspaceSynced['globalAssets'];
|
|
923
973
|
/**
|
|
924
974
|
* The source workspace's secret-key registry, cached so the link card
|
|
925
975
|
* can render slot labels (not just raw ids). Optional — older
|
|
@@ -1242,4 +1292,4 @@ interface McpError {
|
|
|
1242
1292
|
/** Helper: full enumeration of tool names — useful for the docs / config UIs. */
|
|
1243
1293
|
declare const MCP_TOOL_NAMES: ReadonlyArray<McpToolName>;
|
|
1244
1294
|
|
|
1245
|
-
export { type Assertion, type AttachmentRef, type AwsSigV4Auth, type BodyType, type ConnectedRepo, type ContextExtraction, DEFAULT_WORKSPACE_NAME, type DigestAuth, type EnvPriorityRef, type Environment, type EnvironmentVariable, type EnvironmentVariableOverride, type ExecutionPlan, FONT_SIZE_PERCENT_DEFAULT, FONT_SIZE_PERCENT_MAX, FONT_SIZE_PERCENT_MIN, FONT_SIZE_PERCENT_STEP, type Folder, type FolderNode, type FontFamilyId, type FormDataRow, type GitHubSession, type GlobalGraphQL, type GlobalSchema, type HawkAuth, type HttpMethod, type JwtBearerAuth, type LinkedSnapshot, type LinkedWorkspace, MCP_TOOL_NAMES, type McpError, type McpToolName, type MockConditionClause, type MockConditionOp, type MockConditionScope, type MockEndpoint, type MockMultiplierSource, type MockMultiplierSourceKind, type MockParamDef, type MockRequestSchema, type MockResponseBody, type MockResponseBodyType, type MockResponseConfig, type MockResponseMultiplier, type MockResponseRule, type MockRuntime, type MockRuntimeEntry, type MockServer, type MockServerSource, type MockValidationKind, type MockValidationRule, type NtlmAuth, type OAuth2AuthCodeAuth, type OAuth2ClientCredentialsAuth, type OAuth2DeviceAuth, type OAuth2ImplicitAuth, type OAuth2PasswordAuth, type OAuth2PkceAuth, type OAuth2TokenState, type PanelId, type PlanRun, REQUEST_AUTH_TYPES, RUN_BODY_PREVIEW_LIMIT, type ReleaseHistory, type ReleaseVersion, type Request, type RequestAuth, type RequestAuthType, type RequestBody, type RequestOverride, type RequestOverridePatch, type RequestRun, type RetiredBranch, type SecretCryptoMeta, type SecretEntry, type SecretIndex, type SecretKeyMeta, type SecretUsage, type SyncSnapshot, type ThemeId, type ValidationResult, type WorkingBranch, type WorkspaceLocal, type WorkspaceSnapshot, type WorkspaceSnapshotLedger, type WorkspaceSnapshotTrigger, type WorkspaceSynced, coerceMockResponseBodyTypeForStatus, defaultAuthFor, envPriorityDisplayName, envPriorityKey, envPriorityRefEqual, formatBytes, generateId, getAllowedMockResponseBodyTypes, makeDefaultMockResponse, makeDefaultMockResponseBody, makeDefaultRequestSchema, normalizeAuth, parseEnvPriorityKey, safeExternalHref, utf8ByteLength, validateAwsRegion, validateEnvVarName, validateHttpHeaderName, validateJsonPath, validateJsonString, validateMockPath, validatePRTitle, validatePlanName, validatePositiveDuration, validateRegex, validateUrl };
|
|
1295
|
+
export { type Assertion, type AttachmentRef, type AwsSigV4Auth, type BodyType, type ConnectedRepo, type ContextExtraction, DEFAULT_WORKSPACE_NAME, type DigestAuth, type EnvPriorityRef, type Environment, type EnvironmentVariable, type EnvironmentVariableOverride, type ExecutionPlan, FONT_SIZE_PERCENT_DEFAULT, FONT_SIZE_PERCENT_MAX, FONT_SIZE_PERCENT_MIN, FONT_SIZE_PERCENT_STEP, type Folder, type FolderNode, type FontFamilyId, type FormDataRow, type GitHubSession, type GlobalFileAsset, type GlobalGraphQL, type GlobalSchema, type HawkAuth, type HttpMethod, type JwtBearerAuth, type LinkedSnapshot, type LinkedWorkspace, type LocalAttachmentCacheEntry, MCP_TOOL_NAMES, type McpError, type McpToolName, type MockConditionClause, type MockConditionOp, type MockConditionScope, type MockEndpoint, type MockMultiplierSource, type MockMultiplierSourceKind, type MockParamDef, type MockRequestSchema, type MockResponseBody, type MockResponseBodyType, type MockResponseConfig, type MockResponseMultiplier, type MockResponseRule, type MockRuntime, type MockRuntimeEntry, type MockServer, type MockServerSource, type MockValidationKind, type MockValidationRule, type NtlmAuth, type OAuth2AuthCodeAuth, type OAuth2ClientCredentialsAuth, type OAuth2DeviceAuth, type OAuth2ImplicitAuth, type OAuth2PasswordAuth, type OAuth2PkceAuth, type OAuth2TokenState, type PanelId, type PlanRun, REQUEST_AUTH_TYPES, RUN_BODY_PREVIEW_LIMIT, type ReleaseHistory, type ReleaseVersion, type Request, type RequestAuth, type RequestAuthType, type RequestBody, type RequestOverride, type RequestOverridePatch, type RequestRun, type RetiredBranch, type SecretCryptoMeta, type SecretEntry, type SecretIndex, type SecretKeyMeta, type SecretUsage, type SyncSnapshot, type ThemeId, type ValidationResult, type WorkingBranch, type WorkspaceLocal, type WorkspaceSnapshot, type WorkspaceSnapshotLedger, type WorkspaceSnapshotTrigger, type WorkspaceSynced, coerceMockResponseBodyTypeForStatus, defaultAuthFor, envPriorityDisplayName, envPriorityKey, envPriorityRefEqual, formatBytes, generateId, getAllowedMockResponseBodyTypes, makeDefaultMockResponse, makeDefaultMockResponseBody, makeDefaultRequestSchema, normalizeAuth, parseEnvPriorityKey, safeExternalHref, utf8ByteLength, validateAwsRegion, validateEnvVarName, validateHttpHeaderName, validateJsonPath, validateJsonString, validateMockPath, validatePRTitle, validatePlanName, validatePositiveDuration, validateRegex, validateUrl };
|
package/dist/index.d.ts
CHANGED
|
@@ -347,6 +347,7 @@ interface WorkspaceSynced {
|
|
|
347
347
|
globalAssets: {
|
|
348
348
|
schemas: Record<string, GlobalSchema>;
|
|
349
349
|
graphql: Record<string, GlobalGraphQL>;
|
|
350
|
+
files?: Record<string, GlobalFileAsset>;
|
|
350
351
|
};
|
|
351
352
|
mockServers: Record<string, MockServer>;
|
|
352
353
|
/**
|
|
@@ -485,6 +486,18 @@ interface GlobalGraphQL {
|
|
|
485
486
|
createdAt: string;
|
|
486
487
|
updatedAt: string;
|
|
487
488
|
}
|
|
489
|
+
interface GlobalFileAsset {
|
|
490
|
+
id: string;
|
|
491
|
+
name: string;
|
|
492
|
+
description?: string;
|
|
493
|
+
slotId: string;
|
|
494
|
+
filename: string;
|
|
495
|
+
size: number;
|
|
496
|
+
mimeType: string;
|
|
497
|
+
sha256?: string;
|
|
498
|
+
createdAt: string;
|
|
499
|
+
updatedAt: string;
|
|
500
|
+
}
|
|
488
501
|
type RequestAuth = {
|
|
489
502
|
type: 'none';
|
|
490
503
|
} | {
|
|
@@ -640,6 +653,7 @@ type FormDataRow = {
|
|
|
640
653
|
kind: 'file';
|
|
641
654
|
key: string;
|
|
642
655
|
slotId: string | null;
|
|
656
|
+
globalFileAssetId?: string | null;
|
|
643
657
|
filename?: string;
|
|
644
658
|
size?: number;
|
|
645
659
|
mimeType?: string;
|
|
@@ -648,11 +662,33 @@ type FormDataRow = {
|
|
|
648
662
|
};
|
|
649
663
|
interface AttachmentRef {
|
|
650
664
|
slotId: string | null;
|
|
665
|
+
globalFileAssetId?: string | null;
|
|
651
666
|
filename?: string;
|
|
652
667
|
size?: number;
|
|
653
668
|
mimeType?: string;
|
|
654
669
|
sha256?: string;
|
|
655
670
|
}
|
|
671
|
+
interface LocalAttachmentCacheEntry {
|
|
672
|
+
slotId: string;
|
|
673
|
+
filename: string;
|
|
674
|
+
mimeType: string;
|
|
675
|
+
size: number;
|
|
676
|
+
sha256?: string;
|
|
677
|
+
/**
|
|
678
|
+
* Local-only path or storage URI where this device can read the bytes for
|
|
679
|
+
* execution. Browser builds use an IndexedDB URI; CLI runs use an absolute
|
|
680
|
+
* filesystem path under `.apicircle/attachments/`.
|
|
681
|
+
*/
|
|
682
|
+
localPath: string;
|
|
683
|
+
storage: 'indexeddb' | 'filesystem';
|
|
684
|
+
source: 'workspace' | 'linked-workspace';
|
|
685
|
+
linkedWorkspaceId?: string;
|
|
686
|
+
requiredBy: Array<{
|
|
687
|
+
requestId: string;
|
|
688
|
+
requestName: string;
|
|
689
|
+
}>;
|
|
690
|
+
downloadedAt: string;
|
|
691
|
+
}
|
|
656
692
|
interface Assertion {
|
|
657
693
|
id: string;
|
|
658
694
|
kind: 'status' | 'header' | 'json-path' | 'duration';
|
|
@@ -813,6 +849,13 @@ interface WorkspaceLocal {
|
|
|
813
849
|
retiredBranch: RetiredBranch | null;
|
|
814
850
|
sync: SyncSnapshot;
|
|
815
851
|
linkedCollections: Record<string, LinkedSnapshot>;
|
|
852
|
+
/**
|
|
853
|
+
* Local-only attachment cache metadata. The bytes themselves live outside
|
|
854
|
+
* workspace.json (IndexedDB in the web app, `.apicircle/attachments` for
|
|
855
|
+
* the CLI). This tells execution where the bytes are available locally and
|
|
856
|
+
* which request(s) require each file.
|
|
857
|
+
*/
|
|
858
|
+
attachmentCache?: Record<string, LocalAttachmentCacheEntry>;
|
|
816
859
|
globalContext: Record<string, string>;
|
|
817
860
|
mockRuntime: MockRuntime;
|
|
818
861
|
ui: {
|
|
@@ -920,6 +963,13 @@ interface LinkedSnapshot {
|
|
|
920
963
|
ref: string;
|
|
921
964
|
collections: WorkspaceSynced['collections'];
|
|
922
965
|
environments: WorkspaceSynced['environments'];
|
|
966
|
+
/**
|
|
967
|
+
* Source workspace assets referenced by linked requests
|
|
968
|
+
* (`bodySchemaId` / `graphqlSchemaId`). Cached locally with the linked
|
|
969
|
+
* collections so linked editors and execution can resolve schema refs
|
|
970
|
+
* without copying assets into the consumer's synced workspace.
|
|
971
|
+
*/
|
|
972
|
+
globalAssets?: WorkspaceSynced['globalAssets'];
|
|
923
973
|
/**
|
|
924
974
|
* The source workspace's secret-key registry, cached so the link card
|
|
925
975
|
* can render slot labels (not just raw ids). Optional — older
|
|
@@ -1242,4 +1292,4 @@ interface McpError {
|
|
|
1242
1292
|
/** Helper: full enumeration of tool names — useful for the docs / config UIs. */
|
|
1243
1293
|
declare const MCP_TOOL_NAMES: ReadonlyArray<McpToolName>;
|
|
1244
1294
|
|
|
1245
|
-
export { type Assertion, type AttachmentRef, type AwsSigV4Auth, type BodyType, type ConnectedRepo, type ContextExtraction, DEFAULT_WORKSPACE_NAME, type DigestAuth, type EnvPriorityRef, type Environment, type EnvironmentVariable, type EnvironmentVariableOverride, type ExecutionPlan, FONT_SIZE_PERCENT_DEFAULT, FONT_SIZE_PERCENT_MAX, FONT_SIZE_PERCENT_MIN, FONT_SIZE_PERCENT_STEP, type Folder, type FolderNode, type FontFamilyId, type FormDataRow, type GitHubSession, type GlobalGraphQL, type GlobalSchema, type HawkAuth, type HttpMethod, type JwtBearerAuth, type LinkedSnapshot, type LinkedWorkspace, MCP_TOOL_NAMES, type McpError, type McpToolName, type MockConditionClause, type MockConditionOp, type MockConditionScope, type MockEndpoint, type MockMultiplierSource, type MockMultiplierSourceKind, type MockParamDef, type MockRequestSchema, type MockResponseBody, type MockResponseBodyType, type MockResponseConfig, type MockResponseMultiplier, type MockResponseRule, type MockRuntime, type MockRuntimeEntry, type MockServer, type MockServerSource, type MockValidationKind, type MockValidationRule, type NtlmAuth, type OAuth2AuthCodeAuth, type OAuth2ClientCredentialsAuth, type OAuth2DeviceAuth, type OAuth2ImplicitAuth, type OAuth2PasswordAuth, type OAuth2PkceAuth, type OAuth2TokenState, type PanelId, type PlanRun, REQUEST_AUTH_TYPES, RUN_BODY_PREVIEW_LIMIT, type ReleaseHistory, type ReleaseVersion, type Request, type RequestAuth, type RequestAuthType, type RequestBody, type RequestOverride, type RequestOverridePatch, type RequestRun, type RetiredBranch, type SecretCryptoMeta, type SecretEntry, type SecretIndex, type SecretKeyMeta, type SecretUsage, type SyncSnapshot, type ThemeId, type ValidationResult, type WorkingBranch, type WorkspaceLocal, type WorkspaceSnapshot, type WorkspaceSnapshotLedger, type WorkspaceSnapshotTrigger, type WorkspaceSynced, coerceMockResponseBodyTypeForStatus, defaultAuthFor, envPriorityDisplayName, envPriorityKey, envPriorityRefEqual, formatBytes, generateId, getAllowedMockResponseBodyTypes, makeDefaultMockResponse, makeDefaultMockResponseBody, makeDefaultRequestSchema, normalizeAuth, parseEnvPriorityKey, safeExternalHref, utf8ByteLength, validateAwsRegion, validateEnvVarName, validateHttpHeaderName, validateJsonPath, validateJsonString, validateMockPath, validatePRTitle, validatePlanName, validatePositiveDuration, validateRegex, validateUrl };
|
|
1295
|
+
export { type Assertion, type AttachmentRef, type AwsSigV4Auth, type BodyType, type ConnectedRepo, type ContextExtraction, DEFAULT_WORKSPACE_NAME, type DigestAuth, type EnvPriorityRef, type Environment, type EnvironmentVariable, type EnvironmentVariableOverride, type ExecutionPlan, FONT_SIZE_PERCENT_DEFAULT, FONT_SIZE_PERCENT_MAX, FONT_SIZE_PERCENT_MIN, FONT_SIZE_PERCENT_STEP, type Folder, type FolderNode, type FontFamilyId, type FormDataRow, type GitHubSession, type GlobalFileAsset, type GlobalGraphQL, type GlobalSchema, type HawkAuth, type HttpMethod, type JwtBearerAuth, type LinkedSnapshot, type LinkedWorkspace, type LocalAttachmentCacheEntry, MCP_TOOL_NAMES, type McpError, type McpToolName, type MockConditionClause, type MockConditionOp, type MockConditionScope, type MockEndpoint, type MockMultiplierSource, type MockMultiplierSourceKind, type MockParamDef, type MockRequestSchema, type MockResponseBody, type MockResponseBodyType, type MockResponseConfig, type MockResponseMultiplier, type MockResponseRule, type MockRuntime, type MockRuntimeEntry, type MockServer, type MockServerSource, type MockValidationKind, type MockValidationRule, type NtlmAuth, type OAuth2AuthCodeAuth, type OAuth2ClientCredentialsAuth, type OAuth2DeviceAuth, type OAuth2ImplicitAuth, type OAuth2PasswordAuth, type OAuth2PkceAuth, type OAuth2TokenState, type PanelId, type PlanRun, REQUEST_AUTH_TYPES, RUN_BODY_PREVIEW_LIMIT, type ReleaseHistory, type ReleaseVersion, type Request, type RequestAuth, type RequestAuthType, type RequestBody, type RequestOverride, type RequestOverridePatch, type RequestRun, type RetiredBranch, type SecretCryptoMeta, type SecretEntry, type SecretIndex, type SecretKeyMeta, type SecretUsage, type SyncSnapshot, type ThemeId, type ValidationResult, type WorkingBranch, type WorkspaceLocal, type WorkspaceSnapshot, type WorkspaceSnapshotLedger, type WorkspaceSnapshotTrigger, type WorkspaceSynced, coerceMockResponseBodyTypeForStatus, defaultAuthFor, envPriorityDisplayName, envPriorityKey, envPriorityRefEqual, formatBytes, generateId, getAllowedMockResponseBodyTypes, makeDefaultMockResponse, makeDefaultMockResponseBody, makeDefaultRequestSchema, normalizeAuth, parseEnvPriorityKey, safeExternalHref, utf8ByteLength, validateAwsRegion, validateEnvVarName, validateHttpHeaderName, validateJsonPath, validateJsonString, validateMockPath, validatePRTitle, validatePlanName, validatePositiveDuration, validateRegex, validateUrl };
|