@wibi-global/sdk 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/artifact-schema/src/biCatalog.d.ts +3 -0
- package/dist/artifact-schema/src/biCatalog.d.ts.map +1 -0
- package/dist/artifact-schema/src/biCatalog.js +36 -0
- package/dist/artifact-schema/src/biCatalog.js.map +1 -0
- package/dist/artifact-schema/src/hash.d.ts +3 -0
- package/dist/artifact-schema/src/hash.d.ts.map +1 -0
- package/dist/artifact-schema/src/hash.js +22 -0
- package/dist/artifact-schema/src/hash.js.map +1 -0
- package/dist/artifact-schema/src/index.d.ts +6 -0
- package/dist/artifact-schema/src/index.d.ts.map +1 -0
- package/dist/artifact-schema/src/index.js +6 -0
- package/dist/artifact-schema/src/index.js.map +1 -0
- package/dist/artifact-schema/src/schema.d.ts +274 -0
- package/dist/artifact-schema/src/schema.d.ts.map +1 -0
- package/dist/artifact-schema/src/schema.js +165 -0
- package/dist/artifact-schema/src/schema.js.map +1 -0
- package/dist/artifact-schema/src/types.d.ts +88 -0
- package/dist/artifact-schema/src/types.d.ts.map +1 -0
- package/dist/artifact-schema/src/types.js +2 -0
- package/dist/artifact-schema/src/types.js.map +1 -0
- package/dist/artifact-schema/src/validate.d.ts +4 -0
- package/dist/artifact-schema/src/validate.d.ts.map +1 -0
- package/dist/artifact-schema/src/validate.js +101 -0
- package/dist/artifact-schema/src/validate.js.map +1 -0
- package/dist/instructions/AGENTS.md +92 -0
- package/dist/instructions/AGENT_COMMON.md +78 -0
- package/dist/instructions/CLAUDE.md +54 -0
- package/dist/instructions/CODEX.md +38 -0
- package/dist/instructions/GEMINI.md +35 -0
- package/dist/prompts/authoring.wbp +61 -0
- package/dist/sdk/src/builder.d.ts.map +1 -0
- package/dist/sdk/src/builder.js.map +1 -0
- package/dist/sdk/src/context.d.ts.map +1 -0
- package/dist/sdk/src/context.js.map +1 -0
- package/dist/sdk/src/dashboard-context.d.ts.map +1 -0
- package/dist/sdk/src/dashboard-context.js.map +1 -0
- package/dist/sdk/src/dashboard-spec.d.ts.map +1 -0
- package/dist/sdk/src/dashboard-spec.js.map +1 -0
- package/dist/sdk/src/data/ctx.wbx +114 -0
- package/dist/sdk/src/data/index.d.ts.map +1 -0
- package/dist/sdk/src/data/index.js.map +1 -0
- package/dist/sdk/src/data/queries.wbx +330 -0
- package/dist/sdk/src/data/serialization/dashboard-serialization.types.d.ts.map +1 -0
- package/dist/sdk/src/data/serialization/dashboard-serialization.types.js.map +1 -0
- package/dist/sdk/src/data/serialization/dashboard-serialization.types.ts +430 -0
- package/dist/sdk/src/data/serialization/index.d.ts.map +1 -0
- package/dist/sdk/src/data/serialization/index.js.map +1 -0
- package/dist/sdk/src/data/syntax.wbx +155 -0
- package/dist/sdk/src/data/view-categories.wbx +88 -0
- package/dist/sdk/src/data/views.wbx +1118 -0
- package/dist/sdk/src/data/widgets.wbx +2477 -0
- package/dist/sdk/src/data.d.ts.map +1 -0
- package/dist/sdk/src/data.js.map +1 -0
- package/dist/sdk/src/index.d.ts.map +1 -0
- package/dist/sdk/src/index.js.map +1 -0
- package/package.json +2 -2
- package/dist/builder.d.ts.map +0 -1
- package/dist/builder.js.map +0 -1
- package/dist/context.d.ts.map +0 -1
- package/dist/context.js.map +0 -1
- package/dist/dashboard-context.d.ts.map +0 -1
- package/dist/dashboard-context.js.map +0 -1
- package/dist/dashboard-spec.d.ts.map +0 -1
- package/dist/dashboard-spec.js.map +0 -1
- package/dist/data/index.d.ts.map +0 -1
- package/dist/data/index.js.map +0 -1
- package/dist/data/serialization/dashboard-serialization.types.d.ts.map +0 -1
- package/dist/data/serialization/dashboard-serialization.types.js.map +0 -1
- package/dist/data/serialization/index.d.ts.map +0 -1
- package/dist/data/serialization/index.js.map +0 -1
- package/dist/data.d.ts.map +0 -1
- package/dist/data.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- /package/dist/{builder.d.ts → sdk/src/builder.d.ts} +0 -0
- /package/dist/{builder.js → sdk/src/builder.js} +0 -0
- /package/dist/{context.d.ts → sdk/src/context.d.ts} +0 -0
- /package/dist/{context.js → sdk/src/context.js} +0 -0
- /package/dist/{dashboard-context.d.ts → sdk/src/dashboard-context.d.ts} +0 -0
- /package/dist/{dashboard-context.js → sdk/src/dashboard-context.js} +0 -0
- /package/dist/{dashboard-spec.d.ts → sdk/src/dashboard-spec.d.ts} +0 -0
- /package/dist/{dashboard-spec.js → sdk/src/dashboard-spec.js} +0 -0
- /package/dist/{data → sdk/src/data}/index.d.ts +0 -0
- /package/dist/{data → sdk/src/data}/index.js +0 -0
- /package/dist/{data → sdk/src/data}/serialization/dashboard-serialization.types.d.ts +0 -0
- /package/dist/{data → sdk/src/data}/serialization/dashboard-serialization.types.js +0 -0
- /package/dist/{data → sdk/src/data}/serialization/index.d.ts +0 -0
- /package/dist/{data → sdk/src/data}/serialization/index.js +0 -0
- /package/dist/{data.d.ts → sdk/src/data.d.ts} +0 -0
- /package/dist/{data.js → sdk/src/data.js} +0 -0
- /package/dist/{index.d.ts → sdk/src/index.d.ts} +0 -0
- /package/dist/{index.js → sdk/src/index.js} +0 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const WIBI_BI_COMPONENT_TYPES: readonly ["chart", "bar", "line", "area", "pie", "scatter", "gauge", "funnel", "waterfall", "treemap", "sankey", "graph", "sunburst", "tree", "radar", "heatmap", "candlestick", "boxplot", "parallel", "themeriver", "effectscatter", "pictorialbar", "map", "lines", "filter", "kpi", "multicard", "sparkline", "grid", "progress-list", "timeline", "card", "text"];
|
|
2
|
+
export type WibiBiComponentType = (typeof WIBI_BI_COMPONENT_TYPES)[number];
|
|
3
|
+
//# sourceMappingURL=biCatalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"biCatalog.d.ts","sourceRoot":"","sources":["../../../../artifact-schema/src/biCatalog.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,wWAkC1B,CAAA;AAEV,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export const WIBI_BI_COMPONENT_TYPES = [
|
|
2
|
+
'chart',
|
|
3
|
+
'bar',
|
|
4
|
+
'line',
|
|
5
|
+
'area',
|
|
6
|
+
'pie',
|
|
7
|
+
'scatter',
|
|
8
|
+
'gauge',
|
|
9
|
+
'funnel',
|
|
10
|
+
'waterfall',
|
|
11
|
+
'treemap',
|
|
12
|
+
'sankey',
|
|
13
|
+
'graph',
|
|
14
|
+
'sunburst',
|
|
15
|
+
'tree',
|
|
16
|
+
'radar',
|
|
17
|
+
'heatmap',
|
|
18
|
+
'candlestick',
|
|
19
|
+
'boxplot',
|
|
20
|
+
'parallel',
|
|
21
|
+
'themeriver',
|
|
22
|
+
'effectscatter',
|
|
23
|
+
'pictorialbar',
|
|
24
|
+
'map',
|
|
25
|
+
'lines',
|
|
26
|
+
'filter',
|
|
27
|
+
'kpi',
|
|
28
|
+
'multicard',
|
|
29
|
+
'sparkline',
|
|
30
|
+
'grid',
|
|
31
|
+
'progress-list',
|
|
32
|
+
'timeline',
|
|
33
|
+
'card',
|
|
34
|
+
'text',
|
|
35
|
+
];
|
|
36
|
+
//# sourceMappingURL=biCatalog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"biCatalog.js","sourceRoot":"","sources":["../../../../artifact-schema/src/biCatalog.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,OAAO;IACP,KAAK;IACL,MAAM;IACN,MAAM;IACN,KAAK;IACL,SAAS;IACT,OAAO;IACP,QAAQ;IACR,WAAW;IACX,SAAS;IACT,QAAQ;IACR,OAAO;IACP,UAAU;IACV,MAAM;IACN,OAAO;IACP,SAAS;IACT,aAAa;IACb,SAAS;IACT,UAAU;IACV,YAAY;IACZ,eAAe;IACf,cAAc;IACd,KAAK;IACL,OAAO;IACP,QAAQ;IACR,KAAK;IACL,WAAW;IACX,WAAW;IACX,MAAM;IACN,eAAe;IACf,UAAU;IACV,MAAM;IACN,MAAM;CACE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hash.d.ts","sourceRoot":"","sources":["../../../../artifact-schema/src/hash.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,sBAAsB,GAAI,OAAO,OAAO,KAAG,MAEvD,CAAA;AAED,eAAO,MAAM,mBAAmB,GAAI,OAAO,OAAO,KAAG,MAEpD,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
const sortValue = (value) => {
|
|
3
|
+
if (Array.isArray(value)) {
|
|
4
|
+
return value.map(sortValue);
|
|
5
|
+
}
|
|
6
|
+
if (value && typeof value === 'object') {
|
|
7
|
+
return Object.keys(value)
|
|
8
|
+
.sort()
|
|
9
|
+
.reduce((accumulator, key) => {
|
|
10
|
+
accumulator[key] = sortValue(value[key]);
|
|
11
|
+
return accumulator;
|
|
12
|
+
}, {});
|
|
13
|
+
}
|
|
14
|
+
return value;
|
|
15
|
+
};
|
|
16
|
+
export const canonicalJSONStringify = (value) => {
|
|
17
|
+
return JSON.stringify(sortValue(value));
|
|
18
|
+
};
|
|
19
|
+
export const computeArtifactHash = (value) => {
|
|
20
|
+
return createHash('sha256').update(canonicalJSONStringify(value)).digest('hex');
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=hash.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hash.js","sourceRoot":"","sources":["../../../../artifact-schema/src/hash.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAExC,MAAM,SAAS,GAAG,CAAC,KAAc,EAAW,EAAE;IAC5C,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;IAC7B,CAAC;IAED,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACvC,OAAO,MAAM,CAAC,IAAI,CAAC,KAAgC,CAAC;aACjD,IAAI,EAAE;aACN,MAAM,CAA0B,CAAC,WAAW,EAAE,GAAG,EAAE,EAAE;YACpD,WAAW,CAAC,GAAG,CAAC,GAAG,SAAS,CAAE,KAAiC,CAAC,GAAG,CAAC,CAAC,CAAA;YACrE,OAAO,WAAW,CAAA;QACpB,CAAC,EAAE,EAAE,CAAC,CAAA;IACV,CAAC;IAED,OAAO,KAAK,CAAA;AACd,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,KAAc,EAAU,EAAE;IAC/D,OAAO,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAA;AACzC,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,KAAc,EAAU,EAAE;IAC5D,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AACjF,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../artifact-schema/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,WAAW,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../artifact-schema/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,WAAW,CAAA"}
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
export declare const WIBI_ARTIFACT_VERSION = "1.0.0";
|
|
2
|
+
export declare const wibiDashboardArtifactJsonSchema: {
|
|
3
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
4
|
+
readonly $id: "https://schemas.wibi.com/dashboard-artifact/v1.json";
|
|
5
|
+
readonly title: "WibiDashboardArtifact";
|
|
6
|
+
readonly type: "object";
|
|
7
|
+
readonly additionalProperties: false;
|
|
8
|
+
readonly required: readonly ["artifactVersion", "dashboard", "layout", "components", "dataSources", "bindings", "interactions", "meta"];
|
|
9
|
+
readonly properties: {
|
|
10
|
+
readonly artifactVersion: {
|
|
11
|
+
readonly type: "string";
|
|
12
|
+
};
|
|
13
|
+
readonly dashboard: {
|
|
14
|
+
readonly type: "object";
|
|
15
|
+
readonly additionalProperties: false;
|
|
16
|
+
readonly required: readonly ["id", "slug", "name"];
|
|
17
|
+
readonly properties: {
|
|
18
|
+
readonly id: {
|
|
19
|
+
readonly type: "string";
|
|
20
|
+
readonly minLength: 1;
|
|
21
|
+
};
|
|
22
|
+
readonly slug: {
|
|
23
|
+
readonly type: "string";
|
|
24
|
+
readonly minLength: 1;
|
|
25
|
+
};
|
|
26
|
+
readonly name: {
|
|
27
|
+
readonly type: "string";
|
|
28
|
+
readonly minLength: 1;
|
|
29
|
+
};
|
|
30
|
+
readonly description: {
|
|
31
|
+
readonly type: "string";
|
|
32
|
+
};
|
|
33
|
+
readonly tags: {
|
|
34
|
+
readonly type: "array";
|
|
35
|
+
readonly items: {
|
|
36
|
+
readonly type: "string";
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
readonly category: {
|
|
40
|
+
readonly type: "string";
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
readonly theme: {
|
|
45
|
+
readonly type: "object";
|
|
46
|
+
readonly additionalProperties: true;
|
|
47
|
+
};
|
|
48
|
+
readonly layout: {
|
|
49
|
+
readonly type: "object";
|
|
50
|
+
readonly additionalProperties: false;
|
|
51
|
+
readonly required: readonly ["root"];
|
|
52
|
+
readonly properties: {
|
|
53
|
+
readonly root: {
|
|
54
|
+
readonly $ref: "#/$defs/layoutNode";
|
|
55
|
+
};
|
|
56
|
+
readonly breakpoints: {
|
|
57
|
+
readonly type: "object";
|
|
58
|
+
readonly additionalProperties: {
|
|
59
|
+
readonly type: "number";
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
readonly components: {
|
|
65
|
+
readonly type: "array";
|
|
66
|
+
readonly items: {
|
|
67
|
+
readonly $ref: "#/$defs/componentNode";
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
readonly dataSources: {
|
|
71
|
+
readonly type: "array";
|
|
72
|
+
readonly items: {
|
|
73
|
+
readonly $ref: "#/$defs/dataSource";
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
readonly bindings: {
|
|
77
|
+
readonly type: "array";
|
|
78
|
+
readonly items: {
|
|
79
|
+
readonly $ref: "#/$defs/binding";
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
readonly interactions: {
|
|
83
|
+
readonly type: "array";
|
|
84
|
+
readonly items: {
|
|
85
|
+
readonly $ref: "#/$defs/interaction";
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
readonly accessPolicy: {
|
|
89
|
+
readonly type: "object";
|
|
90
|
+
readonly additionalProperties: false;
|
|
91
|
+
readonly properties: {
|
|
92
|
+
readonly roles: {
|
|
93
|
+
readonly type: "array";
|
|
94
|
+
readonly items: {
|
|
95
|
+
readonly type: "string";
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
readonly scopes: {
|
|
99
|
+
readonly type: "array";
|
|
100
|
+
readonly items: {
|
|
101
|
+
readonly type: "string";
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
readonly featureFlags: {
|
|
105
|
+
readonly type: "array";
|
|
106
|
+
readonly items: {
|
|
107
|
+
readonly type: "string";
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
readonly meta: {
|
|
113
|
+
readonly type: "object";
|
|
114
|
+
readonly additionalProperties: false;
|
|
115
|
+
readonly required: readonly ["generatedBy", "createdAt", "updatedAt"];
|
|
116
|
+
readonly properties: {
|
|
117
|
+
readonly author: {
|
|
118
|
+
readonly type: "string";
|
|
119
|
+
};
|
|
120
|
+
readonly generatedBy: {
|
|
121
|
+
readonly type: "string";
|
|
122
|
+
readonly minLength: 1;
|
|
123
|
+
};
|
|
124
|
+
readonly createdAt: {
|
|
125
|
+
readonly type: "string";
|
|
126
|
+
readonly format: "date-time";
|
|
127
|
+
};
|
|
128
|
+
readonly updatedAt: {
|
|
129
|
+
readonly type: "string";
|
|
130
|
+
readonly format: "date-time";
|
|
131
|
+
};
|
|
132
|
+
readonly checksum: {
|
|
133
|
+
readonly type: "string";
|
|
134
|
+
};
|
|
135
|
+
readonly artifactHash: {
|
|
136
|
+
readonly type: "string";
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
readonly $defs: {
|
|
142
|
+
readonly layoutNode: {
|
|
143
|
+
readonly type: "object";
|
|
144
|
+
readonly additionalProperties: false;
|
|
145
|
+
readonly required: readonly ["id", "type"];
|
|
146
|
+
readonly properties: {
|
|
147
|
+
readonly id: {
|
|
148
|
+
readonly type: "string";
|
|
149
|
+
};
|
|
150
|
+
readonly type: {
|
|
151
|
+
readonly enum: readonly ["row", "column", "grid", "stack"];
|
|
152
|
+
};
|
|
153
|
+
readonly children: {
|
|
154
|
+
readonly type: "array";
|
|
155
|
+
readonly items: {
|
|
156
|
+
readonly $ref: "#/$defs/layoutNode";
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
readonly props: {
|
|
160
|
+
readonly type: "object";
|
|
161
|
+
readonly additionalProperties: true;
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
readonly componentNode: {
|
|
166
|
+
readonly type: "object";
|
|
167
|
+
readonly additionalProperties: false;
|
|
168
|
+
readonly required: readonly ["id", "type"];
|
|
169
|
+
readonly properties: {
|
|
170
|
+
readonly id: {
|
|
171
|
+
readonly type: "string";
|
|
172
|
+
};
|
|
173
|
+
readonly type: {
|
|
174
|
+
readonly type: "string";
|
|
175
|
+
};
|
|
176
|
+
readonly props: {
|
|
177
|
+
readonly type: "object";
|
|
178
|
+
readonly additionalProperties: true;
|
|
179
|
+
};
|
|
180
|
+
readonly children: {
|
|
181
|
+
readonly type: "array";
|
|
182
|
+
readonly items: {
|
|
183
|
+
readonly $ref: "#/$defs/componentNode";
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
readonly dataSource: {
|
|
189
|
+
readonly type: "object";
|
|
190
|
+
readonly additionalProperties: false;
|
|
191
|
+
readonly required: readonly ["id", "type", "connectionId"];
|
|
192
|
+
readonly properties: {
|
|
193
|
+
readonly id: {
|
|
194
|
+
readonly type: "string";
|
|
195
|
+
};
|
|
196
|
+
readonly type: {
|
|
197
|
+
readonly enum: readonly ["sql", "stored_procedure", "api"];
|
|
198
|
+
};
|
|
199
|
+
readonly connectionId: {
|
|
200
|
+
readonly type: "number";
|
|
201
|
+
};
|
|
202
|
+
readonly queryTemplate: {
|
|
203
|
+
readonly type: "string";
|
|
204
|
+
};
|
|
205
|
+
readonly procedureName: {
|
|
206
|
+
readonly type: "string";
|
|
207
|
+
};
|
|
208
|
+
readonly parameters: {
|
|
209
|
+
readonly type: "object";
|
|
210
|
+
readonly additionalProperties: true;
|
|
211
|
+
};
|
|
212
|
+
readonly refreshPolicy: {
|
|
213
|
+
readonly type: "object";
|
|
214
|
+
readonly additionalProperties: false;
|
|
215
|
+
readonly required: readonly ["mode"];
|
|
216
|
+
readonly properties: {
|
|
217
|
+
readonly mode: {
|
|
218
|
+
readonly enum: readonly ["manual", "interval", "realtime"];
|
|
219
|
+
};
|
|
220
|
+
readonly intervalMs: {
|
|
221
|
+
readonly type: "number";
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
};
|
|
227
|
+
readonly binding: {
|
|
228
|
+
readonly type: "object";
|
|
229
|
+
readonly additionalProperties: false;
|
|
230
|
+
readonly required: readonly ["componentId", "targetProp", "sourceDataSourceId", "sourcePath"];
|
|
231
|
+
readonly properties: {
|
|
232
|
+
readonly componentId: {
|
|
233
|
+
readonly type: "string";
|
|
234
|
+
};
|
|
235
|
+
readonly targetProp: {
|
|
236
|
+
readonly type: "string";
|
|
237
|
+
};
|
|
238
|
+
readonly sourceDataSourceId: {
|
|
239
|
+
readonly type: "string";
|
|
240
|
+
};
|
|
241
|
+
readonly sourcePath: {
|
|
242
|
+
readonly type: "string";
|
|
243
|
+
};
|
|
244
|
+
readonly formatter: {
|
|
245
|
+
readonly type: "string";
|
|
246
|
+
};
|
|
247
|
+
};
|
|
248
|
+
};
|
|
249
|
+
readonly interaction: {
|
|
250
|
+
readonly type: "object";
|
|
251
|
+
readonly additionalProperties: false;
|
|
252
|
+
readonly required: readonly ["id", "trigger", "sourceComponentId", "action"];
|
|
253
|
+
readonly properties: {
|
|
254
|
+
readonly id: {
|
|
255
|
+
readonly type: "string";
|
|
256
|
+
};
|
|
257
|
+
readonly trigger: {
|
|
258
|
+
readonly enum: readonly ["click", "change", "submit"];
|
|
259
|
+
};
|
|
260
|
+
readonly sourceComponentId: {
|
|
261
|
+
readonly type: "string";
|
|
262
|
+
};
|
|
263
|
+
readonly action: {
|
|
264
|
+
readonly enum: readonly ["setFilter", "navigate", "emitEvent", "refreshData"];
|
|
265
|
+
};
|
|
266
|
+
readonly payload: {
|
|
267
|
+
readonly type: "object";
|
|
268
|
+
readonly additionalProperties: true;
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
};
|
|
272
|
+
};
|
|
273
|
+
};
|
|
274
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../artifact-schema/src/schema.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,UAAU,CAAA;AAE5C,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkKlC,CAAA"}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
export const WIBI_ARTIFACT_VERSION = '1.0.0';
|
|
2
|
+
export const wibiDashboardArtifactJsonSchema = {
|
|
3
|
+
$schema: 'https://json-schema.org/draft/2020-12/schema',
|
|
4
|
+
$id: 'https://schemas.wibi.com/dashboard-artifact/v1.json',
|
|
5
|
+
title: 'WibiDashboardArtifact',
|
|
6
|
+
type: 'object',
|
|
7
|
+
additionalProperties: false,
|
|
8
|
+
required: [
|
|
9
|
+
'artifactVersion',
|
|
10
|
+
'dashboard',
|
|
11
|
+
'layout',
|
|
12
|
+
'components',
|
|
13
|
+
'dataSources',
|
|
14
|
+
'bindings',
|
|
15
|
+
'interactions',
|
|
16
|
+
'meta'
|
|
17
|
+
],
|
|
18
|
+
properties: {
|
|
19
|
+
artifactVersion: { type: 'string' },
|
|
20
|
+
dashboard: {
|
|
21
|
+
type: 'object',
|
|
22
|
+
additionalProperties: false,
|
|
23
|
+
required: ['id', 'slug', 'name'],
|
|
24
|
+
properties: {
|
|
25
|
+
id: { type: 'string', minLength: 1 },
|
|
26
|
+
slug: { type: 'string', minLength: 1 },
|
|
27
|
+
name: { type: 'string', minLength: 1 },
|
|
28
|
+
description: { type: 'string' },
|
|
29
|
+
tags: { type: 'array', items: { type: 'string' } },
|
|
30
|
+
category: { type: 'string' }
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
theme: {
|
|
34
|
+
type: 'object',
|
|
35
|
+
additionalProperties: true
|
|
36
|
+
},
|
|
37
|
+
layout: {
|
|
38
|
+
type: 'object',
|
|
39
|
+
additionalProperties: false,
|
|
40
|
+
required: ['root'],
|
|
41
|
+
properties: {
|
|
42
|
+
root: { $ref: '#/$defs/layoutNode' },
|
|
43
|
+
breakpoints: {
|
|
44
|
+
type: 'object',
|
|
45
|
+
additionalProperties: { type: 'number' }
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
components: {
|
|
50
|
+
type: 'array',
|
|
51
|
+
items: { $ref: '#/$defs/componentNode' }
|
|
52
|
+
},
|
|
53
|
+
dataSources: {
|
|
54
|
+
type: 'array',
|
|
55
|
+
items: { $ref: '#/$defs/dataSource' }
|
|
56
|
+
},
|
|
57
|
+
bindings: {
|
|
58
|
+
type: 'array',
|
|
59
|
+
items: { $ref: '#/$defs/binding' }
|
|
60
|
+
},
|
|
61
|
+
interactions: {
|
|
62
|
+
type: 'array',
|
|
63
|
+
items: { $ref: '#/$defs/interaction' }
|
|
64
|
+
},
|
|
65
|
+
accessPolicy: {
|
|
66
|
+
type: 'object',
|
|
67
|
+
additionalProperties: false,
|
|
68
|
+
properties: {
|
|
69
|
+
roles: { type: 'array', items: { type: 'string' } },
|
|
70
|
+
scopes: { type: 'array', items: { type: 'string' } },
|
|
71
|
+
featureFlags: { type: 'array', items: { type: 'string' } }
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
meta: {
|
|
75
|
+
type: 'object',
|
|
76
|
+
additionalProperties: false,
|
|
77
|
+
required: ['generatedBy', 'createdAt', 'updatedAt'],
|
|
78
|
+
properties: {
|
|
79
|
+
author: { type: 'string' },
|
|
80
|
+
generatedBy: { type: 'string', minLength: 1 },
|
|
81
|
+
createdAt: { type: 'string', format: 'date-time' },
|
|
82
|
+
updatedAt: { type: 'string', format: 'date-time' },
|
|
83
|
+
checksum: { type: 'string' },
|
|
84
|
+
artifactHash: { type: 'string' }
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
$defs: {
|
|
89
|
+
layoutNode: {
|
|
90
|
+
type: 'object',
|
|
91
|
+
additionalProperties: false,
|
|
92
|
+
required: ['id', 'type'],
|
|
93
|
+
properties: {
|
|
94
|
+
id: { type: 'string' },
|
|
95
|
+
type: { enum: ['row', 'column', 'grid', 'stack'] },
|
|
96
|
+
children: {
|
|
97
|
+
type: 'array',
|
|
98
|
+
items: { $ref: '#/$defs/layoutNode' }
|
|
99
|
+
},
|
|
100
|
+
props: { type: 'object', additionalProperties: true }
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
componentNode: {
|
|
104
|
+
type: 'object',
|
|
105
|
+
additionalProperties: false,
|
|
106
|
+
required: ['id', 'type'],
|
|
107
|
+
properties: {
|
|
108
|
+
id: { type: 'string' },
|
|
109
|
+
type: { type: 'string' },
|
|
110
|
+
props: { type: 'object', additionalProperties: true },
|
|
111
|
+
children: {
|
|
112
|
+
type: 'array',
|
|
113
|
+
items: { $ref: '#/$defs/componentNode' }
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
dataSource: {
|
|
118
|
+
type: 'object',
|
|
119
|
+
additionalProperties: false,
|
|
120
|
+
required: ['id', 'type', 'connectionId'],
|
|
121
|
+
properties: {
|
|
122
|
+
id: { type: 'string' },
|
|
123
|
+
type: { enum: ['sql', 'stored_procedure', 'api'] },
|
|
124
|
+
connectionId: { type: 'number' },
|
|
125
|
+
queryTemplate: { type: 'string' },
|
|
126
|
+
procedureName: { type: 'string' },
|
|
127
|
+
parameters: { type: 'object', additionalProperties: true },
|
|
128
|
+
refreshPolicy: {
|
|
129
|
+
type: 'object',
|
|
130
|
+
additionalProperties: false,
|
|
131
|
+
required: ['mode'],
|
|
132
|
+
properties: {
|
|
133
|
+
mode: { enum: ['manual', 'interval', 'realtime'] },
|
|
134
|
+
intervalMs: { type: 'number' }
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
binding: {
|
|
140
|
+
type: 'object',
|
|
141
|
+
additionalProperties: false,
|
|
142
|
+
required: ['componentId', 'targetProp', 'sourceDataSourceId', 'sourcePath'],
|
|
143
|
+
properties: {
|
|
144
|
+
componentId: { type: 'string' },
|
|
145
|
+
targetProp: { type: 'string' },
|
|
146
|
+
sourceDataSourceId: { type: 'string' },
|
|
147
|
+
sourcePath: { type: 'string' },
|
|
148
|
+
formatter: { type: 'string' }
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
interaction: {
|
|
152
|
+
type: 'object',
|
|
153
|
+
additionalProperties: false,
|
|
154
|
+
required: ['id', 'trigger', 'sourceComponentId', 'action'],
|
|
155
|
+
properties: {
|
|
156
|
+
id: { type: 'string' },
|
|
157
|
+
trigger: { enum: ['click', 'change', 'submit'] },
|
|
158
|
+
sourceComponentId: { type: 'string' },
|
|
159
|
+
action: { enum: ['setFilter', 'navigate', 'emitEvent', 'refreshData'] },
|
|
160
|
+
payload: { type: 'object', additionalProperties: true }
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../artifact-schema/src/schema.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,qBAAqB,GAAG,OAAO,CAAA;AAE5C,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC7C,OAAO,EAAE,8CAA8C;IACvD,G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E,IAAI,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAAE;gBAChD,iBAAiB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACrC,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,aAAa,CAAC,EAAE;gBACvE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,oBAAoB,EAAE,IAAI,EAAE;aACxD;SACF;KACF;CACO,CAAA"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
export type WibiTheme = {
|
|
2
|
+
palette?: Record<string, string>;
|
|
3
|
+
spacing?: Record<string, number>;
|
|
4
|
+
typography?: {
|
|
5
|
+
fontFamily?: string;
|
|
6
|
+
baseSize?: number;
|
|
7
|
+
};
|
|
8
|
+
tokens?: Record<string, string | number>;
|
|
9
|
+
};
|
|
10
|
+
export type WibiLayoutNode = {
|
|
11
|
+
id: string;
|
|
12
|
+
type: 'row' | 'column' | 'grid' | 'stack';
|
|
13
|
+
children?: WibiLayoutNode[];
|
|
14
|
+
props?: Record<string, unknown>;
|
|
15
|
+
};
|
|
16
|
+
export type WibiComponentNode = {
|
|
17
|
+
id: string;
|
|
18
|
+
type: string;
|
|
19
|
+
props?: Record<string, unknown>;
|
|
20
|
+
children?: WibiComponentNode[];
|
|
21
|
+
};
|
|
22
|
+
export type WibiDataSource = {
|
|
23
|
+
id: string;
|
|
24
|
+
type: 'sql' | 'stored_procedure' | 'api';
|
|
25
|
+
connectionId: number;
|
|
26
|
+
queryTemplate?: string;
|
|
27
|
+
procedureName?: string;
|
|
28
|
+
parameters?: Record<string, unknown>;
|
|
29
|
+
refreshPolicy?: {
|
|
30
|
+
mode: 'manual' | 'interval' | 'realtime';
|
|
31
|
+
intervalMs?: number;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export type WibiBinding = {
|
|
35
|
+
componentId: string;
|
|
36
|
+
targetProp: string;
|
|
37
|
+
sourceDataSourceId: string;
|
|
38
|
+
sourcePath: string;
|
|
39
|
+
formatter?: string;
|
|
40
|
+
};
|
|
41
|
+
export type WibiInteraction = {
|
|
42
|
+
id: string;
|
|
43
|
+
trigger: 'click' | 'change' | 'submit';
|
|
44
|
+
sourceComponentId: string;
|
|
45
|
+
action: 'setFilter' | 'navigate' | 'emitEvent' | 'refreshData';
|
|
46
|
+
payload?: Record<string, unknown>;
|
|
47
|
+
};
|
|
48
|
+
export type WibiAccessPolicy = {
|
|
49
|
+
roles?: string[];
|
|
50
|
+
scopes?: string[];
|
|
51
|
+
featureFlags?: string[];
|
|
52
|
+
};
|
|
53
|
+
export type WibiDashboardArtifact = {
|
|
54
|
+
artifactVersion: string;
|
|
55
|
+
dashboard: {
|
|
56
|
+
id: string;
|
|
57
|
+
slug: string;
|
|
58
|
+
name: string;
|
|
59
|
+
description?: string;
|
|
60
|
+
tags?: string[];
|
|
61
|
+
category?: string;
|
|
62
|
+
};
|
|
63
|
+
theme?: WibiTheme;
|
|
64
|
+
layout: {
|
|
65
|
+
root: WibiLayoutNode;
|
|
66
|
+
breakpoints?: Record<string, number>;
|
|
67
|
+
};
|
|
68
|
+
components: WibiComponentNode[];
|
|
69
|
+
dataSources: WibiDataSource[];
|
|
70
|
+
bindings: WibiBinding[];
|
|
71
|
+
interactions: WibiInteraction[];
|
|
72
|
+
accessPolicy?: WibiAccessPolicy;
|
|
73
|
+
meta: {
|
|
74
|
+
author?: string;
|
|
75
|
+
generatedBy: string;
|
|
76
|
+
createdAt: string;
|
|
77
|
+
updatedAt: string;
|
|
78
|
+
checksum?: string;
|
|
79
|
+
artifactHash?: string;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
export type ArtifactValidationResult = {
|
|
83
|
+
ok: true;
|
|
84
|
+
} | {
|
|
85
|
+
ok: false;
|
|
86
|
+
errors: string[];
|
|
87
|
+
};
|
|
88
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|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