@otters.ai/common-backend 1.0.83 → 1.0.85

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