@cubicweb/client 2.1.1 → 3.0.0-alpha.10
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/README.md +28 -16
- package/lib/api/Api.d.ts +34 -14
- package/lib/api/Api.d.ts.map +1 -1
- package/lib/api/Api.js +82 -44
- package/lib/api/Api.js.map +1 -1
- package/lib/api/Client.d.ts +17 -6
- package/lib/api/Client.d.ts.map +1 -1
- package/lib/api/Client.js +30 -11
- package/lib/api/Client.js.map +1 -1
- package/lib/api/Transaction.d.ts +33 -20
- package/lib/api/Transaction.d.ts.map +1 -1
- package/lib/api/Transaction.js +44 -37
- package/lib/api/Transaction.js.map +1 -1
- package/lib/schema/classes/EntitySchema.d.ts +16 -22
- package/lib/schema/classes/EntitySchema.d.ts.map +1 -1
- package/lib/schema/classes/EntitySchema.js +17 -25
- package/lib/schema/classes/EntitySchema.js.map +1 -1
- package/lib/schema/classes/RelationDefinitionSchema.d.ts +8 -10
- package/lib/schema/classes/RelationDefinitionSchema.d.ts.map +1 -1
- package/lib/schema/classes/RelationDefinitionSchema.js +7 -21
- package/lib/schema/classes/RelationDefinitionSchema.js.map +1 -1
- package/lib/schema/classes/Schema.d.ts +2 -0
- package/lib/schema/classes/Schema.d.ts.map +1 -1
- package/lib/schema/classes/Schema.js +2 -0
- package/lib/schema/classes/Schema.js.map +1 -1
- package/lib/schema/classes/Utils.d.ts +135 -1
- package/lib/schema/classes/Utils.d.ts.map +1 -1
- package/lib/schema/classes/Utils.js +165 -3
- package/lib/schema/classes/Utils.js.map +1 -1
- package/lib/schema/raw/Constraints.d.ts +17 -9
- package/lib/schema/raw/Constraints.d.ts.map +1 -1
- package/lib/schema/raw/Entities.d.ts +4 -0
- package/lib/schema/raw/Entities.d.ts.map +1 -1
- package/lib/schema/raw/RelationDefinitions.d.ts +15 -2
- package/lib/schema/raw/RelationDefinitions.d.ts.map +1 -1
- package/lib/schema/raw/Schema.d.ts +2 -0
- package/lib/schema/raw/Schema.d.ts.map +1 -1
- package/lib/schema/raw/Utils.d.ts +6 -0
- package/lib/schema/raw/Utils.d.ts.map +1 -1
- package/package.json +4 -8
- package/src/api/Api.ts +107 -54
- package/src/api/Client.ts +33 -20
- package/src/api/Transaction.ts +56 -37
- package/src/schema/classes/EntitySchema.ts +35 -41
- package/src/schema/classes/RelationDefinitionSchema.ts +10 -25
- package/src/schema/classes/Schema.ts +2 -0
- package/src/schema/classes/Utils.ts +178 -1
- package/src/schema/raw/Constraints.ts +20 -8
- package/src/schema/raw/Entities.ts +4 -0
- package/src/schema/raw/RelationDefinitions.ts +15 -2
- package/src/schema/raw/Schema.ts +2 -0
- package/src/schema/raw/Utils.ts +6 -0
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isAttributeRichString = exports.hasAttributeWithName = exports.
|
|
3
|
+
exports.isAttributeRichString = exports.hasAttributeWithName = exports.getRelationDefinition = exports.getRelationType = exports.getRawRelationType = exports.getReverseRelationType = exports.getRoleFromRelationType = exports.isRelationTypeReversed = exports.getOppositeRelationRole = exports.isCardinalityOptional = exports.isCardinalityMultiple = exports.isCardinalityRequired = exports.getLooseSchema = void 0;
|
|
4
|
+
// This prefix is often applied to relation types as convention
|
|
5
|
+
// indicating a relation is viewed from the object's point of view
|
|
6
|
+
// We do not export it and instead encourage users to use the utility functions
|
|
7
|
+
const REVERSE_INDICATOR = "reverse_";
|
|
4
8
|
/**
|
|
5
9
|
* Returns the given schema using loose typing.
|
|
6
10
|
* Can be useful when working with generic schemas
|
|
7
11
|
*
|
|
8
12
|
* @param schema The schema to create a loose type for
|
|
9
13
|
* @returns A loosely typed schema
|
|
14
|
+
*
|
|
15
|
+
* @category Utils
|
|
10
16
|
*/
|
|
11
17
|
const getLooseSchema = (schema) => {
|
|
12
18
|
return schema;
|
|
@@ -17,11 +23,167 @@ exports.getLooseSchema = getLooseSchema;
|
|
|
17
23
|
*
|
|
18
24
|
* @param cardinality The cardinality to check
|
|
19
25
|
* @returns True if the cardinality is 1 or +
|
|
26
|
+
*
|
|
27
|
+
* @category Utils
|
|
20
28
|
*/
|
|
21
|
-
function
|
|
29
|
+
function isCardinalityRequired(cardinality) {
|
|
22
30
|
return cardinality === "1" || cardinality === "+";
|
|
23
31
|
}
|
|
24
|
-
exports.
|
|
32
|
+
exports.isCardinalityRequired = isCardinalityRequired;
|
|
33
|
+
/**
|
|
34
|
+
* Checks if the cardinality allows multiple entities to be present
|
|
35
|
+
*
|
|
36
|
+
* @param cardinality The cardinility to check
|
|
37
|
+
* @returns True if the cardinality is `*` or `+`
|
|
38
|
+
*
|
|
39
|
+
* @category Utils
|
|
40
|
+
*/
|
|
41
|
+
const isCardinalityMultiple = (cardinality) => {
|
|
42
|
+
return cardinality === "*" || cardinality === "+";
|
|
43
|
+
};
|
|
44
|
+
exports.isCardinalityMultiple = isCardinalityMultiple;
|
|
45
|
+
/**
|
|
46
|
+
* Checks if the cardinality allows entities to be absent
|
|
47
|
+
*
|
|
48
|
+
* @param cardinality The cardinility to check
|
|
49
|
+
* @returns True if the cardinality is `?` or `*`
|
|
50
|
+
*
|
|
51
|
+
* @category Utils
|
|
52
|
+
*/
|
|
53
|
+
const isCardinalityOptional = (cardinality) => {
|
|
54
|
+
return cardinality === "?" || cardinality === "*";
|
|
55
|
+
};
|
|
56
|
+
exports.isCardinalityOptional = isCardinalityOptional;
|
|
57
|
+
/**
|
|
58
|
+
* Reverses the given role name
|
|
59
|
+
*
|
|
60
|
+
* @param role The role to reverse
|
|
61
|
+
* @returns "object" if the given role was "subject", "subject" otherwise
|
|
62
|
+
*
|
|
63
|
+
* @category Utils
|
|
64
|
+
*/
|
|
65
|
+
function getOppositeRelationRole(role) {
|
|
66
|
+
return role === "subject" ? "object" : "subject";
|
|
67
|
+
}
|
|
68
|
+
exports.getOppositeRelationRole = getOppositeRelationRole;
|
|
69
|
+
/**
|
|
70
|
+
* Checks if the given relation type is reversed.
|
|
71
|
+
*
|
|
72
|
+
* A reversed relation means the relation is considered from the object entity
|
|
73
|
+
* point of view.
|
|
74
|
+
* The reverse indicator is a prefix added as a convention in CubicWeb.
|
|
75
|
+
*
|
|
76
|
+
* @param relationType The relation type to check
|
|
77
|
+
* @returns True if the relation type starts with the reverse indicator
|
|
78
|
+
*
|
|
79
|
+
* @category Utils
|
|
80
|
+
*/
|
|
81
|
+
const isRelationTypeReversed = (relationType) => {
|
|
82
|
+
return relationType.startsWith(REVERSE_INDICATOR);
|
|
83
|
+
};
|
|
84
|
+
exports.isRelationTypeReversed = isRelationTypeReversed;
|
|
85
|
+
/**
|
|
86
|
+
* Gets the entity role in the given relation type by
|
|
87
|
+
* checking for the reverse indicator
|
|
88
|
+
*
|
|
89
|
+
* A reversed relation means the relation is considered from the object entity
|
|
90
|
+
* point of view.
|
|
91
|
+
* The reverse indicator is a prefix added as a convention in CubicWeb.
|
|
92
|
+
*
|
|
93
|
+
* @param relationType The relation type to check
|
|
94
|
+
* @returns "subject" if the relation is not reversed, "object" otherwise
|
|
95
|
+
*
|
|
96
|
+
* @category Utils
|
|
97
|
+
*/
|
|
98
|
+
const getRoleFromRelationType = (relationType) => {
|
|
99
|
+
return (0, exports.isRelationTypeReversed)(relationType) ? "object" : "subject";
|
|
100
|
+
};
|
|
101
|
+
exports.getRoleFromRelationType = getRoleFromRelationType;
|
|
102
|
+
/**
|
|
103
|
+
* Adds the reverse indicator from the relation type if it is not already present.
|
|
104
|
+
*
|
|
105
|
+
* A reversed relation means the relation is considered from the object entity
|
|
106
|
+
* point of view.
|
|
107
|
+
* The reverse indicator is a prefix added as a convention in CubicWeb.
|
|
108
|
+
*
|
|
109
|
+
* @param relationType The relation type to transform
|
|
110
|
+
* @returns The relation type with the reverse indicator added or removed
|
|
111
|
+
*
|
|
112
|
+
* @category Utils
|
|
113
|
+
*/
|
|
114
|
+
const getReverseRelationType = (relationType) => {
|
|
115
|
+
if (!(0, exports.isRelationTypeReversed)(relationType)) {
|
|
116
|
+
return `${REVERSE_INDICATOR}${relationType}`;
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
return relationType;
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
exports.getReverseRelationType = getReverseRelationType;
|
|
123
|
+
/**
|
|
124
|
+
* Clears the reverse indicator from the relation type if it is present.
|
|
125
|
+
*
|
|
126
|
+
* A reversed relation means the relation is considered from the object entity
|
|
127
|
+
* point of view.
|
|
128
|
+
* The reverse indicator is a prefix added as a convention in CubicWeb.
|
|
129
|
+
*
|
|
130
|
+
* @param relationType The relation type to transform
|
|
131
|
+
* @returns The relation type with the reverse indicator added or removed
|
|
132
|
+
*
|
|
133
|
+
* @category Utils
|
|
134
|
+
*/
|
|
135
|
+
const getRawRelationType = (relationType) => {
|
|
136
|
+
if ((0, exports.isRelationTypeReversed)(relationType)) {
|
|
137
|
+
return relationType.replace(REVERSE_INDICATOR, "");
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
return relationType;
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
exports.getRawRelationType = getRawRelationType;
|
|
144
|
+
/**
|
|
145
|
+
* Returns the relation type with the reverse indicator added if necessary.
|
|
146
|
+
*
|
|
147
|
+
* A reversed relation means the relation is considered from the object entity
|
|
148
|
+
* point of view.
|
|
149
|
+
* The reverse indicator is a prefix added as a convention in CubicWeb.
|
|
150
|
+
*
|
|
151
|
+
* @param relationType The relation type to transform
|
|
152
|
+
* @param role The entity role in the relation
|
|
153
|
+
* @returns A relation type with the reverse indicator if necessary
|
|
154
|
+
*
|
|
155
|
+
* @category Utils
|
|
156
|
+
*/
|
|
157
|
+
const getRelationType = (relationType, role) => {
|
|
158
|
+
return role === "subject"
|
|
159
|
+
? relationType
|
|
160
|
+
: (0, exports.getReverseRelationType)(relationType);
|
|
161
|
+
};
|
|
162
|
+
exports.getRelationType = getRelationType;
|
|
163
|
+
/**
|
|
164
|
+
* Finds the relation matching the provided source, relation typ and target
|
|
165
|
+
*
|
|
166
|
+
* @param entitySchema The entity schema the relation is from
|
|
167
|
+
* @param sourceType The entity type acting as source for the relation
|
|
168
|
+
* @param relationType The type of the relation to use. Can have the reverse indicator to decide the role of the source/target entities
|
|
169
|
+
* @param targetType The entity type acting as target for the relation
|
|
170
|
+
* @returns The relation definition matching the triplet source relation target
|
|
171
|
+
*
|
|
172
|
+
* @category Utils
|
|
173
|
+
*/
|
|
174
|
+
const getRelationDefinition = (entitySchema, sourceType, relationType, targetType) => {
|
|
175
|
+
const role = (0, exports.getRoleFromRelationType)(relationType);
|
|
176
|
+
const match = entitySchema.matchRelationDefinitions({
|
|
177
|
+
[role]: sourceType,
|
|
178
|
+
type: (0, exports.getRawRelationType)(relationType),
|
|
179
|
+
[getOppositeRelationRole(role)]: targetType,
|
|
180
|
+
});
|
|
181
|
+
if (match.length > 0) {
|
|
182
|
+
return match[0];
|
|
183
|
+
}
|
|
184
|
+
return undefined;
|
|
185
|
+
};
|
|
186
|
+
exports.getRelationDefinition = getRelationDefinition;
|
|
25
187
|
function hasAttributeWithName(entitySchema, attributeNameSearched) {
|
|
26
188
|
for (const entityAttribute of entitySchema.attributes) {
|
|
27
189
|
if (entityAttribute.type == attributeNameSearched) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Utils.js","sourceRoot":"","sources":["../../../src/schema/classes/Utils.ts"],"names":[],"mappings":";;;AASA
|
|
1
|
+
{"version":3,"file":"Utils.js","sourceRoot":"","sources":["../../../src/schema/classes/Utils.ts"],"names":[],"mappings":";;;AASA,+DAA+D;AAC/D,kEAAkE;AAClE,+EAA+E;AAC/E,MAAM,iBAAiB,GAAG,UAAU,CAAC;AASrC;;;;;;;;GAQG;AACI,MAAM,cAAc,GAAG,CAI5B,MAAoB,EACpB,EAAE;IACF,OAAO,MAA2B,CAAC;AACrC,CAAC,CAAC;AAPW,QAAA,cAAc,kBAOzB;AAEF;;;;;;;GAOG;AACH,SAAgB,qBAAqB,CAAC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ACrD,IAAI,eAAe,CAAC,IAAI,IAAI,qBAAqB,EAAE;YACjD,OAAO,IAAI,CAAC;SACb;KACF;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAVD,oDAUC;AAED,SAAgB,qBAAqB,CACnC,YAA0B,EAC1B,qBAA6B;IAE7B,OAAO,oBAAoB,CAAC,YAAY,EAAE,qBAAqB,GAAG,SAAS,CAAC,CAAC;AAC/E,CAAC;AALD,sDAKC"}
|
|
@@ -6,7 +6,7 @@ type ConstraintBase<T extends string, V extends Record<string, unknown> | null>
|
|
|
6
6
|
value: V;
|
|
7
7
|
};
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* The type of a constraint message when one is present.
|
|
10
10
|
*/
|
|
11
11
|
type ConstraintMessage = string | null;
|
|
12
12
|
export type UniqueConstraint = ConstraintBase<"UniqueConstraint", {
|
|
@@ -26,6 +26,8 @@ export type RegexpConstraint = ConstraintBase<"RegexpConstraint", {
|
|
|
26
26
|
* Reference to an attribute used in constraints.
|
|
27
27
|
*
|
|
28
28
|
* @property \_\_attribute\_\_ name of the attribute in the same entity
|
|
29
|
+
*
|
|
30
|
+
* @category Schema
|
|
29
31
|
*/
|
|
30
32
|
export interface Attribute {
|
|
31
33
|
__attribute__: string;
|
|
@@ -41,6 +43,8 @@ export interface TimeDelta {
|
|
|
41
43
|
* @property \_\_today\_\_ always true
|
|
42
44
|
* @property offset delta to current date at the time of the check
|
|
43
45
|
* @property type name of the Python class used to do the comparison
|
|
46
|
+
*
|
|
47
|
+
* @category Schema
|
|
44
48
|
*/
|
|
45
49
|
export interface Today {
|
|
46
50
|
__today__: true;
|
|
@@ -52,27 +56,27 @@ export interface Today {
|
|
|
52
56
|
*
|
|
53
57
|
* @property \_\_now\_\_ always true
|
|
54
58
|
* @property offset delta to current date at the time of the check
|
|
59
|
+
*
|
|
60
|
+
* @category Schema
|
|
55
61
|
*/
|
|
56
62
|
export interface Now {
|
|
57
63
|
__now__: true;
|
|
58
|
-
offset: TimeDelta;
|
|
64
|
+
offset: TimeDelta | null;
|
|
59
65
|
}
|
|
60
66
|
/**
|
|
61
67
|
* All the possible operators inside a constraint.
|
|
62
|
-
*/
|
|
63
|
-
export type ConstraintOperator = ">" | ">=" | "<" | "<=";
|
|
64
|
-
/**
|
|
65
|
-
* @property value.boundary boudary value to compare the attribut
|
|
66
68
|
*
|
|
69
|
+
* @category Schema
|
|
67
70
|
*/
|
|
71
|
+
export type ConstraintOperator = ">" | ">=" | "<" | "<=";
|
|
68
72
|
export type BoundaryConstraint = ConstraintBase<"BoundaryConstraint", {
|
|
69
|
-
boundary: Attribute | Today | Now | number | null;
|
|
73
|
+
boundary: Attribute | Today | Now | number | string | null;
|
|
70
74
|
op: ConstraintOperator;
|
|
71
75
|
msg: ConstraintMessage;
|
|
72
76
|
}>;
|
|
73
77
|
export type IntervalBoundConstraint = ConstraintBase<"IntervalBoundConstraint", {
|
|
74
|
-
minvalue: number | null;
|
|
75
|
-
maxvalue: number | null;
|
|
78
|
+
minvalue: number | string | null;
|
|
79
|
+
maxvalue: number | string | null;
|
|
76
80
|
msg: ConstraintMessage;
|
|
77
81
|
}>;
|
|
78
82
|
export type StaticVocabularyConstraint = ConstraintBase<"StaticVocabularyConstraint", {
|
|
@@ -94,10 +98,14 @@ export type RQLConstraint = ConstraintBase<"RQLConstraint", {
|
|
|
94
98
|
}>;
|
|
95
99
|
/**
|
|
96
100
|
* Type representing all possible constraints for attributes.
|
|
101
|
+
*
|
|
102
|
+
* @category Schema
|
|
97
103
|
*/
|
|
98
104
|
export type AttributeConstraint = Readonly<UniqueConstraint | SizeConstraint | RegexpConstraint | BoundaryConstraint | IntervalBoundConstraint | StaticVocabularyConstraint | FormatConstraint | RQLConstraint>;
|
|
99
105
|
/**
|
|
100
106
|
* Type representing all possible constraints for relations.
|
|
107
|
+
*
|
|
108
|
+
* @category Schema
|
|
101
109
|
*/
|
|
102
110
|
export type RelationConstraint = Readonly<RQLVocabularyConstraint | RQLConstraint>;
|
|
103
111
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Constraints.d.ts","sourceRoot":"","sources":["../../../src/schema/raw/Constraints.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,KAAK,cAAc,CACjB,CAAC,SAAS,MAAM,EAChB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,IACtC;IACF,IAAI,EAAE,CAAC,CAAC;IACR,KAAK,EAAE,CAAC,CAAC;CACV,CAAC;AAEF;;GAEG;AACH,KAAK,iBAAiB,GAAG,MAAM,GAAG,IAAI,CAAC;AAEvC,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAC3C,kBAAkB,EAClB;IAAE,GAAG,EAAE,iBAAiB,CAAA;CAAE,CAC3B,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,cAAc,CACzC,gBAAgB,EAChB;IAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,GAAG,EAAE,iBAAiB,CAAA;CAAE,CACnE,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAC3C,kBAAkB,EAClB;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,iBAAiB,CAAA;CAAE,CAC1D,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"Constraints.d.ts","sourceRoot":"","sources":["../../../src/schema/raw/Constraints.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,KAAK,cAAc,CACjB,CAAC,SAAS,MAAM,EAChB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,IACtC;IACF,IAAI,EAAE,CAAC,CAAC;IACR,KAAK,EAAE,CAAC,CAAC;CACV,CAAC;AAEF;;GAEG;AACH,KAAK,iBAAiB,GAAG,MAAM,GAAG,IAAI,CAAC;AAEvC,MAAM,MAAM,gBAAg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Type representing an entity schema.
|
|
3
|
+
*
|
|
4
|
+
* @category Schema
|
|
3
5
|
*/
|
|
4
6
|
export type EntityRawSchema = {
|
|
5
7
|
type: string;
|
|
@@ -8,6 +10,8 @@ export type EntityRawSchema = {
|
|
|
8
10
|
};
|
|
9
11
|
/**
|
|
10
12
|
* Type representing a list of entity schemas.
|
|
13
|
+
*
|
|
14
|
+
* @category Schema
|
|
11
15
|
*/
|
|
12
16
|
export type EntityRawSchemaArray = ReadonlyArray<EntityRawSchema>;
|
|
13
17
|
//# sourceMappingURL=Entities.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Entities.d.ts","sourceRoot":"","sources":["../../../src/schema/raw/Entities.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"Entities.d.ts","sourceRoot":"","sources":["../../../src/schema/raw/Entities.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG,aAAa,CAAC,eAAe,CAAC,CAAC"}
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
+
import { EntityRole } from "../classes/Utils";
|
|
1
2
|
import { AttributeConstraint, RelationConstraint } from "./Constraints";
|
|
2
3
|
import { EntityRawSchema, EntityRawSchemaArray } from "./Entities";
|
|
3
4
|
/**
|
|
4
5
|
* Type representing all the possible cardinalities in CubicWeb.
|
|
6
|
+
*
|
|
7
|
+
* @category Schema
|
|
5
8
|
*/
|
|
6
9
|
export type Cardinality = "*" | "1" | "?" | "+";
|
|
7
10
|
/**
|
|
8
11
|
* Type representing a cardinality pair as used in relation definitions.
|
|
12
|
+
*
|
|
13
|
+
* @category Schema
|
|
9
14
|
*/
|
|
10
15
|
export type CardinalityPair = `${Cardinality}${Cardinality}`;
|
|
11
16
|
/**
|
|
@@ -73,6 +78,8 @@ interface CustomBuildObj<T extends string> extends BuildObjBase<T> {
|
|
|
73
78
|
export type BuildObj = Readonly<StringBuildObj | PasswordBuildObj | BytesBuildObj | IntBuildObj | BigIntBuildObj | FloatBuildObj | BooleanBuildObj | DecimalBuildObj | DateBuildObj | TimeBuildObj | DatetimeBuildObj | TZTimeBuildObj | TZDatetimeBuildObj | IntervalBuildObj | CustomBuildObj<string>>;
|
|
74
79
|
/**
|
|
75
80
|
* Type representing the possible options for an attribute.
|
|
81
|
+
*
|
|
82
|
+
* @category Schema
|
|
76
83
|
*/
|
|
77
84
|
export type AttributeOptions = {
|
|
78
85
|
indexed?: boolean;
|
|
@@ -81,18 +88,22 @@ export type AttributeOptions = {
|
|
|
81
88
|
};
|
|
82
89
|
/**
|
|
83
90
|
* Type representing the possible options for a relation definition.
|
|
91
|
+
*
|
|
92
|
+
* @category Schema
|
|
84
93
|
*/
|
|
85
94
|
export type RelationOptions = {
|
|
86
95
|
symmetric?: boolean;
|
|
87
96
|
inlined?: boolean;
|
|
88
|
-
fulltext_container?:
|
|
89
|
-
composite?:
|
|
97
|
+
fulltext_container?: EntityRole;
|
|
98
|
+
composite?: EntityRole;
|
|
90
99
|
};
|
|
91
100
|
/**
|
|
92
101
|
* Type representing a relation definition schema.
|
|
93
102
|
* It can represent both attributes and relations depending on the value of Final.
|
|
94
103
|
*
|
|
95
104
|
* It can infer default values type depending on the object type if the relation is final.
|
|
105
|
+
*
|
|
106
|
+
* @category Schema
|
|
96
107
|
*/
|
|
97
108
|
export type RelationDefinitionRawSchema<ESchemas extends EntityRawSchemaArray, Final extends boolean = boolean> = Readonly<{
|
|
98
109
|
type: string;
|
|
@@ -111,6 +122,8 @@ export type RelationDefinitionRawSchema<ESchemas extends EntityRawSchemaArray, F
|
|
|
111
122
|
})>;
|
|
112
123
|
/**
|
|
113
124
|
* Type representing a list of relation definitions.
|
|
125
|
+
*
|
|
126
|
+
* @category Schema
|
|
114
127
|
*/
|
|
115
128
|
export type RelationDefinitionRawSchemaArray<ESchemas extends EntityRawSchemaArray> = ReadonlyArray<RelationDefinitionRawSchema<ESchemas, boolean>>;
|
|
116
129
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RelationDefinitions.d.ts","sourceRoot":"","sources":["../../../src/schema/raw/RelationDefinitions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEnE
|
|
1
|
+
{"version":3,"file":"RelationDefinitions.d.ts","sourceRoot":"","sources":["../../../src/schema/raw/RelationDefinitions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEnE;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAEhD;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,GAAG,WAAW,GAAG,WAAW,EAAE,CAAC;AAE7D;;;;GAIG;AACH,KAAK,YAAY,CAAC,CAAC,SAAS,MAAM,IAAI;IACpC,MAAM,EAAE,CAAC,CAAC;IACV,KAAK,EAAE,IAAI,CAAC;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,UAAU,cAAe,SAAQ,YAAY,CAAC,QAAQ,CAAC;IACrD,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,UAAU,gBAAiB,SAAQ,YAAY,CAAC,UAAU,CAAC;IACzD,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,UAAU,aAAc,SAAQ,Y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,OAAO,EAAE,eAAe,CAAC;CAC1B,CAAC,CACP,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,gCAAgC,CAC1C,QAAQ,SAAS,oBAAoB,IACnC,aAAa,CAAC,2BAA2B,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC"}
|
|
@@ -5,6 +5,8 @@ import { RelationDefinitionRawSchemaArray } from "./RelationDefinitions";
|
|
|
5
5
|
* You can export this schema from your CubicWeb instance using the command:
|
|
6
6
|
*
|
|
7
7
|
* `cubicweb-ctl export-schema -f typescript <YOUR_INSTANCE_NAME>`
|
|
8
|
+
*
|
|
9
|
+
* @category Schema
|
|
8
10
|
*/
|
|
9
11
|
export type RawSchema<E extends EntityRawSchemaArray = EntityRawSchemaArray, R extends RelationDefinitionRawSchemaArray<E> = RelationDefinitionRawSchemaArray<E>> = {
|
|
10
12
|
entities: E;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../../src/schema/raw/Schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EAAE,gCAAgC,EAAE,MAAM,uBAAuB,CAAC;AAEzE
|
|
1
|
+
{"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../../src/schema/raw/Schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EAAE,gCAAgC,EAAE,MAAM,uBAAuB,CAAC;AAEzE;;;;;;;GAOG;AACH,MAAM,MAAM,SAAS,CACnB,CAAC,SAAS,oBAAoB,GAAG,oBAAoB,EACrD,CAAC,SAAS,gCAAgC,CAAC,CAAC,CAAC,GAAG,gCAAgC,CAAC,CAAC,CAAC,IACjF;IACF,QAAQ,EAAE,CAAC,CAAC;IACZ,qBAAqB,EAAE,CAAC,CAAC;CAC1B,CAAC"}
|
|
@@ -5,16 +5,22 @@ import { EntityRawSchemaArray } from "./Entities";
|
|
|
5
5
|
*
|
|
6
6
|
* In the given EntityRawSchemaArray, if the entities type is a string, the schema is loosely typed.
|
|
7
7
|
* If the schema is strongly typed, the entities type would be a word (which is stricter than string).
|
|
8
|
+
*
|
|
9
|
+
* @category Schema
|
|
8
10
|
*/
|
|
9
11
|
export type IsLooseSchema<E extends EntityRawSchemaArray> = string extends E[number]["type"] ? true : false;
|
|
10
12
|
/**
|
|
11
13
|
* Checks if the given entity type is present in the EntityRawSchemaArray.
|
|
12
14
|
* Use this to create conditional types.
|
|
15
|
+
*
|
|
16
|
+
* @category Schema
|
|
13
17
|
*/
|
|
14
18
|
export type IsETypeInStrictSchema<E extends EntityRawSchemaArray, EType extends string> = EType extends E[number]["type"] ? true : false;
|
|
15
19
|
/**
|
|
16
20
|
* Type representing the entity's raw schema matching this type.
|
|
17
21
|
* This type only works for EntityRawSchemaArray with literals as "type" property.
|
|
22
|
+
*
|
|
23
|
+
* @category Schema
|
|
18
24
|
*/
|
|
19
25
|
export type EntityRawSchemaByType<E extends EntityRawSchemaArray, T extends string> = E[number] extends infer ESchema ? ESchema extends {
|
|
20
26
|
type: T;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Utils.d.ts","sourceRoot":"","sources":["../../../src/schema/raw/Utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAElD
|
|
1
|
+
{"version":3,"file":"Utils.d.ts","sourceRoot":"","sources":["../../../src/schema/raw/Utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAElD;;;;;;;;GAQG;AACH,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,oBAAoB,IACtD,MAAM,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,GAAG,IAAI,GAAG,KAAK,CAAC;AAElD;;;;;GAKG;AACH,MAAM,MAAM,qBAAqB,CAC/B,CAAC,SAAS,oBAAoB,EAC9B,KAAK,SAAS,MAAM,IAClB,KAAK,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,GAAG,IAAI,GAAG,KAAK,CAAC;AAEnD;;;;;GAKG;AACH,MAAM,MAAM,qBAAqB,CAC/B,CAAC,SAAS,oBAAoB,EAC9B,CAAC,SAAS,MAAM,IACd,CAAC,CAAC,MAAM,CAAC,SAAS,MAAM,OAAO,GAC/B,OAAO,SAAS;IAAE,IAAI,EAAE,CAAC,CAAA;CAAE,GACzB,OAAO,GACP,KAAK,GACP,KAAK,CAAC"}
|
package/package.json
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
"name": "@cubicweb/client",
|
|
3
3
|
"description": "Official JS client for CubicWeb API",
|
|
4
4
|
"author": "Logilab",
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "3.0.0-alpha.10",
|
|
6
6
|
"license": "LGPL-3.0-or-later",
|
|
7
7
|
"main": "lib/index.js",
|
|
8
8
|
"types": "lib/index.d.ts",
|
|
9
9
|
"scripts": {
|
|
10
|
-
"build": "tsc --project tsconfig.build.json",
|
|
11
|
-
"docs": "typedoc"
|
|
10
|
+
"build": "run -T tsc --project tsconfig.build.json",
|
|
11
|
+
"docs": "run -T typedoc"
|
|
12
12
|
},
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "hg",
|
|
@@ -23,9 +23,5 @@
|
|
|
23
23
|
"lib/**",
|
|
24
24
|
"src/**",
|
|
25
25
|
"!**/__tests__/**"
|
|
26
|
-
]
|
|
27
|
-
"devDependencies": {
|
|
28
|
-
"typedoc": "^0.23.24",
|
|
29
|
-
"typescript": "^4.9.4"
|
|
30
|
-
}
|
|
26
|
+
]
|
|
31
27
|
}
|