adapt-authoring-content 2.1.7 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/errors/errors.json +7 -8
- package/index.js +1 -0
- package/lib/ContentModule.js +432 -110
- package/lib/ContentTree.js +128 -0
- package/lib/utils/computeSortOrderOps.js +21 -0
- package/lib/utils/contentTypeToSchemaName.js +9 -0
- package/lib/utils/extractAssetIds.js +18 -0
- package/lib/utils/formatFriendlyId.js +12 -0
- package/lib/utils/parseMaxSeq.js +16 -0
- package/lib/utils.js +6 -1
- package/migrations/3.0.0.js +123 -0
- package/package.json +4 -3
- package/routes.json +51 -0
- package/schema/contentassets.schema.json +18 -0
- package/tests/ContentModule.spec.js +512 -1634
- package/tests/ContentTree.spec.js +230 -0
- package/tests/_ht.js +116 -0
- package/tests/utils-computeSortOrderOps.spec.js +94 -0
- package/tests/utils-contentTypeToSchemaName.spec.js +21 -0
- package/tests/utils-extractAssetIds.spec.js +118 -0
- package/tests/utils-formatFriendlyId.spec.js +40 -0
- package/tests/utils-parseMaxSeq.spec.js +49 -0
- package/lib/utils/getDescendants.js +0 -22
- package/tests/utils-getDescendants.spec.js +0 -117
package/errors/errors.json
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
"data": {
|
|
4
4
|
"parentId": "_id of the parent item"
|
|
5
5
|
},
|
|
6
|
-
"description": "Specified item is not a valid content
|
|
7
|
-
"statusCode":
|
|
6
|
+
"description": "Specified item is not a valid content parent",
|
|
7
|
+
"statusCode": 400
|
|
8
8
|
},
|
|
9
9
|
"DUPL_FRIENDLY_ID": {
|
|
10
10
|
"data": {
|
|
@@ -14,13 +14,12 @@
|
|
|
14
14
|
"description": "A content item with this _friendlyId already exists in this course",
|
|
15
15
|
"statusCode": 409
|
|
16
16
|
},
|
|
17
|
-
"
|
|
17
|
+
"RESOURCE_IN_USE": {
|
|
18
18
|
"data": {
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"_component": "The _component value"
|
|
19
|
+
"type": "Type of resource",
|
|
20
|
+
"courses": "Courses using the resource"
|
|
22
21
|
},
|
|
23
|
-
"description": "
|
|
24
|
-
"statusCode":
|
|
22
|
+
"description": "Resource is currently being used in courses",
|
|
23
|
+
"statusCode": 400
|
|
25
24
|
}
|
|
26
25
|
}
|
package/index.js
CHANGED