@living-architecture/riviere-schema-published-language 0.9.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.
@@ -0,0 +1,185 @@
1
+ /** @riviere-role published-language-data-structure */
2
+ export interface SourceLocation {
3
+ repository: string;
4
+ filePath: string;
5
+ lineNumber?: number;
6
+ columnNumber?: number;
7
+ endLineNumber?: number;
8
+ methodName?: string;
9
+ url?: string;
10
+ }
11
+ /** @riviere-role published-language-data-structure */
12
+ export interface OperationParameter {
13
+ name: string;
14
+ type: string;
15
+ description?: string;
16
+ }
17
+ /** @riviere-role published-language-data-structure */
18
+ export interface OperationSignature {
19
+ parameters?: OperationParameter[];
20
+ returnType?: string;
21
+ }
22
+ /** @riviere-role published-language-data-structure */
23
+ export interface OperationBehavior {
24
+ reads?: string[];
25
+ validates?: string[];
26
+ modifies?: string[];
27
+ emits?: string[];
28
+ }
29
+ /** @riviere-role published-language-data-structure */
30
+ export interface StateTransition {
31
+ from: string;
32
+ to: string;
33
+ trigger?: string;
34
+ }
35
+ /** @riviere-role published-language-union */
36
+ export type ComponentType = 'UI' | 'API' | 'UseCase' | 'DomainOp' | 'Event' | 'EventHandler' | 'Custom';
37
+ interface ComponentBase {
38
+ id: string;
39
+ name: string;
40
+ domain: string;
41
+ module: string;
42
+ description?: string;
43
+ sourceLocation: SourceLocation;
44
+ }
45
+ /** @riviere-role published-language-data-structure */
46
+ export interface UIComponent extends ComponentBase {
47
+ type: 'UI';
48
+ route: string;
49
+ }
50
+ /** @riviere-role published-language-union */
51
+ export type ApiType = 'REST' | 'GraphQL' | 'other';
52
+ /** @riviere-role published-language-union */
53
+ export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD' | 'OPTIONS';
54
+ /** @riviere-role published-language-data-structure */
55
+ export interface APIComponent extends ComponentBase {
56
+ type: 'API';
57
+ apiType: ApiType;
58
+ httpMethod?: HttpMethod;
59
+ path?: string;
60
+ operationName?: string;
61
+ }
62
+ /** @riviere-role published-language-data-structure */
63
+ export interface UseCaseComponent extends ComponentBase {
64
+ type: 'UseCase';
65
+ }
66
+ /** @riviere-role published-language-data-structure */
67
+ export interface DomainOpComponent extends ComponentBase {
68
+ type: 'DomainOp';
69
+ operationName: string;
70
+ entity?: string;
71
+ signature?: OperationSignature;
72
+ behavior?: OperationBehavior;
73
+ stateChanges?: StateTransition[];
74
+ businessRules?: string[];
75
+ }
76
+ /** Metadata field name on EventComponent holding the event's canonical name. */
77
+ /** @riviere-role published-language-field-name */
78
+ export declare const EVENT_NAME_FIELD: "eventName";
79
+ /** Metadata field name on EventHandlerComponent holding the list of subscribed event names. */
80
+ /** @riviere-role published-language-field-name */
81
+ export declare const SUBSCRIBED_EVENTS_FIELD: "subscribedEvents";
82
+ /** @riviere-role published-language-data-structure */
83
+ export interface EventComponent extends ComponentBase {
84
+ type: 'Event';
85
+ eventName: string;
86
+ eventSchema?: string;
87
+ }
88
+ /** @riviere-role published-language-data-structure */
89
+ export interface EventHandlerComponent extends ComponentBase {
90
+ type: 'EventHandler';
91
+ subscribedEvents: string[];
92
+ }
93
+ /** @riviere-role published-language-data-structure */
94
+ export interface CustomComponent extends ComponentBase {
95
+ type: 'Custom';
96
+ customTypeName: string;
97
+ [key: string]: unknown;
98
+ }
99
+ /** @riviere-role published-language-union */
100
+ export type Component = UIComponent | APIComponent | UseCaseComponent | DomainOpComponent | EventComponent | EventHandlerComponent | CustomComponent;
101
+ /** @riviere-role published-language-union */
102
+ export type LinkType = 'sync' | 'async';
103
+ /** @riviere-role published-language-data-structure */
104
+ export interface PayloadDefinition {
105
+ type?: string;
106
+ schema?: Record<string, unknown>;
107
+ }
108
+ /** @riviere-role published-language-data-structure */
109
+ export interface Link {
110
+ id?: string;
111
+ source: string;
112
+ target: string;
113
+ type?: LinkType;
114
+ relationshipType?: string;
115
+ condition?: string;
116
+ payload?: PayloadDefinition;
117
+ sourceLocation?: SourceLocation;
118
+ }
119
+ /** @riviere-role published-language-data-structure */
120
+ export interface ExternalTarget {
121
+ name: string;
122
+ route?: string;
123
+ domain?: string;
124
+ repository?: string;
125
+ url?: string;
126
+ [key: string]: string | undefined;
127
+ }
128
+ /** @riviere-role published-language-data-structure */
129
+ export interface ExternalLink {
130
+ id?: string;
131
+ source: string;
132
+ target: ExternalTarget;
133
+ type?: LinkType;
134
+ description?: string;
135
+ sourceLocation?: SourceLocation;
136
+ }
137
+ /** @riviere-role published-language-union */
138
+ export type SystemType = 'domain' | 'bff' | 'ui' | 'external-service' | 'other';
139
+ /** @riviere-role published-language-data-structure */
140
+ export interface DomainMetadata {
141
+ description: string;
142
+ systemType: SystemType;
143
+ }
144
+ /** @riviere-role published-language-data-structure */
145
+ export interface CustomPropertyDefinition {
146
+ type: CustomPropertyTypeName;
147
+ description?: string;
148
+ }
149
+ /** @riviere-role published-language-data-structure */
150
+ export interface CustomTypeDefinition {
151
+ description?: string;
152
+ requiredProperties?: Record<string, CustomPropertyDefinition>;
153
+ optionalProperties?: Record<string, CustomPropertyDefinition>;
154
+ }
155
+ /** @riviere-role published-language-data-structure */
156
+ export interface RelationshipTypeDefinition {
157
+ description: string;
158
+ }
159
+ /** @riviere-role published-language-data-structure */
160
+ export interface SourceInfo {
161
+ repository: string;
162
+ commit?: string;
163
+ extractedAt?: string;
164
+ }
165
+ /** @riviere-role published-language-data-structure */
166
+ export interface GraphMetadata {
167
+ name?: string;
168
+ description?: string;
169
+ generated?: string;
170
+ sources?: SourceInfo[];
171
+ domains: Record<string, DomainMetadata>;
172
+ customTypes?: Record<string, CustomTypeDefinition>;
173
+ relationshipTypes?: Record<string, RelationshipTypeDefinition>;
174
+ }
175
+ /** @riviere-role published-language-schema */
176
+ export interface RiviereGraph {
177
+ version: string;
178
+ metadata: GraphMetadata;
179
+ components: Component[];
180
+ links: Link[];
181
+ externalLinks?: ExternalLink[];
182
+ }
183
+ import type { CustomPropertyTypeName } from './custom-property-type';
184
+ export {};
185
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/published-language/schema.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,GAAG,CAAC,EAAE,MAAM,CAAA;CACb;AAED,sDAAsD;AACtD,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,sDAAsD;AACtD,MAAM,WAAW,kBAAkB;IACjC,UAAU,CAAC,EAAE,kBAAkB,EAAE,CAAA;IACjC,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,sDAAsD;AACtD,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;CACjB;AAED,sDAAsD;AACtD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,6CAA6C;AAC7C,MAAM,MAAM,aAAa,GACrB,IAAI,GACJ,KAAK,GACL,SAAS,GACT,UAAU,GACV,OAAO,GACP,cAAc,GACd,QAAQ,CAAA;AAEZ,UAAU,aAAa;IACrB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,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AAC,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,UAAU,EAAE,CAAA;IACtB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAA;IACvC,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAA;IAClD,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,0BAA0B,CAAC,CAAA;CAC/D;AAED,8CAA8C;AAC9C,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,aAAa,CAAA;IACvB,UAAU,EAAE,SAAS,EAAE,CAAA;IACvB,KAAK,EAAE,IAAI,EAAE,CAAA;IACb,aAAa,CAAC,EAAE,YAAY,EAAE,CAAA;CAC/B;AACD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA"}
@@ -0,0 +1,7 @@
1
+ // src/published-language/schema.ts
2
+ var EVENT_NAME_FIELD = "eventName";
3
+ var SUBSCRIBED_EVENTS_FIELD = "subscribedEvents";
4
+ export {
5
+ EVENT_NAME_FIELD,
6
+ SUBSCRIBED_EVENTS_FIELD
7
+ };
@@ -0,0 +1,10 @@
1
+ import type { RiviereGraph } from './schema';
2
+ /** @riviere-role published-language-parser */
3
+ export declare function parseRiviereGraph(value: unknown): {
4
+ success: true;
5
+ graph: RiviereGraph;
6
+ } | {
7
+ success: false;
8
+ issues: string[];
9
+ };
10
+ //# sourceMappingURL=validation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/published-language/validation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAQ5C,8CAA8C;AAC9C,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,OAAO,GACb;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,YAAY,CAAA;CAAE,GAAG;IAAE,OAAO,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,CAU/E"}