@rentcheck/biz 1.0.230 → 1.0.232
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/emails.d.ts +2 -0
- package/dist/constants/index.d.ts +8 -0
- package/dist/constants/notification-preferences.d.ts +2 -0
- package/dist/constants/plans.d.ts +2 -0
- package/dist/constants/rooms.d.ts +16 -0
- package/dist/constants/skills.d.ts +2 -0
- package/dist/constants/sync-info.d.ts +1 -0
- package/dist/constants/user-settings.d.ts +2 -0
- package/dist/errors/admin.d.ts +10 -0
- package/dist/errors/appfolio.d.ts +4 -0
- package/dist/errors/automations.d.ts +13 -0
- package/dist/errors/http.d.ts +28 -0
- package/dist/errors/imports.d.ts +13 -0
- package/dist/errors/index.d.ts +27 -0
- package/dist/errors/inspection-invites.d.ts +4 -0
- package/dist/errors/inspection-templates.d.ts +10 -0
- package/dist/errors/inspections.d.ts +68 -0
- package/dist/errors/integrations.d.ts +10 -0
- package/dist/errors/permission-groups.d.ts +4 -0
- package/dist/errors/properties.d.ts +7 -0
- package/dist/errors/propexo.d.ts +20 -0
- package/dist/errors/subscriptions.d.ts +4 -0
- package/dist/errors/syncs.d.ts +16 -0
- package/dist/errors/take-over-requests.d.ts +7 -0
- package/dist/errors/team-invites.d.ts +4 -0
- package/dist/errors/validations.d.ts +19 -0
- package/dist/errors/vitally.d.ts +10 -0
- package/dist/errors/work-orders.d.ts +7 -0
- package/dist/errors/zapier.d.ts +7 -0
- package/dist/index.d.ts +5 -0
- package/dist/permissions/account-settings/index.d.ts +2 -0
- package/dist/permissions/account-settings/inspection-reports.d.ts +2 -0
- package/dist/permissions/account-settings/maintenance-settings.d.ts +2 -0
- package/dist/permissions/index.d.ts +3 -0
- package/dist/permissions/inspections.d.ts +26 -0
- package/dist/permissions/integrations/appfolio.d.ts +2 -0
- package/dist/permissions/integrations/index.d.ts +6 -0
- package/dist/permissions/integrations/latchel.d.ts +2 -0
- package/dist/permissions/integrations/rent-manager.d.ts +2 -0
- package/dist/permissions/integrations/rentcheck-api.d.ts +2 -0
- package/dist/permissions/integrations/rentvine.d.ts +2 -0
- package/dist/permissions/integrations/zapier.d.ts +2 -0
- package/dist/rules/account-screen/index.d.ts +2 -0
- package/dist/rules/application-settings/index.d.ts +8 -0
- package/dist/rules/automations/index.d.ts +9 -0
- package/dist/rules/billing/index.d.ts +8 -0
- package/dist/rules/common/index.d.ts +5 -0
- package/dist/rules/features/index.d.ts +4 -0
- package/dist/rules/index.d.ts +15 -0
- package/dist/rules/inspections/index.d.ts +54 -0
- package/dist/rules/notification-preferences/index.d.ts +7 -0
- package/dist/rules/permission-groups/index.d.ts +5 -0
- package/dist/rules/properties/index.d.ts +1 -1
- package/dist/rules/residents/index.d.ts +11 -0
- package/dist/rules/sections/index.d.ts +2 -0
- package/dist/rules/subscriptions/index.d.ts +2 -0
- package/dist/rules/teammates/index.d.ts +7 -0
- package/dist/rules/users/index.d.ts +31 -0
- package/dist/rules/work-orders/index.d.ts +16 -0
- package/dist/utils/address/index.d.ts +13 -0
- package/dist/utils/address/index.js +16 -0
- package/dist/utils/filters/index.d.ts +8 -0
- package/dist/utils/flags/index.d.ts +2 -0
- package/dist/utils/helpers/index.d.ts +9 -0
- package/dist/utils/index.d.ts +19 -0
- package/dist/utils/inspection-features/index.d.ts +7 -0
- package/dist/utils/inspection-features/sorting.d.ts +1 -1
- package/dist/utils/inspection-templates/common.d.ts +2 -2
- package/dist/utils/inspection-templates/index.d.ts +3 -0
- package/dist/utils/inspection-templates/template-logic.d.ts +1 -1
- package/dist/utils/inspections/index.d.ts +14 -0
- package/dist/utils/integrations/index.d.ts +2 -0
- package/dist/utils/permission-groups/index.d.ts +2 -0
- package/dist/utils/properties/index.d.ts +5 -0
- package/dist/utils/properties/validations.d.ts +1 -1
- package/dist/utils/query-params/index.d.ts +2 -0
- package/dist/utils/subscriptions/index.d.ts +2 -2
- package/dist/utils/tenants/index.d.ts +2 -0
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * as Addons from './addons';
|
|
2
|
+
export * as Emails from './emails';
|
|
3
|
+
export * as NotificationPreferences from './notification-preferences';
|
|
4
|
+
export * as Plans from './plans';
|
|
5
|
+
export * as Rooms from './rooms';
|
|
6
|
+
export * as Skills from './skills';
|
|
7
|
+
export * as UserSettings from './user-settings';
|
|
8
|
+
export * as SyncInfo from './sync-info';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const ordinalPrefixes: string[];
|
|
2
|
+
export declare const unit: {
|
|
3
|
+
main: string[];
|
|
4
|
+
common: string[];
|
|
5
|
+
outside: string[];
|
|
6
|
+
other: string[];
|
|
7
|
+
bedrooms: string[];
|
|
8
|
+
fullBathrooms: string[];
|
|
9
|
+
halfBathrooms: string[];
|
|
10
|
+
};
|
|
11
|
+
export declare const building: {
|
|
12
|
+
default: string[];
|
|
13
|
+
};
|
|
14
|
+
export declare const community: {
|
|
15
|
+
default: string[];
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const propertySyncExpirationDays = 7;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BadRequest } from './http';
|
|
2
|
+
export declare class DocumentWithNoTeam extends BadRequest {
|
|
3
|
+
constructor(collection: 'inspection' | 'property');
|
|
4
|
+
}
|
|
5
|
+
export declare class InspectionWithoutRenter extends BadRequest {
|
|
6
|
+
constructor();
|
|
7
|
+
}
|
|
8
|
+
export declare class InspectionRestore extends BadRequest {
|
|
9
|
+
constructor(reason: string);
|
|
10
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BadRequest, NotFound } from './http';
|
|
2
|
+
export declare class NoTeammateForTeam extends BadRequest {
|
|
3
|
+
constructor();
|
|
4
|
+
}
|
|
5
|
+
export declare class InspectionTemplateNotPublished extends BadRequest {
|
|
6
|
+
constructor();
|
|
7
|
+
}
|
|
8
|
+
export declare class InspectionTemplateDeleted extends NotFound {
|
|
9
|
+
constructor();
|
|
10
|
+
}
|
|
11
|
+
export declare class InspectionTemplateNoFastTrack extends BadRequest {
|
|
12
|
+
constructor();
|
|
13
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { RentCheckException } from '.';
|
|
2
|
+
export declare class BadRequest extends RentCheckException {
|
|
3
|
+
constructor(message: string);
|
|
4
|
+
}
|
|
5
|
+
export declare class Unauthorized extends RentCheckException {
|
|
6
|
+
constructor(message?: string);
|
|
7
|
+
}
|
|
8
|
+
export declare class Forbidden extends RentCheckException {
|
|
9
|
+
constructor(message?: string);
|
|
10
|
+
}
|
|
11
|
+
export declare class NotFound extends RentCheckException {
|
|
12
|
+
constructor(documentName: string, id?: string);
|
|
13
|
+
}
|
|
14
|
+
export declare class MethodNotAllowed extends RentCheckException {
|
|
15
|
+
constructor();
|
|
16
|
+
}
|
|
17
|
+
export declare class Conflict extends RentCheckException {
|
|
18
|
+
constructor(message?: string, resource?: string);
|
|
19
|
+
}
|
|
20
|
+
export declare class InternalServer extends RentCheckException {
|
|
21
|
+
constructor(message?: string);
|
|
22
|
+
}
|
|
23
|
+
export declare class BadGateway extends RentCheckException {
|
|
24
|
+
constructor(message?: string);
|
|
25
|
+
}
|
|
26
|
+
export declare class ServiceUnavailable extends RentCheckException {
|
|
27
|
+
constructor(message?: string);
|
|
28
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BadRequest } from './http';
|
|
2
|
+
export declare class InvalidImportModel extends BadRequest {
|
|
3
|
+
constructor(model?: string);
|
|
4
|
+
}
|
|
5
|
+
export declare class OperationNotSupportedForModel extends BadRequest {
|
|
6
|
+
constructor(operation: string, model: string);
|
|
7
|
+
}
|
|
8
|
+
export declare class InvalidMoveDates extends BadRequest {
|
|
9
|
+
constructor(startDate: string, endDate: string, fullName: string);
|
|
10
|
+
}
|
|
11
|
+
export declare class InvalidLeaseDates extends BadRequest {
|
|
12
|
+
constructor(startDate: string, endDate: string, fullName: string);
|
|
13
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export declare class RentCheckException extends Error {
|
|
2
|
+
/**
|
|
3
|
+
* Status code to return to the client. For example 404 for not found.
|
|
4
|
+
*/
|
|
5
|
+
statusCode: number;
|
|
6
|
+
constructor(message: string, statusCode: number);
|
|
7
|
+
}
|
|
8
|
+
export * from './http';
|
|
9
|
+
export * as Admin from './admin';
|
|
10
|
+
export * as AppFolio from './appfolio';
|
|
11
|
+
export * as Automations from './automations';
|
|
12
|
+
export * as Imports from './imports';
|
|
13
|
+
export * as InspectionInvites from './inspection-invites';
|
|
14
|
+
export * as InspectionTemplates from './inspection-templates';
|
|
15
|
+
export * as Inspections from './inspections';
|
|
16
|
+
export * as Integrations from './integrations';
|
|
17
|
+
export * as PermissionGroups from './permission-groups';
|
|
18
|
+
export * as Properties from './properties';
|
|
19
|
+
export * as Propexo from './propexo';
|
|
20
|
+
export * as Subscriptions from './subscriptions';
|
|
21
|
+
export * as Syncs from './syncs';
|
|
22
|
+
export * as TakeOverRequests from './take-over-requests';
|
|
23
|
+
export * as TeamInvites from './team-invites';
|
|
24
|
+
export * as Validations from './validations';
|
|
25
|
+
export * as Vitally from './vitally';
|
|
26
|
+
export * as WorkOrders from './work-orders';
|
|
27
|
+
export * as Zapier from './zapier';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BadRequest, Forbidden } from './http';
|
|
2
|
+
export declare class InspectionTemplateNotPublished extends Forbidden {
|
|
3
|
+
constructor();
|
|
4
|
+
}
|
|
5
|
+
export declare class InspectionTemplateNotAllowed extends Forbidden {
|
|
6
|
+
constructor();
|
|
7
|
+
}
|
|
8
|
+
export declare class InspectionTemplateHasNoFeatures extends BadRequest {
|
|
9
|
+
constructor();
|
|
10
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { AssignMethod, Occupancy } from '@rentcheck/types';
|
|
2
|
+
import { BadRequest, Conflict } from './http';
|
|
3
|
+
export declare class NoResidents extends BadRequest {
|
|
4
|
+
constructor(type: Occupancy['status']);
|
|
5
|
+
}
|
|
6
|
+
export declare class XIdAlreadyExists extends Conflict {
|
|
7
|
+
constructor(value: string | number);
|
|
8
|
+
}
|
|
9
|
+
export declare class NoneInProgressInspections extends BadRequest {
|
|
10
|
+
constructor();
|
|
11
|
+
}
|
|
12
|
+
export declare class MissingFeatures extends BadRequest {
|
|
13
|
+
constructor(type: string);
|
|
14
|
+
}
|
|
15
|
+
export declare class MissingRooms extends BadRequest {
|
|
16
|
+
constructor(inspectionTemplateName: string);
|
|
17
|
+
}
|
|
18
|
+
export declare class InvalidTemplateForSubscription extends BadRequest {
|
|
19
|
+
constructor(field: string);
|
|
20
|
+
}
|
|
21
|
+
export declare class InvalidCompletedInspectionField extends BadRequest {
|
|
22
|
+
constructor(field: string);
|
|
23
|
+
}
|
|
24
|
+
export declare class InvalidInspectionStatusForReviewRequest extends BadRequest {
|
|
25
|
+
constructor();
|
|
26
|
+
}
|
|
27
|
+
export declare class InvalidAssignmentTypeForCancelReview extends BadRequest {
|
|
28
|
+
constructor();
|
|
29
|
+
}
|
|
30
|
+
export declare class InvalidAssignmentTypeForReviewRequest extends BadRequest {
|
|
31
|
+
constructor();
|
|
32
|
+
}
|
|
33
|
+
export declare class InvalidInspectionStatusForCancelReview extends BadRequest {
|
|
34
|
+
constructor();
|
|
35
|
+
}
|
|
36
|
+
export declare class InvalidAreaForProperty extends BadRequest {
|
|
37
|
+
constructor(area: string);
|
|
38
|
+
}
|
|
39
|
+
export declare class InvalidInspectionTypeFromPropertyType extends BadRequest {
|
|
40
|
+
constructor(propertyType: string, inspectionType: string);
|
|
41
|
+
}
|
|
42
|
+
export declare class NoRecipients extends BadRequest {
|
|
43
|
+
constructor(recipientsType: AssignMethod);
|
|
44
|
+
}
|
|
45
|
+
export declare class InvalidSelectedFeaturesOnInspectionTemplate extends BadRequest {
|
|
46
|
+
constructor();
|
|
47
|
+
}
|
|
48
|
+
export declare class InvalidInviteDateAfterDueDate extends BadRequest {
|
|
49
|
+
constructor();
|
|
50
|
+
}
|
|
51
|
+
export declare class InviteDateWithSelfPerform extends BadRequest {
|
|
52
|
+
constructor();
|
|
53
|
+
}
|
|
54
|
+
export declare class InvalidInspectionStatusForInvite extends BadRequest {
|
|
55
|
+
constructor();
|
|
56
|
+
}
|
|
57
|
+
export declare class InvalidFastTrackInspectionType extends BadRequest {
|
|
58
|
+
constructor();
|
|
59
|
+
}
|
|
60
|
+
export declare class InvalidAreaNameNoOrdinal extends BadRequest {
|
|
61
|
+
constructor(simplifiedAreaName: string);
|
|
62
|
+
}
|
|
63
|
+
export declare class UnableToCompleteInitialReview extends BadRequest {
|
|
64
|
+
constructor();
|
|
65
|
+
}
|
|
66
|
+
export declare class UnableToUndoInitialReview extends BadRequest {
|
|
67
|
+
constructor();
|
|
68
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BadRequest } from './http';
|
|
2
|
+
export declare class IntegrationAlreadyExists extends BadRequest {
|
|
3
|
+
constructor();
|
|
4
|
+
}
|
|
5
|
+
export declare class IntegrationAlreadyExistsForSubscription extends BadRequest {
|
|
6
|
+
constructor();
|
|
7
|
+
}
|
|
8
|
+
export declare class InvalidCredentials extends BadRequest {
|
|
9
|
+
constructor();
|
|
10
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { RentmanagerIntegration } from '@rentcheck/types';
|
|
2
|
+
import { RentCheckException } from '.';
|
|
3
|
+
export declare class PropexoSyncError extends RentCheckException {
|
|
4
|
+
name: string;
|
|
5
|
+
}
|
|
6
|
+
export declare class IntegrationNotFound extends PropexoSyncError {
|
|
7
|
+
constructor(id: RentmanagerIntegration['id']);
|
|
8
|
+
}
|
|
9
|
+
export declare class LocationNotEnabled extends PropexoSyncError {
|
|
10
|
+
constructor(id: RentmanagerIntegration['enabled_locations'][number]['id']);
|
|
11
|
+
}
|
|
12
|
+
export declare class LocationNotMapped extends PropexoSyncError {
|
|
13
|
+
constructor(id: RentmanagerIntegration['enabled_locations'][number]['id']);
|
|
14
|
+
}
|
|
15
|
+
export declare class IntegrationWithNoSyncDetails extends PropexoSyncError {
|
|
16
|
+
constructor();
|
|
17
|
+
}
|
|
18
|
+
export declare class IntegrationWithNoTeamMappings extends PropexoSyncError {
|
|
19
|
+
constructor();
|
|
20
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BadRequest } from './http';
|
|
2
|
+
export declare class InspectionAlreadySynced extends BadRequest {
|
|
3
|
+
constructor();
|
|
4
|
+
}
|
|
5
|
+
export declare class InspectionPDFReportNotFound extends BadRequest {
|
|
6
|
+
constructor();
|
|
7
|
+
}
|
|
8
|
+
export declare class PropertyNotFromIntegration extends BadRequest {
|
|
9
|
+
constructor();
|
|
10
|
+
}
|
|
11
|
+
export declare class NotSyncedWithRentManager extends BadRequest {
|
|
12
|
+
constructor(object: string);
|
|
13
|
+
}
|
|
14
|
+
export declare class PropertyNotSyncedWithIntegration extends BadRequest {
|
|
15
|
+
constructor();
|
|
16
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BadRequest, Unauthorized } from './http';
|
|
2
|
+
export declare class BlankField extends BadRequest {
|
|
3
|
+
constructor(field: string);
|
|
4
|
+
}
|
|
5
|
+
export declare class MissingField extends BadRequest {
|
|
6
|
+
constructor(field: string);
|
|
7
|
+
}
|
|
8
|
+
export declare class InvalidValue extends BadRequest {
|
|
9
|
+
constructor(field: string, value?: string | number);
|
|
10
|
+
}
|
|
11
|
+
export declare class MissingPermissions extends Unauthorized {
|
|
12
|
+
constructor(action: 'access' | 'create' | 'update' | 'delete' | 'get', resource: string);
|
|
13
|
+
}
|
|
14
|
+
export declare class UnsupportedValue extends BadRequest {
|
|
15
|
+
constructor(field: string, value?: string | number);
|
|
16
|
+
}
|
|
17
|
+
export declare class NotArray extends BadRequest {
|
|
18
|
+
constructor(field?: string);
|
|
19
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { NotFound } from './http';
|
|
2
|
+
export declare class NoChargebeeId extends NotFound {
|
|
3
|
+
constructor(id: string);
|
|
4
|
+
}
|
|
5
|
+
export declare class NoChargebeeCustomerId extends NotFound {
|
|
6
|
+
constructor(id: string);
|
|
7
|
+
}
|
|
8
|
+
export declare class NoOrganizationsForSubscription extends NotFound {
|
|
9
|
+
constructor(id: string);
|
|
10
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { AccountSettings, ApiSubscription, Inspection, InspectionEdit, PermissionGroup, Profile } 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;
|
|
6
|
+
type CanAccessParams = {
|
|
7
|
+
user: Profile;
|
|
8
|
+
inspection: Inspection;
|
|
9
|
+
permissionGroups: PermissionGroup[];
|
|
10
|
+
};
|
|
11
|
+
export declare const canAccess: ({ user, inspection, permissionGroups, }: CanAccessParams) => boolean;
|
|
12
|
+
type CanSubmitParams = {
|
|
13
|
+
user: Profile;
|
|
14
|
+
inspection: Inspection;
|
|
15
|
+
};
|
|
16
|
+
type RulesResult = {
|
|
17
|
+
value: boolean;
|
|
18
|
+
error?: string;
|
|
19
|
+
};
|
|
20
|
+
export declare const canSubmit: ({ user, inspection, }: CanSubmitParams) => RulesResult;
|
|
21
|
+
export declare const canSign: ({ user, inspection }: CanSubmitParams) => RulesResult;
|
|
22
|
+
type CanEditParams = {
|
|
23
|
+
changeset: InspectionEdit;
|
|
24
|
+
};
|
|
25
|
+
export declare const canEdit: ({ changeset }: CanEditParams) => RulesResult;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Profile } from '@rentcheck/types';
|
|
2
|
+
/**
|
|
3
|
+
* Simply verifies if the user is an internal admin or not.
|
|
4
|
+
*
|
|
5
|
+
* @param caller user trying to access.
|
|
6
|
+
* @returns boolean wether the operation can be fulfilled or not.
|
|
7
|
+
*/
|
|
8
|
+
export declare const canAccess: (caller?: Profile) => boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ApiPermissionGroupDigest, ApiSubscription, ApiUser, PermissionGroup, Profile, Subscription } from '@rentcheck/types';
|
|
2
|
+
type CanEditAutomationParams = {
|
|
3
|
+
user: ApiUser | Profile;
|
|
4
|
+
subscription?: Subscription | ApiSubscription | null;
|
|
5
|
+
permissionGroups?: Pick<PermissionGroup | ApiPermissionGroupDigest, 'id' | 'allow_automation_editing'>[];
|
|
6
|
+
};
|
|
7
|
+
export declare const canEditAutomation: ({ user, subscription, permissionGroups, }: CanEditAutomationParams) => boolean;
|
|
8
|
+
export declare const canCreateAutomation: ({ user, subscription, permissionGroups, }: CanEditAutomationParams) => boolean;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ApiSubscription, ApiUser, PermissionGroup, Profile, Subscription } from '@rentcheck/types';
|
|
2
|
+
type CanEditPlanParams = {
|
|
3
|
+
user: ApiUser | Profile;
|
|
4
|
+
subscription?: Subscription | ApiSubscription | null;
|
|
5
|
+
permissionGroups?: Pick<PermissionGroup, 'id' | 'name' | 'allow_billing_plan_editing'>[];
|
|
6
|
+
};
|
|
7
|
+
export declare const canEditPlan: ({ user, subscription, permissionGroups, }: CanEditPlanParams) => boolean;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ApiInspectionWithTemplate, Feature } from '@rentcheck/types';
|
|
2
|
+
export declare const anAnswerRequiresPhoto: (feature: Feature) => boolean;
|
|
3
|
+
export declare const noteIsRequired: (feature: Feature, inspection?: ApiInspectionWithTemplate) => boolean;
|
|
4
|
+
export declare const canRotateImage: (image: string) => boolean;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * as AccountScreen from './account-screen';
|
|
2
|
+
export * as Billing from './billing';
|
|
3
|
+
export * as Features from './features';
|
|
4
|
+
export * as Inspections from './inspections';
|
|
5
|
+
export * as PermissionGroups from './permission-groups';
|
|
6
|
+
export * as Properties from './properties';
|
|
7
|
+
export * as Residents from './residents';
|
|
8
|
+
export * as Sections from './sections';
|
|
9
|
+
export * as Subscriptions from './subscriptions';
|
|
10
|
+
export * as Teammates from './teammates';
|
|
11
|
+
export * as ApplicationSettings from './application-settings';
|
|
12
|
+
export * as Automations from './automations';
|
|
13
|
+
export * as Users from './users';
|
|
14
|
+
export * as WorkOrders from './work-orders';
|
|
15
|
+
export * as NotificationPreferences from './notification-preferences';
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { APIProperty, AccountSettings, ApiAutomation, ApiInspection, ApiInspectionWithTemplate, Feature, InspectionTemplate, MaintenanceFlag, Profile, Property } from '@rentcheck/types';
|
|
2
|
+
import { UserIsInvitedTeammateParams } from '../../utils/inspections';
|
|
3
|
+
export declare const shouldShowLibraryOption: (inspection?: ApiInspection, profile?: Profile) => boolean;
|
|
4
|
+
export declare const shouldShow360Option: (inspection?: ApiInspection) => boolean;
|
|
5
|
+
export declare const shouldShowVideoOption: (inspection?: ApiInspection, profile?: Profile, feature?: Feature) => boolean;
|
|
6
|
+
export declare const canReview: (inspection: ApiInspection) => boolean;
|
|
7
|
+
export declare const canApprove: (inspection: ApiInspection, ignoreTwoStepReviewRequired?: boolean) => boolean;
|
|
8
|
+
export declare const canCompleteFirstStepReview: (inspection: ApiInspection) => boolean;
|
|
9
|
+
export declare const canUndoFirstStepReview: (inspection: ApiInspection) => boolean;
|
|
10
|
+
export declare const canReject: (inspection: ApiInspection) => boolean;
|
|
11
|
+
export declare const canSetRevisionNotes: (inspection: ApiInspection, feature: Feature) => boolean;
|
|
12
|
+
export declare const canEditLabel: (inspection: Pick<ApiInspection, 'role' | 'assigned_recipients'>) => boolean;
|
|
13
|
+
export declare const canCancelReviewRequest: (inspection: ApiInspection) => boolean;
|
|
14
|
+
export declare const canCancelRevisionRequest: (inspection: ApiInspection) => boolean;
|
|
15
|
+
type CanArchiveParams = UserIsInvitedTeammateParams & Pick<ApiInspection, 'archived'>;
|
|
16
|
+
export declare const canArchive: (inspection: CanArchiveParams) => boolean;
|
|
17
|
+
type CanUnarchiveParams = UserIsInvitedTeammateParams & Pick<ApiInspection, 'archived'>;
|
|
18
|
+
export declare const canUnarchive: (inspection: CanUnarchiveParams) => boolean;
|
|
19
|
+
type CanDeleteParams = UserIsInvitedTeammateParams & Pick<ApiInspection, 'inspection_status'>;
|
|
20
|
+
export declare const canDelete: (inspection: CanDeleteParams) => boolean;
|
|
21
|
+
type CanSendReminderParams = Pick<ApiInspection, 'inspection_status' | 'role'>;
|
|
22
|
+
export declare const canSendReminder: (inspection: CanSendReminderParams) => boolean;
|
|
23
|
+
export declare const canMarkAsComplete: (inspection: ApiInspection) => boolean;
|
|
24
|
+
export declare const canDownloadImages: (inspection: ApiInspection, features: Feature[]) => boolean;
|
|
25
|
+
export declare const canDownloadMaintenanceFlags: (inspection: ApiInspection, features: Feature[]) => boolean;
|
|
26
|
+
export declare const canRequestSignatures: (inspection: ApiInspection) => boolean;
|
|
27
|
+
export declare const canCreateMaintenanceReport: (inspection: ApiInspection, features: Feature[]) => boolean;
|
|
28
|
+
export declare const canShowCompletedDate: (inspection: ApiInspection) => boolean;
|
|
29
|
+
export declare const canShowCompletedBy: (inspection: ApiInspection) => boolean;
|
|
30
|
+
type CanShowDueDateParams = Pick<ApiInspection, 'inspection_status'>;
|
|
31
|
+
export declare const canShowDueDate: (inspection: CanShowDueDateParams) => boolean;
|
|
32
|
+
export declare const canShowAssignee: (inspection: ApiInspection) => boolean;
|
|
33
|
+
export declare const canEditAssignee: (inspection: ApiInspection) => boolean;
|
|
34
|
+
export declare const canShowInviteDate: (inspection: ApiInspection) => boolean;
|
|
35
|
+
export declare const canShowRevisionDueDate: (inspection: ApiInspection) => boolean;
|
|
36
|
+
export declare const canShowReviewDueDate: (inspection: ApiInspection) => boolean;
|
|
37
|
+
export declare const canShowHyperlinkToPropertyPage: (inspection: ApiInspection) => boolean;
|
|
38
|
+
type CanEditDueDateParams = CanShowDueDateParams & Pick<ApiInspection, 'role'>;
|
|
39
|
+
export declare const canEditDueDate: (inspection: CanEditDueDateParams) => boolean;
|
|
40
|
+
export declare const canShare: (inspection: ApiInspection) => boolean;
|
|
41
|
+
export declare const canDownloadReport: (inspection: ApiInspection) => boolean;
|
|
42
|
+
export declare const canCopyInspectionDeeplink: (inspection: Pick<ApiInspection, 'inspection_status'>) => boolean;
|
|
43
|
+
export declare const canManualSync: (inspection: ApiInspectionWithTemplate, property: APIProperty) => boolean;
|
|
44
|
+
export declare const canShowSyncStatus: (inspection: ApiInspectionWithTemplate) => boolean;
|
|
45
|
+
export declare const canShowFlaggedItems: (inspection: ApiInspectionWithTemplate, flags: MaintenanceFlag[]) => boolean;
|
|
46
|
+
export declare const canPerformFeatureActions: (inspection: ApiInspection) => boolean;
|
|
47
|
+
export declare const canMakeUnitEdits: (inspection: Pick<ApiInspection, 'role' | 'inspection_status' | 'assigned_recipients'>) => boolean;
|
|
48
|
+
export declare const canShowViewModeToggle: (inspection: ApiInspection) => boolean;
|
|
49
|
+
export declare const canReOpen: (inspection: ApiInspection) => boolean;
|
|
50
|
+
export declare const inspectionIsInProgress: (inspection: Pick<ApiInspection, 'inspection_status'>) => boolean;
|
|
51
|
+
export declare const canEditFeature: (inspection: ApiInspection, feature: Feature) => boolean;
|
|
52
|
+
export declare const findConflictingAutomation: (template: InspectionTemplate, automations: ApiAutomation[], units: Property[]) => ApiAutomation;
|
|
53
|
+
export declare const canShowAIDamage: (inspection: ApiInspectionWithTemplate, accountSettings?: AccountSettings) => boolean;
|
|
54
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ApiPermissionGroupDigest, ApiUser, PermissionGroup, Profile } from '@rentcheck/types';
|
|
2
|
+
type CanEditNotificationPreferencesParams = {
|
|
3
|
+
user: ApiUser | Profile;
|
|
4
|
+
permissionGroups?: Pick<PermissionGroup | ApiPermissionGroupDigest, 'id' | 'allow_notifications_preferences_editing'>[];
|
|
5
|
+
};
|
|
6
|
+
export declare const canEditNotificationPreferences: ({ user, permissionGroups, }: CanEditNotificationPreferencesParams) => boolean;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ApiUser, Profile } from '@rentcheck/types';
|
|
2
|
+
import { RuleEvaluation } from '../common';
|
|
3
|
+
export declare const canCreate: (user: Profile) => boolean;
|
|
4
|
+
export declare const canDelete: (totalPGs: number, numberToDelete: number, user?: Profile | ApiUser) => RuleEvaluation;
|
|
5
|
+
export declare const canEdit: (user?: Profile | ApiUser) => RuleEvaluation;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApiAppFolioIntegration, ApiRentManagerIntegration, AppFolioIntegration, Property, RentmanagerIntegration, RentvineIntegration, ApiRentvineIntegration, SyncData, BaseIntegration } from '@rentcheck/types';
|
|
1
|
+
import { ApiAppFolioIntegration, ApiRentManagerIntegration, AppFolioIntegration, Profile, Property, RentmanagerIntegration, RentvineIntegration, ApiRentvineIntegration, SyncData, BaseIntegration } from '@rentcheck/types';
|
|
2
2
|
/**
|
|
3
3
|
* Checks if user is an internal admin or its id/organization ids are within the
|
|
4
4
|
* `property.authorized_user_ids`.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ApiAppFolioIntegration, ApiRentManagerIntegration, AppFolioIntegration, RentmanagerIntegration } from '@rentcheck/types';
|
|
2
|
+
/**
|
|
3
|
+
* Checks if the user is enabled to import residents.
|
|
4
|
+
* The user must not have an AppFolio integration or RentManager integrations.
|
|
5
|
+
*
|
|
6
|
+
* @param appfolioIntegration AppFolio Integration for the user's account
|
|
7
|
+
* @param rentmanagerIntegrations RentManager Integrations for the user's account
|
|
8
|
+
* @param loading Optional loading state, if provided the function will return false until it's no longer loading
|
|
9
|
+
* @returns `true` if the user can import residents, `false` otherwise
|
|
10
|
+
*/
|
|
11
|
+
export declare const canImport: (appfolioIntegration?: AppFolioIntegration | ApiAppFolioIntegration | undefined, rentmanagerIntegrations?: RentmanagerIntegration[] | ApiRentManagerIntegration[] | undefined, loading?: boolean) => boolean;
|