@rentcheck/biz 1.0.23 → 1.0.24
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.
- package/dist/constants/addons.d.ts +25 -0
- package/dist/constants/addons.js +46 -0
- package/dist/constants/index.d.ts +2 -1
- package/dist/constants/index.js +3 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -1
- package/dist/permissions/account-settings/index.d.ts +3 -0
- package/dist/permissions/account-settings/index.js +29 -0
- package/dist/permissions/account-settings/inspection-reports.d.ts +2 -0
- package/dist/permissions/account-settings/inspection-reports.js +49 -0
- package/dist/permissions/account-settings/maintenance-settings.d.ts +2 -0
- package/dist/permissions/account-settings/maintenance-settings.js +40 -0
- package/dist/permissions/account-settings/property-configuration.d.ts +2 -0
- package/dist/permissions/account-settings/property-configuration.js +40 -0
- package/dist/permissions/index.d.ts +3 -0
- package/dist/permissions/index.js +29 -0
- package/dist/permissions/inspections.d.ts +5 -0
- package/dist/permissions/inspections.js +63 -0
- package/dist/permissions/integrations/appfolio.d.ts +2 -0
- package/dist/permissions/integrations/appfolio.js +54 -0
- package/dist/permissions/integrations/index.d.ts +5 -0
- package/dist/permissions/integrations/index.js +31 -0
- package/dist/permissions/integrations/latchel.d.ts +2 -0
- package/dist/permissions/integrations/latchel.js +54 -0
- package/dist/permissions/integrations/rent-manager.d.ts +2 -0
- package/dist/permissions/integrations/rent-manager.js +54 -0
- package/dist/permissions/integrations/rentcheck-api.d.ts +2 -0
- package/dist/permissions/integrations/rentcheck-api.js +44 -0
- package/dist/permissions/integrations/zapier.d.ts +2 -0
- package/dist/permissions/integrations/zapier.js +44 -0
- package/dist/rules/features/index.d.ts +2 -0
- package/dist/rules/features/index.js +27 -0
- package/dist/rules/index.d.ts +1 -0
- package/dist/rules/index.js +27 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +3 -1
- package/dist/utils/inspection-features/sorting.js +26 -3
- package/dist/utils/inspection-templates/common.js +25 -2
- package/dist/utils/properties/index.d.ts +1 -0
- package/dist/utils/properties/index.js +17 -0
- package/dist/utils/properties/validations.d.ts +2 -0
- package/dist/utils/properties/validations.js +11 -0
- package/dist/utils/subscriptions/index.d.ts +4 -0
- package/dist/utils/subscriptions/index.js +23 -0
- package/package.json +1 -1
- package/src/constants/addons.ts +53 -0
- package/src/constants/index.ts +2 -1
- package/src/index.ts +2 -0
- package/src/permissions/account-settings/index.ts +3 -0
- package/src/permissions/account-settings/inspection-reports.ts +31 -0
- package/src/permissions/account-settings/maintenance-settings.ts +17 -0
- package/src/permissions/account-settings/property-configuration.ts +17 -0
- package/src/permissions/index.ts +3 -0
- package/src/permissions/inspections.ts +49 -0
- package/src/permissions/integrations/appfolio.ts +37 -0
- package/src/permissions/integrations/index.ts +5 -0
- package/src/permissions/integrations/latchel.ts +37 -0
- package/src/permissions/integrations/rent-manager.ts +37 -0
- package/src/permissions/integrations/rentcheck-api.ts +21 -0
- package/src/permissions/integrations/zapier.ts +21 -0
- package/src/rules/features/index.ts +41 -0
- package/src/rules/index.ts +1 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/inspection-features/sorting.ts +3 -3
- package/src/utils/inspection-templates/common.ts +2 -2
- package/src/utils/properties/index.ts +1 -0
- package/src/utils/properties/validations.ts +11 -0
- package/src/utils/subscriptions/index.ts +27 -0
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base AppFolio addons here plus we add support for 2 more
|
|
3
|
+
* in order to support Atlas' billing setup
|
|
4
|
+
*/
|
|
5
|
+
export declare const appFolioAddonIds: string[];
|
|
6
|
+
export declare const appFolioWorkOrderAddonIds: string[];
|
|
7
|
+
/**
|
|
8
|
+
* Latchel Addon Ids
|
|
9
|
+
*/
|
|
10
|
+
export declare const latchelWorkOrderAddonIds: string[];
|
|
11
|
+
/**
|
|
12
|
+
* Jenark (365) Addon Ids
|
|
13
|
+
*/
|
|
14
|
+
export declare const jenarkWorkOrderAddonIds: string[];
|
|
15
|
+
/**
|
|
16
|
+
* Rent Manager Addon Ids
|
|
17
|
+
*/
|
|
18
|
+
export declare const rentManagerAddonIds: string[];
|
|
19
|
+
export declare const rentManagerWorkOrderAddonIds: string[];
|
|
20
|
+
/**
|
|
21
|
+
* Inspection Template Addon Ids
|
|
22
|
+
*/
|
|
23
|
+
export declare const inspectionTemplatePerUnitAddonId = "inspection-template-customization-2";
|
|
24
|
+
export declare const inspectionTemplateFreeTrialAddonId = "inspection-template-customization-free-trial";
|
|
25
|
+
export declare const inspectionTemplateAddonIds: string[];
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.inspectionTemplateAddonIds = exports.inspectionTemplateFreeTrialAddonId = exports.inspectionTemplatePerUnitAddonId = exports.rentManagerWorkOrderAddonIds = exports.rentManagerAddonIds = exports.jenarkWorkOrderAddonIds = exports.latchelWorkOrderAddonIds = exports.appFolioWorkOrderAddonIds = exports.appFolioAddonIds = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Base AppFolio addons here plus we add support for 2 more
|
|
6
|
+
* in order to support Atlas' billing setup
|
|
7
|
+
*/
|
|
8
|
+
exports.appFolioAddonIds = [
|
|
9
|
+
'appfolio-integration---two-way-data-sync',
|
|
10
|
+
'appfolio-data-sync-plus-workorders',
|
|
11
|
+
'atlas-appfolio-integration---two-way-data-sync',
|
|
12
|
+
'atlas-appfolio-data-sync-plus-workorders',
|
|
13
|
+
];
|
|
14
|
+
exports.appFolioWorkOrderAddonIds = [
|
|
15
|
+
'appfolio-data-sync-plus-workorders',
|
|
16
|
+
'atlas-appfolio-data-sync-plus-workorders',
|
|
17
|
+
];
|
|
18
|
+
/**
|
|
19
|
+
* Latchel Addon Ids
|
|
20
|
+
*/
|
|
21
|
+
exports.latchelWorkOrderAddonIds = ['latchel-integration'];
|
|
22
|
+
/**
|
|
23
|
+
* Jenark (365) Addon Ids
|
|
24
|
+
*/
|
|
25
|
+
exports.jenarkWorkOrderAddonIds = ['jenark-integration'];
|
|
26
|
+
/**
|
|
27
|
+
* Rent Manager Addon Ids
|
|
28
|
+
*/
|
|
29
|
+
exports.rentManagerAddonIds = [
|
|
30
|
+
'rm-integration---two-way-data-sync',
|
|
31
|
+
'rentmanager-integration---two-way-data-sync',
|
|
32
|
+
];
|
|
33
|
+
exports.rentManagerWorkOrderAddonIds = [
|
|
34
|
+
'rm-integration---work-orders',
|
|
35
|
+
'rentmanager-integration---work-orders',
|
|
36
|
+
];
|
|
37
|
+
/**
|
|
38
|
+
* Inspection Template Addon Ids
|
|
39
|
+
*/
|
|
40
|
+
exports.inspectionTemplatePerUnitAddonId = 'inspection-template-customization-2';
|
|
41
|
+
exports.inspectionTemplateFreeTrialAddonId = 'inspection-template-customization-free-trial';
|
|
42
|
+
exports.inspectionTemplateAddonIds = [
|
|
43
|
+
'inspection-template-customization',
|
|
44
|
+
exports.inspectionTemplateFreeTrialAddonId,
|
|
45
|
+
exports.inspectionTemplatePerUnitAddonId,
|
|
46
|
+
];
|
package/dist/constants/index.js
CHANGED
|
@@ -23,6 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.Skills = exports.
|
|
27
|
-
exports.
|
|
26
|
+
exports.Skills = exports.Rooms = exports.Addons = void 0;
|
|
27
|
+
exports.Addons = __importStar(require("./addons"));
|
|
28
|
+
exports.Rooms = __importStar(require("./rooms"));
|
|
28
29
|
exports.Skills = __importStar(require("./skills"));
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -23,6 +23,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.Utils = exports.Constants = void 0;
|
|
26
|
+
exports.Rules = exports.Utils = exports.Permissions = exports.Constants = void 0;
|
|
27
27
|
exports.Constants = __importStar(require("./constants"));
|
|
28
|
+
exports.Permissions = __importStar(require("./permissions"));
|
|
28
29
|
exports.Utils = __importStar(require("./utils"));
|
|
30
|
+
exports.Rules = __importStar(require("./rules"));
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.PropertyConfiguration = exports.MaintenanceSettings = exports.InspectionReports = void 0;
|
|
27
|
+
exports.InspectionReports = __importStar(require("./inspection-reports"));
|
|
28
|
+
exports.MaintenanceSettings = __importStar(require("./maintenance-settings"));
|
|
29
|
+
exports.PropertyConfiguration = __importStar(require("./property-configuration"));
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.canEdit = void 0;
|
|
27
|
+
const Utils = __importStar(require("../../utils"));
|
|
28
|
+
const canEdit = (profile, subscription) => {
|
|
29
|
+
if (!subscription) {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
if (!profile) {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* User must be an admin of at least one team they belong to
|
|
37
|
+
*/
|
|
38
|
+
if (!profile.organizations.some((o) => o.role === 'admin')) {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* User must be on a plan that is not the essentials plan
|
|
43
|
+
*/
|
|
44
|
+
if (Utils.Subscriptions.isOnEssentialsPlan(subscription)) {
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
return true;
|
|
48
|
+
};
|
|
49
|
+
exports.canEdit = canEdit;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.canEdit = void 0;
|
|
27
|
+
const Utils = __importStar(require("../../utils"));
|
|
28
|
+
const canEdit = (subscription) => {
|
|
29
|
+
if (!subscription) {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* User must be on a plan that is not the essentials plan
|
|
34
|
+
*/
|
|
35
|
+
if (Utils.Subscriptions.isOnEssentialsPlan(subscription)) {
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
return true;
|
|
39
|
+
};
|
|
40
|
+
exports.canEdit = canEdit;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.canEdit = void 0;
|
|
27
|
+
const Utils = __importStar(require("../../utils"));
|
|
28
|
+
const canEdit = (subscription) => {
|
|
29
|
+
if (!subscription) {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* User must be on a plan that is not the essentials plan
|
|
34
|
+
*/
|
|
35
|
+
if (Utils.Subscriptions.isOnEssentialsPlan(subscription)) {
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
return true;
|
|
39
|
+
};
|
|
40
|
+
exports.canEdit = canEdit;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.Integrations = exports.Inspections = exports.AccountSettings = void 0;
|
|
27
|
+
exports.AccountSettings = __importStar(require("./account-settings"));
|
|
28
|
+
exports.Inspections = __importStar(require("./inspections"));
|
|
29
|
+
exports.Integrations = __importStar(require("./integrations"));
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { AccountSettings, ApiSubscription } from '@rentcheck/types';
|
|
2
|
+
export declare const canRecordVideo: (subscription?: ApiSubscription | null) => boolean;
|
|
3
|
+
export declare const canTake360Photos: (subscription?: ApiSubscription | null) => boolean;
|
|
4
|
+
export declare const canRenterReportMaintenance: (accountSettings?: AccountSettings | null, subscription?: ApiSubscription | null) => boolean;
|
|
5
|
+
export declare const areFlagDefaultPhotosEnabled: (accountSettings?: AccountSettings | null) => boolean;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.areFlagDefaultPhotosEnabled = exports.canRenterReportMaintenance = exports.canTake360Photos = exports.canRecordVideo = void 0;
|
|
27
|
+
const Utils = __importStar(require("../utils"));
|
|
28
|
+
const canRecordVideo = (subscription) => {
|
|
29
|
+
if (!subscription) {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
if (Utils.Subscriptions.isOnEssentialsPlan(subscription)) {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
return true;
|
|
36
|
+
};
|
|
37
|
+
exports.canRecordVideo = canRecordVideo;
|
|
38
|
+
const canTake360Photos = (subscription) => {
|
|
39
|
+
if (!subscription) {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
if (Utils.Subscriptions.isOnEssentialsPlan(subscription)) {
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
return true;
|
|
46
|
+
};
|
|
47
|
+
exports.canTake360Photos = canTake360Photos;
|
|
48
|
+
const canRenterReportMaintenance = (accountSettings, subscription) => {
|
|
49
|
+
if (!subscription) {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
if (Utils.Subscriptions.isOnEssentialsPlan(subscription)) {
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
return accountSettings === null || accountSettings === void 0 ? void 0 : accountSettings.is_resident_reported_maintenance_enabled;
|
|
56
|
+
};
|
|
57
|
+
exports.canRenterReportMaintenance = canRenterReportMaintenance;
|
|
58
|
+
const areFlagDefaultPhotosEnabled = (accountSettings) => {
|
|
59
|
+
if (!accountSettings)
|
|
60
|
+
return false;
|
|
61
|
+
return accountSettings.is_maintenance_flag_default_photos_enabled;
|
|
62
|
+
};
|
|
63
|
+
exports.areFlagDefaultPhotosEnabled = areFlagDefaultPhotosEnabled;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.canInstall = void 0;
|
|
27
|
+
const __1 = require("../..");
|
|
28
|
+
const Utils = __importStar(require("../../utils"));
|
|
29
|
+
const canInstall = (subscription) => {
|
|
30
|
+
if (!subscription) {
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* User must be on a plan that is not the essentials plan
|
|
35
|
+
*/
|
|
36
|
+
if (Utils.Subscriptions.isOnEssentialsPlan(subscription)) {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* If user is part of the Professional plan then they can install any addon
|
|
41
|
+
*/
|
|
42
|
+
if (Utils.Subscriptions.isOnProPlan(subscription)) {
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* If user in on a legacy plan but has the AppFolio addon then they can install the
|
|
47
|
+
* integration
|
|
48
|
+
*/
|
|
49
|
+
if (subscription.addons.some((addon) => __1.Constants.Addons.appFolioAddonIds.includes(addon.id))) {
|
|
50
|
+
return true;
|
|
51
|
+
}
|
|
52
|
+
return false;
|
|
53
|
+
};
|
|
54
|
+
exports.canInstall = canInstall;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.Zapier = exports.RentCheckApi = exports.RentManager = exports.Latchel = exports.AppFolio = void 0;
|
|
27
|
+
exports.AppFolio = __importStar(require("./appfolio"));
|
|
28
|
+
exports.Latchel = __importStar(require("./latchel"));
|
|
29
|
+
exports.RentManager = __importStar(require("./rent-manager"));
|
|
30
|
+
exports.RentCheckApi = __importStar(require("./rentcheck-api"));
|
|
31
|
+
exports.Zapier = __importStar(require("./zapier"));
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.canInstall = void 0;
|
|
27
|
+
const __1 = require("../..");
|
|
28
|
+
const Utils = __importStar(require("../../utils"));
|
|
29
|
+
const canInstall = (subscription) => {
|
|
30
|
+
if (!subscription) {
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* User must be on a plan that is not the essentials plan
|
|
35
|
+
*/
|
|
36
|
+
if (Utils.Subscriptions.isOnEssentialsPlan(subscription)) {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* If user is part of the Professional plan then they can install any addon
|
|
41
|
+
*/
|
|
42
|
+
if (Utils.Subscriptions.isOnProPlan(subscription)) {
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* If user in on a legacy plan but has the Latchel addon they can install
|
|
47
|
+
* the integration
|
|
48
|
+
*/
|
|
49
|
+
if (subscription.addons.some((addon) => __1.Constants.Addons.latchelWorkOrderAddonIds.includes(addon.id))) {
|
|
50
|
+
return true;
|
|
51
|
+
}
|
|
52
|
+
return false;
|
|
53
|
+
};
|
|
54
|
+
exports.canInstall = canInstall;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.canInstall = void 0;
|
|
27
|
+
const __1 = require("../..");
|
|
28
|
+
const Utils = __importStar(require("../../utils"));
|
|
29
|
+
const canInstall = (subscription) => {
|
|
30
|
+
if (!subscription) {
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* User must be on a plan that is not the essentials plan
|
|
35
|
+
*/
|
|
36
|
+
if (Utils.Subscriptions.isOnEssentialsPlan(subscription)) {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* If user is part of the Professional plan then they can install any addon
|
|
41
|
+
*/
|
|
42
|
+
if (Utils.Subscriptions.isOnProPlan(subscription)) {
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* If user in on a legacy plan but has the Rent Manager addon they
|
|
47
|
+
* can install the integration
|
|
48
|
+
*/
|
|
49
|
+
if (subscription.addons.some((addon) => __1.Constants.Addons.rentManagerAddonIds.includes(addon.id))) {
|
|
50
|
+
return true;
|
|
51
|
+
}
|
|
52
|
+
return false;
|
|
53
|
+
};
|
|
54
|
+
exports.canInstall = canInstall;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.canAccess = void 0;
|
|
27
|
+
const Utils = __importStar(require("../../utils"));
|
|
28
|
+
const canAccess = (subscription) => {
|
|
29
|
+
if (!subscription) {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* User must be on a plan that is not the essentials plan
|
|
34
|
+
*/
|
|
35
|
+
if (Utils.Subscriptions.isOnEssentialsPlan(subscription)) {
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Otherwise anyone with a valid subscription can use
|
|
40
|
+
* the RentCheck API
|
|
41
|
+
*/
|
|
42
|
+
return true;
|
|
43
|
+
};
|
|
44
|
+
exports.canAccess = canAccess;
|