tango-app-api-store-builder 1.0.0-beta-96 → 1.0.0-beta-98

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.
@@ -0,0 +1,37 @@
1
+ import model from 'tango-api-schema';
2
+
3
+ export const findOne = async ( query={}, field={} ) => {
4
+ return await model.fixtureLibraryModel.findOne( query, field );
5
+ };
6
+
7
+ export const findAndSort = async ( query={}, field={}, sort={} ) => {
8
+ return await model.fixtureLibraryModel.find( query, field ).sort( sort ).collation( { locale: 'en_US', numericOrdering: true } );
9
+ };
10
+
11
+ export const find = async ( query={}, field={} ) => {
12
+ return await model.fixtureLibraryModel.find( query, field );
13
+ };
14
+
15
+ export const updateOne = async ( query={}, record={} ) => {
16
+ return await model.fixtureLibraryModel.updateOne( query, { $set: record } );
17
+ };
18
+
19
+ export const deleteOne = async ( query={} ) => {
20
+ return await model.fixtureLibraryModel.deleteOne( query );
21
+ };
22
+
23
+ export const insertMany = async ( data = [] ) => {
24
+ return await model.fixtureLibraryModel.insertMany( data );
25
+ };
26
+
27
+ export const deleteMany = async ( data = [] ) => {
28
+ return await model.fixtureLibraryModel.deleteMany( data );
29
+ };
30
+
31
+ export const create = async ( data = {} ) => {
32
+ return await model.fixtureLibraryModel.create( data );
33
+ };
34
+
35
+ export const aggregate = async ( query=[] ) => {
36
+ return await model.fixtureLibraryModel.aggregate( query );
37
+ };
@@ -6,3 +6,6 @@ export async function find( query={}, field={} ) {
6
6
  export async function findOne( query={}, field={} ) {
7
7
  return model.planoStaticData.findOne( query, field );
8
8
  }
9
+ export async function updateOne( query={}, record={} ) {
10
+ return model.planoStaticData.updateOne( query, record, { upsert: true } );
11
+ }
@@ -0,0 +1,49 @@
1
+ import model from 'tango-api-schema';
2
+
3
+ export async function find( query={}, field={} ) {
4
+ return model.planoVmModel.find( query, field );
5
+ }
6
+
7
+ export async function findOne( query={}, field={} ) {
8
+ return model.planoVmModel.findOne( query, field );
9
+ }
10
+ export async function findAndSort( query={}, field={}, sort={} ) {
11
+ return model.planoVmModel.find( query, field ).sort( sort ).collation( { locale: 'en_US', numericOrdering: true } );
12
+ }
13
+
14
+ export async function insertMany( data ) {
15
+ return model.planoVmModel.insertMany( data );
16
+ }
17
+
18
+ export async function deleteMany( data ) {
19
+ return model.planoVmModel.deleteMany( data );
20
+ }
21
+
22
+
23
+ export async function aggregate( query ) {
24
+ return model.planoVmModel.aggregate( query );
25
+ }
26
+
27
+
28
+ export async function deleteOne( query ) {
29
+ return model.planoVmModel.deleteOne( query );
30
+ }
31
+
32
+ export async function create( data ) {
33
+ return model.planoVmModel.create( data );
34
+ }
35
+
36
+ export async function upsertOne( query, record ) {
37
+ return model.planoVmModel.findOneAndUpdate(
38
+ query,
39
+ record,
40
+ { upsert: true, new: true },
41
+ );
42
+ }
43
+ export async function updateOne( query, record ) {
44
+ return model.planoVmModel.updateOne( query, { $set: record }, { upsert: true } );
45
+ }
46
+
47
+ export async function count( query ) {
48
+ return model.planoVmModel.countDocuments( query );
49
+ }
@@ -0,0 +1,39 @@
1
+ import model from 'tango-api-schema';
2
+
3
+ export const findOne = async ( query={}, field={} ) => {
4
+ return await model.planoProductCategoryModel.findOne( query, field );
5
+ };
6
+
7
+ export const findAndSort = async ( query={}, field={}, sort={} ) => {
8
+ return await model.planoProductCategoryModel.find( query, field ).sort( sort ).collation( { locale: 'en_US', numericOrdering: true } );
9
+ };
10
+
11
+ export const find = async ( query={}, field={} ) => {
12
+ return await model.planoProductCategoryModel.find( query, field );
13
+ };
14
+
15
+ export const updateOne = async ( query={}, record={} ) => {
16
+ return await model.planoProductCategoryModel.updateOne( query, { $set: record }, { upsert: true } );
17
+ };
18
+
19
+ export const deleteOne = async ( query={} ) => {
20
+ return await model.planoProductCategoryModel.deleteOne( query );
21
+ };
22
+
23
+ export const insertMany = async ( data = [] ) => {
24
+ return await model.planoProductCategoryModel.insertMany( data );
25
+ };
26
+
27
+ export const deleteMany = async ( data = [] ) => {
28
+ return await model.planoProductCategoryModel.deleteMany( data );
29
+ };
30
+
31
+ export const create = async ( data = {} ) => {
32
+ return await model.planoProductCategoryModel.create( data );
33
+ };
34
+
35
+ export const aggregate = async ( query=[] ) => {
36
+ return await model.planoProductCategoryModel.aggregate( query );
37
+ };
38
+
39
+
@@ -0,0 +1,33 @@
1
+ import model from 'tango-api-schema';
2
+
3
+ export const findOne = async ( query ={}, field = {} ) => {
4
+ return model.vmTypeModel.findOne( query, field );
5
+ };
6
+
7
+ export const deleteOne = async ( query ={} ) => {
8
+ return model.vmTypeModel.deleteOne( query );
9
+ };
10
+
11
+ export const deleteMany = async ( query ={} ) => {
12
+ return model.vmTypeModel.deleteMany( query );
13
+ };
14
+
15
+ export const create = async ( data ) => {
16
+ return model.vmTypeModel.create( data );
17
+ };
18
+
19
+ export const find = async ( query ={}, field = {} ) => {
20
+ return model.vmTypeModel.find( query, field );
21
+ };
22
+
23
+ export const updateOne = async ( query ={}, record = {} ) => {
24
+ return model.vmTypeModel.updateOne( query, { $set: record } );
25
+ };
26
+
27
+ export const updateKeys = async ( query ={}, record = {} ) => {
28
+ return model.vmTypeModel.updateOne( query, record );
29
+ };
30
+
31
+ export const insertMany = async ( data ) => {
32
+ return model.vmTypeModel.insertMany( data );
33
+ };