@otters.ai/common-backend 1.0.74 → 1.0.76

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.
@@ -2,38 +2,25 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getCVOFiltersByCompanyAdmin = exports.getCOFiltersByCompanyAdmin = void 0;
4
4
  const getCOFiltersByCompanyAdmin = (filters) => {
5
- return {
5
+ return filters.companyAdmin ? {
6
+ _id: filters.id
7
+ } : {
6
8
  _id: filters.id, $or: [
7
9
  { contributors: filters.userId },
8
10
  { ownerId: filters.userId },
9
11
  ]
10
12
  };
11
- // return filters.companyAdmin ? {
12
- // _id: filters.id
13
- // } : {
14
- // _id: filters.id, $or: [
15
- // {contributors: filters.userId},
16
- // {ownerId: filters.userId},
17
- // ]
18
- // }
19
13
  };
20
14
  exports.getCOFiltersByCompanyAdmin = getCOFiltersByCompanyAdmin;
21
15
  const getCVOFiltersByCompanyAdmin = (filters) => {
22
- return {
16
+ return filters.companyAdmin ? {
17
+ _id: filters.id
18
+ } : {
23
19
  _id: filters.id, $or: [
24
20
  { contributors: filters.userId },
25
21
  { viewers: filters.userId },
26
22
  { ownerId: filters.userId },
27
23
  ]
28
24
  };
29
- // return filters.companyAdmin ? {
30
- // _id: filters.id
31
- // } : {
32
- // _id: filters.id, $or: [
33
- // {contributors: filters.userId},
34
- // {viewers: filters.userId},
35
- // {ownerId: filters.userId},
36
- // ]
37
- // }
38
25
  };
39
26
  exports.getCVOFiltersByCompanyAdmin = getCVOFiltersByCompanyAdmin;
@@ -1,6 +1,7 @@
1
1
  export interface MapStruct {
2
2
  name: string;
3
3
  id: string;
4
- partnerId: string;
4
+ contributors: string[];
5
+ companies: string[];
5
6
  ownerId: string;
6
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@otters.ai/common-backend",
3
- "version": "1.0.74",
3
+ "version": "1.0.76",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",