@dialecte/core 0.0.16 → 0.0.17
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/env.d.ts +1 -0
- package/dist/index.d.ts +1 -8
- package/dist/index.js +309 -308
- package/dist/{chain-methods → src/chain-methods}/chain-assembler.d.ts +3 -4
- package/dist/{chain-methods → src/chain-methods}/chain-creator.d.ts +3 -4
- package/dist/{chain-methods → src/chain-methods}/ending/index.d.ts +0 -1
- package/dist/{chain-methods → src/chain-methods}/ending/queries/context.d.ts +2 -3
- package/dist/{chain-methods → src/chain-methods}/ending/queries/descendants/filter-utils.helper.d.ts +2 -3
- package/dist/src/chain-methods/ending/queries/descendants/find-descendants-as-tree.d.ts +51 -0
- package/dist/src/chain-methods/ending/queries/descendants/find-descendants.d.ts +59 -0
- package/dist/{chain-methods → src/chain-methods}/ending/queries/descendants/flatten-tree.helper.d.ts +1 -2
- package/dist/{chain-methods → src/chain-methods}/ending/queries/descendants/group-records.helper.d.ts +1 -2
- package/dist/{chain-methods → src/chain-methods}/ending/queries/descendants/index.d.ts +0 -1
- package/dist/{chain-methods → src/chain-methods}/ending/queries/descendants/match-conditions.helper.d.ts +2 -3
- package/dist/src/chain-methods/ending/queries/descendants/types.d.ts +34 -0
- package/dist/{chain-methods → src/chain-methods}/ending/queries/descendants/walk-ancestry.helper.d.ts +1 -2
- package/dist/src/chain-methods/ending/queries/find-children.d.ts +8 -0
- package/dist/src/chain-methods/ending/queries/find-children.types.d.ts +5 -0
- package/dist/{chain-methods → src/chain-methods}/ending/queries/get-attributes-values.d.ts +1 -2
- package/dist/{chain-methods → src/chain-methods}/ending/queries/get-parent.d.ts +1 -2
- package/dist/{chain-methods → src/chain-methods}/ending/queries/get-tree.d.ts +3 -4
- package/dist/src/chain-methods/ending/queries/get-tree.types.d.ts +17 -0
- package/dist/{chain-methods → src/chain-methods}/ending/queries/index.d.ts +0 -1
- package/dist/{chain-methods → src/chain-methods}/ending/transaction/commit.d.ts +2 -3
- package/dist/src/chain-methods/ending/transaction/index.d.ts +1 -0
- package/dist/src/chain-methods/ending/transaction/merge-operations.d.ts +20 -0
- package/dist/{chain-methods → src/chain-methods}/index.d.ts +0 -1
- package/dist/{chain-methods → src/chain-methods}/mutations/clone.d.ts +2 -3
- package/dist/src/chain-methods/mutations/clone.types.d.ts +16 -0
- package/dist/{chain-methods → src/chain-methods}/mutations/create.d.ts +3 -4
- package/dist/src/chain-methods/mutations/create.types.d.ts +31 -0
- package/dist/{chain-methods → src/chain-methods}/mutations/delete.d.ts +4 -5
- package/dist/src/chain-methods/mutations/delete.types.d.ts +5 -0
- package/dist/{chain-methods → src/chain-methods}/mutations/index.d.ts +0 -1
- package/dist/{chain-methods → src/chain-methods}/mutations/update.d.ts +3 -4
- package/dist/src/chain-methods/mutations/update.types.d.ts +5 -0
- package/dist/{chain-methods → src/chain-methods}/navigation/go-to-element.d.ts +4 -5
- package/dist/{chain-methods → src/chain-methods}/navigation/go-to-parent.d.ts +5 -6
- package/dist/{chain-methods → src/chain-methods}/navigation/index.d.ts +0 -1
- package/dist/src/chain-methods/navigation/types.d.ts +11 -0
- package/dist/{chain-methods → src/chain-methods}/types.d.ts +9 -10
- package/dist/{database → src/database}/index.d.ts +0 -1
- package/dist/src/database/instance.d.ts +6 -0
- package/dist/src/database/types.d.ts +8 -0
- package/dist/{dialecte → src/dialecte}/entrypoints.d.ts +4 -5
- package/dist/{dialecte → src/dialecte}/index.d.ts +0 -1
- package/dist/{dialecte → src/dialecte}/main.d.ts +3 -4
- package/dist/{dialecte → src/dialecte}/state.d.ts +1 -2
- package/dist/{dialecte → src/dialecte}/types.d.ts +6 -7
- package/dist/{errors → src/errors}/codes.d.ts +0 -1
- package/dist/{errors → src/errors}/errors.d.ts +2 -3
- package/dist/{errors → src/errors}/index.d.ts +0 -1
- package/dist/src/errors/types.d.ts +22 -0
- package/dist/{helpers → src/helpers}/assert.d.ts +0 -1
- package/dist/{helpers → src/helpers}/index.d.ts +0 -1
- package/dist/{helpers → src/helpers}/record/converter.d.ts +1 -2
- package/dist/{helpers → src/helpers}/record/guard.d.ts +1 -2
- package/dist/{helpers → src/helpers}/record/index.d.ts +0 -1
- package/dist/{helpers → src/helpers}/record/operations.d.ts +1 -2
- package/dist/{helpers → src/helpers}/record/query/find-by-attributes.d.ts +3 -4
- package/dist/{helpers → src/helpers}/record/query/index.d.ts +0 -1
- package/dist/{helpers → src/helpers}/record/query/record.d.ts +2 -3
- package/dist/src/helpers/record/query/types.d.ts +9 -0
- package/dist/{helpers → src/helpers}/record/standardizing.d.ts +1 -2
- package/dist/{helpers → src/helpers}/test-fixtures/config.d.ts +35 -36
- package/dist/{helpers → src/helpers}/test-fixtures/constant.d.ts +0 -1
- package/dist/{helpers → src/helpers}/test-fixtures/create-test-dialecte.d.ts +3 -4
- package/dist/{helpers → src/helpers}/test-fixtures/generated/constants.generated.d.ts +41 -42
- package/dist/src/helpers/test-fixtures/generated/definition.d.ts +1 -0
- package/dist/{helpers → src/helpers}/test-fixtures/generated/index.d.ts +0 -1
- package/dist/{helpers → src/helpers}/test-fixtures/generated/types.generated.d.ts +37 -38
- package/dist/{helpers → src/helpers}/test-fixtures/index.d.ts +0 -1
- package/dist/{helpers → src/helpers}/test-fixtures/test-operations.d.ts +4 -5
- package/dist/src/helpers/test-fixtures/test-operations.types.d.ts +19 -0
- package/dist/{helpers → src/helpers}/test-fixtures/test-record.d.ts +2 -3
- package/dist/src/index.d.ts +7 -0
- package/dist/{io → src/io}/export/constant.d.ts +0 -1
- package/dist/{io → src/io}/export/download-file.d.ts +1 -2
- package/dist/{io → src/io}/export/formatter.d.ts +0 -1
- package/dist/{io → src/io}/export/index.d.ts +0 -1
- package/dist/{io → src/io}/export/main.d.ts +1 -2
- package/dist/{io → src/io}/import/database-helpers.d.ts +1 -2
- package/dist/{io → src/io}/import/guards.d.ts +0 -1
- package/dist/{io → src/io}/import/index.d.ts +0 -1
- package/dist/{io → src/io}/import/main.d.ts +1 -2
- package/dist/{io → src/io}/import/parser.d.ts +2 -3
- package/dist/{io → src/io}/import/relationships.d.ts +1 -2
- package/dist/{io → src/io}/import/types.d.ts +4 -5
- package/dist/{io → src/io}/index.d.ts +0 -1
- package/dist/src/types/context.d.ts +15 -0
- package/dist/{types → src/types}/definition.d.ts +6 -7
- package/dist/{types → src/types}/dialecte-config.d.ts +31 -32
- package/dist/{types → src/types}/index.d.ts +0 -1
- package/dist/{types → src/types}/io.d.ts +3 -4
- package/dist/{types → src/types}/operations.d.ts +5 -6
- package/dist/src/types/records.d.ts +56 -0
- package/dist/{utils → src/utils}/attributes.d.ts +1 -2
- package/dist/src/utils/index.d.ts +1 -0
- package/dist/vitest.shims.d.ts +1 -0
- package/package.json +8 -2
- package/dist/chain-methods/chain-assembler.d.ts.map +0 -1
- package/dist/chain-methods/chain-creator.d.ts.map +0 -1
- package/dist/chain-methods/ending/index.d.ts.map +0 -1
- package/dist/chain-methods/ending/queries/context.d.ts.map +0 -1
- package/dist/chain-methods/ending/queries/descendants/filter-utils.helper.d.ts.map +0 -1
- package/dist/chain-methods/ending/queries/descendants/find-descendants-as-tree.d.ts +0 -9
- package/dist/chain-methods/ending/queries/descendants/find-descendants-as-tree.d.ts.map +0 -1
- package/dist/chain-methods/ending/queries/descendants/find-descendants.d.ts +0 -16
- package/dist/chain-methods/ending/queries/descendants/find-descendants.d.ts.map +0 -1
- package/dist/chain-methods/ending/queries/descendants/flatten-tree.helper.d.ts.map +0 -1
- package/dist/chain-methods/ending/queries/descendants/group-records.helper.d.ts.map +0 -1
- package/dist/chain-methods/ending/queries/descendants/index.d.ts.map +0 -1
- package/dist/chain-methods/ending/queries/descendants/match-conditions.helper.d.ts.map +0 -1
- package/dist/chain-methods/ending/queries/descendants/types.d.ts +0 -35
- package/dist/chain-methods/ending/queries/descendants/types.d.ts.map +0 -1
- package/dist/chain-methods/ending/queries/descendants/walk-ancestry.helper.d.ts.map +0 -1
- package/dist/chain-methods/ending/queries/find-children.d.ts +0 -9
- package/dist/chain-methods/ending/queries/find-children.d.ts.map +0 -1
- package/dist/chain-methods/ending/queries/find-children.types.d.ts +0 -6
- package/dist/chain-methods/ending/queries/find-children.types.d.ts.map +0 -1
- package/dist/chain-methods/ending/queries/get-attributes-values.d.ts.map +0 -1
- package/dist/chain-methods/ending/queries/get-parent.d.ts.map +0 -1
- package/dist/chain-methods/ending/queries/get-tree.d.ts.map +0 -1
- package/dist/chain-methods/ending/queries/get-tree.types.d.ts +0 -18
- package/dist/chain-methods/ending/queries/get-tree.types.d.ts.map +0 -1
- package/dist/chain-methods/ending/queries/index.d.ts.map +0 -1
- package/dist/chain-methods/ending/transaction/commit.d.ts.map +0 -1
- package/dist/chain-methods/ending/transaction/index.d.ts +0 -2
- package/dist/chain-methods/ending/transaction/index.d.ts.map +0 -1
- package/dist/chain-methods/ending/transaction/merge-operations.d.ts +0 -33
- package/dist/chain-methods/ending/transaction/merge-operations.d.ts.map +0 -1
- package/dist/chain-methods/index.d.ts.map +0 -1
- package/dist/chain-methods/mutations/clone.d.ts.map +0 -1
- package/dist/chain-methods/mutations/clone.types.d.ts +0 -17
- package/dist/chain-methods/mutations/clone.types.d.ts.map +0 -1
- package/dist/chain-methods/mutations/create.d.ts.map +0 -1
- package/dist/chain-methods/mutations/create.types.d.ts +0 -32
- package/dist/chain-methods/mutations/create.types.d.ts.map +0 -1
- package/dist/chain-methods/mutations/delete.d.ts.map +0 -1
- package/dist/chain-methods/mutations/delete.types.d.ts +0 -6
- package/dist/chain-methods/mutations/delete.types.d.ts.map +0 -1
- package/dist/chain-methods/mutations/index.d.ts.map +0 -1
- package/dist/chain-methods/mutations/update.d.ts.map +0 -1
- package/dist/chain-methods/mutations/update.types.d.ts +0 -6
- package/dist/chain-methods/mutations/update.types.d.ts.map +0 -1
- package/dist/chain-methods/navigation/go-to-element.d.ts.map +0 -1
- package/dist/chain-methods/navigation/go-to-parent.d.ts.map +0 -1
- package/dist/chain-methods/navigation/index.d.ts.map +0 -1
- package/dist/chain-methods/navigation/types.d.ts +0 -12
- package/dist/chain-methods/navigation/types.d.ts.map +0 -1
- package/dist/chain-methods/types.d.ts.map +0 -1
- package/dist/database/index.d.ts.map +0 -1
- package/dist/database/instance.d.ts +0 -8
- package/dist/database/instance.d.ts.map +0 -1
- package/dist/database/types.d.ts +0 -8
- package/dist/database/types.d.ts.map +0 -1
- package/dist/dialecte/entrypoints.d.ts.map +0 -1
- package/dist/dialecte/index.d.ts.map +0 -1
- package/dist/dialecte/main.d.ts.map +0 -1
- package/dist/dialecte/state.d.ts.map +0 -1
- package/dist/dialecte/types.d.ts.map +0 -1
- package/dist/errors/codes.d.ts.map +0 -1
- package/dist/errors/errors.d.ts.map +0 -1
- package/dist/errors/index.d.ts.map +0 -1
- package/dist/errors/types.d.ts +0 -23
- package/dist/errors/types.d.ts.map +0 -1
- package/dist/helpers/assert.d.ts.map +0 -1
- package/dist/helpers/index.d.ts.map +0 -1
- package/dist/helpers/record/converter.d.ts.map +0 -1
- package/dist/helpers/record/guard.d.ts.map +0 -1
- package/dist/helpers/record/index.d.ts.map +0 -1
- package/dist/helpers/record/operations.d.ts.map +0 -1
- package/dist/helpers/record/query/find-by-attributes.d.ts.map +0 -1
- package/dist/helpers/record/query/index.d.ts.map +0 -1
- package/dist/helpers/record/query/record.d.ts.map +0 -1
- package/dist/helpers/record/query/types.d.ts +0 -10
- package/dist/helpers/record/query/types.d.ts.map +0 -1
- package/dist/helpers/record/standardizing.d.ts.map +0 -1
- package/dist/helpers/test-fixtures/config.d.ts.map +0 -1
- package/dist/helpers/test-fixtures/constant.d.ts.map +0 -1
- package/dist/helpers/test-fixtures/create-test-dialecte.d.ts.map +0 -1
- package/dist/helpers/test-fixtures/generated/constants.generated.d.ts.map +0 -1
- package/dist/helpers/test-fixtures/generated/definition.d.ts +0 -3
- package/dist/helpers/test-fixtures/generated/definition.d.ts.map +0 -1
- package/dist/helpers/test-fixtures/generated/index.d.ts.map +0 -1
- package/dist/helpers/test-fixtures/generated/types.generated.d.ts.map +0 -1
- package/dist/helpers/test-fixtures/index.d.ts.map +0 -1
- package/dist/helpers/test-fixtures/test-operations.d.ts.map +0 -1
- package/dist/helpers/test-fixtures/test-operations.types.d.ts +0 -20
- package/dist/helpers/test-fixtures/test-operations.types.d.ts.map +0 -1
- package/dist/helpers/test-fixtures/test-record.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/io/export/constant.d.ts.map +0 -1
- package/dist/io/export/download-file.d.ts.map +0 -1
- package/dist/io/export/formatter.d.ts.map +0 -1
- package/dist/io/export/index.d.ts.map +0 -1
- package/dist/io/export/main.d.ts.map +0 -1
- package/dist/io/import/database-helpers.d.ts.map +0 -1
- package/dist/io/import/guards.d.ts.map +0 -1
- package/dist/io/import/index.d.ts.map +0 -1
- package/dist/io/import/main.d.ts.map +0 -1
- package/dist/io/import/parser.d.ts.map +0 -1
- package/dist/io/import/relationships.d.ts.map +0 -1
- package/dist/io/import/test.handler.d.ts +0 -9
- package/dist/io/import/test.handler.d.ts.map +0 -1
- package/dist/io/import/test.types.d.ts +0 -4
- package/dist/io/import/test.types.d.ts.map +0 -1
- package/dist/io/import/types.d.ts.map +0 -1
- package/dist/io/index.d.ts.map +0 -1
- package/dist/script/element-parent-mapping.d.ts +0 -2
- package/dist/script/element-parent-mapping.d.ts.map +0 -1
- package/dist/script/find-unreferenced-elements.d.ts +0 -3
- package/dist/script/find-unreferenced-elements.d.ts.map +0 -1
- package/dist/script/generate-definition.d.ts +0 -3
- package/dist/script/generate-definition.d.ts.map +0 -1
- package/dist/script/generate-definition.types.d.ts +0 -86
- package/dist/script/generate-definition.types.d.ts.map +0 -1
- package/dist/script/generate-test-fixtures.d.ts +0 -16
- package/dist/script/generate-test-fixtures.d.ts.map +0 -1
- package/dist/script/pyodide.d.ts +0 -12
- package/dist/script/pyodide.d.ts.map +0 -1
- package/dist/script/sorted-dexie-dump-json.d.ts +0 -2
- package/dist/script/sorted-dexie-dump-json.d.ts.map +0 -1
- package/dist/script/test-pyodide.d.ts +0 -9
- package/dist/script/test-pyodide.d.ts.map +0 -1
- package/dist/types/context.d.ts +0 -16
- package/dist/types/context.d.ts.map +0 -1
- package/dist/types/definition.d.ts.map +0 -1
- package/dist/types/dialecte-config.d.ts.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/io.d.ts.map +0 -1
- package/dist/types/operations.d.ts.map +0 -1
- package/dist/types/records.d.ts +0 -57
- package/dist/types/records.d.ts.map +0 -1
- package/dist/utils/attributes.d.ts.map +0 -1
- package/dist/utils/index.d.ts +0 -2
- package/dist/utils/index.d.ts.map +0 -1
|
@@ -1,160 +1,160 @@
|
|
|
1
|
-
import { ELEMENT_NAMES, REQUIRED_ATTRIBUTES } from './constants.generated';
|
|
2
|
-
export type AvailableElement = (typeof ELEMENT_NAMES)[number];
|
|
3
|
-
export type AttributesA = {
|
|
1
|
+
import type { ELEMENT_NAMES, REQUIRED_ATTRIBUTES } from './constants.generated';
|
|
2
|
+
export declare type AvailableElement = (typeof ELEMENT_NAMES)[number];
|
|
3
|
+
export declare type AttributesA = {
|
|
4
4
|
aA: string;
|
|
5
5
|
bA?: string;
|
|
6
6
|
cA?: string;
|
|
7
7
|
};
|
|
8
|
-
export type AttributesAAAA_1 = {
|
|
8
|
+
export declare type AttributesAAAA_1 = {
|
|
9
9
|
aAAAA_1: string;
|
|
10
10
|
bAAAA_1?: string;
|
|
11
11
|
cAAAA_1?: string;
|
|
12
12
|
};
|
|
13
|
-
export type AttributesAAAA_2 = {
|
|
13
|
+
export declare type AttributesAAAA_2 = {
|
|
14
14
|
aAAAA_2: string;
|
|
15
15
|
bAAAA_2?: string;
|
|
16
16
|
cAAAA_2?: string;
|
|
17
17
|
};
|
|
18
|
-
export type AttributesAAAA_3 = {
|
|
18
|
+
export declare type AttributesAAAA_3 = {
|
|
19
19
|
aAAAA_3: string;
|
|
20
20
|
bAAAA_3?: string;
|
|
21
21
|
cAAAA_3?: string;
|
|
22
22
|
};
|
|
23
|
-
export type AttributesAAA_1 = {
|
|
23
|
+
export declare type AttributesAAA_1 = {
|
|
24
24
|
aAAA_1: string;
|
|
25
25
|
bAAA_1?: string;
|
|
26
26
|
cAAA_1?: string;
|
|
27
27
|
};
|
|
28
|
-
export type AttributesAAA_2 = {
|
|
28
|
+
export declare type AttributesAAA_2 = {
|
|
29
29
|
aAAA_2: string;
|
|
30
30
|
bAAA_2?: string;
|
|
31
31
|
cAAA_2?: string;
|
|
32
32
|
};
|
|
33
|
-
export type AttributesAAA_3 = {
|
|
33
|
+
export declare type AttributesAAA_3 = {
|
|
34
34
|
aAAA_3: string;
|
|
35
35
|
bAAA_3?: string;
|
|
36
36
|
cAAA_3?: string;
|
|
37
37
|
};
|
|
38
|
-
export type AttributesAA_1 = {
|
|
38
|
+
export declare type AttributesAA_1 = {
|
|
39
39
|
aAA_1: string;
|
|
40
40
|
bAA_1?: string;
|
|
41
41
|
cAA_1?: string;
|
|
42
42
|
};
|
|
43
|
-
export type AttributesAA_2 = {
|
|
43
|
+
export declare type AttributesAA_2 = {
|
|
44
44
|
aAA_2: string;
|
|
45
45
|
bAA_2?: string;
|
|
46
46
|
cAA_2?: string;
|
|
47
47
|
};
|
|
48
|
-
export type AttributesAA_3 = {
|
|
48
|
+
export declare type AttributesAA_3 = {
|
|
49
49
|
aAA_3: string;
|
|
50
50
|
bAA_3?: string;
|
|
51
51
|
cAA_3?: string;
|
|
52
52
|
};
|
|
53
|
-
export type AttributesB = {
|
|
53
|
+
export declare type AttributesB = {
|
|
54
54
|
aB: string;
|
|
55
55
|
bB?: string;
|
|
56
56
|
cB?: string;
|
|
57
57
|
};
|
|
58
|
-
export type AttributesBBBB_1 = {
|
|
58
|
+
export declare type AttributesBBBB_1 = {
|
|
59
59
|
aBBBB_1: string;
|
|
60
60
|
bBBBB_1?: string;
|
|
61
61
|
cBBBB_1?: string;
|
|
62
62
|
};
|
|
63
|
-
export type AttributesBBBB_2 = {
|
|
63
|
+
export declare type AttributesBBBB_2 = {
|
|
64
64
|
aBBBB_2: string;
|
|
65
65
|
bBBBB_2?: string;
|
|
66
66
|
cBBBB_2?: string;
|
|
67
67
|
};
|
|
68
|
-
export type AttributesBBBB_3 = {
|
|
68
|
+
export declare type AttributesBBBB_3 = {
|
|
69
69
|
aBBBB_3: string;
|
|
70
70
|
bBBBB_3?: string;
|
|
71
71
|
cBBBB_3?: string;
|
|
72
72
|
};
|
|
73
|
-
export type AttributesBBB_1 = {
|
|
73
|
+
export declare type AttributesBBB_1 = {
|
|
74
74
|
aBBB_1: string;
|
|
75
75
|
bBBB_1?: string;
|
|
76
76
|
cBBB_1?: string;
|
|
77
77
|
};
|
|
78
|
-
export type AttributesBBB_2 = {
|
|
78
|
+
export declare type AttributesBBB_2 = {
|
|
79
79
|
aBBB_2: string;
|
|
80
80
|
bBBB_2?: string;
|
|
81
81
|
cBBB_2?: string;
|
|
82
82
|
};
|
|
83
|
-
export type AttributesBBB_3 = {
|
|
83
|
+
export declare type AttributesBBB_3 = {
|
|
84
84
|
aBBB_3: string;
|
|
85
85
|
bBBB_3?: string;
|
|
86
86
|
cBBB_3?: string;
|
|
87
87
|
};
|
|
88
|
-
export type AttributesBB_1 = {
|
|
88
|
+
export declare type AttributesBB_1 = {
|
|
89
89
|
aBB_1: string;
|
|
90
90
|
bBB_1?: string;
|
|
91
91
|
cBB_1?: string;
|
|
92
92
|
};
|
|
93
|
-
export type AttributesBB_2 = {
|
|
93
|
+
export declare type AttributesBB_2 = {
|
|
94
94
|
aBB_2: string;
|
|
95
95
|
bBB_2?: string;
|
|
96
96
|
cBB_2?: string;
|
|
97
97
|
};
|
|
98
|
-
export type AttributesBB_3 = {
|
|
98
|
+
export declare type AttributesBB_3 = {
|
|
99
99
|
aBB_3: string;
|
|
100
100
|
bBB_3?: string;
|
|
101
101
|
cBB_3?: string;
|
|
102
102
|
};
|
|
103
|
-
export type AttributesC = {
|
|
103
|
+
export declare type AttributesC = {
|
|
104
104
|
aC: string;
|
|
105
105
|
bC?: string;
|
|
106
106
|
cC?: string;
|
|
107
107
|
};
|
|
108
|
-
export type AttributesCCCC_1 = {
|
|
108
|
+
export declare type AttributesCCCC_1 = {
|
|
109
109
|
aCCCC_1: string;
|
|
110
110
|
bCCCC_1?: string;
|
|
111
111
|
cCCCC_1?: string;
|
|
112
112
|
};
|
|
113
|
-
export type AttributesCCCC_2 = {
|
|
113
|
+
export declare type AttributesCCCC_2 = {
|
|
114
114
|
aCCCC_2: string;
|
|
115
115
|
bCCCC_2?: string;
|
|
116
116
|
cCCCC_2?: string;
|
|
117
117
|
};
|
|
118
|
-
export type AttributesCCCC_3 = {
|
|
118
|
+
export declare type AttributesCCCC_3 = {
|
|
119
119
|
aCCCC_3: string;
|
|
120
120
|
bCCCC_3?: string;
|
|
121
121
|
cCCCC_3?: string;
|
|
122
122
|
};
|
|
123
|
-
export type AttributesCCC_1 = {
|
|
123
|
+
export declare type AttributesCCC_1 = {
|
|
124
124
|
aCCC_1: string;
|
|
125
125
|
bCCC_1?: string;
|
|
126
126
|
cCCC_1?: string;
|
|
127
127
|
};
|
|
128
|
-
export type AttributesCCC_2 = {
|
|
128
|
+
export declare type AttributesCCC_2 = {
|
|
129
129
|
aCCC_2: string;
|
|
130
130
|
bCCC_2?: string;
|
|
131
131
|
cCCC_2?: string;
|
|
132
132
|
};
|
|
133
|
-
export type AttributesCCC_3 = {
|
|
133
|
+
export declare type AttributesCCC_3 = {
|
|
134
134
|
aCCC_3: string;
|
|
135
135
|
bCCC_3?: string;
|
|
136
136
|
cCCC_3?: string;
|
|
137
137
|
};
|
|
138
|
-
export type AttributesCC_1 = {
|
|
138
|
+
export declare type AttributesCC_1 = {
|
|
139
139
|
aCC_1: string;
|
|
140
140
|
bCC_1?: string;
|
|
141
141
|
cCC_1?: string;
|
|
142
142
|
};
|
|
143
|
-
export type AttributesCC_2 = {
|
|
143
|
+
export declare type AttributesCC_2 = {
|
|
144
144
|
aCC_2: string;
|
|
145
145
|
bCC_2?: string;
|
|
146
146
|
cCC_2?: string;
|
|
147
147
|
};
|
|
148
|
-
export type AttributesCC_3 = {
|
|
148
|
+
export declare type AttributesCC_3 = {
|
|
149
149
|
aCC_3: string;
|
|
150
150
|
bCC_3?: string;
|
|
151
151
|
cCC_3?: string;
|
|
152
152
|
};
|
|
153
|
-
export type AttributesRoot = {
|
|
153
|
+
export declare type AttributesRoot = {
|
|
154
154
|
root: string;
|
|
155
155
|
'ext:root'?: string;
|
|
156
156
|
};
|
|
157
|
-
type AttributesMap = {
|
|
157
|
+
declare type AttributesMap = {
|
|
158
158
|
A: AttributesA;
|
|
159
159
|
AAAA_1: AttributesAAAA_1;
|
|
160
160
|
AAAA_2: AttributesAAAA_2;
|
|
@@ -187,8 +187,7 @@ type AttributesMap = {
|
|
|
187
187
|
CC_3: AttributesCC_3;
|
|
188
188
|
Root: AttributesRoot;
|
|
189
189
|
};
|
|
190
|
-
export type AttributesOf<T extends AvailableElement> = AttributesMap[T];
|
|
191
|
-
export type RequiredAttributeNames<T extends AvailableElement> = (typeof REQUIRED_ATTRIBUTES)[T][number];
|
|
192
|
-
export type OptionalAttributeNames<T extends AvailableElement> = Exclude<keyof AttributesOf<T>, RequiredAttributeNames<T>>;
|
|
190
|
+
export declare type AttributesOf<T extends AvailableElement> = AttributesMap[T];
|
|
191
|
+
export declare type RequiredAttributeNames<T extends AvailableElement> = (typeof REQUIRED_ATTRIBUTES)[T][number];
|
|
192
|
+
export declare type OptionalAttributeNames<T extends AvailableElement> = Exclude<keyof AttributesOf<T>, RequiredAttributeNames<T>>;
|
|
193
193
|
export {};
|
|
194
|
-
//# sourceMappingURL=types.generated.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ChainTestOperation } from './test-operations.types';
|
|
2
|
-
import { Chain } from '../../chain-methods';
|
|
3
|
-
import { AnyDialecteConfig, ElementsOf, ChildrenOf, ExtensionRegistry } from '../../types';
|
|
1
|
+
import type { ChainTestOperation } from './test-operations.types';
|
|
2
|
+
import type { Chain } from '../../chain-methods';
|
|
3
|
+
import type { AnyDialecteConfig, ElementsOf, ChildrenOf, ExtensionRegistry } from '../../types';
|
|
4
4
|
/**
|
|
5
5
|
* Execute a series of operations on a chain
|
|
6
6
|
* Returns committed context
|
|
@@ -11,5 +11,4 @@ import { AnyDialecteConfig, ElementsOf, ChildrenOf, ExtensionRegistry } from '..
|
|
|
11
11
|
export declare function executeTableDrivenTestsChainOperations<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig> = ElementsOf<GenericConfig>, GenericExtensionRegistry extends ExtensionRegistry<GenericConfig> = {}>(params: {
|
|
12
12
|
chain: Chain<GenericConfig, GenericElement, GenericExtensionRegistry>;
|
|
13
13
|
operations: Array<ChainTestOperation<GenericConfig, ElementsOf<GenericConfig>, ChildrenOf<GenericConfig, ElementsOf<GenericConfig>>>>;
|
|
14
|
-
}): Promise<
|
|
15
|
-
//# sourceMappingURL=test-operations.d.ts.map
|
|
14
|
+
}): Promise<any>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { GoToElementParams } from '../../chain-methods/navigation';
|
|
2
|
+
import type { AddChildParams, UpdateElementParams } from '../../chain-methods/mutations';
|
|
3
|
+
import type { AnyDialecteConfig, ChildrenOf, ElementsOf } from '../../types';
|
|
4
|
+
export declare type ChainTestOperation<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>, GenericChildElement extends ChildrenOf<GenericConfig, GenericElement>> = ({
|
|
5
|
+
type: 'update';
|
|
6
|
+
goTo?: GoToElementParams<GenericConfig, GenericElement>;
|
|
7
|
+
} & UpdateElementParams<GenericConfig, GenericElement>) | {
|
|
8
|
+
type: 'delete';
|
|
9
|
+
goTo?: GoToElementParams<GenericConfig, GenericElement>;
|
|
10
|
+
} | ({
|
|
11
|
+
type: 'addChild';
|
|
12
|
+
goTo?: GoToElementParams<GenericConfig, GenericElement>;
|
|
13
|
+
} & AddChildParams<GenericConfig, GenericElement, GenericChildElement>);
|
|
14
|
+
export declare type AnyChainTestOperation = ChainTestOperation<AnyDialecteConfig, ElementsOf<AnyDialecteConfig>, ChildrenOf<AnyDialecteConfig, ElementsOf<AnyDialecteConfig>>>;
|
|
15
|
+
/**
|
|
16
|
+
* For table-driven tests where operations can target any element in the config.
|
|
17
|
+
* This creates a distributive union that maintains proper type narrowing for each operation.
|
|
18
|
+
*/
|
|
19
|
+
export declare type AnyElementChainTestOperation<GenericConfig extends AnyDialecteConfig> = ElementsOf<GenericConfig> extends infer Element ? Element extends ElementsOf<GenericConfig> ? ChainTestOperation<GenericConfig, Element, ChildrenOf<GenericConfig, Element>> : never : never;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TEST_DIALECTE_CONFIG } from './config';
|
|
2
|
-
import { ElementsOf, FullAttributeObjectOf, RawRecord, ChainRecord, AttributesValueObjectOf, TreeRecord } from '../../types';
|
|
3
|
-
type TestDialecteConfig = typeof TEST_DIALECTE_CONFIG;
|
|
2
|
+
import type { ElementsOf, FullAttributeObjectOf, RawRecord, ChainRecord, AttributesValueObjectOf, TreeRecord } from '../../types';
|
|
3
|
+
declare type TestDialecteConfig = typeof TEST_DIALECTE_CONFIG;
|
|
4
4
|
/**
|
|
5
5
|
* Create a test record for TEST_DIALECTE_CONFIG
|
|
6
6
|
* Helper function for test data generation
|
|
@@ -33,4 +33,3 @@ export declare function createTestRecord<GenericElement extends ElementsOf<TestD
|
|
|
33
33
|
} & Partial<RawRecord<TestDialecteConfig, GenericElement>>;
|
|
34
34
|
}): TreeRecord<TestDialecteConfig, GenericElement>;
|
|
35
35
|
export {};
|
|
36
|
-
//# sourceMappingURL=test-record.d.ts.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { AnyDialecteConfig } from '../../types';
|
|
1
|
+
import type { AnyDialecteConfig } from '../../types';
|
|
2
2
|
export declare function downloadFile<GenericConfig extends AnyDialecteConfig>(params: {
|
|
3
3
|
extension: GenericConfig['io']['supportedFileExtensions'][number];
|
|
4
4
|
xmlDocument: XMLDocument;
|
|
5
5
|
filename: string;
|
|
6
6
|
}): Promise<void>;
|
|
7
|
-
//# sourceMappingURL=download-file.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnyDialecteConfig } from '../../types';
|
|
1
|
+
import type { AnyDialecteConfig } from '../../types';
|
|
2
2
|
/**
|
|
3
3
|
* Generic XML export function that works with any dialecte
|
|
4
4
|
* @param databaseName - Name of the database to export
|
|
@@ -21,4 +21,3 @@ export declare function exportXmlDocumentForOpenSCD(params: {
|
|
|
21
21
|
xmlDocument: XMLDocument;
|
|
22
22
|
filename: string;
|
|
23
23
|
}>;
|
|
24
|
-
//# sourceMappingURL=main.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Dexie from 'dexie';
|
|
2
2
|
import { AnyRawRecord } from '../../types';
|
|
3
3
|
/**
|
|
4
4
|
* Add a batch of records to the elements table
|
|
@@ -18,4 +18,3 @@ export declare function bulkAddRecords(params: {
|
|
|
18
18
|
* @returns Promise that resolves when deletion is complete
|
|
19
19
|
*/
|
|
20
20
|
export declare function deleteDatabaseIfExists(databaseName: string): Promise<void>;
|
|
21
|
-
//# sourceMappingURL=database-helpers.d.ts.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type * as sax from 'sax';
|
|
2
2
|
export declare function isSaxQualifiedTag(node: sax.Tag | sax.QualifiedTag): node is sax.QualifiedTag;
|
|
3
3
|
export declare function isSaxQualifiedAttribute(attribute: string | sax.QualifiedAttribute | undefined): attribute is sax.QualifiedAttribute;
|
|
4
|
-
//# sourceMappingURL=guards.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnyDialecteConfig } from '../../types';
|
|
1
|
+
import type { AnyDialecteConfig } from '../../types';
|
|
2
2
|
export declare function importXmlFiles(params: {
|
|
3
3
|
files: File[];
|
|
4
4
|
dialecteConfig: AnyDialecteConfig;
|
|
@@ -12,4 +12,3 @@ export declare function isFileSupported(params: {
|
|
|
12
12
|
supportedExtensions: readonly string[];
|
|
13
13
|
}): boolean;
|
|
14
14
|
export declare function getDatabaseName(file: File): string;
|
|
15
|
-
//# sourceMappingURL=main.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ParserInstance } from './types';
|
|
2
|
-
import { AnyDialecteConfig } from '../../types';
|
|
1
|
+
import type { ParserInstance } from './types';
|
|
2
|
+
import type { AnyDialecteConfig } from '../../types';
|
|
3
3
|
/**
|
|
4
4
|
* Sets up the SAX parser for XML parsing.
|
|
5
5
|
* @param namespaces Namespace configuration from dialecte
|
|
@@ -10,4 +10,3 @@ export declare function setSaxParser(params: {
|
|
|
10
10
|
dialecteConfig: AnyDialecteConfig;
|
|
11
11
|
useCustomRecordsIds: boolean;
|
|
12
12
|
}): ParserInstance;
|
|
13
|
-
//# sourceMappingURL=parser.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnyRelationship, AnyRawRecord } from '../../types';
|
|
1
|
+
import type { AnyRelationship, AnyRawRecord } from '../../types';
|
|
2
2
|
export declare function registerPendingChildrenRelationship(params: {
|
|
3
3
|
parentId: string;
|
|
4
4
|
child: AnyRelationship;
|
|
@@ -6,4 +6,3 @@ export declare function registerPendingChildrenRelationship(params: {
|
|
|
6
6
|
export declare function resolveCurrentBatchChildrenRelationships(params: {
|
|
7
7
|
currentBatch: AnyRawRecord[];
|
|
8
8
|
}): AnyRawRecord[];
|
|
9
|
-
//# sourceMappingURL=relationships.d.ts.map
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { AnyRawRecord, Namespace } from '../../types';
|
|
2
|
-
import { SAXParser } from 'sax';
|
|
3
|
-
export type ParserInstance = {
|
|
1
|
+
import type { AnyRawRecord, Namespace } from '../../types';
|
|
2
|
+
import type { SAXParser } from 'sax';
|
|
3
|
+
export declare type ParserInstance = {
|
|
4
4
|
parser: SAXParser;
|
|
5
5
|
drainBatch: () => AnyRawRecord[];
|
|
6
6
|
getSize: () => number;
|
|
7
7
|
};
|
|
8
|
-
export type ParserState = {
|
|
8
|
+
export declare type ParserState = {
|
|
9
9
|
defaultNamespace: Namespace | null;
|
|
10
10
|
stack: AnyRawRecord[];
|
|
11
11
|
recordsBatch: AnyRawRecord[];
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { AnyDialecteConfig, ElementsOf } from './dialecte-config';
|
|
2
|
+
import type { Operation } from './operations';
|
|
3
|
+
import type { ChainRecord } from './records';
|
|
4
|
+
/**
|
|
5
|
+
* Context carries the state through the promise chain
|
|
6
|
+
* Each operation returns a new builder with updated context
|
|
7
|
+
*/
|
|
8
|
+
export declare type Context<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>> = {
|
|
9
|
+
currentFocus: ChainRecord<GenericConfig, GenericElement>;
|
|
10
|
+
stagedOperations: Operation<GenericConfig>[];
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Generic context for situations where element type is not yet known
|
|
14
|
+
*/
|
|
15
|
+
export declare type AnyContext = Context<AnyDialecteConfig, ElementsOf<AnyDialecteConfig>>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Namespace } from './records';
|
|
1
|
+
import type { Namespace } from './records';
|
|
2
2
|
/**
|
|
3
3
|
* Validation rules that can be applied to attributes, elements, or values
|
|
4
4
|
*/
|
|
5
|
-
export type ValidationRules = {
|
|
5
|
+
export declare type ValidationRules = {
|
|
6
6
|
readonly enumeration: readonly string[] | null;
|
|
7
7
|
readonly pattern: readonly string[] | null;
|
|
8
8
|
readonly minInclusive: number | string | null;
|
|
@@ -19,7 +19,7 @@ export type ValidationRules = {
|
|
|
19
19
|
/**
|
|
20
20
|
* Attribute definition with validation rules
|
|
21
21
|
*/
|
|
22
|
-
export type AttributeDefinition = {
|
|
22
|
+
export declare type AttributeDefinition = {
|
|
23
23
|
readonly required: boolean;
|
|
24
24
|
readonly default: string | null;
|
|
25
25
|
readonly namespace: Namespace | null;
|
|
@@ -28,7 +28,7 @@ export type AttributeDefinition = {
|
|
|
28
28
|
/**
|
|
29
29
|
* Sub-element definition with constraints
|
|
30
30
|
*/
|
|
31
|
-
export type SubElementDefinition = {
|
|
31
|
+
export declare type SubElementDefinition = {
|
|
32
32
|
readonly required: boolean;
|
|
33
33
|
readonly validation: ValidationRules;
|
|
34
34
|
readonly constraints: readonly any[] | null;
|
|
@@ -37,7 +37,7 @@ export type SubElementDefinition = {
|
|
|
37
37
|
* Generic element definition parameterized by element type
|
|
38
38
|
* Provides typed access to attributes, sub-elements, and parents
|
|
39
39
|
*/
|
|
40
|
-
export type ElementDefinition = {
|
|
40
|
+
export declare type ElementDefinition = {
|
|
41
41
|
readonly tag: string;
|
|
42
42
|
readonly namespace: Namespace;
|
|
43
43
|
readonly documentation: string | null;
|
|
@@ -66,5 +66,4 @@ export type ElementDefinition = {
|
|
|
66
66
|
*
|
|
67
67
|
* Each dialecte should define its own specific type extending this
|
|
68
68
|
*/
|
|
69
|
-
export type AnyDefinition = Record<string, ElementDefinition>;
|
|
70
|
-
//# sourceMappingURL=definition.d.ts.map
|
|
69
|
+
export declare type AnyDefinition = Record<string, ElementDefinition>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Context } from './context';
|
|
2
|
-
import { AnyDefinition } from './definition';
|
|
3
|
-
import { ImportOptions, ExportOptions } from './io';
|
|
4
|
-
import { Operation } from './operations';
|
|
5
|
-
import { Namespace, RawRecord, TreeRecord } from './records';
|
|
6
|
-
import { ChainFactory } from '../chain-methods';
|
|
7
|
-
export type RawDialecteConfig<GenericElementNames extends readonly string[], GenericRootElement extends GenericElementNames[number], GenericAttributes extends Record<string, any>, GenericChildren extends Record<string, readonly string[]>, GenericParents extends Record<string, readonly string[]>, GenericDescendants extends Record<string, readonly string[]>, GenericAncestors extends Record<string, readonly string[]>> = {
|
|
1
|
+
import type { Context } from './context';
|
|
2
|
+
import type { AnyDefinition } from './definition';
|
|
3
|
+
import type { ImportOptions, ExportOptions } from './io';
|
|
4
|
+
import type { Operation } from './operations';
|
|
5
|
+
import type { Namespace, RawRecord, TreeRecord } from './records';
|
|
6
|
+
import type { ChainFactory } from '../chain-methods';
|
|
7
|
+
export declare type RawDialecteConfig<GenericElementNames extends readonly string[], GenericRootElement extends GenericElementNames[number], GenericAttributes extends Record<string, any>, GenericChildren extends Record<string, readonly string[]>, GenericParents extends Record<string, readonly string[]>, GenericDescendants extends Record<string, readonly string[]>, GenericAncestors extends Record<string, readonly string[]>> = {
|
|
8
8
|
rootElementName: GenericRootElement;
|
|
9
9
|
singletonElements?: readonly GenericElementNames[number][];
|
|
10
10
|
namespaces: Record<'default', Namespace> & Record<string, Namespace>;
|
|
@@ -19,12 +19,12 @@ export type RawDialecteConfig<GenericElementNames extends readonly string[], Gen
|
|
|
19
19
|
definition: AnyDefinition;
|
|
20
20
|
hooks: DialecteHooks;
|
|
21
21
|
};
|
|
22
|
-
export type IOConfig = {
|
|
22
|
+
export declare type IOConfig = {
|
|
23
23
|
supportedFileExtensions: readonly string[];
|
|
24
24
|
importOptions?: Partial<ImportOptions>;
|
|
25
25
|
exportOptions?: Partial<ExportOptions>;
|
|
26
26
|
};
|
|
27
|
-
export type ExtensionsMethodParams<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>, GenericExtensionRegistry extends ExtensionRegistry<GenericConfig> = ExtensionRegistry<GenericConfig>> = {
|
|
27
|
+
export declare type ExtensionsMethodParams<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>, GenericExtensionRegistry extends ExtensionRegistry<GenericConfig> = ExtensionRegistry<GenericConfig>> = {
|
|
28
28
|
chain: ChainFactory<GenericConfig, GenericExtensionRegistry>;
|
|
29
29
|
dialecteConfig: GenericConfig;
|
|
30
30
|
contextPromise: Promise<Context<GenericConfig, GenericElement>>;
|
|
@@ -33,15 +33,15 @@ export type ExtensionsMethodParams<GenericConfig extends AnyDialecteConfig, Gene
|
|
|
33
33
|
* Extension method creator - receives context params and returns the actual extension method
|
|
34
34
|
* The returned method should be chainable (return a CoreChain) unless it's an ending method
|
|
35
35
|
*/
|
|
36
|
-
export type ExtensionMethodCreator<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>> = (params: ExtensionsMethodParams<GenericConfig, GenericElement>) => (...args: any[]) => any;
|
|
36
|
+
export declare type ExtensionMethodCreator<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>> = (params: ExtensionsMethodParams<GenericConfig, GenericElement>) => (...args: any[]) => any;
|
|
37
37
|
/**
|
|
38
38
|
* Extension registry - maps element types to their extension methods
|
|
39
39
|
* Each element can have multiple extension methods identified by method name
|
|
40
40
|
*/
|
|
41
|
-
export type ExtensionRegistry<GenericConfig extends AnyDialecteConfig> = Partial<{
|
|
41
|
+
export declare type ExtensionRegistry<GenericConfig extends AnyDialecteConfig> = Partial<{
|
|
42
42
|
[K in ElementsOf<GenericConfig>]: Record<string, ExtensionMethodCreator<GenericConfig, K>>;
|
|
43
43
|
}>;
|
|
44
|
-
export type DialecteHooks = {
|
|
44
|
+
export declare type DialecteHooks = {
|
|
45
45
|
/**
|
|
46
46
|
* Called before cloning a record.
|
|
47
47
|
* Return modified attributes for the clone.
|
|
@@ -69,7 +69,7 @@ export type DialecteHooks = {
|
|
|
69
69
|
context: Context<GenericConfig, GenericParentElement>;
|
|
70
70
|
}) => Operation<GenericConfig>[];
|
|
71
71
|
};
|
|
72
|
-
export type DatabaseConfig = Readonly<{
|
|
72
|
+
export declare type DatabaseConfig = Readonly<{
|
|
73
73
|
tables: {
|
|
74
74
|
xmlElements: {
|
|
75
75
|
name: string;
|
|
@@ -84,26 +84,26 @@ export type DatabaseConfig = Readonly<{
|
|
|
84
84
|
* Generic FlavorConfig type for contexts where specific flavor is not known.
|
|
85
85
|
* Use this instead of FlavorConfig<any, any, any, any, any>
|
|
86
86
|
*/
|
|
87
|
-
export type AnyDialecteConfig = RawDialecteConfig<readonly string[], string, Record<string, any>, Record<string, readonly string[]>, Record<string, readonly string[]>, Record<string, readonly string[]>, Record<string, readonly string[]>>;
|
|
87
|
+
export declare type AnyDialecteConfig = RawDialecteConfig<readonly string[], string, Record<string, any>, Record<string, readonly string[]>, Record<string, readonly string[]>, Record<string, readonly string[]>, Record<string, readonly string[]>>;
|
|
88
88
|
/**
|
|
89
89
|
* Extract the element union type from a dialecte config
|
|
90
90
|
*/
|
|
91
|
-
export type ElementsOf<GenericConfig extends AnyDialecteConfig> = GenericConfig['elements'][number];
|
|
92
|
-
export type AnyElement = string;
|
|
91
|
+
export declare type ElementsOf<GenericConfig extends AnyDialecteConfig> = GenericConfig['elements'][number];
|
|
92
|
+
export declare type AnyElement = string;
|
|
93
93
|
/**
|
|
94
94
|
* Get attributes type for a specific element from dialecte config
|
|
95
95
|
*/
|
|
96
|
-
export type AttributesValueObjectOf<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>> = GenericConfig['attributes'][GenericElement];
|
|
97
|
-
export type AnyAttributesValueObject = Record<string, string>;
|
|
96
|
+
export declare type AttributesValueObjectOf<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>> = GenericConfig['attributes'][GenericElement];
|
|
97
|
+
export declare type AnyAttributesValueObject = Record<string, string>;
|
|
98
98
|
/**
|
|
99
99
|
* Get attribute name union for a specific element from dialecte config
|
|
100
100
|
*/
|
|
101
|
-
export type AttributesOf<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>> = keyof AttributesValueObjectOf<GenericConfig, GenericElement> & string;
|
|
102
|
-
export type AnyAttributeName = string;
|
|
101
|
+
export declare type AttributesOf<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>> = keyof AttributesValueObjectOf<GenericConfig, GenericElement> & string;
|
|
102
|
+
export declare type AnyAttributeName = string;
|
|
103
103
|
/**
|
|
104
104
|
* Get attribute object type for a specific element from dialecte config
|
|
105
105
|
*/
|
|
106
|
-
export type FullAttributeObjectOf<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>> = {
|
|
106
|
+
export declare type FullAttributeObjectOf<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>> = {
|
|
107
107
|
[K in AttributesOf<GenericConfig, GenericElement>]: {
|
|
108
108
|
name: K;
|
|
109
109
|
value: AttributesValueObjectOf<GenericConfig, GenericElement>[K];
|
|
@@ -113,29 +113,28 @@ export type FullAttributeObjectOf<GenericConfig extends AnyDialecteConfig, Gener
|
|
|
113
113
|
/**
|
|
114
114
|
* Get valid children elements for a specific element from dialecte config
|
|
115
115
|
*/
|
|
116
|
-
export type ChildrenOf<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>> = GenericConfig['children'][GenericElement][number];
|
|
117
|
-
export type AnyChildren = ChildrenOf<AnyDialecteConfig, AnyElement>;
|
|
116
|
+
export declare type ChildrenOf<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>> = GenericConfig['children'][GenericElement][number];
|
|
117
|
+
export declare type AnyChildren = ChildrenOf<AnyDialecteConfig, AnyElement>;
|
|
118
118
|
/**
|
|
119
119
|
* Get valid parent elements for a specific element from dialecte config
|
|
120
120
|
*/
|
|
121
|
-
export type ParentsOf<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>> = GenericConfig['parents'][GenericElement][number];
|
|
122
|
-
export type AnyParent = ParentsOf<AnyDialecteConfig, AnyElement>;
|
|
121
|
+
export declare type ParentsOf<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>> = GenericConfig['parents'][GenericElement][number];
|
|
122
|
+
export declare type AnyParent = ParentsOf<AnyDialecteConfig, AnyElement>;
|
|
123
123
|
/**
|
|
124
124
|
* Get descendants elements for a specific element from dialecte config
|
|
125
125
|
*/
|
|
126
|
-
export type DescendantsOf<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>> = GenericConfig['descendants'][GenericElement][number];
|
|
127
|
-
export type AnyDescendant = DescendantsOf<AnyDialecteConfig, AnyElement>;
|
|
126
|
+
export declare type DescendantsOf<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>> = GenericConfig['descendants'][GenericElement][number];
|
|
127
|
+
export declare type AnyDescendant = DescendantsOf<AnyDialecteConfig, AnyElement>;
|
|
128
128
|
/**
|
|
129
129
|
* Get ancestors elements for a specific element from dialecte config
|
|
130
130
|
*/
|
|
131
|
-
export type AncestorsOf<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>> = GenericConfig['ancestors'][GenericElement][number];
|
|
132
|
-
export type AnyAncestors = AncestorsOf<AnyDialecteConfig, AnyElement>;
|
|
131
|
+
export declare type AncestorsOf<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>> = GenericConfig['ancestors'][GenericElement][number];
|
|
132
|
+
export declare type AnyAncestors = AncestorsOf<AnyDialecteConfig, AnyElement>;
|
|
133
133
|
/**
|
|
134
134
|
* Get the root element type from a dialecte config
|
|
135
135
|
*/
|
|
136
|
-
export type RootElementOf<GenericConfig extends AnyDialecteConfig> = GenericConfig['rootElementName'];
|
|
136
|
+
export declare type RootElementOf<GenericConfig extends AnyDialecteConfig> = GenericConfig['rootElementName'];
|
|
137
137
|
/**
|
|
138
138
|
* Get singleton elements from dialecte config
|
|
139
139
|
*/
|
|
140
|
-
export type SingletonElementsOf<GenericConfig extends AnyDialecteConfig> = GenericConfig['singletonElements'] extends readonly (infer E)[] ? E : never;
|
|
141
|
-
//# sourceMappingURL=dialecte-config.d.ts.map
|
|
140
|
+
export declare type SingletonElementsOf<GenericConfig extends AnyDialecteConfig> = GenericConfig['singletonElements'] extends readonly (infer E)[] ? E : never;
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Options for chunking during import/export
|
|
3
3
|
*/
|
|
4
|
-
export type ChunkOptions = {
|
|
4
|
+
export declare type ChunkOptions = {
|
|
5
5
|
batchSize: number;
|
|
6
6
|
chunkSize: number;
|
|
7
7
|
};
|
|
8
8
|
/**
|
|
9
9
|
* Options for importing XML files
|
|
10
10
|
*/
|
|
11
|
-
export type ImportOptions = ChunkOptions & {
|
|
11
|
+
export declare type ImportOptions = ChunkOptions & {
|
|
12
12
|
useBrowserApi: boolean;
|
|
13
13
|
};
|
|
14
|
-
export type ExportOptions = {
|
|
14
|
+
export declare type ExportOptions = {
|
|
15
15
|
useBrowserApi: boolean;
|
|
16
16
|
};
|
|
17
|
-
//# sourceMappingURL=io.d.ts.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { AnyDialecteConfig, ElementsOf } from './dialecte-config';
|
|
2
|
-
import { RawRecord } from './records';
|
|
1
|
+
import type { AnyDialecteConfig, ElementsOf } from './dialecte-config';
|
|
2
|
+
import type { RawRecord } from './records';
|
|
3
3
|
/**
|
|
4
4
|
* Operation status for tracking element lifecycle
|
|
5
5
|
*/
|
|
6
|
-
export type OperationStatus = 'created' | 'updated' | 'deleted' | 'unchanged';
|
|
6
|
+
export declare type OperationStatus = 'created' | 'updated' | 'deleted' | 'unchanged';
|
|
7
7
|
/**
|
|
8
8
|
* Staged operation - tracks changes before commit
|
|
9
9
|
*/
|
|
10
|
-
export type Operation<GenericConfig extends AnyDialecteConfig> = {
|
|
10
|
+
export declare type Operation<GenericConfig extends AnyDialecteConfig> = {
|
|
11
11
|
status: 'created';
|
|
12
12
|
oldRecord: undefined;
|
|
13
13
|
newRecord: RawRecord<GenericConfig, ElementsOf<GenericConfig>>;
|
|
@@ -23,5 +23,4 @@ export type Operation<GenericConfig extends AnyDialecteConfig> = {
|
|
|
23
23
|
/**
|
|
24
24
|
* Generic operation for contexts where specific dialecte is not known
|
|
25
25
|
*/
|
|
26
|
-
export type AnyOperation = Operation<AnyDialecteConfig>;
|
|
27
|
-
//# sourceMappingURL=operations.d.ts.map
|
|
26
|
+
export declare type AnyOperation = Operation<AnyDialecteConfig>;
|