@bigcommerce/checkout-sdk 1.227.1 → 1.227.4
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/CHANGELOG.md +21 -0
- package/dist/checkout-button.js +1 -1
- package/dist/checkout-button.js.map +1 -1
- package/dist/checkout-button.umd.js +2 -2
- package/dist/checkout-button.umd.js.map +1 -1
- package/dist/checkout-sdk.d.ts +60 -18
- package/dist/checkout-sdk.js +1 -1
- package/dist/checkout-sdk.js.map +1 -1
- package/dist/checkout-sdk.umd.js +3 -3
- package/dist/checkout-sdk.umd.js.map +1 -1
- package/dist/hosted-form.js +1 -1
- package/dist/hosted-form.js.map +1 -1
- package/dist/hosted-form.umd.js +1 -1
- package/dist/hosted-form.umd.js.map +1 -1
- package/docs/README.md +4 -0
- package/docs/classes/checkoutservice.md +12 -13
- package/docs/interfaces/checkoutstoreerrorselector.md +13 -0
- package/docs/interfaces/checkoutstoreselector.md +21 -0
- package/docs/interfaces/checkoutstorestatusselector.md +13 -0
- package/docs/interfaces/inputdetail.md +1 -1
- package/docs/interfaces/inputdetail_2.md +1 -1
- package/docs/interfaces/item.md +6 -10
- package/docs/interfaces/item_3.md +30 -0
- package/docs/interfaces/option.md +26 -0
- package/docs/interfaces/pickupmethod.md +47 -0
- package/docs/interfaces/pickupoptionresult.md +19 -0
- package/docs/interfaces/subinputdetail.md +1 -1
- package/docs/interfaces/subinputdetail_2.md +1 -1
- package/package.json +1 -1
package/dist/checkout-sdk.d.ts
CHANGED
|
@@ -2144,21 +2144,20 @@ declare class CheckoutService {
|
|
|
2144
2144
|
* Loads a list of pickup options for a given criteria.
|
|
2145
2145
|
*
|
|
2146
2146
|
* ```js
|
|
2147
|
-
* const
|
|
2148
|
-
*
|
|
2149
|
-
*
|
|
2150
|
-
*
|
|
2151
|
-
*
|
|
2152
|
-
* },
|
|
2153
|
-
* coordinates: {
|
|
2154
|
-
* latitude: 1.4,
|
|
2155
|
-
* longitude: 0
|
|
2156
|
-
* },
|
|
2147
|
+
* const consignmentId = '1';
|
|
2148
|
+
* const searchArea = {
|
|
2149
|
+
* radius: {
|
|
2150
|
+
* value: 1.4,
|
|
2151
|
+
* unit: 'KM'
|
|
2157
2152
|
* },
|
|
2158
|
-
*
|
|
2159
|
-
*
|
|
2153
|
+
* coordinates: {
|
|
2154
|
+
* latitude: 1.4,
|
|
2155
|
+
* longitude: 0
|
|
2156
|
+
* },
|
|
2157
|
+
* };
|
|
2158
|
+
* const state = await service.loadPickupOptions({ consignmentId, searchArea });
|
|
2160
2159
|
*
|
|
2161
|
-
* console.log(state.data.getPickupOptions());
|
|
2160
|
+
* console.log(state.data.getPickupOptions(consignmentId, searchArea));
|
|
2162
2161
|
* ```
|
|
2163
2162
|
*
|
|
2164
2163
|
* @alpha
|
|
@@ -3101,6 +3100,12 @@ declare interface CheckoutStoreErrorSelector {
|
|
|
3101
3100
|
* @returns The error object if unable to create address, otherwise undefined.
|
|
3102
3101
|
*/
|
|
3103
3102
|
getCreateCustomerAddressError(): Error | undefined;
|
|
3103
|
+
/**
|
|
3104
|
+
* Returns an error if unable to fetch pickup options.
|
|
3105
|
+
*
|
|
3106
|
+
* @returns The error object if unable to fetch pickup options, otherwise undefined.
|
|
3107
|
+
*/
|
|
3108
|
+
getPickupOptionsError(): Error | undefined;
|
|
3104
3109
|
}
|
|
3105
3110
|
|
|
3106
3111
|
/**
|
|
@@ -3312,6 +3317,15 @@ declare interface CheckoutStoreSelector {
|
|
|
3312
3317
|
* otherwise undefined.
|
|
3313
3318
|
*/
|
|
3314
3319
|
getShippingAddressFields(countryCode: string): FormField[];
|
|
3320
|
+
/**
|
|
3321
|
+
* Gets a list of pickup options for specified parameters.
|
|
3322
|
+
*
|
|
3323
|
+
* @param consignmentId - Id of consignment.
|
|
3324
|
+
* @param searchArea - An object containing of radius and co-ordinates.
|
|
3325
|
+
* @returns The set of shipping address form fields if it is loaded,
|
|
3326
|
+
* otherwise undefined.
|
|
3327
|
+
*/
|
|
3328
|
+
getPickupOptions(consignmentId: string, searchArea: SearchArea): PickupOptionResult[] | undefined;
|
|
3315
3329
|
}
|
|
3316
3330
|
|
|
3317
3331
|
/**
|
|
@@ -3630,6 +3644,12 @@ declare interface CheckoutStoreStatusSelector {
|
|
|
3630
3644
|
* @returns True if creating, otherwise false.
|
|
3631
3645
|
*/
|
|
3632
3646
|
isCreatingCustomerAddress(): boolean;
|
|
3647
|
+
/**
|
|
3648
|
+
* Checks whether pickup options are loading.
|
|
3649
|
+
*
|
|
3650
|
+
* @returns True if pickup options are loading, otherwise false.
|
|
3651
|
+
*/
|
|
3652
|
+
isLoadingPickupOptions(): boolean;
|
|
3633
3653
|
}
|
|
3634
3654
|
|
|
3635
3655
|
declare type ComparableCheckout = Pick<Checkout, 'outstandingBalance' | 'coupons' | 'giftCertificates'> & {
|
|
@@ -4731,7 +4751,7 @@ declare interface InputDetail {
|
|
|
4731
4751
|
/**
|
|
4732
4752
|
* In case of a select, the items to choose from.
|
|
4733
4753
|
*/
|
|
4734
|
-
items?:
|
|
4754
|
+
items?: Item_2[];
|
|
4735
4755
|
/**
|
|
4736
4756
|
* The value to provide in the result.
|
|
4737
4757
|
*/
|
|
@@ -4766,7 +4786,7 @@ declare interface InputDetail_2 {
|
|
|
4766
4786
|
/**
|
|
4767
4787
|
* In case of a select, the items to choose from.
|
|
4768
4788
|
*/
|
|
4769
|
-
items?:
|
|
4789
|
+
items?: Item_3[];
|
|
4770
4790
|
/**
|
|
4771
4791
|
* The value to provide in the result.
|
|
4772
4792
|
*/
|
|
@@ -4796,6 +4816,11 @@ declare interface InputStyles extends BlockElementStyles {
|
|
|
4796
4816
|
declare type Instrument = CardInstrument;
|
|
4797
4817
|
|
|
4798
4818
|
declare interface Item {
|
|
4819
|
+
variantId: number;
|
|
4820
|
+
quantity: number;
|
|
4821
|
+
}
|
|
4822
|
+
|
|
4823
|
+
declare interface Item_2 {
|
|
4799
4824
|
/**
|
|
4800
4825
|
* The value to provide in the result.
|
|
4801
4826
|
*/
|
|
@@ -4806,7 +4831,7 @@ declare interface Item {
|
|
|
4806
4831
|
name?: string;
|
|
4807
4832
|
}
|
|
4808
4833
|
|
|
4809
|
-
declare interface
|
|
4834
|
+
declare interface Item_3 {
|
|
4810
4835
|
/**
|
|
4811
4836
|
* The value to provide in the result.
|
|
4812
4837
|
*/
|
|
@@ -5266,6 +5291,11 @@ declare interface NonceInstrument {
|
|
|
5266
5291
|
|
|
5267
5292
|
declare type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
|
5268
5293
|
|
|
5294
|
+
declare interface Option {
|
|
5295
|
+
pickupMethod: PickupMethod;
|
|
5296
|
+
itemQuantities: Item;
|
|
5297
|
+
}
|
|
5298
|
+
|
|
5269
5299
|
/**
|
|
5270
5300
|
* When creating your Drop-in instance, you can specify options to trigger different features or functionality.
|
|
5271
5301
|
* https://docs.digitalriver.com/digital-river-api/payment-integrations-1/drop-in/drop-in-integration-guide#drop-in-options
|
|
@@ -6131,11 +6161,23 @@ declare interface PhysicalItem extends LineItem {
|
|
|
6131
6161
|
};
|
|
6132
6162
|
}
|
|
6133
6163
|
|
|
6164
|
+
declare interface PickupMethod {
|
|
6165
|
+
id: number;
|
|
6166
|
+
locationId: number;
|
|
6167
|
+
displayName: string;
|
|
6168
|
+
collectionInstructions: string;
|
|
6169
|
+
collectionTimeDescription: string;
|
|
6170
|
+
}
|
|
6171
|
+
|
|
6134
6172
|
declare interface PickupOptionRequestBody {
|
|
6135
6173
|
searchArea: SearchArea;
|
|
6136
6174
|
consignmentId: string;
|
|
6137
6175
|
}
|
|
6138
6176
|
|
|
6177
|
+
declare interface PickupOptionResult {
|
|
6178
|
+
options: Option[];
|
|
6179
|
+
}
|
|
6180
|
+
|
|
6139
6181
|
declare interface Promotion {
|
|
6140
6182
|
banners: Banner[];
|
|
6141
6183
|
}
|
|
@@ -6758,7 +6800,7 @@ declare interface SubInputDetail {
|
|
|
6758
6800
|
/**
|
|
6759
6801
|
* In case of a select, the items to choose from.
|
|
6760
6802
|
*/
|
|
6761
|
-
items?:
|
|
6803
|
+
items?: Item_2[];
|
|
6762
6804
|
/**
|
|
6763
6805
|
* The value to provide in the result.
|
|
6764
6806
|
*/
|
|
@@ -6785,7 +6827,7 @@ declare interface SubInputDetail_2 {
|
|
|
6785
6827
|
/**
|
|
6786
6828
|
* In case of a select, the items to choose from.
|
|
6787
6829
|
*/
|
|
6788
|
-
items?:
|
|
6830
|
+
items?: Item_3[];
|
|
6789
6831
|
/**
|
|
6790
6832
|
* The value to provide in the result.
|
|
6791
6833
|
*/
|