@gfed-medusa/sf-lib-common 3.10.0 → 3.11.0
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/components/breadcrumbs/index.d.ts +2 -2
- package/dist/components/cart-mismatch-banner/index.d.ts +2 -2
- package/dist/components/delete-button/index.d.ts +2 -2
- package/dist/components/error-message/index.d.ts +2 -2
- package/dist/components/free-shipping-price-nudge/index.d.ts +2 -2
- package/dist/components/interactive-link/index.d.ts +2 -2
- package/dist/components/line-item-options/index.d.ts +2 -2
- package/dist/components/line-item-price/index.d.ts +2 -2
- package/dist/components/line-item-price/index.d.ts.map +1 -1
- package/dist/components/localized-client-link/index.d.ts +2 -2
- package/dist/components/modal/index.d.ts +2 -2
- package/dist/components/modal/index.d.ts.map +1 -1
- package/dist/components/personalized-content/components/featured-category-rail.d.ts +2 -2
- package/dist/components/personalized-content/components/hero-banner.d.ts +2 -2
- package/dist/components/personalized-content/components/hero-banner.d.ts.map +1 -1
- package/dist/components/preview-price/index.d.ts +2 -2
- package/dist/components/product-card/index.d.ts +2 -2
- package/dist/components/product-card/index.d.ts.map +1 -1
- package/dist/components/product-preview/index.d.ts +2 -2
- package/dist/components/product-preview/index.d.ts.map +1 -1
- package/dist/components/submit-button/index.d.ts +2 -2
- package/dist/components/submit-button/index.d.ts.map +1 -1
- package/dist/lib/context/apollo-context.d.ts +2 -2
- package/dist/lib/context/modal-context.d.ts +2 -2
- package/dist/lib/data/context.d.ts +2 -2
- package/dist/lib/data/personalization.d.ts +3 -4
- package/dist/lib/data/personalization.d.ts.map +1 -1
- package/dist/lib/data/personalization.js +5 -7
- package/dist/lib/data/personalization.js.map +1 -1
- package/dist/lib/gql/fragments/cart.d.ts +9 -9
- package/dist/lib/gql/fragments/customer.d.ts +3 -3
- package/dist/lib/gql/fragments/customer.d.ts.map +1 -1
- package/dist/lib/gql/queries/cart.d.ts +2 -2
- package/dist/lib/gql/queries/collections.d.ts +3 -3
- package/dist/lib/gql/queries/collections.d.ts.map +1 -1
- package/dist/lib/gql/queries/customer.d.ts +2 -2
- package/dist/lib/gql/queries/footer.d.ts +3 -3
- package/dist/lib/gql/queries/order.d.ts +4 -4
- package/dist/lib/gql/queries/product-personalization.d.ts +2 -2
- package/dist/lib/gql/queries/product.d.ts +2 -2
- package/dist/lib/gql/queries/regions.d.ts +3 -3
- package/dist/lib/gql/queries/shipping.d.ts +3 -3
- package/dist/lib/hooks/use-apollo.d.ts +2 -2
- package/dist/lib/hooks/use-apollo.d.ts.map +1 -1
- package/dist/lib/personalization/client-signal.d.ts +2 -10
- package/dist/lib/personalization/client-signal.d.ts.map +1 -1
- package/dist/lib/personalization/client-signal.js +2 -49
- package/dist/lib/personalization/client-signal.js.map +1 -1
- package/dist/lib/personalization/personalization-gql.d.ts +4 -4
- package/dist/lib/personalization/personalization-gql.js +2 -2
- package/dist/lib/personalization/personalization-gql.js.map +1 -1
- package/dist/types/graphql.d.ts +46 -62
- package/dist/types/graphql.d.ts.map +1 -1
- package/dist/types/graphql.js +38 -351
- package/dist/types/graphql.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-apollo.d.ts","names":[],"sources":["../../../src/lib/hooks/use-apollo.tsx"],"sourcesContent":[],"mappings":";;;iBAIgB,SAAA,CAAA,GAAS,
|
|
1
|
+
{"version":3,"file":"use-apollo.d.ts","names":[],"sources":["../../../src/lib/hooks/use-apollo.tsx"],"sourcesContent":[],"mappings":";;;iBAIgB,SAAA,CAAA,GAAS,gBAAA,CAAA"}
|
|
@@ -2,11 +2,6 @@ import { SignalType } from "../../types/graphql.js";
|
|
|
2
2
|
|
|
3
3
|
//#region src/lib/personalization/client-signal.d.ts
|
|
4
4
|
|
|
5
|
-
/**
|
|
6
|
-
* Resets the cached user ID. Call this after login/logout to ensure
|
|
7
|
-
* subsequent signals carry the correct userId.
|
|
8
|
-
*/
|
|
9
|
-
declare function invalidateUserId(): void;
|
|
10
5
|
/**
|
|
11
6
|
* Sends a personalization signal from the browser.
|
|
12
7
|
*
|
|
@@ -16,11 +11,8 @@ declare function invalidateUserId(): void;
|
|
|
16
11
|
*
|
|
17
12
|
* For server-side signals, use `sendSignal()` from `@gfed-medusa/sf-lib-common/lib/data/personalization`
|
|
18
13
|
* which creates an authenticated client with the API key.
|
|
19
|
-
*
|
|
20
|
-
* If `userId` is not provided, it is automatically resolved by fetching
|
|
21
|
-
* `/api/horz/customer` (cached once per page session).
|
|
22
14
|
*/
|
|
23
|
-
declare function sendClientSignal(type: SignalType, payload?: Record<string, unknown
|
|
15
|
+
declare function sendClientSignal(type: SignalType, payload?: Record<string, unknown>): Promise<boolean>;
|
|
24
16
|
//#endregion
|
|
25
|
-
export {
|
|
17
|
+
export { sendClientSignal };
|
|
26
18
|
//# sourceMappingURL=client-signal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-signal.d.ts","names":[],"sources":["../../../src/lib/personalization/client-signal.ts"],"sourcesContent":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"client-signal.d.ts","names":[],"sources":["../../../src/lib/personalization/client-signal.ts"],"sourcesContent":[],"mappings":";;;;;;AAeA;;;;;;;;iBAAsB,gBAAA,OACd,sBACI,0BACT"}
|
|
@@ -3,48 +3,6 @@ import { SEND_SIGNAL_MUTATION } from "./personalization-gql.js";
|
|
|
3
3
|
import { getDeviceId } from "./device-id.js";
|
|
4
4
|
|
|
5
5
|
//#region src/lib/personalization/client-signal.ts
|
|
6
|
-
const USER_ID_FETCH_TIMEOUT_MS = 3e3;
|
|
7
|
-
let resolvedUserId;
|
|
8
|
-
let userIdPromise = null;
|
|
9
|
-
let userIdChecked = false;
|
|
10
|
-
/**
|
|
11
|
-
* Resolves the current user's ID by fetching /api/horz/customer.
|
|
12
|
-
* Results are cached module-globally so the endpoint is only called once
|
|
13
|
-
* per page session (the cache resets on module reload / page refresh).
|
|
14
|
-
*
|
|
15
|
-
* Uses AbortController with a 3-second timeout so that signals are never
|
|
16
|
-
* blocked if the endpoint is unresponsive.
|
|
17
|
-
*/
|
|
18
|
-
async function resolveUserId() {
|
|
19
|
-
if (userIdChecked) return resolvedUserId;
|
|
20
|
-
if (userIdPromise) return userIdPromise;
|
|
21
|
-
userIdPromise = (async () => {
|
|
22
|
-
const controller = new AbortController();
|
|
23
|
-
const timeoutId = setTimeout(() => controller.abort(), USER_ID_FETCH_TIMEOUT_MS);
|
|
24
|
-
try {
|
|
25
|
-
const res = await fetch("/api/horz/customer", {
|
|
26
|
-
credentials: "include",
|
|
27
|
-
signal: controller.signal
|
|
28
|
-
});
|
|
29
|
-
if (res.ok) resolvedUserId = (await res.json())?.customer?.id ?? void 0;
|
|
30
|
-
} catch {} finally {
|
|
31
|
-
clearTimeout(timeoutId);
|
|
32
|
-
}
|
|
33
|
-
userIdChecked = true;
|
|
34
|
-
userIdPromise = null;
|
|
35
|
-
return resolvedUserId;
|
|
36
|
-
})();
|
|
37
|
-
return userIdPromise;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Resets the cached user ID. Call this after login/logout to ensure
|
|
41
|
-
* subsequent signals carry the correct userId.
|
|
42
|
-
*/
|
|
43
|
-
function invalidateUserId() {
|
|
44
|
-
resolvedUserId = void 0;
|
|
45
|
-
userIdPromise = null;
|
|
46
|
-
userIdChecked = false;
|
|
47
|
-
}
|
|
48
6
|
/**
|
|
49
7
|
* Sends a personalization signal from the browser.
|
|
50
8
|
*
|
|
@@ -54,14 +12,10 @@ function invalidateUserId() {
|
|
|
54
12
|
*
|
|
55
13
|
* For server-side signals, use `sendSignal()` from `@gfed-medusa/sf-lib-common/lib/data/personalization`
|
|
56
14
|
* which creates an authenticated client with the API key.
|
|
57
|
-
*
|
|
58
|
-
* If `userId` is not provided, it is automatically resolved by fetching
|
|
59
|
-
* `/api/horz/customer` (cached once per page session).
|
|
60
15
|
*/
|
|
61
|
-
async function sendClientSignal(type, payload
|
|
16
|
+
async function sendClientSignal(type, payload) {
|
|
62
17
|
const deviceId = getDeviceId();
|
|
63
18
|
if (!deviceId) return false;
|
|
64
|
-
if (!userId) userId = await resolveUserId();
|
|
65
19
|
const input = {
|
|
66
20
|
deviceId,
|
|
67
21
|
type,
|
|
@@ -69,7 +23,6 @@ async function sendClientSignal(type, payload, userId) {
|
|
|
69
23
|
url: typeof window !== "undefined" ? window.location.href : void 0,
|
|
70
24
|
timestamp: Date.now()
|
|
71
25
|
};
|
|
72
|
-
if (userId) input.userId = userId;
|
|
73
26
|
try {
|
|
74
27
|
await graphqlMutation({
|
|
75
28
|
mutation: SEND_SIGNAL_MUTATION,
|
|
@@ -101,5 +54,5 @@ async function sendClientSignal(type, payload, userId) {
|
|
|
101
54
|
}
|
|
102
55
|
|
|
103
56
|
//#endregion
|
|
104
|
-
export {
|
|
57
|
+
export { sendClientSignal };
|
|
105
58
|
//# sourceMappingURL=client-signal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-signal.js","names":["
|
|
1
|
+
{"version":3,"file":"client-signal.js","names":["input: SignalInput"],"sources":["../../../src/lib/personalization/client-signal.ts"],"sourcesContent":["import { graphqlMutation } from '@/lib/gql/apollo-client';\nimport { SEND_SIGNAL_MUTATION } from '@/lib/personalization/personalization-gql';\nimport { getDeviceId } from '@/lib/personalization/device-id';\nimport type { SignalInput, SignalType } from '@/types/graphql';\n\n/**\n * Sends a personalization signal from the browser.\n *\n * Uses the default Apollo client which proxies through the shell's /api/graphql\n * route. The proxy injects the x-bff-api-key header server-side, keeping the\n * shared secret out of client-side code.\n *\n * For server-side signals, use `sendSignal()` from `@gfed-medusa/sf-lib-common/lib/data/personalization`\n * which creates an authenticated client with the API key.\n */\nexport async function sendClientSignal(\n type: SignalType,\n payload?: Record<string, unknown>,\n): Promise<boolean> {\n const deviceId = getDeviceId();\n if (!deviceId) return false;\n\n const input: SignalInput = {\n deviceId,\n type,\n payload,\n url: typeof window !== 'undefined' ? window.location.href : undefined,\n timestamp: Date.now(),\n };\n\n // Try Apollo client mutation first\n try {\n await graphqlMutation({\n mutation: SEND_SIGNAL_MUTATION,\n variables: { input },\n });\n return true;\n } catch (apolloError) {\n console.warn(\n '[sendClientSignal] Apollo mutation failed, trying fetch fallback:',\n type,\n apolloError\n );\n }\n\n // Fallback: direct fetch to /api/graphql\n try {\n const res = await fetch('/api/graphql', {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n credentials: 'include',\n body: JSON.stringify({\n query: `mutation SendSignal($input: SignalInput!) { sendSignal(input: $input) { success } }`,\n variables: { input },\n }),\n });\n if (!res.ok) {\n console.warn(\n '[sendClientSignal] Fetch fallback failed:',\n type,\n res.status,\n res.statusText\n );\n return false;\n }\n return true;\n } catch (fetchError) {\n console.warn('[sendClientSignal] Fetch fallback also failed:', type, fetchError);\n return false;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAeA,eAAsB,iBACpB,MACA,SACkB;CAClB,MAAM,WAAW,aAAa;AAC9B,KAAI,CAAC,SAAU,QAAO;CAEtB,MAAMA,QAAqB;EACzB;EACA;EACA;EACA,KAAK,OAAO,WAAW,cAAc,OAAO,SAAS,OAAO;EAC5D,WAAW,KAAK,KAAK;EACtB;AAGD,KAAI;AACF,QAAM,gBAAgB;GACpB,UAAU;GACV,WAAW,EAAE,OAAO;GACrB,CAAC;AACF,SAAO;UACA,aAAa;AACpB,UAAQ,KACN,qEACA,MACA,YACD;;AAIH,KAAI;EACF,MAAM,MAAM,MAAM,MAAM,gBAAgB;GACtC,QAAQ;GACR,SAAS,EAAE,gBAAgB,oBAAoB;GAC/C,aAAa;GACb,MAAM,KAAK,UAAU;IACnB,OAAO;IACP,WAAW,EAAE,OAAO;IACrB,CAAC;GACH,CAAC;AACF,MAAI,CAAC,IAAI,IAAI;AACX,WAAQ,KACN,6CACA,MACA,IAAI,QACJ,IAAI,WACL;AACD,UAAO;;AAET,SAAO;UACA,YAAY;AACnB,UAAQ,KAAK,kDAAkD,MAAM,WAAW;AAChF,SAAO"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _apollo_client7 from "@apollo/client";
|
|
2
2
|
|
|
3
3
|
//#region src/lib/personalization/personalization-gql.d.ts
|
|
4
|
-
declare const SEND_SIGNAL_MUTATION:
|
|
5
|
-
declare const SUBMIT_CONVERSION_MUTATION:
|
|
6
|
-
declare const PERSONALIZE_QUERY:
|
|
4
|
+
declare const SEND_SIGNAL_MUTATION: _apollo_client7.DocumentNode;
|
|
5
|
+
declare const SUBMIT_CONVERSION_MUTATION: _apollo_client7.DocumentNode;
|
|
6
|
+
declare const PERSONALIZE_QUERY: _apollo_client7.DocumentNode;
|
|
7
7
|
//#endregion
|
|
8
8
|
export { PERSONALIZE_QUERY, SEND_SIGNAL_MUTATION, SUBMIT_CONVERSION_MUTATION };
|
|
9
9
|
//# sourceMappingURL=personalization-gql.d.ts.map
|
|
@@ -15,8 +15,8 @@ const SUBMIT_CONVERSION_MUTATION = gql`
|
|
|
15
15
|
}
|
|
16
16
|
`;
|
|
17
17
|
const PERSONALIZE_QUERY = gql`
|
|
18
|
-
query Personalize($input: SurfaceContext!, $deviceId: String
|
|
19
|
-
personalize(input: $input, deviceId: $deviceId
|
|
18
|
+
query Personalize($input: SurfaceContext!, $deviceId: String!) {
|
|
19
|
+
personalize(input: $input, deviceId: $deviceId) {
|
|
20
20
|
components {
|
|
21
21
|
component
|
|
22
22
|
contentId
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"personalization-gql.js","names":[],"sources":["../../../src/lib/personalization/personalization-gql.ts"],"sourcesContent":["import { gql } from '@apollo/client';\n\nexport const SEND_SIGNAL_MUTATION = gql`\n mutation SendSignal($input: SignalInput!) {\n sendSignal(input: $input) {\n success\n profileUpdated\n }\n }\n`;\n\nexport const SUBMIT_CONVERSION_MUTATION = gql`\n mutation SubmitConversion($input: ConversionInput!) {\n submitConversion(input: $input)\n }\n`;\n\nexport const PERSONALIZE_QUERY = gql`\n query Personalize($input: SurfaceContext!, $deviceId: String
|
|
1
|
+
{"version":3,"file":"personalization-gql.js","names":[],"sources":["../../../src/lib/personalization/personalization-gql.ts"],"sourcesContent":["import { gql } from '@apollo/client';\n\nexport const SEND_SIGNAL_MUTATION = gql`\n mutation SendSignal($input: SignalInput!) {\n sendSignal(input: $input) {\n success\n profileUpdated\n }\n }\n`;\n\nexport const SUBMIT_CONVERSION_MUTATION = gql`\n mutation SubmitConversion($input: ConversionInput!) {\n submitConversion(input: $input)\n }\n`;\n\nexport const PERSONALIZE_QUERY = gql`\n query Personalize($input: SurfaceContext!, $deviceId: String!) {\n personalize(input: $input, deviceId: $deviceId) {\n components {\n component\n contentId\n propsOverrides\n priority\n reasoning\n score\n }\n reasoning {\n intent\n confidence\n factors\n modelVersion\n }\n cacheKey\n servedAt\n }\n }\n`;\n\n"],"mappings":";;;AAEA,MAAa,uBAAuB,GAAG;;;;;;;;AASvC,MAAa,6BAA6B,GAAG;;;;;AAM7C,MAAa,oBAAoB,GAAG"}
|
package/dist/types/graphql.d.ts
CHANGED
|
@@ -197,6 +197,17 @@ type CompleteCartOrderResult = {
|
|
|
197
197
|
type: Scalars['String']['output'];
|
|
198
198
|
};
|
|
199
199
|
type CompleteCartResponse = CompleteCartErrorResult | CompleteCartOrderResult;
|
|
200
|
+
type ContextualBanner = {
|
|
201
|
+
__typename?: 'ContextualBanner';
|
|
202
|
+
ctaHref: Scalars['String']['output'];
|
|
203
|
+
ctaLabel?: Maybe<Scalars['String']['output']>;
|
|
204
|
+
description?: Maybe<Scalars['String']['output']>;
|
|
205
|
+
isActive: Scalars['Boolean']['output'];
|
|
206
|
+
minPrice?: Maybe<Scalars['Float']['output']>;
|
|
207
|
+
priority: Scalars['Int']['output'];
|
|
208
|
+
title: Scalars['String']['output'];
|
|
209
|
+
trigger: Scalars['String']['output'];
|
|
210
|
+
};
|
|
200
211
|
type ConversionInput = {
|
|
201
212
|
amount: Scalars['Float']['input'];
|
|
202
213
|
checkoutSignalId?: InputMaybe<Scalars['String']['input']>;
|
|
@@ -233,6 +244,15 @@ type CreateLineItemInput = {
|
|
|
233
244
|
quantity: Scalars['Int']['input'];
|
|
234
245
|
variantId: Scalars['String']['input'];
|
|
235
246
|
};
|
|
247
|
+
type CurrentSession = {
|
|
248
|
+
__typename?: 'CurrentSession';
|
|
249
|
+
cartAdds: Scalars['Int']['output'];
|
|
250
|
+
firstCategory?: Maybe<Scalars['String']['output']>;
|
|
251
|
+
productViews: Array<Scalars['String']['output']>;
|
|
252
|
+
searches: Array<Scalars['String']['output']>;
|
|
253
|
+
signalCount: Scalars['Int']['output'];
|
|
254
|
+
startedAt: Scalars['Float']['output'];
|
|
255
|
+
};
|
|
236
256
|
type Customer = {
|
|
237
257
|
__typename?: 'Customer';
|
|
238
258
|
addresses?: Maybe<Array<Maybe<CustomerAddress>>>;
|
|
@@ -303,9 +323,8 @@ type HomeBanner = {
|
|
|
303
323
|
};
|
|
304
324
|
type IntentSignals = {
|
|
305
325
|
__typename?: 'IntentSignals';
|
|
306
|
-
|
|
326
|
+
checkoutConversion: Scalars['Float']['output'];
|
|
307
327
|
researchDepth: Scalars['Float']['output'];
|
|
308
|
-
returnRate: Scalars['Float']['output'];
|
|
309
328
|
};
|
|
310
329
|
declare enum LifecycleStage {
|
|
311
330
|
Frequent = "FREQUENT",
|
|
@@ -666,6 +685,14 @@ type ProductVariantOption = {
|
|
|
666
685
|
optionId: Scalars['ID']['output'];
|
|
667
686
|
value: Scalars['String']['output'];
|
|
668
687
|
};
|
|
688
|
+
type ProductViewEntry = {
|
|
689
|
+
__typename?: 'ProductViewEntry';
|
|
690
|
+
category: Scalars['String']['output'];
|
|
691
|
+
price?: Maybe<Scalars['Float']['output']>;
|
|
692
|
+
productId: Scalars['String']['output'];
|
|
693
|
+
productName: Scalars['String']['output'];
|
|
694
|
+
timestamp: Scalars['Float']['output'];
|
|
695
|
+
};
|
|
669
696
|
type Promotion = {
|
|
670
697
|
__typename?: 'Promotion';
|
|
671
698
|
applicationMethod?: Maybe<ApplicationMethod>;
|
|
@@ -680,6 +707,7 @@ type Query = {
|
|
|
680
707
|
cart?: Maybe<Cart>;
|
|
681
708
|
collection?: Maybe<Collection>;
|
|
682
709
|
collections: Array<Collection>;
|
|
710
|
+
contextualBanners: Array<ContextualBanner>;
|
|
683
711
|
/** Debug: current rule-based intent classification. */
|
|
684
712
|
debugIntent: DecisionReasoning;
|
|
685
713
|
footer?: Maybe<Footer>;
|
|
@@ -721,7 +749,6 @@ type Query_CollectionsArgs = {
|
|
|
721
749
|
};
|
|
722
750
|
type Query_DebugIntentArgs = {
|
|
723
751
|
deviceId: Scalars['String']['input'];
|
|
724
|
-
userId?: InputMaybe<Scalars['String']['input']>;
|
|
725
752
|
};
|
|
726
753
|
type Query_HomeBannerArgs = {
|
|
727
754
|
audience?: InputMaybe<Scalars['String']['input']>;
|
|
@@ -740,7 +767,6 @@ type Query_PaymentProvidersArgs = {
|
|
|
740
767
|
type Query_PersonalizeArgs = {
|
|
741
768
|
deviceId: Scalars['String']['input'];
|
|
742
769
|
input: SurfaceContext;
|
|
743
|
-
userId?: InputMaybe<Scalars['String']['input']>;
|
|
744
770
|
};
|
|
745
771
|
type Query_ProductArgs = {
|
|
746
772
|
id: Scalars['ID']['input'];
|
|
@@ -788,7 +814,6 @@ type Query_ShippingOptionsArgs = {
|
|
|
788
814
|
};
|
|
789
815
|
type Query_UserProfileArgs = {
|
|
790
816
|
deviceId: Scalars['String']['input'];
|
|
791
|
-
userId?: InputMaybe<Scalars['String']['input']>;
|
|
792
817
|
};
|
|
793
818
|
type Region = {
|
|
794
819
|
__typename?: 'Region';
|
|
@@ -814,6 +839,11 @@ type SanityImageAsset = {
|
|
|
814
839
|
__typename?: 'SanityImageAsset';
|
|
815
840
|
url?: Maybe<Scalars['String']['output']>;
|
|
816
841
|
};
|
|
842
|
+
type SearchHistoryEntry = {
|
|
843
|
+
__typename?: 'SearchHistoryEntry';
|
|
844
|
+
query: Scalars['String']['output'];
|
|
845
|
+
timestamp: Scalars['Float']['output'];
|
|
846
|
+
};
|
|
817
847
|
type SearchProducts = {
|
|
818
848
|
__typename?: 'SearchProducts';
|
|
819
849
|
hitsPerPage: Scalars['Int']['output'];
|
|
@@ -888,7 +918,6 @@ type SignalInput = {
|
|
|
888
918
|
timestamp?: InputMaybe<Scalars['Float']['input']>;
|
|
889
919
|
type: SignalType;
|
|
890
920
|
url?: InputMaybe<Scalars['String']['input']>;
|
|
891
|
-
userId?: InputMaybe<Scalars['String']['input']>;
|
|
892
921
|
};
|
|
893
922
|
declare enum SignalType {
|
|
894
923
|
CartAdd = "CART_ADD",
|
|
@@ -965,15 +994,25 @@ type UpdateLineItemInput = {
|
|
|
965
994
|
};
|
|
966
995
|
type UserProfile = {
|
|
967
996
|
__typename?: 'UserProfile';
|
|
997
|
+
averageOrderValue?: Maybe<Scalars['Float']['output']>;
|
|
998
|
+
cartActivity?: Maybe<Scalars['Int']['output']>;
|
|
968
999
|
categoryAffinity: Scalars['JSON']['output'];
|
|
1000
|
+
currentSession?: Maybe<CurrentSession>;
|
|
969
1001
|
deviceId: Scalars['String']['output'];
|
|
970
1002
|
engagementLevel: EngagementLevel;
|
|
971
1003
|
firstSeen: Scalars['Float']['output'];
|
|
1004
|
+
hesitationCount?: Maybe<Scalars['Int']['output']>;
|
|
972
1005
|
intentSignals: IntentSignals;
|
|
1006
|
+
lastPurchaseDate?: Maybe<Scalars['Float']['output']>;
|
|
973
1007
|
lastSeen: Scalars['Float']['output'];
|
|
1008
|
+
lastSignalTimestamp?: Maybe<Scalars['Float']['output']>;
|
|
974
1009
|
lifecycleStage: LifecycleStage;
|
|
1010
|
+
orderCount?: Maybe<Scalars['Int']['output']>;
|
|
975
1011
|
priceSensitivity: PriceSensitivity;
|
|
1012
|
+
recentProducts?: Maybe<Array<ProductViewEntry>>;
|
|
1013
|
+
searchHistory?: Maybe<Array<SearchHistoryEntry>>;
|
|
976
1014
|
sessionCount: Scalars['Int']['output'];
|
|
1015
|
+
totalSpent?: Maybe<Scalars['Float']['output']>;
|
|
977
1016
|
userId?: Maybe<Scalars['String']['output']>;
|
|
978
1017
|
};
|
|
979
1018
|
type CartItemFieldsFragment = {
|
|
@@ -1392,56 +1431,6 @@ type GetFooterDataQuery = {
|
|
|
1392
1431
|
} | null;
|
|
1393
1432
|
} | null;
|
|
1394
1433
|
};
|
|
1395
|
-
type GetHomeBannerQueryVariables = Exact<{
|
|
1396
|
-
audience?: InputMaybe<Scalars['String']['input']>;
|
|
1397
|
-
segment?: InputMaybe<Scalars['String']['input']>;
|
|
1398
|
-
}>;
|
|
1399
|
-
type GetHomeBannerQuery = {
|
|
1400
|
-
__typename?: 'Query';
|
|
1401
|
-
homeBanner?: {
|
|
1402
|
-
__typename?: 'HomeBanner';
|
|
1403
|
-
_id: string;
|
|
1404
|
-
_type: string;
|
|
1405
|
-
eyebrow?: string | null;
|
|
1406
|
-
title?: string | null;
|
|
1407
|
-
description?: string | null;
|
|
1408
|
-
showPoweredBy?: boolean | null;
|
|
1409
|
-
buttons?: Array<{
|
|
1410
|
-
__typename?: 'BannerButton';
|
|
1411
|
-
label?: string | null;
|
|
1412
|
-
href?: string | null;
|
|
1413
|
-
openInNewTab?: boolean | null;
|
|
1414
|
-
}> | null;
|
|
1415
|
-
secondaryBanners?: Array<{
|
|
1416
|
-
__typename?: 'SecondaryBanner';
|
|
1417
|
-
title?: string | null;
|
|
1418
|
-
description?: string | null;
|
|
1419
|
-
showPoweredBy?: boolean | null;
|
|
1420
|
-
image?: {
|
|
1421
|
-
__typename?: 'SanityImage';
|
|
1422
|
-
alt?: string | null;
|
|
1423
|
-
asset?: {
|
|
1424
|
-
__typename?: 'SanityImageAsset';
|
|
1425
|
-
url?: string | null;
|
|
1426
|
-
} | null;
|
|
1427
|
-
} | null;
|
|
1428
|
-
button?: {
|
|
1429
|
-
__typename?: 'BannerButton';
|
|
1430
|
-
label?: string | null;
|
|
1431
|
-
href?: string | null;
|
|
1432
|
-
openInNewTab?: boolean | null;
|
|
1433
|
-
} | null;
|
|
1434
|
-
}> | null;
|
|
1435
|
-
image?: {
|
|
1436
|
-
__typename?: 'SanityImage';
|
|
1437
|
-
alt?: string | null;
|
|
1438
|
-
asset?: {
|
|
1439
|
-
__typename?: 'SanityImageAsset';
|
|
1440
|
-
url?: string | null;
|
|
1441
|
-
} | null;
|
|
1442
|
-
} | null;
|
|
1443
|
-
} | null;
|
|
1444
|
-
};
|
|
1445
1434
|
type OrderFieldsFragment = {
|
|
1446
1435
|
__typename?: 'Order';
|
|
1447
1436
|
id: string;
|
|
@@ -1566,10 +1555,6 @@ type GetProductByHandleForPersonalizationQuery = {
|
|
|
1566
1555
|
products?: Array<{
|
|
1567
1556
|
__typename?: 'Product';
|
|
1568
1557
|
id: string;
|
|
1569
|
-
categories?: Array<{
|
|
1570
|
-
__typename?: 'ProductCategory';
|
|
1571
|
-
handle: string;
|
|
1572
|
-
}> | null;
|
|
1573
1558
|
variants?: Array<{
|
|
1574
1559
|
__typename?: 'ProductVariant';
|
|
1575
1560
|
id: string;
|
|
@@ -1716,7 +1701,6 @@ declare const GetCollectionsHomeDocument: TypedDocumentNode<GetCollectionsHomeQu
|
|
|
1716
1701
|
declare const GetCustomerDocument: TypedDocumentNode<GetCustomerQuery, GetCustomerQueryVariables>;
|
|
1717
1702
|
declare const GetFooterDocument: TypedDocumentNode<GetFooterQuery, GetFooterQueryVariables>;
|
|
1718
1703
|
declare const GetFooterDataDocument: TypedDocumentNode<GetFooterDataQuery, GetFooterDataQueryVariables>;
|
|
1719
|
-
declare const GetHomeBannerDocument: TypedDocumentNode<GetHomeBannerQuery, GetHomeBannerQueryVariables>;
|
|
1720
1704
|
declare const GetOrderDocument: TypedDocumentNode<GetOrderQuery, GetOrderQueryVariables>;
|
|
1721
1705
|
declare const GetOrdersDocument: TypedDocumentNode<GetOrdersQuery, GetOrdersQueryVariables>;
|
|
1722
1706
|
declare const GetProductByHandleForPersonalizationDocument: TypedDocumentNode<GetProductByHandleForPersonalizationQuery, GetProductByHandleForPersonalizationQueryVariables>;
|
|
@@ -1725,5 +1709,5 @@ declare const ListRegionsDocument: TypedDocumentNode<ListRegionsQuery, ListRegio
|
|
|
1725
1709
|
declare const GetRegionDocument: TypedDocumentNode<GetRegionQuery, GetRegionQueryVariables>;
|
|
1726
1710
|
declare const GetShippingOptionsDocument: TypedDocumentNode<GetShippingOptionsQuery, GetShippingOptionsQueryVariables>;
|
|
1727
1711
|
//#endregion
|
|
1728
|
-
export { AddCustomerAddressInput, Address, AddressFieldsFragment, AddressFieldsFragmentDoc, AddressInput, ApplicationMethod, ApplicationType, AuthPayload, BannerButton, BrowseProductHit, BrowseProducts, BrowseProductsSort, CacheControlScope, CalculatedShippingOptionPrice, Cart, CartFieldsFragment, CartFieldsFragmentDoc, CartItemFieldsFragment, CartItemFieldsFragmentDoc, Collection, CollectionProductsFragment, CollectionProductsFragmentDoc, CollectionProductsHomeFragment, CollectionProductsHomeFragmentDoc, CompleteCartError, CompleteCartErrorResult, CompleteCartOrderResult, CompleteCartResponse, ConversionInput, ConversionLineItemInput, Country, CountryFieldsFragment, CountryFieldsFragmentDoc, CreateCartDocument, CreateCartInput, CreateCartMutation, CreateCartMutationVariables, CreateLineItemDocument, CreateLineItemInput, CreateLineItemMutation, CreateLineItemMutationVariables, Customer, CustomerAddress, CustomerAddressFragment, CustomerAddressFragmentDoc, CustomerFragment, CustomerFragmentDoc, DecisionReasoning, DeleteCustomerAddressResult, DeleteLineItemDocument, DeleteLineItemMutation, DeleteLineItemMutationVariables, EngagementLevel, Exact, Footer, GetCartDocument, GetCartItemCountDocument, GetCartItemCountQuery, GetCartItemCountQueryVariables, GetCartQuery, GetCartQueryVariables, GetCartTotalDocument, GetCartTotalQuery, GetCartTotalQueryVariables, GetCollectionsDocument, GetCollectionsHomeDocument, GetCollectionsHomeQuery, GetCollectionsHomeQueryVariables, GetCollectionsQuery, GetCollectionsQueryVariables, GetCustomerDocument, GetCustomerQuery, GetCustomerQueryVariables, GetFooterDataDocument, GetFooterDataQuery, GetFooterDataQueryVariables, GetFooterDocument, GetFooterQuery, GetFooterQueryVariables,
|
|
1712
|
+
export { AddCustomerAddressInput, Address, AddressFieldsFragment, AddressFieldsFragmentDoc, AddressInput, ApplicationMethod, ApplicationType, AuthPayload, BannerButton, BrowseProductHit, BrowseProducts, BrowseProductsSort, CacheControlScope, CalculatedShippingOptionPrice, Cart, CartFieldsFragment, CartFieldsFragmentDoc, CartItemFieldsFragment, CartItemFieldsFragmentDoc, Collection, CollectionProductsFragment, CollectionProductsFragmentDoc, CollectionProductsHomeFragment, CollectionProductsHomeFragmentDoc, CompleteCartError, CompleteCartErrorResult, CompleteCartOrderResult, CompleteCartResponse, ContextualBanner, ConversionInput, ConversionLineItemInput, Country, CountryFieldsFragment, CountryFieldsFragmentDoc, CreateCartDocument, CreateCartInput, CreateCartMutation, CreateCartMutationVariables, CreateLineItemDocument, CreateLineItemInput, CreateLineItemMutation, CreateLineItemMutationVariables, CurrentSession, Customer, CustomerAddress, CustomerAddressFragment, CustomerAddressFragmentDoc, CustomerFragment, CustomerFragmentDoc, DecisionReasoning, DeleteCustomerAddressResult, DeleteLineItemDocument, DeleteLineItemMutation, DeleteLineItemMutationVariables, EngagementLevel, Exact, Footer, GetCartDocument, GetCartItemCountDocument, GetCartItemCountQuery, GetCartItemCountQueryVariables, GetCartQuery, GetCartQueryVariables, GetCartTotalDocument, GetCartTotalQuery, GetCartTotalQueryVariables, GetCollectionsDocument, GetCollectionsHomeDocument, GetCollectionsHomeQuery, GetCollectionsHomeQueryVariables, GetCollectionsQuery, GetCollectionsQueryVariables, GetCustomerDocument, GetCustomerQuery, GetCustomerQueryVariables, GetFooterDataDocument, GetFooterDataQuery, GetFooterDataQueryVariables, GetFooterDocument, GetFooterQuery, GetFooterQueryVariables, GetOrderDocument, GetOrderQuery, GetOrderQueryVariables, GetOrdersDocument, GetOrdersQuery, GetOrdersQueryVariables, GetProductByHandleForPersonalizationDocument, GetProductByHandleForPersonalizationQuery, GetProductByHandleForPersonalizationQueryVariables, GetProductCategoriesDocument, GetProductCategoriesQuery, GetProductCategoriesQueryVariables, GetRegionDocument, GetRegionQuery, GetRegionQueryVariables, GetShippingOptionsDocument, GetShippingOptionsQuery, GetShippingOptionsQueryVariables, HomeBanner, Incremental, InputMaybe, IntentSignals, LifecycleStage, LineItem, ListRegionsDocument, ListRegionsQuery, ListRegionsQueryVariables, LoginInput, MakeEmpty, MakeMaybe, MakeOptional, Maybe, Mutation, Mutation_AcceptOrderTransferArgs, Mutation_AddCustomerAddressArgs, Mutation_AddShippingMethodArgs, Mutation_ApplyPromotionsArgs, Mutation_CalculateShippingOptionPriceArgs, Mutation_CompleteCartArgs, Mutation_CreateCartArgs, Mutation_CreateLineItemArgs, Mutation_DeclineOrderTransferArgs, Mutation_DeleteCustomerAddressArgs, Mutation_DeleteLineItemArgs, Mutation_InitiatePaymentSessionArgs, Mutation_LoginArgs, Mutation_RegisterArgs, Mutation_RequestOrderTransferArgs, Mutation_SendSignalArgs, Mutation_SubmitConversionArgs, Mutation_TransferCartArgs, Mutation_UpdateCartArgs, Mutation_UpdateCustomerAddressArgs, Mutation_UpdateCustomerArgs, Mutation_UpdateLineItemArgs, Order, OrderFieldsFragment, OrderFieldsFragmentDoc, OrderListResponse, OrderTransferData, OrderTransferResult, PartialRichText, Payment, PaymentCollection, PaymentCollectionFieldsFragment, PaymentCollectionFieldsFragmentDoc, PaymentProviders, PaymentSessionStatus, PaymentSessions, PaymentStatus, PersonalizationResult, PersonalizedComponent, Price, PriceFragment, PriceFragmentDoc, PriceRule, PriceSensitivity, Product, ProductCategory, ProductCategoryFragment, ProductCategoryFragmentDoc, ProductCollectionFragment, ProductCollectionFragmentDoc, ProductHit, ProductImage, ProductImageFragment, ProductImageFragmentDoc, ProductList, ProductListResponse, ProductOption, ProductOptionValue, ProductTag, ProductVariant, ProductVariantFragment, ProductVariantFragmentDoc, ProductVariantOption, ProductViewEntry, Promotion, PromotionFieldsFragment, PromotionFieldsFragmentDoc, Query, Query_BrowseProductsArgs, Query_CartArgs, Query_CollectionArgs, Query_CollectionsArgs, Query_DebugIntentArgs, Query_HomeBannerArgs, Query_OrderArgs, Query_OrdersArgs, Query_PaymentProvidersArgs, Query_PersonalizeArgs, Query_ProductArgs, Query_ProductCategoriesArgs, Query_ProductCategoryArgs, Query_ProductsArgs, Query_RegionArgs, Query_SearchProductsArgs, Query_ShippingOptionsArgs, Query_UserProfileArgs, Region, RegionFieldsFragment, RegionFieldsFragmentDoc, RegisterCustomerInput, SanityImage, SanityImageAsset, Scalars, SearchHistoryEntry, SearchProducts, SecondaryBanner, SendSignalResponse, ServiceZone, ServiceZoneLocation, ServiceZoneLocationAddress, ShippingMethod, ShippingMethodFieldsFragment, ShippingMethodFieldsFragmentDoc, ShippingOption, ShippingOptionFieldsFragment, ShippingOptionFieldsFragmentDoc, ShippingOptionPrice, SignalInput, SignalType, SocialLink, StoreLineItemDeleteResponse, SurfaceContext, TransferCartDocument, TransferCartMutation, TransferCartMutationVariables, UpdateCartDocument, UpdateCartInput, UpdateCartMutation, UpdateCartMutationVariables, UpdateCustomerAddressInput, UpdateCustomerInput, UpdateLineItemInput, UserProfile };
|
|
1729
1713
|
//# sourceMappingURL=graphql.d.ts.map
|