@salesforce/storefront-next-runtime 0.3.1-alpha.1 → 0.4.0-alpha.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/README.md +82 -0
- package/dist/DesignComponent.js +37 -12
- package/dist/DesignComponent.js.map +1 -1
- package/dist/DesignContext.js +47 -2
- package/dist/DesignContext.js.map +1 -1
- package/dist/DesignFrame.js +1 -1
- package/dist/DesignRegion.js +1 -1
- package/dist/config.d.ts +4 -4
- package/dist/custom-global-preferences.d.ts +20 -0
- package/dist/custom-global-preferences.d.ts.map +1 -0
- package/dist/custom-global-preferences.js +28 -0
- package/dist/custom-global-preferences.js.map +1 -0
- package/dist/custom-site-preferences.d.ts +20 -0
- package/dist/custom-site-preferences.d.ts.map +1 -0
- package/dist/custom-site-preferences.js +28 -0
- package/dist/custom-site-preferences.js.map +1 -0
- package/dist/data-store-custom-global-preferences.d.ts +2 -0
- package/dist/data-store-custom-global-preferences.js +6 -0
- package/dist/data-store-custom-site-preferences.d.ts +2 -0
- package/dist/data-store-custom-site-preferences.js +6 -0
- package/dist/data-store-gcp-preferences.d.ts +2 -0
- package/dist/data-store-gcp-preferences.js +6 -0
- package/dist/data-store.d.ts +97 -0
- package/dist/data-store.d.ts.map +1 -0
- package/dist/data-store.js +42 -0
- package/dist/data-store.js.map +1 -0
- package/dist/design-data.d.ts +82 -88
- package/dist/design-data.d.ts.map +1 -1
- package/dist/design-data.js +95 -57
- package/dist/design-data.js.map +1 -1
- package/dist/design-messaging.d.ts +2 -2
- package/dist/events.d.ts +34 -6
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +6 -6
- package/dist/events.js.map +1 -1
- package/dist/gcp-preferences.d.ts +52 -0
- package/dist/gcp-preferences.d.ts.map +1 -0
- package/dist/gcp-preferences.js +61 -0
- package/dist/gcp-preferences.js.map +1 -0
- package/dist/i18n-client.d.ts +38 -0
- package/dist/i18n-client.d.ts.map +1 -0
- package/dist/i18n-client.js +72 -0
- package/dist/i18n-client.js.map +1 -0
- package/dist/i18n.d.ts +63 -0
- package/dist/i18n.d.ts.map +1 -0
- package/dist/i18n.js +98 -0
- package/dist/i18n.js.map +1 -0
- package/dist/index.d.ts +60 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/messaging-api.js +3 -1
- package/dist/messaging-api.js.map +1 -1
- package/dist/scapi.d.ts +247 -2
- package/dist/scapi.d.ts.map +1 -1
- package/dist/scapi.js +1 -1
- package/dist/scapi.js.map +1 -1
- package/dist/site-context.d.ts +94 -18
- package/dist/site-context.d.ts.map +1 -1
- package/dist/site-context.js +2 -417
- package/dist/site-context2.js +513 -0
- package/dist/site-context2.js.map +1 -0
- package/dist/types2.d.ts +210 -0
- package/dist/types2.d.ts.map +1 -1
- package/dist/utils.js +179 -0
- package/dist/utils.js.map +1 -0
- package/package.json +63 -4
- package/dist/site-context.js.map +0 -1
package/dist/types2.d.ts
CHANGED
|
@@ -10068,6 +10068,33 @@ interface paths$2 {
|
|
|
10068
10068
|
patch?: never;
|
|
10069
10069
|
trace?: never;
|
|
10070
10070
|
};
|
|
10071
|
+
"/organizations/{organizationId}/qualifiers/resolve": {
|
|
10072
|
+
parameters: {
|
|
10073
|
+
query?: never;
|
|
10074
|
+
header?: never;
|
|
10075
|
+
path?: never;
|
|
10076
|
+
cookie?: never;
|
|
10077
|
+
};
|
|
10078
|
+
get?: never;
|
|
10079
|
+
put?: never;
|
|
10080
|
+
/**
|
|
10081
|
+
* Resolve qualifiers for customer groups, campaign promotions, and data binding contexts.
|
|
10082
|
+
* @description Resolves a list of customer groups, campaigns, promotions, and data bindings for the given user.
|
|
10083
|
+
*
|
|
10084
|
+
* The endpoint takes each value and determines whether the user is active for the item:
|
|
10085
|
+
* - Customer groups are verified against the user's qualification via the EffectiveContext.
|
|
10086
|
+
* - Campaign qualifiers are checked to determine if the user is applicable for each campaign and promotion.
|
|
10087
|
+
* - Data bindings are resolved by fetching the requested records from their respective data providers.
|
|
10088
|
+
*
|
|
10089
|
+
* Returns a boolean result for each provided qualifier and resolved data binding objects grouped by provider type and record identifier. If a qualifier cannot be validated, `false` is returned for that item. If a data binding cannot be resolved, it is omitted from the response.
|
|
10090
|
+
*/
|
|
10091
|
+
post: operations$2["resolveQualifiers"];
|
|
10092
|
+
delete?: never;
|
|
10093
|
+
options?: never;
|
|
10094
|
+
head?: never;
|
|
10095
|
+
patch?: never;
|
|
10096
|
+
trace?: never;
|
|
10097
|
+
};
|
|
10071
10098
|
}
|
|
10072
10099
|
interface components$2 {
|
|
10073
10100
|
schemas: {
|
|
@@ -10138,6 +10165,24 @@ interface components$2 {
|
|
|
10138
10165
|
* @example commerce_assets.carousel
|
|
10139
10166
|
*/
|
|
10140
10167
|
typeId: string;
|
|
10168
|
+
/**
|
|
10169
|
+
* Component Name
|
|
10170
|
+
* @description Display name of the component.
|
|
10171
|
+
* @example Topseller Carousel
|
|
10172
|
+
*/
|
|
10173
|
+
name?: string;
|
|
10174
|
+
/**
|
|
10175
|
+
* Fragment
|
|
10176
|
+
* @description Indicates whether the component is a fragment. True if the component is a fragment, otherwise false.
|
|
10177
|
+
* @example false
|
|
10178
|
+
*/
|
|
10179
|
+
fragment?: boolean;
|
|
10180
|
+
/**
|
|
10181
|
+
* Content Link UUID
|
|
10182
|
+
* @description Represents a globally unique identifier for every instance of a content component (or fragment) rendered on a page.
|
|
10183
|
+
* @example 0e1f329d4ac66ff2c3bbf70301
|
|
10184
|
+
*/
|
|
10185
|
+
contentLinkUuid?: string;
|
|
10141
10186
|
/**
|
|
10142
10187
|
* Component Data
|
|
10143
10188
|
* @description The configuration data assigned to the component.
|
|
@@ -10147,6 +10192,18 @@ interface components$2 {
|
|
|
10147
10192
|
* }
|
|
10148
10193
|
*/
|
|
10149
10194
|
data?: Record<string, never>;
|
|
10195
|
+
/**
|
|
10196
|
+
* Localized
|
|
10197
|
+
* @description Whether the component has been localized with content in the current locale. If false, the components content will fallback to the default locale.
|
|
10198
|
+
* @example true
|
|
10199
|
+
*/
|
|
10200
|
+
localized?: boolean;
|
|
10201
|
+
/**
|
|
10202
|
+
* Visibility
|
|
10203
|
+
* @description Whether the component is visible based on the current visiblity rules and context.
|
|
10204
|
+
* @example true
|
|
10205
|
+
*/
|
|
10206
|
+
visible?: boolean;
|
|
10150
10207
|
/**
|
|
10151
10208
|
* Custom Component Data
|
|
10152
10209
|
* @description Any custom data added by the custom code for this component.
|
|
@@ -10566,6 +10623,115 @@ interface components$2 {
|
|
|
10566
10623
|
*/
|
|
10567
10624
|
data: components$2["schemas"]["ContentFolder"][];
|
|
10568
10625
|
} & components$2["schemas"]["ResultBase"];
|
|
10626
|
+
/** @description A data binding requirement specifying a provider type and record identifier to resolve. */
|
|
10627
|
+
DataBindingRequirement: {
|
|
10628
|
+
/**
|
|
10629
|
+
* Type
|
|
10630
|
+
* @description The data provider type identifier.
|
|
10631
|
+
* @example content_asset
|
|
10632
|
+
*/
|
|
10633
|
+
type: string;
|
|
10634
|
+
/**
|
|
10635
|
+
* ID
|
|
10636
|
+
* @description The record identifier to resolve from the data provider.
|
|
10637
|
+
* @example homepage-banner
|
|
10638
|
+
*/
|
|
10639
|
+
id: string;
|
|
10640
|
+
};
|
|
10641
|
+
/**
|
|
10642
|
+
* @description A resolved data binding object containing arbitrary key-value pairs returned by the data provider for a specific record. The shape of the object is determined by the data provider and may include any user-defined fields.
|
|
10643
|
+
* @example {
|
|
10644
|
+
* "title": "Winter Sale",
|
|
10645
|
+
* "body": "<div>Shop our winter collection</div>",
|
|
10646
|
+
* "c_showCountdown": true,
|
|
10647
|
+
* "c_endDate": "2026-03-31T23:59:59Z"
|
|
10648
|
+
* }
|
|
10649
|
+
*/
|
|
10650
|
+
ResolvedDataBinding: {
|
|
10651
|
+
[key: string]: unknown;
|
|
10652
|
+
};
|
|
10653
|
+
/** @description A campaign and promotion pair to resolve qualification for. */
|
|
10654
|
+
CampaignQualifier: {
|
|
10655
|
+
/**
|
|
10656
|
+
* Campaign ID
|
|
10657
|
+
* @description The identifier of the campaign.
|
|
10658
|
+
* @example my-campaign
|
|
10659
|
+
*/
|
|
10660
|
+
campaignId: string;
|
|
10661
|
+
/**
|
|
10662
|
+
* Promotion ID
|
|
10663
|
+
* @description The identifier of the promotion within the campaign.
|
|
10664
|
+
* @example my-promotion
|
|
10665
|
+
*/
|
|
10666
|
+
promotionId: string;
|
|
10667
|
+
};
|
|
10668
|
+
/** @description Request body for resolving customer group qualifications, campaign promotion eligibility, and data bindings. All fields are optional. An empty body is valid and returns an empty response. */
|
|
10669
|
+
QualifierResolveRequest: {
|
|
10670
|
+
/**
|
|
10671
|
+
* Customer Groups
|
|
10672
|
+
* @description List of customer group identifiers to resolve qualification for.
|
|
10673
|
+
* @example [
|
|
10674
|
+
* "VIP"
|
|
10675
|
+
* ]
|
|
10676
|
+
*/
|
|
10677
|
+
customerGroups?: string[];
|
|
10678
|
+
/**
|
|
10679
|
+
* Campaign Qualifiers
|
|
10680
|
+
* @description List of campaign and promotion pairs to resolve qualification for.
|
|
10681
|
+
*/
|
|
10682
|
+
campaignQualifiers?: components$2["schemas"]["CampaignQualifier"][];
|
|
10683
|
+
/**
|
|
10684
|
+
* Data Bindings
|
|
10685
|
+
* @description List of data binding requirements to resolve, each specifying a provider type and record identifier.
|
|
10686
|
+
*/
|
|
10687
|
+
dataBindings?: components$2["schemas"]["DataBindingRequirement"][];
|
|
10688
|
+
};
|
|
10689
|
+
/** @description Response containing the resolved qualification results for customer groups, campaign qualifiers, and data bindings. */
|
|
10690
|
+
QualifierResolveResponse: {
|
|
10691
|
+
/**
|
|
10692
|
+
* Customer Groups
|
|
10693
|
+
* @description Map of customer group identifiers to their qualification status. True if the user is qualified, false otherwise.
|
|
10694
|
+
* @example {
|
|
10695
|
+
* "VIP": true
|
|
10696
|
+
* }
|
|
10697
|
+
*/
|
|
10698
|
+
customerGroups?: {
|
|
10699
|
+
[key: string]: boolean;
|
|
10700
|
+
};
|
|
10701
|
+
/**
|
|
10702
|
+
* Campaign Qualifiers
|
|
10703
|
+
* @description Map of campaign identifiers to a map of promotion identifiers and their qualification status. True if the user is applicable, false otherwise.
|
|
10704
|
+
* @example {
|
|
10705
|
+
* "my-campaign": {
|
|
10706
|
+
* "my-promotion": false
|
|
10707
|
+
* }
|
|
10708
|
+
* }
|
|
10709
|
+
*/
|
|
10710
|
+
campaignQualifiers?: {
|
|
10711
|
+
[key: string]: {
|
|
10712
|
+
[key: string]: boolean;
|
|
10713
|
+
};
|
|
10714
|
+
};
|
|
10715
|
+
/**
|
|
10716
|
+
* Data Bindings
|
|
10717
|
+
* @description Resolved data binding objects grouped by provider type, then by record identifier. Used by the expression resolver to evaluate attribute expressions.
|
|
10718
|
+
* @example {
|
|
10719
|
+
* "content_asset": {
|
|
10720
|
+
* "homepage-banner": {
|
|
10721
|
+
* "title": "Winter Sale",
|
|
10722
|
+
* "body": "<div>Shop our winter collection</div>",
|
|
10723
|
+
* "c_showCountdown": true,
|
|
10724
|
+
* "c_endDate": "2026-03-31T23:59:59Z"
|
|
10725
|
+
* }
|
|
10726
|
+
* }
|
|
10727
|
+
* }
|
|
10728
|
+
*/
|
|
10729
|
+
dataBindings?: {
|
|
10730
|
+
[key: string]: {
|
|
10731
|
+
[key: string]: components$2["schemas"]["ResolvedDataBinding"];
|
|
10732
|
+
};
|
|
10733
|
+
};
|
|
10734
|
+
};
|
|
10569
10735
|
};
|
|
10570
10736
|
responses: {
|
|
10571
10737
|
/** @description Your access token is invalid or expired and can’t be used to identify a user. */
|
|
@@ -11021,6 +11187,50 @@ interface operations$2 {
|
|
|
11021
11187
|
403: components$2["responses"]["403forbidden"];
|
|
11022
11188
|
};
|
|
11023
11189
|
};
|
|
11190
|
+
resolveQualifiers: {
|
|
11191
|
+
parameters: {
|
|
11192
|
+
query: {
|
|
11193
|
+
/** @description The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites. */
|
|
11194
|
+
siteId: components$2["parameters"]["siteId"];
|
|
11195
|
+
/** @description A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified. */
|
|
11196
|
+
locale?: components$2["parameters"]["locale"];
|
|
11197
|
+
};
|
|
11198
|
+
header?: never;
|
|
11199
|
+
path: {
|
|
11200
|
+
/**
|
|
11201
|
+
* @description An identifier for the organization the request is being made by
|
|
11202
|
+
* @example f_ecom_zzxy_prd
|
|
11203
|
+
*/
|
|
11204
|
+
organizationId: components$2["parameters"]["organizationId"];
|
|
11205
|
+
};
|
|
11206
|
+
cookie?: never;
|
|
11207
|
+
};
|
|
11208
|
+
requestBody: {
|
|
11209
|
+
content: {
|
|
11210
|
+
"application/json": components$2["schemas"]["QualifierResolveRequest"];
|
|
11211
|
+
};
|
|
11212
|
+
};
|
|
11213
|
+
responses: {
|
|
11214
|
+
/** @description Success. All qualifiers have been resolved. */
|
|
11215
|
+
200: {
|
|
11216
|
+
headers: {
|
|
11217
|
+
[name: string]: unknown;
|
|
11218
|
+
};
|
|
11219
|
+
content: {
|
|
11220
|
+
"application/json": components$2["schemas"]["QualifierResolveResponse"];
|
|
11221
|
+
};
|
|
11222
|
+
};
|
|
11223
|
+
/** @description Bad Request */
|
|
11224
|
+
400: {
|
|
11225
|
+
headers: {
|
|
11226
|
+
[name: string]: unknown;
|
|
11227
|
+
};
|
|
11228
|
+
content: {
|
|
11229
|
+
"application/problem+json": components$2["schemas"]["ErrorResponse"];
|
|
11230
|
+
};
|
|
11231
|
+
};
|
|
11232
|
+
};
|
|
11233
|
+
};
|
|
11024
11234
|
}
|
|
11025
11235
|
type WithRequired$1<T, K extends keyof T> = T & { [P in K]-?: T[P] };
|
|
11026
11236
|
//#endregion
|