@rentcheck/biz 1.0.236 → 1.0.237

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.
Files changed (58) hide show
  1. package/dist/constants/index.js +17 -7
  2. package/dist/errors/index.js +17 -7
  3. package/dist/errors/inspections.d.ts +3 -0
  4. package/dist/errors/inspections.js +7 -1
  5. package/dist/index.js +17 -7
  6. package/dist/permissions/account-settings/index.js +17 -7
  7. package/dist/permissions/account-settings/inspection-reports.js +17 -7
  8. package/dist/permissions/account-settings/maintenance-settings.js +17 -7
  9. package/dist/permissions/index.js +17 -7
  10. package/dist/permissions/inspections.d.ts +1 -6
  11. package/dist/permissions/inspections.js +18 -12
  12. package/dist/permissions/integrations/appfolio.js +17 -7
  13. package/dist/permissions/integrations/index.js +17 -7
  14. package/dist/permissions/integrations/latchel.js +17 -7
  15. package/dist/permissions/integrations/rent-manager.js +17 -7
  16. package/dist/permissions/integrations/rentcheck-api.js +17 -7
  17. package/dist/permissions/integrations/rentvine.js +17 -7
  18. package/dist/permissions/integrations/zapier.js +17 -7
  19. package/dist/rules/features/index.d.ts +1 -1
  20. package/dist/rules/features/index.js +22 -12
  21. package/dist/rules/index.js +17 -7
  22. package/dist/rules/inspections/index.d.ts +9 -8
  23. package/dist/rules/inspections/index.js +17 -7
  24. package/dist/rules/properties/index.d.ts +6 -6
  25. package/dist/rules/sections/index.d.ts +1 -1
  26. package/dist/rules/work-orders/index.d.ts +1 -1
  27. package/dist/utils/file-requests/index.d.ts +1 -1
  28. package/dist/utils/filters/index.d.ts +1 -1
  29. package/dist/utils/filters/index.js +17 -7
  30. package/dist/utils/imports/index.d.ts +1 -1
  31. package/dist/utils/index.d.ts +0 -1
  32. package/dist/utils/index.js +18 -9
  33. package/dist/utils/inspection-features/sorting.d.ts +1 -1
  34. package/dist/utils/inspection-features/sorting.js +17 -7
  35. package/dist/utils/inspection-templates/build-template-features.js +18 -8
  36. package/dist/utils/inspection-templates/common.js +17 -7
  37. package/dist/utils/inspection-templates/template-logic.d.ts +2 -2
  38. package/dist/utils/inspection-templates/template-logic.js +17 -7
  39. package/dist/utils/inspections/index.d.ts +1 -0
  40. package/dist/utils/inspections/index.js +6 -1
  41. package/dist/utils/integrations/index.d.ts +1 -1
  42. package/dist/utils/properties/index.d.ts +1 -1
  43. package/dist/utils/sections/index.d.ts +0 -2
  44. package/dist/utils/sections/index.js +18 -14
  45. package/dist/utils/subscriptions/index.d.ts +2 -2
  46. package/dist/utils/users/index.js +4 -4
  47. package/package.json +2 -2
  48. package/src/errors/inspections.ts +6 -0
  49. package/src/permissions/inspections.ts +0 -11
  50. package/src/rules/features/index.ts +3 -3
  51. package/src/rules/inspections/index.ts +23 -12
  52. package/src/utils/index.ts +0 -1
  53. package/src/utils/inspections/index.ts +7 -0
  54. package/src/utils/sections/index.ts +0 -12
  55. package/tsconfig.tsbuildinfo +1 -1
  56. package/dist/utils/address/index.d.ts +0 -13
  57. package/dist/utils/address/index.js +0 -16
  58. package/src/utils/address/index.ts +0 -32
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
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
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  exports.SyncInfo = exports.UserSettings = exports.Skills = exports.Rooms = exports.Plans = exports.NotificationPreferences = exports.Emails = exports.Addons = void 0;
27
37
  exports.Addons = __importStar(require("./addons"));
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
18
18
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
19
19
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
20
20
  };
21
- var __importStar = (this && this.__importStar) || function (mod) {
22
- if (mod && mod.__esModule) return mod;
23
- var result = {};
24
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
- __setModuleDefault(result, mod);
26
- return result;
27
- };
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
28
38
  Object.defineProperty(exports, "__esModule", { value: true });
29
39
  exports.Zapier = exports.WorkOrders = exports.Vitally = exports.Validations = exports.TeamInvites = exports.TakeOverRequests = exports.Syncs = exports.Subscriptions = exports.Propexo = exports.Properties = exports.PermissionGroups = exports.Integrations = exports.Inspections = exports.InspectionTemplates = exports.InspectionInvites = exports.Imports = exports.Automations = exports.AppFolio = exports.Admin = exports.RentCheckException = void 0;
