@otters.ai/common-backend 1.0.69 → 1.0.71

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,10 @@
1
+ export declare const getCOFiltersByCompanyAdmin: (filters: {
2
+ companyAdmin: boolean;
3
+ id: any;
4
+ userId: string;
5
+ }) => object;
6
+ export declare const getCVOFiltersByCompanyAdmin: (filters: {
7
+ companyAdmin: boolean;
8
+ id: any;
9
+ userId: string;
10
+ }) => object;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getCVOFiltersByCompanyAdmin = exports.getCOFiltersByCompanyAdmin = void 0;
4
+ const getCOFiltersByCompanyAdmin = (filters) => {
5
+ return filters.companyAdmin ? {
6
+ _id: filters.id
7
+ } : {
8
+ _id: filters.id, $or: [
9
+ { contributors: filters.userId },
10
+ { ownerId: filters.userId },
11
+ ]
12
+ };
13
+ };
14
+ exports.getCOFiltersByCompanyAdmin = getCOFiltersByCompanyAdmin;
15
+ const getCVOFiltersByCompanyAdmin = (filters) => {
16
+ return filters.companyAdmin ? {
17
+ _id: filters.id
18
+ } : {
19
+ _id: filters.id, $or: [
20
+ { contributors: filters.userId },
21
+ { viewers: filters.userId },
22
+ { ownerId: filters.userId },
23
+ ]
24
+ };
25
+ };
26
+ exports.getCVOFiltersByCompanyAdmin = getCVOFiltersByCompanyAdmin;
@@ -1 +1,2 @@
1
1
  export * from './getFutureDaysByAddingDays';
2
+ export * from './getCVOFiltersByCompanyAdmin';
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./getFutureDaysByAddingDays"), exports);
18
+ __exportStar(require("./getCVOFiltersByCompanyAdmin"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@otters.ai/common-backend",
3
- "version": "1.0.69",
3
+ "version": "1.0.71",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",