@envive-ai/react-hooks 0.3.9 → 0.3.11
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/application/commerce-api.cjs +14 -14
- package/dist/application/commerce-api.d.cts +58 -0
- package/dist/application/commerce-api.d.ts +59 -0
- package/dist/application/commerce-api.js +3 -3
- package/dist/application/models/api/widgetText.d.cts +14 -0
- package/dist/application/models/api/widgetText.d.ts +14 -0
- package/dist/application/models/api/widgetTextRequest.d.cts +15 -0
- package/dist/application/models/api/widgetTextRequest.d.ts +15 -0
- package/dist/application/models/chatElementDisplayLocationV3.cjs +2 -1
- package/dist/application/models/chatElementDisplayLocationV3.d.cts +2 -1
- package/dist/application/models/chatElementDisplayLocationV3.d.ts +2 -1
- package/dist/application/models/chatElementDisplayLocationV3.js +2 -1
- package/dist/application/models/guards/api/index.cjs +4 -4
- package/dist/application/models/guards/api/index.js +4 -4
- package/dist/application/models/guards/api/isApiFormResponse.cjs +1 -1
- package/dist/application/models/guards/api/isApiFormResponse.js +1 -1
- package/dist/application/models/guards/api/isApiFormSubmittedResponseAttributes.cjs +1 -1
- package/dist/application/models/guards/api/isApiFormSubmittedResponseAttributes.js +1 -1
- package/dist/application/models/guards/api/isApiOrderResponseAttributes.cjs +1 -1
- package/dist/application/models/guards/api/isApiOrderResponseAttributes.js +1 -1
- package/dist/application/models/guards/api/isApiProductResponseAttributes.cjs +1 -1
- package/dist/application/models/guards/api/isApiProductResponseAttributes.js +1 -1
- package/dist/application/models/guards/api/isApiResponse.cjs +1 -1
- package/dist/application/models/guards/api/isApiResponse.js +1 -1
- package/dist/application/models/index.cjs +12 -12
- package/dist/application/models/index.d.cts +25 -25
- package/dist/application/models/index.d.ts +25 -25
- package/dist/application/models/index.js +12 -12
- package/dist/application/models/validators/validateGraphQLFrontendConfig.cjs +1 -1
- package/dist/application/models/validators/validateGraphQLFrontendConfig.js +1 -1
- package/dist/application/models/validators/validateUserEvent.cjs +2 -2
- package/dist/application/models/validators/validateUserEvent.js +2 -2
- package/dist/application/models/variantInfo/variantInfo.cjs +2 -1
- package/dist/application/models/variantInfo/variantInfo.d.cts +6 -1
- package/dist/application/models/variantInfo/variantInfo.d.ts +6 -1
- package/dist/application/models/variantInfo/variantInfo.js +2 -1
- package/dist/application/utils/analyticsUtils.cjs +1 -1
- package/dist/application/utils/analyticsUtils.js +1 -1
- package/dist/application/utils/widgetTextFromApiWidgetTextResponse.cjs +3 -1
- package/dist/application/utils/widgetTextFromApiWidgetTextResponse.js +3 -1
- package/dist/application/utils/widgetTextRequestToApiRequest.cjs +3 -1
- package/dist/application/utils/widgetTextRequestToApiRequest.js +3 -1
- package/dist/atoms/app/index.cjs +7 -7
- package/dist/atoms/app/index.d.cts +8 -8
- package/dist/atoms/app/index.d.ts +8 -8
- package/dist/atoms/app/index.js +1 -1
- package/dist/atoms/app/variant.cjs +44 -4
- package/dist/atoms/app/variant.d.cts +8 -8
- package/dist/atoms/app/variant.d.ts +8 -8
- package/dist/atoms/app/variant.js +44 -5
- package/dist/atoms/chat/chatState.d.cts +17 -17
- package/dist/atoms/chat/chatState.d.ts +18 -18
- package/dist/atoms/chat/form.cjs +1 -1
- package/dist/atoms/chat/form.d.cts +2 -2
- package/dist/atoms/chat/form.d.ts +2 -2
- package/dist/atoms/chat/form.js +1 -1
- package/dist/atoms/chat/index.cjs +1 -1
- package/dist/atoms/chat/index.d.cts +2 -2
- package/dist/atoms/chat/index.d.ts +2 -2
- package/dist/atoms/chat/index.js +1 -1
- package/dist/atoms/chat/lastMessage.d.cts +2 -2
- package/dist/atoms/chat/lastMessage.d.ts +2 -2
- package/dist/atoms/chat/messageQueue.d.cts +6 -6
- package/dist/atoms/chat/messageQueue.d.ts +6 -6
- package/dist/atoms/chat/performanceMetrics.d.cts +6 -6
- package/dist/atoms/chat/performanceMetrics.d.ts +6 -6
- package/dist/atoms/chat/renderedWidgetRefs.d.cts +2 -2
- package/dist/atoms/chat/renderedWidgetRefs.d.ts +2 -2
- package/dist/atoms/chat/replies.d.cts +3 -3
- package/dist/atoms/chat/replies.d.ts +3 -3
- package/dist/atoms/chat/suggestions.d.cts +2 -2
- package/dist/atoms/chat/suggestions.d.ts +2 -2
- package/dist/atoms/envive/enviveConfig.d.cts +19 -0
- package/dist/atoms/envive/enviveConfig.d.ts +19 -0
- package/dist/atoms/globalSearch/globalSearch.d.cts +5 -5
- package/dist/atoms/globalSearch/globalSearch.d.ts +5 -5
- package/dist/atoms/org/customerService.d.cts +6 -6
- package/dist/atoms/org/customerService.d.ts +6 -6
- package/dist/atoms/org/graphqlConfig.d.cts +4 -4
- package/dist/atoms/org/graphqlConfig.d.ts +4 -4
- package/dist/atoms/org/index.cjs +1 -1
- package/dist/atoms/org/index.js +1 -1
- package/dist/atoms/org/newOrgConfigAtom.d.cts +2 -2
- package/dist/atoms/org/newOrgConfigAtom.d.ts +2 -2
- package/dist/atoms/org/orgAnalyticsConfig.d.cts +5 -5
- package/dist/atoms/org/orgAnalyticsConfig.d.ts +5 -5
- package/dist/atoms/search/chatSearch.cjs +2 -2
- package/dist/atoms/search/chatSearch.d.cts +17 -17
- package/dist/atoms/search/chatSearch.d.ts +17 -17
- package/dist/atoms/search/chatSearch.js +2 -2
- package/dist/atoms/search/searchAPI.cjs +1 -1
- package/dist/atoms/search/searchAPI.d.cts +13 -13
- package/dist/atoms/search/searchAPI.d.ts +13 -13
- package/dist/atoms/search/searchAPI.js +1 -1
- package/dist/atoms/widget/chatPreviewLoading.d.cts +2 -2
- package/dist/atoms/widget/chatPreviewLoading.d.ts +2 -2
- package/dist/contexts/amplitudeContext/amplitudeContext.cjs +10 -7
- package/dist/contexts/amplitudeContext/amplitudeContext.d.cts +2 -2
- package/dist/contexts/amplitudeContext/amplitudeContext.d.ts +2 -2
- package/dist/contexts/amplitudeContext/amplitudeContext.js +6 -3
- package/dist/contexts/amplitudeContext/index.cjs +1 -0
- package/dist/contexts/amplitudeContext/index.d.cts +2 -2
- package/dist/contexts/amplitudeContext/index.d.ts +2 -2
- package/dist/contexts/amplitudeContext/index.js +2 -2
- package/dist/contexts/cdnContext/cdnContext.cjs +3 -3
- package/dist/contexts/enviveConfigContext/enviveConfigContext.cjs +6 -5
- package/dist/contexts/enviveConfigContext/enviveConfigContext.d.cts +2 -1
- package/dist/contexts/enviveConfigContext/enviveConfigContext.d.ts +2 -1
- package/dist/contexts/enviveConfigContext/enviveConfigContext.js +3 -2
- package/dist/contexts/enviveContext/WindowChatToggleBinder.cjs +4 -3
- package/dist/contexts/enviveContext/WindowChatToggleBinder.js +4 -3
- package/dist/contexts/enviveContext/enviveContext.cjs +15 -11
- package/dist/contexts/enviveContext/enviveContext.d.cts +2 -1
- package/dist/contexts/enviveContext/enviveContext.d.ts +2 -1
- package/dist/contexts/enviveContext/enviveContext.js +15 -11
- package/dist/contexts/enviveContext/types.d.cts +1 -1
- package/dist/contexts/enviveContext/types.d.ts +1 -1
- package/dist/contexts/featureFlagServiceContext/featureFlagServiceContext.cjs +23 -2
- package/dist/contexts/featureFlagServiceContext/featureFlagServiceContext.d.cts +11 -2
- package/dist/contexts/featureFlagServiceContext/featureFlagServiceContext.d.ts +11 -2
- package/dist/contexts/featureFlagServiceContext/featureFlagServiceContext.js +23 -2
- package/dist/contexts/featureFlagServiceContext/index.d.cts +2 -2
- package/dist/contexts/featureFlagServiceContext/index.d.ts +2 -2
- package/dist/contexts/graphqlContext/graphqlContext.cjs +7 -7
- package/dist/contexts/graphqlContext/graphqlContext.d.cts +1 -1
- package/dist/contexts/graphqlContext/graphqlContext.d.ts +1 -1
- package/dist/contexts/graphqlContext/graphqlContext.js +3 -3
- package/dist/contexts/graphqlContext/mockV3Config.cjs +10 -4
- package/dist/contexts/graphqlContext/mockV3Config.js +10 -4
- package/dist/contexts/hardcopyContext/hardcopyContext.cjs +50 -5
- package/dist/contexts/hardcopyContext/hardcopyContext.d.cts +4 -1
- package/dist/contexts/hardcopyContext/hardcopyContext.d.ts +4 -1
- package/dist/contexts/hardcopyContext/hardcopyContext.js +48 -3
- package/dist/contexts/newOrgConfigContext/newOrgConfigContext.cjs +4 -4
- package/dist/contexts/newOrgConfigContext/newOrgConfigContext.js +1 -1
- package/dist/contexts/pageContext/mapping.cjs +6 -2
- package/dist/contexts/pageContext/mapping.js +6 -2
- package/dist/contexts/pageContext/pageContext.cjs +4 -3
- package/dist/contexts/pageContext/pageContext.js +2 -1
- package/dist/contexts/pageContext/types.d.cts +7 -3
- package/dist/contexts/pageContext/types.d.ts +7 -3
- package/dist/contexts/salesAgentContext/chatAPI.cjs +103 -13
- package/dist/contexts/salesAgentContext/chatAPI.d.cts +8 -4
- package/dist/contexts/salesAgentContext/chatAPI.d.ts +8 -4
- package/dist/contexts/salesAgentContext/chatAPI.js +105 -15
- package/dist/contexts/salesAgentContext/salesAgentContext.cjs +1 -1
- package/dist/contexts/salesAgentContext/salesAgentContext.js +1 -1
- package/dist/contexts/salesAgentContext/salesAgentService.cjs +53 -11
- package/dist/contexts/salesAgentContext/salesAgentService.js +51 -9
- package/dist/contexts/searchContext/searchContext.cjs +4 -4
- package/dist/contexts/searchContext/searchContext.js +1 -1
- package/dist/contexts/systemSettingsContext/systemSettingsContext.cjs +3 -3
- package/dist/contexts/systemSettingsContext/systemSettingsContext.d.cts +2 -2
- package/dist/contexts/systemSettingsContext/systemSettingsContext.d.ts +2 -2
- package/dist/contexts/types.cjs +1 -1
- package/dist/contexts/types.d.cts +7 -2
- package/dist/contexts/types.d.ts +7 -2
- package/dist/contexts/types.js +1 -1
- package/dist/contexts/typesV3.cjs +2 -1
- package/dist/contexts/typesV3.d.cts +12 -7
- package/dist/contexts/typesV3.d.ts +10 -5
- package/dist/contexts/typesV3.js +2 -1
- package/dist/contexts/userIdentityContext/userIdentityContext.cjs +3 -3
- package/dist/contexts/widgetConfigContext/widgetConfigContext.cjs +1 -1
- package/dist/contexts/widgetConfigContext/widgetConfigContext.js +1 -1
- package/dist/hooks/AppDetails/useAppDetails.cjs +6 -6
- package/dist/hooks/GrabAndScroll/useGrabAndScroll.d.cts +2 -2
- package/dist/hooks/GrabAndScroll/useGrabAndScroll.d.ts +2 -2
- package/dist/hooks/ImageResolver/useImageResolver.cjs +3 -3
- package/dist/hooks/Search/useSearch.cjs +6 -6
- package/dist/hooks/Search/useSearch.d.cts +1 -1
- package/dist/hooks/Search/useSearch.d.ts +1 -1
- package/dist/hooks/Search/useSearch.js +3 -3
- package/dist/hooks/Search/useSearchInput.cjs +2 -2
- package/dist/hooks/Search/useSearchInput.js +2 -2
- package/dist/services/amplitudeService/amplitudeService.cjs +49 -11
- package/dist/services/amplitudeService/amplitudeService.d.cts +18 -3
- package/dist/services/amplitudeService/amplitudeService.d.ts +18 -3
- package/dist/services/amplitudeService/amplitudeService.js +49 -12
- package/dist/services/amplitudeService/index.cjs +1 -0
- package/dist/services/amplitudeService/index.d.cts +2 -2
- package/dist/services/amplitudeService/index.d.ts +2 -2
- package/dist/services/amplitudeService/index.js +2 -2
- package/dist/types/customerService.d.cts +3 -1
- package/dist/types/customerService.d.ts +1 -1
- package/package.json +10 -2
- package/src/application/models/api/widgetText.ts +2 -0
- package/src/application/models/api/widgetTextRequest.ts +1 -0
- package/src/application/models/chatElementDisplayLocationV3.ts +1 -0
- package/src/application/models/variantInfo/variantInfo.ts +5 -0
- package/src/application/utils/widgetTextFromApiWidgetTextResponse.ts +2 -0
- package/src/application/utils/widgetTextRequestToApiRequest.ts +4 -0
- package/src/atoms/app/variant.ts +56 -2
- package/src/contexts/amplitudeContext/__tests__/amplitudeContext.test.tsx +2 -0
- package/src/contexts/amplitudeContext/amplitudeContext.tsx +6 -1
- package/src/contexts/enviveConfigContext/enviveConfigContext.tsx +3 -0
- package/src/contexts/enviveContext/WindowChatToggleBinder.tsx +5 -1
- package/src/contexts/enviveContext/enviveContext.tsx +5 -1
- package/src/contexts/featureFlagServiceContext/featureFlagServiceContext.tsx +36 -0
- package/src/contexts/graphqlContext/mockV3Config.ts +13 -7
- package/src/contexts/hardcopyContext/hardcopyContext.tsx +48 -3
- package/src/contexts/pageContext/mapping.ts +13 -1
- package/src/contexts/pageContext/pageContext.tsx +1 -0
- package/src/contexts/pageContext/types.ts +7 -1
- package/src/contexts/salesAgentContext/chatAPI.ts +106 -13
- package/src/contexts/salesAgentContext/salesAgentService.ts +66 -4
- package/src/contexts/types.ts +8 -1
- package/src/contexts/typesV3.ts +24 -16
- package/src/services/amplitudeService/__tests__/amplitudeService.test.ts +80 -0
- package/src/services/amplitudeService/amplitudeService.ts +55 -11
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
const require_application_models_guards_utils = require('../utils.cjs');
|
|
3
2
|
const require_logger = require('../../../logging/logger.cjs');
|
|
3
|
+
const require_application_models_guards_utils = require('../utils.cjs');
|
|
4
4
|
let __spiffy_ai_commerce_api_client = require("@spiffy-ai/commerce-api-client");
|
|
5
5
|
|
|
6
6
|
//#region src/application/models/guards/api/isApiFormSubmittedResponseAttributes.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { hasPropertyOfType } from "../utils.js";
|
|
2
1
|
import logger_default from "../../../logging/logger.js";
|
|
2
|
+
import { hasPropertyOfType } from "../utils.js";
|
|
3
3
|
import { FormType } from "@spiffy-ai/commerce-api-client";
|
|
4
4
|
|
|
5
5
|
//#region src/application/models/guards/api/isApiFormSubmittedResponseAttributes.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_application_models_guards_utils = require('../utils.cjs');
|
|
2
1
|
const require_logger = require('../../../logging/logger.cjs');
|
|
2
|
+
const require_application_models_guards_utils = require('../utils.cjs');
|
|
3
3
|
|
|
4
4
|
//#region src/application/models/guards/api/isApiOrderResponseAttributes.ts
|
|
5
5
|
const isApiOrderItemInfo = (data) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { hasPropertyOfType } from "../utils.js";
|
|
2
1
|
import logger_default from "../../../logging/logger.js";
|
|
2
|
+
import { hasPropertyOfType } from "../utils.js";
|
|
3
3
|
|
|
4
4
|
//#region src/application/models/guards/api/isApiOrderResponseAttributes.ts
|
|
5
5
|
const isApiOrderItemInfo = (data) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_application_models_guards_utils = require('../utils.cjs');
|
|
2
1
|
const require_logger = require('../../../logging/logger.cjs');
|
|
2
|
+
const require_application_models_guards_utils = require('../utils.cjs');
|
|
3
3
|
|
|
4
4
|
//#region src/application/models/guards/api/isApiProductResponseAttributes.ts
|
|
5
5
|
const isApiProductResponseAttributes = (attributes) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { hasPropertyOfType } from "../utils.js";
|
|
2
1
|
import logger_default from "../../../logging/logger.js";
|
|
2
|
+
import { hasPropertyOfType } from "../utils.js";
|
|
3
3
|
|
|
4
4
|
//#region src/application/models/guards/api/isApiProductResponseAttributes.ts
|
|
5
5
|
const isApiProductResponseAttributes = (attributes) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
const require_application_models_guards_utils = require('../utils.cjs');
|
|
3
2
|
const require_logger = require('../../../logging/logger.cjs');
|
|
3
|
+
const require_application_models_guards_utils = require('../utils.cjs');
|
|
4
4
|
let __spiffy_ai_commerce_api_client = require("@spiffy-ai/commerce-api-client");
|
|
5
5
|
|
|
6
6
|
//#region src/application/models/guards/api/isApiResponse.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { hasPropertyOfType } from "../utils.js";
|
|
2
1
|
import logger_default from "../../../logging/logger.js";
|
|
2
|
+
import { hasPropertyOfType } from "../utils.js";
|
|
3
3
|
import { ResponseCategory } from "@spiffy-ai/commerce-api-client";
|
|
4
4
|
|
|
5
5
|
//#region src/application/models/guards/api/isApiResponse.ts
|
|
@@ -1,6 +1,17 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_isApiSuggestion = require('./guards/api/isApiSuggestion.cjs');
|
|
2
|
+
const require_validateSuggestion = require('./validators/validateSuggestion.cjs');
|
|
3
|
+
const require_isApiUserEvent = require('./guards/api/isApiUserEvent.cjs');
|
|
4
|
+
const require_isApiPDPEventAttributes = require('./guards/api/isApiPDPEventAttributes.cjs');
|
|
5
|
+
const require_isApiQueryTypedEventAttributes = require('./guards/api/isApiQueryTypedEventAttributes.cjs');
|
|
6
|
+
const require_isApiSearchEventAttributes = require('./guards/api/isApiSearchEventAttributes.cjs');
|
|
7
|
+
const require_isApiSuggestionClickedEventAttributes = require('./guards/api/isApiSuggestionClickedEventAttributes.cjs');
|
|
8
|
+
const require_isApiPLPEventAttributes = require('./guards/api/isApiPLPEventAttributes.cjs');
|
|
9
|
+
const require_application_models_guards_utils = require('./guards/utils.cjs');
|
|
10
|
+
const require_isApiFormSubmittedResponseAttributes = require('./guards/api/isApiFormSubmittedResponseAttributes.cjs');
|
|
11
|
+
const require_validateUserEvent = require('./validators/validateUserEvent.cjs');
|
|
2
12
|
const require_chatElementDisplayLocation = require('./chatElementDisplayLocation.cjs');
|
|
3
13
|
const require_chatElementDisplayLocationV3 = require('./chatElementDisplayLocationV3.cjs');
|
|
14
|
+
const require_colorsConfig = require('./colorsConfig.cjs');
|
|
4
15
|
const require_events = require('./events.cjs');
|
|
5
16
|
const require_featureGates = require('./featureGates.cjs');
|
|
6
17
|
const require_googleAnalyticsEvents = require('./googleAnalyticsEvents.cjs');
|
|
@@ -18,27 +29,18 @@ const require_isLegacyUAEcommerceEvent = require('./guards/isLegacyUAEcommerceEv
|
|
|
18
29
|
const require_isMobilePLPChatPlacementParameter = require('./guards/isMobilePLPChatPlacementParameter.cjs');
|
|
19
30
|
const require_isSpanxTakeAQuizCtaParameter = require('./guards/isSpanxTakeAQuizCtaParameter.cjs');
|
|
20
31
|
const require_isVariantInfo = require('./guards/isVariantInfo.cjs');
|
|
21
|
-
const require_application_models_guards_utils = require('./guards/utils.cjs');
|
|
22
|
-
const require_isApiPDPEventAttributes = require('./guards/api/isApiPDPEventAttributes.cjs');
|
|
23
|
-
const require_isApiQueryTypedEventAttributes = require('./guards/api/isApiQueryTypedEventAttributes.cjs');
|
|
24
32
|
const require_isApiResponse = require('./guards/api/isApiResponse.cjs');
|
|
25
33
|
const require_isApiProductResponseAttributes = require('./guards/api/isApiProductResponseAttributes.cjs');
|
|
26
34
|
const require_isApiReviewRichInformation = require('./guards/api/isApiReviewRichInformation.cjs');
|
|
27
35
|
const require_isApiReviewResponseAttributes = require('./guards/api/isApiReviewResponseAttributes.cjs');
|
|
28
|
-
const require_isApiSearchEventAttributes = require('./guards/api/isApiSearchEventAttributes.cjs');
|
|
29
|
-
const require_isApiSuggestion = require('./guards/api/isApiSuggestion.cjs');
|
|
30
|
-
const require_isApiSuggestionClickedEventAttributes = require('./guards/api/isApiSuggestionClickedEventAttributes.cjs');
|
|
31
36
|
const require_isApiTextResponseAttributes = require('./guards/api/isApiTextResponseAttributes.cjs');
|
|
32
|
-
const require_isApiUserEvent = require('./guards/api/isApiUserEvent.cjs');
|
|
33
37
|
const require_isApiProductSearchAttributes = require('./guards/api/isApiProductSearchAttributes.cjs');
|
|
34
38
|
require('./guards/api/index.cjs');
|
|
35
39
|
const require_isApiFormResponse = require('./guards/api/isApiFormResponse.cjs');
|
|
36
|
-
const require_isApiFormSubmittedResponseAttributes = require('./guards/api/isApiFormSubmittedResponseAttributes.cjs');
|
|
37
40
|
const require_isApiOrderResponseAttributes = require('./guards/api/isApiOrderResponseAttributes.cjs');
|
|
38
41
|
const require_isApiOrganizationConfig = require('./guards/api/isApiOrganizationConfig.cjs');
|
|
39
42
|
const require_isApiOrgConfigResults = require('./guards/api/isApiOrgConfigResults.cjs');
|
|
40
43
|
const require_isApiPageResponseAttributes = require('./guards/api/isApiPageResponseAttributes.cjs');
|
|
41
|
-
const require_isApiPLPEventAttributes = require('./guards/api/isApiPLPEventAttributes.cjs');
|
|
42
44
|
const require_isApiProductSearchFilterAttributes = require('./guards/api/isApiProductSearchFilterAttributes.cjs');
|
|
43
45
|
const require_isGraphQLColorsConfig = require('./guards/graphQL/isGraphQLColorsConfig.cjs');
|
|
44
46
|
const require_snakeToCamelTransformer = require('./utils/snakeToCamelTransformer.cjs');
|
|
@@ -50,8 +52,6 @@ const require_validateMobilePLPChatPlacementParameter = require('./validators/va
|
|
|
50
52
|
const require_validateOrganizationConfig = require('./validators/validateOrganizationConfig.cjs');
|
|
51
53
|
const require_validateOrgConfigResults = require('./validators/validateOrgConfigResults.cjs');
|
|
52
54
|
const require_validateResponse = require('./validators/validateResponse.cjs');
|
|
53
|
-
const require_validateSuggestion = require('./validators/validateSuggestion.cjs');
|
|
54
|
-
const require_validateUserEvent = require('./validators/validateUserEvent.cjs');
|
|
55
55
|
const require_variantInfo = require('./variantInfo/variantInfo.cjs');
|
|
56
56
|
|
|
57
57
|
exports.ChatElementDisplayLocation = require_chatElementDisplayLocation.ChatElementDisplayLocation;
|
|
@@ -1,28 +1,3 @@
|
|
|
1
|
-
import { GetMerchantFrontendConfigQueryData, MountingConfigQueryData, PageVariantCheckQueryData, PageVariantQueryData, UIConfigQueryData, WidgetConfigQueryData, WidgetMountingQueryData, getMerchantFrontendConfigQuery } from "./graphql/queries/getMerchantFrontendConfigQuery.cjs";
|
|
2
|
-
import { GetMerchantColorsQueryData, getMerchantColorsQuery } from "./graphql/queries/getMerchantColorsQuery.cjs";
|
|
3
|
-
import { getMerchantOrgIdQuery } from "./graphql/queries/getMerchantOrgIdQuery.cjs";
|
|
4
|
-
import { isApiPDPAttributes } from "./guards/api/isApiPDPEventAttributes.cjs";
|
|
5
|
-
import { isApiQueryTypedAttributes } from "./guards/api/isApiQueryTypedEventAttributes.cjs";
|
|
6
|
-
import { isApiResponse } from "./guards/api/isApiResponse.cjs";
|
|
7
|
-
import { isApiProductResponseAttributes } from "./guards/api/isApiProductResponseAttributes.cjs";
|
|
8
|
-
import { Primitive } from "./utilityTypes/primitive.cjs";
|
|
9
|
-
import { Trim } from "./utilityTypes/trim.cjs";
|
|
10
|
-
import { BuiltIns, IsLowerCase, IsNumeric, IsUpperCase, NonRecursiveType, UpperCaseCharacters, Whitespace, WordSeparators } from "./utilityTypes/internal.cjs";
|
|
11
|
-
import { SplitWords } from "./utilityTypes/splitWords.cjs";
|
|
12
|
-
import { CamelCase, CamelCaseOptions } from "./utilityTypes/camelCase.cjs";
|
|
13
|
-
import { UnknownArray } from "./utilityTypes/unknownArray.cjs";
|
|
14
|
-
import { CamelCasedPropertiesDeep } from "./utilityTypes/camelCasedPropertiesDeep.cjs";
|
|
15
|
-
import { AcceptableFormFieldType, FormResponseAttributes, OrderItemInfo, OrderResponseAttributes, PageResponseAttributes, ProductResponseAttributes, Response, ReviewResponseAttributes, ReviewRichInformation, SearchProductFilterAttributes, SearchProductResponseAttributes, SearchResponseAttributes, SearchResponseProductAttributes, SeparatorResponseAttributes, TextResponseAttributes } from "./api/response.cjs";
|
|
16
|
-
import { ApiFormResponseAttributes, ApiFormResponseSchemaAttributes, ApiPageResponseAttributes, ApiProductSearchFilterResponseAttributes, ApiReviewResponseAttributes, ApiReviewRichInformation, ApiSearchResponseAttributes, ApiSearchResponseProductAttributes, ApiTextResponseAttributes } from "./api/responseGenerics.cjs";
|
|
17
|
-
import { isApiReviewResponseAttributes } from "./guards/api/isApiReviewResponseAttributes.cjs";
|
|
18
|
-
import { isApiReviewRichInformation } from "./guards/api/isApiReviewRichInformation.cjs";
|
|
19
|
-
import { isApiSearchAttributes } from "./guards/api/isApiSearchEventAttributes.cjs";
|
|
20
|
-
import { isSuggestion } from "./guards/api/isApiSuggestion.cjs";
|
|
21
|
-
import { isApiSuggestionClickedAttributes } from "./guards/api/isApiSuggestionClickedEventAttributes.cjs";
|
|
22
|
-
import { isApiTextResponseAttributes } from "./guards/api/isApiTextResponseAttributes.cjs";
|
|
23
|
-
import { isApiUserEvent } from "./guards/api/isApiUserEvent.cjs";
|
|
24
|
-
import { isApiProductSearchResponseAttributes } from "./guards/api/isApiProductSearchAttributes.cjs";
|
|
25
|
-
import { hasPropertyOfType } from "./guards/utils.cjs";
|
|
26
1
|
import { CachedValue } from "./cachedValue.cjs";
|
|
27
2
|
import { ChatElementDisplayLocation } from "./chatElementDisplayLocation.cjs";
|
|
28
3
|
import { ChatElementDisplayLocationV3 } from "./chatElementDisplayLocationV3.cjs";
|
|
@@ -37,6 +12,15 @@ import { OrganizationConfig } from "./api/organizationConfig.cjs";
|
|
|
37
12
|
import { OrgConfig, OrgConfigExperiment, OrgConfigFeatureGate, Organization, OrganizationSettings } from "./api/orgConfigResults.cjs";
|
|
38
13
|
import { FrontendConfig, FrontendConfigOverrides } from "./frontendConfig.cjs";
|
|
39
14
|
import { GoogleAnalyticsEvents } from "./googleAnalyticsEvents.cjs";
|
|
15
|
+
import { Primitive } from "./utilityTypes/primitive.cjs";
|
|
16
|
+
import { Trim } from "./utilityTypes/trim.cjs";
|
|
17
|
+
import { BuiltIns, IsLowerCase, IsNumeric, IsUpperCase, NonRecursiveType, UpperCaseCharacters, Whitespace, WordSeparators } from "./utilityTypes/internal.cjs";
|
|
18
|
+
import { SplitWords } from "./utilityTypes/splitWords.cjs";
|
|
19
|
+
import { CamelCase, CamelCaseOptions } from "./utilityTypes/camelCase.cjs";
|
|
20
|
+
import { UnknownArray } from "./utilityTypes/unknownArray.cjs";
|
|
21
|
+
import { CamelCasedPropertiesDeep } from "./utilityTypes/camelCasedPropertiesDeep.cjs";
|
|
22
|
+
import { ApiFormResponseAttributes, ApiFormResponseSchemaAttributes, ApiPageResponseAttributes, ApiProductSearchFilterResponseAttributes, ApiReviewResponseAttributes, ApiReviewRichInformation, ApiSearchResponseAttributes, ApiSearchResponseProductAttributes, ApiTextResponseAttributes } from "./api/responseGenerics.cjs";
|
|
23
|
+
import { AcceptableFormFieldType, FormResponseAttributes, OrderItemInfo, OrderResponseAttributes, PageResponseAttributes, ProductResponseAttributes, Response, ReviewResponseAttributes, ReviewRichInformation, SearchProductFilterAttributes, SearchProductResponseAttributes, SearchResponseAttributes, SearchResponseProductAttributes, SeparatorResponseAttributes, TextResponseAttributes } from "./api/response.cjs";
|
|
40
24
|
import { FormField, Message, MessageRole, MessageType, ProductMessageMetadata, ProductSearchMessageMetadata } from "./message.cjs";
|
|
41
25
|
import { MobilePLPChatPlacementParameter } from "./mobilePLPChatPlacementParameter.cjs";
|
|
42
26
|
import { OrgShortName } from "./orgsEnum.cjs";
|
|
@@ -50,6 +34,9 @@ import { NextMessageRequest } from "./api/nextMessageRequest.cjs";
|
|
|
50
34
|
import { ProductSearchResponse, ProductSearchResponseAttributes, SearchParams, SearchResult } from "./api/search.cjs";
|
|
51
35
|
import { Suggestion } from "./api/suggestion.cjs";
|
|
52
36
|
import { SupportedEventRequest } from "./api/supportedEventRequest.cjs";
|
|
37
|
+
import { GetMerchantFrontendConfigQueryData, MountingConfigQueryData, PageVariantCheckQueryData, PageVariantQueryData, UIConfigQueryData, WidgetConfigQueryData, WidgetMountingQueryData, getMerchantFrontendConfigQuery } from "./graphql/queries/getMerchantFrontendConfigQuery.cjs";
|
|
38
|
+
import { GetMerchantColorsQueryData, getMerchantColorsQuery } from "./graphql/queries/getMerchantColorsQuery.cjs";
|
|
39
|
+
import { getMerchantOrgIdQuery } from "./graphql/queries/getMerchantOrgIdQuery.cjs";
|
|
53
40
|
import { isBaseEcommerceEvent } from "./guards/isBaseEcommerceEvent.cjs";
|
|
54
41
|
import { isGA4EcommerceEvent } from "./guards/isGA4EcommerceEvent.cjs";
|
|
55
42
|
import { isLegacyUAEcommerceEvent } from "./guards/isLegacyUAEcommerceEvent.cjs";
|
|
@@ -60,6 +47,19 @@ import { PageVisitInfo } from "./variantInfo/pageVisitInfo.cjs";
|
|
|
60
47
|
import { ProductInfo } from "./variantInfo/productInfo.cjs";
|
|
61
48
|
import { PDPVariantInfo, PLPVariantInfo, PageVisitVariantInfo, VariantInfo, VariantType, VariantTypeEnum } from "./variantInfo/variantInfo.cjs";
|
|
62
49
|
import { isVariantInfo } from "./guards/isVariantInfo.cjs";
|
|
50
|
+
import { hasPropertyOfType } from "./guards/utils.cjs";
|
|
51
|
+
import { isApiPDPAttributes } from "./guards/api/isApiPDPEventAttributes.cjs";
|
|
52
|
+
import { isApiQueryTypedAttributes } from "./guards/api/isApiQueryTypedEventAttributes.cjs";
|
|
53
|
+
import { isApiResponse } from "./guards/api/isApiResponse.cjs";
|
|
54
|
+
import { isApiProductResponseAttributes } from "./guards/api/isApiProductResponseAttributes.cjs";
|
|
55
|
+
import { isApiReviewResponseAttributes } from "./guards/api/isApiReviewResponseAttributes.cjs";
|
|
56
|
+
import { isApiReviewRichInformation } from "./guards/api/isApiReviewRichInformation.cjs";
|
|
57
|
+
import { isApiSearchAttributes } from "./guards/api/isApiSearchEventAttributes.cjs";
|
|
58
|
+
import { isSuggestion } from "./guards/api/isApiSuggestion.cjs";
|
|
59
|
+
import { isApiSuggestionClickedAttributes } from "./guards/api/isApiSuggestionClickedEventAttributes.cjs";
|
|
60
|
+
import { isApiTextResponseAttributes } from "./guards/api/isApiTextResponseAttributes.cjs";
|
|
61
|
+
import { isApiUserEvent } from "./guards/api/isApiUserEvent.cjs";
|
|
62
|
+
import { isApiProductSearchResponseAttributes } from "./guards/api/isApiProductSearchAttributes.cjs";
|
|
63
63
|
import { isApiFormResponseAttributes } from "./guards/api/isApiFormResponse.cjs";
|
|
64
64
|
import { isApiFormSubmittedResponseAttributes } from "./guards/api/isApiFormSubmittedResponseAttributes.cjs";
|
|
65
65
|
import { ApiOrderItemInfo, ApiOrderResponseAttributes, isApiOrderResponseAttributes } from "./guards/api/isApiOrderResponseAttributes.cjs";
|
|
@@ -1,28 +1,3 @@
|
|
|
1
|
-
import { GetMerchantFrontendConfigQueryData, MountingConfigQueryData, PageVariantCheckQueryData, PageVariantQueryData, UIConfigQueryData, WidgetConfigQueryData, WidgetMountingQueryData, getMerchantFrontendConfigQuery } from "./graphql/queries/getMerchantFrontendConfigQuery.js";
|
|
2
|
-
import { GetMerchantColorsQueryData, getMerchantColorsQuery } from "./graphql/queries/getMerchantColorsQuery.js";
|
|
3
|
-
import { getMerchantOrgIdQuery } from "./graphql/queries/getMerchantOrgIdQuery.js";
|
|
4
|
-
import { isApiPDPAttributes } from "./guards/api/isApiPDPEventAttributes.js";
|
|
5
|
-
import { isApiQueryTypedAttributes } from "./guards/api/isApiQueryTypedEventAttributes.js";
|
|
6
|
-
import { isApiResponse } from "./guards/api/isApiResponse.js";
|
|
7
|
-
import { isApiProductResponseAttributes } from "./guards/api/isApiProductResponseAttributes.js";
|
|
8
|
-
import { Primitive } from "./utilityTypes/primitive.js";
|
|
9
|
-
import { Trim } from "./utilityTypes/trim.js";
|
|
10
|
-
import { BuiltIns, IsLowerCase, IsNumeric, IsUpperCase, NonRecursiveType, UpperCaseCharacters, Whitespace, WordSeparators } from "./utilityTypes/internal.js";
|
|
11
|
-
import { SplitWords } from "./utilityTypes/splitWords.js";
|
|
12
|
-
import { CamelCase, CamelCaseOptions } from "./utilityTypes/camelCase.js";
|
|
13
|
-
import { UnknownArray } from "./utilityTypes/unknownArray.js";
|
|
14
|
-
import { CamelCasedPropertiesDeep } from "./utilityTypes/camelCasedPropertiesDeep.js";
|
|
15
|
-
import { AcceptableFormFieldType, FormResponseAttributes, OrderItemInfo, OrderResponseAttributes, PageResponseAttributes, ProductResponseAttributes, Response, ReviewResponseAttributes, ReviewRichInformation, SearchProductFilterAttributes, SearchProductResponseAttributes, SearchResponseAttributes, SearchResponseProductAttributes, SeparatorResponseAttributes, TextResponseAttributes } from "./api/response.js";
|
|
16
|
-
import { ApiFormResponseAttributes, ApiFormResponseSchemaAttributes, ApiPageResponseAttributes, ApiProductSearchFilterResponseAttributes, ApiReviewResponseAttributes, ApiReviewRichInformation, ApiSearchResponseAttributes, ApiSearchResponseProductAttributes, ApiTextResponseAttributes } from "./api/responseGenerics.js";
|
|
17
|
-
import { isApiReviewResponseAttributes } from "./guards/api/isApiReviewResponseAttributes.js";
|
|
18
|
-
import { isApiReviewRichInformation } from "./guards/api/isApiReviewRichInformation.js";
|
|
19
|
-
import { isApiSearchAttributes } from "./guards/api/isApiSearchEventAttributes.js";
|
|
20
|
-
import { isSuggestion } from "./guards/api/isApiSuggestion.js";
|
|
21
|
-
import { isApiSuggestionClickedAttributes } from "./guards/api/isApiSuggestionClickedEventAttributes.js";
|
|
22
|
-
import { isApiTextResponseAttributes } from "./guards/api/isApiTextResponseAttributes.js";
|
|
23
|
-
import { isApiUserEvent } from "./guards/api/isApiUserEvent.js";
|
|
24
|
-
import { isApiProductSearchResponseAttributes } from "./guards/api/isApiProductSearchAttributes.js";
|
|
25
|
-
import { hasPropertyOfType } from "./guards/utils.js";
|
|
26
1
|
import { CachedValue } from "./cachedValue.js";
|
|
27
2
|
import { ChatElementDisplayLocation } from "./chatElementDisplayLocation.js";
|
|
28
3
|
import { ChatElementDisplayLocationV3 } from "./chatElementDisplayLocationV3.js";
|
|
@@ -37,6 +12,15 @@ import { OrganizationConfig } from "./api/organizationConfig.js";
|
|
|
37
12
|
import { OrgConfig, OrgConfigExperiment, OrgConfigFeatureGate, Organization, OrganizationSettings } from "./api/orgConfigResults.js";
|
|
38
13
|
import { FrontendConfig, FrontendConfigOverrides } from "./frontendConfig.js";
|
|
39
14
|
import { GoogleAnalyticsEvents } from "./googleAnalyticsEvents.js";
|
|
15
|
+
import { Primitive } from "./utilityTypes/primitive.js";
|
|
16
|
+
import { Trim } from "./utilityTypes/trim.js";
|
|
17
|
+
import { BuiltIns, IsLowerCase, IsNumeric, IsUpperCase, NonRecursiveType, UpperCaseCharacters, Whitespace, WordSeparators } from "./utilityTypes/internal.js";
|
|
18
|
+
import { SplitWords } from "./utilityTypes/splitWords.js";
|
|
19
|
+
import { CamelCase, CamelCaseOptions } from "./utilityTypes/camelCase.js";
|
|
20
|
+
import { UnknownArray } from "./utilityTypes/unknownArray.js";
|
|
21
|
+
import { CamelCasedPropertiesDeep } from "./utilityTypes/camelCasedPropertiesDeep.js";
|
|
22
|
+
import { ApiFormResponseAttributes, ApiFormResponseSchemaAttributes, ApiPageResponseAttributes, ApiProductSearchFilterResponseAttributes, ApiReviewResponseAttributes, ApiReviewRichInformation, ApiSearchResponseAttributes, ApiSearchResponseProductAttributes, ApiTextResponseAttributes } from "./api/responseGenerics.js";
|
|
23
|
+
import { AcceptableFormFieldType, FormResponseAttributes, OrderItemInfo, OrderResponseAttributes, PageResponseAttributes, ProductResponseAttributes, Response, ReviewResponseAttributes, ReviewRichInformation, SearchProductFilterAttributes, SearchProductResponseAttributes, SearchResponseAttributes, SearchResponseProductAttributes, SeparatorResponseAttributes, TextResponseAttributes } from "./api/response.js";
|
|
40
24
|
import { FormField, Message, MessageRole, MessageType, ProductMessageMetadata, ProductSearchMessageMetadata } from "./message.js";
|
|
41
25
|
import { MobilePLPChatPlacementParameter } from "./mobilePLPChatPlacementParameter.js";
|
|
42
26
|
import { OrgShortName } from "./orgsEnum.js";
|
|
@@ -50,6 +34,9 @@ import { NextMessageRequest } from "./api/nextMessageRequest.js";
|
|
|
50
34
|
import { ProductSearchResponse, ProductSearchResponseAttributes, SearchParams, SearchResult } from "./api/search.js";
|
|
51
35
|
import { Suggestion } from "./api/suggestion.js";
|
|
52
36
|
import { SupportedEventRequest } from "./api/supportedEventRequest.js";
|
|
37
|
+
import { GetMerchantFrontendConfigQueryData, MountingConfigQueryData, PageVariantCheckQueryData, PageVariantQueryData, UIConfigQueryData, WidgetConfigQueryData, WidgetMountingQueryData, getMerchantFrontendConfigQuery } from "./graphql/queries/getMerchantFrontendConfigQuery.js";
|
|
38
|
+
import { GetMerchantColorsQueryData, getMerchantColorsQuery } from "./graphql/queries/getMerchantColorsQuery.js";
|
|
39
|
+
import { getMerchantOrgIdQuery } from "./graphql/queries/getMerchantOrgIdQuery.js";
|
|
53
40
|
import { isBaseEcommerceEvent } from "./guards/isBaseEcommerceEvent.js";
|
|
54
41
|
import { isGA4EcommerceEvent } from "./guards/isGA4EcommerceEvent.js";
|
|
55
42
|
import { isLegacyUAEcommerceEvent } from "./guards/isLegacyUAEcommerceEvent.js";
|
|
@@ -60,6 +47,19 @@ import { PageVisitInfo } from "./variantInfo/pageVisitInfo.js";
|
|
|
60
47
|
import { ProductInfo } from "./variantInfo/productInfo.js";
|
|
61
48
|
import { PDPVariantInfo, PLPVariantInfo, PageVisitVariantInfo, VariantInfo, VariantType, VariantTypeEnum } from "./variantInfo/variantInfo.js";
|
|
62
49
|
import { isVariantInfo } from "./guards/isVariantInfo.js";
|
|
50
|
+
import { hasPropertyOfType } from "./guards/utils.js";
|
|
51
|
+
import { isApiPDPAttributes } from "./guards/api/isApiPDPEventAttributes.js";
|
|
52
|
+
import { isApiQueryTypedAttributes } from "./guards/api/isApiQueryTypedEventAttributes.js";
|
|
53
|
+
import { isApiResponse } from "./guards/api/isApiResponse.js";
|
|
54
|
+
import { isApiProductResponseAttributes } from "./guards/api/isApiProductResponseAttributes.js";
|
|
55
|
+
import { isApiReviewResponseAttributes } from "./guards/api/isApiReviewResponseAttributes.js";
|
|
56
|
+
import { isApiReviewRichInformation } from "./guards/api/isApiReviewRichInformation.js";
|
|
57
|
+
import { isApiSearchAttributes } from "./guards/api/isApiSearchEventAttributes.js";
|
|
58
|
+
import { isSuggestion } from "./guards/api/isApiSuggestion.js";
|
|
59
|
+
import { isApiSuggestionClickedAttributes } from "./guards/api/isApiSuggestionClickedEventAttributes.js";
|
|
60
|
+
import { isApiTextResponseAttributes } from "./guards/api/isApiTextResponseAttributes.js";
|
|
61
|
+
import { isApiUserEvent } from "./guards/api/isApiUserEvent.js";
|
|
62
|
+
import { isApiProductSearchResponseAttributes } from "./guards/api/isApiProductSearchAttributes.js";
|
|
63
63
|
import { isApiFormResponseAttributes } from "./guards/api/isApiFormResponse.js";
|
|
64
64
|
import { isApiFormSubmittedResponseAttributes } from "./guards/api/isApiFormSubmittedResponseAttributes.js";
|
|
65
65
|
import { ApiOrderItemInfo, ApiOrderResponseAttributes, isApiOrderResponseAttributes } from "./guards/api/isApiOrderResponseAttributes.js";
|
|
@@ -1,6 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isSuggestion } from "./guards/api/isApiSuggestion.js";
|
|
2
|
+
import { validateSuggestion } from "./validators/validateSuggestion.js";
|
|
3
|
+
import { isApiUserEvent } from "./guards/api/isApiUserEvent.js";
|
|
4
|
+
import { isApiPDPAttributes } from "./guards/api/isApiPDPEventAttributes.js";
|
|
5
|
+
import { isApiQueryTypedAttributes } from "./guards/api/isApiQueryTypedEventAttributes.js";
|
|
6
|
+
import { isApiSearchAttributes } from "./guards/api/isApiSearchEventAttributes.js";
|
|
7
|
+
import { isApiSuggestionClickedAttributes } from "./guards/api/isApiSuggestionClickedEventAttributes.js";
|
|
8
|
+
import { isApiPLPEventAttributes, isApiPLPIdAttribute } from "./guards/api/isApiPLPEventAttributes.js";
|
|
9
|
+
import { hasPropertyOfType } from "./guards/utils.js";
|
|
10
|
+
import { isApiFormSubmittedResponseAttributes } from "./guards/api/isApiFormSubmittedResponseAttributes.js";
|
|
11
|
+
import { validateUserEvent } from "./validators/validateUserEvent.js";
|
|
2
12
|
import { ChatElementDisplayLocation } from "./chatElementDisplayLocation.js";
|
|
3
13
|
import { ChatElementDisplayLocationV3 } from "./chatElementDisplayLocationV3.js";
|
|
14
|
+
import { ColorNames, colorVar } from "./colorsConfig.js";
|
|
4
15
|
import { SpiffyEventName } from "./events.js";
|
|
5
16
|
import { FeatureGates } from "./featureGates.js";
|
|
6
17
|
import { GoogleAnalyticsEvents } from "./googleAnalyticsEvents.js";
|
|
@@ -18,27 +29,18 @@ import { isLegacyUAEcommerceEvent } from "./guards/isLegacyUAEcommerceEvent.js";
|
|
|
18
29
|
import { isMobilePLPChatPlacementParameter } from "./guards/isMobilePLPChatPlacementParameter.js";
|
|
19
30
|
import { isSpanxTakeAQuizCtaParameter } from "./guards/isSpanxTakeAQuizCtaParameter.js";
|
|
20
31
|
import { isVariantInfo } from "./guards/isVariantInfo.js";
|
|
21
|
-
import { hasPropertyOfType } from "./guards/utils.js";
|
|
22
|
-
import { isApiPDPAttributes } from "./guards/api/isApiPDPEventAttributes.js";
|
|
23
|
-
import { isApiQueryTypedAttributes } from "./guards/api/isApiQueryTypedEventAttributes.js";
|
|
24
32
|
import { isApiResponse } from "./guards/api/isApiResponse.js";
|
|
25
33
|
import { isApiProductResponseAttributes } from "./guards/api/isApiProductResponseAttributes.js";
|
|
26
34
|
import { isApiReviewRichInformation } from "./guards/api/isApiReviewRichInformation.js";
|
|
27
35
|
import { isApiReviewResponseAttributes } from "./guards/api/isApiReviewResponseAttributes.js";
|
|
28
|
-
import { isApiSearchAttributes } from "./guards/api/isApiSearchEventAttributes.js";
|
|
29
|
-
import { isSuggestion } from "./guards/api/isApiSuggestion.js";
|
|
30
|
-
import { isApiSuggestionClickedAttributes } from "./guards/api/isApiSuggestionClickedEventAttributes.js";
|
|
31
36
|
import { isApiTextResponseAttributes } from "./guards/api/isApiTextResponseAttributes.js";
|
|
32
|
-
import { isApiUserEvent } from "./guards/api/isApiUserEvent.js";
|
|
33
37
|
import { isApiProductSearchResponseAttributes } from "./guards/api/isApiProductSearchAttributes.js";
|
|
34
38
|
import "./guards/api/index.js";
|
|
35
39
|
import { isApiFormResponseAttributes } from "./guards/api/isApiFormResponse.js";
|
|
36
|
-
import { isApiFormSubmittedResponseAttributes } from "./guards/api/isApiFormSubmittedResponseAttributes.js";
|
|
37
40
|
import { isApiOrderResponseAttributes } from "./guards/api/isApiOrderResponseAttributes.js";
|
|
38
41
|
import { isApiOrganizationConfig } from "./guards/api/isApiOrganizationConfig.js";
|
|
39
42
|
import { isApiOrgConfigResults } from "./guards/api/isApiOrgConfigResults.js";
|
|
40
43
|
import { isApiPageResponseAttributes } from "./guards/api/isApiPageResponseAttributes.js";
|
|
41
|
-
import { isApiPLPEventAttributes, isApiPLPIdAttribute } from "./guards/api/isApiPLPEventAttributes.js";
|
|
42
44
|
import { isApiProductSearchFilterResponseAttributes } from "./guards/api/isApiProductSearchFilterAttributes.js";
|
|
43
45
|
import { isGraphQLColorsConfig } from "./guards/graphQL/isGraphQLColorsConfig.js";
|
|
44
46
|
import { toCamelCase, transformCamelToSnake, transformSnakeToCamel } from "./utils/snakeToCamelTransformer.js";
|
|
@@ -50,8 +52,6 @@ import { validateMobilePLPChatPlacementParameter } from "./validators/validateMo
|
|
|
50
52
|
import { validateOrganizationConfig } from "./validators/validateOrganizationConfig.js";
|
|
51
53
|
import { validateOrgConfigResults } from "./validators/validateOrgConfigResults.js";
|
|
52
54
|
import { validateResponse } from "./validators/validateResponse.js";
|
|
53
|
-
import { validateSuggestion } from "./validators/validateSuggestion.js";
|
|
54
|
-
import { validateUserEvent } from "./validators/validateUserEvent.js";
|
|
55
55
|
import { VariantTypeEnum } from "./variantInfo/variantInfo.js";
|
|
56
56
|
|
|
57
57
|
export { ChatElementDisplayLocation, ChatElementDisplayLocationV3, ColorNames, FeatureGates, GoogleAnalyticsEvents, MessageRole, MessageType, OrgShortName, ProductExperiment, SpiffyEventName, SpiffyWidgets, VariantTypeEnum, colorVar, getMerchantColorsQuery, getMerchantFrontendConfigQuery, getMerchantOrgIdQuery, hasPropertyOfType, isApiFormResponseAttributes, isApiFormSubmittedResponseAttributes, isApiOrderResponseAttributes, isApiOrgConfigResults, isApiOrganizationConfig, isApiPDPAttributes, isApiPLPEventAttributes, isApiPLPIdAttribute, isApiPageResponseAttributes, isApiProductResponseAttributes, isApiProductSearchFilterResponseAttributes, isApiProductSearchResponseAttributes, isApiQueryTypedAttributes, isApiResponse, isApiReviewResponseAttributes, isApiReviewRichInformation, isApiSearchAttributes, isApiSuggestionClickedAttributes, isApiTextResponseAttributes, isApiUserEvent, isBaseEcommerceEvent, isGA4EcommerceEvent, isGraphQLColorsConfig, isLegacyUAEcommerceEvent, isMobilePLPChatPlacementParameter, isSpanxTakeAQuizCtaParameter, isSuggestion, isVariantInfo, stringToFulfillmentDisplayStatusEnumValue, toCamelCase, transformCamelToSnake, transformSnakeToCamel, validateAndTransformMountingConfig, validateAndTransformPageVariants, validateAndTransformWidgetConfig, validateGraphQLColorsConfig, validateGraphQLFrontendConfig, validateGraphQLOrgId, validateMobilePLPChatPlacementParameter, validateOrgConfigResults, validateOrganizationConfig, validateResponse, validateSuggestion, validateUserEvent };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_contexts_types = require('../../../contexts/types.cjs');
|
|
2
1
|
const require_logger = require('../../logging/logger.cjs');
|
|
3
2
|
const require_snakeToCamelTransformer = require('../utils/snakeToCamelTransformer.cjs');
|
|
3
|
+
const require_contexts_types = require('../../../contexts/types.cjs');
|
|
4
4
|
const require_domInsertion = require('../../../merchants/domInsertion.cjs');
|
|
5
5
|
const require_gridInsertion = require('../../../merchants/gridInsertion.cjs');
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { PageVariantTestType } from "../../../contexts/types.js";
|
|
2
1
|
import logger_default from "../../logging/logger.js";
|
|
3
2
|
import { transformSnakeToCamel } from "../utils/snakeToCamelTransformer.js";
|
|
3
|
+
import { PageVariantTestType } from "../../../contexts/types.js";
|
|
4
4
|
import { DOMInsertionType } from "../../../merchants/domInsertion.js";
|
|
5
5
|
import { GridInsertionType } from "../../../merchants/gridInsertion.js";
|
|
6
6
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_isApiUserEvent = require('../guards/api/isApiUserEvent.cjs');
|
|
2
3
|
const require_isApiPDPEventAttributes = require('../guards/api/isApiPDPEventAttributes.cjs');
|
|
3
4
|
const require_isApiQueryTypedEventAttributes = require('../guards/api/isApiQueryTypedEventAttributes.cjs');
|
|
4
5
|
const require_isApiSearchEventAttributes = require('../guards/api/isApiSearchEventAttributes.cjs');
|
|
5
6
|
const require_isApiSuggestionClickedEventAttributes = require('../guards/api/isApiSuggestionClickedEventAttributes.cjs');
|
|
6
|
-
const require_isApiUserEvent = require('../guards/api/isApiUserEvent.cjs');
|
|
7
|
-
const require_isApiFormSubmittedResponseAttributes = require('../guards/api/isApiFormSubmittedResponseAttributes.cjs');
|
|
8
7
|
const require_isApiPLPEventAttributes = require('../guards/api/isApiPLPEventAttributes.cjs');
|
|
8
|
+
const require_isApiFormSubmittedResponseAttributes = require('../guards/api/isApiFormSubmittedResponseAttributes.cjs');
|
|
9
9
|
let __spiffy_ai_commerce_api_client = require("@spiffy-ai/commerce-api-client");
|
|
10
10
|
|
|
11
11
|
//#region src/application/models/validators/validateUserEvent.ts
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { isApiUserEvent } from "../guards/api/isApiUserEvent.js";
|
|
1
2
|
import { isApiPDPAttributes } from "../guards/api/isApiPDPEventAttributes.js";
|
|
2
3
|
import { isApiQueryTypedAttributes } from "../guards/api/isApiQueryTypedEventAttributes.js";
|
|
3
4
|
import { isApiSearchAttributes } from "../guards/api/isApiSearchEventAttributes.js";
|
|
4
5
|
import { isApiSuggestionClickedAttributes } from "../guards/api/isApiSuggestionClickedEventAttributes.js";
|
|
5
|
-
import { isApiUserEvent } from "../guards/api/isApiUserEvent.js";
|
|
6
|
-
import { isApiFormSubmittedResponseAttributes } from "../guards/api/isApiFormSubmittedResponseAttributes.js";
|
|
7
6
|
import { isApiPLPEventAttributes, isApiPLPIdAttribute } from "../guards/api/isApiPLPEventAttributes.js";
|
|
7
|
+
import { isApiFormSubmittedResponseAttributes } from "../guards/api/isApiFormSubmittedResponseAttributes.js";
|
|
8
8
|
import { UserEventCategory } from "@spiffy-ai/commerce-api-client";
|
|
9
9
|
|
|
10
10
|
//#region src/application/models/validators/validateUserEvent.ts
|
|
@@ -7,9 +7,10 @@ let VariantTypeEnum = /* @__PURE__ */ function(VariantTypeEnum$1) {
|
|
|
7
7
|
VariantTypeEnum$1["Home"] = "homepage";
|
|
8
8
|
VariantTypeEnum$1["Search"] = "search";
|
|
9
9
|
VariantTypeEnum$1["Other"] = "other";
|
|
10
|
+
VariantTypeEnum$1["FullPageSalesAgent"] = "full_page";
|
|
10
11
|
return VariantTypeEnum$1;
|
|
11
12
|
}({});
|
|
12
13
|
|
|
13
14
|
//#endregion
|
|
14
15
|
exports.VariantTypeEnum = VariantTypeEnum;
|
|
15
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
16
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFyaWFudEluZm8uY2pzIiwibmFtZXMiOltdLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9hcHBsaWNhdGlvbi9tb2RlbHMvdmFyaWFudEluZm8vdmFyaWFudEluZm8udHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgUExQSW5mbyB9IGZyb20gJy4vcGxwSW5mbyc7XG5pbXBvcnQgeyBQYWdlVmlzaXRJbmZvIH0gZnJvbSAnLi9wYWdlVmlzaXRJbmZvJztcbmltcG9ydCB7IFByb2R1Y3RJbmZvIH0gZnJvbSAnLi9wcm9kdWN0SW5mbyc7XG5pbXBvcnQgeyBTaG93RmxvYXRpbmdCdXR0b25PcHRpb25zIH0gZnJvbSAnc3JjL2NvbnRleHRzL3R5cGVzJztcblxuZXhwb3J0IGVudW0gVmFyaWFudFR5cGVFbnVtIHtcbiAgUGRwID0gJ3BkcCcsXG4gIFBscCA9ICdwbHAnLFxuICBQYWdlVmlzaXQgPSAncGFnZV92aXNpdCcsXG4gIEhvbWUgPSAnaG9tZXBhZ2UnLFxuICBTZWFyY2ggPSAnc2VhcmNoJyxcbiAgT3RoZXIgPSAnb3RoZXInLFxuICBGdWxsUGFnZVNhbGVzQWdlbnQgPSAnZnVsbF9wYWdlJyxcbn1cblxuZXhwb3J0IHR5cGUgVmFyaWFudFR5cGUgPSAncGRwJyB8ICdwbHAnIHwgJ3BhZ2VfdmlzaXQnO1xuXG5leHBvcnQgdHlwZSBWYXJpYW50SW5mbyA9IFBEUFZhcmlhbnRJbmZvIHwgUExQVmFyaWFudEluZm8gfCBQYWdlVmlzaXRWYXJpYW50SW5mbztcblxuZXhwb3J0IHR5cGUgUERQVmFyaWFudEluZm8gPSB7XG4gIGZsb2F0aW5nQnV0dG9uT3ZlcnJpZGU/OiBTaG93RmxvYXRpbmdCdXR0b25PcHRpb25zO1xuICB2YXJpYW50SWQ6IHN0cmluZztcbiAgdmFyaWFudDogVmFyaWFudFR5cGVFbnVtLlBkcDtcbn0gJiBQcm9kdWN0SW5mbztcblxuZXhwb3J0IHR5cGUgUExQVmFyaWFudEluZm8gPSB7XG4gIGZsb2F0aW5nQnV0dG9uT3ZlcnJpZGU/OiBTaG93RmxvYXRpbmdCdXR0b25PcHRpb25zO1xuICB2YXJpYW50SWQ6IHN0cmluZztcbiAgdmFyaWFudDogVmFyaWFudFR5cGVFbnVtLlBscDtcbiAgdXJsPzogc3RyaW5nO1xufSAmIFBMUEluZm87XG5cbmV4cG9ydCB0eXBlIFBhZ2VWaXNpdFZhcmlhbnRJbmZvID0ge1xuICBmbG9hdGluZ0J1dHRvbk92ZXJyaWRlPzogU2hvd0Zsb2F0aW5nQnV0dG9uT3B0aW9ucztcbiAgdmFyaWFudElkOiBzdHJpbmc7XG4gIHZhcmlhbnQ6IFZhcmlhbnRUeXBlRW51bS5QYWdlVmlzaXQ7XG59ICYgUGFnZVZpc2l0SW5mbztcbiJdLCJtYXBwaW5ncyI6Ijs7QUFLQSxJQUFZLDhEQUFMO0FBQ0w7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EifQ==
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ShowFloatingButtonOptions } from "../../../contexts/types.cjs";
|
|
1
2
|
import { PLPInfo } from "./plpInfo.cjs";
|
|
2
3
|
import { PageVisitInfo } from "./pageVisitInfo.cjs";
|
|
3
4
|
import { ProductInfo } from "./productInfo.cjs";
|
|
@@ -10,22 +11,26 @@ declare enum VariantTypeEnum {
|
|
|
10
11
|
Home = "homepage",
|
|
11
12
|
Search = "search",
|
|
12
13
|
Other = "other",
|
|
14
|
+
FullPageSalesAgent = "full_page",
|
|
13
15
|
}
|
|
14
16
|
type VariantType = 'pdp' | 'plp' | 'page_visit';
|
|
15
17
|
type VariantInfo = PDPVariantInfo | PLPVariantInfo | PageVisitVariantInfo;
|
|
16
18
|
type PDPVariantInfo = {
|
|
19
|
+
floatingButtonOverride?: ShowFloatingButtonOptions;
|
|
17
20
|
variantId: string;
|
|
18
21
|
variant: VariantTypeEnum.Pdp;
|
|
19
22
|
} & ProductInfo;
|
|
20
23
|
type PLPVariantInfo = {
|
|
24
|
+
floatingButtonOverride?: ShowFloatingButtonOptions;
|
|
21
25
|
variantId: string;
|
|
22
26
|
variant: VariantTypeEnum.Plp;
|
|
23
27
|
url?: string;
|
|
24
28
|
} & PLPInfo;
|
|
25
29
|
type PageVisitVariantInfo = {
|
|
30
|
+
floatingButtonOverride?: ShowFloatingButtonOptions;
|
|
26
31
|
variantId: string;
|
|
27
32
|
variant: VariantTypeEnum.PageVisit;
|
|
28
33
|
} & PageVisitInfo;
|
|
29
34
|
//#endregion
|
|
30
35
|
export { PDPVariantInfo, PLPVariantInfo, PageVisitVariantInfo, VariantInfo, VariantType, VariantTypeEnum };
|
|
31
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
36
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFyaWFudEluZm8uZC5jdHMiLCJuYW1lcyI6W10sInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2FwcGxpY2F0aW9uL21vZGVscy92YXJpYW50SW5mby92YXJpYW50SW5mby5kLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFBMUEluZm8gfSBmcm9tICcuL3BscEluZm8nO1xuaW1wb3J0IHsgUGFnZVZpc2l0SW5mbyB9IGZyb20gJy4vcGFnZVZpc2l0SW5mbyc7XG5pbXBvcnQgeyBQcm9kdWN0SW5mbyB9IGZyb20gJy4vcHJvZHVjdEluZm8nO1xuaW1wb3J0IHsgU2h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mxvYXRpbmdCdXR0b25PdmVycmlkZT86IFNob3dGbG9hdGluZ0J1dHRvbk9wdGlvbnM7XG4gICAgdmFyaWFudElkOiBzdHJpbmc7XG4gICAgdmFyaWFudDogVmFyaWFudFR5cGVFbnVtLlBhZ2VWaXNpdDtcbn0gJiBQYWdlVmlzaXRJbmZvO1xuIl0sIm1hcHBpbmdzIjoiOzs7Ozs7QUFJQSxJQUFXLGtCQUFrQixDQUFDLElBQUk7QUFDbEMsSUFBVyxjQUFJLENBQUEsSUFBQTtBQUNmLElBQVcsY0FBSTtDQUFBO09BQUE7T0FBQTtPQUFBO0NBQUE7QUFDZixJQUFXLGlCQUFpQjtDQUFBO09BQUE7T0FBQSxnQkFBQTtPQUFBO0NBQUE7QUFDNUIsSUFBVyxpQkFBVTtDQUFBO09BQUE7T0FBQSxnQkFBQTtPQUFBO0NBQUE7QUFDckIsSUFBVyx1QkFBVTtDQUFBO09BQUE7T0FBQSxnQkFBQTtPQUFBO0NBQUEifQ==
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ShowFloatingButtonOptions } from "../../../contexts/types.js";
|
|
1
2
|
import { PLPInfo } from "./plpInfo.js";
|
|
2
3
|
import { PageVisitInfo } from "./pageVisitInfo.js";
|
|
3
4
|
import { ProductInfo } from "./productInfo.js";
|
|
@@ -10,22 +11,26 @@ declare enum VariantTypeEnum {
|
|
|
10
11
|
Home = "homepage",
|
|
11
12
|
Search = "search",
|
|
12
13
|
Other = "other",
|
|
14
|
+
FullPageSalesAgent = "full_page",
|
|
13
15
|
}
|
|
14
16
|
type VariantType = 'pdp' | 'plp' | 'page_visit';
|
|
15
17
|
type VariantInfo = PDPVariantInfo | PLPVariantInfo | PageVisitVariantInfo;
|
|
16
18
|
type PDPVariantInfo = {
|
|
19
|
+
floatingButtonOverride?: ShowFloatingButtonOptions;
|
|
17
20
|
variantId: string;
|
|
18
21
|
variant: VariantTypeEnum.Pdp;
|
|
19
22
|
} & ProductInfo;
|
|
20
23
|
type PLPVariantInfo = {
|
|
24
|
+
floatingButtonOverride?: ShowFloatingButtonOptions;
|
|
21
25
|
variantId: string;
|
|
22
26
|
variant: VariantTypeEnum.Plp;
|
|
23
27
|
url?: string;
|
|
24
28
|
} & PLPInfo;
|
|
25
29
|
type PageVisitVariantInfo = {
|
|
30
|
+
floatingButtonOverride?: ShowFloatingButtonOptions;
|
|
26
31
|
variantId: string;
|
|
27
32
|
variant: VariantTypeEnum.PageVisit;
|
|
28
33
|
} & PageVisitInfo;
|
|
29
34
|
//#endregion
|
|
30
35
|
export { PDPVariantInfo, PLPVariantInfo, PageVisitVariantInfo, VariantInfo, VariantType, VariantTypeEnum };
|
|
31
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
36
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFyaWFudEluZm8uZC50cyIsIm5hbWVzIjpbXSwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvYXBwbGljYXRpb24vbW9kZWxzL3ZhcmlhbnRJbmZvL3ZhcmlhbnRJbmZvLmQudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgUExQSW5mbyB9IGZyb20gJy4vcGxwSW5mbyc7XG5pbXBvcnQgeyBQYWdlVmlzaXRJbmZvIH0gZnJvbSAnLi9wYWdlVmlzaXRJbmZvJztcbmltcG9ydCB7IFByb2R1Y3RJbmZvIH0gZnJvbSAnLi9wcm9kdWN0SW5mbyc7XG5pbXBvcnQgeyBTaG93RmxvYXRpbmdCdXR0b25PcHRpb25zIH0gZnJvbSAnc3JjL2NvbnRleHRzL3R5cGVzJztcbmV4cG9ydCBkZWNsYXJlIGVudW0gVmFyaWFudFR5cGVFbnVtIHtcbiAgICBQZHAgPSBcInBkcFwiLFxuICAgIFBscCA9IFwicGxwXCIsXG4gICAgUGFnZVZpc2l0ID0gXCJwYWdlX3Zpc2l0XCIsXG4gICAgSG9tZSA9IFwiaG9t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BQUMsSUFBSTtBQUNsQyxJQUFXLGNBQUksQ0FBQSxJQUFBO0FBQ2YsSUFBVyxjQUFJO0NBQUE7T0FBQTtPQUFBO09BQUE7Q0FBQTtBQUNmLElBQVcsaUJBQWlCO0NBQUE7T0FBQTtPQUFBLGdCQUFBO09BQUE7Q0FBQTtBQUM1QixJQUFXLGlCQUFVO0NBQUE7T0FBQTtPQUFBLGdCQUFBO09BQUE7Q0FBQTtBQUNyQixJQUFXLHVCQUFVO0NBQUE7T0FBQTtPQUFBLGdCQUFBO09BQUE7Q0FBQSJ9
|
|
@@ -6,9 +6,10 @@ let VariantTypeEnum = /* @__PURE__ */ function(VariantTypeEnum$1) {
|
|
|
6
6
|
VariantTypeEnum$1["Home"] = "homepage";
|
|
7
7
|
VariantTypeEnum$1["Search"] = "search";
|
|
8
8
|
VariantTypeEnum$1["Other"] = "other";
|
|
9
|
+
VariantTypeEnum$1["FullPageSalesAgent"] = "full_page";
|
|
9
10
|
return VariantTypeEnum$1;
|
|
10
11
|
}({});
|
|
11
12
|
|
|
12
13
|
//#endregion
|
|
13
14
|
export { VariantTypeEnum };
|
|
14
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
15
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFyaWFudEluZm8uanMiLCJuYW1lcyI6W10sInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2FwcGxpY2F0aW9uL21vZGVscy92YXJpYW50SW5mby92YXJpYW50SW5mby50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBQTFBJbmZvIH0gZnJvbSAnLi9wbHBJbmZvJztcbmltcG9ydCB7IFBhZ2VWaXNpdEluZm8gfSBmcm9tICcuL3BhZ2VWaXNpdEluZm8nO1xuaW1wb3J0IHsgUHJvZHVjdEluZm8gfSBmcm9tICcuL3Byb2R1Y3RJbmZvJztcbmltcG9ydCB7IFNob3dGbG9hdG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XR0b25PcHRpb25zO1xuICB2YXJpYW50SWQ6IHN0cmluZztcbiAgdmFyaWFudDogVmFyaWFudFR5cGVFbnVtLlBhZ2VWaXNpdDtcbn0gJiBQYWdlVmlzaXRJbmZvO1xuIl0sIm1hcHBpbmdzIjoiO0FBS0EsSUFBWSw4REFBTDtBQUNMO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIn0=
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
const require_logger = require('../logging/logger.cjs');
|
|
1
2
|
const require_isBaseEcommerceEvent = require('../models/guards/isBaseEcommerceEvent.cjs');
|
|
2
3
|
const require_isGA4EcommerceEvent = require('../models/guards/isGA4EcommerceEvent.cjs');
|
|
3
4
|
const require_isLegacyUAEcommerceEvent = require('../models/guards/isLegacyUAEcommerceEvent.cjs');
|
|
4
|
-
const require_logger = require('../logging/logger.cjs');
|
|
5
5
|
require('../models/index.cjs');
|
|
6
6
|
const require_amplitudeService = require('../../services/amplitudeService/amplitudeService.cjs');
|
|
7
7
|
require('../../contexts/amplitudeContext/amplitudeContext.cjs');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import logger_default from "../logging/logger.js";
|
|
1
2
|
import { isBaseEcommerceEvent } from "../models/guards/isBaseEcommerceEvent.js";
|
|
2
3
|
import { isGA4EcommerceEvent } from "../models/guards/isGA4EcommerceEvent.js";
|
|
3
4
|
import { isLegacyUAEcommerceEvent } from "../models/guards/isLegacyUAEcommerceEvent.js";
|
|
4
|
-
import logger_default from "../logging/logger.js";
|
|
5
5
|
import "../models/index.js";
|
|
6
6
|
import { SpiffyMetricsEventName } from "../../services/amplitudeService/amplitudeService.js";
|
|
7
7
|
import "../../contexts/amplitudeContext/amplitudeContext.js";
|
|
@@ -5,10 +5,12 @@ const apiWidgetStringToCoreWidgetString = (apiWidgetString) => ({
|
|
|
5
5
|
value: apiWidgetString.text
|
|
6
6
|
});
|
|
7
7
|
const apiWidgetTextResponseToCoreWidgetText = (apiRequest, apiWidgetTextResponse) => ({
|
|
8
|
+
requestId: apiWidgetTextResponse.request_id ?? "unknown",
|
|
9
|
+
responseId: apiWidgetTextResponse.id ?? "unknown",
|
|
8
10
|
language: apiRequest.language,
|
|
9
11
|
values: Object.fromEntries(Object.entries(apiWidgetTextResponse.widget_text).map(([key, value]) => [key, value.map(apiWidgetStringToCoreWidgetString)]))
|
|
10
12
|
});
|
|
11
13
|
|
|
12
14
|
//#endregion
|
|
13
15
|
exports.apiWidgetTextResponseToCoreWidgetText = apiWidgetTextResponseToCoreWidgetText;
|
|
14
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
16
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2lkZ2V0VGV4dEZyb21BcGlXaWRnZXRUZXh0UmVzcG9uc2UuY2pzIiwibmFtZXMiOltdLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9hcHBsaWNhdGlvbi91dGlscy93aWRnZXRUZXh0RnJvbUFwaVdpZGdldFRleHRSZXNwb25zZS50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge1xuICBXaWRnZXRTdHJpbmcgYXMgQXBpV2lkZ2V0U3RyaW5nLFxuICBXaWRnZXRUZXh0UmVxdWVzdCBhcyBBcGlXaWRnZXRUZXh0UmVxdWVzdCxcbiAgV2lkZ2V0VGV4dFJlc3BvbnNlIGFzIEFwaVdpZGdldFRleHRSZXNwb25zZSxcbn0gZnJvbSAnQHNwaWZmeS1haS9jb21tZXJjZS1hcGktY2xpZW50JztcblxuaW1wb3J0IHtcbiAgV2lkZ2V0U3RyaW5nIGFzIENvcmVXaWRnZXRTdHJpbmcsXG4gIFdpZGdldFRleHQgYXMgQ29yZVdpZGdldFRleHQsXG59IGZyb20gJy4uL21vZGVscy9hcGkvd2lkZ2V0VGV4dCc7XG5cbmV4cG9ydCBjb25zdCBhcGlXaWRnZXRTdHJpbmdUb0NvcmVXaWRnZ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LGNBQWM7Q0FDL0MsWUFBWSxzQkFBc0IsTUFBTTtDQUN4QyxVQUFVLFdBQVc7Q0FDckIsUUFBUSxPQUFPLFlBQ2IsT0FBTyxRQUFRLHNCQUFzQixZQUFZLENBQUMsS0FBSyxDQUFDLEtBQUssV0FBVyxDQUN0RSxLQUNBLE1BQU0sSUFBSSxrQ0FBa0MsQ0FDN0MsQ0FBQyxDQUNIO0NBQ0YifQ==
|
|
@@ -4,10 +4,12 @@ const apiWidgetStringToCoreWidgetString = (apiWidgetString) => ({
|
|
|
4
4
|
value: apiWidgetString.text
|
|
5
5
|
});
|
|
6
6
|
const apiWidgetTextResponseToCoreWidgetText = (apiRequest, apiWidgetTextResponse) => ({
|
|
7
|
+
requestId: apiWidgetTextResponse.request_id ?? "unknown",
|
|
8
|
+
responseId: apiWidgetTextResponse.id ?? "unknown",
|
|
7
9
|
language: apiRequest.language,
|
|
8
10
|
values: Object.fromEntries(Object.entries(apiWidgetTextResponse.widget_text).map(([key, value]) => [key, value.map(apiWidgetStringToCoreWidgetString)]))
|
|
9
11
|
});
|
|
10
12
|
|
|
11
13
|
//#endregion
|
|
12
14
|
export { apiWidgetTextResponseToCoreWidgetText };
|
|
13
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2lkZ2V0VGV4dEZyb21BcGlXaWRnZXRUZXh0UmVzcG9uc2UuanMiLCJuYW1lcyI6W10sInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2FwcGxpY2F0aW9uL3V0aWxzL3dpZGdldFRleHRGcm9tQXBpV2lkZ2V0VGV4dFJlc3BvbnNlLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7XG4gIFdpZGdldFN0cmluZyBhcyBBcGlXaWRnZXRTdHJpbmcsXG4gIFdpZGdldFRleHRSZXF1ZXN0IGFzIEFwaVdpZGdldFRleHRSZXF1ZXN0LFxuICBXaWRnZXRUZXh0UmVzcG9uc2UgYX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