30
40
  class RentCheckException extends Error {
@@ -33,6 +33,9 @@ export declare class InvalidAssignmentTypeForReviewRequest extends BadRequest {
33
33
  export declare class InvalidInspectionStatusForCancelReview extends BadRequest {
34
34
  constructor();
35
35
  }
36
+ export declare class InvalidInspectionStatusForCancelRevision extends BadRequest {
37
+ constructor();
38
+ }
36
39
  export declare class InvalidAreaForProperty extends BadRequest {
37
40
  constructor(area: string);
38
41
  }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UnableToUndoInitialReview = exports.UnableToCompleteInitialReview = exports.InvalidAreaNameNoOrdinal = exports.InvalidFastTrackInspectionType = exports.InvalidInspectionStatusForInvite = exports.InviteDateWithSelfPerform = exports.InvalidInviteDateAfterDueDate = exports.InvalidSelectedFeaturesOnInspectionTemplate = exports.NoRecipients = exports.InvalidInspectionTypeFromPropertyType = exports.InvalidAreaForProperty = exports.InvalidInspectionStatusForCancelReview = exports.InvalidAssignmentTypeForReviewRequest = exports.InvalidAssignmentTypeForCancelReview = exports.InvalidInspectionStatusForReviewRequest = exports.InvalidCompletedInspectionField = exports.InvalidTemplateForSubscription = exports.MissingRooms = exports.MissingFeatures = exports.NoneInProgressInspections = exports.XIdAlreadyExists = exports.NoResidents = void 0;
3
+ exports.UnableToUndoInitialReview = exports.UnableToCompleteInitialReview = exports.InvalidAreaNameNoOrdinal = exports.InvalidFastTrackInspectionType = exports.InvalidInspectionStatusForInvite = exports.InviteDateWithSelfPerform = exports.InvalidInviteDateAfterDueDate = exports.InvalidSelectedFeaturesOnInspectionTemplate = exports.NoRecipients = exports.InvalidInspectionTypeFromPropertyType = exports.InvalidAreaForProperty = exports.InvalidInspectionStatusForCancelRevision = exports.InvalidInspectionStatusForCancelReview = exports.InvalidAssignmentTypeForReviewRequest = exports.InvalidAssignmentTypeForCancelReview = exports.InvalidInspectionStatusForReviewRequest = exports.InvalidCompletedInspectionField = exports.InvalidTemplateForSubscription = exports.MissingRooms = exports.MissingFeatures = exports.NoneInProgressInspections = exports.XIdAlreadyExists = exports.NoResidents = void 0;
4
4
  const http_1 = require("./http");
5
5
  class NoResidents extends http_1.BadRequest {
6
6
  constructor(type) {
@@ -68,6 +68,12 @@ class InvalidInspectionStatusForCancelReview extends http_1.BadRequest {
68
68
  }
69
69
  }
70
70
  exports.InvalidInspectionStatusForCancelReview = InvalidInspectionStatusForCancelReview;
71
+ class InvalidInspectionStatusForCancelRevision extends http_1.BadRequest {
72
+ constructor() {
73
+ super('inspection status does not support cancelling revision request');
74
+ }
75
+ }
76
+ exports.InvalidInspectionStatusForCancelRevision = InvalidInspectionStatusForCancelRevision;
71
77
  class InvalidAreaForProperty extends http_1.BadRequest {
72
78
  constructor(area) {
73
79
  super(`invalid area "${area}" for property`);
package/dist/index.js CHANGED
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
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
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  exports.Utils = exports.Rules = exports.Permissions = exports.Errors = exports.Constants = void 0;
27
37
  exports.Constants = __importStar(require("./constants"));
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
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
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  exports.MaintenanceSettings = exports.InspectionReports = void 0;
27
37
  exports.InspectionReports = __importStar(require("./inspection-reports"));
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
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
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  exports.canEdit = void 0;
27
37
  const Utils = __importStar(require("../../utils"));
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
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
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  exports.canEdit = void 0;
27
37
  const Utils = __importStar(require("../../utils"));
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
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
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  exports.Integrations = exports.Inspections = exports.AccountSettings = void 0;
27
37
  exports.AccountSettings = __importStar(require("./account-settings"));
@@ -1,4 +1,4 @@
1
- import { AccountSettings, ApiInspection, ApiSubscription, ApiUser, Inspection, InspectionEdit, PermissionGroup, Profile } from '@rentcheck/types';
1
+ import { AccountSettings, ApiSubscription, Inspection, InspectionEdit, PermissionGroup, Profile } from '@rentcheck/types';
2
2
  export declare const canRecordVideo: (subscription?: ApiSubscription | null) => boolean;
3
3
  export declare const canTake360Photos: (subscription?: ApiSubscription | null) => boolean;
4
4
  export declare const canRenterReportMaintenance: (accountSettings?: AccountSettings | null, subscription?: ApiSubscription | null) => boolean;
@@ -23,9 +23,4 @@ type CanEditParams = {
23
23
  changeset: InspectionEdit;
24
24
  };
25
25
  export declare const canEdit: ({ changeset }: CanEditParams) => RulesResult;
26
- type CanCreateFlagsParams = {
27
- inspection: ApiInspection;
28
- user: ApiUser;
29
- };
30
- export declare const canCreateFlags: ({ user }: CanCreateFlagsParams) => boolean;
31
26
  export {};
@@ -15,15 +15,25 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
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
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.canCreateFlags = exports.canEdit = exports.canSign = exports.canSubmit = exports.canAccess = exports.areFlagDefaultPhotosEnabled = exports.canRenterReportMaintenance = exports.canTake360Photos = exports.canRecordVideo = void 0;
36
+ exports.canEdit = exports.canSign = exports.canSubmit = exports.canAccess = exports.areFlagDefaultPhotosEnabled = exports.canRenterReportMaintenance = exports.canTake360Photos = exports.canRecordVideo = void 0;
27
37
  const Utils = __importStar(require("../utils"));
28
38
  const canRecordVideo = (subscription) => {
29
39
  if (!subscription) {
@@ -134,7 +144,3 @@ const canEdit = ({ changeset }) => {
134
144
  return { value: true };
135
145
  };
136
146
  exports.canEdit = canEdit;
137
- const canCreateFlags = ({ user }) => {
138
- return !Utils.Users.isRenter(user);
139
- };
140
- exports.canCreateFlags = canCreateFlags;
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
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
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  exports.canInstall = void 0;
27
37
  const __1 = require("../..");
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
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
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  exports.Zapier = exports.Rentvine = exports.RentCheckApi = exports.RentManager = exports.Latchel = exports.AppFolio = void 0;
27
37
  exports.AppFolio = __importStar(require("./appfolio"));
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
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
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  exports.canInstall = void 0;
27
37
  const __1 = require("../..");
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
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
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  exports.canInstall = void 0;
27
37
  const __1 = require("../..");
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
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
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  exports.canAccess = void 0;
27
37
  const Utils = __importStar(require("../../utils"));
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
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
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  exports.canInstall = void 0;
27
37
  const Utils = __importStar(require("../../utils"));
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
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
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  exports.canAccess = void 0;
27
37
  const __1 = require("../..");
@@ -1,4 +1,4 @@
1
1
  import { ApiInspectionWithTemplate, Feature } from '@rentcheck/types';
2
- export declare const anAnswerRequiresMedia: (feature: Feature) => boolean;
2
+ export declare const anAnswerRequiresPhoto: (feature: Feature) => boolean;
3
3
  export declare const noteIsRequired: (feature: Feature, inspection?: ApiInspectionWithTemplate) => boolean;
4
4
  export declare const canRotateImage: (image: string) => boolean;
@@ -15,33 +15,43 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
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
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
37
  };
28
38
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.canRotateImage = exports.noteIsRequired = exports.anAnswerRequiresMedia = void 0;
39
+ exports.canRotateImage = exports.noteIsRequired = exports.anAnswerRequiresPhoto = void 0;
30
40
  const lodash_1 = __importDefault(require("lodash"));
31
41
  const types_1 = require("@rentcheck/types");
32
42
  const Utils = __importStar(require("../../utils"));
33
- const anAnswerRequiresMedia = (feature) => {
43
+ const anAnswerRequiresPhoto = (feature) => {
34
44
  return feature.questions.some((q, idx) => {
35
45
  var _a, _b, _c;
36
46
  const responsesForQuestion = (_b = (_a = feature.responses[idx]) === null || _a === void 0 ? void 0 : _a.split(types_1.MULTIPLE_CHOICE_RESPONSE_SEPARATOR)) !== null && _b !== void 0 ? _b : '';
37
- const answersThatRequireMedia = (_c = q.answers) === null || _c === void 0 ? void 0 : _c.filter((a) => a.requires_photo).map((a) => a.title);
38
- if (lodash_1.default.intersection(responsesForQuestion, answersThatRequireMedia).length === 0) {
47
+ const answersThatRequireNotes = (_c = q.answers) === null || _c === void 0 ? void 0 : _c.filter((a) => a.requires_photo).map((a) => a.title);
48
+ if (lodash_1.default.intersection(responsesForQuestion, answersThatRequireNotes).length === 0) {
39
49
  return false;
40
50
  }
41
51
  return true;
42
52
  });
43
53
  };
44
- exports.anAnswerRequiresMedia = anAnswerRequiresMedia;
54
+ exports.anAnswerRequiresPhoto = anAnswerRequiresPhoto;
45
55
  const anAnswerRequiresNote = (feature) => {
46
56
  return feature.questions.some((q, idx) => {
47
57
  var _a, _b, _c;