@kumwe/studio-protocol 0.1.0-alpha.5 → 0.1.0-beta.2
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 +72 -6
- package/THIRD_PARTY_NOTICES.md +9 -0
- package/dist/generated/schema-models.d.ts +2750 -0
- package/dist/generated/schema-models.d.ts.map +1 -0
- package/dist/generated/schema-models.js +1 -0
- package/dist/guards.d.ts +4 -1
- package/dist/guards.d.ts.map +1 -1
- package/dist/guards.js +1 -332
- package/dist/host-failure.d.ts +16 -0
- package/dist/host-failure.d.ts.map +1 -0
- package/dist/host-failure.js +1 -0
- package/dist/index.d.ts +7 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -4
- package/dist/release.d.ts +8 -0
- package/dist/release.d.ts.map +1 -0
- package/dist/release.js +1 -0
- package/dist/schemas.d.ts +25 -0
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +1 -93
- package/dist/types.d.ts +447 -7
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -3
- package/package.json +7 -3
- package/schemas/authoring-http-vector.schema.json +195 -0
- package/schemas/authoring-http.schema.json +505 -0
- package/schemas/authoring-message-catalog.schema.json +45 -0
- package/schemas/authoring-save.schema.json +188 -0
- package/schemas/authoring-session.schema.json +151 -0
- package/schemas/authoring-target.schema.json +160 -0
- package/schemas/authoring-web-vector.schema.json +236 -0
- package/schemas/binding-projection-vector.schema.json +127 -0
- package/schemas/block-definition.schema.json +10 -1
- package/schemas/common.schema.json +45 -0
- package/schemas/host-error.schema.json +22 -1
- package/schemas/host-operations.schema.json +16 -0
- package/schemas/host-sequence-vector.schema.json +342 -0
- package/schemas/host-vector.schema.json +2 -0
- package/schemas/manifest.json +120 -11
- package/schemas/plugin-manifest.schema.json +1 -0
- package/schemas/preview-message.schema.json +44 -12
- package/schemas/preview-vector.schema.json +52 -0
- package/schemas/renderer-web-vector.schema.json +273 -0
- package/schemas/reusable-content-type.schema.json +99 -0
- package/schemas/rich-text-projection.schema.json +12 -3
- package/schemas/rich-text.schema.json +156 -7
- package/schemas/schema-profile-vector.schema.json +133 -0
- package/schemas/schema-profile.schema.json +47 -7
- package/schemas/studio-browser-assets.schema.json +376 -0
- package/schemas/studio-chart.schema.json +35 -0
- package/schemas/studio-config.schema.json +1 -33
- package/schemas/studio-deployment.schema.json +347 -0
- package/schemas/studio-drawing.schema.json +44 -0
- package/schemas/studio-money.schema.json +16 -0
- package/schemas/studio-presentation.schema.json +31 -0
- package/schemas/studio-release.schema.json +125 -0
- package/schemas/studio-table.schema.json +27 -0
- package/studio-release.json +35 -0
- package/dist/guards.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/schemas.js.map +0 -1
- package/dist/types.js.map +0 -1
package/dist/types.d.ts
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
export declare const STUDIO_CONTRACT_VERSION: "0.1-draft";
|
|
2
2
|
export type StudioContractVersion = typeof STUDIO_CONTRACT_VERSION;
|
|
3
|
-
export declare const STUDIO_WIRE_PROTOCOL_VERSION: "0.1.0-draft.
|
|
3
|
+
export declare const STUDIO_WIRE_PROTOCOL_VERSION: "0.1.0-draft.2";
|
|
4
4
|
export type StudioWireProtocolVersion = typeof STUDIO_WIRE_PROTOCOL_VERSION;
|
|
5
|
+
/**
|
|
6
|
+
* Stable diagnostic carried with the canonical `invalid-request` category
|
|
7
|
+
* when a host refuses an operation from an obsolete session generation.
|
|
8
|
+
*/
|
|
9
|
+
export declare const STUDIO_STALE_SESSION_GENERATION_DIAGNOSTIC_CODE: "studio.host/stale-session-generation";
|
|
5
10
|
export type JsonPrimitive = boolean | null | number | string;
|
|
6
11
|
export type JsonValue = JsonPrimitive | JsonObject | JsonValue[];
|
|
7
12
|
export interface JsonObject {
|
|
@@ -163,12 +168,23 @@ export interface BlockSlotDefinition {
|
|
|
163
168
|
ordered: boolean;
|
|
164
169
|
}
|
|
165
170
|
export interface BlockPortDefinition {
|
|
171
|
+
/**
|
|
172
|
+
* Portable authoring hints. They select a Studio control/profile without
|
|
173
|
+
* exposing an editor implementation. A read-only port may still be bound by
|
|
174
|
+
* the host, but Studio never offers a value mutation for it.
|
|
175
|
+
*/
|
|
176
|
+
authoring?: BlockPortAuthoringMetadata;
|
|
166
177
|
id: LocalName;
|
|
167
178
|
label: MessageReference;
|
|
168
179
|
multiple: boolean;
|
|
169
180
|
required: boolean;
|
|
170
181
|
valueType: string;
|
|
171
182
|
}
|
|
183
|
+
export interface BlockPortAuthoringMetadata {
|
|
184
|
+
control?: QualifiedName;
|
|
185
|
+
profile?: QualifiedName;
|
|
186
|
+
readOnly?: boolean;
|
|
187
|
+
}
|
|
172
188
|
export interface RendererRequirement {
|
|
173
189
|
capability: QualifiedName;
|
|
174
190
|
surface: 'document' | 'email' | 'native' | 'preview' | 'web';
|
|
@@ -222,6 +238,63 @@ export interface BlockDefinition {
|
|
|
222
238
|
type: BlockType;
|
|
223
239
|
version: SemanticVersion;
|
|
224
240
|
}
|
|
241
|
+
/** Canonical, renderer-neutral chart data. It carries no Chart.js configuration. */
|
|
242
|
+
export interface StudioChartDataset {
|
|
243
|
+
label: string;
|
|
244
|
+
values: number[];
|
|
245
|
+
}
|
|
246
|
+
export interface StudioChartSpec {
|
|
247
|
+
datasets: StudioChartDataset[];
|
|
248
|
+
labels: string[];
|
|
249
|
+
title?: string;
|
|
250
|
+
type: 'bar' | 'doughnut' | 'line' | 'pie';
|
|
251
|
+
}
|
|
252
|
+
export interface StudioDrawingPoint {
|
|
253
|
+
x: number;
|
|
254
|
+
y: number;
|
|
255
|
+
}
|
|
256
|
+
export interface StudioDrawingStroke {
|
|
257
|
+
color: string;
|
|
258
|
+
points: StudioDrawingPoint[];
|
|
259
|
+
width: number;
|
|
260
|
+
}
|
|
261
|
+
/** Bounded vector drawing data; never an SVG or canvas command stream. */
|
|
262
|
+
export interface StudioDrawingDocument {
|
|
263
|
+
alt: string;
|
|
264
|
+
height: number;
|
|
265
|
+
strokes: StudioDrawingStroke[];
|
|
266
|
+
width: number;
|
|
267
|
+
}
|
|
268
|
+
/** Decimal money uses a string so persistence never rounds through a binary float. */
|
|
269
|
+
export interface StudioMoneyValue {
|
|
270
|
+
amount: string;
|
|
271
|
+
currency: string;
|
|
272
|
+
}
|
|
273
|
+
/** Portable visual intent resolved by Studio renderers; it contains no CSS values or selectors. */
|
|
274
|
+
export interface StudioPresentationIntent {
|
|
275
|
+
align?: 'center' | 'end' | 'start' | 'stretch';
|
|
276
|
+
animation?: 'fade' | 'none' | 'parallax' | 'scale' | 'slide';
|
|
277
|
+
height?: 'auto' | 'content' | 'full' | 'viewport';
|
|
278
|
+
inverse?: boolean;
|
|
279
|
+
margin?: 'comfortable' | 'compact' | 'none' | 'spacious';
|
|
280
|
+
marker?: 'check' | 'decimal' | 'disc' | 'none';
|
|
281
|
+
padding?: 'comfortable' | 'compact' | 'none' | 'spacious';
|
|
282
|
+
position?: 'flow' | 'relative' | 'sticky';
|
|
283
|
+
print?: 'hide' | 'only' | 'show';
|
|
284
|
+
scrolling?: 'auto' | 'clip' | 'snap' | 'visible';
|
|
285
|
+
visibility?: {
|
|
286
|
+
compact?: 'hidden' | 'visible';
|
|
287
|
+
expanded?: 'hidden' | 'visible';
|
|
288
|
+
medium?: 'hidden' | 'visible';
|
|
289
|
+
};
|
|
290
|
+
width?: 'auto' | 'content' | 'full';
|
|
291
|
+
}
|
|
292
|
+
/** Canonical bounded table data used by static authoring and host query projections. */
|
|
293
|
+
export interface StudioTableDocument {
|
|
294
|
+
caption?: string;
|
|
295
|
+
columns: string[];
|
|
296
|
+
rows: string[][];
|
|
297
|
+
}
|
|
225
298
|
export interface HostPortCapability {
|
|
226
299
|
id: QualifiedName;
|
|
227
300
|
operations: QualifiedName[];
|
|
@@ -327,7 +400,7 @@ export interface PluginEntryModule {
|
|
|
327
400
|
path: PackageRelativePath;
|
|
328
401
|
realm: PluginEntryRealm;
|
|
329
402
|
}
|
|
330
|
-
export type PluginContributionKind = 'block' | 'command' | 'design-vocabulary' | 'field-adapter' | 'inspector' | 'locale' | 'migration' | 'panel' | 'pattern' | 'renderer-capability' | 'test-fixture' | 'transform';
|
|
403
|
+
export type PluginContributionKind = 'authoring-target' | 'block' | 'command' | 'design-vocabulary' | 'field-adapter' | 'inspector' | 'locale' | 'migration' | 'panel' | 'pattern' | 'renderer-capability' | 'test-fixture' | 'transform';
|
|
331
404
|
export interface PluginContributionDeclaration {
|
|
332
405
|
executable?: boolean;
|
|
333
406
|
id: QualifiedName;
|
|
@@ -441,6 +514,42 @@ export interface DesignVocabulary {
|
|
|
441
514
|
recipes: ThemeRecipe[];
|
|
442
515
|
version: SemanticVersion;
|
|
443
516
|
}
|
|
517
|
+
/**
|
|
518
|
+
* The declarative payload behind a `field-adapter` contribution. Executable
|
|
519
|
+
* control code remains host-bound; this document is safe to validate and
|
|
520
|
+
* activate into an immutable contribution generation.
|
|
521
|
+
*/
|
|
522
|
+
export interface FieldAdapterContribution {
|
|
523
|
+
contractVersion: StudioContractVersion;
|
|
524
|
+
control: QualifiedName;
|
|
525
|
+
description?: MessageReference;
|
|
526
|
+
extensions?: Record<QualifiedName, JsonValue>;
|
|
527
|
+
fieldKinds: QualifiedName[];
|
|
528
|
+
id: QualifiedName;
|
|
529
|
+
kind: 'field-adapter';
|
|
530
|
+
label: MessageReference;
|
|
531
|
+
optionSchema?: JsonSchema;
|
|
532
|
+
owner: OwnerReference;
|
|
533
|
+
requiredCapability?: QualifiedName;
|
|
534
|
+
version: SemanticVersion;
|
|
535
|
+
}
|
|
536
|
+
/**
|
|
537
|
+
* The declarative payload behind an `inspector` contribution. Its executable
|
|
538
|
+
* surface is resolved separately through host capability policy.
|
|
539
|
+
*/
|
|
540
|
+
export interface InspectorContribution {
|
|
541
|
+
blockTypes: BlockType[];
|
|
542
|
+
contractVersion: StudioContractVersion;
|
|
543
|
+
description?: MessageReference;
|
|
544
|
+
extensions?: Record<QualifiedName, JsonValue>;
|
|
545
|
+
id: QualifiedName;
|
|
546
|
+
kind: 'inspector';
|
|
547
|
+
label: MessageReference;
|
|
548
|
+
owner: OwnerReference;
|
|
549
|
+
placement: 'augment' | 'replace';
|
|
550
|
+
requiredCapability?: QualifiedName;
|
|
551
|
+
version: SemanticVersion;
|
|
552
|
+
}
|
|
444
553
|
export type MigrationArtifactKind = 'block-definition' | 'blueprint' | 'content-model' | 'entry' | 'theme';
|
|
445
554
|
/**
|
|
446
555
|
* The declarative payload behind a `migration` plugin contribution: the
|
|
@@ -484,6 +593,7 @@ export interface HostRequestContext {
|
|
|
484
593
|
requestId: StableId;
|
|
485
594
|
resourceContextKey: StableId;
|
|
486
595
|
sessionGeneration: Revision;
|
|
596
|
+
traceContext?: Record<LocalName, string>;
|
|
487
597
|
}
|
|
488
598
|
export interface HostPortResult<TValue> {
|
|
489
599
|
revision?: Revision;
|
|
@@ -497,6 +607,20 @@ export interface ArtifactPort {
|
|
|
497
607
|
save(artifact: StudioArtifact, context: HostRequestContext): Promise<HostPortResult<null>>;
|
|
498
608
|
unpublish(reference: ArtifactReference, context: HostRequestContext): Promise<HostPortResult<null>>;
|
|
499
609
|
}
|
|
610
|
+
/**
|
|
611
|
+
* Host-authoritative contextual authoring operations. The port is additive to
|
|
612
|
+
* the legacy single-artifact port: no method may be implemented as an
|
|
613
|
+
* undocumented sequence of `artifact.save` calls.
|
|
614
|
+
*/
|
|
615
|
+
export interface AuthoringPort {
|
|
616
|
+
listTypes(query: AuthoringTypeListQuery, context: HostRequestContext): Promise<HostPortResult<AuthoringTypeListPage>>;
|
|
617
|
+
planSave(intent: AuthoringSaveIntent, context: HostRequestContext): Promise<HostPortResult<AuthoringSavePlan>>;
|
|
618
|
+
resolveTarget(request: AuthoringTargetResolveRequest, context: HostRequestContext): Promise<HostPortResult<AuthoringTargetResolution>>;
|
|
619
|
+
saveAsNewType(request: AuthoringSaveAsNewTypeRequest, context: HostRequestContext): Promise<HostPortResult<AuthoringSaveResult>>;
|
|
620
|
+
saveItem(request: AuthoringSaveItemRequest, context: HostRequestContext): Promise<HostPortResult<AuthoringSaveResult>>;
|
|
621
|
+
saveNewTypeVersion(request: AuthoringSaveNewTypeVersionRequest, context: HostRequestContext): Promise<HostPortResult<AuthoringSaveResult>>;
|
|
622
|
+
start(request: AuthoringStartRequest, context: HostRequestContext): Promise<HostPortResult<AuthoringSessionSnapshot>>;
|
|
623
|
+
}
|
|
500
624
|
export interface ModelPort {
|
|
501
625
|
get(reference: ArtifactReference, context: HostRequestContext): Promise<HostPortResult<ContentModelDocument>>;
|
|
502
626
|
list(context: HostRequestContext): Promise<HostPortResult<ContentModelDocument[]>>;
|
|
@@ -577,6 +701,7 @@ export interface TelemetryPort {
|
|
|
577
701
|
}
|
|
578
702
|
export interface HostAdapter {
|
|
579
703
|
artifact: ArtifactPort;
|
|
704
|
+
authoring?: AuthoringPort;
|
|
580
705
|
localization?: LocalizationPort;
|
|
581
706
|
media?: MediaHostPort;
|
|
582
707
|
model?: ModelPort;
|
|
@@ -601,6 +726,215 @@ export interface EntryDocument {
|
|
|
601
726
|
values: Record<LocalName, JsonValue>;
|
|
602
727
|
workflowState?: QualifiedName;
|
|
603
728
|
}
|
|
729
|
+
export type AuthoringTargetEligibility = 'create' | 'edit';
|
|
730
|
+
export type AuthoringStartKind = 'blank' | 'existing' | 'from-type';
|
|
731
|
+
export type AuthoringPresentationState = 'fullscreen' | 'inline' | 'maximized' | 'minimized';
|
|
732
|
+
export type AuthoringSaveOutcome = 'save-as-new-type' | 'save-item' | 'save-new-type-version';
|
|
733
|
+
export type AuthoringContributionKind = 'block-definition' | 'design-vocabulary' | 'field-adapter' | 'inspector' | 'migration' | 'pattern';
|
|
734
|
+
export interface AuthoringCapabilityRequirement {
|
|
735
|
+
id: QualifiedName;
|
|
736
|
+
versions: string;
|
|
737
|
+
}
|
|
738
|
+
export interface AuthoringContributionDependency {
|
|
739
|
+
id: QualifiedName;
|
|
740
|
+
kind: AuthoringContributionKind;
|
|
741
|
+
required: boolean;
|
|
742
|
+
versions: string;
|
|
743
|
+
}
|
|
744
|
+
/**
|
|
745
|
+
* Bounded discovery metadata shared by host-core and extension-owned targets.
|
|
746
|
+
* A declaration is never authorization and cannot mint a resource context.
|
|
747
|
+
*/
|
|
748
|
+
export interface AuthoringTargetDeclaration {
|
|
749
|
+
contractVersion: StudioContractVersion;
|
|
750
|
+
contributionDependencies: readonly AuthoringContributionDependency[];
|
|
751
|
+
eligibility: readonly AuthoringTargetEligibility[];
|
|
752
|
+
extensions?: Record<QualifiedName, JsonValue>;
|
|
753
|
+
id: QualifiedName;
|
|
754
|
+
kind: 'authoring-target';
|
|
755
|
+
label: MessageReference;
|
|
756
|
+
modes: readonly StudioAuthoringMode[];
|
|
757
|
+
owner: OwnerReference;
|
|
758
|
+
presentationStates: readonly AuthoringPresentationState[];
|
|
759
|
+
requiredCapabilities: readonly AuthoringCapabilityRequirement[];
|
|
760
|
+
resourceTypes: readonly QualifiedName[];
|
|
761
|
+
saveOutcomes: readonly AuthoringSaveOutcome[];
|
|
762
|
+
startKinds: readonly AuthoringStartKind[];
|
|
763
|
+
surface: QualifiedName;
|
|
764
|
+
}
|
|
765
|
+
export interface AuthoringReturnContext {
|
|
766
|
+
key: StableId;
|
|
767
|
+
label?: MessageReference;
|
|
768
|
+
}
|
|
769
|
+
export interface AuthoringTargetResolveRequest {
|
|
770
|
+
intent: AuthoringTargetEligibility;
|
|
771
|
+
requestedPresentation?: AuthoringPresentationState;
|
|
772
|
+
resourceContext: StudioResourceContext;
|
|
773
|
+
targetId: QualifiedName;
|
|
774
|
+
}
|
|
775
|
+
export interface AuthoringTargetResolution {
|
|
776
|
+
availableStarts: readonly AuthoringStartKind[];
|
|
777
|
+
initialPresentation: AuthoringPresentationState;
|
|
778
|
+
resourceContext: StudioResourceContext;
|
|
779
|
+
returnContext?: AuthoringReturnContext;
|
|
780
|
+
target: AuthoringTargetDeclaration;
|
|
781
|
+
}
|
|
782
|
+
export interface ReusableContentTypeReference {
|
|
783
|
+
id: StableId;
|
|
784
|
+
revision: Revision;
|
|
785
|
+
version: SemanticVersion;
|
|
786
|
+
}
|
|
787
|
+
export interface ReusableContentTypeAuthoringPolicy {
|
|
788
|
+
itemComposition: 'denied' | 'overrides';
|
|
789
|
+
modes: readonly StudioAuthoringMode[];
|
|
790
|
+
}
|
|
791
|
+
/** Host-owned projection; deliberately not a member of `StudioArtifact`. */
|
|
792
|
+
export interface ReusableContentTypeDefinition extends ReusableContentTypeReference {
|
|
793
|
+
authoringPolicy: ReusableContentTypeAuthoringPolicy;
|
|
794
|
+
blueprint: LockedArtifactReference;
|
|
795
|
+
contractVersion: StudioContractVersion;
|
|
796
|
+
extensions?: Record<QualifiedName, JsonValue>;
|
|
797
|
+
kind: 'reusable-content-type';
|
|
798
|
+
label: MessageReference;
|
|
799
|
+
model: LockedArtifactReference;
|
|
800
|
+
status: 'draft' | 'published' | 'retired';
|
|
801
|
+
}
|
|
802
|
+
export interface AuthoringTypeSummary {
|
|
803
|
+
blueprint: LockedArtifactReference;
|
|
804
|
+
label: MessageReference;
|
|
805
|
+
model: LockedArtifactReference;
|
|
806
|
+
reference: ReusableContentTypeReference;
|
|
807
|
+
}
|
|
808
|
+
export interface AuthoringTypeListQuery {
|
|
809
|
+
cursor?: string;
|
|
810
|
+
limit: number;
|
|
811
|
+
resourceContext: StudioResourceContext;
|
|
812
|
+
search?: string;
|
|
813
|
+
targetId: QualifiedName;
|
|
814
|
+
}
|
|
815
|
+
export interface AuthoringTypeListPage {
|
|
816
|
+
items: AuthoringTypeSummary[];
|
|
817
|
+
nextCursor?: string;
|
|
818
|
+
}
|
|
819
|
+
export type AuthoringStartSource = {
|
|
820
|
+
kind: 'blank';
|
|
821
|
+
} | {
|
|
822
|
+
kind: 'existing';
|
|
823
|
+
} | {
|
|
824
|
+
kind: 'from-type';
|
|
825
|
+
type: ReusableContentTypeReference;
|
|
826
|
+
};
|
|
827
|
+
export interface AuthoringStartRequest {
|
|
828
|
+
presentation?: AuthoringPresentationState;
|
|
829
|
+
resourceContext: StudioResourceContext;
|
|
830
|
+
source: AuthoringStartSource;
|
|
831
|
+
targetId: QualifiedName;
|
|
832
|
+
}
|
|
833
|
+
export interface AuthoringArtifactCoordinates {
|
|
834
|
+
blueprint: LockedArtifactReference;
|
|
835
|
+
entry: ResolvedEntryReference;
|
|
836
|
+
model: LockedArtifactReference;
|
|
837
|
+
type?: ReusableContentTypeReference;
|
|
838
|
+
}
|
|
839
|
+
export type AuthoringDirtyArtifact = 'blueprint' | 'entry' | 'model';
|
|
840
|
+
export interface AuthoringArtifactState {
|
|
841
|
+
blueprint: BlueprintDocument;
|
|
842
|
+
coordinates: AuthoringArtifactCoordinates;
|
|
843
|
+
diagnostics: StudioDiagnostic[];
|
|
844
|
+
dirty: AuthoringDirtyArtifact[];
|
|
845
|
+
entry: EntryDocument;
|
|
846
|
+
model: ContentModelDocument;
|
|
847
|
+
}
|
|
848
|
+
export interface AuthoringSessionCapabilities {
|
|
849
|
+
modes: readonly StudioAuthoringMode[];
|
|
850
|
+
presentationStates: readonly AuthoringPresentationState[];
|
|
851
|
+
saveOutcomes: readonly AuthoringSaveOutcome[];
|
|
852
|
+
}
|
|
853
|
+
export interface AuthoringSessionPresentation {
|
|
854
|
+
current: AuthoringPresentationState;
|
|
855
|
+
returnContext?: AuthoringReturnContext;
|
|
856
|
+
}
|
|
857
|
+
export interface AuthoringSessionSnapshot {
|
|
858
|
+
capabilities: AuthoringSessionCapabilities;
|
|
859
|
+
contractVersion: StudioContractVersion;
|
|
860
|
+
contributionGeneration: Revision;
|
|
861
|
+
extensions?: Record<QualifiedName, JsonValue>;
|
|
862
|
+
kind: 'authoring-session';
|
|
863
|
+
presentation: AuthoringSessionPresentation;
|
|
864
|
+
resourceContext: StudioResourceContext;
|
|
865
|
+
sessionGeneration: Revision;
|
|
866
|
+
sessionId: StableId;
|
|
867
|
+
start: AuthoringStartSource;
|
|
868
|
+
state: AuthoringArtifactState;
|
|
869
|
+
target: AuthoringTargetDeclaration;
|
|
870
|
+
type?: ReusableContentTypeDefinition;
|
|
871
|
+
}
|
|
872
|
+
export interface AuthoringSaveItemDraft {
|
|
873
|
+
entry: EntryDocument;
|
|
874
|
+
itemBlueprint?: BlueprintDocument;
|
|
875
|
+
outcome: 'save-item';
|
|
876
|
+
}
|
|
877
|
+
export interface AuthoringSaveNewTypeVersionDraft {
|
|
878
|
+
blueprint: BlueprintDocument;
|
|
879
|
+
model: ContentModelDocument;
|
|
880
|
+
outcome: 'save-new-type-version';
|
|
881
|
+
}
|
|
882
|
+
export interface AuthoringSaveAsNewTypeDraft {
|
|
883
|
+
authoringPolicy: ReusableContentTypeAuthoringPolicy;
|
|
884
|
+
blueprint: BlueprintDocument;
|
|
885
|
+
label: MessageReference;
|
|
886
|
+
model: ContentModelDocument;
|
|
887
|
+
outcome: 'save-as-new-type';
|
|
888
|
+
}
|
|
889
|
+
export type AuthoringSaveDraft = AuthoringSaveAsNewTypeDraft | AuthoringSaveItemDraft | AuthoringSaveNewTypeVersionDraft;
|
|
890
|
+
export interface AuthoringSaveIntent {
|
|
891
|
+
contractVersion: StudioContractVersion;
|
|
892
|
+
draft: AuthoringSaveDraft;
|
|
893
|
+
expected: AuthoringArtifactCoordinates;
|
|
894
|
+
kind: 'authoring-save-intent';
|
|
895
|
+
sessionId: StableId;
|
|
896
|
+
}
|
|
897
|
+
export type AuthoringAffectedArtifact = 'blueprint' | 'entry' | 'model' | 'reusable-content-type';
|
|
898
|
+
export interface AuthoringSavePlanReference {
|
|
899
|
+
id: StableId;
|
|
900
|
+
revision: Revision;
|
|
901
|
+
/** Exact host-minted return context adopted only after this planned save is accepted. */
|
|
902
|
+
successorContext: AuthoringReturnContext;
|
|
903
|
+
}
|
|
904
|
+
export interface AuthoringSavePlan extends AuthoringSavePlanReference {
|
|
905
|
+
affectedArtifacts: AuthoringAffectedArtifact[];
|
|
906
|
+
confirmationRequired: boolean;
|
|
907
|
+
consequences: StudioDiagnostic[];
|
|
908
|
+
contractVersion: StudioContractVersion;
|
|
909
|
+
expected: AuthoringArtifactCoordinates;
|
|
910
|
+
kind: 'authoring-save-plan';
|
|
911
|
+
outcome: AuthoringSaveOutcome;
|
|
912
|
+
sessionId: StableId;
|
|
913
|
+
}
|
|
914
|
+
interface AuthoringSaveRequestBase {
|
|
915
|
+
acceptedConsequences: QualifiedName[];
|
|
916
|
+
contractVersion: StudioContractVersion;
|
|
917
|
+
plan: AuthoringSavePlanReference;
|
|
918
|
+
}
|
|
919
|
+
export interface AuthoringSaveItemRequest extends AuthoringSaveRequestBase {
|
|
920
|
+
draft: AuthoringSaveItemDraft;
|
|
921
|
+
kind: 'authoring-save-item-request';
|
|
922
|
+
}
|
|
923
|
+
export interface AuthoringSaveNewTypeVersionRequest extends AuthoringSaveRequestBase {
|
|
924
|
+
draft: AuthoringSaveNewTypeVersionDraft;
|
|
925
|
+
kind: 'authoring-save-new-type-version-request';
|
|
926
|
+
}
|
|
927
|
+
export interface AuthoringSaveAsNewTypeRequest extends AuthoringSaveRequestBase {
|
|
928
|
+
draft: AuthoringSaveAsNewTypeDraft;
|
|
929
|
+
kind: 'authoring-save-as-new-type-request';
|
|
930
|
+
}
|
|
931
|
+
export interface AuthoringSaveResult {
|
|
932
|
+
contractVersion: StudioContractVersion;
|
|
933
|
+
kind: 'authoring-save-result';
|
|
934
|
+
outcome: AuthoringSaveOutcome;
|
|
935
|
+
plan: AuthoringSavePlanReference;
|
|
936
|
+
session: AuthoringSessionSnapshot;
|
|
937
|
+
}
|
|
604
938
|
export type StudioAuthoringMode = 'blueprint' | 'content' | 'model';
|
|
605
939
|
/**
|
|
606
940
|
* The single permission determinant of a headless editing session, fixed at
|
|
@@ -652,6 +986,104 @@ export interface StudioLimits {
|
|
|
652
986
|
maxRichTextDepth: number;
|
|
653
987
|
maxSlotsPerNode: number;
|
|
654
988
|
}
|
|
989
|
+
export interface StudioDeploymentLaunch {
|
|
990
|
+
initialPresentation: AuthoringPresentationState;
|
|
991
|
+
intent: AuthoringTargetEligibility;
|
|
992
|
+
resourceContext: StudioResourceContext;
|
|
993
|
+
start: AuthoringStartSource;
|
|
994
|
+
targetId: QualifiedName;
|
|
995
|
+
}
|
|
996
|
+
export type StudioDeploymentOperationRoute = 'artifact/dependencies' | 'artifact/load' | 'artifact/publish' | 'artifact/save' | 'artifact/unpublish' | 'authoring/list-types' | 'authoring/plan-save' | 'authoring/resolve-target' | 'authoring/save-as-new-type' | 'authoring/save-item' | 'authoring/save-new-type-version' | 'authoring/start' | 'localization/messages' | 'media/abort-upload' | 'media/authorize-upload' | 'media/complete-upload' | 'media/get' | 'media/import-external' | 'media/list' | 'media/upload-status' | 'model/get' | 'model/list' | 'permission/explain' | 'permission/refresh' | 'preview/cancel' | 'preview/render' | 'recovery/discard' | 'recovery/load' | 'recovery/store' | 'resource/search' | 'telemetry/emit';
|
|
997
|
+
export type StudioDeploymentOperationEndpoints = Readonly<Partial<Record<StudioDeploymentOperationRoute, string>>> & {
|
|
998
|
+
readonly 'authoring/resolve-target': string;
|
|
999
|
+
readonly 'authoring/start': string;
|
|
1000
|
+
};
|
|
1001
|
+
export interface StudioDeploymentSingleEndpointRouting {
|
|
1002
|
+
endpoint: string;
|
|
1003
|
+
kind: 'single-endpoint';
|
|
1004
|
+
}
|
|
1005
|
+
export interface StudioDeploymentOperationMapRouting {
|
|
1006
|
+
endpoints: StudioDeploymentOperationEndpoints;
|
|
1007
|
+
kind: 'operation-map';
|
|
1008
|
+
}
|
|
1009
|
+
export type StudioDeploymentRouting = StudioDeploymentOperationMapRouting | StudioDeploymentSingleEndpointRouting;
|
|
1010
|
+
export interface StudioDeploymentSameOriginSessionAuthentication {
|
|
1011
|
+
credentials: 'same-origin';
|
|
1012
|
+
csrf: {
|
|
1013
|
+
headerName: string;
|
|
1014
|
+
token: string;
|
|
1015
|
+
};
|
|
1016
|
+
kind: 'same-origin-session';
|
|
1017
|
+
}
|
|
1018
|
+
export interface StudioDeploymentBearerTokenAuthentication {
|
|
1019
|
+
credentials: 'omit';
|
|
1020
|
+
expiresAt: string;
|
|
1021
|
+
issuedAt: string;
|
|
1022
|
+
kind: 'bearer-token';
|
|
1023
|
+
token: string;
|
|
1024
|
+
}
|
|
1025
|
+
export interface StudioDeploymentHeaderTokenAuthentication {
|
|
1026
|
+
credentials: 'omit';
|
|
1027
|
+
expiresAt: string;
|
|
1028
|
+
headerName: string;
|
|
1029
|
+
issuedAt: string;
|
|
1030
|
+
kind: 'header-token';
|
|
1031
|
+
token: string;
|
|
1032
|
+
}
|
|
1033
|
+
export type StudioDeploymentAuthentication = StudioDeploymentBearerTokenAuthentication | StudioDeploymentHeaderTokenAuthentication | StudioDeploymentSameOriginSessionAuthentication;
|
|
1034
|
+
export interface StudioDeploymentStandaloneTransport {
|
|
1035
|
+
kind: 'standalone';
|
|
1036
|
+
}
|
|
1037
|
+
export interface StudioDeploymentHttpTransport {
|
|
1038
|
+
authentication: StudioDeploymentAuthentication;
|
|
1039
|
+
kind: 'http';
|
|
1040
|
+
maximumResponseBytes?: number;
|
|
1041
|
+
requestTimeoutMilliseconds?: number;
|
|
1042
|
+
routing: StudioDeploymentRouting;
|
|
1043
|
+
}
|
|
1044
|
+
export type StudioDeploymentTransport = StudioDeploymentHttpTransport | StudioDeploymentStandaloneTransport;
|
|
1045
|
+
/** Safe declarative contributions; executable controls remain precompiled registry entries. */
|
|
1046
|
+
export type StudioDeploymentContributionPayload = BlockDefinition | DesignVocabulary | FieldAdapterContribution | InspectorContribution | MigrationDeclaration | PatternDocument;
|
|
1047
|
+
export interface StudioDeploymentContributionBundle {
|
|
1048
|
+
generation: Revision;
|
|
1049
|
+
payloads: readonly StudioDeploymentContributionPayload[];
|
|
1050
|
+
}
|
|
1051
|
+
/** Exact release identity copied from the prebuilt browser asset manifest. */
|
|
1052
|
+
export interface StudioDeploymentRelease {
|
|
1053
|
+
corpusManifestDigest: string;
|
|
1054
|
+
version: string;
|
|
1055
|
+
}
|
|
1056
|
+
export interface StudioDeploymentConfigurationBase {
|
|
1057
|
+
contractVersion?: StudioContractVersion;
|
|
1058
|
+
instanceId?: StableId;
|
|
1059
|
+
kind: 'studio-deployment';
|
|
1060
|
+
mount: string;
|
|
1061
|
+
release: StudioDeploymentRelease;
|
|
1062
|
+
}
|
|
1063
|
+
export interface StudioStandaloneDeploymentConfiguration extends StudioDeploymentConfigurationBase {
|
|
1064
|
+
contributions?: never;
|
|
1065
|
+
launch?: never;
|
|
1066
|
+
/** Requested local UI locale. English remains the built-in message fallback. */
|
|
1067
|
+
locale?: string;
|
|
1068
|
+
session?: never;
|
|
1069
|
+
transport?: StudioDeploymentStandaloneTransport;
|
|
1070
|
+
}
|
|
1071
|
+
export interface StudioHostedDeploymentConfiguration extends StudioDeploymentConfigurationBase {
|
|
1072
|
+
contributions?: StudioDeploymentContributionBundle;
|
|
1073
|
+
launch: StudioDeploymentLaunch;
|
|
1074
|
+
locale?: never;
|
|
1075
|
+
session: StudioConfiguration;
|
|
1076
|
+
transport: StudioDeploymentHttpTransport;
|
|
1077
|
+
}
|
|
1078
|
+
/**
|
|
1079
|
+
* Bounded JSON emitted by any host into an `application/json` DOM script for
|
|
1080
|
+
* one Studio mount. Every emitted document is bound to its exact browser asset
|
|
1081
|
+
* release. Omitting the document entirely for an explicit or associated DOM
|
|
1082
|
+
* target selects local defaults; omitting `transport` from a complete document
|
|
1083
|
+
* selects the deterministic standalone blank-page profile. HTTP deployments
|
|
1084
|
+
* provide an exact launch plus the PHP/host-resolved Studio session configuration.
|
|
1085
|
+
*/
|
|
1086
|
+
export type StudioDeploymentConfiguration = StudioHostedDeploymentConfiguration | StudioStandaloneDeploymentConfiguration;
|
|
655
1087
|
export interface StudioConfiguration {
|
|
656
1088
|
actor: {
|
|
657
1089
|
displayName: string;
|
|
@@ -701,7 +1133,8 @@ export interface StudioConfiguration {
|
|
|
701
1133
|
resourceContext: StudioResourceContext;
|
|
702
1134
|
}
|
|
703
1135
|
export interface ExperimentalShellConfiguration {
|
|
704
|
-
|
|
1136
|
+
/** Omit to use Studio's complete first-party catalog; an explicit array overrides it. */
|
|
1137
|
+
blockDefinitions?: BlockDefinition[];
|
|
705
1138
|
session: StudioConfiguration;
|
|
706
1139
|
}
|
|
707
1140
|
export interface CommandDestination {
|
|
@@ -899,16 +1332,20 @@ export interface PreviewReadyPayload {
|
|
|
899
1332
|
export interface PreviewRenderPayload {
|
|
900
1333
|
artifactId: StableId;
|
|
901
1334
|
draftDigest: string;
|
|
902
|
-
draftRevision
|
|
1335
|
+
draftRevision: Revision;
|
|
1336
|
+
/** Session-unique identity for this render attempt, including retries. */
|
|
1337
|
+
requestId: StableId;
|
|
903
1338
|
viewport: LocalName;
|
|
904
1339
|
}
|
|
905
1340
|
export interface PreviewRenderedPayload {
|
|
906
1341
|
diagnostics: StudioDiagnostic[];
|
|
907
1342
|
draftDigest: string;
|
|
908
|
-
/**
|
|
1343
|
+
/** Exact render request this response settles. */
|
|
1344
|
+
requestId: StableId;
|
|
1345
|
+
/** Canonical render markers in deterministic Blueprint preorder. */
|
|
909
1346
|
markers: StableId[];
|
|
910
|
-
/**
|
|
911
|
-
markerMap
|
|
1347
|
+
/** Exact one-to-one mapping from every marker to the node it renders. */
|
|
1348
|
+
markerMap: Record<StableId, NodeId>;
|
|
912
1349
|
}
|
|
913
1350
|
export interface PreviewSelectPayload {
|
|
914
1351
|
nodeId: NodeId;
|
|
@@ -932,6 +1369,7 @@ export interface PreviewViewportMetrics {
|
|
|
932
1369
|
export interface PreviewMeasurePayload {
|
|
933
1370
|
/** Opaque render markers to measure, as a bounded explicit list. */
|
|
934
1371
|
markers: StableId[];
|
|
1372
|
+
/** Session-unique request identity; never reused for a render or measurement. */
|
|
935
1373
|
requestId: StableId;
|
|
936
1374
|
}
|
|
937
1375
|
/**
|
|
@@ -973,6 +1411,7 @@ export type PreviewReloadMessage = PreviewMessageBase<'studio.preview/reload', P
|
|
|
973
1411
|
*/
|
|
974
1412
|
export interface PreviewActivatedPayload {
|
|
975
1413
|
interaction: 'activate' | 'context-menu' | 'focus';
|
|
1414
|
+
/** A marker from the currently accepted render inventory. */
|
|
976
1415
|
marker: StableId;
|
|
977
1416
|
}
|
|
978
1417
|
export type PreviewActivatedMessage = PreviewMessageBase<'studio.preview/activated', PreviewActivatedPayload>;
|
|
@@ -1136,4 +1575,5 @@ export interface MediaPage {
|
|
|
1136
1575
|
assets: MediaAsset[];
|
|
1137
1576
|
nextCursor?: string;
|
|
1138
1577
|
}
|
|
1578
|
+
export {};
|
|
1139
1579
|
//# sourceMappingURL=types.d.ts.map
|