@meetelise/chat 1.35.0 → 1.35.2
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/src/MyPubnub.d.ts +116 -0
- package/dist/src/WebComponent/FeeCalculator/components/addons/addon-item-matrix-qty-selector/addon-item-matrix-qty-selector-styles.d.ts +2 -0
- package/dist/src/WebComponent/FeeCalculator/components/addons/addon-item-matrix-qty-selector/addon-item-matrix-qty-selector.d.ts +28 -0
- package/dist/src/WebComponent/FeeCalculator/components/addons/addon-item-qty-selector/addon-item-qty-selector-styles.d.ts +2 -0
- package/dist/src/WebComponent/FeeCalculator/components/addons/addon-item-qty-selector/addon-item-qty-selector.d.ts +18 -0
- package/dist/src/WebComponent/FeeCalculator/components/addons/common-addon-styles.d.ts +2 -0
- package/dist/src/WebComponent/FeeCalculator/components/addons/rentable-item-qty-selector/rentable-item-qty-selector-styles.d.ts +2 -0
- package/dist/src/WebComponent/FeeCalculator/components/addons/rentable-item-qty-selector/rentable-item-qty-selector.d.ts +22 -0
- package/dist/src/WebComponent/FeeCalculator/components/fee-calculator-layout/fee-calculator-layout-styles.d.ts +2 -0
- package/dist/src/WebComponent/FeeCalculator/components/fee-calculator-layout/fee-calculator-layout.d.ts +46 -0
- package/dist/src/WebComponent/FeeCalculator/components/fee-card/fee-card-styles.d.ts +2 -0
- package/dist/src/WebComponent/FeeCalculator/components/fee-card/fee-card.d.ts +21 -0
- package/dist/src/WebComponent/FeeCalculator/components/fee-item/fee-item-styles.d.ts +2 -0
- package/dist/src/WebComponent/FeeCalculator/components/fee-item/fee-item.d.ts +13 -0
- package/dist/src/WebComponent/FeeCalculator/components/floor-plan-selector/floor-plan-selector-styles.d.ts +2 -0
- package/dist/src/WebComponent/FeeCalculator/components/floor-plan-selector/floor-plan-selector.d.ts +34 -0
- package/dist/src/WebComponent/FeeCalculator/components/floorplan-image-card/floorplan-image-card-styles.d.ts +2 -0
- package/dist/src/WebComponent/FeeCalculator/components/floorplan-image-card/floorplan-image-card.d.ts +18 -0
- package/dist/src/WebComponent/FeeCalculator/components/incentive-banner/incentive-banner-styles.d.ts +1 -0
- package/dist/src/WebComponent/FeeCalculator/components/incentive-banner/incentive-banner.d.ts +8 -0
- package/dist/src/WebComponent/FeeCalculator/components/incentive-banner/index.d.ts +1 -0
- package/dist/src/WebComponent/FeeCalculator/components/index.d.ts +5 -0
- package/dist/src/WebComponent/FeeCalculator/components/promo-card/promo-card-styles.d.ts +2 -0
- package/dist/src/WebComponent/FeeCalculator/components/promo-card/promo-card.d.ts +13 -0
- package/dist/src/WebComponent/FeeCalculator/constants.d.ts +3 -0
- package/dist/src/WebComponent/FeeCalculator/fee-calculator-styles.d.ts +1 -0
- package/dist/src/WebComponent/FeeCalculator/fee-calculator.d.ts +55 -0
- package/dist/src/WebComponent/FeeCalculator/index.d.ts +2 -0
- package/dist/src/WebComponent/FeeCalculator/model/building-fee-view.d.ts +41 -0
- package/dist/src/WebComponent/FeeCalculator/model/building-fee.d.ts +82 -0
- package/dist/src/WebComponent/FeeCalculator/model/desired-addon.d.ts +5 -0
- package/dist/src/WebComponent/FeeCalculator/model/desired-rentable-item.d.ts +4 -0
- package/dist/src/WebComponent/FeeCalculator/model/index.d.ts +13 -0
- package/dist/src/WebComponent/FeeCalculator/model/item-combination.d.ts +6 -0
- package/dist/src/WebComponent/FeeCalculator/model/item-quantity.d.ts +4 -0
- package/dist/src/WebComponent/FeeCalculator/model/pricing-matrix.d.ts +18 -0
- package/dist/src/WebComponent/FeeCalculator/model/pricing-rule.d.ts +8 -0
- package/dist/src/WebComponent/FeeCalculator/model/rent-frequency.d.ts +1 -0
- package/dist/src/WebComponent/FeeCalculator/model/rentable-item-summary.d.ts +13 -0
- package/dist/src/WebComponent/FeeCalculator/model/rentable-item.d.ts +10 -0
- package/dist/src/WebComponent/FeeCalculator/model/transaction-category.d.ts +23 -0
- package/dist/src/WebComponent/FeeCalculator/model/unit-fee-bundle.d.ts +31 -0
- package/dist/src/WebComponent/LeadSourceClient.d.ts +46 -0
- package/dist/src/WebComponent/OfficeHours.d.ts +21 -0
- package/dist/src/WebComponent/Scheduler/date-picker.d.ts +28 -0
- package/dist/src/WebComponent/Scheduler/time-picker.d.ts +16 -0
- package/dist/src/WebComponent/Scheduler/tour-scheduler.d.ts +102 -0
- package/dist/src/WebComponent/Scheduler/tour-type-option.d.ts +13 -0
- package/dist/src/WebComponent/Scheduler/tourSchedulerStyles.d.ts +1 -0
- package/dist/src/WebComponent/actions/InputStyles.d.ts +1 -0
- package/dist/src/WebComponent/actions/action-confirm-button.d.ts +13 -0
- package/dist/src/WebComponent/actions/call-us-window.d.ts +37 -0
- package/dist/src/WebComponent/actions/collapse-expand-button.d.ts +8 -0
- package/dist/src/WebComponent/actions/details-window.d.ts +14 -0
- package/dist/src/WebComponent/actions/email-us-window.d.ts +46 -0
- package/dist/src/WebComponent/actions/formatPhoneNumber.d.ts +17 -0
- package/dist/src/WebComponent/actions/minimize-expand-button.d.ts +8 -0
- package/dist/src/WebComponent/chat-additional-actions.d.ts +28 -0
- package/dist/src/WebComponent/health-chat.d.ts +47 -0
- package/dist/src/WebComponent/healthchat-styles.d.ts +1 -0
- package/dist/src/WebComponent/icons/ApplyOutlineIcon.d.ts +2 -0
- package/dist/src/WebComponent/icons/BookTourOutlineIcon.d.ts +2 -0
- package/dist/src/WebComponent/icons/CalculatorOutlineIcon.d.ts +2 -0
- package/dist/src/WebComponent/icons/ChatOutlineIcon.d.ts +2 -0
- package/dist/src/WebComponent/icons/ChevronLeftIcon.d.ts +2 -0
- package/dist/src/WebComponent/icons/ChevronRightIcon.d.ts +2 -0
- package/dist/src/WebComponent/icons/ContactResidentIcon.d.ts +2 -0
- package/dist/src/WebComponent/icons/DollarOutlineIcon.d.ts +7 -0
- package/dist/src/WebComponent/icons/EmailOutlineIcon.d.ts +2 -0
- package/dist/src/WebComponent/icons/HeyThereEmojiIcon.d.ts +2 -0
- package/dist/src/WebComponent/icons/PhoneOutlineIcon.d.ts +2 -0
- package/dist/src/WebComponent/icons/SendMessageIcon.d.ts +3 -0
- package/dist/src/WebComponent/icons/TourSelfGuidedIcon.d.ts +2 -0
- package/dist/src/WebComponent/icons/TourVirtuallyIcon.d.ts +2 -0
- package/dist/src/WebComponent/icons/TourWithAgentIcon.d.ts +2 -0
- package/dist/src/WebComponent/icons/XOutlineIcon.d.ts +2 -0
- package/dist/src/WebComponent/index.d.ts +2 -0
- package/dist/src/WebComponent/launcher/Launcher.d.ts +99 -0
- package/dist/src/WebComponent/launcher/launcherStyles.d.ts +1 -0
- package/dist/src/WebComponent/launcher/mobile-launcher.d.ts +27 -0
- package/dist/src/WebComponent/launcher/typeEmojiStyles.d.ts +1 -0
- package/dist/src/WebComponent/launcher/typeMiniStyles.d.ts +1 -0
- package/dist/src/WebComponent/launcher/typeMobileStyles.d.ts +1 -0
- package/dist/src/WebComponent/leasing-chat-styles.d.ts +1 -0
- package/dist/src/WebComponent/loaders/index.d.ts +4 -0
- package/dist/src/WebComponent/loaders/mega-loader.d.ts +7 -0
- package/dist/src/WebComponent/loaders/skeleton-card.d.ts +12 -0
- package/dist/src/WebComponent/loaders/skeleton-loader-styles.d.ts +3 -0
- package/dist/src/WebComponent/loaders/skeleton-loader.d.ts +13 -0
- package/dist/src/WebComponent/me-chat.d.ts +91 -0
- package/dist/src/WebComponent/me-select.d.ts +24 -0
- package/dist/src/WebComponent/mini-loader.d.ts +5 -0
- package/dist/src/WebComponent/pubnub-chat-styles.d.ts +1 -0
- package/dist/src/WebComponent/pubnub-chat.d.ts +48 -0
- package/dist/src/WebComponent/pubnub-media.d.ts +14 -0
- package/dist/src/WebComponent/pubnub-message-styles.d.ts +1 -0
- package/dist/src/WebComponent/pubnub-message.d.ts +39 -0
- package/dist/src/WebComponent/simple-launcher/simple-launcher-styles.d.ts +1 -0
- package/dist/src/WebComponent/simple-launcher/simple-launcher.d.ts +12 -0
- package/dist/src/WebComponent/utilities-chat.d.ts +47 -0
- package/dist/src/WebComponent/utilities-styles.d.ts +1 -0
- package/dist/src/WebComponent/utils.d.ts +31 -0
- package/dist/src/analytics.d.ts +64 -0
- package/dist/src/disclaimers.d.ts +16 -0
- package/dist/src/fetchBuildingABTestType.d.ts +8 -0
- package/dist/src/fetchBuildingInfo.d.ts +58 -0
- package/dist/src/fetchBuildingWebchatView.d.ts +124 -0
- package/dist/src/fetchFeatureFlag.d.ts +14 -0
- package/dist/src/fetchLeadSources.d.ts +4 -0
- package/dist/src/fetchPhoneNumberFromSource.d.ts +6 -0
- package/dist/src/getAvailabilities.d.ts +46 -0
- package/dist/src/getBuildingPhoneNumber.d.ts +1 -0
- package/dist/src/getShouldAllowScheduling.d.ts +1 -0
- package/dist/src/getShouldShowWebchat.d.ts +3 -0
- package/dist/src/getTimezoneString.d.ts +1 -0
- package/dist/src/globals.d.ts +2 -0
- package/dist/src/gtm.d.ts +6 -0
- package/dist/src/handleChatId.d.ts +11 -0
- package/dist/src/insertDNIIntoWebsite.d.ts +5 -0
- package/dist/src/insertLeadSourceIntoSchedulerLinks.d.ts +4 -0
- package/dist/src/main/MEChat.d.ts +74 -0
- package/dist/src/main/utils.d.ts +2 -0
- package/dist/src/postLeadSources.d.ts +3 -0
- package/dist/src/rentgrata.d.ts +4 -0
- package/dist/src/replaceSelectButtonsWithNewLink.d.ts +5 -0
- package/dist/src/services/fees/calculateQuote.d.ts +14 -0
- package/dist/src/services/fees/fetchBuildingFeesV2.d.ts +10 -0
- package/dist/src/services/fees/fetchBuildingUnits.d.ts +29 -0
- package/dist/src/services/fees/utils.d.ts +1 -0
- package/dist/src/svgIcons.d.ts +5 -0
- package/dist/src/themes.d.ts +5 -0
- package/dist/src/types/incentive-v2.d.ts +23 -0
- package/dist/src/types/rest-sdk.types.d.ts +11 -0
- package/dist/src/types/webchat-no-show-reason.d.ts +1 -0
- package/dist/src/utils/getWidgetOverrides.d.ts +39 -0
- package/dist/src/utils/queryParamBuilder.d.ts +8 -0
- package/dist/src/utils.d.ts +13 -0
- package/package.json +1 -1
- package/public/dist/index.js +250 -164
- package/src/MyPubnub.ts +792 -0
- package/src/WebComponent/FeeCalculator/components/addons/addon-item-matrix-qty-selector/addon-item-matrix-qty-selector-styles.ts +39 -0
- package/src/WebComponent/FeeCalculator/components/addons/addon-item-matrix-qty-selector/addon-item-matrix-qty-selector.ts +206 -0
- package/src/WebComponent/FeeCalculator/components/addons/addon-item-qty-selector/addon-item-qty-selector-styles.ts +6 -0
- package/src/WebComponent/FeeCalculator/components/addons/addon-item-qty-selector/addon-item-qty-selector.ts +101 -0
- package/src/WebComponent/FeeCalculator/components/addons/common-addon-styles.ts +98 -0
- package/src/WebComponent/FeeCalculator/components/addons/rentable-item-qty-selector/rentable-item-qty-selector-styles.ts +9 -0
- package/src/WebComponent/FeeCalculator/components/addons/rentable-item-qty-selector/rentable-item-qty-selector.ts +136 -0
- package/src/WebComponent/FeeCalculator/components/fee-calculator-layout/fee-calculator-layout-styles.ts +151 -0
- package/src/WebComponent/FeeCalculator/components/fee-calculator-layout/fee-calculator-layout.ts +261 -0
- package/src/WebComponent/FeeCalculator/components/fee-card/fee-card-styles.ts +65 -0
- package/src/WebComponent/FeeCalculator/components/fee-card/fee-card.ts +91 -0
- package/src/WebComponent/FeeCalculator/components/fee-item/fee-item-styles.ts +44 -0
- package/src/WebComponent/FeeCalculator/components/fee-item/fee-item.ts +38 -0
- package/src/WebComponent/FeeCalculator/components/floor-plan-selector/floor-plan-selector-styles.ts +149 -0
- package/src/WebComponent/FeeCalculator/components/floor-plan-selector/floor-plan-selector.ts +247 -0
- package/src/WebComponent/FeeCalculator/components/floorplan-image-card/floorplan-image-card-styles.ts +82 -0
- package/src/WebComponent/FeeCalculator/components/floorplan-image-card/floorplan-image-card.ts +76 -0
- package/src/WebComponent/FeeCalculator/components/incentive-banner/incentive-banner-styles.ts +40 -0
- package/src/WebComponent/FeeCalculator/components/incentive-banner/incentive-banner.ts +43 -0
- package/src/WebComponent/FeeCalculator/components/incentive-banner/index.ts +1 -0
- package/src/WebComponent/FeeCalculator/components/index.ts +5 -0
- package/src/WebComponent/FeeCalculator/components/promo-card/promo-card-styles.ts +39 -0
- package/src/WebComponent/FeeCalculator/components/promo-card/promo-card.ts +39 -0
- package/src/WebComponent/FeeCalculator/constants.ts +5 -0
- package/src/WebComponent/FeeCalculator/fee-calculator-styles.ts +310 -0
- package/src/WebComponent/FeeCalculator/fee-calculator.ts +341 -0
- package/src/WebComponent/FeeCalculator/index.ts +4 -0
- package/src/WebComponent/FeeCalculator/model/building-fee-view.ts +84 -0
- package/src/WebComponent/FeeCalculator/model/building-fee.ts +126 -0
- package/src/WebComponent/FeeCalculator/model/desired-addon.ts +6 -0
- package/src/WebComponent/FeeCalculator/model/desired-rentable-item.ts +4 -0
- package/src/WebComponent/FeeCalculator/model/index.ts +13 -0
- package/src/WebComponent/FeeCalculator/model/item-combination.ts +16 -0
- package/src/WebComponent/FeeCalculator/model/item-quantity.ts +4 -0
- package/src/WebComponent/FeeCalculator/model/pricing-matrix.ts +45 -0
- package/src/WebComponent/FeeCalculator/model/pricing-rule.ts +9 -0
- package/src/WebComponent/FeeCalculator/model/rent-frequency.ts +1 -0
- package/src/WebComponent/FeeCalculator/model/rentable-item-summary.ts +34 -0
- package/src/WebComponent/FeeCalculator/model/rentable-item.ts +21 -0
- package/src/WebComponent/FeeCalculator/model/transaction-category.ts +23 -0
- package/src/WebComponent/FeeCalculator/model/unit-fee-bundle.ts +54 -0
- package/src/WebComponent/LeadSourceClient.ts +332 -0
- package/src/WebComponent/MEChat.css +5 -0
- package/src/WebComponent/OfficeHours.ts +73 -0
- package/src/WebComponent/Scheduler/date-picker.ts +405 -0
- package/src/WebComponent/Scheduler/time-picker.ts +195 -0
- package/src/WebComponent/Scheduler/tour-scheduler.ts +1430 -0
- package/src/WebComponent/Scheduler/tour-type-option.ts +112 -0
- package/src/WebComponent/Scheduler/tourSchedulerStyles.ts +418 -0
- package/src/WebComponent/actions/InputStyles.ts +57 -0
- package/src/WebComponent/actions/action-confirm-button.ts +125 -0
- package/src/WebComponent/actions/call-us-window.ts +467 -0
- package/src/WebComponent/actions/collapse-expand-button.ts +65 -0
- package/src/WebComponent/actions/details-window.ts +150 -0
- package/src/WebComponent/actions/email-us-window.ts +556 -0
- package/src/WebComponent/actions/formatPhoneNumber.ts +72 -0
- package/src/WebComponent/actions/minimize-expand-button.ts +93 -0
- package/src/WebComponent/chat-additional-actions.ts +135 -0
- package/src/WebComponent/health-chat.ts +270 -0
- package/src/WebComponent/healthchat-styles.ts +119 -0
- package/src/WebComponent/icons/ApplyOutlineIcon.ts +22 -0
- package/src/WebComponent/icons/BookTourOutlineIcon.ts +13 -0
- package/src/WebComponent/icons/CalculatorOutlineIcon.ts +80 -0
- package/src/WebComponent/icons/ChatOutlineIcon.ts +10 -0
- package/src/WebComponent/icons/ChevronLeftIcon.ts +7 -0
- package/src/WebComponent/icons/ChevronRightIcon.ts +7 -0
- package/src/WebComponent/icons/ContactResidentIcon.ts +9 -0
- package/src/WebComponent/icons/DollarOutlineIcon.ts +26 -0
- package/src/WebComponent/icons/EmailOutlineIcon.ts +7 -0
- package/src/WebComponent/icons/HeyThereEmojiIcon.ts +12 -0
- package/src/WebComponent/icons/PhoneOutlineIcon.ts +7 -0
- package/src/WebComponent/icons/SendMessageIcon.ts +17 -0
- package/src/WebComponent/icons/TourSelfGuidedIcon.ts +17 -0
- package/src/WebComponent/icons/TourVirtuallyIcon.ts +17 -0
- package/src/WebComponent/icons/TourWithAgentIcon.ts +17 -0
- package/src/WebComponent/icons/XOutlineIcon.ts +8 -0
- package/src/WebComponent/index.ts +2 -0
- package/src/WebComponent/launcher/Launcher.ts +1284 -0
- package/src/WebComponent/launcher/launcherStyles.ts +500 -0
- package/src/WebComponent/launcher/mobile-launcher.ts +162 -0
- package/src/WebComponent/launcher/typeEmojiStyles.ts +161 -0
- package/src/WebComponent/launcher/typeMiniStyles.ts +60 -0
- package/src/WebComponent/launcher/typeMobileStyles.ts +50 -0
- package/src/WebComponent/leasing-chat-styles.ts +114 -0
- package/src/WebComponent/loaders/index.ts +7 -0
- package/src/WebComponent/loaders/mega-loader.ts +36 -0
- package/src/WebComponent/loaders/skeleton-card.ts +31 -0
- package/src/WebComponent/loaders/skeleton-loader-styles.ts +112 -0
- package/src/WebComponent/loaders/skeleton-loader.ts +34 -0
- package/src/WebComponent/me-chat.ts +1264 -0
- package/src/WebComponent/me-select.ts +322 -0
- package/src/WebComponent/mini-loader.ts +28 -0
- package/src/WebComponent/pubnub-chat-styles.ts +204 -0
- package/src/WebComponent/pubnub-chat.ts +771 -0
- package/src/WebComponent/pubnub-media.ts +208 -0
- package/src/WebComponent/pubnub-message-styles.ts +54 -0
- package/src/WebComponent/pubnub-message.ts +431 -0
- package/src/WebComponent/simple-launcher/simple-launcher-styles.ts +34 -0
- package/src/WebComponent/simple-launcher/simple-launcher.ts +100 -0
- package/src/WebComponent/utilities-chat.ts +270 -0
- package/src/WebComponent/utilities-styles.ts +110 -0
- package/src/WebComponent/utils.ts +82 -0
- package/src/analytics.ts +217 -0
- package/src/assetUrls.ts +6 -0
- package/src/disclaimers.ts +301 -0
- package/src/fetchBuildingABTestType.ts +21 -0
- package/src/fetchBuildingInfo.ts +88 -0
- package/src/fetchBuildingWebchatView.ts +176 -0
- package/src/fetchFeatureFlag.ts +250 -0
- package/src/fetchLeadSources.ts +98 -0
- package/src/fetchPhoneNumberFromSource.ts +31 -0
- package/src/fetchWebchatPreferences.ts +54 -0
- package/src/getAvailabilities.ts +189 -0
- package/src/getBuildingPhoneNumber.ts +26 -0
- package/src/getShouldAllowScheduling.ts +16 -0
- package/src/getShouldShowWebchat.ts +114 -0
- package/src/getTimezoneString.ts +40 -0
- package/src/globals.ts +3 -0
- package/src/gtm.ts +17 -0
- package/src/handleChatId.ts +101 -0
- package/src/insertDNIIntoWebsite.ts +146 -0
- package/src/insertLeadSourceIntoSchedulerLinks.ts +71 -0
- package/src/main/MEChat.test.ts +110 -0
- package/src/main/MEChat.ts +404 -0
- package/src/main/utils.ts +70 -0
- package/src/postLeadSources.ts +44 -0
- package/src/rentgrata.ts +74 -0
- package/src/replaceSelectButtonsWithNewLink.ts +91 -0
- package/src/services/fees/calculateQuote.ts +74 -0
- package/src/services/fees/fetchBuildingFees.ts +50 -0
- package/src/services/fees/fetchBuildingFeesV2.ts +59 -0
- package/src/services/fees/fetchBuildingFloorplans.ts +74 -0
- package/src/services/fees/fetchBuildingUnits.ts +86 -0
- package/src/services/fees/utils.ts +4 -0
- package/src/svgIcons.ts +14 -0
- package/src/themes.ts +65 -0
- package/src/types/incentive-v2.ts +24 -0
- package/src/types/rest-sdk.types.ts +13 -0
- package/src/types/webchat-no-show-reason.ts +6 -0
- package/src/utils/getWidgetOverrides.ts +91 -0
- package/src/utils/queryParamBuilder.ts +28 -0
- package/src/utils.ts +121 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import Pubnub, { ListenerParameters, MessageEvent } from "pubnub";
|
|
2
|
+
import { ChatStorageKey } from "./handleChatId";
|
|
3
|
+
import LeadSourceClient from "./WebComponent/LeadSourceClient";
|
|
4
|
+
import { WidgetType } from "./main/MEChat";
|
|
5
|
+
import { BuildingWebchatView } from "./fetchBuildingWebchatView";
|
|
6
|
+
interface TokenResponse {
|
|
7
|
+
auth: {
|
|
8
|
+
result: {
|
|
9
|
+
token: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
keys: {
|
|
13
|
+
subscribe_key: string;
|
|
14
|
+
publish_key: string;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
declare enum MessageType {
|
|
18
|
+
noReply = "no-reply",
|
|
19
|
+
text = "text",
|
|
20
|
+
media = "media"
|
|
21
|
+
}
|
|
22
|
+
interface RawPubnubMessage {
|
|
23
|
+
channel: string;
|
|
24
|
+
message: {
|
|
25
|
+
text: string;
|
|
26
|
+
customType: string;
|
|
27
|
+
messageType?: MessageType;
|
|
28
|
+
is_streaming?: boolean;
|
|
29
|
+
is_done?: boolean;
|
|
30
|
+
order?: number;
|
|
31
|
+
stream_id?: string;
|
|
32
|
+
media?: ChatMediaFile[];
|
|
33
|
+
};
|
|
34
|
+
publisher: string;
|
|
35
|
+
subscription: string;
|
|
36
|
+
timetoken: number;
|
|
37
|
+
}
|
|
38
|
+
export interface SimpleTextChatMessage {
|
|
39
|
+
timestamp: number;
|
|
40
|
+
message: string;
|
|
41
|
+
isLeadMessage: boolean;
|
|
42
|
+
chunks: {
|
|
43
|
+
text: string;
|
|
44
|
+
order: number;
|
|
45
|
+
isDone: boolean;
|
|
46
|
+
}[];
|
|
47
|
+
type: SimpleMessageTypes.text;
|
|
48
|
+
}
|
|
49
|
+
interface ChatMediaFile {
|
|
50
|
+
title: string | null;
|
|
51
|
+
description: string | null;
|
|
52
|
+
url: string | null;
|
|
53
|
+
}
|
|
54
|
+
export interface SimpleMediaChatMessage {
|
|
55
|
+
timestamp: number;
|
|
56
|
+
media: ChatMediaFile[];
|
|
57
|
+
isLeadMessage: boolean;
|
|
58
|
+
type: SimpleMessageTypes.media;
|
|
59
|
+
}
|
|
60
|
+
export declare type SimpleChatMessage = SimpleTextChatMessage | SimpleMediaChatMessage;
|
|
61
|
+
export declare const isSimpleTextChatMessage: (message: SimpleChatMessage) => message is SimpleTextChatMessage;
|
|
62
|
+
export declare const isSimpleMediaChatMessage: (message: SimpleChatMessage) => message is SimpleMediaChatMessage;
|
|
63
|
+
export declare enum SimpleMessageTypes {
|
|
64
|
+
text = "text",
|
|
65
|
+
media = "media"
|
|
66
|
+
}
|
|
67
|
+
declare class MyPubnub {
|
|
68
|
+
private apiHost;
|
|
69
|
+
private leadSourceClient;
|
|
70
|
+
private buildingWebchatView;
|
|
71
|
+
private buildingSlug;
|
|
72
|
+
private orgSlug;
|
|
73
|
+
private eliseResponseTimeout;
|
|
74
|
+
private isWaitingForStreamingMessages;
|
|
75
|
+
private widgetType;
|
|
76
|
+
pubnub: Pubnub | null;
|
|
77
|
+
leadUserId: string;
|
|
78
|
+
channel: string;
|
|
79
|
+
leadSource: string | null;
|
|
80
|
+
isCurrentlyStreamingMessage: boolean;
|
|
81
|
+
chatListener: ((res: {
|
|
82
|
+
messages: SimpleChatMessage[];
|
|
83
|
+
isLoading: boolean;
|
|
84
|
+
}) => void) | null;
|
|
85
|
+
rawPubnubMessages: RawPubnubMessage[];
|
|
86
|
+
simpleChatMessages: SimpleChatMessage[];
|
|
87
|
+
listenerParams: ListenerParameters;
|
|
88
|
+
isLoadingMessages: boolean;
|
|
89
|
+
isFirstChatMessageSent: boolean;
|
|
90
|
+
private streamingMessageTimeout;
|
|
91
|
+
constructor(buildingSlug: string, buildingDetails: BuildingWebchatView | null, orgSlug: string, leadSource: string | null | undefined, leadUserId: string, leadSourceClient?: LeadSourceClient | null, widgetType?: WidgetType);
|
|
92
|
+
private checkAndHandleDelayStreamingMessages;
|
|
93
|
+
checkAndHandleGTMForLeadEmail: (messageEvent: Pubnub.MessageEvent) => void;
|
|
94
|
+
addChatListener(listener: (response: {
|
|
95
|
+
messages: SimpleChatMessage[];
|
|
96
|
+
isLoading: boolean;
|
|
97
|
+
}) => void): void;
|
|
98
|
+
initializePubnub(chatStorageKey: ChatStorageKey): Promise<Pubnub | undefined>;
|
|
99
|
+
fetchToken(lead: string, channel: string): Promise<TokenResponse | null>;
|
|
100
|
+
fetchChannelExists(channel: string): Promise<boolean>;
|
|
101
|
+
withAuthToken(apiRequestFunc: () => Promise<void>): Promise<void>;
|
|
102
|
+
private markEveryPreviousNoReplyMessageDone;
|
|
103
|
+
private checkMessageChunkValid;
|
|
104
|
+
getChannelHistory(maxTotalMessageChunksToFetch?: number): Promise<void>;
|
|
105
|
+
handleChatListeners: () => void;
|
|
106
|
+
handleDisconnect: () => void;
|
|
107
|
+
removeChatListeners: () => void;
|
|
108
|
+
sendMessage: (message: string) => Promise<void>;
|
|
109
|
+
private shouldCreateAsDevState;
|
|
110
|
+
isLeadMessage: (message: RawPubnubMessage) => boolean;
|
|
111
|
+
private removeDuplicatedRawPubnubMessages;
|
|
112
|
+
translatePubnubMessagesIntoSimpleChatMessages: (messages: RawPubnubMessage[]) => SimpleChatMessage[];
|
|
113
|
+
private getConsecutiveChunks;
|
|
114
|
+
private isMessageStillStreamingChunks;
|
|
115
|
+
}
|
|
116
|
+
export default MyPubnub;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { LitElement, TemplateResult } from "lit";
|
|
2
|
+
import { BuildingFeeView, DesiredAddon } from "../../../model";
|
|
3
|
+
export declare class AddonItemMatrixQtySelector extends LitElement {
|
|
4
|
+
static styles: import("lit").CSSResult[];
|
|
5
|
+
set feeItem(value: BuildingFeeView | null);
|
|
6
|
+
get feeItem(): BuildingFeeView | null;
|
|
7
|
+
private _feeItem;
|
|
8
|
+
onQuantityChange: ((addon: DesiredAddon) => void) | null;
|
|
9
|
+
private quantities;
|
|
10
|
+
private _availableTypes;
|
|
11
|
+
private get matrixRules();
|
|
12
|
+
private getAvailableTypes;
|
|
13
|
+
private get itemTypes();
|
|
14
|
+
private getMaxQuantityForType;
|
|
15
|
+
private isValidCombination;
|
|
16
|
+
private handleIncrement;
|
|
17
|
+
private handleDecrement;
|
|
18
|
+
private notifyQuantityChange;
|
|
19
|
+
private formatItemType;
|
|
20
|
+
private pluralize;
|
|
21
|
+
private renderQuantitySelector;
|
|
22
|
+
render(): TemplateResult;
|
|
23
|
+
}
|
|
24
|
+
declare global {
|
|
25
|
+
interface HTMLElementTagNameMap {
|
|
26
|
+
"addon-item-matrix-qty-selector": AddonItemMatrixQtySelector;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { LitElement, TemplateResult } from "lit";
|
|
2
|
+
import { BuildingFeeView, DesiredAddon } from "../../../model";
|
|
3
|
+
export declare class AddonItemQtySelector extends LitElement {
|
|
4
|
+
static styles: import("lit").CSSResult;
|
|
5
|
+
feeItem: BuildingFeeView | null;
|
|
6
|
+
onQuantityChange: ((addon: DesiredAddon) => void) | null;
|
|
7
|
+
private quantity;
|
|
8
|
+
private get maxQuantity();
|
|
9
|
+
private handleIncrement;
|
|
10
|
+
private handleDecrement;
|
|
11
|
+
private notifyQuantityChange;
|
|
12
|
+
render(): TemplateResult;
|
|
13
|
+
}
|
|
14
|
+
declare global {
|
|
15
|
+
interface HTMLElementTagNameMap {
|
|
16
|
+
"addon-item-qty-selector": AddonItemQtySelector;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { LitElement, TemplateResult } from "lit";
|
|
2
|
+
import { DesiredRentableItem, RentableItemSummary } from "../../../model";
|
|
3
|
+
export declare class RentableItemQtySelector extends LitElement {
|
|
4
|
+
static styles: import("lit").CSSResult;
|
|
5
|
+
rentableItem: RentableItemSummary | null;
|
|
6
|
+
onSelect: ((rentableItem: DesiredRentableItem) => void) | null;
|
|
7
|
+
private quantity;
|
|
8
|
+
selectedItemIds: Set<string>;
|
|
9
|
+
get totalAvailableItems(): number;
|
|
10
|
+
get quantityLeft(): number;
|
|
11
|
+
get atMaxUnits(): boolean;
|
|
12
|
+
get atMinUnits(): boolean;
|
|
13
|
+
private handleIncrement;
|
|
14
|
+
private handleDecrement;
|
|
15
|
+
private emitChange;
|
|
16
|
+
render(): TemplateResult;
|
|
17
|
+
}
|
|
18
|
+
declare global {
|
|
19
|
+
interface HTMLElementTagNameMap {
|
|
20
|
+
"rentable-item-qty-selector": RentableItemQtySelector;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { LitElement, TemplateResult } from "lit";
|
|
2
|
+
import { LayoutOption } from "../../../../fetchBuildingWebchatView";
|
|
3
|
+
import { DesiredAddon, DesiredRentableItem, FeeEstimate } from "../../model";
|
|
4
|
+
import { CalculateQuoteResponse } from "../../../../services/fees/calculateQuote";
|
|
5
|
+
import { Unit } from "../../../../services/fees/fetchBuildingUnits";
|
|
6
|
+
import { BuildingFeeView, BuildingFeeFrequency, RentableItemSummary } from "../../model";
|
|
7
|
+
import "../floor-plan-selector/floor-plan-selector";
|
|
8
|
+
import "../fee-card/fee-card";
|
|
9
|
+
import "../addons/addon-item-qty-selector/addon-item-qty-selector";
|
|
10
|
+
import "../addons/rentable-item-qty-selector/rentable-item-qty-selector";
|
|
11
|
+
import "../addons/addon-item-matrix-qty-selector/addon-item-matrix-qty-selector";
|
|
12
|
+
import "../../../loaders/skeleton-loader";
|
|
13
|
+
import "../../../loaders/mega-loader";
|
|
14
|
+
export declare class FeeCalculatorLayout extends LitElement {
|
|
15
|
+
static styles: import("lit").CSSResult;
|
|
16
|
+
buildingSlug: string;
|
|
17
|
+
isLoading: boolean;
|
|
18
|
+
selectedUnit: Unit | null;
|
|
19
|
+
quote: CalculateQuoteResponse | null;
|
|
20
|
+
layoutOptions: LayoutOption[];
|
|
21
|
+
selectedLayoutIds: number[];
|
|
22
|
+
groupedFees: Record<BuildingFeeFrequency, BuildingFeeView[]>;
|
|
23
|
+
rentableItems: RentableItemSummary[];
|
|
24
|
+
onSelectLayout: ((layoutIds: number[]) => void) | null;
|
|
25
|
+
onUnitSelect: ((unit: Unit) => void) | null;
|
|
26
|
+
onMoveInDateChange: ((moveInDate: Date) => void) | null;
|
|
27
|
+
onLeaseTermChange: ((leaseTerm: number) => void) | null;
|
|
28
|
+
onAddonSelect: ((addon: DesiredAddon) => void) | null;
|
|
29
|
+
onRentableItemSelect: ((rentableItem: DesiredRentableItem) => void) | null;
|
|
30
|
+
get standardFees(): Record<BuildingFeeFrequency, BuildingFeeView[]>;
|
|
31
|
+
/**
|
|
32
|
+
* A "rentable item" is simply a fee which has inventory attached to it.
|
|
33
|
+
*/
|
|
34
|
+
get addOns(): (BuildingFeeView | RentableItemSummary)[];
|
|
35
|
+
renderRecurrenceFeeSection(title: string, fees: FeeEstimate[]): TemplateResult | null;
|
|
36
|
+
renderFeeSections(): TemplateResult[];
|
|
37
|
+
renderFeesContent(): TemplateResult;
|
|
38
|
+
renderAddOns(): TemplateResult | null;
|
|
39
|
+
private renderAddOnsContent;
|
|
40
|
+
render(): TemplateResult;
|
|
41
|
+
}
|
|
42
|
+
declare global {
|
|
43
|
+
interface HTMLElementTagNameMap {
|
|
44
|
+
"fee-calculator-layout": FeeCalculatorLayout;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { LitElement, TemplateResult } from "lit";
|
|
2
|
+
import { FeeEstimate } from "../../model";
|
|
3
|
+
import "../fee-item/fee-item";
|
|
4
|
+
export declare class FeeCard extends LitElement {
|
|
5
|
+
static styles: import("lit").CSSResult;
|
|
6
|
+
title: string;
|
|
7
|
+
fees: FeeEstimate[];
|
|
8
|
+
rent: number;
|
|
9
|
+
quoteTotal: number;
|
|
10
|
+
private buildingFeesToQuantity;
|
|
11
|
+
get totalAmount(): string;
|
|
12
|
+
get standardFees(): FeeEstimate[];
|
|
13
|
+
get addons(): FeeEstimate[];
|
|
14
|
+
handleQuantityChange: (feeId: number, quantity: number) => void;
|
|
15
|
+
render(): TemplateResult;
|
|
16
|
+
}
|
|
17
|
+
declare global {
|
|
18
|
+
interface HTMLElementTagNameMap {
|
|
19
|
+
"fee-card": FeeCard;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { LitElement, TemplateResult } from "lit";
|
|
2
|
+
import { FeeEstimate } from "../../model";
|
|
3
|
+
import "../addons/addon-item-qty-selector/addon-item-qty-selector";
|
|
4
|
+
export declare class FeeItemComponent extends LitElement {
|
|
5
|
+
static styles: import("lit").CSSResult;
|
|
6
|
+
feeItem: FeeEstimate | null;
|
|
7
|
+
render(): TemplateResult;
|
|
8
|
+
}
|
|
9
|
+
declare global {
|
|
10
|
+
interface HTMLElementTagNameMap {
|
|
11
|
+
"fee-item": FeeItemComponent;
|
|
12
|
+
}
|
|
13
|
+
}
|
package/dist/src/WebComponent/FeeCalculator/components/floor-plan-selector/floor-plan-selector.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { LitElement, TemplateResult } from "lit";
|
|
2
|
+
import { LayoutOption } from "../../../../fetchBuildingWebchatView";
|
|
3
|
+
import { Unit } from "../../../../services/fees/fetchBuildingUnits";
|
|
4
|
+
import "../floorplan-image-card/floorplan-image-card";
|
|
5
|
+
import "../../../loaders/mega-loader";
|
|
6
|
+
export declare class FloorPlanSelector extends LitElement {
|
|
7
|
+
static styles: import("lit").CSSResult;
|
|
8
|
+
buildingSlug: string;
|
|
9
|
+
layoutOptions: LayoutOption[];
|
|
10
|
+
selectedLayoutIds: number[];
|
|
11
|
+
onSelectLayout: ((layoutIds: number[]) => void) | null;
|
|
12
|
+
onUnitSelect: ((unit: Unit) => void) | null;
|
|
13
|
+
onMoveInDateChange: ((moveInDate: Date) => void) | null;
|
|
14
|
+
onLeaseTermChange: ((leaseTerm: number) => void) | null;
|
|
15
|
+
moveInDate: Date | null;
|
|
16
|
+
leaseTerm: number;
|
|
17
|
+
units: Unit[];
|
|
18
|
+
selectedUnit: Unit | null;
|
|
19
|
+
isLoading: boolean;
|
|
20
|
+
private get displayOptions();
|
|
21
|
+
private fetchUnits;
|
|
22
|
+
firstUpdated: () => Promise<void>;
|
|
23
|
+
handleUnitSelect: (unit: Unit) => void;
|
|
24
|
+
handleLayoutChange: (ids: number[]) => Promise<void>;
|
|
25
|
+
handleMoveInDateChange: (e: Event) => Promise<void>;
|
|
26
|
+
handleLeaseTermChange: (e: Event) => Promise<void>;
|
|
27
|
+
renderUnitSelection: () => TemplateResult;
|
|
28
|
+
render(): TemplateResult;
|
|
29
|
+
}
|
|
30
|
+
declare global {
|
|
31
|
+
interface HTMLElementTagNameMap {
|
|
32
|
+
"floor-plan-selector": FloorPlanSelector;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { LitElement, TemplateResult } from "lit";
|
|
2
|
+
import { Unit } from "../../../../services/fees/fetchBuildingUnits";
|
|
3
|
+
export declare class FloorplanImageCard extends LitElement {
|
|
4
|
+
static styles: import("lit").CSSResult;
|
|
5
|
+
unit: Unit;
|
|
6
|
+
onUnitSelect: ((unit: Unit) => void) | null;
|
|
7
|
+
selected: boolean;
|
|
8
|
+
get bedAndBathText(): string;
|
|
9
|
+
get priceRange(): string;
|
|
10
|
+
handleOnUnitSelect(): void;
|
|
11
|
+
handleOnImgClick(event: Event): void;
|
|
12
|
+
render(): TemplateResult;
|
|
13
|
+
}
|
|
14
|
+
declare global {
|
|
15
|
+
interface HTMLElementTagNameMap {
|
|
16
|
+
"floorplan-image-card": FloorplanImageCard;
|
|
17
|
+
}
|
|
18
|
+
}
|
package/dist/src/WebComponent/FeeCalculator/components/incentive-banner/incentive-banner-styles.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const incentiveBannerStyles: import("lit").CSSResult;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { LitElement, TemplateResult } from "lit";
|
|
2
|
+
import { IncentiveV2 } from "../../../../types/incentive-v2";
|
|
3
|
+
export declare class IncentiveBanner extends LitElement {
|
|
4
|
+
static styles: import("lit").CSSResult;
|
|
5
|
+
incentive: IncentiveV2;
|
|
6
|
+
getFormattedEndDate(incentive: IncentiveV2): string;
|
|
7
|
+
render(): TemplateResult;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./incentive-banner";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * from "./promo-card/promo-card";
|
|
2
|
+
export * from "./floor-plan-selector/floor-plan-selector";
|
|
3
|
+
export * from "./fee-card/fee-card";
|
|
4
|
+
export * from "./addons/addon-item-qty-selector/addon-item-qty-selector";
|
|
5
|
+
export * from "./fee-calculator-layout/fee-calculator-layout";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { LitElement, TemplateResult } from "lit";
|
|
2
|
+
export declare class PromoCard extends LitElement {
|
|
3
|
+
static styles: import("lit").CSSResult;
|
|
4
|
+
promoAmount: string;
|
|
5
|
+
promoDescription: string;
|
|
6
|
+
promoValidity: string;
|
|
7
|
+
render(): TemplateResult;
|
|
8
|
+
}
|
|
9
|
+
declare global {
|
|
10
|
+
interface HTMLElementTagNameMap {
|
|
11
|
+
"promo-card": PromoCard;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const feeCalculatorStyles: import("lit").CSSResult;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { LitElement, TemplateResult } from "lit";
|
|
2
|
+
import { LayoutOption } from "../../fetchBuildingWebchatView";
|
|
3
|
+
import { CalculateQuoteResponse } from "../../services/fees/calculateQuote";
|
|
4
|
+
import { Unit } from "../../services/fees/fetchBuildingUnits";
|
|
5
|
+
import { BuildingFeeFrequency, BuildingFeeView } from "./model/building-fee-view";
|
|
6
|
+
import { DesiredAddon } from "./model/desired-addon";
|
|
7
|
+
import { DesiredRentableItem } from "./model/desired-rentable-item";
|
|
8
|
+
import "./components";
|
|
9
|
+
import "./components/fee-calculator-layout/fee-calculator-layout";
|
|
10
|
+
import "../chat-additional-actions";
|
|
11
|
+
import "./components/incentive-banner";
|
|
12
|
+
export declare class FeeCalculator extends LitElement {
|
|
13
|
+
static styles: import("lit").CSSResult;
|
|
14
|
+
buildingSlug: string;
|
|
15
|
+
orgSlug: string;
|
|
16
|
+
private primaryColor;
|
|
17
|
+
private backgroundColor;
|
|
18
|
+
onCloseClicked: (() => void) | null;
|
|
19
|
+
onClickEmailOption: ((e: MouseEvent) => void) | null;
|
|
20
|
+
onClickPhoneOption: ((e: MouseEvent) => void) | null;
|
|
21
|
+
onClickSSTOption: ((e: MouseEvent) => void) | null;
|
|
22
|
+
onClickTextUsOption: ((e: MouseEvent) => void) | null;
|
|
23
|
+
private isLoading;
|
|
24
|
+
private selectedLayoutIds;
|
|
25
|
+
private selectedUnit;
|
|
26
|
+
private desiredAddons;
|
|
27
|
+
private desiredRentableItems;
|
|
28
|
+
private leaseTerm;
|
|
29
|
+
private moveInDate;
|
|
30
|
+
private buildingWebchatView;
|
|
31
|
+
private incentives;
|
|
32
|
+
quote: CalculateQuoteResponse | null;
|
|
33
|
+
private groupedFees;
|
|
34
|
+
private rentableItems;
|
|
35
|
+
private debouncedCalculateQuote;
|
|
36
|
+
get layouts(): LayoutOption[];
|
|
37
|
+
firstUpdated: () => Promise<void>;
|
|
38
|
+
setupCalculator: () => Promise<void>;
|
|
39
|
+
updated(changedProperties: Map<string, unknown>): void;
|
|
40
|
+
disconnectedCallback(): void;
|
|
41
|
+
calculateQuote: () => Promise<void>;
|
|
42
|
+
handleUnitSelect: (unit: Unit) => void;
|
|
43
|
+
handleMoveInDateChange: (date: Date) => void;
|
|
44
|
+
handleLeaseTermChange: (leaseTerm: number) => void;
|
|
45
|
+
handleAddonSelect: (addon: DesiredAddon) => void;
|
|
46
|
+
handleRentableItemSelect: (rentableItem: DesiredRentableItem) => void;
|
|
47
|
+
groupFees: (fees: BuildingFeeView[]) => Record<BuildingFeeFrequency, BuildingFeeView[]>;
|
|
48
|
+
handleClickEmailOption: (e: MouseEvent) => void;
|
|
49
|
+
handleClickPhoneOption: (e: MouseEvent) => void;
|
|
50
|
+
handleClickSSTOption: (e: MouseEvent) => void;
|
|
51
|
+
handleClickTextUsOption: (e: MouseEvent) => void;
|
|
52
|
+
handleClose: () => void;
|
|
53
|
+
handleSelectLayout: (layoutIds: number[]) => void;
|
|
54
|
+
render(): TemplateResult;
|
|
55
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { PricingMatrix } from "./pricing-matrix";
|
|
2
|
+
export declare enum BuildingFeeFrequency {
|
|
3
|
+
OneTime = "One Time",
|
|
4
|
+
Monthly = "Monthly",
|
|
5
|
+
Quarterly = "Quarterly",
|
|
6
|
+
Annually = "Annually",
|
|
7
|
+
PerOccurrence = "Per Occurrence"
|
|
8
|
+
}
|
|
9
|
+
export declare class BuildingFeeView {
|
|
10
|
+
id?: number;
|
|
11
|
+
buildingId: number;
|
|
12
|
+
feeName: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
category: string;
|
|
15
|
+
unitIds?: number[];
|
|
16
|
+
layoutIds?: number[];
|
|
17
|
+
startDate?: Date;
|
|
18
|
+
endDate?: Date;
|
|
19
|
+
source?: string;
|
|
20
|
+
externalKey?: string;
|
|
21
|
+
syncActive: boolean;
|
|
22
|
+
hiddenReason?: string;
|
|
23
|
+
refundable: boolean;
|
|
24
|
+
bundleKey?: string;
|
|
25
|
+
publicFacing: boolean;
|
|
26
|
+
chargeCode?: string;
|
|
27
|
+
prorated?: boolean;
|
|
28
|
+
pricingCategory: "mandatory" | "situational";
|
|
29
|
+
pricingType: "fixed" | "per-item" | "usage-based" | "percent-rent" | "custom";
|
|
30
|
+
frequency: BuildingFeeFrequency;
|
|
31
|
+
nlpPricing?: string;
|
|
32
|
+
amount?: number;
|
|
33
|
+
percentRent?: number;
|
|
34
|
+
unitLabel?: string;
|
|
35
|
+
minAmount?: number;
|
|
36
|
+
maxAmount?: number;
|
|
37
|
+
customMatrixData?: PricingMatrix;
|
|
38
|
+
constructor(data?: Partial<BuildingFeeView>);
|
|
39
|
+
get isOptional(): boolean;
|
|
40
|
+
get hasMatrix(): boolean;
|
|
41
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { TransactionCategory } from "./transaction-category";
|
|
2
|
+
export declare class BuildingFee {
|
|
3
|
+
id: number;
|
|
4
|
+
buildingId: number;
|
|
5
|
+
blueprint: FeeBlueprint;
|
|
6
|
+
unitIds: number[] | null;
|
|
7
|
+
layoutIds: number[] | null;
|
|
8
|
+
startDate: Date | null;
|
|
9
|
+
endDate: Date | null;
|
|
10
|
+
source: string | null;
|
|
11
|
+
timeCreated: Date;
|
|
12
|
+
externalKey: string | null;
|
|
13
|
+
syncActive: boolean;
|
|
14
|
+
hiddenReason: string | null;
|
|
15
|
+
refundable: boolean | null;
|
|
16
|
+
required?: boolean;
|
|
17
|
+
constructor(data?: Partial<BuildingFee>);
|
|
18
|
+
get isAddOn(): boolean;
|
|
19
|
+
displayName(fallback?: string): string;
|
|
20
|
+
get description(): string;
|
|
21
|
+
get displayAmount(): string;
|
|
22
|
+
}
|
|
23
|
+
interface FeeBlueprint {
|
|
24
|
+
transactionId: number | null;
|
|
25
|
+
transactionAmount: number | null;
|
|
26
|
+
flowDirection: TransactionFlow;
|
|
27
|
+
transactionDescription: string | null;
|
|
28
|
+
category: TransactionCategory;
|
|
29
|
+
recurrenceInfo: RecurrenceInfo | null;
|
|
30
|
+
adjustmentInfo: AdjustmentInfo | null;
|
|
31
|
+
triggerInfo: TriggerInfo | null;
|
|
32
|
+
addOnInfo: AddOnInfo | null;
|
|
33
|
+
priceType: PriceType;
|
|
34
|
+
handledByThirdParty: boolean;
|
|
35
|
+
handledByThirdPartyReasoning: string | null;
|
|
36
|
+
leaseStartDate: Date | null;
|
|
37
|
+
leaseEndDate: Date | null;
|
|
38
|
+
}
|
|
39
|
+
interface AdjustmentInfo {
|
|
40
|
+
reason: string;
|
|
41
|
+
percentage: number;
|
|
42
|
+
}
|
|
43
|
+
export declare enum RecurrenceFrequency {
|
|
44
|
+
OneTime = "OneTime",
|
|
45
|
+
Daily = "Daily",
|
|
46
|
+
Weekly = "Weekly",
|
|
47
|
+
BiWeekly = "BiWeekly",
|
|
48
|
+
Monthly = "Monthly",
|
|
49
|
+
Yearly = "Yearly",
|
|
50
|
+
Unknown = "Unknown"
|
|
51
|
+
}
|
|
52
|
+
interface RecurrenceInfo {
|
|
53
|
+
frequency: RecurrenceFrequency;
|
|
54
|
+
startDate: Date | null;
|
|
55
|
+
endDate: Date | null;
|
|
56
|
+
}
|
|
57
|
+
interface TriggerInfo {
|
|
58
|
+
triggerEvent: string;
|
|
59
|
+
maxDaysBeforeEvent: number;
|
|
60
|
+
maxDaysAfterEvent: number;
|
|
61
|
+
triggerEventEmbedding: number[] | null;
|
|
62
|
+
startDate: Date | null;
|
|
63
|
+
endDate: Date | null;
|
|
64
|
+
}
|
|
65
|
+
export interface AddOnInfo {
|
|
66
|
+
addOnType: string;
|
|
67
|
+
maxUnitsCharged: number | null;
|
|
68
|
+
minUnitsCharged: number | null;
|
|
69
|
+
maxUnitsAllowed: number | null;
|
|
70
|
+
minUnitsAllowed: number | null;
|
|
71
|
+
addOnTypeEmbedding: number[] | null;
|
|
72
|
+
}
|
|
73
|
+
export declare enum TransactionFlow {
|
|
74
|
+
Debit = "Debit",
|
|
75
|
+
Credit = "Credit"
|
|
76
|
+
}
|
|
77
|
+
export declare enum PriceType {
|
|
78
|
+
Fixed = "Fixed",
|
|
79
|
+
UsageBased = "UsageBased",
|
|
80
|
+
Varies = "Varies"
|
|
81
|
+
}
|
|
82
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from "./building-fee";
|
|
2
|
+
export * from "./building-fee-view";
|
|
3
|
+
export * from "./desired-addon";
|
|
4
|
+
export * from "./desired-rentable-item";
|
|
5
|
+
export * from "./item-combination";
|
|
6
|
+
export * from "./item-quantity";
|
|
7
|
+
export * from "./pricing-matrix";
|
|
8
|
+
export * from "./pricing-rule";
|
|
9
|
+
export type { RentFrequency } from "./rent-frequency";
|
|
10
|
+
export type { RentableItem } from "./rentable-item";
|
|
11
|
+
export * from "./rentable-item-summary";
|
|
12
|
+
export * from "./transaction-category";
|
|
13
|
+
export * from "./unit-fee-bundle";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ItemCombination } from "./item-combination";
|
|
2
|
+
import { PricingRule } from "./pricing-rule";
|
|
3
|
+
export declare class PricingMatrix {
|
|
4
|
+
private rules;
|
|
5
|
+
pricingRules: PricingRule[];
|
|
6
|
+
constructor(data?: {
|
|
7
|
+
pricingRules?: PricingRule[];
|
|
8
|
+
});
|
|
9
|
+
addRule(rule: PricingRule): void;
|
|
10
|
+
getPrice(combination: ItemCombination): number | undefined;
|
|
11
|
+
toRuleArray(): PricingRule[];
|
|
12
|
+
toJSON(): {
|
|
13
|
+
pricingRules: PricingRule[];
|
|
14
|
+
};
|
|
15
|
+
static fromJSON(data: {
|
|
16
|
+
pricingRules: PricingRule[];
|
|
17
|
+
}): PricingMatrix;
|
|
18
|
+
}
|