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.
Files changed (43) hide show
  1. package/lib/helpers.cjs.d.ts +31 -2
  2. package/lib/helpers.cjs.js +1 -1
  3. package/lib/helpers.d.ts +31 -2
  4. package/lib/helpers.js +1 -1
  5. package/lib/index.cjs.d.ts +93 -6
  6. package/lib/index.cjs.js +1 -1
  7. package/lib/index.esm.d.ts +93 -6
  8. package/lib/index.esm.js +1 -1
  9. package/lib/shopperBaskets.cjs.js +1 -1
  10. package/lib/shopperBaskets.js +1 -1
  11. package/lib/shopperBasketsv2.cjs.js +1 -1
  12. package/lib/shopperBasketsv2.js +1 -1
  13. package/lib/shopperConsents.cjs.js +1 -1
  14. package/lib/shopperConsents.js +1 -1
  15. package/lib/shopperContext.cjs.js +1 -1
  16. package/lib/shopperContext.js +1 -1
  17. package/lib/shopperCustomers.cjs.js +1 -1
  18. package/lib/shopperCustomers.js +1 -1
  19. package/lib/shopperExperience.cjs.js +1 -1
  20. package/lib/shopperExperience.js +1 -1
  21. package/lib/shopperGiftCertificates.cjs.js +1 -1
  22. package/lib/shopperGiftCertificates.js +1 -1
  23. package/lib/shopperLogin.cjs.d.ts +62 -4
  24. package/lib/shopperLogin.cjs.js +1 -1
  25. package/lib/shopperLogin.d.ts +62 -4
  26. package/lib/shopperLogin.js +1 -1
  27. package/lib/shopperOrders.cjs.js +1 -1
  28. package/lib/shopperOrders.js +1 -1
  29. package/lib/shopperProducts.cjs.js +1 -1
  30. package/lib/shopperProducts.js +1 -1
  31. package/lib/shopperPromotions.cjs.js +1 -1
  32. package/lib/shopperPromotions.js +1 -1
  33. package/lib/shopperSearch.cjs.js +1 -1
  34. package/lib/shopperSearch.js +1 -1
  35. package/lib/shopperSeo.cjs.js +1 -1
  36. package/lib/shopperSeo.js +1 -1
  37. package/lib/shopperStores.cjs.js +1 -1
  38. package/lib/shopperStores.js +1 -1
  39. package/lib/version.cjs.d.ts +1 -1
  40. package/lib/version.cjs.js +1 -1
  41. package/lib/version.d.ts +1 -1
  42. package/lib/version.js +1 -1
  43. package/package.json +1 -1
@@ -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;