likec4 1.36.0 → 1.37.0
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/__app__/src/{index-iX7kahqQ.js → index-CIsxIzOH.js} +23 -53
- package/__app__/src/main.js +2063 -1808
- package/__app__/src/style.css +1 -1
- package/__app__/src/webcomponent.tsx +0 -22
- package/dist/cli/index.mjs +255 -255
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/shared/likec4.B6V1NOky.mjs +258 -0
- package/dist/shared/likec4.B7noVoso.mjs +2 -0
- package/dist/shared/{likec4.DWIqzE5d.mjs → likec4.BKp9_9LQ.mjs} +1735 -1719
- package/dist/shared/{likec4.CoVNuZKl.d.mts → likec4.cqC6tNHO.d.mts} +2108 -2038
- package/dist/vite-plugin/index.d.mts +2 -2
- package/dist/vite-plugin/index.mjs +2 -2
- package/dist/vite-plugin/internal.mjs +7 -9
- package/package.json +15 -15
- package/react/index.d.mts +2145 -72
- package/react/index.mjs +37 -50
- package/vite-plugin-modules.d.ts +2 -1
- package/dist/shared/likec4.D8qlxD_Y.mjs +0 -239
|
@@ -2,7 +2,7 @@ import { Tagged, ValueOf, ConditionalPick, Writable, Simplify, MergeExclusive }
|
|
|
2
2
|
import * as c4 from '@likec4/core';
|
|
3
3
|
import { Fqn, EdgeId, AnyAux, aux, ComputedView, Specification, DiagramView, MultiMap as MultiMap$1, ProjectId, NonEmptyArray, NonEmptyReadonlyArray, ViewId, RelationId, DeploymentFqn, ViewChange } from '@likec4/core';
|
|
4
4
|
import { LikeC4Model } from '@likec4/core/model';
|
|
5
|
-
import picomatch from '/home/runner/work/likec4/likec4/node_modules/.pnpm/@types+picomatch@4.0.2/node_modules/@types/picomatch/
|
|
5
|
+
import picomatch from '/home/runner/work/likec4/likec4/node_modules/.pnpm/@types+picomatch@4.0.2/node_modules/@types/picomatch/index.d.ts';
|
|
6
6
|
import { ProjectId as ProjectId$1, Fqn as Fqn$1 } from '@likec4/core/types';
|
|
7
7
|
import { DefaultWeakMap, MultiMap as MultiMap$2 } from '@likec4/core/utils';
|
|
8
8
|
|
|
@@ -7045,6 +7045,21 @@ interface ValidationOptions {
|
|
|
7045
7045
|
/** If true, no further diagnostics are reported if there are linking errors. Lexing and parsing errors are reported first. */
|
|
7046
7046
|
stopAfterLinkingErrors?: boolean;
|
|
7047
7047
|
}
|
|
7048
|
+
declare class DefaultDocumentValidator implements DocumentValidator {
|
|
7049
|
+
protected readonly validationRegistry: ValidationRegistry;
|
|
7050
|
+
protected readonly metadata: LanguageMetaData;
|
|
7051
|
+
constructor(services: LangiumCoreServices);
|
|
7052
|
+
validateDocument(document: LangiumDocument, options?: ValidationOptions, cancelToken?: CancellationToken): Promise<Diagnostic[]>;
|
|
7053
|
+
protected processLexingErrors(parseResult: ParseResult, diagnostics: Diagnostic[], _options: ValidationOptions): void;
|
|
7054
|
+
protected processParsingErrors(parseResult: ParseResult, diagnostics: Diagnostic[], _options: ValidationOptions): void;
|
|
7055
|
+
protected processLinkingErrors(document: LangiumDocument, diagnostics: Diagnostic[], _options: ValidationOptions): void;
|
|
7056
|
+
protected validateAst(rootNode: AstNode, options: ValidationOptions, cancelToken?: CancellationToken): Promise<Diagnostic[]>;
|
|
7057
|
+
protected validateAstBefore(rootNode: AstNode, options: ValidationOptions, acceptor: ValidationAcceptor, cancelToken?: CancellationToken): Promise<void>;
|
|
7058
|
+
protected validateAstNodes(rootNode: AstNode, options: ValidationOptions, acceptor: ValidationAcceptor, cancelToken?: CancellationToken): Promise<void>;
|
|
7059
|
+
protected validateAstAfter(rootNode: AstNode, options: ValidationOptions, acceptor: ValidationAcceptor, cancelToken?: CancellationToken): Promise<void>;
|
|
7060
|
+
protected toDiagnostic<N extends AstNode>(severity: ValidationSeverity, message: string, info: DiagnosticInfo<N, string>): Diagnostic;
|
|
7061
|
+
protected getSource(): string | undefined;
|
|
7062
|
+
}
|
|
7048
7063
|
/**
|
|
7049
7064
|
* Language-specific service for validating `LangiumDocument`s.
|
|
7050
7065
|
*/
|
|
@@ -14201,1995 +14216,473 @@ declare class LikeC4DocumentationProvider implements DocumentationProvider {
|
|
|
14201
14216
|
getDocumentation(node: AstNode): string | undefined;
|
|
14202
14217
|
}
|
|
14203
14218
|
|
|
14204
|
-
|
|
14205
|
-
*
|
|
14206
|
-
|
|
14207
|
-
|
|
14208
|
-
/**
|
|
14209
|
-
* Schema with fallback type.
|
|
14210
|
-
*/
|
|
14211
|
-
type SchemaWithFallback<TSchema extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, TFallback extends Fallback<TSchema>> = TSchema & {
|
|
14212
|
-
/**
|
|
14213
|
-
* The fallback value.
|
|
14214
|
-
*/
|
|
14215
|
-
readonly fallback: TFallback;
|
|
14216
|
-
};
|
|
14217
|
-
|
|
14218
|
-
/**
|
|
14219
|
-
* Fallback async type.
|
|
14220
|
-
*/
|
|
14221
|
-
type FallbackAsync<TSchema extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>> = MaybeReadonly<InferOutput<TSchema>> | ((dataset?: OutputDataset<InferOutput<TSchema>, InferIssue<TSchema>>, config?: Config<InferIssue<TSchema>>) => MaybePromise<MaybeReadonly<InferOutput<TSchema>>>);
|
|
14222
|
-
/**
|
|
14223
|
-
* Schema with fallback async type.
|
|
14224
|
-
*/
|
|
14225
|
-
type SchemaWithFallbackAsync<TSchema extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, TFallback extends FallbackAsync<TSchema>> = Omit<TSchema, 'async' | '~standard' | '~run'> & {
|
|
14226
|
-
/**
|
|
14227
|
-
* The fallback value.
|
|
14228
|
-
*/
|
|
14229
|
-
readonly fallback: TFallback;
|
|
14230
|
-
/**
|
|
14231
|
-
* Whether it's async.
|
|
14232
|
-
*/
|
|
14233
|
-
readonly async: true;
|
|
14234
|
-
/**
|
|
14235
|
-
* The Standard Schema properties.
|
|
14236
|
-
*
|
|
14237
|
-
* @internal
|
|
14238
|
-
*/
|
|
14239
|
-
readonly '~standard': StandardProps<InferInput<TSchema>, InferOutput<TSchema>>;
|
|
14240
|
-
/**
|
|
14241
|
-
* Parses unknown input values.
|
|
14242
|
-
*
|
|
14243
|
-
* @param dataset The input dataset.
|
|
14244
|
-
* @param config The configuration.
|
|
14245
|
-
*
|
|
14246
|
-
* @returns The output dataset.
|
|
14247
|
-
*
|
|
14248
|
-
* @internal
|
|
14249
|
-
*/
|
|
14250
|
-
readonly '~run': (dataset: UnknownDataset, config: Config<BaseIssue<unknown>>) => Promise<OutputDataset<InferOutput<TSchema>, InferIssue<TSchema>>>;
|
|
14251
|
-
};
|
|
14252
|
-
|
|
14253
|
-
/**
|
|
14254
|
-
* Schema with pipe type.
|
|
14255
|
-
*/
|
|
14256
|
-
type SchemaWithPipe<TPipe extends readonly [
|
|
14257
|
-
BaseSchema<unknown, unknown, BaseIssue<unknown>>,
|
|
14258
|
-
...PipeItem<any, unknown, BaseIssue<unknown>>[]
|
|
14259
|
-
]> = Omit<FirstTupleItem<TPipe>, 'pipe' | '~standard' | '~run' | '~types'> & {
|
|
14260
|
-
/**
|
|
14261
|
-
* The pipe items.
|
|
14262
|
-
*/
|
|
14263
|
-
readonly pipe: TPipe;
|
|
14264
|
-
/**
|
|
14265
|
-
* The Standard Schema properties.
|
|
14266
|
-
*
|
|
14267
|
-
* @internal
|
|
14268
|
-
*/
|
|
14269
|
-
readonly '~standard': StandardProps<InferInput<FirstTupleItem<TPipe>>, InferOutput<LastTupleItem<TPipe>>>;
|
|
14270
|
-
/**
|
|
14271
|
-
* Parses unknown input values.
|
|
14272
|
-
*
|
|
14273
|
-
* @param dataset The input dataset.
|
|
14274
|
-
* @param config The configuration.
|
|
14275
|
-
*
|
|
14276
|
-
* @returns The output dataset.
|
|
14277
|
-
*
|
|
14278
|
-
* @internal
|
|
14279
|
-
*/
|
|
14280
|
-
readonly '~run': (dataset: UnknownDataset, config: Config<BaseIssue<unknown>>) => OutputDataset<InferOutput<LastTupleItem<TPipe>>, InferIssue<TPipe[number]>>;
|
|
14281
|
-
/**
|
|
14282
|
-
* The input, output and issue type.
|
|
14283
|
-
*
|
|
14284
|
-
* @internal
|
|
14285
|
-
*/
|
|
14286
|
-
readonly '~types'?: {
|
|
14287
|
-
readonly input: InferInput<FirstTupleItem<TPipe>>;
|
|
14288
|
-
readonly output: InferOutput<LastTupleItem<TPipe>>;
|
|
14289
|
-
readonly issue: InferIssue<TPipe[number]>;
|
|
14290
|
-
} | undefined;
|
|
14291
|
-
};
|
|
14292
|
-
|
|
14293
|
-
/**
|
|
14294
|
-
* Schema with pipe async type.
|
|
14295
|
-
*/
|
|
14296
|
-
type SchemaWithPipeAsync<TPipe extends readonly [
|
|
14297
|
-
(BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>),
|
|
14298
|
-
...(PipeItem<any, unknown, BaseIssue<unknown>> | PipeItemAsync<any, unknown, BaseIssue<unknown>>)[]
|
|
14299
|
-
]> = Omit<FirstTupleItem<TPipe>, 'async' | 'pipe' | '~standard' | '~run' | '~types'> & {
|
|
14300
|
-
/**
|
|
14301
|
-
* The pipe items.
|
|
14302
|
-
*/
|
|
14303
|
-
readonly pipe: TPipe;
|
|
14304
|
-
/**
|
|
14305
|
-
* Whether it's async.
|
|
14306
|
-
*/
|
|
14307
|
-
readonly async: true;
|
|
14308
|
-
/**
|
|
14309
|
-
* The Standard Schema properties.
|
|
14310
|
-
*
|
|
14311
|
-
* @internal
|
|
14312
|
-
*/
|
|
14313
|
-
readonly '~standard': StandardProps<InferInput<FirstTupleItem<TPipe>>, InferOutput<LastTupleItem<TPipe>>>;
|
|
14314
|
-
/**
|
|
14315
|
-
* Parses unknown input values.
|
|
14316
|
-
*
|
|
14317
|
-
* @param dataset The input dataset.
|
|
14318
|
-
* @param config The configuration.
|
|
14319
|
-
*
|
|
14320
|
-
* @returns The output dataset.
|
|
14321
|
-
*
|
|
14322
|
-
* @internal
|
|
14323
|
-
*/
|
|
14324
|
-
readonly '~run': (dataset: UnknownDataset, config: Config<BaseIssue<unknown>>) => Promise<OutputDataset<InferOutput<LastTupleItem<TPipe>>, InferIssue<TPipe[number]>>>;
|
|
14325
|
-
/**
|
|
14326
|
-
* The input, output and issue type.
|
|
14327
|
-
*
|
|
14328
|
-
* @internal
|
|
14329
|
-
*/
|
|
14330
|
-
readonly '~types'?: {
|
|
14331
|
-
readonly input: InferInput<FirstTupleItem<TPipe>>;
|
|
14332
|
-
readonly output: InferOutput<LastTupleItem<TPipe>>;
|
|
14333
|
-
readonly issue: InferIssue<TPipe[number]>;
|
|
14334
|
-
} | undefined;
|
|
14335
|
-
};
|
|
14336
|
-
|
|
14337
|
-
/**
|
|
14338
|
-
* Base metadata interface.
|
|
14339
|
-
*/
|
|
14340
|
-
interface BaseMetadata<TInput> {
|
|
14341
|
-
/**
|
|
14342
|
-
* The object kind.
|
|
14343
|
-
*/
|
|
14344
|
-
readonly kind: 'metadata';
|
|
14345
|
-
/**
|
|
14346
|
-
* The metadata type.
|
|
14347
|
-
*/
|
|
14348
|
-
readonly type: string;
|
|
14349
|
-
/**
|
|
14350
|
-
* The metadata reference.
|
|
14351
|
-
*/
|
|
14352
|
-
readonly reference: (...args: any[]) => BaseMetadata<any>;
|
|
14353
|
-
/**
|
|
14354
|
-
* The input, output and issue type.
|
|
14355
|
-
*
|
|
14356
|
-
* @internal
|
|
14357
|
-
*/
|
|
14358
|
-
readonly '~types'?: {
|
|
14359
|
-
readonly input: TInput;
|
|
14360
|
-
readonly output: TInput;
|
|
14361
|
-
readonly issue: never;
|
|
14362
|
-
} | undefined;
|
|
14363
|
-
}
|
|
14219
|
+
/******************************************************************************
|
|
14220
|
+
* This file was generated by langium-cli 3.5.2.
|
|
14221
|
+
* DO NOT EDIT MANUALLY!
|
|
14222
|
+
******************************************************************************/
|
|
14364
14223
|
|
|
14365
|
-
|
|
14366
|
-
|
|
14367
|
-
|
|
14368
|
-
|
|
14369
|
-
|
|
14370
|
-
|
|
14371
|
-
|
|
14372
|
-
|
|
14373
|
-
|
|
14374
|
-
|
|
14375
|
-
|
|
14376
|
-
|
|
14377
|
-
|
|
14378
|
-
|
|
14379
|
-
|
|
14380
|
-
|
|
14224
|
+
type ArrowType = 'crow' | 'diamond' | 'dot' | 'none' | 'normal' | 'odiamond' | 'odot' | 'onormal' | 'open' | 'vee';
|
|
14225
|
+
type BorderStyleValue = 'none' | LineOptions;
|
|
14226
|
+
type ColorLiteral = HexColor | RGBAColor;
|
|
14227
|
+
declare const ColorLiteral = "ColorLiteral";
|
|
14228
|
+
type CustomColorId = 'element' | 'model' | ArrowType | ElementShape | LineOptions | string;
|
|
14229
|
+
type DeploymentElement = DeployedInstance | DeploymentNode;
|
|
14230
|
+
declare const DeploymentElement = "DeploymentElement";
|
|
14231
|
+
type DeploymentNodeOrElementKind = DeploymentNodeKind | ElementKind;
|
|
14232
|
+
declare const DeploymentNodeOrElementKind = "DeploymentNodeOrElementKind";
|
|
14233
|
+
type DeploymentViewRule = DeploymentViewRulePredicate | DeploymentViewRuleStyle | ViewRuleAutoLayout;
|
|
14234
|
+
declare const DeploymentViewRule = "DeploymentViewRule";
|
|
14235
|
+
type DynamicViewRule = DynamicViewGlobalPredicateRef | DynamicViewIncludePredicate | ViewRuleAutoLayout | ViewRuleStyleOrGlobalRef;
|
|
14236
|
+
declare const DynamicViewRule = "DynamicViewRule";
|
|
14237
|
+
type ElementProperty = ElementStringProperty | ElementStyleProperty | IconProperty | LinkProperty | MetadataProperty;
|
|
14238
|
+
declare const ElementProperty = "ElementProperty";
|
|
14239
|
+
type ElementShape = 'browser' | 'cylinder' | 'mobile' | 'person' | 'queue' | 'rectangle' | 'storage';
|
|
14240
|
+
type ExpressionV2 = FqnExprOrWith | RelationExprOrWith;
|
|
14241
|
+
declare const ExpressionV2 = "ExpressionV2";
|
|
14242
|
+
type ExtendElementProperty = LinkProperty | MetadataProperty;
|
|
14243
|
+
declare const ExtendElementProperty = "ExtendElementProperty";
|
|
14244
|
+
type FqnExpr = ElementKindExpression | ElementTagExpression | FqnRefExpr | WildcardExpression;
|
|
14245
|
+
declare const FqnExpr = "FqnExpr";
|
|
14246
|
+
type FqnExprOrWhere = FqnExpr | FqnExprWhere;
|
|
14247
|
+
declare const FqnExprOrWhere = "FqnExprOrWhere";
|
|
14248
|
+
type FqnExprOrWith = FqnExprOrWhere | FqnExprWith;
|
|
14249
|
+
declare const FqnExprOrWith = "FqnExprOrWith";
|
|
14250
|
+
type FqnReferenceable = Element | ExtendDeployment | ExtendElement | Referenceable;
|
|
14251
|
+
declare const FqnReferenceable = "FqnReferenceable";
|
|
14252
|
+
type IconId = string;
|
|
14253
|
+
type Id = 'deployment' | 'element' | 'group' | 'instance' | 'model' | 'node' | ArrowType | ElementShape | LineOptions | Participant | SizeValue | ThemeColor | string;
|
|
14254
|
+
type LikeC4View = DeploymentView | DynamicView | ElementView;
|
|
14255
|
+
declare const LikeC4View = "LikeC4View";
|
|
14256
|
+
type LineOptions = 'dashed' | 'dotted' | 'solid';
|
|
14257
|
+
type MetadataProperty = MetadataBody;
|
|
14258
|
+
declare const MetadataProperty = "MetadataProperty";
|
|
14259
|
+
type ModelReferenceable = Element | Imported;
|
|
14260
|
+
declare const ModelReferenceable = "ModelReferenceable";
|
|
14261
|
+
type Participant = 'source' | 'target';
|
|
14262
|
+
type Referenceable = DeployedInstance | DeploymentNode | Element | Imported;
|
|
14263
|
+
declare const Referenceable = "Referenceable";
|
|
14264
|
+
type RelationExpr = DirectedRelationExpr | InOutRelationExpr | IncomingRelationExpr | OutgoingRelationExpr;
|
|
14265
|
+
declare const RelationExpr = "RelationExpr";
|
|
14266
|
+
type RelationExprOrWhere = RelationExpr | RelationExprWhere;
|
|
14267
|
+
declare const RelationExprOrWhere = "RelationExprOrWhere";
|
|
14268
|
+
type RelationExprOrWith = RelationExprOrWhere | RelationExprWith;
|
|
14269
|
+
declare const RelationExprOrWith = "RelationExprOrWith";
|
|
14270
|
+
type RelationProperty = LinkProperty | MetadataProperty | RelationNavigateToProperty | RelationStringProperty | RelationStyleProperty;
|
|
14271
|
+
declare const RelationProperty = "RelationProperty";
|
|
14272
|
+
type RelationshipStyleProperty = ArrowProperty | ColorProperty | LineProperty;
|
|
14273
|
+
declare const RelationshipStyleProperty = "RelationshipStyleProperty";
|
|
14274
|
+
type SizeProperty = PaddingSizeProperty | ShapeSizeProperty | TextSizeProperty;
|
|
14275
|
+
declare const SizeProperty = "SizeProperty";
|
|
14276
|
+
type SizeValue = 'large' | 'lg' | 'md' | 'medium' | 'sm' | 'small' | 'xl' | 'xlarge' | 'xs' | 'xsmall';
|
|
14277
|
+
type StringProperty = ElementStringProperty | MetadataAttribute | NotationProperty | NotesProperty | RelationStringProperty | SpecificationElementStringProperty | SpecificationRelationshipStringProperty | ViewStringProperty;
|
|
14278
|
+
declare const StringProperty = "StringProperty";
|
|
14279
|
+
type StyleProperty = BorderProperty | ColorProperty | IconProperty | MultipleProperty | OpacityProperty | PaddingSizeProperty | ShapeProperty | ShapeSizeProperty | TextSizeProperty;
|
|
14280
|
+
declare const StyleProperty = "StyleProperty";
|
|
14281
|
+
type ThemeColor = 'amber' | 'blue' | 'gray' | 'green' | 'indigo' | 'muted' | 'primary' | 'red' | 'secondary' | 'sky' | 'slate';
|
|
14282
|
+
type Uri = string;
|
|
14283
|
+
type ViewLayoutDirection = 'BottomTop' | 'LeftRight' | 'RightLeft' | 'TopBottom';
|
|
14284
|
+
type ViewProperty = LinkProperty | ViewStringProperty;
|
|
14285
|
+
declare const ViewProperty = "ViewProperty";
|
|
14286
|
+
type ViewRule = ViewRuleAutoLayout | ViewRuleGlobalPredicateRef | ViewRuleGroup | ViewRulePredicate | ViewRuleStyleOrGlobalRef;
|
|
14287
|
+
declare const ViewRule = "ViewRule";
|
|
14288
|
+
type ViewRuleStyleOrGlobalRef = ViewRuleGlobalStyle | ViewRuleStyle;
|
|
14289
|
+
declare const ViewRuleStyleOrGlobalRef = "ViewRuleStyleOrGlobalRef";
|
|
14290
|
+
type WhereElement = WhereElementKind | WhereElementTag;
|
|
14291
|
+
declare const WhereElement = "WhereElement";
|
|
14292
|
+
type WhereElementExpression = WhereBinaryExpression | WhereElement | WhereElementNegation;
|
|
14293
|
+
declare const WhereElementExpression = "WhereElementExpression";
|
|
14294
|
+
type WhereExpression = WhereElementExpression | WhereRelationExpression;
|
|
14295
|
+
declare const WhereExpression = "WhereExpression";
|
|
14296
|
+
type WhereKindEqual = WhereElementKind | WhereRelationKind | WhereRelationParticipantKind;
|
|
14297
|
+
declare const WhereKindEqual = "WhereKindEqual";
|
|
14298
|
+
type WhereRelation = WhereRelationKind | WhereRelationParticipantKind | WhereRelationParticipantTag | WhereRelationTag;
|
|
14299
|
+
declare const WhereRelation = "WhereRelation";
|
|
14300
|
+
type WhereRelationExpression = WhereBinaryExpression | WhereRelation | WhereRelationNegation;
|
|
14301
|
+
declare const WhereRelationExpression = "WhereRelationExpression";
|
|
14302
|
+
type WhereTagEqual = WhereElementTag | WhereRelationParticipantTag | WhereRelationTag;
|
|
14303
|
+
declare const WhereTagEqual = "WhereTagEqual";
|
|
14304
|
+
interface ArrowProperty extends AstNode {
|
|
14305
|
+
readonly $container: CustomRelationProperties | RelationStyleProperty | SpecificationRelationshipKind;
|
|
14306
|
+
readonly $type: 'ArrowProperty';
|
|
14307
|
+
key: 'head' | 'tail';
|
|
14308
|
+
value: ArrowType;
|
|
14381
14309
|
}
|
|
14382
|
-
|
|
14383
|
-
|
|
14384
|
-
|
|
14385
|
-
|
|
14386
|
-
|
|
14387
|
-
|
|
14388
|
-
*/
|
|
14389
|
-
typed: true;
|
|
14390
|
-
/**
|
|
14391
|
-
* The dataset value.
|
|
14392
|
-
*/
|
|
14393
|
-
value: TValue;
|
|
14394
|
-
/**
|
|
14395
|
-
* The dataset issues.
|
|
14396
|
-
*/
|
|
14397
|
-
issues?: undefined;
|
|
14310
|
+
declare const ArrowProperty = "ArrowProperty";
|
|
14311
|
+
interface BorderProperty extends AstNode {
|
|
14312
|
+
readonly $container: CustomElementProperties | DeploymentViewRuleStyle | ElementStyleProperty | GlobalStyle | ViewRuleGroup | ViewRuleStyle;
|
|
14313
|
+
readonly $type: 'BorderProperty';
|
|
14314
|
+
key: 'border';
|
|
14315
|
+
value: BorderStyleValue;
|
|
14398
14316
|
}
|
|
14399
|
-
|
|
14400
|
-
|
|
14401
|
-
|
|
14402
|
-
|
|
14403
|
-
|
|
14404
|
-
|
|
14405
|
-
|
|
14406
|
-
typed: true;
|
|
14407
|
-
/**
|
|
14408
|
-
* The dataset value.
|
|
14409
|
-
*/
|
|
14410
|
-
value: TValue;
|
|
14411
|
-
/**
|
|
14412
|
-
* The dataset issues.
|
|
14413
|
-
*/
|
|
14414
|
-
issues: [TIssue, ...TIssue[]];
|
|
14317
|
+
declare const BorderProperty = "BorderProperty";
|
|
14318
|
+
interface ColorProperty extends AstNode {
|
|
14319
|
+
readonly $container: CustomElementProperties | CustomRelationProperties | DeploymentViewRuleStyle | ElementStyleProperty | GlobalStyle | RelationStyleProperty | SpecificationRelationshipKind | ViewRuleGroup | ViewRuleStyle;
|
|
14320
|
+
readonly $type: 'ColorProperty';
|
|
14321
|
+
customColor?: Reference<CustomColor>;
|
|
14322
|
+
key: 'color';
|
|
14323
|
+
themeColor?: ThemeColor;
|
|
14415
14324
|
}
|
|
14416
|
-
|
|
14417
|
-
|
|
14418
|
-
|
|
14419
|
-
|
|
14420
|
-
|
|
14421
|
-
* Whether is's typed.
|
|
14422
|
-
*/
|
|
14423
|
-
typed: false;
|
|
14424
|
-
/**
|
|
14425
|
-
* The dataset value.
|
|
14426
|
-
*/
|
|
14427
|
-
value: unknown;
|
|
14428
|
-
/**
|
|
14429
|
-
* The dataset issues.
|
|
14430
|
-
*/
|
|
14431
|
-
issues: [TIssue, ...TIssue[]];
|
|
14325
|
+
declare const ColorProperty = "ColorProperty";
|
|
14326
|
+
interface CustomColor extends AstNode {
|
|
14327
|
+
readonly $container: SpecificationColor;
|
|
14328
|
+
readonly $type: 'CustomColor';
|
|
14329
|
+
name: CustomColorId;
|
|
14432
14330
|
}
|
|
14433
|
-
|
|
14434
|
-
|
|
14435
|
-
|
|
14436
|
-
type
|
|
14437
|
-
|
|
14438
|
-
/**
|
|
14439
|
-
* The Standard Schema properties interface.
|
|
14440
|
-
*/
|
|
14441
|
-
interface StandardProps<TInput, TOutput> {
|
|
14442
|
-
/**
|
|
14443
|
-
* The version number of the standard.
|
|
14444
|
-
*/
|
|
14445
|
-
readonly version: 1;
|
|
14446
|
-
/**
|
|
14447
|
-
* The vendor name of the schema library.
|
|
14448
|
-
*/
|
|
14449
|
-
readonly vendor: 'valibot';
|
|
14450
|
-
/**
|
|
14451
|
-
* Validates unknown input values.
|
|
14452
|
-
*/
|
|
14453
|
-
readonly validate: (value: unknown) => StandardResult<TOutput> | Promise<StandardResult<TOutput>>;
|
|
14454
|
-
/**
|
|
14455
|
-
* Inferred types associated with the schema.
|
|
14456
|
-
*/
|
|
14457
|
-
readonly types?: StandardTypes<TInput, TOutput> | undefined;
|
|
14331
|
+
declare const CustomColor = "CustomColor";
|
|
14332
|
+
interface CustomElementProperties extends AstNode {
|
|
14333
|
+
readonly $container: FqnExprWith;
|
|
14334
|
+
readonly $type: 'CustomElementProperties';
|
|
14335
|
+
props: Array<ElementStringProperty | NavigateToProperty | NotationProperty | StyleProperty>;
|
|
14458
14336
|
}
|
|
14459
|
-
|
|
14460
|
-
|
|
14461
|
-
|
|
14462
|
-
type
|
|
14463
|
-
|
|
14464
|
-
* The result interface if validation succeeds.
|
|
14465
|
-
*/
|
|
14466
|
-
interface StandardSuccessResult<TOutput> {
|
|
14467
|
-
/**
|
|
14468
|
-
* The typed output value.
|
|
14469
|
-
*/
|
|
14470
|
-
readonly value: TOutput;
|
|
14471
|
-
/**
|
|
14472
|
-
* The non-existent issues.
|
|
14473
|
-
*/
|
|
14474
|
-
readonly issues?: undefined;
|
|
14337
|
+
declare const CustomElementProperties = "CustomElementProperties";
|
|
14338
|
+
interface CustomRelationProperties extends AstNode {
|
|
14339
|
+
readonly $container: DynamicViewStep | RelationExprWith;
|
|
14340
|
+
readonly $type: 'CustomRelationProperties';
|
|
14341
|
+
props: Array<NotationProperty | NotesProperty | RelationNavigateToProperty | RelationStringProperty | RelationshipStyleProperty>;
|
|
14475
14342
|
}
|
|
14476
|
-
|
|
14477
|
-
|
|
14478
|
-
|
|
14479
|
-
|
|
14480
|
-
|
|
14481
|
-
|
|
14482
|
-
|
|
14483
|
-
|
|
14343
|
+
declare const CustomRelationProperties = "CustomRelationProperties";
|
|
14344
|
+
interface DeployedInstance extends AstNode {
|
|
14345
|
+
readonly $container: DeploymentNodeBody | ExtendDeploymentBody;
|
|
14346
|
+
readonly $type: 'DeployedInstance';
|
|
14347
|
+
body?: DeployedInstanceBody;
|
|
14348
|
+
name?: Id;
|
|
14349
|
+
target: ElementRef;
|
|
14350
|
+
title?: string;
|
|
14484
14351
|
}
|
|
14485
|
-
|
|
14486
|
-
|
|
14487
|
-
|
|
14488
|
-
|
|
14489
|
-
|
|
14490
|
-
|
|
14491
|
-
|
|
14492
|
-
readonly message: string;
|
|
14493
|
-
/**
|
|
14494
|
-
* The path of the issue, if any.
|
|
14495
|
-
*/
|
|
14496
|
-
readonly path?: readonly (PropertyKey | StandardPathItem)[] | undefined;
|
|
14352
|
+
declare const DeployedInstance = "DeployedInstance";
|
|
14353
|
+
interface DeployedInstanceBody extends AstNode {
|
|
14354
|
+
readonly $container: DeployedInstance;
|
|
14355
|
+
readonly $type: 'DeployedInstanceBody';
|
|
14356
|
+
elements: Array<DeploymentRelation>;
|
|
14357
|
+
props: Array<ElementProperty>;
|
|
14358
|
+
tags?: Tags;
|
|
14497
14359
|
}
|
|
14498
|
-
|
|
14499
|
-
|
|
14500
|
-
|
|
14501
|
-
|
|
14502
|
-
|
|
14503
|
-
|
|
14504
|
-
|
|
14505
|
-
|
|
14360
|
+
declare const DeployedInstanceBody = "DeployedInstanceBody";
|
|
14361
|
+
interface DeploymentNode extends AstNode {
|
|
14362
|
+
readonly $container: DeploymentNodeBody | ExtendDeploymentBody | ModelDeployments;
|
|
14363
|
+
readonly $type: 'DeploymentNode';
|
|
14364
|
+
body?: DeploymentNodeBody;
|
|
14365
|
+
kind: Reference<DeploymentNodeKind>;
|
|
14366
|
+
name: Id;
|
|
14367
|
+
title?: string;
|
|
14506
14368
|
}
|
|
14507
|
-
|
|
14508
|
-
|
|
14509
|
-
|
|
14510
|
-
|
|
14511
|
-
|
|
14512
|
-
|
|
14513
|
-
|
|
14514
|
-
readonly input: TInput;
|
|
14515
|
-
/**
|
|
14516
|
-
* The output type of the schema.
|
|
14517
|
-
*/
|
|
14518
|
-
readonly output: TOutput;
|
|
14369
|
+
declare const DeploymentNode = "DeploymentNode";
|
|
14370
|
+
interface DeploymentNodeBody extends AstNode {
|
|
14371
|
+
readonly $container: DeploymentNode;
|
|
14372
|
+
readonly $type: 'DeploymentNodeBody';
|
|
14373
|
+
elements: Array<DeployedInstance | DeploymentNode | DeploymentRelation>;
|
|
14374
|
+
props: Array<ElementProperty>;
|
|
14375
|
+
tags?: Tags;
|
|
14519
14376
|
}
|
|
14520
|
-
|
|
14521
|
-
|
|
14522
|
-
|
|
14523
|
-
|
|
14524
|
-
|
|
14525
|
-
/**
|
|
14526
|
-
* The object kind.
|
|
14527
|
-
*/
|
|
14528
|
-
readonly kind: 'schema';
|
|
14529
|
-
/**
|
|
14530
|
-
* The schema type.
|
|
14531
|
-
*/
|
|
14532
|
-
readonly type: string;
|
|
14533
|
-
/**
|
|
14534
|
-
* The schema reference.
|
|
14535
|
-
*/
|
|
14536
|
-
readonly reference: (...args: any[]) => BaseSchema<unknown, unknown, BaseIssue<unknown>>;
|
|
14537
|
-
/**
|
|
14538
|
-
* The expected property.
|
|
14539
|
-
*/
|
|
14540
|
-
readonly expects: string;
|
|
14541
|
-
/**
|
|
14542
|
-
* Whether it's async.
|
|
14543
|
-
*/
|
|
14544
|
-
readonly async: false;
|
|
14545
|
-
/**
|
|
14546
|
-
* The Standard Schema properties.
|
|
14547
|
-
*
|
|
14548
|
-
* @internal
|
|
14549
|
-
*/
|
|
14550
|
-
readonly '~standard': StandardProps<TInput, TOutput>;
|
|
14551
|
-
/**
|
|
14552
|
-
* Parses unknown input values.
|
|
14553
|
-
*
|
|
14554
|
-
* @param dataset The input dataset.
|
|
14555
|
-
* @param config The configuration.
|
|
14556
|
-
*
|
|
14557
|
-
* @returns The output dataset.
|
|
14558
|
-
*
|
|
14559
|
-
* @internal
|
|
14560
|
-
*/
|
|
14561
|
-
readonly '~run': (dataset: UnknownDataset, config: Config<BaseIssue<unknown>>) => OutputDataset<TOutput, TIssue>;
|
|
14562
|
-
/**
|
|
14563
|
-
* The input, output and issue type.
|
|
14564
|
-
*
|
|
14565
|
-
* @internal
|
|
14566
|
-
*/
|
|
14567
|
-
readonly '~types'?: {
|
|
14568
|
-
readonly input: TInput;
|
|
14569
|
-
readonly output: TOutput;
|
|
14570
|
-
readonly issue: TIssue;
|
|
14571
|
-
} | undefined;
|
|
14377
|
+
declare const DeploymentNodeBody = "DeploymentNodeBody";
|
|
14378
|
+
interface DeploymentNodeKind extends AstNode {
|
|
14379
|
+
readonly $container: SpecificationDeploymentNodeKind;
|
|
14380
|
+
readonly $type: 'DeploymentNodeKind';
|
|
14381
|
+
name: Id;
|
|
14572
14382
|
}
|
|
14573
|
-
|
|
14574
|
-
|
|
14575
|
-
|
|
14576
|
-
|
|
14577
|
-
|
|
14578
|
-
|
|
14579
|
-
|
|
14580
|
-
|
|
14581
|
-
|
|
14582
|
-
|
|
14583
|
-
|
|
14584
|
-
|
|
14585
|
-
|
|
14586
|
-
* Parses unknown input values.
|
|
14587
|
-
*
|
|
14588
|
-
* @param dataset The input dataset.
|
|
14589
|
-
* @param config The configuration.
|
|
14590
|
-
*
|
|
14591
|
-
* @returns The output dataset.
|
|
14592
|
-
*
|
|
14593
|
-
* @internal
|
|
14594
|
-
*/
|
|
14595
|
-
readonly '~run': (dataset: UnknownDataset, config: Config<BaseIssue<unknown>>) => Promise<OutputDataset<TOutput, TIssue>>;
|
|
14383
|
+
declare const DeploymentNodeKind = "DeploymentNodeKind";
|
|
14384
|
+
interface DeploymentRelation extends AstNode {
|
|
14385
|
+
readonly $container: DeployedInstanceBody | DeploymentNodeBody | ExtendDeploymentBody | ModelDeployments;
|
|
14386
|
+
readonly $type: 'DeploymentRelation';
|
|
14387
|
+
body?: DeploymentRelationBody;
|
|
14388
|
+
description?: string;
|
|
14389
|
+
dotKind?: RelationKindDotRef;
|
|
14390
|
+
kind?: Reference<RelationshipKind>;
|
|
14391
|
+
source?: FqnRef;
|
|
14392
|
+
tags?: Tags;
|
|
14393
|
+
target: FqnRef;
|
|
14394
|
+
technology?: string;
|
|
14395
|
+
title?: string;
|
|
14596
14396
|
}
|
|
14597
|
-
|
|
14598
|
-
|
|
14599
|
-
|
|
14600
|
-
|
|
14601
|
-
|
|
14602
|
-
|
|
14603
|
-
* The object kind.
|
|
14604
|
-
*/
|
|
14605
|
-
readonly kind: 'transformation';
|
|
14606
|
-
/**
|
|
14607
|
-
* The transformation type.
|
|
14608
|
-
*/
|
|
14609
|
-
readonly type: string;
|
|
14610
|
-
/**
|
|
14611
|
-
* The transformation reference.
|
|
14612
|
-
*/
|
|
14613
|
-
readonly reference: (...args: any[]) => BaseTransformation<any, any, BaseIssue<unknown>>;
|
|
14614
|
-
/**
|
|
14615
|
-
* Whether it's async.
|
|
14616
|
-
*/
|
|
14617
|
-
readonly async: false;
|
|
14618
|
-
/**
|
|
14619
|
-
* Transforms known input values.
|
|
14620
|
-
*
|
|
14621
|
-
* @param dataset The input dataset.
|
|
14622
|
-
* @param config The configuration.
|
|
14623
|
-
*
|
|
14624
|
-
* @returns The output dataset.
|
|
14625
|
-
*
|
|
14626
|
-
* @internal
|
|
14627
|
-
*/
|
|
14628
|
-
readonly '~run': (dataset: SuccessDataset<TInput>, config: Config<BaseIssue<unknown>>) => OutputDataset<TOutput, BaseIssue<unknown> | TIssue>;
|
|
14629
|
-
/**
|
|
14630
|
-
* The input, output and issue type.
|
|
14631
|
-
*
|
|
14632
|
-
* @internal
|
|
14633
|
-
*/
|
|
14634
|
-
readonly '~types'?: {
|
|
14635
|
-
readonly input: TInput;
|
|
14636
|
-
readonly output: TOutput;
|
|
14637
|
-
readonly issue: TIssue;
|
|
14638
|
-
} | undefined;
|
|
14397
|
+
declare const DeploymentRelation = "DeploymentRelation";
|
|
14398
|
+
interface DeploymentRelationBody extends AstNode {
|
|
14399
|
+
readonly $container: DeploymentRelation;
|
|
14400
|
+
readonly $type: 'DeploymentRelationBody';
|
|
14401
|
+
props: Array<RelationProperty>;
|
|
14402
|
+
tags?: Tags;
|
|
14639
14403
|
}
|
|
14640
|
-
|
|
14641
|
-
|
|
14642
|
-
|
|
14643
|
-
|
|
14644
|
-
|
|
14645
|
-
|
|
14646
|
-
*/
|
|
14647
|
-
readonly reference: (...args: any[]) => BaseTransformation<any, any, BaseIssue<unknown>> | BaseTransformationAsync<any, any, BaseIssue<unknown>>;
|
|
14648
|
-
/**
|
|
14649
|
-
* Whether it's async.
|
|
14650
|
-
*/
|
|
14651
|
-
readonly async: true;
|
|
14652
|
-
/**
|
|
14653
|
-
* Transforms known input values.
|
|
14654
|
-
*
|
|
14655
|
-
* @param dataset The input dataset.
|
|
14656
|
-
* @param config The configuration.
|
|
14657
|
-
*
|
|
14658
|
-
* @returns The output dataset.
|
|
14659
|
-
*
|
|
14660
|
-
* @internal
|
|
14661
|
-
*/
|
|
14662
|
-
readonly '~run': (dataset: SuccessDataset<TInput>, config: Config<BaseIssue<unknown>>) => Promise<OutputDataset<TOutput, BaseIssue<unknown> | TIssue>>;
|
|
14404
|
+
declare const DeploymentRelationBody = "DeploymentRelationBody";
|
|
14405
|
+
interface DeploymentView extends AstNode {
|
|
14406
|
+
readonly $container: ModelViews;
|
|
14407
|
+
readonly $type: 'DeploymentView';
|
|
14408
|
+
body?: DeploymentViewBody;
|
|
14409
|
+
name: Id;
|
|
14663
14410
|
}
|
|
14664
|
-
|
|
14665
|
-
|
|
14666
|
-
|
|
14667
|
-
|
|
14668
|
-
|
|
14669
|
-
|
|
14670
|
-
|
|
14671
|
-
*/
|
|
14672
|
-
readonly kind: 'validation';
|
|
14673
|
-
/**
|
|
14674
|
-
* The validation type.
|
|
14675
|
-
*/
|
|
14676
|
-
readonly type: string;
|
|
14677
|
-
/**
|
|
14678
|
-
* The validation reference.
|
|
14679
|
-
*/
|
|
14680
|
-
readonly reference: (...args: any[]) => BaseValidation<any, any, BaseIssue<unknown>>;
|
|
14681
|
-
/**
|
|
14682
|
-
* The expected property.
|
|
14683
|
-
*/
|
|
14684
|
-
readonly expects: string | null;
|
|
14685
|
-
/**
|
|
14686
|
-
* Whether it's async.
|
|
14687
|
-
*/
|
|
14688
|
-
readonly async: false;
|
|
14689
|
-
/**
|
|
14690
|
-
* Validates known input values.
|
|
14691
|
-
*
|
|
14692
|
-
* @param dataset The input dataset.
|
|
14693
|
-
* @param config The configuration.
|
|
14694
|
-
*
|
|
14695
|
-
* @returns The output dataset.
|
|
14696
|
-
*
|
|
14697
|
-
* @internal
|
|
14698
|
-
*/
|
|
14699
|
-
readonly '~run': (dataset: OutputDataset<TInput, BaseIssue<unknown>>, config: Config<BaseIssue<unknown>>) => OutputDataset<TOutput, BaseIssue<unknown> | TIssue>;
|
|
14700
|
-
/**
|
|
14701
|
-
* The input, output and issue type.
|
|
14702
|
-
*
|
|
14703
|
-
* @internal
|
|
14704
|
-
*/
|
|
14705
|
-
readonly '~types'?: {
|
|
14706
|
-
readonly input: TInput;
|
|
14707
|
-
readonly output: TOutput;
|
|
14708
|
-
readonly issue: TIssue;
|
|
14709
|
-
} | undefined;
|
|
14411
|
+
declare const DeploymentView = "DeploymentView";
|
|
14412
|
+
interface DeploymentViewBody extends AstNode {
|
|
14413
|
+
readonly $container: DeploymentView;
|
|
14414
|
+
readonly $type: 'DeploymentViewBody';
|
|
14415
|
+
props: Array<ViewProperty>;
|
|
14416
|
+
rules: Array<DeploymentViewRule>;
|
|
14417
|
+
tags?: Tags;
|
|
14710
14418
|
}
|
|
14711
|
-
|
|
14712
|
-
|
|
14713
|
-
|
|
14714
|
-
|
|
14715
|
-
|
|
14716
|
-
|
|
14717
|
-
*/
|
|
14718
|
-
readonly reference: (...args: any[]) => BaseValidation<any, any, BaseIssue<unknown>> | BaseValidationAsync<any, any, BaseIssue<unknown>>;
|
|
14719
|
-
/**
|
|
14720
|
-
* Whether it's async.
|
|
14721
|
-
*/
|
|
14722
|
-
readonly async: true;
|
|
14723
|
-
/**
|
|
14724
|
-
* Validates known input values.
|
|
14725
|
-
*
|
|
14726
|
-
* @param dataset The input dataset.
|
|
14727
|
-
* @param config The configuration.
|
|
14728
|
-
*
|
|
14729
|
-
* @returns The output dataset.
|
|
14730
|
-
*
|
|
14731
|
-
* @internal
|
|
14732
|
-
*/
|
|
14733
|
-
readonly '~run': (dataset: OutputDataset<TInput, BaseIssue<unknown>>, config: Config<BaseIssue<unknown>>) => Promise<OutputDataset<TOutput, BaseIssue<unknown> | TIssue>>;
|
|
14419
|
+
declare const DeploymentViewBody = "DeploymentViewBody";
|
|
14420
|
+
interface DeploymentViewRulePredicate extends AstNode {
|
|
14421
|
+
readonly $container: DeploymentViewBody;
|
|
14422
|
+
readonly $type: 'DeploymentViewRulePredicate';
|
|
14423
|
+
expr: Expressions;
|
|
14424
|
+
isInclude: boolean;
|
|
14734
14425
|
}
|
|
14735
|
-
|
|
14736
|
-
|
|
14737
|
-
|
|
14738
|
-
|
|
14739
|
-
|
|
14740
|
-
|
|
14741
|
-
* Infer output type.
|
|
14742
|
-
*/
|
|
14743
|
-
type InferOutput<TItem extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>> | BaseValidation<any, unknown, BaseIssue<unknown>> | BaseValidationAsync<any, unknown, BaseIssue<unknown>> | BaseTransformation<any, unknown, BaseIssue<unknown>> | BaseTransformationAsync<any, unknown, BaseIssue<unknown>> | BaseMetadata<any>> = NonNullable<TItem['~types']>['output'];
|
|
14744
|
-
/**
|
|
14745
|
-
* Infer issue type.
|
|
14746
|
-
*/
|
|
14747
|
-
type InferIssue<TItem extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>> | BaseValidation<any, unknown, BaseIssue<unknown>> | BaseValidationAsync<any, unknown, BaseIssue<unknown>> | BaseTransformation<any, unknown, BaseIssue<unknown>> | BaseTransformationAsync<any, unknown, BaseIssue<unknown>> | BaseMetadata<any>> = NonNullable<TItem['~types']>['issue'];
|
|
14748
|
-
/**
|
|
14749
|
-
* Constructs a type that is maybe readonly.
|
|
14750
|
-
*/
|
|
14751
|
-
type MaybeReadonly<TValue> = TValue | Readonly<TValue>;
|
|
14752
|
-
/**
|
|
14753
|
-
* Constructs a type that is maybe a promise.
|
|
14754
|
-
*/
|
|
14755
|
-
type MaybePromise<TValue> = TValue | Promise<TValue>;
|
|
14756
|
-
/**
|
|
14757
|
-
* Prettifies a type for better readability.
|
|
14758
|
-
*
|
|
14759
|
-
* Hint: This type has no effect and is only used so that TypeScript displays
|
|
14760
|
-
* the final type in the preview instead of the utility types used.
|
|
14761
|
-
*/
|
|
14762
|
-
type Prettify<TObject> = {
|
|
14763
|
-
[TKey in keyof TObject]: TObject[TKey];
|
|
14764
|
-
} & {};
|
|
14765
|
-
/**
|
|
14766
|
-
* Marks specific keys as optional.
|
|
14767
|
-
*/
|
|
14768
|
-
type MarkOptional<TObject, TKeys extends keyof TObject> = {
|
|
14769
|
-
[TKey in keyof TObject]?: unknown;
|
|
14770
|
-
} & Omit<TObject, TKeys> & Partial<Pick<TObject, TKeys>>;
|
|
14771
|
-
/**
|
|
14772
|
-
* Extracts first tuple item.
|
|
14773
|
-
*/
|
|
14774
|
-
type FirstTupleItem<TTuple extends readonly [unknown, ...unknown[]]> = TTuple[0];
|
|
14775
|
-
/**
|
|
14776
|
-
* Extracts last tuple item.
|
|
14777
|
-
*/
|
|
14778
|
-
type LastTupleItem<TTuple extends readonly [unknown, ...unknown[]]> = TTuple[TTuple extends readonly [unknown, ...infer TRest] ? TRest['length'] : never];
|
|
14779
|
-
|
|
14780
|
-
/**
|
|
14781
|
-
* Error message type.
|
|
14782
|
-
*/
|
|
14783
|
-
type ErrorMessage<TIssue extends BaseIssue<unknown>> = ((issue: TIssue) => string) | string;
|
|
14784
|
-
/**
|
|
14785
|
-
* Default type.
|
|
14786
|
-
*/
|
|
14787
|
-
type Default<TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, TInput extends null | undefined> = MaybeReadonly<InferInput<TWrapped> | TInput> | ((dataset?: UnknownDataset, config?: Config<InferIssue<TWrapped>>) => MaybeReadonly<InferInput<TWrapped> | TInput>) | undefined;
|
|
14788
|
-
/**
|
|
14789
|
-
* Default async type.
|
|
14790
|
-
*/
|
|
14791
|
-
type DefaultAsync<TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, TInput extends null | undefined> = MaybeReadonly<InferInput<TWrapped> | TInput> | ((dataset?: UnknownDataset, config?: Config<InferIssue<TWrapped>>) => MaybePromise<MaybeReadonly<InferInput<TWrapped> | TInput>>) | undefined;
|
|
14792
|
-
/**
|
|
14793
|
-
* Default value type.
|
|
14794
|
-
*/
|
|
14795
|
-
type DefaultValue<TDefault extends Default<BaseSchema<unknown, unknown, BaseIssue<unknown>>, null | undefined> | DefaultAsync<BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, null | undefined>> = TDefault extends DefaultAsync<infer TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, infer TInput> ? TDefault extends (dataset?: UnknownDataset, config?: Config<InferIssue<TWrapped>>) => MaybePromise<InferInput<TWrapped> | TInput> ? Awaited<ReturnType<TDefault>> : TDefault : never;
|
|
14796
|
-
|
|
14797
|
-
/**
|
|
14798
|
-
* Optional entry schema type.
|
|
14799
|
-
*/
|
|
14800
|
-
type OptionalEntrySchema = ExactOptionalSchema<BaseSchema<unknown, unknown, BaseIssue<unknown>>, unknown> | NullishSchema<BaseSchema<unknown, unknown, BaseIssue<unknown>>, unknown> | OptionalSchema<BaseSchema<unknown, unknown, BaseIssue<unknown>>, unknown>;
|
|
14801
|
-
/**
|
|
14802
|
-
* Optional entry schema async type.
|
|
14803
|
-
*/
|
|
14804
|
-
type OptionalEntrySchemaAsync = ExactOptionalSchemaAsync<BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, unknown> | NullishSchemaAsync<BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, unknown> | OptionalSchemaAsync<BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, unknown>;
|
|
14805
|
-
/**
|
|
14806
|
-
* Object entries interface.
|
|
14807
|
-
*/
|
|
14808
|
-
interface ObjectEntries {
|
|
14809
|
-
[key: string]: BaseSchema<unknown, unknown, BaseIssue<unknown>> | SchemaWithFallback<BaseSchema<unknown, unknown, BaseIssue<unknown>>, unknown> | OptionalEntrySchema;
|
|
14426
|
+
declare const DeploymentViewRulePredicate = "DeploymentViewRulePredicate";
|
|
14427
|
+
interface DeploymentViewRuleStyle extends AstNode {
|
|
14428
|
+
readonly $container: DeploymentViewBody;
|
|
14429
|
+
readonly $type: 'DeploymentViewRuleStyle';
|
|
14430
|
+
props: Array<NotationProperty | StyleProperty>;
|
|
14431
|
+
targets: FqnExpressions;
|
|
14810
14432
|
}
|
|
14811
|
-
|
|
14812
|
-
|
|
14813
|
-
|
|
14814
|
-
|
|
14815
|
-
|
|
14433
|
+
declare const DeploymentViewRuleStyle = "DeploymentViewRuleStyle";
|
|
14434
|
+
interface DirectedRelationExpr extends AstNode {
|
|
14435
|
+
readonly $container: Expressions | RelationExprWhere | RelationExprWith;
|
|
14436
|
+
readonly $type: 'DirectedRelationExpr';
|
|
14437
|
+
source: OutgoingRelationExpr;
|
|
14438
|
+
target: FqnExpr;
|
|
14816
14439
|
}
|
|
14817
|
-
|
|
14818
|
-
|
|
14819
|
-
|
|
14820
|
-
type
|
|
14821
|
-
|
|
14822
|
-
|
|
14823
|
-
/**
|
|
14824
|
-
* Infer entries output type.
|
|
14825
|
-
*/
|
|
14826
|
-
type InferEntriesOutput<TEntries extends ObjectEntries | ObjectEntriesAsync> = {
|
|
14827
|
-
-readonly [TKey in keyof TEntries]: InferOutput<TEntries[TKey]>;
|
|
14828
|
-
};
|
|
14829
|
-
/**
|
|
14830
|
-
* Optional input keys type.
|
|
14831
|
-
*/
|
|
14832
|
-
type OptionalInputKeys<TEntries extends ObjectEntries | ObjectEntriesAsync> = {
|
|
14833
|
-
[TKey in keyof TEntries]: TEntries[TKey] extends OptionalEntrySchema | OptionalEntrySchemaAsync ? TKey : never;
|
|
14834
|
-
}[keyof TEntries];
|
|
14835
|
-
/**
|
|
14836
|
-
* Optional output keys type.
|
|
14837
|
-
*/
|
|
14838
|
-
type OptionalOutputKeys<TEntries extends ObjectEntries | ObjectEntriesAsync> = {
|
|
14839
|
-
[TKey in keyof TEntries]: TEntries[TKey] extends OptionalEntrySchema | OptionalEntrySchemaAsync ? undefined extends TEntries[TKey]['default'] ? TKey : never : never;
|
|
14840
|
-
}[keyof TEntries];
|
|
14841
|
-
/**
|
|
14842
|
-
* Input with question marks type.
|
|
14843
|
-
*/
|
|
14844
|
-
type InputWithQuestionMarks<TEntries extends ObjectEntries | ObjectEntriesAsync, TObject extends InferEntriesInput<TEntries>> = MarkOptional<TObject, OptionalInputKeys<TEntries>>;
|
|
14845
|
-
/**
|
|
14846
|
-
* Output with question marks type.
|
|
14847
|
-
*/
|
|
14848
|
-
type OutputWithQuestionMarks<TEntries extends ObjectEntries | ObjectEntriesAsync, TObject extends InferEntriesOutput<TEntries>> = MarkOptional<TObject, OptionalOutputKeys<TEntries>>;
|
|
14849
|
-
/**
|
|
14850
|
-
* Readonly output keys type.
|
|
14851
|
-
*/
|
|
14852
|
-
type ReadonlyOutputKeys<TEntries extends ObjectEntries | ObjectEntriesAsync> = {
|
|
14853
|
-
[TKey in keyof TEntries]: TEntries[TKey] extends SchemaWithPipe<infer TPipe> | SchemaWithPipeAsync<infer TPipe> ? ReadonlyAction<any> extends TPipe[number] ? TKey : never : never;
|
|
14854
|
-
}[keyof TEntries];
|
|
14855
|
-
/**
|
|
14856
|
-
* Output with readonly type.
|
|
14857
|
-
*/
|
|
14858
|
-
type OutputWithReadonly<TEntries extends ObjectEntries | ObjectEntriesAsync, TObject extends OutputWithQuestionMarks<TEntries, InferEntriesOutput<TEntries>>> = Readonly<TObject> & Pick<TObject, Exclude<keyof TObject, ReadonlyOutputKeys<TEntries>>>;
|
|
14859
|
-
/**
|
|
14860
|
-
* Infer object input type.
|
|
14861
|
-
*/
|
|
14862
|
-
type InferObjectInput<TEntries extends ObjectEntries | ObjectEntriesAsync> = Prettify<InputWithQuestionMarks<TEntries, InferEntriesInput<TEntries>>>;
|
|
14863
|
-
/**
|
|
14864
|
-
* Infer object output type.
|
|
14865
|
-
*/
|
|
14866
|
-
type InferObjectOutput<TEntries extends ObjectEntries | ObjectEntriesAsync> = Prettify<OutputWithReadonly<TEntries, OutputWithQuestionMarks<TEntries, InferEntriesOutput<TEntries>>>>;
|
|
14867
|
-
/**
|
|
14868
|
-
* Infer object issue type.
|
|
14869
|
-
*/
|
|
14870
|
-
type InferObjectIssue<TEntries extends ObjectEntries | ObjectEntriesAsync> = InferIssue<TEntries[keyof TEntries]>;
|
|
14871
|
-
|
|
14872
|
-
/**
|
|
14873
|
-
* Array path item interface.
|
|
14874
|
-
*/
|
|
14875
|
-
interface ArrayPathItem {
|
|
14876
|
-
/**
|
|
14877
|
-
* The path item type.
|
|
14878
|
-
*/
|
|
14879
|
-
readonly type: 'array';
|
|
14880
|
-
/**
|
|
14881
|
-
* The path item origin.
|
|
14882
|
-
*/
|
|
14883
|
-
readonly origin: 'value';
|
|
14884
|
-
/**
|
|
14885
|
-
* The path item input.
|
|
14886
|
-
*/
|
|
14887
|
-
readonly input: MaybeReadonly<unknown[]>;
|
|
14888
|
-
/**
|
|
14889
|
-
* The path item key.
|
|
14890
|
-
*/
|
|
14891
|
-
readonly key: number;
|
|
14892
|
-
/**
|
|
14893
|
-
* The path item value.
|
|
14894
|
-
*/
|
|
14895
|
-
readonly value: unknown;
|
|
14440
|
+
declare const DirectedRelationExpr = "DirectedRelationExpr";
|
|
14441
|
+
interface DynamicView extends AstNode {
|
|
14442
|
+
readonly $container: ModelViews;
|
|
14443
|
+
readonly $type: 'DynamicView';
|
|
14444
|
+
body?: DynamicViewBody;
|
|
14445
|
+
name: Id;
|
|
14896
14446
|
}
|
|
14897
|
-
|
|
14898
|
-
|
|
14899
|
-
|
|
14900
|
-
|
|
14901
|
-
|
|
14902
|
-
|
|
14903
|
-
|
|
14904
|
-
|
|
14905
|
-
/**
|
|
14906
|
-
* The path item origin.
|
|
14907
|
-
*/
|
|
14908
|
-
readonly origin: 'key' | 'value';
|
|
14909
|
-
/**
|
|
14910
|
-
* The path item input.
|
|
14911
|
-
*/
|
|
14912
|
-
readonly input: Map<unknown, unknown>;
|
|
14913
|
-
/**
|
|
14914
|
-
* The path item key.
|
|
14915
|
-
*/
|
|
14916
|
-
readonly key: unknown;
|
|
14917
|
-
/**
|
|
14918
|
-
* The path item value.
|
|
14919
|
-
*/
|
|
14920
|
-
readonly value: unknown;
|
|
14447
|
+
declare const DynamicView = "DynamicView";
|
|
14448
|
+
interface DynamicViewBody extends AstNode {
|
|
14449
|
+
readonly $container: DynamicView;
|
|
14450
|
+
readonly $type: 'DynamicViewBody';
|
|
14451
|
+
props: Array<ViewProperty>;
|
|
14452
|
+
rules: Array<DynamicViewRule>;
|
|
14453
|
+
steps: Array<DynamicViewParallelSteps | DynamicViewStep>;
|
|
14454
|
+
tags?: Tags;
|
|
14921
14455
|
}
|
|
14922
|
-
|
|
14923
|
-
|
|
14924
|
-
|
|
14925
|
-
|
|
14926
|
-
|
|
14927
|
-
* The path item type.
|
|
14928
|
-
*/
|
|
14929
|
-
readonly type: 'object';
|
|
14930
|
-
/**
|
|
14931
|
-
* The path item origin.
|
|
14932
|
-
*/
|
|
14933
|
-
readonly origin: 'key' | 'value';
|
|
14934
|
-
/**
|
|
14935
|
-
* The path item input.
|
|
14936
|
-
*/
|
|
14937
|
-
readonly input: Record<string, unknown>;
|
|
14938
|
-
/**
|
|
14939
|
-
* The path item key.
|
|
14940
|
-
*/
|
|
14941
|
-
readonly key: string;
|
|
14942
|
-
/**
|
|
14943
|
-
* The path item value.
|
|
14944
|
-
*/
|
|
14945
|
-
readonly value: unknown;
|
|
14456
|
+
declare const DynamicViewBody = "DynamicViewBody";
|
|
14457
|
+
interface DynamicViewGlobalPredicateRef extends AstNode {
|
|
14458
|
+
readonly $container: DynamicViewBody;
|
|
14459
|
+
readonly $type: 'DynamicViewGlobalPredicateRef';
|
|
14460
|
+
predicate: Reference<GlobalDynamicPredicateGroup>;
|
|
14946
14461
|
}
|
|
14947
|
-
|
|
14948
|
-
|
|
14949
|
-
|
|
14950
|
-
|
|
14951
|
-
|
|
14952
|
-
* The path item type.
|
|
14953
|
-
*/
|
|
14954
|
-
readonly type: 'set';
|
|
14955
|
-
/**
|
|
14956
|
-
* The path item origin.
|
|
14957
|
-
*/
|
|
14958
|
-
readonly origin: 'value';
|
|
14959
|
-
/**
|
|
14960
|
-
* The path item input.
|
|
14961
|
-
*/
|
|
14962
|
-
readonly input: Set<unknown>;
|
|
14963
|
-
/**
|
|
14964
|
-
* The path item key.
|
|
14965
|
-
*/
|
|
14966
|
-
readonly key: null;
|
|
14967
|
-
/**
|
|
14968
|
-
* The path item key.
|
|
14969
|
-
*/
|
|
14970
|
-
readonly value: unknown;
|
|
14462
|
+
declare const DynamicViewGlobalPredicateRef = "DynamicViewGlobalPredicateRef";
|
|
14463
|
+
interface DynamicViewIncludePredicate extends AstNode {
|
|
14464
|
+
readonly $container: DynamicViewBody | GlobalDynamicPredicateGroup;
|
|
14465
|
+
readonly $type: 'DynamicViewIncludePredicate';
|
|
14466
|
+
exprs: Expressions;
|
|
14971
14467
|
}
|
|
14972
|
-
|
|
14973
|
-
|
|
14974
|
-
|
|
14975
|
-
|
|
14976
|
-
|
|
14977
|
-
* The path item type.
|
|
14978
|
-
*/
|
|
14979
|
-
readonly type: 'unknown';
|
|
14980
|
-
/**
|
|
14981
|
-
* The path item origin.
|
|
14982
|
-
*/
|
|
14983
|
-
readonly origin: 'key' | 'value';
|
|
14984
|
-
/**
|
|
14985
|
-
* The path item input.
|
|
14986
|
-
*/
|
|
14987
|
-
readonly input: unknown;
|
|
14988
|
-
/**
|
|
14989
|
-
* The path item key.
|
|
14990
|
-
*/
|
|
14991
|
-
readonly key: unknown;
|
|
14992
|
-
/**
|
|
14993
|
-
* The path item value.
|
|
14994
|
-
*/
|
|
14995
|
-
readonly value: unknown;
|
|
14468
|
+
declare const DynamicViewIncludePredicate = "DynamicViewIncludePredicate";
|
|
14469
|
+
interface DynamicViewParallelSteps extends AstNode {
|
|
14470
|
+
readonly $container: DynamicViewBody;
|
|
14471
|
+
readonly $type: 'DynamicViewParallelSteps';
|
|
14472
|
+
steps: Array<DynamicViewStep>;
|
|
14996
14473
|
}
|
|
14997
|
-
|
|
14998
|
-
|
|
14999
|
-
|
|
15000
|
-
type
|
|
15001
|
-
|
|
15002
|
-
* Base issue interface.
|
|
15003
|
-
*/
|
|
15004
|
-
interface BaseIssue<TInput> extends Config<BaseIssue<TInput>> {
|
|
15005
|
-
/**
|
|
15006
|
-
* The issue kind.
|
|
15007
|
-
*/
|
|
15008
|
-
readonly kind: 'schema' | 'validation' | 'transformation';
|
|
15009
|
-
/**
|
|
15010
|
-
* The issue type.
|
|
15011
|
-
*/
|
|
15012
|
-
readonly type: string;
|
|
15013
|
-
/**
|
|
15014
|
-
* The raw input data.
|
|
15015
|
-
*/
|
|
15016
|
-
readonly input: TInput;
|
|
15017
|
-
/**
|
|
15018
|
-
* The expected property.
|
|
15019
|
-
*/
|
|
15020
|
-
readonly expected: string | null;
|
|
15021
|
-
/**
|
|
15022
|
-
* The received property.
|
|
15023
|
-
*/
|
|
15024
|
-
readonly received: string;
|
|
15025
|
-
/**
|
|
15026
|
-
* The error message.
|
|
15027
|
-
*/
|
|
15028
|
-
readonly message: string;
|
|
15029
|
-
/**
|
|
15030
|
-
* The input requirement.
|
|
15031
|
-
*/
|
|
15032
|
-
readonly requirement?: unknown | undefined;
|
|
15033
|
-
/**
|
|
15034
|
-
* The issue path.
|
|
15035
|
-
*/
|
|
15036
|
-
readonly path?: [IssuePathItem, ...IssuePathItem[]] | undefined;
|
|
15037
|
-
/**
|
|
15038
|
-
* The sub issues.
|
|
15039
|
-
*/
|
|
15040
|
-
readonly issues?: [BaseIssue<TInput>, ...BaseIssue<TInput>[]] | undefined;
|
|
15041
|
-
}
|
|
15042
|
-
|
|
15043
|
-
/**
|
|
15044
|
-
* Config interface.
|
|
15045
|
-
*/
|
|
15046
|
-
interface Config<TIssue extends BaseIssue<unknown>> {
|
|
15047
|
-
/**
|
|
15048
|
-
* The selected language.
|
|
15049
|
-
*/
|
|
15050
|
-
readonly lang?: string | undefined;
|
|
15051
|
-
/**
|
|
15052
|
-
* The error message.
|
|
15053
|
-
*/
|
|
15054
|
-
readonly message?: ErrorMessage<TIssue> | undefined;
|
|
15055
|
-
/**
|
|
15056
|
-
* Whether it should be aborted early.
|
|
15057
|
-
*/
|
|
15058
|
-
readonly abortEarly?: boolean | undefined;
|
|
15059
|
-
/**
|
|
15060
|
-
* Whether a pipe should be aborted early.
|
|
15061
|
-
*/
|
|
15062
|
-
readonly abortPipeEarly?: boolean | undefined;
|
|
14474
|
+
declare const DynamicViewParallelSteps = "DynamicViewParallelSteps";
|
|
14475
|
+
interface DynamicViewRef extends AstNode {
|
|
14476
|
+
readonly $container: RelationNavigateToProperty;
|
|
14477
|
+
readonly $type: 'DynamicViewRef';
|
|
14478
|
+
view: Reference<DynamicView>;
|
|
15063
14479
|
}
|
|
15064
|
-
|
|
15065
|
-
|
|
15066
|
-
|
|
15067
|
-
|
|
15068
|
-
|
|
15069
|
-
|
|
15070
|
-
|
|
15071
|
-
|
|
15072
|
-
|
|
15073
|
-
|
|
15074
|
-
|
|
15075
|
-
*/
|
|
15076
|
-
type PipeItem<TInput, TOutput, TIssue extends BaseIssue<unknown>> = BaseSchema<TInput, TOutput, TIssue> | PipeAction<TInput, TOutput, TIssue>;
|
|
15077
|
-
/**
|
|
15078
|
-
* Pipe item async type.
|
|
15079
|
-
*/
|
|
15080
|
-
type PipeItemAsync<TInput, TOutput, TIssue extends BaseIssue<unknown>> = BaseSchemaAsync<TInput, TOutput, TIssue> | PipeActionAsync<TInput, TOutput, TIssue>;
|
|
15081
|
-
|
|
15082
|
-
/**
|
|
15083
|
-
* Array issue interface.
|
|
15084
|
-
*/
|
|
15085
|
-
interface ArrayIssue extends BaseIssue<unknown> {
|
|
15086
|
-
/**
|
|
15087
|
-
* The issue kind.
|
|
15088
|
-
*/
|
|
15089
|
-
readonly kind: 'schema';
|
|
15090
|
-
/**
|
|
15091
|
-
* The issue type.
|
|
15092
|
-
*/
|
|
15093
|
-
readonly type: 'array';
|
|
15094
|
-
/**
|
|
15095
|
-
* The expected property.
|
|
15096
|
-
*/
|
|
15097
|
-
readonly expected: 'Array';
|
|
14480
|
+
declare const DynamicViewRef = "DynamicViewRef";
|
|
14481
|
+
interface DynamicViewStep extends AstNode {
|
|
14482
|
+
readonly $container: DynamicViewBody | DynamicViewParallelSteps;
|
|
14483
|
+
readonly $type: 'DynamicViewStep';
|
|
14484
|
+
custom?: CustomRelationProperties;
|
|
14485
|
+
dotKind?: RelationKindDotRef;
|
|
14486
|
+
isBackward: boolean;
|
|
14487
|
+
kind?: Reference<RelationshipKind>;
|
|
14488
|
+
source: ElementRef;
|
|
14489
|
+
target: ElementRef;
|
|
14490
|
+
title?: string;
|
|
15098
14491
|
}
|
|
15099
|
-
|
|
15100
|
-
|
|
15101
|
-
|
|
15102
|
-
|
|
15103
|
-
|
|
15104
|
-
|
|
15105
|
-
|
|
15106
|
-
|
|
15107
|
-
readonly type: 'array';
|
|
15108
|
-
/**
|
|
15109
|
-
* The schema reference.
|
|
15110
|
-
*/
|
|
15111
|
-
readonly reference: typeof array;
|
|
15112
|
-
/**
|
|
15113
|
-
* The expected property.
|
|
15114
|
-
*/
|
|
15115
|
-
readonly expects: 'Array';
|
|
15116
|
-
/**
|
|
15117
|
-
* The array item schema.
|
|
15118
|
-
*/
|
|
15119
|
-
readonly item: TItem;
|
|
15120
|
-
/**
|
|
15121
|
-
* The error message.
|
|
15122
|
-
*/
|
|
15123
|
-
readonly message: TMessage;
|
|
14492
|
+
declare const DynamicViewStep = "DynamicViewStep";
|
|
14493
|
+
interface Element extends AstNode {
|
|
14494
|
+
readonly $container: ElementBody | ExtendElementBody | Model;
|
|
14495
|
+
readonly $type: 'Element';
|
|
14496
|
+
body?: ElementBody;
|
|
14497
|
+
kind: Reference<ElementKind>;
|
|
14498
|
+
name: Id;
|
|
14499
|
+
props: Array<string>;
|
|
15124
14500
|
}
|
|
15125
|
-
|
|
15126
|
-
|
|
15127
|
-
|
|
15128
|
-
|
|
15129
|
-
|
|
15130
|
-
|
|
15131
|
-
|
|
15132
|
-
declare function array<const TItem extends BaseSchema<unknown, unknown, BaseIssue<unknown>>>(item: TItem): ArraySchema<TItem, undefined>;
|
|
15133
|
-
/**
|
|
15134
|
-
* Creates an array schema.
|
|
15135
|
-
*
|
|
15136
|
-
* @param item The item schema.
|
|
15137
|
-
* @param message The error message.
|
|
15138
|
-
*
|
|
15139
|
-
* @returns An array schema.
|
|
15140
|
-
*/
|
|
15141
|
-
declare function array<const TItem extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, const TMessage extends ErrorMessage<ArrayIssue> | undefined>(item: TItem, message: TMessage): ArraySchema<TItem, TMessage>;
|
|
15142
|
-
|
|
15143
|
-
/**
|
|
15144
|
-
* Exact optional schema interface.
|
|
15145
|
-
*/
|
|
15146
|
-
interface ExactOptionalSchema<TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, TDefault extends Default<TWrapped, never>> extends BaseSchema<InferInput<TWrapped>, InferOutput<TWrapped>, InferIssue<TWrapped>> {
|
|
15147
|
-
/**
|
|
15148
|
-
* The schema type.
|
|
15149
|
-
*/
|
|
15150
|
-
readonly type: 'exact_optional';
|
|
15151
|
-
/**
|
|
15152
|
-
* The schema reference.
|
|
15153
|
-
*/
|
|
15154
|
-
readonly reference: typeof exactOptional;
|
|
15155
|
-
/**
|
|
15156
|
-
* The expected property.
|
|
15157
|
-
*/
|
|
15158
|
-
readonly expects: TWrapped['expects'];
|
|
15159
|
-
/**
|
|
15160
|
-
* The wrapped schema.
|
|
15161
|
-
*/
|
|
15162
|
-
readonly wrapped: TWrapped;
|
|
15163
|
-
/**
|
|
15164
|
-
* The default value.
|
|
15165
|
-
*/
|
|
15166
|
-
readonly default: TDefault;
|
|
14501
|
+
declare const Element = "Element";
|
|
14502
|
+
interface ElementBody extends AstNode {
|
|
14503
|
+
readonly $container: Element;
|
|
14504
|
+
readonly $type: 'ElementBody';
|
|
14505
|
+
elements: Array<Element | Relation>;
|
|
14506
|
+
props: Array<ElementProperty>;
|
|
14507
|
+
tags?: Tags;
|
|
15167
14508
|
}
|
|
15168
|
-
|
|
15169
|
-
|
|
15170
|
-
|
|
15171
|
-
|
|
15172
|
-
|
|
15173
|
-
* @returns An exact optional schema.
|
|
15174
|
-
*/
|
|
15175
|
-
declare function exactOptional<const TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>>>(wrapped: TWrapped): ExactOptionalSchema<TWrapped, undefined>;
|
|
15176
|
-
/**
|
|
15177
|
-
* Creates an exact optional schema.
|
|
15178
|
-
*
|
|
15179
|
-
* @param wrapped The wrapped schema.
|
|
15180
|
-
* @param default_ The default value.
|
|
15181
|
-
*
|
|
15182
|
-
* @returns An exact optional schema.
|
|
15183
|
-
*/
|
|
15184
|
-
declare function exactOptional<const TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, const TDefault extends Default<TWrapped, never>>(wrapped: TWrapped, default_: TDefault): ExactOptionalSchema<TWrapped, TDefault>;
|
|
15185
|
-
|
|
15186
|
-
/**
|
|
15187
|
-
* Exact optional schema async interface.
|
|
15188
|
-
*/
|
|
15189
|
-
interface ExactOptionalSchemaAsync<TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, TDefault extends DefaultAsync<TWrapped, never>> extends BaseSchemaAsync<InferInput<TWrapped>, InferOutput<TWrapped>, InferIssue<TWrapped>> {
|
|
15190
|
-
/**
|
|
15191
|
-
* The schema type.
|
|
15192
|
-
*/
|
|
15193
|
-
readonly type: 'exact_optional';
|
|
15194
|
-
/**
|
|
15195
|
-
* The schema reference.
|
|
15196
|
-
*/
|
|
15197
|
-
readonly reference: typeof exactOptional | typeof exactOptionalAsync;
|
|
15198
|
-
/**
|
|
15199
|
-
* The expected property.
|
|
15200
|
-
*/
|
|
15201
|
-
readonly expects: TWrapped['expects'];
|
|
15202
|
-
/**
|
|
15203
|
-
* The wrapped schema.
|
|
15204
|
-
*/
|
|
15205
|
-
readonly wrapped: TWrapped;
|
|
15206
|
-
/**
|
|
15207
|
-
* The default value.
|
|
15208
|
-
*/
|
|
15209
|
-
readonly default: TDefault;
|
|
14509
|
+
declare const ElementBody = "ElementBody";
|
|
14510
|
+
interface ElementKind extends AstNode {
|
|
14511
|
+
readonly $container: SpecificationElementKind;
|
|
14512
|
+
readonly $type: 'ElementKind';
|
|
14513
|
+
name: Id;
|
|
15210
14514
|
}
|
|
15211
|
-
|
|
15212
|
-
|
|
15213
|
-
|
|
15214
|
-
|
|
15215
|
-
|
|
15216
|
-
|
|
15217
|
-
*/
|
|
15218
|
-
declare function exactOptionalAsync<const TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>>(wrapped: TWrapped): ExactOptionalSchemaAsync<TWrapped, undefined>;
|
|
15219
|
-
/**
|
|
15220
|
-
* Creates an exact optional schema.
|
|
15221
|
-
*
|
|
15222
|
-
* @param wrapped The wrapped schema.
|
|
15223
|
-
* @param default_ The default value.
|
|
15224
|
-
*
|
|
15225
|
-
* @returns An exact optional schema.
|
|
15226
|
-
*/
|
|
15227
|
-
declare function exactOptionalAsync<const TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, const TDefault extends DefaultAsync<TWrapped, never>>(wrapped: TWrapped, default_: TDefault): ExactOptionalSchemaAsync<TWrapped, TDefault>;
|
|
15228
|
-
|
|
15229
|
-
/**
|
|
15230
|
-
* Infer nullish output type.
|
|
15231
|
-
*/
|
|
15232
|
-
type InferNullishOutput<TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, TDefault extends DefaultAsync<TWrapped, null | undefined>> = undefined extends TDefault ? InferOutput<TWrapped> | null | undefined : InferOutput<TWrapped> | Extract<DefaultValue<TDefault>, null | undefined>;
|
|
15233
|
-
|
|
15234
|
-
/**
|
|
15235
|
-
* Nullish schema interface.
|
|
15236
|
-
*/
|
|
15237
|
-
interface NullishSchema<TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, TDefault extends Default<TWrapped, null | undefined>> extends BaseSchema<InferInput<TWrapped> | null | undefined, InferNullishOutput<TWrapped, TDefault>, InferIssue<TWrapped>> {
|
|
15238
|
-
/**
|
|
15239
|
-
* The schema type.
|
|
15240
|
-
*/
|
|
15241
|
-
readonly type: 'nullish';
|
|
15242
|
-
/**
|
|
15243
|
-
* The schema reference.
|
|
15244
|
-
*/
|
|
15245
|
-
readonly reference: typeof nullish;
|
|
15246
|
-
/**
|
|
15247
|
-
* The expected property.
|
|
15248
|
-
*/
|
|
15249
|
-
readonly expects: `(${TWrapped['expects']} | null | undefined)`;
|
|
15250
|
-
/**
|
|
15251
|
-
* The wrapped schema.
|
|
15252
|
-
*/
|
|
15253
|
-
readonly wrapped: TWrapped;
|
|
15254
|
-
/**
|
|
15255
|
-
* The default value.
|
|
15256
|
-
*/
|
|
15257
|
-
readonly default: TDefault;
|
|
14515
|
+
declare const ElementKind = "ElementKind";
|
|
14516
|
+
interface ElementKindExpression extends AstNode {
|
|
14517
|
+
readonly $container: DirectedRelationExpr | Expressions | FqnExprWhere | FqnExprWith | FqnExpressions | IncomingRelationExpr | OutgoingRelationExpr;
|
|
14518
|
+
readonly $type: 'ElementKindExpression';
|
|
14519
|
+
isEqual: boolean;
|
|
14520
|
+
kind: Reference<ElementKind>;
|
|
15258
14521
|
}
|
|
15259
|
-
|
|
15260
|
-
|
|
15261
|
-
|
|
15262
|
-
|
|
15263
|
-
|
|
15264
|
-
* @returns A nullish schema.
|
|
15265
|
-
*/
|
|
15266
|
-
declare function nullish<const TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>>>(wrapped: TWrapped): NullishSchema<TWrapped, undefined>;
|
|
15267
|
-
/**
|
|
15268
|
-
* Creates a nullish schema.
|
|
15269
|
-
*
|
|
15270
|
-
* @param wrapped The wrapped schema.
|
|
15271
|
-
* @param default_ The default value.
|
|
15272
|
-
*
|
|
15273
|
-
* @returns A nullish schema.
|
|
15274
|
-
*/
|
|
15275
|
-
declare function nullish<const TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, const TDefault extends Default<TWrapped, null | undefined>>(wrapped: TWrapped, default_: TDefault): NullishSchema<TWrapped, TDefault>;
|
|
15276
|
-
|
|
15277
|
-
/**
|
|
15278
|
-
* Nullish schema async interface.
|
|
15279
|
-
*/
|
|
15280
|
-
interface NullishSchemaAsync<TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, TDefault extends DefaultAsync<TWrapped, null | undefined>> extends BaseSchemaAsync<InferInput<TWrapped> | null | undefined, InferNullishOutput<TWrapped, TDefault>, InferIssue<TWrapped>> {
|
|
15281
|
-
/**
|
|
15282
|
-
* The schema type.
|
|
15283
|
-
*/
|
|
15284
|
-
readonly type: 'nullish';
|
|
15285
|
-
/**
|
|
15286
|
-
* The schema reference.
|
|
15287
|
-
*/
|
|
15288
|
-
readonly reference: typeof nullish | typeof nullishAsync;
|
|
15289
|
-
/**
|
|
15290
|
-
* The expected property.
|
|
15291
|
-
*/
|
|
15292
|
-
readonly expects: `(${TWrapped['expects']} | null | undefined)`;
|
|
15293
|
-
/**
|
|
15294
|
-
* The wrapped schema.
|
|
15295
|
-
*/
|
|
15296
|
-
readonly wrapped: TWrapped;
|
|
15297
|
-
/**
|
|
15298
|
-
* The default value.
|
|
15299
|
-
*/
|
|
15300
|
-
readonly default: TDefault;
|
|
14522
|
+
declare const ElementKindExpression = "ElementKindExpression";
|
|
14523
|
+
interface ElementRef extends AstNode {
|
|
14524
|
+
readonly $container: DeployedInstance | DynamicViewStep | ElementView;
|
|
14525
|
+
readonly $type: 'ElementRef';
|
|
14526
|
+
modelElement: FqnRef;
|
|
15301
14527
|
}
|
|
15302
|
-
|
|
15303
|
-
|
|
15304
|
-
|
|
15305
|
-
|
|
15306
|
-
|
|
15307
|
-
|
|
15308
|
-
*/
|
|
15309
|
-
declare function nullishAsync<const TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>>(wrapped: TWrapped): NullishSchemaAsync<TWrapped, undefined>;
|
|
15310
|
-
/**
|
|
15311
|
-
* Creates a nullish schema.
|
|
15312
|
-
*
|
|
15313
|
-
* @param wrapped The wrapped schema.
|
|
15314
|
-
* @param default_ The default value.
|
|
15315
|
-
*
|
|
15316
|
-
* @returns A nullish schema.
|
|
15317
|
-
*/
|
|
15318
|
-
declare function nullishAsync<const TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, const TDefault extends DefaultAsync<TWrapped, null | undefined>>(wrapped: TWrapped, default_: TDefault): NullishSchemaAsync<TWrapped, TDefault>;
|
|
15319
|
-
|
|
15320
|
-
/**
|
|
15321
|
-
* Object issue interface.
|
|
15322
|
-
*/
|
|
15323
|
-
interface ObjectIssue extends BaseIssue<unknown> {
|
|
15324
|
-
/**
|
|
15325
|
-
* The issue kind.
|
|
15326
|
-
*/
|
|
15327
|
-
readonly kind: 'schema';
|
|
15328
|
-
/**
|
|
15329
|
-
* The issue type.
|
|
15330
|
-
*/
|
|
15331
|
-
readonly type: 'object';
|
|
15332
|
-
/**
|
|
15333
|
-
* The expected property.
|
|
15334
|
-
*/
|
|
15335
|
-
readonly expected: 'Object' | `"${string}"`;
|
|
14528
|
+
declare const ElementRef = "ElementRef";
|
|
14529
|
+
interface ElementStringProperty extends AstNode {
|
|
14530
|
+
readonly $container: CustomElementProperties | DeployedInstanceBody | DeploymentNodeBody | ElementBody;
|
|
14531
|
+
readonly $type: 'ElementStringProperty';
|
|
14532
|
+
key: 'description' | 'technology' | 'title';
|
|
14533
|
+
value: MarkdownOrString;
|
|
15336
14534
|
}
|
|
15337
|
-
|
|
15338
|
-
|
|
15339
|
-
|
|
15340
|
-
|
|
15341
|
-
|
|
15342
|
-
|
|
15343
|
-
* The schema type.
|
|
15344
|
-
*/
|
|
15345
|
-
readonly type: 'object';
|
|
15346
|
-
/**
|
|
15347
|
-
* The schema reference.
|
|
15348
|
-
*/
|
|
15349
|
-
readonly reference: typeof object;
|
|
15350
|
-
/**
|
|
15351
|
-
* The expected property.
|
|
15352
|
-
*/
|
|
15353
|
-
readonly expects: 'Object';
|
|
15354
|
-
/**
|
|
15355
|
-
* The entries schema.
|
|
15356
|
-
*/
|
|
15357
|
-
readonly entries: TEntries;
|
|
15358
|
-
/**
|
|
15359
|
-
* The error message.
|
|
15360
|
-
*/
|
|
15361
|
-
readonly message: TMessage;
|
|
14535
|
+
declare const ElementStringProperty = "ElementStringProperty";
|
|
14536
|
+
interface ElementStyleProperty extends AstNode {
|
|
14537
|
+
readonly $container: DeployedInstanceBody | DeploymentNodeBody | ElementBody | SpecificationDeploymentNodeKind | SpecificationElementKind;
|
|
14538
|
+
readonly $type: 'ElementStyleProperty';
|
|
14539
|
+
key: 'style';
|
|
14540
|
+
props: Array<StyleProperty>;
|
|
15362
14541
|
}
|
|
15363
|
-
|
|
15364
|
-
|
|
15365
|
-
|
|
15366
|
-
|
|
15367
|
-
|
|
15368
|
-
|
|
15369
|
-
* validate unknown entries, use `objectWithRest`.
|
|
15370
|
-
*
|
|
15371
|
-
* @param entries The entries schema.
|
|
15372
|
-
*
|
|
15373
|
-
* @returns An object schema.
|
|
15374
|
-
*/
|
|
15375
|
-
declare function object<const TEntries extends ObjectEntries>(entries: TEntries): ObjectSchema<TEntries, undefined>;
|
|
15376
|
-
/**
|
|
15377
|
-
* Creates an object schema.
|
|
15378
|
-
*
|
|
15379
|
-
* Hint: This schema removes unknown entries. The output will only include the
|
|
15380
|
-
* entries you specify. To include unknown entries, use `looseObject`. To
|
|
15381
|
-
* return an issue for unknown entries, use `strictObject`. To include and
|
|
15382
|
-
* validate unknown entries, use `objectWithRest`.
|
|
15383
|
-
*
|
|
15384
|
-
* @param entries The entries schema.
|
|
15385
|
-
* @param message The error message.
|
|
15386
|
-
*
|
|
15387
|
-
* @returns An object schema.
|
|
15388
|
-
*/
|
|
15389
|
-
declare function object<const TEntries extends ObjectEntries, const TMessage extends ErrorMessage<ObjectIssue> | undefined>(entries: TEntries, message: TMessage): ObjectSchema<TEntries, TMessage>;
|
|
15390
|
-
|
|
15391
|
-
/**
|
|
15392
|
-
* Infer optional output type.
|
|
15393
|
-
*/
|
|
15394
|
-
type InferOptionalOutput<TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, TDefault extends DefaultAsync<TWrapped, undefined>> = undefined extends TDefault ? InferOutput<TWrapped> | undefined : InferOutput<TWrapped> | Extract<DefaultValue<TDefault>, undefined>;
|
|
15395
|
-
|
|
15396
|
-
/**
|
|
15397
|
-
* Optional schema interface.
|
|
15398
|
-
*/
|
|
15399
|
-
interface OptionalSchema<TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, TDefault extends Default<TWrapped, undefined>> extends BaseSchema<InferInput<TWrapped> | undefined, InferOptionalOutput<TWrapped, TDefault>, InferIssue<TWrapped>> {
|
|
15400
|
-
/**
|
|
15401
|
-
* The schema type.
|
|
15402
|
-
*/
|
|
15403
|
-
readonly type: 'optional';
|
|
15404
|
-
/**
|
|
15405
|
-
* The schema reference.
|
|
15406
|
-
*/
|
|
15407
|
-
readonly reference: typeof optional;
|
|
15408
|
-
/**
|
|
15409
|
-
* The expected property.
|
|
15410
|
-
*/
|
|
15411
|
-
readonly expects: `(${TWrapped['expects']} | undefined)`;
|
|
15412
|
-
/**
|
|
15413
|
-
* The wrapped schema.
|
|
15414
|
-
*/
|
|
15415
|
-
readonly wrapped: TWrapped;
|
|
15416
|
-
/**
|
|
15417
|
-
* The default value.
|
|
15418
|
-
*/
|
|
15419
|
-
readonly default: TDefault;
|
|
14542
|
+
declare const ElementStyleProperty = "ElementStyleProperty";
|
|
14543
|
+
interface ElementTagExpression extends AstNode {
|
|
14544
|
+
readonly $container: DirectedRelationExpr | Expressions | FqnExprWhere | FqnExprWith | FqnExpressions | IncomingRelationExpr | OutgoingRelationExpr;
|
|
14545
|
+
readonly $type: 'ElementTagExpression';
|
|
14546
|
+
isEqual: boolean;
|
|
14547
|
+
tag: TagRef;
|
|
15420
14548
|
}
|
|
15421
|
-
|
|
15422
|
-
|
|
15423
|
-
|
|
15424
|
-
|
|
15425
|
-
|
|
15426
|
-
|
|
15427
|
-
|
|
15428
|
-
|
|
15429
|
-
/**
|
|
15430
|
-
* Creates an optional schema.
|
|
15431
|
-
*
|
|
15432
|
-
* @param wrapped The wrapped schema.
|
|
15433
|
-
* @param default_ The default value.
|
|
15434
|
-
*
|
|
15435
|
-
* @returns An optional schema.
|
|
15436
|
-
*/
|
|
15437
|
-
declare function optional<const TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, const TDefault extends Default<TWrapped, undefined>>(wrapped: TWrapped, default_: TDefault): OptionalSchema<TWrapped, TDefault>;
|
|
15438
|
-
|
|
15439
|
-
/**
|
|
15440
|
-
* Optional schema async interface.
|
|
15441
|
-
*/
|
|
15442
|
-
interface OptionalSchemaAsync<TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, TDefault extends DefaultAsync<TWrapped, undefined>> extends BaseSchemaAsync<InferInput<TWrapped> | undefined, InferOptionalOutput<TWrapped, TDefault>, InferIssue<TWrapped>> {
|
|
15443
|
-
/**
|
|
15444
|
-
* The schema type.
|
|
15445
|
-
*/
|
|
15446
|
-
readonly type: 'optional';
|
|
15447
|
-
/**
|
|
15448
|
-
* The schema reference.
|
|
15449
|
-
*/
|
|
15450
|
-
readonly reference: typeof optional | typeof optionalAsync;
|
|
15451
|
-
/**
|
|
15452
|
-
* The expected property.
|
|
15453
|
-
*/
|
|
15454
|
-
readonly expects: `(${TWrapped['expects']} | undefined)`;
|
|
15455
|
-
/**
|
|
15456
|
-
* The wrapped schema.
|
|
15457
|
-
*/
|
|
15458
|
-
readonly wrapped: TWrapped;
|
|
15459
|
-
/**
|
|
15460
|
-
* The default value.
|
|
15461
|
-
*/
|
|
15462
|
-
readonly default: TDefault;
|
|
14549
|
+
declare const ElementTagExpression = "ElementTagExpression";
|
|
14550
|
+
interface ElementView extends AstNode {
|
|
14551
|
+
readonly $container: ModelViews;
|
|
14552
|
+
readonly $type: 'ElementView';
|
|
14553
|
+
body?: ElementViewBody;
|
|
14554
|
+
extends?: ElementViewRef;
|
|
14555
|
+
name?: Id;
|
|
14556
|
+
viewOf?: ElementRef;
|
|
15463
14557
|
}
|
|
15464
|
-
|
|
15465
|
-
|
|
15466
|
-
|
|
15467
|
-
|
|
15468
|
-
|
|
15469
|
-
|
|
15470
|
-
|
|
15471
|
-
declare function optionalAsync<const TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>>(wrapped: TWrapped): OptionalSchemaAsync<TWrapped, undefined>;
|
|
15472
|
-
/**
|
|
15473
|
-
* Creates an optional schema.
|
|
15474
|
-
*
|
|
15475
|
-
* @param wrapped The wrapped schema.
|
|
15476
|
-
* @param default_ The default value.
|
|
15477
|
-
*
|
|
15478
|
-
* @returns An optional schema.
|
|
15479
|
-
*/
|
|
15480
|
-
declare function optionalAsync<const TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, const TDefault extends DefaultAsync<TWrapped, undefined>>(wrapped: TWrapped, default_: TDefault): OptionalSchemaAsync<TWrapped, TDefault>;
|
|
15481
|
-
|
|
15482
|
-
/**
|
|
15483
|
-
* String issue interface.
|
|
15484
|
-
*/
|
|
15485
|
-
interface StringIssue extends BaseIssue<unknown> {
|
|
15486
|
-
/**
|
|
15487
|
-
* The issue kind.
|
|
15488
|
-
*/
|
|
15489
|
-
readonly kind: 'schema';
|
|
15490
|
-
/**
|
|
15491
|
-
* The issue type.
|
|
15492
|
-
*/
|
|
15493
|
-
readonly type: 'string';
|
|
15494
|
-
/**
|
|
15495
|
-
* The expected property.
|
|
15496
|
-
*/
|
|
15497
|
-
readonly expected: 'string';
|
|
14558
|
+
declare const ElementView = "ElementView";
|
|
14559
|
+
interface ElementViewBody extends AstNode {
|
|
14560
|
+
readonly $container: ElementView;
|
|
14561
|
+
readonly $type: 'ElementViewBody';
|
|
14562
|
+
props: Array<ViewProperty>;
|
|
14563
|
+
rules: Array<ViewRule>;
|
|
14564
|
+
tags?: Tags;
|
|
15498
14565
|
}
|
|
15499
|
-
|
|
15500
|
-
|
|
15501
|
-
|
|
15502
|
-
|
|
15503
|
-
|
|
15504
|
-
* The schema type.
|
|
15505
|
-
*/
|
|
15506
|
-
readonly type: 'string';
|
|
15507
|
-
/**
|
|
15508
|
-
* The schema reference.
|
|
15509
|
-
*/
|
|
15510
|
-
readonly reference: typeof string;
|
|
15511
|
-
/**
|
|
15512
|
-
* The expected property.
|
|
15513
|
-
*/
|
|
15514
|
-
readonly expects: 'string';
|
|
15515
|
-
/**
|
|
15516
|
-
* The error message.
|
|
15517
|
-
*/
|
|
15518
|
-
readonly message: TMessage;
|
|
14566
|
+
declare const ElementViewBody = "ElementViewBody";
|
|
14567
|
+
interface ElementViewRef extends AstNode {
|
|
14568
|
+
readonly $container: ElementView;
|
|
14569
|
+
readonly $type: 'ElementViewRef';
|
|
14570
|
+
view: Reference<ElementView>;
|
|
15519
14571
|
}
|
|
15520
|
-
|
|
15521
|
-
|
|
15522
|
-
|
|
15523
|
-
|
|
15524
|
-
|
|
15525
|
-
|
|
15526
|
-
/**
|
|
15527
|
-
* Creates a string schema.
|
|
15528
|
-
*
|
|
15529
|
-
* @param message The error message.
|
|
15530
|
-
*
|
|
15531
|
-
* @returns A string schema.
|
|
15532
|
-
*/
|
|
15533
|
-
declare function string<const TMessage extends ErrorMessage<StringIssue> | undefined>(message: TMessage): StringSchema<TMessage>;
|
|
15534
|
-
/**
|
|
15535
|
-
* Content input type.
|
|
15536
|
-
*/
|
|
15537
|
-
type ContentInput = string | MaybeReadonly<unknown[]>;
|
|
15538
|
-
/**
|
|
15539
|
-
* Content requirement type.
|
|
15540
|
-
*/
|
|
15541
|
-
type ContentRequirement<TInput extends ContentInput> = TInput extends readonly unknown[] ? TInput[number] : TInput;
|
|
15542
|
-
/**
|
|
15543
|
-
* Length input type.
|
|
15544
|
-
*/
|
|
15545
|
-
type LengthInput = string | ArrayLike<unknown>;
|
|
15546
|
-
|
|
15547
|
-
/**
|
|
15548
|
-
* Description action interface.
|
|
15549
|
-
*/
|
|
15550
|
-
interface DescriptionAction<TInput, TDescription extends string> extends BaseMetadata<TInput> {
|
|
15551
|
-
/**
|
|
15552
|
-
* The action type.
|
|
15553
|
-
*/
|
|
15554
|
-
readonly type: 'description';
|
|
15555
|
-
/**
|
|
15556
|
-
* The action reference.
|
|
15557
|
-
*/
|
|
15558
|
-
readonly reference: typeof description;
|
|
15559
|
-
/**
|
|
15560
|
-
* The description text.
|
|
15561
|
-
*/
|
|
15562
|
-
readonly description: TDescription;
|
|
14572
|
+
declare const ElementViewRef = "ElementViewRef";
|
|
14573
|
+
interface Expressions extends AstNode {
|
|
14574
|
+
readonly $container: DeploymentViewRulePredicate | DynamicViewIncludePredicate | Expressions | ViewRulePredicate;
|
|
14575
|
+
readonly $type: 'Expressions';
|
|
14576
|
+
prev?: Expressions;
|
|
14577
|
+
value: ExpressionV2;
|
|
15563
14578
|
}
|
|
15564
|
-
|
|
15565
|
-
|
|
15566
|
-
|
|
15567
|
-
|
|
15568
|
-
|
|
15569
|
-
|
|
15570
|
-
*/
|
|
15571
|
-
declare function description<TInput, TDescription extends string>(description_: TDescription): DescriptionAction<TInput, TDescription>;
|
|
15572
|
-
|
|
15573
|
-
/**
|
|
15574
|
-
* Excludes issue interface.
|
|
15575
|
-
*/
|
|
15576
|
-
interface ExcludesIssue<TInput extends ContentInput, TRequirement extends ContentRequirement<TInput>> extends BaseIssue<TInput> {
|
|
15577
|
-
/**
|
|
15578
|
-
* The issue kind.
|
|
15579
|
-
*/
|
|
15580
|
-
readonly kind: 'validation';
|
|
15581
|
-
/**
|
|
15582
|
-
* The issue type.
|
|
15583
|
-
*/
|
|
15584
|
-
readonly type: 'excludes';
|
|
15585
|
-
/**
|
|
15586
|
-
* The expected property.
|
|
15587
|
-
*/
|
|
15588
|
-
readonly expected: string;
|
|
15589
|
-
/**
|
|
15590
|
-
* The content to be excluded.
|
|
15591
|
-
*/
|
|
15592
|
-
readonly requirement: TRequirement;
|
|
14579
|
+
declare const Expressions = "Expressions";
|
|
14580
|
+
interface ExtendDeployment extends AstNode {
|
|
14581
|
+
readonly $container: ModelDeployments;
|
|
14582
|
+
readonly $type: 'ExtendDeployment';
|
|
14583
|
+
body: ExtendDeploymentBody;
|
|
14584
|
+
deploymentNode: StrictFqnRef;
|
|
15593
14585
|
}
|
|
15594
|
-
|
|
15595
|
-
|
|
15596
|
-
|
|
15597
|
-
|
|
15598
|
-
|
|
15599
|
-
|
|
15600
|
-
|
|
15601
|
-
readonly type: 'excludes';
|
|
15602
|
-
/**
|
|
15603
|
-
* The action reference.
|
|
15604
|
-
*/
|
|
15605
|
-
readonly reference: typeof excludes;
|
|
15606
|
-
/**
|
|
15607
|
-
* The expected property.
|
|
15608
|
-
*/
|
|
15609
|
-
readonly expects: string;
|
|
15610
|
-
/**
|
|
15611
|
-
* The content to be excluded.
|
|
15612
|
-
*/
|
|
15613
|
-
readonly requirement: TRequirement;
|
|
15614
|
-
/**
|
|
15615
|
-
* The error message.
|
|
15616
|
-
*/
|
|
15617
|
-
readonly message: TMessage;
|
|
14586
|
+
declare const ExtendDeployment = "ExtendDeployment";
|
|
14587
|
+
interface ExtendDeploymentBody extends AstNode {
|
|
14588
|
+
readonly $container: ExtendDeployment;
|
|
14589
|
+
readonly $type: 'ExtendDeploymentBody';
|
|
14590
|
+
elements: Array<DeployedInstance | DeploymentNode | DeploymentRelation>;
|
|
14591
|
+
props: Array<ExtendElementProperty>;
|
|
14592
|
+
tags?: Tags;
|
|
15618
14593
|
}
|
|
15619
|
-
|
|
15620
|
-
|
|
15621
|
-
|
|
15622
|
-
|
|
15623
|
-
|
|
15624
|
-
|
|
15625
|
-
*/
|
|
15626
|
-
declare function excludes<TInput extends ContentInput, const TRequirement extends ContentRequirement<TInput>>(requirement: TRequirement): ExcludesAction<TInput, TRequirement, undefined>;
|
|
15627
|
-
/**
|
|
15628
|
-
* Creates an excludes validation action.
|
|
15629
|
-
*
|
|
15630
|
-
* @param requirement The content to be excluded.
|
|
15631
|
-
* @param message The error message.
|
|
15632
|
-
*
|
|
15633
|
-
* @returns An excludes action.
|
|
15634
|
-
*/
|
|
15635
|
-
declare function excludes<TInput extends ContentInput, const TRequirement extends ContentRequirement<TInput>, const TMessage extends ErrorMessage<ExcludesIssue<TInput, TRequirement>> | undefined>(requirement: TRequirement, message: TMessage): ExcludesAction<TInput, TRequirement, TMessage>;
|
|
15636
|
-
|
|
15637
|
-
/**
|
|
15638
|
-
* Non empty issue interface.
|
|
15639
|
-
*/
|
|
15640
|
-
interface NonEmptyIssue<TInput extends LengthInput> extends BaseIssue<TInput> {
|
|
15641
|
-
/**
|
|
15642
|
-
* The issue kind.
|
|
15643
|
-
*/
|
|
15644
|
-
readonly kind: 'validation';
|
|
15645
|
-
/**
|
|
15646
|
-
* The issue type.
|
|
15647
|
-
*/
|
|
15648
|
-
readonly type: 'non_empty';
|
|
15649
|
-
/**
|
|
15650
|
-
* The expected input.
|
|
15651
|
-
*/
|
|
15652
|
-
readonly expected: '!0';
|
|
15653
|
-
/**
|
|
15654
|
-
* The received input.
|
|
15655
|
-
*/
|
|
15656
|
-
readonly received: '0';
|
|
14594
|
+
declare const ExtendDeploymentBody = "ExtendDeploymentBody";
|
|
14595
|
+
interface ExtendElement extends AstNode {
|
|
14596
|
+
readonly $container: Model;
|
|
14597
|
+
readonly $type: 'ExtendElement';
|
|
14598
|
+
body: ExtendElementBody;
|
|
14599
|
+
element: StrictFqnElementRef;
|
|
15657
14600
|
}
|
|
15658
|
-
|
|
15659
|
-
|
|
15660
|
-
|
|
15661
|
-
|
|
15662
|
-
|
|
15663
|
-
|
|
15664
|
-
|
|
15665
|
-
readonly type: 'non_empty';
|
|
15666
|
-
/**
|
|
15667
|
-
* The action reference.
|
|
15668
|
-
*/
|
|
15669
|
-
readonly reference: typeof nonEmpty;
|
|
15670
|
-
/**
|
|
15671
|
-
* The expected property.
|
|
15672
|
-
*/
|
|
15673
|
-
readonly expects: '!0';
|
|
15674
|
-
/**
|
|
15675
|
-
* The error message.
|
|
15676
|
-
*/
|
|
15677
|
-
readonly message: TMessage;
|
|
14601
|
+
declare const ExtendElement = "ExtendElement";
|
|
14602
|
+
interface ExtendElementBody extends AstNode {
|
|
14603
|
+
readonly $container: ExtendElement;
|
|
14604
|
+
readonly $type: 'ExtendElementBody';
|
|
14605
|
+
elements: Array<Element | Relation>;
|
|
14606
|
+
props: Array<ExtendElementProperty>;
|
|
14607
|
+
tags?: Tags;
|
|
15678
14608
|
}
|
|
15679
|
-
|
|
15680
|
-
|
|
15681
|
-
|
|
15682
|
-
|
|
15683
|
-
|
|
15684
|
-
|
|
15685
|
-
/**
|
|
15686
|
-
* Creates a non-empty validation action.
|
|
15687
|
-
*
|
|
15688
|
-
* @param message The error message.
|
|
15689
|
-
*
|
|
15690
|
-
* @returns A non-empty action.
|
|
15691
|
-
*/
|
|
15692
|
-
declare function nonEmpty<TInput extends LengthInput, const TMessage extends ErrorMessage<NonEmptyIssue<TInput>> | undefined>(message: TMessage): NonEmptyAction<TInput, TMessage>;
|
|
15693
|
-
|
|
15694
|
-
/**
|
|
15695
|
-
* Readonly output type.
|
|
15696
|
-
*/
|
|
15697
|
-
type ReadonlyOutput<TInput> = TInput extends Map<infer TKey, infer TValue> ? ReadonlyMap<TKey, TValue> : TInput extends Set<infer TValue> ? ReadonlySet<TValue> : Readonly<TInput>;
|
|
15698
|
-
/**
|
|
15699
|
-
* Readonly action interface.
|
|
15700
|
-
*/
|
|
15701
|
-
interface ReadonlyAction<TInput> extends BaseTransformation<TInput, ReadonlyOutput<TInput>, never> {
|
|
15702
|
-
/**
|
|
15703
|
-
* The action type.
|
|
15704
|
-
*/
|
|
15705
|
-
readonly type: 'readonly';
|
|
15706
|
-
/**
|
|
15707
|
-
* The action reference.
|
|
15708
|
-
*/
|
|
15709
|
-
readonly reference: typeof readonly;
|
|
14609
|
+
declare const ExtendElementBody = "ExtendElementBody";
|
|
14610
|
+
interface FqnExpressions extends AstNode {
|
|
14611
|
+
readonly $container: DeploymentViewRuleStyle | FqnExpressions | GlobalStyle | ViewRuleStyle;
|
|
14612
|
+
readonly $type: 'FqnExpressions';
|
|
14613
|
+
prev?: FqnExpressions;
|
|
14614
|
+
value: FqnExpr;
|
|
15710
14615
|
}
|
|
15711
|
-
|
|
15712
|
-
|
|
15713
|
-
|
|
15714
|
-
|
|
15715
|
-
|
|
15716
|
-
|
|
15717
|
-
|
|
15718
|
-
declare const ProjectConfig: ObjectSchema<{
|
|
15719
|
-
readonly name: SchemaWithPipe<readonly [StringSchema<undefined>, NonEmptyAction<string, "Project name cannot be empty">, ExcludesAction<string, "default", "Project name cannot be \"default\"">, ExcludesAction<string, ".", "Project name cannot contain \".\", try to use A-z, 0-9, _ and -">, ExcludesAction<string, "@", "Project name cannot contain \"@\", try to use A-z, 0-9, _ and -">, ExcludesAction<string, "#", "Project name cannot contain \"#\", try to use A-z, 0-9, _ and -">, DescriptionAction<string, "Project name, must be unique in the workspace">]>;
|
|
15720
|
-
readonly title: OptionalSchema<SchemaWithPipe<readonly [StringSchema<undefined>, NonEmptyAction<string, "Project title cannot be empty if specified">, DescriptionAction<string, "A human readable title for the project">]>, undefined>;
|
|
15721
|
-
readonly contactPerson: OptionalSchema<SchemaWithPipe<readonly [StringSchema<undefined>, NonEmptyAction<string, "Contact person cannot be empty if specified">, DescriptionAction<string, "A person who has been involved in creating or maintaining this project">]>, undefined>;
|
|
15722
|
-
readonly exclude: OptionalSchema<SchemaWithPipe<readonly [ArraySchema<StringSchema<undefined>, undefined>, DescriptionAction<string[], "List of file patterns to exclude from the project, default is [\"**/node_modules/**/*\"]">]>, undefined>;
|
|
15723
|
-
}, undefined>;
|
|
15724
|
-
type ProjectConfig = InferOutput<typeof ProjectConfig>;
|
|
15725
|
-
|
|
15726
|
-
/******************************************************************************
|
|
15727
|
-
* This file was generated by langium-cli 3.5.2.
|
|
15728
|
-
* DO NOT EDIT MANUALLY!
|
|
15729
|
-
******************************************************************************/
|
|
15730
|
-
|
|
15731
|
-
type ArrowType = 'crow' | 'diamond' | 'dot' | 'none' | 'normal' | 'odiamond' | 'odot' | 'onormal' | 'open' | 'vee';
|
|
15732
|
-
type BorderStyleValue = 'none' | LineOptions;
|
|
15733
|
-
type ColorLiteral = HexColor | RGBAColor;
|
|
15734
|
-
declare const ColorLiteral = "ColorLiteral";
|
|
15735
|
-
type CustomColorId = 'element' | 'model' | ArrowType | ElementShape | LineOptions | string;
|
|
15736
|
-
type DeploymentElement = DeployedInstance | DeploymentNode;
|
|
15737
|
-
declare const DeploymentElement = "DeploymentElement";
|
|
15738
|
-
type DeploymentNodeOrElementKind = DeploymentNodeKind | ElementKind;
|
|
15739
|
-
declare const DeploymentNodeOrElementKind = "DeploymentNodeOrElementKind";
|
|
15740
|
-
type DeploymentViewRule = DeploymentViewRulePredicate | DeploymentViewRuleStyle | ViewRuleAutoLayout;
|
|
15741
|
-
declare const DeploymentViewRule = "DeploymentViewRule";
|
|
15742
|
-
type DynamicViewRule = DynamicViewGlobalPredicateRef | DynamicViewIncludePredicate | ViewRuleAutoLayout | ViewRuleStyleOrGlobalRef;
|
|
15743
|
-
declare const DynamicViewRule = "DynamicViewRule";
|
|
15744
|
-
type ElementProperty = ElementStringProperty | ElementStyleProperty | IconProperty | LinkProperty | MetadataProperty;
|
|
15745
|
-
declare const ElementProperty = "ElementProperty";
|
|
15746
|
-
type ElementShape = 'browser' | 'cylinder' | 'mobile' | 'person' | 'queue' | 'rectangle' | 'storage';
|
|
15747
|
-
type ExpressionV2 = FqnExprOrWith | RelationExprOrWith;
|
|
15748
|
-
declare const ExpressionV2 = "ExpressionV2";
|
|
15749
|
-
type ExtendElementProperty = LinkProperty | MetadataProperty;
|
|
15750
|
-
declare const ExtendElementProperty = "ExtendElementProperty";
|
|
15751
|
-
type FqnExpr = ElementKindExpression | ElementTagExpression | FqnRefExpr | WildcardExpression;
|
|
15752
|
-
declare const FqnExpr = "FqnExpr";
|
|
15753
|
-
type FqnExprOrWhere = FqnExpr | FqnExprWhere;
|
|
15754
|
-
declare const FqnExprOrWhere = "FqnExprOrWhere";
|
|
15755
|
-
type FqnExprOrWith = FqnExprOrWhere | FqnExprWith;
|
|
15756
|
-
declare const FqnExprOrWith = "FqnExprOrWith";
|
|
15757
|
-
type FqnReferenceable = Element | ExtendDeployment | ExtendElement | Referenceable;
|
|
15758
|
-
declare const FqnReferenceable = "FqnReferenceable";
|
|
15759
|
-
type IconId = string;
|
|
15760
|
-
type Id = 'deployment' | 'element' | 'group' | 'instance' | 'model' | 'node' | ArrowType | ElementShape | LineOptions | Participant | SizeValue | ThemeColor | string;
|
|
15761
|
-
type LikeC4View = DeploymentView | DynamicView | ElementView;
|
|
15762
|
-
declare const LikeC4View = "LikeC4View";
|
|
15763
|
-
type LineOptions = 'dashed' | 'dotted' | 'solid';
|
|
15764
|
-
type MetadataProperty = MetadataBody;
|
|
15765
|
-
declare const MetadataProperty = "MetadataProperty";
|
|
15766
|
-
type ModelReferenceable = Element | Imported;
|
|
15767
|
-
declare const ModelReferenceable = "ModelReferenceable";
|
|
15768
|
-
type Participant = 'source' | 'target';
|
|
15769
|
-
type Referenceable = DeployedInstance | DeploymentNode | Element | Imported;
|
|
15770
|
-
declare const Referenceable = "Referenceable";
|
|
15771
|
-
type RelationExpr = DirectedRelationExpr | InOutRelationExpr | IncomingRelationExpr | OutgoingRelationExpr;
|
|
15772
|
-
declare const RelationExpr = "RelationExpr";
|
|
15773
|
-
type RelationExprOrWhere = RelationExpr | RelationExprWhere;
|
|
15774
|
-
declare const RelationExprOrWhere = "RelationExprOrWhere";
|
|
15775
|
-
type RelationExprOrWith = RelationExprOrWhere | RelationExprWith;
|
|
15776
|
-
declare const RelationExprOrWith = "RelationExprOrWith";
|
|
15777
|
-
type RelationProperty = LinkProperty | MetadataProperty | RelationNavigateToProperty | RelationStringProperty | RelationStyleProperty;
|
|
15778
|
-
declare const RelationProperty = "RelationProperty";
|
|
15779
|
-
type RelationshipStyleProperty = ArrowProperty | ColorProperty | LineProperty;
|
|
15780
|
-
declare const RelationshipStyleProperty = "RelationshipStyleProperty";
|
|
15781
|
-
type SizeProperty = PaddingSizeProperty | ShapeSizeProperty | TextSizeProperty;
|
|
15782
|
-
declare const SizeProperty = "SizeProperty";
|
|
15783
|
-
type SizeValue = 'large' | 'lg' | 'md' | 'medium' | 'sm' | 'small' | 'xl' | 'xlarge' | 'xs' | 'xsmall';
|
|
15784
|
-
type StringProperty = ElementStringProperty | MetadataAttribute | NotationProperty | NotesProperty | RelationStringProperty | SpecificationElementStringProperty | SpecificationRelationshipStringProperty | ViewStringProperty;
|
|
15785
|
-
declare const StringProperty = "StringProperty";
|
|
15786
|
-
type StyleProperty = BorderProperty | ColorProperty | IconProperty | MultipleProperty | OpacityProperty | PaddingSizeProperty | ShapeProperty | ShapeSizeProperty | TextSizeProperty;
|
|
15787
|
-
declare const StyleProperty = "StyleProperty";
|
|
15788
|
-
type ThemeColor = 'amber' | 'blue' | 'gray' | 'green' | 'indigo' | 'muted' | 'primary' | 'red' | 'secondary' | 'sky' | 'slate';
|
|
15789
|
-
type Uri = string;
|
|
15790
|
-
type ViewLayoutDirection = 'BottomTop' | 'LeftRight' | 'RightLeft' | 'TopBottom';
|
|
15791
|
-
type ViewProperty = LinkProperty | ViewStringProperty;
|
|
15792
|
-
declare const ViewProperty = "ViewProperty";
|
|
15793
|
-
type ViewRule = ViewRuleAutoLayout | ViewRuleGlobalPredicateRef | ViewRuleGroup | ViewRulePredicate | ViewRuleStyleOrGlobalRef;
|
|
15794
|
-
declare const ViewRule = "ViewRule";
|
|
15795
|
-
type ViewRuleStyleOrGlobalRef = ViewRuleGlobalStyle | ViewRuleStyle;
|
|
15796
|
-
declare const ViewRuleStyleOrGlobalRef = "ViewRuleStyleOrGlobalRef";
|
|
15797
|
-
type WhereElement = WhereElementKind | WhereElementTag;
|
|
15798
|
-
declare const WhereElement = "WhereElement";
|
|
15799
|
-
type WhereElementExpression = WhereBinaryExpression | WhereElement | WhereElementNegation;
|
|
15800
|
-
declare const WhereElementExpression = "WhereElementExpression";
|
|
15801
|
-
type WhereExpression = WhereElementExpression | WhereRelationExpression;
|
|
15802
|
-
declare const WhereExpression = "WhereExpression";
|
|
15803
|
-
type WhereKindEqual = WhereElementKind | WhereRelationKind | WhereRelationParticipantKind;
|
|
15804
|
-
declare const WhereKindEqual = "WhereKindEqual";
|
|
15805
|
-
type WhereRelation = WhereRelationKind | WhereRelationParticipantKind | WhereRelationParticipantTag | WhereRelationTag;
|
|
15806
|
-
declare const WhereRelation = "WhereRelation";
|
|
15807
|
-
type WhereRelationExpression = WhereBinaryExpression | WhereRelation | WhereRelationNegation;
|
|
15808
|
-
declare const WhereRelationExpression = "WhereRelationExpression";
|
|
15809
|
-
type WhereTagEqual = WhereElementTag | WhereRelationParticipantTag | WhereRelationTag;
|
|
15810
|
-
declare const WhereTagEqual = "WhereTagEqual";
|
|
15811
|
-
interface ArrowProperty extends AstNode {
|
|
15812
|
-
readonly $container: CustomRelationProperties | RelationStyleProperty | SpecificationRelationshipKind;
|
|
15813
|
-
readonly $type: 'ArrowProperty';
|
|
15814
|
-
key: 'head' | 'tail';
|
|
15815
|
-
value: ArrowType;
|
|
14616
|
+
declare const FqnExpressions = "FqnExpressions";
|
|
14617
|
+
interface FqnExprWhere extends AstNode {
|
|
14618
|
+
readonly $container: Expressions | FqnExprWith;
|
|
14619
|
+
readonly $type: 'FqnExprWhere';
|
|
14620
|
+
subject: FqnExpr;
|
|
14621
|
+
where?: WhereElementExpression;
|
|
15816
14622
|
}
|
|
15817
|
-
declare const
|
|
15818
|
-
interface
|
|
15819
|
-
readonly $container:
|
|
15820
|
-
readonly $type: '
|
|
15821
|
-
|
|
15822
|
-
|
|
14623
|
+
declare const FqnExprWhere = "FqnExprWhere";
|
|
14624
|
+
interface FqnExprWith extends AstNode {
|
|
14625
|
+
readonly $container: Expressions;
|
|
14626
|
+
readonly $type: 'FqnExprWith';
|
|
14627
|
+
custom?: CustomElementProperties;
|
|
14628
|
+
subject: FqnExprOrWhere;
|
|
15823
14629
|
}
|
|
15824
|
-
declare const
|
|
15825
|
-
interface
|
|
15826
|
-
readonly $container:
|
|
15827
|
-
readonly $type: '
|
|
15828
|
-
|
|
15829
|
-
|
|
15830
|
-
themeColor?: ThemeColor;
|
|
14630
|
+
declare const FqnExprWith = "FqnExprWith";
|
|
14631
|
+
interface FqnRef extends AstNode {
|
|
14632
|
+
readonly $container: DeploymentRelation | ElementRef | FqnRef | FqnRefExpr | Relation;
|
|
14633
|
+
readonly $type: 'FqnRef';
|
|
14634
|
+
parent?: FqnRef;
|
|
14635
|
+
value: Reference<Referenceable>;
|
|
15831
14636
|
}
|
|
15832
|
-
declare const
|
|
15833
|
-
interface
|
|
15834
|
-
readonly $container:
|
|
15835
|
-
readonly $type: '
|
|
15836
|
-
|
|
14637
|
+
declare const FqnRef = "FqnRef";
|
|
14638
|
+
interface FqnRefExpr extends AstNode {
|
|
14639
|
+
readonly $container: DirectedRelationExpr | Expressions | FqnExprWhere | FqnExprWith | FqnExpressions | IncomingRelationExpr | OutgoingRelationExpr;
|
|
14640
|
+
readonly $type: 'FqnRefExpr';
|
|
14641
|
+
ref: FqnRef;
|
|
14642
|
+
selector?: string;
|
|
15837
14643
|
}
|
|
15838
|
-
declare const
|
|
15839
|
-
interface
|
|
15840
|
-
readonly $container:
|
|
15841
|
-
readonly $type: '
|
|
15842
|
-
|
|
14644
|
+
declare const FqnRefExpr = "FqnRefExpr";
|
|
14645
|
+
interface GlobalDynamicPredicateGroup extends AstNode {
|
|
14646
|
+
readonly $container: Globals;
|
|
14647
|
+
readonly $type: 'GlobalDynamicPredicateGroup';
|
|
14648
|
+
name: string;
|
|
14649
|
+
predicates: Array<DynamicViewIncludePredicate>;
|
|
15843
14650
|
}
|
|
15844
|
-
declare const
|
|
15845
|
-
interface
|
|
15846
|
-
readonly $container:
|
|
15847
|
-
readonly $type: '
|
|
15848
|
-
|
|
14651
|
+
declare const GlobalDynamicPredicateGroup = "GlobalDynamicPredicateGroup";
|
|
14652
|
+
interface GlobalPredicateGroup extends AstNode {
|
|
14653
|
+
readonly $container: Globals;
|
|
14654
|
+
readonly $type: 'GlobalPredicateGroup';
|
|
14655
|
+
name: string;
|
|
14656
|
+
predicates: Array<ViewRulePredicate>;
|
|
15849
14657
|
}
|
|
15850
|
-
declare const
|
|
15851
|
-
interface
|
|
15852
|
-
readonly $container:
|
|
15853
|
-
readonly $type: '
|
|
15854
|
-
|
|
15855
|
-
|
|
15856
|
-
|
|
15857
|
-
title?: string;
|
|
14658
|
+
declare const GlobalPredicateGroup = "GlobalPredicateGroup";
|
|
14659
|
+
interface Globals extends AstNode {
|
|
14660
|
+
readonly $container: LikeC4Grammar;
|
|
14661
|
+
readonly $type: 'Globals';
|
|
14662
|
+
name: 'global';
|
|
14663
|
+
predicates: Array<GlobalDynamicPredicateGroup | GlobalPredicateGroup>;
|
|
14664
|
+
styles: Array<GlobalStyle | GlobalStyleGroup>;
|
|
15858
14665
|
}
|
|
15859
|
-
declare const
|
|
15860
|
-
interface
|
|
15861
|
-
readonly $container:
|
|
15862
|
-
readonly $type: '
|
|
15863
|
-
|
|
15864
|
-
props: Array<
|
|
15865
|
-
|
|
14666
|
+
declare const Globals = "Globals";
|
|
14667
|
+
interface GlobalStyle extends AstNode {
|
|
14668
|
+
readonly $container: Globals;
|
|
14669
|
+
readonly $type: 'GlobalStyle';
|
|
14670
|
+
id: GlobalStyleId;
|
|
14671
|
+
props: Array<NotationProperty | StyleProperty>;
|
|
14672
|
+
targets: FqnExpressions;
|
|
15866
14673
|
}
|
|
15867
|
-
declare const
|
|
15868
|
-
interface
|
|
15869
|
-
readonly $container:
|
|
15870
|
-
readonly $type: '
|
|
15871
|
-
|
|
15872
|
-
|
|
15873
|
-
name: Id;
|
|
15874
|
-
title?: string;
|
|
14674
|
+
declare const GlobalStyle = "GlobalStyle";
|
|
14675
|
+
interface GlobalStyleGroup extends AstNode {
|
|
14676
|
+
readonly $container: Globals;
|
|
14677
|
+
readonly $type: 'GlobalStyleGroup';
|
|
14678
|
+
id: GlobalStyleId;
|
|
14679
|
+
styles: Array<ViewRuleStyle>;
|
|
15875
14680
|
}
|
|
15876
|
-
declare const
|
|
15877
|
-
interface
|
|
15878
|
-
readonly $container:
|
|
15879
|
-
readonly $type: '
|
|
15880
|
-
|
|
15881
|
-
props: Array<ElementProperty>;
|
|
15882
|
-
tags?: Tags;
|
|
15883
|
-
}
|
|
15884
|
-
declare const DeploymentNodeBody = "DeploymentNodeBody";
|
|
15885
|
-
interface DeploymentNodeKind extends AstNode {
|
|
15886
|
-
readonly $container: SpecificationDeploymentNodeKind;
|
|
15887
|
-
readonly $type: 'DeploymentNodeKind';
|
|
15888
|
-
name: Id;
|
|
15889
|
-
}
|
|
15890
|
-
declare const DeploymentNodeKind = "DeploymentNodeKind";
|
|
15891
|
-
interface DeploymentRelation extends AstNode {
|
|
15892
|
-
readonly $container: DeployedInstanceBody | DeploymentNodeBody | ExtendDeploymentBody | ModelDeployments;
|
|
15893
|
-
readonly $type: 'DeploymentRelation';
|
|
15894
|
-
body?: DeploymentRelationBody;
|
|
15895
|
-
description?: string;
|
|
15896
|
-
dotKind?: RelationKindDotRef;
|
|
15897
|
-
kind?: Reference<RelationshipKind>;
|
|
15898
|
-
source?: FqnRef;
|
|
15899
|
-
tags?: Tags;
|
|
15900
|
-
target: FqnRef;
|
|
15901
|
-
technology?: string;
|
|
15902
|
-
title?: string;
|
|
15903
|
-
}
|
|
15904
|
-
declare const DeploymentRelation = "DeploymentRelation";
|
|
15905
|
-
interface DeploymentRelationBody extends AstNode {
|
|
15906
|
-
readonly $container: DeploymentRelation;
|
|
15907
|
-
readonly $type: 'DeploymentRelationBody';
|
|
15908
|
-
props: Array<RelationProperty>;
|
|
15909
|
-
tags?: Tags;
|
|
15910
|
-
}
|
|
15911
|
-
declare const DeploymentRelationBody = "DeploymentRelationBody";
|
|
15912
|
-
interface DeploymentView extends AstNode {
|
|
15913
|
-
readonly $container: ModelViews;
|
|
15914
|
-
readonly $type: 'DeploymentView';
|
|
15915
|
-
body?: DeploymentViewBody;
|
|
15916
|
-
name: Id;
|
|
15917
|
-
}
|
|
15918
|
-
declare const DeploymentView = "DeploymentView";
|
|
15919
|
-
interface DeploymentViewBody extends AstNode {
|
|
15920
|
-
readonly $container: DeploymentView;
|
|
15921
|
-
readonly $type: 'DeploymentViewBody';
|
|
15922
|
-
props: Array<ViewProperty>;
|
|
15923
|
-
rules: Array<DeploymentViewRule>;
|
|
15924
|
-
tags?: Tags;
|
|
15925
|
-
}
|
|
15926
|
-
declare const DeploymentViewBody = "DeploymentViewBody";
|
|
15927
|
-
interface DeploymentViewRulePredicate extends AstNode {
|
|
15928
|
-
readonly $container: DeploymentViewBody;
|
|
15929
|
-
readonly $type: 'DeploymentViewRulePredicate';
|
|
15930
|
-
expr: Expressions;
|
|
15931
|
-
isInclude: boolean;
|
|
15932
|
-
}
|
|
15933
|
-
declare const DeploymentViewRulePredicate = "DeploymentViewRulePredicate";
|
|
15934
|
-
interface DeploymentViewRuleStyle extends AstNode {
|
|
15935
|
-
readonly $container: DeploymentViewBody;
|
|
15936
|
-
readonly $type: 'DeploymentViewRuleStyle';
|
|
15937
|
-
props: Array<NotationProperty | StyleProperty>;
|
|
15938
|
-
targets: FqnExpressions;
|
|
15939
|
-
}
|
|
15940
|
-
declare const DeploymentViewRuleStyle = "DeploymentViewRuleStyle";
|
|
15941
|
-
interface DirectedRelationExpr extends AstNode {
|
|
15942
|
-
readonly $container: Expressions | RelationExprWhere | RelationExprWith;
|
|
15943
|
-
readonly $type: 'DirectedRelationExpr';
|
|
15944
|
-
source: OutgoingRelationExpr;
|
|
15945
|
-
target: FqnExpr;
|
|
15946
|
-
}
|
|
15947
|
-
declare const DirectedRelationExpr = "DirectedRelationExpr";
|
|
15948
|
-
interface DynamicView extends AstNode {
|
|
15949
|
-
readonly $container: ModelViews;
|
|
15950
|
-
readonly $type: 'DynamicView';
|
|
15951
|
-
body?: DynamicViewBody;
|
|
15952
|
-
name: Id;
|
|
15953
|
-
}
|
|
15954
|
-
declare const DynamicView = "DynamicView";
|
|
15955
|
-
interface DynamicViewBody extends AstNode {
|
|
15956
|
-
readonly $container: DynamicView;
|
|
15957
|
-
readonly $type: 'DynamicViewBody';
|
|
15958
|
-
props: Array<ViewProperty>;
|
|
15959
|
-
rules: Array<DynamicViewRule>;
|
|
15960
|
-
steps: Array<DynamicViewParallelSteps | DynamicViewStep>;
|
|
15961
|
-
tags?: Tags;
|
|
15962
|
-
}
|
|
15963
|
-
declare const DynamicViewBody = "DynamicViewBody";
|
|
15964
|
-
interface DynamicViewGlobalPredicateRef extends AstNode {
|
|
15965
|
-
readonly $container: DynamicViewBody;
|
|
15966
|
-
readonly $type: 'DynamicViewGlobalPredicateRef';
|
|
15967
|
-
predicate: Reference<GlobalDynamicPredicateGroup>;
|
|
15968
|
-
}
|
|
15969
|
-
declare const DynamicViewGlobalPredicateRef = "DynamicViewGlobalPredicateRef";
|
|
15970
|
-
interface DynamicViewIncludePredicate extends AstNode {
|
|
15971
|
-
readonly $container: DynamicViewBody | GlobalDynamicPredicateGroup;
|
|
15972
|
-
readonly $type: 'DynamicViewIncludePredicate';
|
|
15973
|
-
exprs: Expressions;
|
|
15974
|
-
}
|
|
15975
|
-
declare const DynamicViewIncludePredicate = "DynamicViewIncludePredicate";
|
|
15976
|
-
interface DynamicViewParallelSteps extends AstNode {
|
|
15977
|
-
readonly $container: DynamicViewBody;
|
|
15978
|
-
readonly $type: 'DynamicViewParallelSteps';
|
|
15979
|
-
steps: Array<DynamicViewStep>;
|
|
15980
|
-
}
|
|
15981
|
-
declare const DynamicViewParallelSteps = "DynamicViewParallelSteps";
|
|
15982
|
-
interface DynamicViewRef extends AstNode {
|
|
15983
|
-
readonly $container: RelationNavigateToProperty;
|
|
15984
|
-
readonly $type: 'DynamicViewRef';
|
|
15985
|
-
view: Reference<DynamicView>;
|
|
15986
|
-
}
|
|
15987
|
-
declare const DynamicViewRef = "DynamicViewRef";
|
|
15988
|
-
interface DynamicViewStep extends AstNode {
|
|
15989
|
-
readonly $container: DynamicViewBody | DynamicViewParallelSteps;
|
|
15990
|
-
readonly $type: 'DynamicViewStep';
|
|
15991
|
-
custom?: CustomRelationProperties;
|
|
15992
|
-
dotKind?: RelationKindDotRef;
|
|
15993
|
-
isBackward: boolean;
|
|
15994
|
-
kind?: Reference<RelationshipKind>;
|
|
15995
|
-
source: ElementRef;
|
|
15996
|
-
target: ElementRef;
|
|
15997
|
-
title?: string;
|
|
15998
|
-
}
|
|
15999
|
-
declare const DynamicViewStep = "DynamicViewStep";
|
|
16000
|
-
interface Element extends AstNode {
|
|
16001
|
-
readonly $container: ElementBody | ExtendElementBody | Model;
|
|
16002
|
-
readonly $type: 'Element';
|
|
16003
|
-
body?: ElementBody;
|
|
16004
|
-
kind: Reference<ElementKind>;
|
|
16005
|
-
name: Id;
|
|
16006
|
-
props: Array<string>;
|
|
16007
|
-
}
|
|
16008
|
-
declare const Element = "Element";
|
|
16009
|
-
interface ElementBody extends AstNode {
|
|
16010
|
-
readonly $container: Element;
|
|
16011
|
-
readonly $type: 'ElementBody';
|
|
16012
|
-
elements: Array<Element | Relation>;
|
|
16013
|
-
props: Array<ElementProperty>;
|
|
16014
|
-
tags?: Tags;
|
|
16015
|
-
}
|
|
16016
|
-
declare const ElementBody = "ElementBody";
|
|
16017
|
-
interface ElementKind extends AstNode {
|
|
16018
|
-
readonly $container: SpecificationElementKind;
|
|
16019
|
-
readonly $type: 'ElementKind';
|
|
16020
|
-
name: Id;
|
|
16021
|
-
}
|
|
16022
|
-
declare const ElementKind = "ElementKind";
|
|
16023
|
-
interface ElementKindExpression extends AstNode {
|
|
16024
|
-
readonly $container: DirectedRelationExpr | Expressions | FqnExprWhere | FqnExprWith | FqnExpressions | IncomingRelationExpr | OutgoingRelationExpr;
|
|
16025
|
-
readonly $type: 'ElementKindExpression';
|
|
16026
|
-
isEqual: boolean;
|
|
16027
|
-
kind: Reference<ElementKind>;
|
|
16028
|
-
}
|
|
16029
|
-
declare const ElementKindExpression = "ElementKindExpression";
|
|
16030
|
-
interface ElementRef extends AstNode {
|
|
16031
|
-
readonly $container: DeployedInstance | DynamicViewStep | ElementView;
|
|
16032
|
-
readonly $type: 'ElementRef';
|
|
16033
|
-
modelElement: FqnRef;
|
|
16034
|
-
}
|
|
16035
|
-
declare const ElementRef = "ElementRef";
|
|
16036
|
-
interface ElementStringProperty extends AstNode {
|
|
16037
|
-
readonly $container: CustomElementProperties | DeployedInstanceBody | DeploymentNodeBody | ElementBody;
|
|
16038
|
-
readonly $type: 'ElementStringProperty';
|
|
16039
|
-
key: 'description' | 'technology' | 'title';
|
|
16040
|
-
value: MarkdownOrString;
|
|
16041
|
-
}
|
|
16042
|
-
declare const ElementStringProperty = "ElementStringProperty";
|
|
16043
|
-
interface ElementStyleProperty extends AstNode {
|
|
16044
|
-
readonly $container: DeployedInstanceBody | DeploymentNodeBody | ElementBody | SpecificationDeploymentNodeKind | SpecificationElementKind;
|
|
16045
|
-
readonly $type: 'ElementStyleProperty';
|
|
16046
|
-
key: 'style';
|
|
16047
|
-
props: Array<StyleProperty>;
|
|
16048
|
-
}
|
|
16049
|
-
declare const ElementStyleProperty = "ElementStyleProperty";
|
|
16050
|
-
interface ElementTagExpression extends AstNode {
|
|
16051
|
-
readonly $container: DirectedRelationExpr | Expressions | FqnExprWhere | FqnExprWith | FqnExpressions | IncomingRelationExpr | OutgoingRelationExpr;
|
|
16052
|
-
readonly $type: 'ElementTagExpression';
|
|
16053
|
-
isEqual: boolean;
|
|
16054
|
-
tag: TagRef;
|
|
16055
|
-
}
|
|
16056
|
-
declare const ElementTagExpression = "ElementTagExpression";
|
|
16057
|
-
interface ElementView extends AstNode {
|
|
16058
|
-
readonly $container: ModelViews;
|
|
16059
|
-
readonly $type: 'ElementView';
|
|
16060
|
-
body?: ElementViewBody;
|
|
16061
|
-
extends?: ElementViewRef;
|
|
16062
|
-
name?: Id;
|
|
16063
|
-
viewOf?: ElementRef;
|
|
16064
|
-
}
|
|
16065
|
-
declare const ElementView = "ElementView";
|
|
16066
|
-
interface ElementViewBody extends AstNode {
|
|
16067
|
-
readonly $container: ElementView;
|
|
16068
|
-
readonly $type: 'ElementViewBody';
|
|
16069
|
-
props: Array<ViewProperty>;
|
|
16070
|
-
rules: Array<ViewRule>;
|
|
16071
|
-
tags?: Tags;
|
|
16072
|
-
}
|
|
16073
|
-
declare const ElementViewBody = "ElementViewBody";
|
|
16074
|
-
interface ElementViewRef extends AstNode {
|
|
16075
|
-
readonly $container: ElementView;
|
|
16076
|
-
readonly $type: 'ElementViewRef';
|
|
16077
|
-
view: Reference<ElementView>;
|
|
16078
|
-
}
|
|
16079
|
-
declare const ElementViewRef = "ElementViewRef";
|
|
16080
|
-
interface Expressions extends AstNode {
|
|
16081
|
-
readonly $container: DeploymentViewRulePredicate | DynamicViewIncludePredicate | Expressions | ViewRulePredicate;
|
|
16082
|
-
readonly $type: 'Expressions';
|
|
16083
|
-
prev?: Expressions;
|
|
16084
|
-
value: ExpressionV2;
|
|
16085
|
-
}
|
|
16086
|
-
declare const Expressions = "Expressions";
|
|
16087
|
-
interface ExtendDeployment extends AstNode {
|
|
16088
|
-
readonly $container: ModelDeployments;
|
|
16089
|
-
readonly $type: 'ExtendDeployment';
|
|
16090
|
-
body: ExtendDeploymentBody;
|
|
16091
|
-
deploymentNode: StrictFqnRef;
|
|
16092
|
-
}
|
|
16093
|
-
declare const ExtendDeployment = "ExtendDeployment";
|
|
16094
|
-
interface ExtendDeploymentBody extends AstNode {
|
|
16095
|
-
readonly $container: ExtendDeployment;
|
|
16096
|
-
readonly $type: 'ExtendDeploymentBody';
|
|
16097
|
-
elements: Array<DeployedInstance | DeploymentNode | DeploymentRelation>;
|
|
16098
|
-
props: Array<ExtendElementProperty>;
|
|
16099
|
-
tags?: Tags;
|
|
16100
|
-
}
|
|
16101
|
-
declare const ExtendDeploymentBody = "ExtendDeploymentBody";
|
|
16102
|
-
interface ExtendElement extends AstNode {
|
|
16103
|
-
readonly $container: Model;
|
|
16104
|
-
readonly $type: 'ExtendElement';
|
|
16105
|
-
body: ExtendElementBody;
|
|
16106
|
-
element: StrictFqnElementRef;
|
|
16107
|
-
}
|
|
16108
|
-
declare const ExtendElement = "ExtendElement";
|
|
16109
|
-
interface ExtendElementBody extends AstNode {
|
|
16110
|
-
readonly $container: ExtendElement;
|
|
16111
|
-
readonly $type: 'ExtendElementBody';
|
|
16112
|
-
elements: Array<Element | Relation>;
|
|
16113
|
-
props: Array<ExtendElementProperty>;
|
|
16114
|
-
tags?: Tags;
|
|
16115
|
-
}
|
|
16116
|
-
declare const ExtendElementBody = "ExtendElementBody";
|
|
16117
|
-
interface FqnExpressions extends AstNode {
|
|
16118
|
-
readonly $container: DeploymentViewRuleStyle | FqnExpressions | GlobalStyle | ViewRuleStyle;
|
|
16119
|
-
readonly $type: 'FqnExpressions';
|
|
16120
|
-
prev?: FqnExpressions;
|
|
16121
|
-
value: FqnExpr;
|
|
16122
|
-
}
|
|
16123
|
-
declare const FqnExpressions = "FqnExpressions";
|
|
16124
|
-
interface FqnExprWhere extends AstNode {
|
|
16125
|
-
readonly $container: Expressions | FqnExprWith;
|
|
16126
|
-
readonly $type: 'FqnExprWhere';
|
|
16127
|
-
subject: FqnExpr;
|
|
16128
|
-
where?: WhereElementExpression;
|
|
16129
|
-
}
|
|
16130
|
-
declare const FqnExprWhere = "FqnExprWhere";
|
|
16131
|
-
interface FqnExprWith extends AstNode {
|
|
16132
|
-
readonly $container: Expressions;
|
|
16133
|
-
readonly $type: 'FqnExprWith';
|
|
16134
|
-
custom?: CustomElementProperties;
|
|
16135
|
-
subject: FqnExprOrWhere;
|
|
16136
|
-
}
|
|
16137
|
-
declare const FqnExprWith = "FqnExprWith";
|
|
16138
|
-
interface FqnRef extends AstNode {
|
|
16139
|
-
readonly $container: DeploymentRelation | ElementRef | FqnRef | FqnRefExpr | Relation;
|
|
16140
|
-
readonly $type: 'FqnRef';
|
|
16141
|
-
parent?: FqnRef;
|
|
16142
|
-
value: Reference<Referenceable>;
|
|
16143
|
-
}
|
|
16144
|
-
declare const FqnRef = "FqnRef";
|
|
16145
|
-
interface FqnRefExpr extends AstNode {
|
|
16146
|
-
readonly $container: DirectedRelationExpr | Expressions | FqnExprWhere | FqnExprWith | FqnExpressions | IncomingRelationExpr | OutgoingRelationExpr;
|
|
16147
|
-
readonly $type: 'FqnRefExpr';
|
|
16148
|
-
ref: FqnRef;
|
|
16149
|
-
selector?: string;
|
|
16150
|
-
}
|
|
16151
|
-
declare const FqnRefExpr = "FqnRefExpr";
|
|
16152
|
-
interface GlobalDynamicPredicateGroup extends AstNode {
|
|
16153
|
-
readonly $container: Globals;
|
|
16154
|
-
readonly $type: 'GlobalDynamicPredicateGroup';
|
|
16155
|
-
name: string;
|
|
16156
|
-
predicates: Array<DynamicViewIncludePredicate>;
|
|
16157
|
-
}
|
|
16158
|
-
declare const GlobalDynamicPredicateGroup = "GlobalDynamicPredicateGroup";
|
|
16159
|
-
interface GlobalPredicateGroup extends AstNode {
|
|
16160
|
-
readonly $container: Globals;
|
|
16161
|
-
readonly $type: 'GlobalPredicateGroup';
|
|
16162
|
-
name: string;
|
|
16163
|
-
predicates: Array<ViewRulePredicate>;
|
|
16164
|
-
}
|
|
16165
|
-
declare const GlobalPredicateGroup = "GlobalPredicateGroup";
|
|
16166
|
-
interface Globals extends AstNode {
|
|
16167
|
-
readonly $container: LikeC4Grammar;
|
|
16168
|
-
readonly $type: 'Globals';
|
|
16169
|
-
name: 'global';
|
|
16170
|
-
predicates: Array<GlobalDynamicPredicateGroup | GlobalPredicateGroup>;
|
|
16171
|
-
styles: Array<GlobalStyle | GlobalStyleGroup>;
|
|
16172
|
-
}
|
|
16173
|
-
declare const Globals = "Globals";
|
|
16174
|
-
interface GlobalStyle extends AstNode {
|
|
16175
|
-
readonly $container: Globals;
|
|
16176
|
-
readonly $type: 'GlobalStyle';
|
|
16177
|
-
id: GlobalStyleId;
|
|
16178
|
-
props: Array<NotationProperty | StyleProperty>;
|
|
16179
|
-
targets: FqnExpressions;
|
|
16180
|
-
}
|
|
16181
|
-
declare const GlobalStyle = "GlobalStyle";
|
|
16182
|
-
interface GlobalStyleGroup extends AstNode {
|
|
16183
|
-
readonly $container: Globals;
|
|
16184
|
-
readonly $type: 'GlobalStyleGroup';
|
|
16185
|
-
id: GlobalStyleId;
|
|
16186
|
-
styles: Array<ViewRuleStyle>;
|
|
16187
|
-
}
|
|
16188
|
-
declare const GlobalStyleGroup = "GlobalStyleGroup";
|
|
16189
|
-
interface GlobalStyleId extends AstNode {
|
|
16190
|
-
readonly $container: GlobalStyle | GlobalStyleGroup;
|
|
16191
|
-
readonly $type: 'GlobalStyleId';
|
|
16192
|
-
name: string;
|
|
14681
|
+
declare const GlobalStyleGroup = "GlobalStyleGroup";
|
|
14682
|
+
interface GlobalStyleId extends AstNode {
|
|
14683
|
+
readonly $container: GlobalStyle | GlobalStyleGroup;
|
|
14684
|
+
readonly $type: 'GlobalStyleId';
|
|
14685
|
+
name: string;
|
|
16193
14686
|
}
|
|
16194
14687
|
declare const GlobalStyleId = "GlobalStyleId";
|
|
16195
14688
|
interface HexColor extends AstNode {
|
|
@@ -16845,6 +15338,15 @@ type LikeC4AstType = {
|
|
|
16845
15338
|
WildcardExpression: WildcardExpression;
|
|
16846
15339
|
};
|
|
16847
15340
|
|
|
15341
|
+
declare class LikeC4DocumentValidator extends DefaultDocumentValidator {
|
|
15342
|
+
protected services: LikeC4Services;
|
|
15343
|
+
constructor(services: LikeC4Services);
|
|
15344
|
+
/**
|
|
15345
|
+
* If the document is excluded, then we skip validation and return an empty array of diagnostics.
|
|
15346
|
+
*/
|
|
15347
|
+
validateDocument(document: LangiumDocument, options?: ValidationOptions, cancelToken?: CancellationToken): Promise<Diagnostic[]>;
|
|
15348
|
+
}
|
|
15349
|
+
|
|
16848
15350
|
type Guard<N extends AstNode> = (n: AstNode) => n is N;
|
|
16849
15351
|
type Guarded<G> = G extends Guard<infer N> ? N : never;
|
|
16850
15352
|
declare const isValidatableAstNode: (n: AstNode) => n is HexColor | RGBAColor | DeployedInstance | DeploymentNode | DeploymentViewRulePredicate | DeploymentViewRuleStyle | ViewRuleAutoLayout | DynamicViewGlobalPredicateRef | DynamicViewIncludePredicate | ViewRuleGlobalStyle | ViewRuleStyle | ElementStringProperty | ElementStyleProperty | IconProperty | LinkProperty | MetadataBody | ElementKindExpression | ElementTagExpression | FqnRefExpr | WildcardExpression | FqnExprWhere | FqnExprWith | DirectedRelationExpr | InOutRelationExpr | IncomingRelationExpr | OutgoingRelationExpr | RelationExprWhere | RelationExprWith | Element | ExtendDeployment | ExtendElement | Imported | DeploymentView | DynamicView | ElementView | RelationStringProperty | ArrowProperty | ColorProperty | LineProperty | PaddingSizeProperty | ShapeSizeProperty | TextSizeProperty | MetadataAttribute | NotationProperty | NotesProperty | SpecificationElementStringProperty | SpecificationRelationshipStringProperty | ViewStringProperty | BorderProperty | MultipleProperty | OpacityProperty | ShapeProperty | ViewRuleGlobalPredicateRef | ViewRuleGroup | ViewRulePredicate | SpecificationRelationshipKind | GlobalStyle | SpecificationColor | NavigateToProperty | DynamicViewStep | ElementRef | DeploymentRelation | Tags | SpecificationDeploymentNodeKind | DynamicViewParallelSteps | GlobalDynamicPredicateGroup | Relation | SpecificationElementKind | Globals | GlobalPredicateGroup | GlobalStyleGroup | SpecificationTag | ImportsFromPoject | SpecificationRule;
|
|
@@ -16981,102 +15483,1637 @@ interface ParsedAstElementView {
|
|
|
16981
15483
|
rules: c4.ElementViewRule[];
|
|
16982
15484
|
manualLayout?: c4.ViewManualLayout;
|
|
16983
15485
|
}
|
|
16984
|
-
interface ParsedAstDynamicView {
|
|
16985
|
-
id: c4.ViewId;
|
|
16986
|
-
astPath: string;
|
|
16987
|
-
title: string | null;
|
|
16988
|
-
description: c4.MarkdownOrString | null;
|
|
16989
|
-
tags: c4.NonEmptyArray<c4.Tag> | null;
|
|
16990
|
-
links: c4.NonEmptyArray<c4.Link> | null;
|
|
16991
|
-
steps: c4.DynamicViewStepOrParallel[];
|
|
16992
|
-
rules: Array<c4.DynamicViewRule>;
|
|
16993
|
-
manualLayout?: c4.ViewManualLayout;
|
|
15486
|
+
interface ParsedAstDynamicView {
|
|
15487
|
+
id: c4.ViewId;
|
|
15488
|
+
astPath: string;
|
|
15489
|
+
title: string | null;
|
|
15490
|
+
description: c4.MarkdownOrString | null;
|
|
15491
|
+
tags: c4.NonEmptyArray<c4.Tag> | null;
|
|
15492
|
+
links: c4.NonEmptyArray<c4.Link> | null;
|
|
15493
|
+
steps: c4.DynamicViewStepOrParallel[];
|
|
15494
|
+
rules: Array<c4.DynamicViewRule>;
|
|
15495
|
+
manualLayout?: c4.ViewManualLayout;
|
|
15496
|
+
}
|
|
15497
|
+
interface ParsedAstDeploymentView {
|
|
15498
|
+
id: c4.ViewId;
|
|
15499
|
+
astPath: string;
|
|
15500
|
+
title: string | null;
|
|
15501
|
+
description: c4.MarkdownOrString | null;
|
|
15502
|
+
tags: c4.NonEmptyArray<c4.Tag> | null;
|
|
15503
|
+
links: c4.NonEmptyArray<c4.Link> | null;
|
|
15504
|
+
rules: Array<c4.DeploymentViewRule>;
|
|
15505
|
+
}
|
|
15506
|
+
type ParsedAstView = ParsedAstElementView | ParsedAstDynamicView | ParsedAstDeploymentView;
|
|
15507
|
+
interface AstNodeDescriptionWithFqn extends AstNodeDescription {
|
|
15508
|
+
likec4ProjectId: c4.ProjectId;
|
|
15509
|
+
id: c4.Fqn;
|
|
15510
|
+
}
|
|
15511
|
+
type LikeC4AstNode = ValueOf<ConditionalPick<LikeC4AstType, AstNode>>;
|
|
15512
|
+
type LikeC4DocumentDiagnostic = Diagnostic & DiagnosticInfo<LikeC4AstNode>;
|
|
15513
|
+
interface LikeC4DocumentProps {
|
|
15514
|
+
diagnostics?: Array<LikeC4DocumentDiagnostic>;
|
|
15515
|
+
c4Specification?: ParsedAstSpecification;
|
|
15516
|
+
c4Elements?: ParsedAstElement[];
|
|
15517
|
+
c4ExtendElements?: ParsedAstExtend[];
|
|
15518
|
+
c4ExtendDeployments?: ParsedAstExtend[];
|
|
15519
|
+
c4Relations?: ParsedAstRelation[];
|
|
15520
|
+
c4Globals?: ParsedAstGlobals;
|
|
15521
|
+
c4Views?: ParsedAstView[];
|
|
15522
|
+
c4Deployments?: ParsedAstDeployment[];
|
|
15523
|
+
c4DeploymentRelations?: ParsedAstDeploymentRelation[];
|
|
15524
|
+
c4Imports?: MultiMap$1<c4.ProjectId, c4.Fqn, Set<c4.Fqn>>;
|
|
15525
|
+
}
|
|
15526
|
+
type LikeC4GrammarDocument = Omit<LangiumDocument<LikeC4Grammar>, 'diagnostics'>;
|
|
15527
|
+
interface LikeC4LangiumDocument extends LikeC4GrammarDocument, LikeC4DocumentProps {
|
|
15528
|
+
likec4ProjectId: c4.ProjectId;
|
|
15529
|
+
}
|
|
15530
|
+
interface ParsedLikeC4LangiumDocument extends LikeC4GrammarDocument, Required<LikeC4DocumentProps> {
|
|
15531
|
+
likec4ProjectId: c4.ProjectId;
|
|
15532
|
+
}
|
|
15533
|
+
|
|
15534
|
+
declare class LikeC4NameProvider extends DefaultNameProvider {
|
|
15535
|
+
protected services: LikeC4Services;
|
|
15536
|
+
constructor(services: LikeC4Services);
|
|
15537
|
+
getNameStrict(node: AstNode): string;
|
|
15538
|
+
getName(node: AstNode): string | undefined;
|
|
15539
|
+
getNameNode(node: AstNode): CstNode | undefined;
|
|
15540
|
+
}
|
|
15541
|
+
|
|
15542
|
+
type ElementsContainer = Model | ElementBody | ExtendElementBody;
|
|
15543
|
+
type DeploymentsContainer = ModelDeployments | DeploymentNodeBody | ExtendDeploymentBody | DeployedInstanceBody;
|
|
15544
|
+
declare class LikeC4ScopeComputation extends DefaultScopeComputation {
|
|
15545
|
+
constructor(services: LikeC4Services);
|
|
15546
|
+
computeExports(document: LikeC4LangiumDocument, _cancelToken?: CancellationToken): Promise<AstNodeDescription[]>;
|
|
15547
|
+
private exportViews;
|
|
15548
|
+
private exportGlobals;
|
|
15549
|
+
private exportModel;
|
|
15550
|
+
private exportLibrary;
|
|
15551
|
+
private exportSpecification;
|
|
15552
|
+
private exportDeployments;
|
|
15553
|
+
computeLocalScopes(document: LikeC4LangiumDocument, _cancelToken?: CancellationToken): Promise<PrecomputedScopes>;
|
|
15554
|
+
protected processContainer(container: ElementsContainer, scopes: PrecomputedScopes, document: LikeC4LangiumDocument): AstNodeDescription[];
|
|
15555
|
+
protected processDeployments(container: DeploymentsContainer, scopes: PrecomputedScopes, document: LikeC4LangiumDocument): AstNodeDescription[];
|
|
15556
|
+
}
|
|
15557
|
+
|
|
15558
|
+
declare class IndexManager extends DefaultIndexManager {
|
|
15559
|
+
protected services: LikeC4SharedServices;
|
|
15560
|
+
constructor(services: LikeC4SharedServices);
|
|
15561
|
+
updateContent(document: LangiumDocument, cancelToken?: CancellationToken): Promise<void>;
|
|
15562
|
+
projectElements(projectId: ProjectId, nodeType?: string, uris?: Set<string>): Stream<AstNodeDescription>;
|
|
15563
|
+
}
|
|
15564
|
+
|
|
15565
|
+
declare class LangiumDocuments extends DefaultLangiumDocuments {
|
|
15566
|
+
protected services: LikeC4SharedServices;
|
|
15567
|
+
constructor(services: LikeC4SharedServices);
|
|
15568
|
+
/**
|
|
15569
|
+
* Returns all user documents, excluding built-in documents.
|
|
15570
|
+
*/
|
|
15571
|
+
get allExcludingBuiltin(): Stream<LikeC4LangiumDocument>;
|
|
15572
|
+
projectDocuments(projectId: ProjectId): Stream<LikeC4LangiumDocument>;
|
|
15573
|
+
groupedByProject(): Record<ProjectId, NonEmptyArray<LikeC4LangiumDocument>>;
|
|
15574
|
+
resetProjectIds(): void;
|
|
15575
|
+
}
|
|
15576
|
+
|
|
15577
|
+
/**
|
|
15578
|
+
* Fallback type.
|
|
15579
|
+
*/
|
|
15580
|
+
type Fallback<TSchema extends BaseSchema<unknown, unknown, BaseIssue<unknown>>> = MaybeReadonly<InferOutput<TSchema>> | ((dataset?: OutputDataset<InferOutput<TSchema>, InferIssue<TSchema>>, config?: Config<InferIssue<TSchema>>) => MaybeReadonly<InferOutput<TSchema>>);
|
|
15581
|
+
/**
|
|
15582
|
+
* Schema with fallback type.
|
|
15583
|
+
*/
|
|
15584
|
+
type SchemaWithFallback<TSchema extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, TFallback extends Fallback<TSchema>> = TSchema & {
|
|
15585
|
+
/**
|
|
15586
|
+
* The fallback value.
|
|
15587
|
+
*/
|
|
15588
|
+
readonly fallback: TFallback;
|
|
15589
|
+
};
|
|
15590
|
+
|
|
15591
|
+
/**
|
|
15592
|
+
* Fallback async type.
|
|
15593
|
+
*/
|
|
15594
|
+
type FallbackAsync<TSchema extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>> = MaybeReadonly<InferOutput<TSchema>> | ((dataset?: OutputDataset<InferOutput<TSchema>, InferIssue<TSchema>>, config?: Config<InferIssue<TSchema>>) => MaybePromise<MaybeReadonly<InferOutput<TSchema>>>);
|
|
15595
|
+
/**
|
|
15596
|
+
* Schema with fallback async type.
|
|
15597
|
+
*/
|
|
15598
|
+
type SchemaWithFallbackAsync<TSchema extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, TFallback extends FallbackAsync<TSchema>> = Omit<TSchema, 'async' | '~standard' | '~run'> & {
|
|
15599
|
+
/**
|
|
15600
|
+
* The fallback value.
|
|
15601
|
+
*/
|
|
15602
|
+
readonly fallback: TFallback;
|
|
15603
|
+
/**
|
|
15604
|
+
* Whether it's async.
|
|
15605
|
+
*/
|
|
15606
|
+
readonly async: true;
|
|
15607
|
+
/**
|
|
15608
|
+
* The Standard Schema properties.
|
|
15609
|
+
*
|
|
15610
|
+
* @internal
|
|
15611
|
+
*/
|
|
15612
|
+
readonly '~standard': StandardProps<InferInput<TSchema>, InferOutput<TSchema>>;
|
|
15613
|
+
/**
|
|
15614
|
+
* Parses unknown input values.
|
|
15615
|
+
*
|
|
15616
|
+
* @param dataset The input dataset.
|
|
15617
|
+
* @param config The configuration.
|
|
15618
|
+
*
|
|
15619
|
+
* @returns The output dataset.
|
|
15620
|
+
*
|
|
15621
|
+
* @internal
|
|
15622
|
+
*/
|
|
15623
|
+
readonly '~run': (dataset: UnknownDataset, config: Config<BaseIssue<unknown>>) => Promise<OutputDataset<InferOutput<TSchema>, InferIssue<TSchema>>>;
|
|
15624
|
+
};
|
|
15625
|
+
|
|
15626
|
+
/**
|
|
15627
|
+
* Schema with pipe type.
|
|
15628
|
+
*/
|
|
15629
|
+
type SchemaWithPipe<TPipe extends readonly [
|
|
15630
|
+
BaseSchema<unknown, unknown, BaseIssue<unknown>>,
|
|
15631
|
+
...PipeItem<any, unknown, BaseIssue<unknown>>[]
|
|
15632
|
+
]> = Omit<FirstTupleItem<TPipe>, 'pipe' | '~standard' | '~run' | '~types'> & {
|
|
15633
|
+
/**
|
|
15634
|
+
* The pipe items.
|
|
15635
|
+
*/
|
|
15636
|
+
readonly pipe: TPipe;
|
|
15637
|
+
/**
|
|
15638
|
+
* The Standard Schema properties.
|
|
15639
|
+
*
|
|
15640
|
+
* @internal
|
|
15641
|
+
*/
|
|
15642
|
+
readonly '~standard': StandardProps<InferInput<FirstTupleItem<TPipe>>, InferOutput<LastTupleItem<TPipe>>>;
|
|
15643
|
+
/**
|
|
15644
|
+
* Parses unknown input values.
|
|
15645
|
+
*
|
|
15646
|
+
* @param dataset The input dataset.
|
|
15647
|
+
* @param config The configuration.
|
|
15648
|
+
*
|
|
15649
|
+
* @returns The output dataset.
|
|
15650
|
+
*
|
|
15651
|
+
* @internal
|
|
15652
|
+
*/
|
|
15653
|
+
readonly '~run': (dataset: UnknownDataset, config: Config<BaseIssue<unknown>>) => OutputDataset<InferOutput<LastTupleItem<TPipe>>, InferIssue<TPipe[number]>>;
|
|
15654
|
+
/**
|
|
15655
|
+
* The input, output and issue type.
|
|
15656
|
+
*
|
|
15657
|
+
* @internal
|
|
15658
|
+
*/
|
|
15659
|
+
readonly '~types'?: {
|
|
15660
|
+
readonly input: InferInput<FirstTupleItem<TPipe>>;
|
|
15661
|
+
readonly output: InferOutput<LastTupleItem<TPipe>>;
|
|
15662
|
+
readonly issue: InferIssue<TPipe[number]>;
|
|
15663
|
+
} | undefined;
|
|
15664
|
+
};
|
|
15665
|
+
|
|
15666
|
+
/**
|
|
15667
|
+
* Schema with pipe async type.
|
|
15668
|
+
*/
|
|
15669
|
+
type SchemaWithPipeAsync<TPipe extends readonly [
|
|
15670
|
+
(BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>),
|
|
15671
|
+
...(PipeItem<any, unknown, BaseIssue<unknown>> | PipeItemAsync<any, unknown, BaseIssue<unknown>>)[]
|
|
15672
|
+
]> = Omit<FirstTupleItem<TPipe>, 'async' | 'pipe' | '~standard' | '~run' | '~types'> & {
|
|
15673
|
+
/**
|
|
15674
|
+
* The pipe items.
|
|
15675
|
+
*/
|
|
15676
|
+
readonly pipe: TPipe;
|
|
15677
|
+
/**
|
|
15678
|
+
* Whether it's async.
|
|
15679
|
+
*/
|
|
15680
|
+
readonly async: true;
|
|
15681
|
+
/**
|
|
15682
|
+
* The Standard Schema properties.
|
|
15683
|
+
*
|
|
15684
|
+
* @internal
|
|
15685
|
+
*/
|
|
15686
|
+
readonly '~standard': StandardProps<InferInput<FirstTupleItem<TPipe>>, InferOutput<LastTupleItem<TPipe>>>;
|
|
15687
|
+
/**
|
|
15688
|
+
* Parses unknown input values.
|
|
15689
|
+
*
|
|
15690
|
+
* @param dataset The input dataset.
|
|
15691
|
+
* @param config The configuration.
|
|
15692
|
+
*
|
|
15693
|
+
* @returns The output dataset.
|
|
15694
|
+
*
|
|
15695
|
+
* @internal
|
|
15696
|
+
*/
|
|
15697
|
+
readonly '~run': (dataset: UnknownDataset, config: Config<BaseIssue<unknown>>) => Promise<OutputDataset<InferOutput<LastTupleItem<TPipe>>, InferIssue<TPipe[number]>>>;
|
|
15698
|
+
/**
|
|
15699
|
+
* The input, output and issue type.
|
|
15700
|
+
*
|
|
15701
|
+
* @internal
|
|
15702
|
+
*/
|
|
15703
|
+
readonly '~types'?: {
|
|
15704
|
+
readonly input: InferInput<FirstTupleItem<TPipe>>;
|
|
15705
|
+
readonly output: InferOutput<LastTupleItem<TPipe>>;
|
|
15706
|
+
readonly issue: InferIssue<TPipe[number]>;
|
|
15707
|
+
} | undefined;
|
|
15708
|
+
};
|
|
15709
|
+
|
|
15710
|
+
/**
|
|
15711
|
+
* Base metadata interface.
|
|
15712
|
+
*/
|
|
15713
|
+
interface BaseMetadata<TInput> {
|
|
15714
|
+
/**
|
|
15715
|
+
* The object kind.
|
|
15716
|
+
*/
|
|
15717
|
+
readonly kind: 'metadata';
|
|
15718
|
+
/**
|
|
15719
|
+
* The metadata type.
|
|
15720
|
+
*/
|
|
15721
|
+
readonly type: string;
|
|
15722
|
+
/**
|
|
15723
|
+
* The metadata reference.
|
|
15724
|
+
*/
|
|
15725
|
+
readonly reference: (...args: any[]) => BaseMetadata<any>;
|
|
15726
|
+
/**
|
|
15727
|
+
* The input, output and issue type.
|
|
15728
|
+
*
|
|
15729
|
+
* @internal
|
|
15730
|
+
*/
|
|
15731
|
+
readonly '~types'?: {
|
|
15732
|
+
readonly input: TInput;
|
|
15733
|
+
readonly output: TInput;
|
|
15734
|
+
readonly issue: never;
|
|
15735
|
+
} | undefined;
|
|
15736
|
+
}
|
|
15737
|
+
|
|
15738
|
+
/**
|
|
15739
|
+
* Unknown dataset interface.
|
|
15740
|
+
*/
|
|
15741
|
+
interface UnknownDataset {
|
|
15742
|
+
/**
|
|
15743
|
+
* Whether is's typed.
|
|
15744
|
+
*/
|
|
15745
|
+
typed?: false;
|
|
15746
|
+
/**
|
|
15747
|
+
* The dataset value.
|
|
15748
|
+
*/
|
|
15749
|
+
value: unknown;
|
|
15750
|
+
/**
|
|
15751
|
+
* The dataset issues.
|
|
15752
|
+
*/
|
|
15753
|
+
issues?: undefined;
|
|
15754
|
+
}
|
|
15755
|
+
/**
|
|
15756
|
+
* Success dataset interface.
|
|
15757
|
+
*/
|
|
15758
|
+
interface SuccessDataset<TValue> {
|
|
15759
|
+
/**
|
|
15760
|
+
* Whether is's typed.
|
|
15761
|
+
*/
|
|
15762
|
+
typed: true;
|
|
15763
|
+
/**
|
|
15764
|
+
* The dataset value.
|
|
15765
|
+
*/
|
|
15766
|
+
value: TValue;
|
|
15767
|
+
/**
|
|
15768
|
+
* The dataset issues.
|
|
15769
|
+
*/
|
|
15770
|
+
issues?: undefined;
|
|
15771
|
+
}
|
|
15772
|
+
/**
|
|
15773
|
+
* Partial dataset interface.
|
|
15774
|
+
*/
|
|
15775
|
+
interface PartialDataset<TValue, TIssue extends BaseIssue<unknown>> {
|
|
15776
|
+
/**
|
|
15777
|
+
* Whether is's typed.
|
|
15778
|
+
*/
|
|
15779
|
+
typed: true;
|
|
15780
|
+
/**
|
|
15781
|
+
* The dataset value.
|
|
15782
|
+
*/
|
|
15783
|
+
value: TValue;
|
|
15784
|
+
/**
|
|
15785
|
+
* The dataset issues.
|
|
15786
|
+
*/
|
|
15787
|
+
issues: [TIssue, ...TIssue[]];
|
|
15788
|
+
}
|
|
15789
|
+
/**
|
|
15790
|
+
* Failure dataset interface.
|
|
15791
|
+
*/
|
|
15792
|
+
interface FailureDataset<TIssue extends BaseIssue<unknown>> {
|
|
15793
|
+
/**
|
|
15794
|
+
* Whether is's typed.
|
|
15795
|
+
*/
|
|
15796
|
+
typed: false;
|
|
15797
|
+
/**
|
|
15798
|
+
* The dataset value.
|
|
15799
|
+
*/
|
|
15800
|
+
value: unknown;
|
|
15801
|
+
/**
|
|
15802
|
+
* The dataset issues.
|
|
15803
|
+
*/
|
|
15804
|
+
issues: [TIssue, ...TIssue[]];
|
|
15805
|
+
}
|
|
15806
|
+
/**
|
|
15807
|
+
* Output dataset type.
|
|
15808
|
+
*/
|
|
15809
|
+
type OutputDataset<TValue, TIssue extends BaseIssue<unknown>> = SuccessDataset<TValue> | PartialDataset<TValue, TIssue> | FailureDataset<TIssue>;
|
|
15810
|
+
|
|
15811
|
+
/**
|
|
15812
|
+
* The Standard Schema properties interface.
|
|
15813
|
+
*/
|
|
15814
|
+
interface StandardProps<TInput, TOutput> {
|
|
15815
|
+
/**
|
|
15816
|
+
* The version number of the standard.
|
|
15817
|
+
*/
|
|
15818
|
+
readonly version: 1;
|
|
15819
|
+
/**
|
|
15820
|
+
* The vendor name of the schema library.
|
|
15821
|
+
*/
|
|
15822
|
+
readonly vendor: 'valibot';
|
|
15823
|
+
/**
|
|
15824
|
+
* Validates unknown input values.
|
|
15825
|
+
*/
|
|
15826
|
+
readonly validate: (value: unknown) => StandardResult<TOutput> | Promise<StandardResult<TOutput>>;
|
|
15827
|
+
/**
|
|
15828
|
+
* Inferred types associated with the schema.
|
|
15829
|
+
*/
|
|
15830
|
+
readonly types?: StandardTypes<TInput, TOutput> | undefined;
|
|
15831
|
+
}
|
|
15832
|
+
/**
|
|
15833
|
+
* The result interface of the validate function.
|
|
15834
|
+
*/
|
|
15835
|
+
type StandardResult<TOutput> = StandardSuccessResult<TOutput> | StandardFailureResult;
|
|
15836
|
+
/**
|
|
15837
|
+
* The result interface if validation succeeds.
|
|
15838
|
+
*/
|
|
15839
|
+
interface StandardSuccessResult<TOutput> {
|
|
15840
|
+
/**
|
|
15841
|
+
* The typed output value.
|
|
15842
|
+
*/
|
|
15843
|
+
readonly value: TOutput;
|
|
15844
|
+
/**
|
|
15845
|
+
* The non-existent issues.
|
|
15846
|
+
*/
|
|
15847
|
+
readonly issues?: undefined;
|
|
15848
|
+
}
|
|
15849
|
+
/**
|
|
15850
|
+
* The result interface if validation fails.
|
|
15851
|
+
*/
|
|
15852
|
+
interface StandardFailureResult {
|
|
15853
|
+
/**
|
|
15854
|
+
* The issues of failed validation.
|
|
15855
|
+
*/
|
|
15856
|
+
readonly issues: readonly StandardIssue[];
|
|
15857
|
+
}
|
|
15858
|
+
/**
|
|
15859
|
+
* The issue interface of the failure output.
|
|
15860
|
+
*/
|
|
15861
|
+
interface StandardIssue {
|
|
15862
|
+
/**
|
|
15863
|
+
* The error message of the issue.
|
|
15864
|
+
*/
|
|
15865
|
+
readonly message: string;
|
|
15866
|
+
/**
|
|
15867
|
+
* The path of the issue, if any.
|
|
15868
|
+
*/
|
|
15869
|
+
readonly path?: readonly (PropertyKey | StandardPathItem)[] | undefined;
|
|
15870
|
+
}
|
|
15871
|
+
/**
|
|
15872
|
+
* The path item interface of the issue.
|
|
15873
|
+
*/
|
|
15874
|
+
interface StandardPathItem {
|
|
15875
|
+
/**
|
|
15876
|
+
* The key of the path item.
|
|
15877
|
+
*/
|
|
15878
|
+
readonly key: PropertyKey;
|
|
15879
|
+
}
|
|
15880
|
+
/**
|
|
15881
|
+
* The Standard Schema types interface.
|
|
15882
|
+
*/
|
|
15883
|
+
interface StandardTypes<TInput, TOutput> {
|
|
15884
|
+
/**
|
|
15885
|
+
* The input type of the schema.
|
|
15886
|
+
*/
|
|
15887
|
+
readonly input: TInput;
|
|
15888
|
+
/**
|
|
15889
|
+
* The output type of the schema.
|
|
15890
|
+
*/
|
|
15891
|
+
readonly output: TOutput;
|
|
15892
|
+
}
|
|
15893
|
+
|
|
15894
|
+
/**
|
|
15895
|
+
* Base schema interface.
|
|
15896
|
+
*/
|
|
15897
|
+
interface BaseSchema<TInput, TOutput, TIssue extends BaseIssue<unknown>> {
|
|
15898
|
+
/**
|
|
15899
|
+
* The object kind.
|
|
15900
|
+
*/
|
|
15901
|
+
readonly kind: 'schema';
|
|
15902
|
+
/**
|
|
15903
|
+
* The schema type.
|
|
15904
|
+
*/
|
|
15905
|
+
readonly type: string;
|
|
15906
|
+
/**
|
|
15907
|
+
* The schema reference.
|
|
15908
|
+
*/
|
|
15909
|
+
readonly reference: (...args: any[]) => BaseSchema<unknown, unknown, BaseIssue<unknown>>;
|
|
15910
|
+
/**
|
|
15911
|
+
* The expected property.
|
|
15912
|
+
*/
|
|
15913
|
+
readonly expects: string;
|
|
15914
|
+
/**
|
|
15915
|
+
* Whether it's async.
|
|
15916
|
+
*/
|
|
15917
|
+
readonly async: false;
|
|
15918
|
+
/**
|
|
15919
|
+
* The Standard Schema properties.
|
|
15920
|
+
*
|
|
15921
|
+
* @internal
|
|
15922
|
+
*/
|
|
15923
|
+
readonly '~standard': StandardProps<TInput, TOutput>;
|
|
15924
|
+
/**
|
|
15925
|
+
* Parses unknown input values.
|
|
15926
|
+
*
|
|
15927
|
+
* @param dataset The input dataset.
|
|
15928
|
+
* @param config The configuration.
|
|
15929
|
+
*
|
|
15930
|
+
* @returns The output dataset.
|
|
15931
|
+
*
|
|
15932
|
+
* @internal
|
|
15933
|
+
*/
|
|
15934
|
+
readonly '~run': (dataset: UnknownDataset, config: Config<BaseIssue<unknown>>) => OutputDataset<TOutput, TIssue>;
|
|
15935
|
+
/**
|
|
15936
|
+
* The input, output and issue type.
|
|
15937
|
+
*
|
|
15938
|
+
* @internal
|
|
15939
|
+
*/
|
|
15940
|
+
readonly '~types'?: {
|
|
15941
|
+
readonly input: TInput;
|
|
15942
|
+
readonly output: TOutput;
|
|
15943
|
+
readonly issue: TIssue;
|
|
15944
|
+
} | undefined;
|
|
15945
|
+
}
|
|
15946
|
+
/**
|
|
15947
|
+
* Base schema async interface.
|
|
15948
|
+
*/
|
|
15949
|
+
interface BaseSchemaAsync<TInput, TOutput, TIssue extends BaseIssue<unknown>> extends Omit<BaseSchema<TInput, TOutput, TIssue>, 'reference' | 'async' | '~run'> {
|
|
15950
|
+
/**
|
|
15951
|
+
* The schema reference.
|
|
15952
|
+
*/
|
|
15953
|
+
readonly reference: (...args: any[]) => BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>;
|
|
15954
|
+
/**
|
|
15955
|
+
* Whether it's async.
|
|
15956
|
+
*/
|
|
15957
|
+
readonly async: true;
|
|
15958
|
+
/**
|
|
15959
|
+
* Parses unknown input values.
|
|
15960
|
+
*
|
|
15961
|
+
* @param dataset The input dataset.
|
|
15962
|
+
* @param config The configuration.
|
|
15963
|
+
*
|
|
15964
|
+
* @returns The output dataset.
|
|
15965
|
+
*
|
|
15966
|
+
* @internal
|
|
15967
|
+
*/
|
|
15968
|
+
readonly '~run': (dataset: UnknownDataset, config: Config<BaseIssue<unknown>>) => Promise<OutputDataset<TOutput, TIssue>>;
|
|
15969
|
+
}
|
|
15970
|
+
|
|
15971
|
+
/**
|
|
15972
|
+
* Base transformation interface.
|
|
15973
|
+
*/
|
|
15974
|
+
interface BaseTransformation<TInput, TOutput, TIssue extends BaseIssue<unknown>> {
|
|
15975
|
+
/**
|
|
15976
|
+
* The object kind.
|
|
15977
|
+
*/
|
|
15978
|
+
readonly kind: 'transformation';
|
|
15979
|
+
/**
|
|
15980
|
+
* The transformation type.
|
|
15981
|
+
*/
|
|
15982
|
+
readonly type: string;
|
|
15983
|
+
/**
|
|
15984
|
+
* The transformation reference.
|
|
15985
|
+
*/
|
|
15986
|
+
readonly reference: (...args: any[]) => BaseTransformation<any, any, BaseIssue<unknown>>;
|
|
15987
|
+
/**
|
|
15988
|
+
* Whether it's async.
|
|
15989
|
+
*/
|
|
15990
|
+
readonly async: false;
|
|
15991
|
+
/**
|
|
15992
|
+
* Transforms known input values.
|
|
15993
|
+
*
|
|
15994
|
+
* @param dataset The input dataset.
|
|
15995
|
+
* @param config The configuration.
|
|
15996
|
+
*
|
|
15997
|
+
* @returns The output dataset.
|
|
15998
|
+
*
|
|
15999
|
+
* @internal
|
|
16000
|
+
*/
|
|
16001
|
+
readonly '~run': (dataset: SuccessDataset<TInput>, config: Config<BaseIssue<unknown>>) => OutputDataset<TOutput, BaseIssue<unknown> | TIssue>;
|
|
16002
|
+
/**
|
|
16003
|
+
* The input, output and issue type.
|
|
16004
|
+
*
|
|
16005
|
+
* @internal
|
|
16006
|
+
*/
|
|
16007
|
+
readonly '~types'?: {
|
|
16008
|
+
readonly input: TInput;
|
|
16009
|
+
readonly output: TOutput;
|
|
16010
|
+
readonly issue: TIssue;
|
|
16011
|
+
} | undefined;
|
|
16012
|
+
}
|
|
16013
|
+
/**
|
|
16014
|
+
* Base transformation async interface.
|
|
16015
|
+
*/
|
|
16016
|
+
interface BaseTransformationAsync<TInput, TOutput, TIssue extends BaseIssue<unknown>> extends Omit<BaseTransformation<TInput, TOutput, TIssue>, 'reference' | 'async' | '~run'> {
|
|
16017
|
+
/**
|
|
16018
|
+
* The transformation reference.
|
|
16019
|
+
*/
|
|
16020
|
+
readonly reference: (...args: any[]) => BaseTransformation<any, any, BaseIssue<unknown>> | BaseTransformationAsync<any, any, BaseIssue<unknown>>;
|
|
16021
|
+
/**
|
|
16022
|
+
* Whether it's async.
|
|
16023
|
+
*/
|
|
16024
|
+
readonly async: true;
|
|
16025
|
+
/**
|
|
16026
|
+
* Transforms known input values.
|
|
16027
|
+
*
|
|
16028
|
+
* @param dataset The input dataset.
|
|
16029
|
+
* @param config The configuration.
|
|
16030
|
+
*
|
|
16031
|
+
* @returns The output dataset.
|
|
16032
|
+
*
|
|
16033
|
+
* @internal
|
|
16034
|
+
*/
|
|
16035
|
+
readonly '~run': (dataset: SuccessDataset<TInput>, config: Config<BaseIssue<unknown>>) => Promise<OutputDataset<TOutput, BaseIssue<unknown> | TIssue>>;
|
|
16036
|
+
}
|
|
16037
|
+
|
|
16038
|
+
/**
|
|
16039
|
+
* Base validation interface.
|
|
16040
|
+
*/
|
|
16041
|
+
interface BaseValidation<TInput, TOutput, TIssue extends BaseIssue<unknown>> {
|
|
16042
|
+
/**
|
|
16043
|
+
* The object kind.
|
|
16044
|
+
*/
|
|
16045
|
+
readonly kind: 'validation';
|
|
16046
|
+
/**
|
|
16047
|
+
* The validation type.
|
|
16048
|
+
*/
|
|
16049
|
+
readonly type: string;
|
|
16050
|
+
/**
|
|
16051
|
+
* The validation reference.
|
|
16052
|
+
*/
|
|
16053
|
+
readonly reference: (...args: any[]) => BaseValidation<any, any, BaseIssue<unknown>>;
|
|
16054
|
+
/**
|
|
16055
|
+
* The expected property.
|
|
16056
|
+
*/
|
|
16057
|
+
readonly expects: string | null;
|
|
16058
|
+
/**
|
|
16059
|
+
* Whether it's async.
|
|
16060
|
+
*/
|
|
16061
|
+
readonly async: false;
|
|
16062
|
+
/**
|
|
16063
|
+
* Validates known input values.
|
|
16064
|
+
*
|
|
16065
|
+
* @param dataset The input dataset.
|
|
16066
|
+
* @param config The configuration.
|
|
16067
|
+
*
|
|
16068
|
+
* @returns The output dataset.
|
|
16069
|
+
*
|
|
16070
|
+
* @internal
|
|
16071
|
+
*/
|
|
16072
|
+
readonly '~run': (dataset: OutputDataset<TInput, BaseIssue<unknown>>, config: Config<BaseIssue<unknown>>) => OutputDataset<TOutput, BaseIssue<unknown> | TIssue>;
|
|
16073
|
+
/**
|
|
16074
|
+
* The input, output and issue type.
|
|
16075
|
+
*
|
|
16076
|
+
* @internal
|
|
16077
|
+
*/
|
|
16078
|
+
readonly '~types'?: {
|
|
16079
|
+
readonly input: TInput;
|
|
16080
|
+
readonly output: TOutput;
|
|
16081
|
+
readonly issue: TIssue;
|
|
16082
|
+
} | undefined;
|
|
16083
|
+
}
|
|
16084
|
+
/**
|
|
16085
|
+
* Base validation async interface.
|
|
16086
|
+
*/
|
|
16087
|
+
interface BaseValidationAsync<TInput, TOutput, TIssue extends BaseIssue<unknown>> extends Omit<BaseValidation<TInput, TOutput, TIssue>, 'reference' | 'async' | '~run'> {
|
|
16088
|
+
/**
|
|
16089
|
+
* The validation reference.
|
|
16090
|
+
*/
|
|
16091
|
+
readonly reference: (...args: any[]) => BaseValidation<any, any, BaseIssue<unknown>> | BaseValidationAsync<any, any, BaseIssue<unknown>>;
|
|
16092
|
+
/**
|
|
16093
|
+
* Whether it's async.
|
|
16094
|
+
*/
|
|
16095
|
+
readonly async: true;
|
|
16096
|
+
/**
|
|
16097
|
+
* Validates known input values.
|
|
16098
|
+
*
|
|
16099
|
+
* @param dataset The input dataset.
|
|
16100
|
+
* @param config The configuration.
|
|
16101
|
+
*
|
|
16102
|
+
* @returns The output dataset.
|
|
16103
|
+
*
|
|
16104
|
+
* @internal
|
|
16105
|
+
*/
|
|
16106
|
+
readonly '~run': (dataset: OutputDataset<TInput, BaseIssue<unknown>>, config: Config<BaseIssue<unknown>>) => Promise<OutputDataset<TOutput, BaseIssue<unknown> | TIssue>>;
|
|
16107
|
+
}
|
|
16108
|
+
|
|
16109
|
+
/**
|
|
16110
|
+
* Infer input type.
|
|
16111
|
+
*/
|
|
16112
|
+
type InferInput<TItem extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>> | BaseValidation<any, unknown, BaseIssue<unknown>> | BaseValidationAsync<any, unknown, BaseIssue<unknown>> | BaseTransformation<any, unknown, BaseIssue<unknown>> | BaseTransformationAsync<any, unknown, BaseIssue<unknown>> | BaseMetadata<any>> = NonNullable<TItem['~types']>['input'];
|
|
16113
|
+
/**
|
|
16114
|
+
* Infer output type.
|
|
16115
|
+
*/
|
|
16116
|
+
type InferOutput<TItem extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>> | BaseValidation<any, unknown, BaseIssue<unknown>> | BaseValidationAsync<any, unknown, BaseIssue<unknown>> | BaseTransformation<any, unknown, BaseIssue<unknown>> | BaseTransformationAsync<any, unknown, BaseIssue<unknown>> | BaseMetadata<any>> = NonNullable<TItem['~types']>['output'];
|
|
16117
|
+
/**
|
|
16118
|
+
* Infer issue type.
|
|
16119
|
+
*/
|
|
16120
|
+
type InferIssue<TItem extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>> | BaseValidation<any, unknown, BaseIssue<unknown>> | BaseValidationAsync<any, unknown, BaseIssue<unknown>> | BaseTransformation<any, unknown, BaseIssue<unknown>> | BaseTransformationAsync<any, unknown, BaseIssue<unknown>> | BaseMetadata<any>> = NonNullable<TItem['~types']>['issue'];
|
|
16121
|
+
/**
|
|
16122
|
+
* Constructs a type that is maybe readonly.
|
|
16123
|
+
*/
|
|
16124
|
+
type MaybeReadonly<TValue> = TValue | Readonly<TValue>;
|
|
16125
|
+
/**
|
|
16126
|
+
* Constructs a type that is maybe a promise.
|
|
16127
|
+
*/
|
|
16128
|
+
type MaybePromise<TValue> = TValue | Promise<TValue>;
|
|
16129
|
+
/**
|
|
16130
|
+
* Prettifies a type for better readability.
|
|
16131
|
+
*
|
|
16132
|
+
* Hint: This type has no effect and is only used so that TypeScript displays
|
|
16133
|
+
* the final type in the preview instead of the utility types used.
|
|
16134
|
+
*/
|
|
16135
|
+
type Prettify<TObject> = {
|
|
16136
|
+
[TKey in keyof TObject]: TObject[TKey];
|
|
16137
|
+
} & {};
|
|
16138
|
+
/**
|
|
16139
|
+
* Marks specific keys as optional.
|
|
16140
|
+
*/
|
|
16141
|
+
type MarkOptional<TObject, TKeys extends keyof TObject> = {
|
|
16142
|
+
[TKey in keyof TObject]?: unknown;
|
|
16143
|
+
} & Omit<TObject, TKeys> & Partial<Pick<TObject, TKeys>>;
|
|
16144
|
+
/**
|
|
16145
|
+
* Extracts first tuple item.
|
|
16146
|
+
*/
|
|
16147
|
+
type FirstTupleItem<TTuple extends readonly [unknown, ...unknown[]]> = TTuple[0];
|
|
16148
|
+
/**
|
|
16149
|
+
* Extracts last tuple item.
|
|
16150
|
+
*/
|
|
16151
|
+
type LastTupleItem<TTuple extends readonly [unknown, ...unknown[]]> = TTuple[TTuple extends readonly [unknown, ...infer TRest] ? TRest['length'] : never];
|
|
16152
|
+
|
|
16153
|
+
/**
|
|
16154
|
+
* Error message type.
|
|
16155
|
+
*/
|
|
16156
|
+
type ErrorMessage<TIssue extends BaseIssue<unknown>> = ((issue: TIssue) => string) | string;
|
|
16157
|
+
/**
|
|
16158
|
+
* Default type.
|
|
16159
|
+
*/
|
|
16160
|
+
type Default<TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, TInput extends null | undefined> = MaybeReadonly<InferInput<TWrapped> | TInput> | ((dataset?: UnknownDataset, config?: Config<InferIssue<TWrapped>>) => MaybeReadonly<InferInput<TWrapped> | TInput>) | undefined;
|
|
16161
|
+
/**
|
|
16162
|
+
* Default async type.
|
|
16163
|
+
*/
|
|
16164
|
+
type DefaultAsync<TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, TInput extends null | undefined> = MaybeReadonly<InferInput<TWrapped> | TInput> | ((dataset?: UnknownDataset, config?: Config<InferIssue<TWrapped>>) => MaybePromise<MaybeReadonly<InferInput<TWrapped> | TInput>>) | undefined;
|
|
16165
|
+
/**
|
|
16166
|
+
* Default value type.
|
|
16167
|
+
*/
|
|
16168
|
+
type DefaultValue<TDefault extends Default<BaseSchema<unknown, unknown, BaseIssue<unknown>>, null | undefined> | DefaultAsync<BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, null | undefined>> = TDefault extends DefaultAsync<infer TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, infer TInput> ? TDefault extends (dataset?: UnknownDataset, config?: Config<InferIssue<TWrapped>>) => MaybePromise<InferInput<TWrapped> | TInput> ? Awaited<ReturnType<TDefault>> : TDefault : never;
|
|
16169
|
+
|
|
16170
|
+
/**
|
|
16171
|
+
* Optional entry schema type.
|
|
16172
|
+
*/
|
|
16173
|
+
type OptionalEntrySchema = ExactOptionalSchema<BaseSchema<unknown, unknown, BaseIssue<unknown>>, unknown> | NullishSchema<BaseSchema<unknown, unknown, BaseIssue<unknown>>, unknown> | OptionalSchema<BaseSchema<unknown, unknown, BaseIssue<unknown>>, unknown>;
|
|
16174
|
+
/**
|
|
16175
|
+
* Optional entry schema async type.
|
|
16176
|
+
*/
|
|
16177
|
+
type OptionalEntrySchemaAsync = ExactOptionalSchemaAsync<BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, unknown> | NullishSchemaAsync<BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, unknown> | OptionalSchemaAsync<BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, unknown>;
|
|
16178
|
+
/**
|
|
16179
|
+
* Object entries interface.
|
|
16180
|
+
*/
|
|
16181
|
+
interface ObjectEntries {
|
|
16182
|
+
[key: string]: BaseSchema<unknown, unknown, BaseIssue<unknown>> | SchemaWithFallback<BaseSchema<unknown, unknown, BaseIssue<unknown>>, unknown> | OptionalEntrySchema;
|
|
16183
|
+
}
|
|
16184
|
+
/**
|
|
16185
|
+
* Object entries async interface.
|
|
16186
|
+
*/
|
|
16187
|
+
interface ObjectEntriesAsync {
|
|
16188
|
+
[key: string]: BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>> | SchemaWithFallback<BaseSchema<unknown, unknown, BaseIssue<unknown>>, unknown> | SchemaWithFallbackAsync<BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, unknown> | OptionalEntrySchema | OptionalEntrySchemaAsync;
|
|
16189
|
+
}
|
|
16190
|
+
/**
|
|
16191
|
+
* Infer entries input type.
|
|
16192
|
+
*/
|
|
16193
|
+
type InferEntriesInput<TEntries extends ObjectEntries | ObjectEntriesAsync> = {
|
|
16194
|
+
-readonly [TKey in keyof TEntries]: InferInput<TEntries[TKey]>;
|
|
16195
|
+
};
|
|
16196
|
+
/**
|
|
16197
|
+
* Infer entries output type.
|
|
16198
|
+
*/
|
|
16199
|
+
type InferEntriesOutput<TEntries extends ObjectEntries | ObjectEntriesAsync> = {
|
|
16200
|
+
-readonly [TKey in keyof TEntries]: InferOutput<TEntries[TKey]>;
|
|
16201
|
+
};
|
|
16202
|
+
/**
|
|
16203
|
+
* Optional input keys type.
|
|
16204
|
+
*/
|
|
16205
|
+
type OptionalInputKeys<TEntries extends ObjectEntries | ObjectEntriesAsync> = {
|
|
16206
|
+
[TKey in keyof TEntries]: TEntries[TKey] extends OptionalEntrySchema | OptionalEntrySchemaAsync ? TKey : never;
|
|
16207
|
+
}[keyof TEntries];
|
|
16208
|
+
/**
|
|
16209
|
+
* Optional output keys type.
|
|
16210
|
+
*/
|
|
16211
|
+
type OptionalOutputKeys<TEntries extends ObjectEntries | ObjectEntriesAsync> = {
|
|
16212
|
+
[TKey in keyof TEntries]: TEntries[TKey] extends OptionalEntrySchema | OptionalEntrySchemaAsync ? undefined extends TEntries[TKey]['default'] ? TKey : never : never;
|
|
16213
|
+
}[keyof TEntries];
|
|
16214
|
+
/**
|
|
16215
|
+
* Input with question marks type.
|
|
16216
|
+
*/
|
|
16217
|
+
type InputWithQuestionMarks<TEntries extends ObjectEntries | ObjectEntriesAsync, TObject extends InferEntriesInput<TEntries>> = MarkOptional<TObject, OptionalInputKeys<TEntries>>;
|
|
16218
|
+
/**
|
|
16219
|
+
* Output with question marks type.
|
|
16220
|
+
*/
|
|
16221
|
+
type OutputWithQuestionMarks<TEntries extends ObjectEntries | ObjectEntriesAsync, TObject extends InferEntriesOutput<TEntries>> = MarkOptional<TObject, OptionalOutputKeys<TEntries>>;
|
|
16222
|
+
/**
|
|
16223
|
+
* Readonly output keys type.
|
|
16224
|
+
*/
|
|
16225
|
+
type ReadonlyOutputKeys<TEntries extends ObjectEntries | ObjectEntriesAsync> = {
|
|
16226
|
+
[TKey in keyof TEntries]: TEntries[TKey] extends SchemaWithPipe<infer TPipe> | SchemaWithPipeAsync<infer TPipe> ? ReadonlyAction<any> extends TPipe[number] ? TKey : never : never;
|
|
16227
|
+
}[keyof TEntries];
|
|
16228
|
+
/**
|
|
16229
|
+
* Output with readonly type.
|
|
16230
|
+
*/
|
|
16231
|
+
type OutputWithReadonly<TEntries extends ObjectEntries | ObjectEntriesAsync, TObject extends OutputWithQuestionMarks<TEntries, InferEntriesOutput<TEntries>>> = Readonly<TObject> & Pick<TObject, Exclude<keyof TObject, ReadonlyOutputKeys<TEntries>>>;
|
|
16232
|
+
/**
|
|
16233
|
+
* Infer object input type.
|
|
16234
|
+
*/
|
|
16235
|
+
type InferObjectInput<TEntries extends ObjectEntries | ObjectEntriesAsync> = Prettify<InputWithQuestionMarks<TEntries, InferEntriesInput<TEntries>>>;
|
|
16236
|
+
/**
|
|
16237
|
+
* Infer object output type.
|
|
16238
|
+
*/
|
|
16239
|
+
type InferObjectOutput<TEntries extends ObjectEntries | ObjectEntriesAsync> = Prettify<OutputWithReadonly<TEntries, OutputWithQuestionMarks<TEntries, InferEntriesOutput<TEntries>>>>;
|
|
16240
|
+
/**
|
|
16241
|
+
* Infer object issue type.
|
|
16242
|
+
*/
|
|
16243
|
+
type InferObjectIssue<TEntries extends ObjectEntries | ObjectEntriesAsync> = InferIssue<TEntries[keyof TEntries]>;
|
|
16244
|
+
|
|
16245
|
+
/**
|
|
16246
|
+
* Array path item interface.
|
|
16247
|
+
*/
|
|
16248
|
+
interface ArrayPathItem {
|
|
16249
|
+
/**
|
|
16250
|
+
* The path item type.
|
|
16251
|
+
*/
|
|
16252
|
+
readonly type: 'array';
|
|
16253
|
+
/**
|
|
16254
|
+
* The path item origin.
|
|
16255
|
+
*/
|
|
16256
|
+
readonly origin: 'value';
|
|
16257
|
+
/**
|
|
16258
|
+
* The path item input.
|
|
16259
|
+
*/
|
|
16260
|
+
readonly input: MaybeReadonly<unknown[]>;
|
|
16261
|
+
/**
|
|
16262
|
+
* The path item key.
|
|
16263
|
+
*/
|
|
16264
|
+
readonly key: number;
|
|
16265
|
+
/**
|
|
16266
|
+
* The path item value.
|
|
16267
|
+
*/
|
|
16268
|
+
readonly value: unknown;
|
|
16269
|
+
}
|
|
16270
|
+
/**
|
|
16271
|
+
* Map path item interface.
|
|
16272
|
+
*/
|
|
16273
|
+
interface MapPathItem {
|
|
16274
|
+
/**
|
|
16275
|
+
* The path item type.
|
|
16276
|
+
*/
|
|
16277
|
+
readonly type: 'map';
|
|
16278
|
+
/**
|
|
16279
|
+
* The path item origin.
|
|
16280
|
+
*/
|
|
16281
|
+
readonly origin: 'key' | 'value';
|
|
16282
|
+
/**
|
|
16283
|
+
* The path item input.
|
|
16284
|
+
*/
|
|
16285
|
+
readonly input: Map<unknown, unknown>;
|
|
16286
|
+
/**
|
|
16287
|
+
* The path item key.
|
|
16288
|
+
*/
|
|
16289
|
+
readonly key: unknown;
|
|
16290
|
+
/**
|
|
16291
|
+
* The path item value.
|
|
16292
|
+
*/
|
|
16293
|
+
readonly value: unknown;
|
|
16294
|
+
}
|
|
16295
|
+
/**
|
|
16296
|
+
* Object path item interface.
|
|
16297
|
+
*/
|
|
16298
|
+
interface ObjectPathItem {
|
|
16299
|
+
/**
|
|
16300
|
+
* The path item type.
|
|
16301
|
+
*/
|
|
16302
|
+
readonly type: 'object';
|
|
16303
|
+
/**
|
|
16304
|
+
* The path item origin.
|
|
16305
|
+
*/
|
|
16306
|
+
readonly origin: 'key' | 'value';
|
|
16307
|
+
/**
|
|
16308
|
+
* The path item input.
|
|
16309
|
+
*/
|
|
16310
|
+
readonly input: Record<string, unknown>;
|
|
16311
|
+
/**
|
|
16312
|
+
* The path item key.
|
|
16313
|
+
*/
|
|
16314
|
+
readonly key: string;
|
|
16315
|
+
/**
|
|
16316
|
+
* The path item value.
|
|
16317
|
+
*/
|
|
16318
|
+
readonly value: unknown;
|
|
16319
|
+
}
|
|
16320
|
+
/**
|
|
16321
|
+
* Set path item interface.
|
|
16322
|
+
*/
|
|
16323
|
+
interface SetPathItem {
|
|
16324
|
+
/**
|
|
16325
|
+
* The path item type.
|
|
16326
|
+
*/
|
|
16327
|
+
readonly type: 'set';
|
|
16328
|
+
/**
|
|
16329
|
+
* The path item origin.
|
|
16330
|
+
*/
|
|
16331
|
+
readonly origin: 'value';
|
|
16332
|
+
/**
|
|
16333
|
+
* The path item input.
|
|
16334
|
+
*/
|
|
16335
|
+
readonly input: Set<unknown>;
|
|
16336
|
+
/**
|
|
16337
|
+
* The path item key.
|
|
16338
|
+
*/
|
|
16339
|
+
readonly key: null;
|
|
16340
|
+
/**
|
|
16341
|
+
* The path item key.
|
|
16342
|
+
*/
|
|
16343
|
+
readonly value: unknown;
|
|
16344
|
+
}
|
|
16345
|
+
/**
|
|
16346
|
+
* Unknown path item interface.
|
|
16347
|
+
*/
|
|
16348
|
+
interface UnknownPathItem {
|
|
16349
|
+
/**
|
|
16350
|
+
* The path item type.
|
|
16351
|
+
*/
|
|
16352
|
+
readonly type: 'unknown';
|
|
16353
|
+
/**
|
|
16354
|
+
* The path item origin.
|
|
16355
|
+
*/
|
|
16356
|
+
readonly origin: 'key' | 'value';
|
|
16357
|
+
/**
|
|
16358
|
+
* The path item input.
|
|
16359
|
+
*/
|
|
16360
|
+
readonly input: unknown;
|
|
16361
|
+
/**
|
|
16362
|
+
* The path item key.
|
|
16363
|
+
*/
|
|
16364
|
+
readonly key: unknown;
|
|
16365
|
+
/**
|
|
16366
|
+
* The path item value.
|
|
16367
|
+
*/
|
|
16368
|
+
readonly value: unknown;
|
|
16369
|
+
}
|
|
16370
|
+
/**
|
|
16371
|
+
* Issue path item type.
|
|
16372
|
+
*/
|
|
16373
|
+
type IssuePathItem = ArrayPathItem | MapPathItem | ObjectPathItem | SetPathItem | UnknownPathItem;
|
|
16374
|
+
/**
|
|
16375
|
+
* Base issue interface.
|
|
16376
|
+
*/
|
|
16377
|
+
interface BaseIssue<TInput> extends Config<BaseIssue<TInput>> {
|
|
16378
|
+
/**
|
|
16379
|
+
* The issue kind.
|
|
16380
|
+
*/
|
|
16381
|
+
readonly kind: 'schema' | 'validation' | 'transformation';
|
|
16382
|
+
/**
|
|
16383
|
+
* The issue type.
|
|
16384
|
+
*/
|
|
16385
|
+
readonly type: string;
|
|
16386
|
+
/**
|
|
16387
|
+
* The raw input data.
|
|
16388
|
+
*/
|
|
16389
|
+
readonly input: TInput;
|
|
16390
|
+
/**
|
|
16391
|
+
* The expected property.
|
|
16392
|
+
*/
|
|
16393
|
+
readonly expected: string | null;
|
|
16394
|
+
/**
|
|
16395
|
+
* The received property.
|
|
16396
|
+
*/
|
|
16397
|
+
readonly received: string;
|
|
16398
|
+
/**
|
|
16399
|
+
* The error message.
|
|
16400
|
+
*/
|
|
16401
|
+
readonly message: string;
|
|
16402
|
+
/**
|
|
16403
|
+
* The input requirement.
|
|
16404
|
+
*/
|
|
16405
|
+
readonly requirement?: unknown | undefined;
|
|
16406
|
+
/**
|
|
16407
|
+
* The issue path.
|
|
16408
|
+
*/
|
|
16409
|
+
readonly path?: [IssuePathItem, ...IssuePathItem[]] | undefined;
|
|
16410
|
+
/**
|
|
16411
|
+
* The sub issues.
|
|
16412
|
+
*/
|
|
16413
|
+
readonly issues?: [BaseIssue<TInput>, ...BaseIssue<TInput>[]] | undefined;
|
|
16414
|
+
}
|
|
16415
|
+
|
|
16416
|
+
/**
|
|
16417
|
+
* Config interface.
|
|
16418
|
+
*/
|
|
16419
|
+
interface Config<TIssue extends BaseIssue<unknown>> {
|
|
16420
|
+
/**
|
|
16421
|
+
* The selected language.
|
|
16422
|
+
*/
|
|
16423
|
+
readonly lang?: string | undefined;
|
|
16424
|
+
/**
|
|
16425
|
+
* The error message.
|
|
16426
|
+
*/
|
|
16427
|
+
readonly message?: ErrorMessage<TIssue> | undefined;
|
|
16428
|
+
/**
|
|
16429
|
+
* Whether it should be aborted early.
|
|
16430
|
+
*/
|
|
16431
|
+
readonly abortEarly?: boolean | undefined;
|
|
16432
|
+
/**
|
|
16433
|
+
* Whether a pipe should be aborted early.
|
|
16434
|
+
*/
|
|
16435
|
+
readonly abortPipeEarly?: boolean | undefined;
|
|
16436
|
+
}
|
|
16437
|
+
|
|
16438
|
+
/**
|
|
16439
|
+
* Pipe action type.
|
|
16440
|
+
*/
|
|
16441
|
+
type PipeAction<TInput, TOutput, TIssue extends BaseIssue<unknown>> = BaseValidation<TInput, TOutput, TIssue> | BaseTransformation<TInput, TOutput, TIssue> | BaseMetadata<TInput>;
|
|
16442
|
+
/**
|
|
16443
|
+
* Pipe action async type.
|
|
16444
|
+
*/
|
|
16445
|
+
type PipeActionAsync<TInput, TOutput, TIssue extends BaseIssue<unknown>> = BaseValidationAsync<TInput, TOutput, TIssue> | BaseTransformationAsync<TInput, TOutput, TIssue>;
|
|
16446
|
+
/**
|
|
16447
|
+
* Pipe item type.
|
|
16448
|
+
*/
|
|
16449
|
+
type PipeItem<TInput, TOutput, TIssue extends BaseIssue<unknown>> = BaseSchema<TInput, TOutput, TIssue> | PipeAction<TInput, TOutput, TIssue>;
|
|
16450
|
+
/**
|
|
16451
|
+
* Pipe item async type.
|
|
16452
|
+
*/
|
|
16453
|
+
type PipeItemAsync<TInput, TOutput, TIssue extends BaseIssue<unknown>> = BaseSchemaAsync<TInput, TOutput, TIssue> | PipeActionAsync<TInput, TOutput, TIssue>;
|
|
16454
|
+
|
|
16455
|
+
/**
|
|
16456
|
+
* Array issue interface.
|
|
16457
|
+
*/
|
|
16458
|
+
interface ArrayIssue extends BaseIssue<unknown> {
|
|
16459
|
+
/**
|
|
16460
|
+
* The issue kind.
|
|
16461
|
+
*/
|
|
16462
|
+
readonly kind: 'schema';
|
|
16463
|
+
/**
|
|
16464
|
+
* The issue type.
|
|
16465
|
+
*/
|
|
16466
|
+
readonly type: 'array';
|
|
16467
|
+
/**
|
|
16468
|
+
* The expected property.
|
|
16469
|
+
*/
|
|
16470
|
+
readonly expected: 'Array';
|
|
16471
|
+
}
|
|
16472
|
+
|
|
16473
|
+
/**
|
|
16474
|
+
* Array schema interface.
|
|
16475
|
+
*/
|
|
16476
|
+
interface ArraySchema<TItem extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, TMessage extends ErrorMessage<ArrayIssue> | undefined> extends BaseSchema<InferInput<TItem>[], InferOutput<TItem>[], ArrayIssue | InferIssue<TItem>> {
|
|
16477
|
+
/**
|
|
16478
|
+
* The schema type.
|
|
16479
|
+
*/
|
|
16480
|
+
readonly type: 'array';
|
|
16481
|
+
/**
|
|
16482
|
+
* The schema reference.
|
|
16483
|
+
*/
|
|
16484
|
+
readonly reference: typeof array;
|
|
16485
|
+
/**
|
|
16486
|
+
* The expected property.
|
|
16487
|
+
*/
|
|
16488
|
+
readonly expects: 'Array';
|
|
16489
|
+
/**
|
|
16490
|
+
* The array item schema.
|
|
16491
|
+
*/
|
|
16492
|
+
readonly item: TItem;
|
|
16493
|
+
/**
|
|
16494
|
+
* The error message.
|
|
16495
|
+
*/
|
|
16496
|
+
readonly message: TMessage;
|
|
16497
|
+
}
|
|
16498
|
+
/**
|
|
16499
|
+
* Creates an array schema.
|
|
16500
|
+
*
|
|
16501
|
+
* @param item The item schema.
|
|
16502
|
+
*
|
|
16503
|
+
* @returns An array schema.
|
|
16504
|
+
*/
|
|
16505
|
+
declare function array<const TItem extends BaseSchema<unknown, unknown, BaseIssue<unknown>>>(item: TItem): ArraySchema<TItem, undefined>;
|
|
16506
|
+
/**
|
|
16507
|
+
* Creates an array schema.
|
|
16508
|
+
*
|
|
16509
|
+
* @param item The item schema.
|
|
16510
|
+
* @param message The error message.
|
|
16511
|
+
*
|
|
16512
|
+
* @returns An array schema.
|
|
16513
|
+
*/
|
|
16514
|
+
declare function array<const TItem extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, const TMessage extends ErrorMessage<ArrayIssue> | undefined>(item: TItem, message: TMessage): ArraySchema<TItem, TMessage>;
|
|
16515
|
+
|
|
16516
|
+
/**
|
|
16517
|
+
* Exact optional schema interface.
|
|
16518
|
+
*/
|
|
16519
|
+
interface ExactOptionalSchema<TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, TDefault extends Default<TWrapped, never>> extends BaseSchema<InferInput<TWrapped>, InferOutput<TWrapped>, InferIssue<TWrapped>> {
|
|
16520
|
+
/**
|
|
16521
|
+
* The schema type.
|
|
16522
|
+
*/
|
|
16523
|
+
readonly type: 'exact_optional';
|
|
16524
|
+
/**
|
|
16525
|
+
* The schema reference.
|
|
16526
|
+
*/
|
|
16527
|
+
readonly reference: typeof exactOptional;
|
|
16528
|
+
/**
|
|
16529
|
+
* The expected property.
|
|
16530
|
+
*/
|
|
16531
|
+
readonly expects: TWrapped['expects'];
|
|
16532
|
+
/**
|
|
16533
|
+
* The wrapped schema.
|
|
16534
|
+
*/
|
|
16535
|
+
readonly wrapped: TWrapped;
|
|
16536
|
+
/**
|
|
16537
|
+
* The default value.
|
|
16538
|
+
*/
|
|
16539
|
+
readonly default: TDefault;
|
|
16540
|
+
}
|
|
16541
|
+
/**
|
|
16542
|
+
* Creates an exact optional schema.
|
|
16543
|
+
*
|
|
16544
|
+
* @param wrapped The wrapped schema.
|
|
16545
|
+
*
|
|
16546
|
+
* @returns An exact optional schema.
|
|
16547
|
+
*/
|
|
16548
|
+
declare function exactOptional<const TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>>>(wrapped: TWrapped): ExactOptionalSchema<TWrapped, undefined>;
|
|
16549
|
+
/**
|
|
16550
|
+
* Creates an exact optional schema.
|
|
16551
|
+
*
|
|
16552
|
+
* @param wrapped The wrapped schema.
|
|
16553
|
+
* @param default_ The default value.
|
|
16554
|
+
*
|
|
16555
|
+
* @returns An exact optional schema.
|
|
16556
|
+
*/
|
|
16557
|
+
declare function exactOptional<const TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, const TDefault extends Default<TWrapped, never>>(wrapped: TWrapped, default_: TDefault): ExactOptionalSchema<TWrapped, TDefault>;
|
|
16558
|
+
|
|
16559
|
+
/**
|
|
16560
|
+
* Exact optional schema async interface.
|
|
16561
|
+
*/
|
|
16562
|
+
interface ExactOptionalSchemaAsync<TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, TDefault extends DefaultAsync<TWrapped, never>> extends BaseSchemaAsync<InferInput<TWrapped>, InferOutput<TWrapped>, InferIssue<TWrapped>> {
|
|
16563
|
+
/**
|
|
16564
|
+
* The schema type.
|
|
16565
|
+
*/
|
|
16566
|
+
readonly type: 'exact_optional';
|
|
16567
|
+
/**
|
|
16568
|
+
* The schema reference.
|
|
16569
|
+
*/
|
|
16570
|
+
readonly reference: typeof exactOptional | typeof exactOptionalAsync;
|
|
16571
|
+
/**
|
|
16572
|
+
* The expected property.
|
|
16573
|
+
*/
|
|
16574
|
+
readonly expects: TWrapped['expects'];
|
|
16575
|
+
/**
|
|
16576
|
+
* The wrapped schema.
|
|
16577
|
+
*/
|
|
16578
|
+
readonly wrapped: TWrapped;
|
|
16579
|
+
/**
|
|
16580
|
+
* The default value.
|
|
16581
|
+
*/
|
|
16582
|
+
readonly default: TDefault;
|
|
16583
|
+
}
|
|
16584
|
+
/**
|
|
16585
|
+
* Creates an exact optional schema.
|
|
16586
|
+
*
|
|
16587
|
+
* @param wrapped The wrapped schema.
|
|
16588
|
+
*
|
|
16589
|
+
* @returns An exact optional schema.
|
|
16590
|
+
*/
|
|
16591
|
+
declare function exactOptionalAsync<const TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>>(wrapped: TWrapped): ExactOptionalSchemaAsync<TWrapped, undefined>;
|
|
16592
|
+
/**
|
|
16593
|
+
* Creates an exact optional schema.
|
|
16594
|
+
*
|
|
16595
|
+
* @param wrapped The wrapped schema.
|
|
16596
|
+
* @param default_ The default value.
|
|
16597
|
+
*
|
|
16598
|
+
* @returns An exact optional schema.
|
|
16599
|
+
*/
|
|
16600
|
+
declare function exactOptionalAsync<const TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, const TDefault extends DefaultAsync<TWrapped, never>>(wrapped: TWrapped, default_: TDefault): ExactOptionalSchemaAsync<TWrapped, TDefault>;
|
|
16601
|
+
|
|
16602
|
+
/**
|
|
16603
|
+
* Infer nullish output type.
|
|
16604
|
+
*/
|
|
16605
|
+
type InferNullishOutput<TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, TDefault extends DefaultAsync<TWrapped, null | undefined>> = undefined extends TDefault ? InferOutput<TWrapped> | null | undefined : InferOutput<TWrapped> | Extract<DefaultValue<TDefault>, null | undefined>;
|
|
16606
|
+
|
|
16607
|
+
/**
|
|
16608
|
+
* Nullish schema interface.
|
|
16609
|
+
*/
|
|
16610
|
+
interface NullishSchema<TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, TDefault extends Default<TWrapped, null | undefined>> extends BaseSchema<InferInput<TWrapped> | null | undefined, InferNullishOutput<TWrapped, TDefault>, InferIssue<TWrapped>> {
|
|
16611
|
+
/**
|
|
16612
|
+
* The schema type.
|
|
16613
|
+
*/
|
|
16614
|
+
readonly type: 'nullish';
|
|
16615
|
+
/**
|
|
16616
|
+
* The schema reference.
|
|
16617
|
+
*/
|
|
16618
|
+
readonly reference: typeof nullish;
|
|
16619
|
+
/**
|
|
16620
|
+
* The expected property.
|
|
16621
|
+
*/
|
|
16622
|
+
readonly expects: `(${TWrapped['expects']} | null | undefined)`;
|
|
16623
|
+
/**
|
|
16624
|
+
* The wrapped schema.
|
|
16625
|
+
*/
|
|
16626
|
+
readonly wrapped: TWrapped;
|
|
16627
|
+
/**
|
|
16628
|
+
* The default value.
|
|
16629
|
+
*/
|
|
16630
|
+
readonly default: TDefault;
|
|
16631
|
+
}
|
|
16632
|
+
/**
|
|
16633
|
+
* Creates a nullish schema.
|
|
16634
|
+
*
|
|
16635
|
+
* @param wrapped The wrapped schema.
|
|
16636
|
+
*
|
|
16637
|
+
* @returns A nullish schema.
|
|
16638
|
+
*/
|
|
16639
|
+
declare function nullish<const TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>>>(wrapped: TWrapped): NullishSchema<TWrapped, undefined>;
|
|
16640
|
+
/**
|
|
16641
|
+
* Creates a nullish schema.
|
|
16642
|
+
*
|
|
16643
|
+
* @param wrapped The wrapped schema.
|
|
16644
|
+
* @param default_ The default value.
|
|
16645
|
+
*
|
|
16646
|
+
* @returns A nullish schema.
|
|
16647
|
+
*/
|
|
16648
|
+
declare function nullish<const TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, const TDefault extends Default<TWrapped, null | undefined>>(wrapped: TWrapped, default_: TDefault): NullishSchema<TWrapped, TDefault>;
|
|
16649
|
+
|
|
16650
|
+
/**
|
|
16651
|
+
* Nullish schema async interface.
|
|
16652
|
+
*/
|
|
16653
|
+
interface NullishSchemaAsync<TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, TDefault extends DefaultAsync<TWrapped, null | undefined>> extends BaseSchemaAsync<InferInput<TWrapped> | null | undefined, InferNullishOutput<TWrapped, TDefault>, InferIssue<TWrapped>> {
|
|
16654
|
+
/**
|
|
16655
|
+
* The schema type.
|
|
16656
|
+
*/
|
|
16657
|
+
readonly type: 'nullish';
|
|
16658
|
+
/**
|
|
16659
|
+
* The schema reference.
|
|
16660
|
+
*/
|
|
16661
|
+
readonly reference: typeof nullish | typeof nullishAsync;
|
|
16662
|
+
/**
|
|
16663
|
+
* The expected property.
|
|
16664
|
+
*/
|
|
16665
|
+
readonly expects: `(${TWrapped['expects']} | null | undefined)`;
|
|
16666
|
+
/**
|
|
16667
|
+
* The wrapped schema.
|
|
16668
|
+
*/
|
|
16669
|
+
readonly wrapped: TWrapped;
|
|
16670
|
+
/**
|
|
16671
|
+
* The default value.
|
|
16672
|
+
*/
|
|
16673
|
+
readonly default: TDefault;
|
|
16674
|
+
}
|
|
16675
|
+
/**
|
|
16676
|
+
* Creates a nullish schema.
|
|
16677
|
+
*
|
|
16678
|
+
* @param wrapped The wrapped schema.
|
|
16679
|
+
*
|
|
16680
|
+
* @returns A nullish schema.
|
|
16681
|
+
*/
|
|
16682
|
+
declare function nullishAsync<const TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>>(wrapped: TWrapped): NullishSchemaAsync<TWrapped, undefined>;
|
|
16683
|
+
/**
|
|
16684
|
+
* Creates a nullish schema.
|
|
16685
|
+
*
|
|
16686
|
+
* @param wrapped The wrapped schema.
|
|
16687
|
+
* @param default_ The default value.
|
|
16688
|
+
*
|
|
16689
|
+
* @returns A nullish schema.
|
|
16690
|
+
*/
|
|
16691
|
+
declare function nullishAsync<const TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, const TDefault extends DefaultAsync<TWrapped, null | undefined>>(wrapped: TWrapped, default_: TDefault): NullishSchemaAsync<TWrapped, TDefault>;
|
|
16692
|
+
|
|
16693
|
+
/**
|
|
16694
|
+
* Object issue interface.
|
|
16695
|
+
*/
|
|
16696
|
+
interface ObjectIssue extends BaseIssue<unknown> {
|
|
16697
|
+
/**
|
|
16698
|
+
* The issue kind.
|
|
16699
|
+
*/
|
|
16700
|
+
readonly kind: 'schema';
|
|
16701
|
+
/**
|
|
16702
|
+
* The issue type.
|
|
16703
|
+
*/
|
|
16704
|
+
readonly type: 'object';
|
|
16705
|
+
/**
|
|
16706
|
+
* The expected property.
|
|
16707
|
+
*/
|
|
16708
|
+
readonly expected: 'Object' | `"${string}"`;
|
|
16994
16709
|
}
|
|
16995
|
-
|
|
16996
|
-
|
|
16997
|
-
|
|
16998
|
-
|
|
16999
|
-
|
|
17000
|
-
|
|
17001
|
-
|
|
17002
|
-
|
|
16710
|
+
|
|
16711
|
+
/**
|
|
16712
|
+
* Object schema interface.
|
|
16713
|
+
*/
|
|
16714
|
+
interface ObjectSchema<TEntries extends ObjectEntries, TMessage extends ErrorMessage<ObjectIssue> | undefined> extends BaseSchema<InferObjectInput<TEntries>, InferObjectOutput<TEntries>, ObjectIssue | InferObjectIssue<TEntries>> {
|
|
16715
|
+
/**
|
|
16716
|
+
* The schema type.
|
|
16717
|
+
*/
|
|
16718
|
+
readonly type: 'object';
|
|
16719
|
+
/**
|
|
16720
|
+
* The schema reference.
|
|
16721
|
+
*/
|
|
16722
|
+
readonly reference: typeof object;
|
|
16723
|
+
/**
|
|
16724
|
+
* The expected property.
|
|
16725
|
+
*/
|
|
16726
|
+
readonly expects: 'Object';
|
|
16727
|
+
/**
|
|
16728
|
+
* The entries schema.
|
|
16729
|
+
*/
|
|
16730
|
+
readonly entries: TEntries;
|
|
16731
|
+
/**
|
|
16732
|
+
* The error message.
|
|
16733
|
+
*/
|
|
16734
|
+
readonly message: TMessage;
|
|
17003
16735
|
}
|
|
17004
|
-
|
|
17005
|
-
|
|
17006
|
-
|
|
17007
|
-
|
|
16736
|
+
/**
|
|
16737
|
+
* Creates an object schema.
|
|
16738
|
+
*
|
|
16739
|
+
* Hint: This schema removes unknown entries. The output will only include the
|
|
16740
|
+
* entries you specify. To include unknown entries, use `looseObject`. To
|
|
16741
|
+
* return an issue for unknown entries, use `strictObject`. To include and
|
|
16742
|
+
* validate unknown entries, use `objectWithRest`.
|
|
16743
|
+
*
|
|
16744
|
+
* @param entries The entries schema.
|
|
16745
|
+
*
|
|
16746
|
+
* @returns An object schema.
|
|
16747
|
+
*/
|
|
16748
|
+
declare function object<const TEntries extends ObjectEntries>(entries: TEntries): ObjectSchema<TEntries, undefined>;
|
|
16749
|
+
/**
|
|
16750
|
+
* Creates an object schema.
|
|
16751
|
+
*
|
|
16752
|
+
* Hint: This schema removes unknown entries. The output will only include the
|
|
16753
|
+
* entries you specify. To include unknown entries, use `looseObject`. To
|
|
16754
|
+
* return an issue for unknown entries, use `strictObject`. To include and
|
|
16755
|
+
* validate unknown entries, use `objectWithRest`.
|
|
16756
|
+
*
|
|
16757
|
+
* @param entries The entries schema.
|
|
16758
|
+
* @param message The error message.
|
|
16759
|
+
*
|
|
16760
|
+
* @returns An object schema.
|
|
16761
|
+
*/
|
|
16762
|
+
declare function object<const TEntries extends ObjectEntries, const TMessage extends ErrorMessage<ObjectIssue> | undefined>(entries: TEntries, message: TMessage): ObjectSchema<TEntries, TMessage>;
|
|
16763
|
+
|
|
16764
|
+
/**
|
|
16765
|
+
* Infer optional output type.
|
|
16766
|
+
*/
|
|
16767
|
+
type InferOptionalOutput<TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, TDefault extends DefaultAsync<TWrapped, undefined>> = undefined extends TDefault ? InferOutput<TWrapped> | undefined : InferOutput<TWrapped> | Extract<DefaultValue<TDefault>, undefined>;
|
|
16768
|
+
|
|
16769
|
+
/**
|
|
16770
|
+
* Optional schema interface.
|
|
16771
|
+
*/
|
|
16772
|
+
interface OptionalSchema<TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, TDefault extends Default<TWrapped, undefined>> extends BaseSchema<InferInput<TWrapped> | undefined, InferOptionalOutput<TWrapped, TDefault>, InferIssue<TWrapped>> {
|
|
16773
|
+
/**
|
|
16774
|
+
* The schema type.
|
|
16775
|
+
*/
|
|
16776
|
+
readonly type: 'optional';
|
|
16777
|
+
/**
|
|
16778
|
+
* The schema reference.
|
|
16779
|
+
*/
|
|
16780
|
+
readonly reference: typeof optional;
|
|
16781
|
+
/**
|
|
16782
|
+
* The expected property.
|
|
16783
|
+
*/
|
|
16784
|
+
readonly expects: `(${TWrapped['expects']} | undefined)`;
|
|
16785
|
+
/**
|
|
16786
|
+
* The wrapped schema.
|
|
16787
|
+
*/
|
|
16788
|
+
readonly wrapped: TWrapped;
|
|
16789
|
+
/**
|
|
16790
|
+
* The default value.
|
|
16791
|
+
*/
|
|
16792
|
+
readonly default: TDefault;
|
|
17008
16793
|
}
|
|
17009
|
-
|
|
17010
|
-
|
|
17011
|
-
|
|
17012
|
-
|
|
17013
|
-
|
|
17014
|
-
|
|
17015
|
-
|
|
17016
|
-
|
|
17017
|
-
|
|
17018
|
-
|
|
17019
|
-
|
|
17020
|
-
|
|
17021
|
-
|
|
17022
|
-
|
|
16794
|
+
/**
|
|
16795
|
+
* Creates an optional schema.
|
|
16796
|
+
*
|
|
16797
|
+
* @param wrapped The wrapped schema.
|
|
16798
|
+
*
|
|
16799
|
+
* @returns An optional schema.
|
|
16800
|
+
*/
|
|
16801
|
+
declare function optional<const TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>>>(wrapped: TWrapped): OptionalSchema<TWrapped, undefined>;
|
|
16802
|
+
/**
|
|
16803
|
+
* Creates an optional schema.
|
|
16804
|
+
*
|
|
16805
|
+
* @param wrapped The wrapped schema.
|
|
16806
|
+
* @param default_ The default value.
|
|
16807
|
+
*
|
|
16808
|
+
* @returns An optional schema.
|
|
16809
|
+
*/
|
|
16810
|
+
declare function optional<const TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, const TDefault extends Default<TWrapped, undefined>>(wrapped: TWrapped, default_: TDefault): OptionalSchema<TWrapped, TDefault>;
|
|
16811
|
+
|
|
16812
|
+
/**
|
|
16813
|
+
* Optional schema async interface.
|
|
16814
|
+
*/
|
|
16815
|
+
interface OptionalSchemaAsync<TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, TDefault extends DefaultAsync<TWrapped, undefined>> extends BaseSchemaAsync<InferInput<TWrapped> | undefined, InferOptionalOutput<TWrapped, TDefault>, InferIssue<TWrapped>> {
|
|
16816
|
+
/**
|
|
16817
|
+
* The schema type.
|
|
16818
|
+
*/
|
|
16819
|
+
readonly type: 'optional';
|
|
16820
|
+
/**
|
|
16821
|
+
* The schema reference.
|
|
16822
|
+
*/
|
|
16823
|
+
readonly reference: typeof optional | typeof optionalAsync;
|
|
16824
|
+
/**
|
|
16825
|
+
* The expected property.
|
|
16826
|
+
*/
|
|
16827
|
+
readonly expects: `(${TWrapped['expects']} | undefined)`;
|
|
16828
|
+
/**
|
|
16829
|
+
* The wrapped schema.
|
|
16830
|
+
*/
|
|
16831
|
+
readonly wrapped: TWrapped;
|
|
16832
|
+
/**
|
|
16833
|
+
* The default value.
|
|
16834
|
+
*/
|
|
16835
|
+
readonly default: TDefault;
|
|
17023
16836
|
}
|
|
17024
|
-
|
|
17025
|
-
|
|
17026
|
-
|
|
16837
|
+
/**
|
|
16838
|
+
* Creates an optional schema.
|
|
16839
|
+
*
|
|
16840
|
+
* @param wrapped The wrapped schema.
|
|
16841
|
+
*
|
|
16842
|
+
* @returns An optional schema.
|
|
16843
|
+
*/
|
|
16844
|
+
declare function optionalAsync<const TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>>(wrapped: TWrapped): OptionalSchemaAsync<TWrapped, undefined>;
|
|
16845
|
+
/**
|
|
16846
|
+
* Creates an optional schema.
|
|
16847
|
+
*
|
|
16848
|
+
* @param wrapped The wrapped schema.
|
|
16849
|
+
* @param default_ The default value.
|
|
16850
|
+
*
|
|
16851
|
+
* @returns An optional schema.
|
|
16852
|
+
*/
|
|
16853
|
+
declare function optionalAsync<const TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, const TDefault extends DefaultAsync<TWrapped, undefined>>(wrapped: TWrapped, default_: TDefault): OptionalSchemaAsync<TWrapped, TDefault>;
|
|
16854
|
+
|
|
16855
|
+
/**
|
|
16856
|
+
* String issue interface.
|
|
16857
|
+
*/
|
|
16858
|
+
interface StringIssue extends BaseIssue<unknown> {
|
|
16859
|
+
/**
|
|
16860
|
+
* The issue kind.
|
|
16861
|
+
*/
|
|
16862
|
+
readonly kind: 'schema';
|
|
16863
|
+
/**
|
|
16864
|
+
* The issue type.
|
|
16865
|
+
*/
|
|
16866
|
+
readonly type: 'string';
|
|
16867
|
+
/**
|
|
16868
|
+
* The expected property.
|
|
16869
|
+
*/
|
|
16870
|
+
readonly expected: 'string';
|
|
17027
16871
|
}
|
|
17028
|
-
|
|
17029
|
-
|
|
16872
|
+
/**
|
|
16873
|
+
* String schema interface.
|
|
16874
|
+
*/
|
|
16875
|
+
interface StringSchema<TMessage extends ErrorMessage<StringIssue> | undefined> extends BaseSchema<string, string, StringIssue> {
|
|
16876
|
+
/**
|
|
16877
|
+
* The schema type.
|
|
16878
|
+
*/
|
|
16879
|
+
readonly type: 'string';
|
|
16880
|
+
/**
|
|
16881
|
+
* The schema reference.
|
|
16882
|
+
*/
|
|
16883
|
+
readonly reference: typeof string;
|
|
16884
|
+
/**
|
|
16885
|
+
* The expected property.
|
|
16886
|
+
*/
|
|
16887
|
+
readonly expects: 'string';
|
|
16888
|
+
/**
|
|
16889
|
+
* The error message.
|
|
16890
|
+
*/
|
|
16891
|
+
readonly message: TMessage;
|
|
17030
16892
|
}
|
|
16893
|
+
/**
|
|
16894
|
+
* Creates a string schema.
|
|
16895
|
+
*
|
|
16896
|
+
* @returns A string schema.
|
|
16897
|
+
*/
|
|
16898
|
+
declare function string(): StringSchema<undefined>;
|
|
16899
|
+
/**
|
|
16900
|
+
* Creates a string schema.
|
|
16901
|
+
*
|
|
16902
|
+
* @param message The error message.
|
|
16903
|
+
*
|
|
16904
|
+
* @returns A string schema.
|
|
16905
|
+
*/
|
|
16906
|
+
declare function string<const TMessage extends ErrorMessage<StringIssue> | undefined>(message: TMessage): StringSchema<TMessage>;
|
|
16907
|
+
/**
|
|
16908
|
+
* Content input type.
|
|
16909
|
+
*/
|
|
16910
|
+
type ContentInput = string | MaybeReadonly<unknown[]>;
|
|
16911
|
+
/**
|
|
16912
|
+
* Content requirement type.
|
|
16913
|
+
*/
|
|
16914
|
+
type ContentRequirement<TInput extends ContentInput> = TInput extends readonly unknown[] ? TInput[number] : TInput;
|
|
16915
|
+
/**
|
|
16916
|
+
* Length input type.
|
|
16917
|
+
*/
|
|
16918
|
+
type LengthInput = string | ArrayLike<unknown>;
|
|
17031
16919
|
|
|
17032
|
-
|
|
17033
|
-
|
|
17034
|
-
|
|
17035
|
-
|
|
17036
|
-
|
|
17037
|
-
|
|
16920
|
+
/**
|
|
16921
|
+
* Description action interface.
|
|
16922
|
+
*/
|
|
16923
|
+
interface DescriptionAction<TInput, TDescription extends string> extends BaseMetadata<TInput> {
|
|
16924
|
+
/**
|
|
16925
|
+
* The action type.
|
|
16926
|
+
*/
|
|
16927
|
+
readonly type: 'description';
|
|
16928
|
+
/**
|
|
16929
|
+
* The action reference.
|
|
16930
|
+
*/
|
|
16931
|
+
readonly reference: typeof description;
|
|
16932
|
+
/**
|
|
16933
|
+
* The description text.
|
|
16934
|
+
*/
|
|
16935
|
+
readonly description: TDescription;
|
|
17038
16936
|
}
|
|
16937
|
+
/**
|
|
16938
|
+
* Creates a description metadata action.
|
|
16939
|
+
*
|
|
16940
|
+
* @param description_ The description text.
|
|
16941
|
+
*
|
|
16942
|
+
* @returns A description action.
|
|
16943
|
+
*/
|
|
16944
|
+
declare function description<TInput, TDescription extends string>(description_: TDescription): DescriptionAction<TInput, TDescription>;
|
|
17039
16945
|
|
|
17040
|
-
|
|
17041
|
-
|
|
17042
|
-
|
|
17043
|
-
|
|
17044
|
-
|
|
17045
|
-
|
|
17046
|
-
|
|
17047
|
-
|
|
17048
|
-
|
|
17049
|
-
|
|
17050
|
-
|
|
17051
|
-
|
|
17052
|
-
|
|
17053
|
-
|
|
16946
|
+
/**
|
|
16947
|
+
* Excludes issue interface.
|
|
16948
|
+
*/
|
|
16949
|
+
interface ExcludesIssue<TInput extends ContentInput, TRequirement extends ContentRequirement<TInput>> extends BaseIssue<TInput> {
|
|
16950
|
+
/**
|
|
16951
|
+
* The issue kind.
|
|
16952
|
+
*/
|
|
16953
|
+
readonly kind: 'validation';
|
|
16954
|
+
/**
|
|
16955
|
+
* The issue type.
|
|
16956
|
+
*/
|
|
16957
|
+
readonly type: 'excludes';
|
|
16958
|
+
/**
|
|
16959
|
+
* The expected property.
|
|
16960
|
+
*/
|
|
16961
|
+
readonly expected: string;
|
|
16962
|
+
/**
|
|
16963
|
+
* The content to be excluded.
|
|
16964
|
+
*/
|
|
16965
|
+
readonly requirement: TRequirement;
|
|
16966
|
+
}
|
|
16967
|
+
/**
|
|
16968
|
+
* Excludes action interface.
|
|
16969
|
+
*/
|
|
16970
|
+
interface ExcludesAction<TInput extends ContentInput, TRequirement extends ContentRequirement<TInput>, TMessage extends ErrorMessage<ExcludesIssue<TInput, TRequirement>> | undefined> extends BaseValidation<TInput, TInput, ExcludesIssue<TInput, TRequirement>> {
|
|
16971
|
+
/**
|
|
16972
|
+
* The action type.
|
|
16973
|
+
*/
|
|
16974
|
+
readonly type: 'excludes';
|
|
16975
|
+
/**
|
|
16976
|
+
* The action reference.
|
|
16977
|
+
*/
|
|
16978
|
+
readonly reference: typeof excludes;
|
|
16979
|
+
/**
|
|
16980
|
+
* The expected property.
|
|
16981
|
+
*/
|
|
16982
|
+
readonly expects: string;
|
|
16983
|
+
/**
|
|
16984
|
+
* The content to be excluded.
|
|
16985
|
+
*/
|
|
16986
|
+
readonly requirement: TRequirement;
|
|
16987
|
+
/**
|
|
16988
|
+
* The error message.
|
|
16989
|
+
*/
|
|
16990
|
+
readonly message: TMessage;
|
|
17054
16991
|
}
|
|
16992
|
+
/**
|
|
16993
|
+
* Creates an excludes validation action.
|
|
16994
|
+
*
|
|
16995
|
+
* @param requirement The content to be excluded.
|
|
16996
|
+
*
|
|
16997
|
+
* @returns An excludes action.
|
|
16998
|
+
*/
|
|
16999
|
+
declare function excludes<TInput extends ContentInput, const TRequirement extends ContentRequirement<TInput>>(requirement: TRequirement): ExcludesAction<TInput, TRequirement, undefined>;
|
|
17000
|
+
/**
|
|
17001
|
+
* Creates an excludes validation action.
|
|
17002
|
+
*
|
|
17003
|
+
* @param requirement The content to be excluded.
|
|
17004
|
+
* @param message The error message.
|
|
17005
|
+
*
|
|
17006
|
+
* @returns An excludes action.
|
|
17007
|
+
*/
|
|
17008
|
+
declare function excludes<TInput extends ContentInput, const TRequirement extends ContentRequirement<TInput>, const TMessage extends ErrorMessage<ExcludesIssue<TInput, TRequirement>> | undefined>(requirement: TRequirement, message: TMessage): ExcludesAction<TInput, TRequirement, TMessage>;
|
|
17055
17009
|
|
|
17056
|
-
|
|
17057
|
-
|
|
17058
|
-
|
|
17059
|
-
|
|
17060
|
-
|
|
17010
|
+
/**
|
|
17011
|
+
* Non empty issue interface.
|
|
17012
|
+
*/
|
|
17013
|
+
interface NonEmptyIssue<TInput extends LengthInput> extends BaseIssue<TInput> {
|
|
17014
|
+
/**
|
|
17015
|
+
* The issue kind.
|
|
17016
|
+
*/
|
|
17017
|
+
readonly kind: 'validation';
|
|
17018
|
+
/**
|
|
17019
|
+
* The issue type.
|
|
17020
|
+
*/
|
|
17021
|
+
readonly type: 'non_empty';
|
|
17022
|
+
/**
|
|
17023
|
+
* The expected input.
|
|
17024
|
+
*/
|
|
17025
|
+
readonly expected: '!0';
|
|
17026
|
+
/**
|
|
17027
|
+
* The received input.
|
|
17028
|
+
*/
|
|
17029
|
+
readonly received: '0';
|
|
17030
|
+
}
|
|
17031
|
+
/**
|
|
17032
|
+
* Non empty action interface.
|
|
17033
|
+
*/
|
|
17034
|
+
interface NonEmptyAction<TInput extends LengthInput, TMessage extends ErrorMessage<NonEmptyIssue<TInput>> | undefined> extends BaseValidation<TInput, TInput, NonEmptyIssue<TInput>> {
|
|
17035
|
+
/**
|
|
17036
|
+
* The action type.
|
|
17037
|
+
*/
|
|
17038
|
+
readonly type: 'non_empty';
|
|
17039
|
+
/**
|
|
17040
|
+
* The action reference.
|
|
17041
|
+
*/
|
|
17042
|
+
readonly reference: typeof nonEmpty;
|
|
17043
|
+
/**
|
|
17044
|
+
* The expected property.
|
|
17045
|
+
*/
|
|
17046
|
+
readonly expects: '!0';
|
|
17047
|
+
/**
|
|
17048
|
+
* The error message.
|
|
17049
|
+
*/
|
|
17050
|
+
readonly message: TMessage;
|
|
17061
17051
|
}
|
|
17052
|
+
/**
|
|
17053
|
+
* Creates a non-empty validation action.
|
|
17054
|
+
*
|
|
17055
|
+
* @returns A non-empty action.
|
|
17056
|
+
*/
|
|
17057
|
+
declare function nonEmpty<TInput extends LengthInput>(): NonEmptyAction<TInput, undefined>;
|
|
17058
|
+
/**
|
|
17059
|
+
* Creates a non-empty validation action.
|
|
17060
|
+
*
|
|
17061
|
+
* @param message The error message.
|
|
17062
|
+
*
|
|
17063
|
+
* @returns A non-empty action.
|
|
17064
|
+
*/
|
|
17065
|
+
declare function nonEmpty<TInput extends LengthInput, const TMessage extends ErrorMessage<NonEmptyIssue<TInput>> | undefined>(message: TMessage): NonEmptyAction<TInput, TMessage>;
|
|
17062
17066
|
|
|
17063
|
-
|
|
17064
|
-
|
|
17065
|
-
|
|
17067
|
+
/**
|
|
17068
|
+
* Readonly output type.
|
|
17069
|
+
*/
|
|
17070
|
+
type ReadonlyOutput<TInput> = TInput extends Map<infer TKey, infer TValue> ? ReadonlyMap<TKey, TValue> : TInput extends Set<infer TValue> ? ReadonlySet<TValue> : Readonly<TInput>;
|
|
17071
|
+
/**
|
|
17072
|
+
* Readonly action interface.
|
|
17073
|
+
*/
|
|
17074
|
+
interface ReadonlyAction<TInput> extends BaseTransformation<TInput, ReadonlyOutput<TInput>, never> {
|
|
17066
17075
|
/**
|
|
17067
|
-
*
|
|
17076
|
+
* The action type.
|
|
17068
17077
|
*/
|
|
17069
|
-
|
|
17070
|
-
|
|
17071
|
-
|
|
17078
|
+
readonly type: 'readonly';
|
|
17079
|
+
/**
|
|
17080
|
+
* The action reference.
|
|
17081
|
+
*/
|
|
17082
|
+
readonly reference: typeof readonly;
|
|
17072
17083
|
}
|
|
17084
|
+
/**
|
|
17085
|
+
* Creates a readonly transformation action.
|
|
17086
|
+
*
|
|
17087
|
+
* @returns A readonly action.
|
|
17088
|
+
*/
|
|
17089
|
+
declare function readonly<TInput>(): ReadonlyAction<TInput>;
|
|
17073
17090
|
|
|
17074
|
-
|
|
17091
|
+
declare const ProjectConfig: ObjectSchema<{
|
|
17092
|
+
readonly name: SchemaWithPipe<readonly [StringSchema<undefined>, NonEmptyAction<string, "Project name cannot be empty">, ExcludesAction<string, "default", "Project name cannot be \"default\"">, ExcludesAction<string, ".", "Project name cannot contain \".\", try to use A-z, 0-9, _ and -">, ExcludesAction<string, "@", "Project name cannot contain \"@\", try to use A-z, 0-9, _ and -">, ExcludesAction<string, "#", "Project name cannot contain \"#\", try to use A-z, 0-9, _ and -">, DescriptionAction<string, "Project name, must be unique in the workspace">]>;
|
|
17093
|
+
readonly title: OptionalSchema<SchemaWithPipe<readonly [StringSchema<undefined>, NonEmptyAction<string, "Project title cannot be empty if specified">, DescriptionAction<string, "A human readable title for the project">]>, undefined>;
|
|
17094
|
+
readonly contactPerson: OptionalSchema<SchemaWithPipe<readonly [StringSchema<undefined>, NonEmptyAction<string, "Contact person cannot be empty if specified">, DescriptionAction<string, "A person who has been involved in creating or maintaining this project">]>, undefined>;
|
|
17095
|
+
readonly exclude: OptionalSchema<SchemaWithPipe<readonly [ArraySchema<StringSchema<undefined>, undefined>, DescriptionAction<string[], "List of file patterns to exclude from the project, default is [\"**/node_modules/**\"]">]>, undefined>;
|
|
17096
|
+
}, undefined>;
|
|
17097
|
+
type ProjectConfig = InferOutput<typeof ProjectConfig>;
|
|
17098
|
+
|
|
17099
|
+
/**
|
|
17100
|
+
* A tagged string that represents a project folder.
|
|
17101
|
+
* Always has trailing slash.
|
|
17102
|
+
*/
|
|
17103
|
+
type ProjectFolder = Tagged<string, 'ProjectFolder'>;
|
|
17104
|
+
declare function ProjectFolder(folder: URI | string): ProjectFolder;
|
|
17105
|
+
interface ProjectData {
|
|
17075
17106
|
id: ProjectId;
|
|
17076
17107
|
config: ProjectConfig;
|
|
17077
|
-
folder:
|
|
17108
|
+
folder: ProjectFolder;
|
|
17109
|
+
folderUri: URI;
|
|
17078
17110
|
exclude?: picomatch.Matcher;
|
|
17079
17111
|
}
|
|
17112
|
+
interface Project {
|
|
17113
|
+
id: ProjectId;
|
|
17114
|
+
folderUri: URI;
|
|
17115
|
+
config: ProjectConfig;
|
|
17116
|
+
}
|
|
17080
17117
|
declare class ProjectsManager {
|
|
17081
17118
|
protected services: LikeC4SharedServices;
|
|
17082
17119
|
/**
|
|
@@ -17095,7 +17132,9 @@ declare class ProjectsManager {
|
|
|
17095
17132
|
* This ensures that the most specific project is used for a document.
|
|
17096
17133
|
*/
|
|
17097
17134
|
private _projects;
|
|
17135
|
+
private excludedDocuments;
|
|
17098
17136
|
private defaultGlobalProject;
|
|
17137
|
+
private reloadProjectsLimiter;
|
|
17099
17138
|
constructor(services: LikeC4SharedServices);
|
|
17100
17139
|
/**
|
|
17101
17140
|
* Returns:
|
|
@@ -17105,30 +17144,33 @@ declare class ProjectsManager {
|
|
|
17105
17144
|
*/
|
|
17106
17145
|
get defaultProjectId(): ProjectId | undefined;
|
|
17107
17146
|
get all(): NonEmptyReadonlyArray<ProjectId>;
|
|
17108
|
-
getProject(arg: ProjectId | LangiumDocument):
|
|
17109
|
-
id: ProjectId;
|
|
17110
|
-
folder: URI;
|
|
17111
|
-
config: Readonly<ProjectConfig>;
|
|
17112
|
-
};
|
|
17147
|
+
getProject(arg: ProjectId | LangiumDocument): Project;
|
|
17113
17148
|
ensureProjectId(projectId?: ProjectId | undefined): ProjectId;
|
|
17114
17149
|
hasMultipleProjects(): boolean;
|
|
17115
|
-
checkIfExcluded(
|
|
17116
|
-
|
|
17150
|
+
checkIfExcluded(document: LangiumDocument | URI | string): boolean;
|
|
17151
|
+
/**
|
|
17152
|
+
* Checks if it is a config file and it is not excluded by default exclude pattern
|
|
17153
|
+
*
|
|
17154
|
+
* @param entry The file system entry to check
|
|
17155
|
+
*/
|
|
17156
|
+
isConfigFile(entry: URI): boolean;
|
|
17117
17157
|
/**
|
|
17118
17158
|
* Checks if the provided file system entry is a valid project config file.
|
|
17119
17159
|
*
|
|
17120
17160
|
* @param entry The file system entry to check
|
|
17121
17161
|
*/
|
|
17122
|
-
loadConfigFile(entry: FileSystemNode): Promise<
|
|
17123
|
-
registerProject(configFile: URI): Promise<
|
|
17162
|
+
loadConfigFile(entry: FileSystemNode): Promise<ProjectData | undefined>;
|
|
17163
|
+
registerProject(configFile: URI): Promise<ProjectData>;
|
|
17124
17164
|
registerProject(opts: {
|
|
17125
17165
|
config: ProjectConfig;
|
|
17126
17166
|
folderUri: URI | string;
|
|
17127
|
-
}): Promise<
|
|
17167
|
+
}): Promise<ProjectData>;
|
|
17128
17168
|
belongsTo(document: LangiumDocument | URI | string): ProjectId;
|
|
17129
|
-
|
|
17130
|
-
|
|
17131
|
-
protected
|
|
17169
|
+
reloadProjects(token?: CancellationToken): Promise<void>;
|
|
17170
|
+
protected uniqueProjectId(name: string): ProjectId;
|
|
17171
|
+
protected resetProjectIds(): void;
|
|
17172
|
+
protected findProjectForDocument(documentUri: string): any;
|
|
17173
|
+
protected get mappingsToProject(): WorkspaceCache<string, Pick<ProjectData, 'id' | 'config' | 'exclude'>>;
|
|
17132
17174
|
}
|
|
17133
17175
|
|
|
17134
17176
|
declare class LikeC4WorkspaceManager extends DefaultWorkspaceManager {
|
|
@@ -17299,7 +17341,7 @@ declare class BaseParser {
|
|
|
17299
17341
|
constructor(services: LikeC4Services, doc: ParsedLikeC4LangiumDocument);
|
|
17300
17342
|
get project(): {
|
|
17301
17343
|
id: c4.ProjectId;
|
|
17302
|
-
|
|
17344
|
+
folderUri: URI;
|
|
17303
17345
|
config: Readonly<ProjectConfig>;
|
|
17304
17346
|
};
|
|
17305
17347
|
resolveFqn(node: FqnReferenceable): c4.Fqn;
|
|
@@ -17392,7 +17434,7 @@ declare const DocumentParserFromMixins: {
|
|
|
17392
17434
|
readonly doc: ParsedLikeC4LangiumDocument;
|
|
17393
17435
|
get project(): {
|
|
17394
17436
|
id: ProjectId;
|
|
17395
|
-
|
|
17437
|
+
folderUri: ProjectId;
|
|
17396
17438
|
config: Readonly<ProjectConfig>;
|
|
17397
17439
|
};
|
|
17398
17440
|
resolveFqn(node: FqnReferenceable): ProjectId;
|
|
@@ -17485,7 +17527,7 @@ declare const DocumentParserFromMixins: {
|
|
|
17485
17527
|
readonly doc: ParsedLikeC4LangiumDocument;
|
|
17486
17528
|
get project(): {
|
|
17487
17529
|
id: ProjectId;
|
|
17488
|
-
|
|
17530
|
+
folderUri: ProjectId;
|
|
17489
17531
|
config: Readonly<ProjectConfig>;
|
|
17490
17532
|
};
|
|
17491
17533
|
resolveFqn(node: FqnReferenceable): ProjectId;
|
|
@@ -17540,7 +17582,7 @@ declare const DocumentParserFromMixins: {
|
|
|
17540
17582
|
readonly doc: ParsedLikeC4LangiumDocument;
|
|
17541
17583
|
get project(): {
|
|
17542
17584
|
id: ProjectId;
|
|
17543
|
-
|
|
17585
|
+
folderUri: ProjectId;
|
|
17544
17586
|
config: Readonly<ProjectConfig>;
|
|
17545
17587
|
};
|
|
17546
17588
|
resolveFqn(node: FqnReferenceable): ProjectId;
|
|
@@ -17609,7 +17651,7 @@ declare const DocumentParserFromMixins: {
|
|
|
17609
17651
|
readonly doc: ParsedLikeC4LangiumDocument;
|
|
17610
17652
|
get project(): {
|
|
17611
17653
|
id: ProjectId;
|
|
17612
|
-
|
|
17654
|
+
folderUri: ProjectId;
|
|
17613
17655
|
config: Readonly<ProjectConfig>;
|
|
17614
17656
|
};
|
|
17615
17657
|
resolveFqn(node: FqnReferenceable): ProjectId;
|
|
@@ -17671,7 +17713,7 @@ declare const DocumentParserFromMixins: {
|
|
|
17671
17713
|
readonly doc: ParsedLikeC4LangiumDocument;
|
|
17672
17714
|
get project(): {
|
|
17673
17715
|
id: ProjectId;
|
|
17674
|
-
|
|
17716
|
+
folderUri: ProjectId;
|
|
17675
17717
|
config: Readonly<ProjectConfig>;
|
|
17676
17718
|
};
|
|
17677
17719
|
resolveFqn(node: FqnReferenceable): ProjectId;
|
|
@@ -17741,7 +17783,7 @@ declare const DocumentParserFromMixins: {
|
|
|
17741
17783
|
readonly doc: ParsedLikeC4LangiumDocument;
|
|
17742
17784
|
get project(): {
|
|
17743
17785
|
id: ProjectId;
|
|
17744
|
-
|
|
17786
|
+
folderUri: ProjectId;
|
|
17745
17787
|
config: Readonly<ProjectConfig>;
|
|
17746
17788
|
};
|
|
17747
17789
|
resolveFqn(node: FqnReferenceable): ProjectId;
|
|
@@ -17804,7 +17846,7 @@ declare const DocumentParserFromMixins: {
|
|
|
17804
17846
|
readonly doc: ParsedLikeC4LangiumDocument;
|
|
17805
17847
|
get project(): {
|
|
17806
17848
|
id: ProjectId;
|
|
17807
|
-
|
|
17849
|
+
folderUri: ProjectId;
|
|
17808
17850
|
config: Readonly<ProjectConfig>;
|
|
17809
17851
|
};
|
|
17810
17852
|
resolveFqn(node: FqnReferenceable): ProjectId;
|
|
@@ -17847,7 +17889,7 @@ declare const DocumentParserFromMixins: {
|
|
|
17847
17889
|
readonly doc: ParsedLikeC4LangiumDocument;
|
|
17848
17890
|
get project(): {
|
|
17849
17891
|
id: ProjectId;
|
|
17850
|
-
|
|
17892
|
+
folderUri: ProjectId;
|
|
17851
17893
|
config: Readonly<ProjectConfig>;
|
|
17852
17894
|
};
|
|
17853
17895
|
resolveFqn(node: FqnReferenceable): ProjectId;
|
|
@@ -17905,7 +17947,7 @@ declare const DocumentParserFromMixins: {
|
|
|
17905
17947
|
readonly doc: ParsedLikeC4LangiumDocument;
|
|
17906
17948
|
get project(): {
|
|
17907
17949
|
id: ProjectId;
|
|
17908
|
-
|
|
17950
|
+
folderUri: ProjectId;
|
|
17909
17951
|
config: Readonly<ProjectConfig>;
|
|
17910
17952
|
};
|
|
17911
17953
|
resolveFqn(node: FqnReferenceable): ProjectId;
|
|
@@ -18054,13 +18096,28 @@ interface LikeC4LanguageServices {
|
|
|
18054
18096
|
readonly builder: LikeC4ModelBuilder;
|
|
18055
18097
|
readonly workspaceUri: URI;
|
|
18056
18098
|
readonly projectsManager: ProjectsManager;
|
|
18099
|
+
/**
|
|
18100
|
+
* Returns all projects with relevant documents
|
|
18101
|
+
*/
|
|
18057
18102
|
projects(): NonEmptyArray<{
|
|
18058
18103
|
id: ProjectId;
|
|
18059
18104
|
folder: URI;
|
|
18060
|
-
|
|
18105
|
+
title: string;
|
|
18061
18106
|
documents: NonEmptyArray<URI> | null;
|
|
18062
18107
|
}>;
|
|
18063
|
-
|
|
18108
|
+
/**
|
|
18109
|
+
* Returns project by ID
|
|
18110
|
+
*/
|
|
18111
|
+
project(projectId: ProjectId): {
|
|
18112
|
+
id: ProjectId;
|
|
18113
|
+
folder: URI;
|
|
18114
|
+
title: string;
|
|
18115
|
+
};
|
|
18116
|
+
/**
|
|
18117
|
+
* Returns diagrams (i.e. views with layout computed) for the specified project
|
|
18118
|
+
* If no project is specified, returns diagrams for default project
|
|
18119
|
+
*/
|
|
18120
|
+
diagrams(project?: ProjectId | undefined): Promise<DiagramView[]>;
|
|
18064
18121
|
computedModel(project?: ProjectId | undefined): Promise<LikeC4Model.Computed>;
|
|
18065
18122
|
layoutedModel(project?: ProjectId | undefined): Promise<LikeC4Model.Layouted>;
|
|
18066
18123
|
getErrors(): Array<{
|
|
@@ -18069,11 +18126,21 @@ interface LikeC4LanguageServices {
|
|
|
18069
18126
|
range: Range$1;
|
|
18070
18127
|
sourceFsPath: string;
|
|
18071
18128
|
}>;
|
|
18129
|
+
/**
|
|
18130
|
+
* Notifies the language server about changes in the workspace
|
|
18131
|
+
*/
|
|
18072
18132
|
notifyUpdate(update: {
|
|
18073
18133
|
changed?: string;
|
|
18074
18134
|
removed?: string;
|
|
18075
18135
|
}): Promise<boolean>;
|
|
18136
|
+
/**
|
|
18137
|
+
* Returns the location of the specified element, relation, view or deployment element
|
|
18138
|
+
*/
|
|
18076
18139
|
locate(params: Locate.Params): Locate.Res;
|
|
18140
|
+
/**
|
|
18141
|
+
* Checks if the specified document should be excluded from processing.
|
|
18142
|
+
*/
|
|
18143
|
+
isExcluded(doc: LangiumDocument): boolean;
|
|
18077
18144
|
}
|
|
18078
18145
|
|
|
18079
18146
|
declare class LikeC4CodeLensProvider implements CodeLensProvider {
|
|
@@ -47589,6 +47656,9 @@ interface LikeC4AddedServices {
|
|
|
47589
47656
|
DocumentationProvider: LikeC4DocumentationProvider;
|
|
47590
47657
|
};
|
|
47591
47658
|
ValidatedWorkspaceCache: WorkspaceCache<string, any>;
|
|
47659
|
+
validation: {
|
|
47660
|
+
DocumentValidator: LikeC4DocumentValidator;
|
|
47661
|
+
};
|
|
47592
47662
|
Rpc: Rpc;
|
|
47593
47663
|
mcp: {
|
|
47594
47664
|
Server: LikeC4MCPServer;
|