tango-app-api-task 3.2.1-beta-3 → 3.2.1-beta-5
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.
|
@@ -26,6 +26,7 @@ taskRouter
|
|
|
26
26
|
.put( '/publish', isAllowedSessionHandler, isAllowedClient, accessVerification( { userType: [ 'tango', 'client' ], access: [ { featureName: 'TangoTrax', name: 'Task', permissions: [ 'isEdit' ] } ] } ), taskController.updatePublish )
|
|
27
27
|
.get( '/duplicateTask/:checklistId', isAllowedSessionHandler, isAllowedClient, accessVerification( { userType: [ 'tango', 'client' ], access: [ { featureName: 'TangoTrax', name: 'Task', permissions: [ 'isEdit' ] } ] } ), taskController.duplicateChecklist )
|
|
28
28
|
.get( '/teamMigrations', taskController.teamMigrations )
|
|
29
|
-
.post( '/createaiChecklist', isAllowedInternalAPIHandler, taskController.createAiChecklist )
|
|
29
|
+
.post( '/createaiChecklist', isAllowedInternalAPIHandler, taskController.createAiChecklist )
|
|
30
|
+
.post( '/createaiTask', isAllowedInternalAPIHandler, taskController.createAiTask );
|
|
30
31
|
|
|
31
32
|
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import model from 'tango-api-schema';
|
|
2
|
+
|
|
3
|
+
export const find = async ( query={}, field={} ) => {
|
|
4
|
+
return model.checklistassignconfigModel.find( query, field );
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export const findOne = async ( query={}, field={} ) => {
|
|
8
|
+
return model.checklistassignconfigModel.findOne( query, field );
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const create = async ( document = {} ) => {
|
|
12
|
+
return model.checklistassignconfigModel.create( document );
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const insertMany = async ( document = {} ) => {
|
|
16
|
+
return model.checklistassignconfigModel.insertMany( document );
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const deleteMany = async ( document = {} ) => {
|
|
20
|
+
return model.checklistassignconfigModel.deleteMany( document );
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const updateMany = async ( query = {}, record={} ) => {
|
|
24
|
+
return model.checklistassignconfigModel.updateMany( query, { $set: record } );
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export const aggregate = async ( query = {} ) => {
|
|
28
|
+
return model.checklistassignconfigModel.aggregate( query );
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
|