@constructive-io/schema-builder 0.2.0 → 0.2.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/CHANGELOG.md +11 -0
- package/dist/card-widths-CmIxkRfh.cjs +28 -0
- package/dist/card-widths-CmIxkRfh.cjs.map +1 -0
- package/dist/card-widths-pI4Kw4Xz.js +22 -0
- package/dist/card-widths-pI4Kw4Xz.js.map +1 -0
- package/dist/core-WwCS0CKu.cjs +66 -0
- package/dist/core-WwCS0CKu.cjs.map +1 -0
- package/dist/core-kx6KjxE5.js +49 -0
- package/dist/core-kx6KjxE5.js.map +1 -0
- package/dist/core.cjs +14 -212
- package/dist/core.d.cts +3 -54
- package/dist/core.d.ts +3 -54
- package/dist/core.js +3 -200
- package/dist/create-table-card-BzNKfpXO.cjs +7726 -0
- package/dist/create-table-card-BzNKfpXO.cjs.map +1 -0
- package/dist/create-table-card-pZ0Aq6rr.js +7685 -0
- package/dist/create-table-card-pZ0Aq6rr.js.map +1 -0
- package/dist/delete-confirm-dialog-Ch4tWj6B.cjs +42 -0
- package/dist/delete-confirm-dialog-Ch4tWj6B.cjs.map +1 -0
- package/dist/delete-confirm-dialog-K0AWE643.js +37 -0
- package/dist/delete-confirm-dialog-K0AWE643.js.map +1 -0
- package/dist/empty-state-card-DMn8ADRq.cjs +62 -0
- package/dist/empty-state-card-DMn8ADRq.cjs.map +1 -0
- package/dist/empty-state-card-Dnn36JVH.js +57 -0
- package/dist/empty-state-card-Dnn36JVH.js.map +1 -0
- package/dist/fields.cjs +8 -7763
- package/dist/fields.d.cts +39 -39
- package/dist/fields.d.ts +39 -39
- package/dist/fields.js +2 -7735
- package/dist/generated-types-DZMUyNBH.d.cts +27 -0
- package/dist/generated-types-DZMUyNBH.d.ts +27 -0
- package/dist/index-9h0EROdb.d.cts +56 -0
- package/dist/index-CwQ9QpxA.d.ts +7 -0
- package/dist/index-DOWB1UBK.d.cts +56 -0
- package/dist/index-DOWB1UBK.d.ts +56 -0
- package/dist/index-Dgb_e3AP.d.cts +7 -0
- package/dist/index-p_NegPQ5.d.ts +56 -0
- package/dist/index.cjs +736 -13712
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -10
- package/dist/index.d.ts +4 -10
- package/dist/index.js +725 -13680
- package/dist/index.js.map +1 -1
- package/dist/indexes-view-CJ1WQKdp.js +736 -0
- package/dist/indexes-view-CJ1WQKdp.js.map +1 -0
- package/dist/indexes-view-peIv6QUZ.cjs +759 -0
- package/dist/indexes-view-peIv6QUZ.cjs.map +1 -0
- package/dist/indexes.cjs +6 -1041
- package/dist/indexes.d.cts +27 -27
- package/dist/indexes.d.ts +27 -27
- package/dist/indexes.js +2 -1016
- package/dist/invalidate-database-entities-9DsT5NlP.cjs +2862 -0
- package/dist/invalidate-database-entities-9DsT5NlP.cjs.map +1 -0
- package/dist/invalidate-database-entities-CmmOT3S0.js +2559 -0
- package/dist/invalidate-database-entities-CmmOT3S0.js.map +1 -0
- package/dist/keyboard-activation-BQiV0scm.js +13 -0
- package/dist/keyboard-activation-BQiV0scm.js.map +1 -0
- package/dist/keyboard-activation-D-L0IU6Y.cjs +19 -0
- package/dist/keyboard-activation-D-L0IU6Y.cjs.map +1 -0
- package/dist/policies-view-BRbpbyB6.js +1018 -0
- package/dist/policies-view-BRbpbyB6.js.map +1 -0
- package/dist/policies-view-H1HTjpmv.cjs +1023 -0
- package/dist/policies-view-H1HTjpmv.cjs.map +1 -0
- package/dist/policies.cjs +10 -5939
- package/dist/policies.d.cts +55 -50
- package/dist/policies.d.ts +55 -50
- package/dist/policies.js +4 -5911
- package/dist/policy-config-form-BwyK7DGV.js +2502 -0
- package/dist/policy-config-form-BwyK7DGV.js.map +1 -0
- package/dist/policy-config-form-CefFo6Fw.cjs +2629 -0
- package/dist/policy-config-form-CefFo6Fw.cjs.map +1 -0
- package/dist/policy-types-D_sYWb-b.d.cts +81 -0
- package/dist/policy-types-D_sYWb-b.d.ts +81 -0
- package/dist/query-BmN_qO0W.js +171 -0
- package/dist/query-BmN_qO0W.js.map +1 -0
- package/dist/query-DU-KZleN.cjs +212 -0
- package/dist/query-DU-KZleN.cjs.map +1 -0
- package/dist/relationships-view-B5TAcPHU.cjs +2452 -0
- package/dist/relationships-view-B5TAcPHU.cjs.map +1 -0
- package/dist/relationships-view-DbwFh5r-.js +2417 -0
- package/dist/relationships-view-DbwFh5r-.js.map +1 -0
- package/dist/relationships.cjs +9 -4328
- package/dist/relationships.d.cts +93 -92
- package/dist/relationships.d.ts +93 -92
- package/dist/relationships.js +2 -4300
- package/dist/rolldown-runtime-D_qnwXdH.cjs +35 -0
- package/dist/schema-builder-sidebar-Ctu621Vw.cjs +604 -0
- package/dist/schema-builder-sidebar-Ctu621Vw.cjs.map +1 -0
- package/dist/schema-builder-sidebar-VR-Ctidc.js +593 -0
- package/dist/schema-builder-sidebar-VR-Ctidc.js.map +1 -0
- package/dist/table-editor-C-hHz3DJ.cjs +1935 -0
- package/dist/table-editor-C-hHz3DJ.cjs.map +1 -0
- package/dist/table-editor-IVp3B4nG.js +1906 -0
- package/dist/table-editor-IVp3B4nG.js.map +1 -0
- package/dist/tables.cjs +6 -5643
- package/dist/tables.d.cts +22 -21
- package/dist/tables.d.ts +22 -21
- package/dist/tables.js +3 -5618
- package/dist/testing.cjs +63 -62
- package/dist/testing.cjs.map +1 -1
- package/dist/testing.d.cts +4 -4
- package/dist/testing.d.ts +4 -4
- package/dist/testing.js +62 -61
- package/dist/testing.js.map +1 -1
- package/dist/types-GUrH1Qny.d.cts +200 -0
- package/dist/types-GUrH1Qny.d.ts +200 -0
- package/dist/use-update-table-C7v3gRyG.cjs +291 -0
- package/dist/use-update-table-C7v3gRyG.cjs.map +1 -0
- package/dist/use-update-table-Dz6knGoH.js +244 -0
- package/dist/use-update-table-Dz6knGoH.js.map +1 -0
- package/package.json +6 -6
- package/dist/core.cjs.map +0 -1
- package/dist/core.js.map +0 -1
- package/dist/fields.cjs.map +0 -1
- package/dist/fields.js.map +0 -1
- package/dist/generated-types-CnAlqHU_.d.cts +0 -25
- package/dist/generated-types-CnAlqHU_.d.ts +0 -25
- package/dist/indexes.cjs.map +0 -1
- package/dist/indexes.js.map +0 -1
- package/dist/policies.cjs.map +0 -1
- package/dist/policies.js.map +0 -1
- package/dist/policy-types-CEYAR5TN.d.cts +0 -79
- package/dist/policy-types-CEYAR5TN.d.ts +0 -79
- package/dist/relationships.cjs.map +0 -1
- package/dist/relationships.js.map +0 -1
- package/dist/tables.cjs.map +0 -1
- package/dist/tables.js.map +0 -1
- package/dist/types-Du86atZ8.d.cts +0 -199
- package/dist/types-Du86atZ8.d.ts +0 -199
- package/dist/types-bX2dCrdl.d.cts +0 -52
- package/dist/types-bX2dCrdl.d.ts +0 -52
package/dist/testing.cjs
CHANGED
|
@@ -1,69 +1,70 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
'
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
//#region src/testing.ts
|
|
5
|
+
/** Minimal hermetic adapter for documentation, visual tests, and empty states. */
|
|
5
6
|
function createNoopSchemaBuilderAdapter(operation = async () => []) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
7
|
+
return {
|
|
8
|
+
core: {
|
|
9
|
+
apiSchemas: operation,
|
|
10
|
+
apis: operation,
|
|
11
|
+
databases: operation,
|
|
12
|
+
fields: operation,
|
|
13
|
+
foreignKeyConstraints: operation,
|
|
14
|
+
indices: operation,
|
|
15
|
+
policies: operation,
|
|
16
|
+
primaryKeyConstraints: operation,
|
|
17
|
+
schemas: operation,
|
|
18
|
+
table: async () => null,
|
|
19
|
+
tables: operation,
|
|
20
|
+
uniqueConstraints: operation,
|
|
21
|
+
users: operation
|
|
22
|
+
},
|
|
23
|
+
fields: {
|
|
24
|
+
createField: operation,
|
|
25
|
+
createPrimaryKeyConstraint: operation,
|
|
26
|
+
createUniqueConstraint: operation,
|
|
27
|
+
deleteField: operation,
|
|
28
|
+
deletePrimaryKeyConstraint: operation,
|
|
29
|
+
deleteUniqueConstraint: operation,
|
|
30
|
+
updateField: operation,
|
|
31
|
+
updatePrimaryKeyConstraint: operation
|
|
32
|
+
},
|
|
33
|
+
relationships: {
|
|
34
|
+
createField: operation,
|
|
35
|
+
createForeignKeyConstraint: operation,
|
|
36
|
+
createPrimaryKeyConstraint: operation,
|
|
37
|
+
createRelationProvision: operation,
|
|
38
|
+
createTable: operation,
|
|
39
|
+
createUniqueConstraint: operation,
|
|
40
|
+
deleteForeignKeyConstraint: operation,
|
|
41
|
+
relationProvisions: operation,
|
|
42
|
+
updateForeignKeyConstraint: operation
|
|
43
|
+
},
|
|
44
|
+
indexes: {
|
|
45
|
+
createIndex: operation,
|
|
46
|
+
deleteIndex: operation,
|
|
47
|
+
updateIndex: operation
|
|
48
|
+
},
|
|
49
|
+
policies: {
|
|
50
|
+
appPermissions: operation,
|
|
51
|
+
createField: operation,
|
|
52
|
+
createSecureTableProvision: operation,
|
|
53
|
+
createTable: operation,
|
|
54
|
+
createTableGrant: operation,
|
|
55
|
+
deletePolicy: operation,
|
|
56
|
+
fields: operation,
|
|
57
|
+
orgPermissions: operation,
|
|
58
|
+
tables: operation,
|
|
59
|
+
updatePolicy: operation
|
|
60
|
+
},
|
|
61
|
+
tables: {
|
|
62
|
+
deleteTable: operation,
|
|
63
|
+
updateTable: operation
|
|
64
|
+
}
|
|
65
|
+
};
|
|
65
66
|
}
|
|
66
67
|
|
|
68
|
+
//#endregion
|
|
67
69
|
exports.createNoopSchemaBuilderAdapter = createNoopSchemaBuilderAdapter;
|
|
68
|
-
//# sourceMappingURL=testing.cjs.map
|
|
69
70
|
//# sourceMappingURL=testing.cjs.map
|
package/dist/testing.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/testing.ts"],"
|
|
1
|
+
{"version":3,"file":"testing.cjs","names":[],"sources":["../src/testing.ts"],"mappings":";;;;;AAGA,SAAgB,+BACd,YAAoC,YAAY,CAAC,GAC3B;CACtB,OAAO;EACL,MAAM;GACJ,YAAY;GACZ,MAAM;GACN,WAAW;GACX,QAAQ;GACR,uBAAuB;GACvB,SAAS;GACT,UAAU;GACV,uBAAuB;GACvB,SAAS;GACT,OAAO,YAAY;GACnB,QAAQ;GACR,mBAAmB;GACnB,OAAO;EACT;EACA,QAAQ;GACN,aAAa;GACb,4BAA4B;GAC5B,wBAAwB;GACxB,aAAa;GACb,4BAA4B;GAC5B,wBAAwB;GACxB,aAAa;GACb,4BAA4B;EAC9B;EACA,eAAe;GACb,aAAa;GACb,4BAA4B;GAC5B,4BAA4B;GAC5B,yBAAyB;GACzB,aAAa;GACb,wBAAwB;GACxB,4BAA4B;GAC5B,oBAAoB;GACpB,4BAA4B;EAC9B;EACA,SAAS;GACP,aAAa;GACb,aAAa;GACb,aAAa;EACf;EACA,UAAU;GACR,gBAAgB;GAChB,aAAa;GACb,4BAA4B;GAC5B,aAAa;GACb,kBAAkB;GAClB,cAAc;GACd,QAAQ;GACR,gBAAgB;GAChB,QAAQ;GACR,cAAc;EAChB;EACA,QAAQ;GACN,aAAa;GACb,aAAa;EACf;CACF;AACF"}
|
package/dist/testing.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { h as SchemaBuilderOperation, n as SchemaBuilderAdapter } from "./types-GUrH1Qny.cjs";
|
|
2
|
+
//#region src/testing.d.ts
|
|
4
3
|
/** Minimal hermetic adapter for documentation, visual tests, and empty states. */
|
|
5
4
|
declare function createNoopSchemaBuilderAdapter(operation?: SchemaBuilderOperation): SchemaBuilderAdapter;
|
|
6
|
-
|
|
5
|
+
//#endregion
|
|
7
6
|
export { createNoopSchemaBuilderAdapter };
|
|
7
|
+
//# sourceMappingURL=testing.d.cts.map
|
package/dist/testing.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { h as SchemaBuilderOperation, n as SchemaBuilderAdapter } from "./types-GUrH1Qny.js";
|
|
2
|
+
//#region src/testing.d.ts
|
|
4
3
|
/** Minimal hermetic adapter for documentation, visual tests, and empty states. */
|
|
5
4
|
declare function createNoopSchemaBuilderAdapter(operation?: SchemaBuilderOperation): SchemaBuilderAdapter;
|
|
6
|
-
|
|
5
|
+
//#endregion
|
|
7
6
|
export { createNoopSchemaBuilderAdapter };
|
|
7
|
+
//# sourceMappingURL=testing.d.ts.map
|
package/dist/testing.js
CHANGED
|
@@ -1,67 +1,68 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
2
|
+
//#region src/testing.ts
|
|
3
|
+
/** Minimal hermetic adapter for documentation, visual tests, and empty states. */
|
|
3
4
|
function createNoopSchemaBuilderAdapter(operation = async () => []) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
5
|
+
return {
|
|
6
|
+
core: {
|
|
7
|
+
apiSchemas: operation,
|
|
8
|
+
apis: operation,
|
|
9
|
+
databases: operation,
|
|
10
|
+
fields: operation,
|
|
11
|
+
foreignKeyConstraints: operation,
|
|
12
|
+
indices: operation,
|
|
13
|
+
policies: operation,
|
|
14
|
+
primaryKeyConstraints: operation,
|
|
15
|
+
schemas: operation,
|
|
16
|
+
table: async () => null,
|
|
17
|
+
tables: operation,
|
|
18
|
+
uniqueConstraints: operation,
|
|
19
|
+
users: operation
|
|
20
|
+
},
|
|
21
|
+
fields: {
|
|
22
|
+
createField: operation,
|
|
23
|
+
createPrimaryKeyConstraint: operation,
|
|
24
|
+
createUniqueConstraint: operation,
|
|
25
|
+
deleteField: operation,
|
|
26
|
+
deletePrimaryKeyConstraint: operation,
|
|
27
|
+
deleteUniqueConstraint: operation,
|
|
28
|
+
updateField: operation,
|
|
29
|
+
updatePrimaryKeyConstraint: operation
|
|
30
|
+
},
|
|
31
|
+
relationships: {
|
|
32
|
+
createField: operation,
|
|
33
|
+
createForeignKeyConstraint: operation,
|
|
34
|
+
createPrimaryKeyConstraint: operation,
|
|
35
|
+
createRelationProvision: operation,
|
|
36
|
+
createTable: operation,
|
|
37
|
+
createUniqueConstraint: operation,
|
|
38
|
+
deleteForeignKeyConstraint: operation,
|
|
39
|
+
relationProvisions: operation,
|
|
40
|
+
updateForeignKeyConstraint: operation
|
|
41
|
+
},
|
|
42
|
+
indexes: {
|
|
43
|
+
createIndex: operation,
|
|
44
|
+
deleteIndex: operation,
|
|
45
|
+
updateIndex: operation
|
|
46
|
+
},
|
|
47
|
+
policies: {
|
|
48
|
+
appPermissions: operation,
|
|
49
|
+
createField: operation,
|
|
50
|
+
createSecureTableProvision: operation,
|
|
51
|
+
createTable: operation,
|
|
52
|
+
createTableGrant: operation,
|
|
53
|
+
deletePolicy: operation,
|
|
54
|
+
fields: operation,
|
|
55
|
+
orgPermissions: operation,
|
|
56
|
+
tables: operation,
|
|
57
|
+
updatePolicy: operation
|
|
58
|
+
},
|
|
59
|
+
tables: {
|
|
60
|
+
deleteTable: operation,
|
|
61
|
+
updateTable: operation
|
|
62
|
+
}
|
|
63
|
+
};
|
|
63
64
|
}
|
|
64
65
|
|
|
66
|
+
//#endregion
|
|
65
67
|
export { createNoopSchemaBuilderAdapter };
|
|
66
|
-
//# sourceMappingURL=testing.js.map
|
|
67
68
|
//# sourceMappingURL=testing.js.map
|
package/dist/testing.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/testing.ts"],"
|
|
1
|
+
{"version":3,"file":"testing.js","names":[],"sources":["../src/testing.ts"],"mappings":";;;AAGA,SAAgB,+BACd,YAAoC,YAAY,CAAC,GAC3B;CACtB,OAAO;EACL,MAAM;GACJ,YAAY;GACZ,MAAM;GACN,WAAW;GACX,QAAQ;GACR,uBAAuB;GACvB,SAAS;GACT,UAAU;GACV,uBAAuB;GACvB,SAAS;GACT,OAAO,YAAY;GACnB,QAAQ;GACR,mBAAmB;GACnB,OAAO;EACT;EACA,QAAQ;GACN,aAAa;GACb,4BAA4B;GAC5B,wBAAwB;GACxB,aAAa;GACb,4BAA4B;GAC5B,wBAAwB;GACxB,aAAa;GACb,4BAA4B;EAC9B;EACA,eAAe;GACb,aAAa;GACb,4BAA4B;GAC5B,4BAA4B;GAC5B,yBAAyB;GACzB,aAAa;GACb,wBAAwB;GACxB,4BAA4B;GAC5B,oBAAoB;GACpB,4BAA4B;EAC9B;EACA,SAAS;GACP,aAAa;GACb,aAAa;GACb,aAAa;EACf;EACA,UAAU;GACR,gBAAgB;GAChB,aAAa;GACb,4BAA4B;GAC5B,aAAa;GACb,kBAAkB;GAClB,cAAc;GACd,QAAQ;GACR,gBAAgB;GAChB,QAAQ;GACR,cAAc;EAChB;EACA,QAAQ;GACN,aAAa;GACb,aAAa;EACf;CACF;AACF"}
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
//#region src/types.d.ts
|
|
3
|
+
interface SchemaBuilderScope {
|
|
4
|
+
orgId: string;
|
|
5
|
+
databaseId: string;
|
|
6
|
+
userId?: string | null;
|
|
7
|
+
}
|
|
8
|
+
type SchemaBuilderColorMode = 'light' | 'dark';
|
|
9
|
+
interface SchemaBuilderSidebarSections {
|
|
10
|
+
app: boolean;
|
|
11
|
+
system: boolean;
|
|
12
|
+
}
|
|
13
|
+
interface SchemaBuilderPreferences {
|
|
14
|
+
sidebarSectionsExpanded: SchemaBuilderSidebarSections;
|
|
15
|
+
showSystemTablesInSidebar: boolean;
|
|
16
|
+
showSystemTablesInVisualizer: boolean;
|
|
17
|
+
sidebarPinned: boolean;
|
|
18
|
+
typesLibraryExpanded: boolean;
|
|
19
|
+
}
|
|
20
|
+
declare const DEFAULT_SCHEMA_BUILDER_PREFERENCES: Readonly<SchemaBuilderPreferences>;
|
|
21
|
+
interface SchemaBuilderField {
|
|
22
|
+
id: string;
|
|
23
|
+
name: string;
|
|
24
|
+
type?: string | null;
|
|
25
|
+
description?: string | null;
|
|
26
|
+
isNullable?: boolean | null;
|
|
27
|
+
isPrimaryKey?: boolean | null;
|
|
28
|
+
isUnique?: boolean | null;
|
|
29
|
+
[key: string]: unknown;
|
|
30
|
+
}
|
|
31
|
+
interface SchemaBuilderTable {
|
|
32
|
+
id: string;
|
|
33
|
+
name: string;
|
|
34
|
+
label?: string | null;
|
|
35
|
+
description?: string | null;
|
|
36
|
+
category?: string | null;
|
|
37
|
+
schemaId?: string | null;
|
|
38
|
+
fields?: readonly SchemaBuilderField[];
|
|
39
|
+
[key: string]: unknown;
|
|
40
|
+
}
|
|
41
|
+
interface SchemaBuilderSchema {
|
|
42
|
+
id: string;
|
|
43
|
+
name: string;
|
|
44
|
+
label?: string | null;
|
|
45
|
+
tables?: readonly SchemaBuilderTable[];
|
|
46
|
+
[key: string]: unknown;
|
|
47
|
+
}
|
|
48
|
+
interface SchemaBuilderIndex {
|
|
49
|
+
id: string;
|
|
50
|
+
name: string;
|
|
51
|
+
tableId?: string | null;
|
|
52
|
+
fieldIds?: readonly string[];
|
|
53
|
+
isUnique?: boolean | null;
|
|
54
|
+
[key: string]: unknown;
|
|
55
|
+
}
|
|
56
|
+
interface SchemaBuilderPolicy {
|
|
57
|
+
id: string;
|
|
58
|
+
name: string;
|
|
59
|
+
tableId?: string | null;
|
|
60
|
+
command?: string | null;
|
|
61
|
+
[key: string]: unknown;
|
|
62
|
+
}
|
|
63
|
+
interface SchemaBuilderRelationship {
|
|
64
|
+
id: string;
|
|
65
|
+
sourceTableId?: string | null;
|
|
66
|
+
targetTableId?: string | null;
|
|
67
|
+
[key: string]: unknown;
|
|
68
|
+
}
|
|
69
|
+
interface SchemaBuilderOperationContext {
|
|
70
|
+
scope: SchemaBuilderScope;
|
|
71
|
+
signal?: AbortSignal;
|
|
72
|
+
/** Generated-SDK registry adapters forward requested result fields here. */
|
|
73
|
+
selection?: Readonly<Record<string, unknown>>;
|
|
74
|
+
}
|
|
75
|
+
type SchemaBuilderVariables = object;
|
|
76
|
+
type SchemaBuilderOperation<TVariables extends SchemaBuilderVariables = SchemaBuilderVariables, TResult = unknown> = (variables: TVariables, context: SchemaBuilderOperationContext) => Promise<TResult>;
|
|
77
|
+
type SchemaBuilderCollection<T> = readonly T[] | {
|
|
78
|
+
nodes?: readonly T[] | null;
|
|
79
|
+
totalCount?: number | null;
|
|
80
|
+
};
|
|
81
|
+
interface SchemaBuilderCoreCapabilities {
|
|
82
|
+
apiSchemas: SchemaBuilderOperation;
|
|
83
|
+
apis: SchemaBuilderOperation;
|
|
84
|
+
databases: SchemaBuilderOperation;
|
|
85
|
+
fields: SchemaBuilderOperation;
|
|
86
|
+
foreignKeyConstraints: SchemaBuilderOperation;
|
|
87
|
+
indices: SchemaBuilderOperation;
|
|
88
|
+
policies: SchemaBuilderOperation;
|
|
89
|
+
primaryKeyConstraints: SchemaBuilderOperation;
|
|
90
|
+
schemas: SchemaBuilderOperation;
|
|
91
|
+
table: SchemaBuilderOperation;
|
|
92
|
+
tables: SchemaBuilderOperation;
|
|
93
|
+
uniqueConstraints: SchemaBuilderOperation;
|
|
94
|
+
users: SchemaBuilderOperation;
|
|
95
|
+
}
|
|
96
|
+
interface SchemaBuilderFieldsCapabilities {
|
|
97
|
+
createField: SchemaBuilderOperation;
|
|
98
|
+
createPrimaryKeyConstraint: SchemaBuilderOperation;
|
|
99
|
+
createUniqueConstraint: SchemaBuilderOperation;
|
|
100
|
+
deleteField: SchemaBuilderOperation;
|
|
101
|
+
deletePrimaryKeyConstraint: SchemaBuilderOperation;
|
|
102
|
+
deleteUniqueConstraint: SchemaBuilderOperation;
|
|
103
|
+
updateField: SchemaBuilderOperation;
|
|
104
|
+
updatePrimaryKeyConstraint: SchemaBuilderOperation;
|
|
105
|
+
}
|
|
106
|
+
interface SchemaBuilderRelationshipsCapabilities {
|
|
107
|
+
createField: SchemaBuilderOperation;
|
|
108
|
+
createForeignKeyConstraint: SchemaBuilderOperation;
|
|
109
|
+
createPrimaryKeyConstraint: SchemaBuilderOperation;
|
|
110
|
+
createRelationProvision: SchemaBuilderOperation;
|
|
111
|
+
createTable: SchemaBuilderOperation;
|
|
112
|
+
createUniqueConstraint: SchemaBuilderOperation;
|
|
113
|
+
deleteForeignKeyConstraint: SchemaBuilderOperation;
|
|
114
|
+
relationProvisions: SchemaBuilderOperation;
|
|
115
|
+
updateForeignKeyConstraint: SchemaBuilderOperation;
|
|
116
|
+
}
|
|
117
|
+
interface SchemaBuilderIndexesCapabilities {
|
|
118
|
+
createIndex: SchemaBuilderOperation;
|
|
119
|
+
deleteIndex: SchemaBuilderOperation;
|
|
120
|
+
updateIndex: SchemaBuilderOperation;
|
|
121
|
+
}
|
|
122
|
+
interface SchemaBuilderPoliciesCapabilities {
|
|
123
|
+
appPermissions: SchemaBuilderOperation;
|
|
124
|
+
createField: SchemaBuilderOperation;
|
|
125
|
+
createSecureTableProvision: SchemaBuilderOperation;
|
|
126
|
+
createTable: SchemaBuilderOperation;
|
|
127
|
+
createTableGrant: SchemaBuilderOperation;
|
|
128
|
+
deletePolicy: SchemaBuilderOperation;
|
|
129
|
+
fields: SchemaBuilderOperation;
|
|
130
|
+
orgPermissions: SchemaBuilderOperation;
|
|
131
|
+
tables: SchemaBuilderOperation;
|
|
132
|
+
updatePolicy: SchemaBuilderOperation;
|
|
133
|
+
}
|
|
134
|
+
interface SchemaBuilderTablesCapabilities {
|
|
135
|
+
deleteTable: SchemaBuilderOperation;
|
|
136
|
+
updateTable: SchemaBuilderOperation;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Imperative data boundary owned by the host. Each feature is isolated so a
|
|
140
|
+
* partial registry install can provide only the capabilities it consumes.
|
|
141
|
+
*/
|
|
142
|
+
interface SchemaBuilderAdapter {
|
|
143
|
+
core: SchemaBuilderCoreCapabilities;
|
|
144
|
+
fields: SchemaBuilderFieldsCapabilities;
|
|
145
|
+
relationships: SchemaBuilderRelationshipsCapabilities;
|
|
146
|
+
indexes: SchemaBuilderIndexesCapabilities;
|
|
147
|
+
policies: SchemaBuilderPoliciesCapabilities;
|
|
148
|
+
tables: SchemaBuilderTablesCapabilities;
|
|
149
|
+
}
|
|
150
|
+
type SchemaBuilderFeature = keyof SchemaBuilderAdapter;
|
|
151
|
+
type SchemaBuilderCoreTabId = 'editor' | 'relationships' | 'indexes' | 'security';
|
|
152
|
+
interface SchemaBuilderNavigationTarget {
|
|
153
|
+
href: string;
|
|
154
|
+
replace?: boolean;
|
|
155
|
+
}
|
|
156
|
+
interface SchemaBuilderTableSelection {
|
|
157
|
+
tableId: string | null;
|
|
158
|
+
tableName: string | null;
|
|
159
|
+
}
|
|
160
|
+
interface SchemaBuilderTabRenderContext {
|
|
161
|
+
scope: SchemaBuilderScope;
|
|
162
|
+
colorMode: SchemaBuilderColorMode;
|
|
163
|
+
selectedTableId: string | null;
|
|
164
|
+
}
|
|
165
|
+
interface SchemaBuilderTab {
|
|
166
|
+
id: string;
|
|
167
|
+
label: ReactNode;
|
|
168
|
+
render: (context: SchemaBuilderTabRenderContext) => ReactNode;
|
|
169
|
+
preload?: () => void | Promise<void>;
|
|
170
|
+
/** Keeps the tab addressable without showing it in the package-owned tab list. */
|
|
171
|
+
hidden?: boolean;
|
|
172
|
+
}
|
|
173
|
+
interface SchemaBuilderInvalidationEvent {
|
|
174
|
+
scope: SchemaBuilderScope;
|
|
175
|
+
feature: SchemaBuilderFeature;
|
|
176
|
+
operation: string;
|
|
177
|
+
}
|
|
178
|
+
interface SchemaBuilderHostOptions {
|
|
179
|
+
adapter: SchemaBuilderAdapter;
|
|
180
|
+
scope: SchemaBuilderScope;
|
|
181
|
+
colorMode: SchemaBuilderColorMode;
|
|
182
|
+
preferences: SchemaBuilderPreferences;
|
|
183
|
+
onPreferencesChange: (preferences: SchemaBuilderPreferences) => void;
|
|
184
|
+
activeTab: string;
|
|
185
|
+
onActiveTabChange: (tabId: string) => void;
|
|
186
|
+
/** Optional host-controlled table selection, such as a URL-backed table id. */
|
|
187
|
+
selectedTableId?: string | null;
|
|
188
|
+
onSelectedTableChange?: (selection: SchemaBuilderTableSelection) => void;
|
|
189
|
+
onNavigate?: (target: SchemaBuilderNavigationTarget) => void;
|
|
190
|
+
onInvalidate?: (event: SchemaBuilderInvalidationEvent) => void;
|
|
191
|
+
tabs?: readonly SchemaBuilderTab[];
|
|
192
|
+
}
|
|
193
|
+
interface SchemaBuilderProps extends SchemaBuilderHostOptions {
|
|
194
|
+
className?: string;
|
|
195
|
+
emptyState?: ReactNode;
|
|
196
|
+
}
|
|
197
|
+
declare function defineSchemaBuilderAdapter<TAdapter extends SchemaBuilderAdapter>(adapter: TAdapter): TAdapter;
|
|
198
|
+
//#endregion
|
|
199
|
+
export { SchemaBuilderTablesCapabilities as A, SchemaBuilderSchema as C, SchemaBuilderTabRenderContext as D, SchemaBuilderTab as E, defineSchemaBuilderAdapter as M, SchemaBuilderTable as O, SchemaBuilderRelationshipsCapabilities as S, SchemaBuilderSidebarSections as T, SchemaBuilderPoliciesCapabilities as _, SchemaBuilderCoreCapabilities as a, SchemaBuilderProps as b, SchemaBuilderField as c, SchemaBuilderIndex as d, SchemaBuilderIndexesCapabilities as f, SchemaBuilderOperationContext as g, SchemaBuilderOperation as h, SchemaBuilderColorMode as i, SchemaBuilderVariables as j, SchemaBuilderTableSelection as k, SchemaBuilderFieldsCapabilities as l, SchemaBuilderNavigationTarget as m, SchemaBuilderAdapter as n, SchemaBuilderCoreTabId as o, SchemaBuilderInvalidationEvent as p, SchemaBuilderCollection as r, SchemaBuilderFeature as s, DEFAULT_SCHEMA_BUILDER_PREFERENCES as t, SchemaBuilderHostOptions as u, SchemaBuilderPolicy as v, SchemaBuilderScope as w, SchemaBuilderRelationship as x, SchemaBuilderPreferences as y };
|
|
200
|
+
//# sourceMappingURL=types-GUrH1Qny.d.cts.map
|