commerce-sdk-isomorphic 4.0.0-nightly-20251013080807 → 4.0.0-nightly-20251015080804
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/lib/helpers.cjs.d.ts +31 -2
- package/lib/helpers.cjs.js +1 -1
- package/lib/helpers.d.ts +31 -2
- package/lib/helpers.js +1 -1
- package/lib/index.cjs.d.ts +93 -6
- package/lib/index.cjs.js +1 -1
- package/lib/index.esm.d.ts +93 -6
- package/lib/index.esm.js +1 -1
- package/lib/shopperBaskets.cjs.js +1 -1
- package/lib/shopperBaskets.js +1 -1
- package/lib/shopperBasketsv2.cjs.js +1 -1
- package/lib/shopperBasketsv2.js +1 -1
- package/lib/shopperConsents.cjs.js +1 -1
- package/lib/shopperConsents.js +1 -1
- package/lib/shopperContext.cjs.js +1 -1
- package/lib/shopperContext.js +1 -1
- package/lib/shopperCustomers.cjs.js +1 -1
- package/lib/shopperCustomers.js +1 -1
- package/lib/shopperExperience.cjs.js +1 -1
- package/lib/shopperExperience.js +1 -1
- package/lib/shopperGiftCertificates.cjs.js +1 -1
- package/lib/shopperGiftCertificates.js +1 -1
- package/lib/shopperLogin.cjs.d.ts +62 -4
- package/lib/shopperLogin.cjs.js +1 -1
- package/lib/shopperLogin.d.ts +62 -4
- package/lib/shopperLogin.js +1 -1
- package/lib/shopperOrders.cjs.js +1 -1
- package/lib/shopperOrders.js +1 -1
- package/lib/shopperProducts.cjs.js +1 -1
- package/lib/shopperProducts.js +1 -1
- package/lib/shopperPromotions.cjs.js +1 -1
- package/lib/shopperPromotions.js +1 -1
- package/lib/shopperSearch.cjs.js +1 -1
- package/lib/shopperSearch.js +1 -1
- package/lib/shopperSeo.cjs.js +1 -1
- package/lib/shopperSeo.js +1 -1
- package/lib/shopperStores.cjs.js +1 -1
- package/lib/shopperStores.js +1 -1
- package/lib/version.cjs.d.ts +1 -1
- package/lib/version.cjs.js +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
package/lib/helpers.cjs.d.ts
CHANGED
|
@@ -226,7 +226,9 @@ type authorizeCustomerQueryParameters = {
|
|
|
226
226
|
type authorizeCustomerPathParameters = {
|
|
227
227
|
organizationId: string;
|
|
228
228
|
};
|
|
229
|
-
type authorizePasswordlessCustomerQueryParameters = {
|
|
229
|
+
type authorizePasswordlessCustomerQueryParameters = {
|
|
230
|
+
register_customer?: string;
|
|
231
|
+
};
|
|
230
232
|
type authorizePasswordlessCustomerPathParameters = {
|
|
231
233
|
organizationId: string;
|
|
232
234
|
};
|
|
@@ -237,6 +239,10 @@ type authorizePasswordlessCustomerBodyType = {
|
|
|
237
239
|
usid?: string;
|
|
238
240
|
channel_id: string;
|
|
239
241
|
callback_uri?: string;
|
|
242
|
+
last_name?: string;
|
|
243
|
+
email?: string;
|
|
244
|
+
first_name?: string;
|
|
245
|
+
phone_number?: string;
|
|
240
246
|
};
|
|
241
247
|
type getAccessTokenQueryParameters = {};
|
|
242
248
|
type getAccessTokenPathParameters = {
|
|
@@ -504,9 +510,14 @@ declare class ShopperLogin<ConfigParameters extends ShopperLoginParameters & Rec
|
|
|
504
510
|
"user_id",
|
|
505
511
|
"mode",
|
|
506
512
|
"channel_id",
|
|
513
|
+
"register_customer",
|
|
507
514
|
"locale",
|
|
508
515
|
"usid",
|
|
509
|
-
"callback_uri"
|
|
516
|
+
"callback_uri",
|
|
517
|
+
"last_name",
|
|
518
|
+
"email",
|
|
519
|
+
"first_name",
|
|
520
|
+
"phone_number"
|
|
510
521
|
];
|
|
511
522
|
readonly authorizePasswordlessCustomerRequired: readonly [
|
|
512
523
|
"organizationId",
|
|
@@ -920,6 +931,10 @@ declare class ShopperLogin<ConfigParameters extends ShopperLoginParameters & Rec
|
|
|
920
931
|
* @param options - An object containing the options for this method.
|
|
921
932
|
* @param options.parameters - An object containing the parameters for this method.
|
|
922
933
|
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
|
|
934
|
+
* @param options.parameters.register_customer - When set to `true`, creates a new customer profile in B2C Commerce if one doesn't already exist. Requires `last_name` and `email` body parameters unless `user_id` is an email address. Optionally accepts `first_name` and `phone_number` body parameters.
|
|
935
|
+
If the customer profile doesn't exist, it is created when the TOTP is validated via the `passwordless/token` endpoint.
|
|
936
|
+
|
|
937
|
+
When set to `false` (or omitted), no customer profile is created in B2C Commerce.
|
|
923
938
|
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
|
|
924
939
|
* @param options.body - The data to send as the request body.
|
|
925
940
|
* @param options.body.user_id - User ID for logging in.
|
|
@@ -928,12 +943,17 @@ declare class ShopperLogin<ConfigParameters extends ShopperLoginParameters & Rec
|
|
|
928
943
|
* @param options.body.usid - The shopper\'s unique identifier, if known. If not provided, a new USID is generated.
|
|
929
944
|
* @param options.body.channel_id - The channel (B2C Commerce site) that the user is associated with.
|
|
930
945
|
* @param options.body.callback_uri - The callback URI. Required when the mode is `callback`. The `callback_uri` property will be validated against the callback URIs that have been registered with the SLAS client. The callback URI _must_ be a `POST` endpoint because the token will be included in the body. Wildcards are not allowed in the callback_uri because this is a security risk that can expose the token. This is not considered an OAuth2 callback_url.
|
|
946
|
+
* @param options.body.last_name - The user\'s last name. Required when `register_customer` is `true`. The `last_name` parameter is not used when `register_customer` parameter is not added or is `false`.
|
|
947
|
+
* @param options.body.email - The user\'s email address. Required when `register_customer` is `true` and `user_id` is not an email address. The `email` parameter is not used when `register_customer` parameter is not added or is `false`.
|
|
948
|
+
* @param options.body.first_name - The user\'s first name. Optional when `register_customer` is `true`. The `first_name` parameter is not used when `register_customer` parameter is not added or is `false`.
|
|
949
|
+
* @param options.body.phone_number - The user\'s phone number. Optional when `register_customer` is `true`. The `phone_number` parameter is not used when `register_customer` parameter is not added or is `false`.
|
|
931
950
|
*
|
|
932
951
|
* @returns A promise of type string.
|
|
933
952
|
*/
|
|
934
953
|
authorizePasswordlessCustomer(options?: RequireParametersUnlessAllAreOptional<{
|
|
935
954
|
parameters?: CompositeParameters<{
|
|
936
955
|
organizationId: string;
|
|
956
|
+
register_customer?: string;
|
|
937
957
|
} & QueryParameters, ConfigParameters>;
|
|
938
958
|
headers?: {
|
|
939
959
|
[key: string]: string;
|
|
@@ -946,6 +966,10 @@ declare class ShopperLogin<ConfigParameters extends ShopperLoginParameters & Rec
|
|
|
946
966
|
* @param options - An object containing the options for this method.
|
|
947
967
|
* @param options.parameters - An object containing the parameters for this method.
|
|
948
968
|
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
|
|
969
|
+
* @param options.parameters.register_customer - When set to `true`, creates a new customer profile in B2C Commerce if one doesn't already exist. Requires `last_name` and `email` body parameters unless `user_id` is an email address. Optionally accepts `first_name` and `phone_number` body parameters.
|
|
970
|
+
If the customer profile doesn't exist, it is created when the TOTP is validated via the `passwordless/token` endpoint.
|
|
971
|
+
|
|
972
|
+
When set to `false` (or omitted), no customer profile is created in B2C Commerce.
|
|
949
973
|
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
|
|
950
974
|
* @param options.body - The data to send as the request body.
|
|
951
975
|
* @param options.body.user_id - User ID for logging in.
|
|
@@ -954,6 +978,10 @@ declare class ShopperLogin<ConfigParameters extends ShopperLoginParameters & Rec
|
|
|
954
978
|
* @param options.body.usid - The shopper\'s unique identifier, if known. If not provided, a new USID is generated.
|
|
955
979
|
* @param options.body.channel_id - The channel (B2C Commerce site) that the user is associated with.
|
|
956
980
|
* @param options.body.callback_uri - The callback URI. Required when the mode is `callback`. The `callback_uri` property will be validated against the callback URIs that have been registered with the SLAS client. The callback URI _must_ be a `POST` endpoint because the token will be included in the body. Wildcards are not allowed in the callback_uri because this is a security risk that can expose the token. This is not considered an OAuth2 callback_url.
|
|
981
|
+
* @param options.body.last_name - The user\'s last name. Required when `register_customer` is `true`. The `last_name` parameter is not used when `register_customer` parameter is not added or is `false`.
|
|
982
|
+
* @param options.body.email - The user\'s email address. Required when `register_customer` is `true` and `user_id` is not an email address. The `email` parameter is not used when `register_customer` parameter is not added or is `false`.
|
|
983
|
+
* @param options.body.first_name - The user\'s first name. Optional when `register_customer` is `true`. The `first_name` parameter is not used when `register_customer` parameter is not added or is `false`.
|
|
984
|
+
* @param options.body.phone_number - The user\'s phone number. Optional when `register_customer` is `true`. The `phone_number` parameter is not used when `register_customer` parameter is not added or is `false`.
|
|
957
985
|
* @param rawResponse - Set to true to return entire Response object instead of DTO.
|
|
958
986
|
*
|
|
959
987
|
* @returns A promise of type Response if rawResponse is true, a promise of type string otherwise.
|
|
@@ -961,6 +989,7 @@ declare class ShopperLogin<ConfigParameters extends ShopperLoginParameters & Rec
|
|
|
961
989
|
authorizePasswordlessCustomer<T extends boolean>(options?: RequireParametersUnlessAllAreOptional<{
|
|
962
990
|
parameters?: CompositeParameters<{
|
|
963
991
|
organizationId: string;
|
|
992
|
+
register_customer?: string;
|
|
964
993
|
} & QueryParameters, ConfigParameters>;
|
|
965
994
|
headers?: {
|
|
966
995
|
[key: string]: string;
|