@bigcommerce/checkout-sdk 1.227.2 → 1.228.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/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/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/docs/README.md
CHANGED
|
@@ -221,6 +221,7 @@
|
|
|
221
221
|
* [InputStyles](interfaces/inputstyles.md)
|
|
222
222
|
* [Item](interfaces/item.md)
|
|
223
223
|
* [Item_2](interfaces/item_2.md)
|
|
224
|
+
* [Item_3](interfaces/item_3.md)
|
|
224
225
|
* [KlarnaLoadResponse](interfaces/klarnaloadresponse.md)
|
|
225
226
|
* [KlarnaLoadResponse_2](interfaces/klarnaloadresponse_2.md)
|
|
226
227
|
* [KlarnaPaymentInitializeOptions](interfaces/klarnapaymentinitializeoptions.md)
|
|
@@ -242,6 +243,7 @@
|
|
|
242
243
|
* [MonerisStylingProps](interfaces/monerisstylingprops.md)
|
|
243
244
|
* [NonceGenerationError](interfaces/noncegenerationerror.md)
|
|
244
245
|
* [NonceInstrument](interfaces/nonceinstrument.md)
|
|
246
|
+
* [Option](interfaces/option.md)
|
|
245
247
|
* [OptionsResponse](interfaces/optionsresponse.md)
|
|
246
248
|
* [OpyPaymentInitializeOptions](interfaces/opypaymentinitializeoptions.md)
|
|
247
249
|
* [Order](interfaces/order.md)
|
|
@@ -276,7 +278,9 @@
|
|
|
276
278
|
* [PaypalExpressPaymentInitializeOptions](interfaces/paypalexpresspaymentinitializeoptions.md)
|
|
277
279
|
* [PaypalFieldsStyleOptions](interfaces/paypalfieldsstyleoptions.md)
|
|
278
280
|
* [PhysicalItem](interfaces/physicalitem.md)
|
|
281
|
+
* [PickupMethod](interfaces/pickupmethod.md)
|
|
279
282
|
* [PickupOptionRequestBody](interfaces/pickupoptionrequestbody.md)
|
|
283
|
+
* [PickupOptionResult](interfaces/pickupoptionresult.md)
|
|
280
284
|
* [Promotion](interfaces/promotion.md)
|
|
281
285
|
* [Radius](interfaces/radius.md)
|
|
282
286
|
* [Region](interfaces/region.md)
|
|
@@ -901,21 +901,20 @@ ___
|
|
|
901
901
|
Loads a list of pickup options for a given criteria.
|
|
902
902
|
|
|
903
903
|
```js
|
|
904
|
-
const
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
},
|
|
910
|
-
coordinates: {
|
|
911
|
-
latitude: 1.4,
|
|
912
|
-
longitude: 0
|
|
913
|
-
},
|
|
904
|
+
const consignmentId = '1';
|
|
905
|
+
const searchArea = {
|
|
906
|
+
radius: {
|
|
907
|
+
value: 1.4,
|
|
908
|
+
unit: 'KM'
|
|
914
909
|
},
|
|
915
|
-
|
|
916
|
-
|
|
910
|
+
coordinates: {
|
|
911
|
+
latitude: 1.4,
|
|
912
|
+
longitude: 0
|
|
913
|
+
},
|
|
914
|
+
};
|
|
915
|
+
const state = await service.loadPickupOptions({ consignmentId, searchArea });
|
|
917
916
|
|
|
918
|
-
console.log(state.data.getPickupOptions());
|
|
917
|
+
console.log(state.data.getPickupOptions(consignmentId, searchArea));
|
|
919
918
|
```
|
|
920
919
|
|
|
921
920
|
**`alpha`**
|
|
@@ -41,6 +41,7 @@ you can use this object to retrieve the reason for the failure.
|
|
|
41
41
|
* [getLoadPaymentMethodsError](checkoutstoreerrorselector.md#getloadpaymentmethodserror)
|
|
42
42
|
* [getLoadShippingCountriesError](checkoutstoreerrorselector.md#getloadshippingcountrieserror)
|
|
43
43
|
* [getLoadShippingOptionsError](checkoutstoreerrorselector.md#getloadshippingoptionserror)
|
|
44
|
+
* [getPickupOptionsError](checkoutstoreerrorselector.md#getpickupoptionserror)
|
|
44
45
|
* [getRemoveCouponError](checkoutstoreerrorselector.md#getremovecouponerror)
|
|
45
46
|
* [getRemoveGiftCertificateError](checkoutstoreerrorselector.md#getremovegiftcertificateerror)
|
|
46
47
|
* [getSelectShippingOptionError](checkoutstoreerrorselector.md#getselectshippingoptionerror)
|
|
@@ -392,6 +393,18 @@ The error object if unable to load, otherwise undefined.
|
|
|
392
393
|
|
|
393
394
|
___
|
|
394
395
|
|
|
396
|
+
### getPickupOptionsError
|
|
397
|
+
|
|
398
|
+
▸ **getPickupOptionsError**(): *[Error](amazonpaywidgeterror.md#error) | undefined*
|
|
399
|
+
|
|
400
|
+
Returns an error if unable to fetch pickup options.
|
|
401
|
+
|
|
402
|
+
**Returns:** *[Error](amazonpaywidgeterror.md#error) | undefined*
|
|
403
|
+
|
|
404
|
+
The error object if unable to fetch pickup options, otherwise undefined.
|
|
405
|
+
|
|
406
|
+
___
|
|
407
|
+
|
|
395
408
|
### getRemoveCouponError
|
|
396
409
|
|
|
397
410
|
▸ **getRemoveCouponError**(): *[RequestError](../classes/requesterror.md) | undefined*
|
|
@@ -31,6 +31,7 @@ checkout information, such as shipping and billing details.
|
|
|
31
31
|
* [getOrder](checkoutstoreselector.md#getorder)
|
|
32
32
|
* [getPaymentMethod](checkoutstoreselector.md#getpaymentmethod)
|
|
33
33
|
* [getPaymentMethods](checkoutstoreselector.md#getpaymentmethods)
|
|
34
|
+
* [getPickupOptions](checkoutstoreselector.md#getpickupoptions)
|
|
34
35
|
* [getSelectedPaymentMethod](checkoutstoreselector.md#getselectedpaymentmethod)
|
|
35
36
|
* [getSelectedShippingOption](checkoutstoreselector.md#getselectedshippingoption)
|
|
36
37
|
* [getShippingAddress](checkoutstoreselector.md#getshippingaddress)
|
|
@@ -279,6 +280,26 @@ The list of payment methods if it is loaded, otherwise undefined.
|
|
|
279
280
|
|
|
280
281
|
___
|
|
281
282
|
|
|
283
|
+
### getPickupOptions
|
|
284
|
+
|
|
285
|
+
▸ **getPickupOptions**(`consignmentId`: string, `searchArea`: [SearchArea](searcharea.md)): *[PickupOptionResult](pickupoptionresult.md)[] | undefined*
|
|
286
|
+
|
|
287
|
+
Gets a list of pickup options for specified parameters.
|
|
288
|
+
|
|
289
|
+
**Parameters:**
|
|
290
|
+
|
|
291
|
+
Name | Type | Description |
|
|
292
|
+
------ | ------ | ------ |
|
|
293
|
+
`consignmentId` | string | Id of consignment. |
|
|
294
|
+
`searchArea` | [SearchArea](searcharea.md) | An object containing of radius and co-ordinates. |
|
|
295
|
+
|
|
296
|
+
**Returns:** *[PickupOptionResult](pickupoptionresult.md)[] | undefined*
|
|
297
|
+
|
|
298
|
+
The set of shipping address form fields if it is loaded,
|
|
299
|
+
otherwise undefined.
|
|
300
|
+
|
|
301
|
+
___
|
|
302
|
+
|
|
282
303
|
### getSelectedPaymentMethod
|
|
283
304
|
|
|
284
305
|
▸ **getSelectedPaymentMethod**(): *[PaymentMethod](paymentmethod.md) | undefined*
|
|
@@ -41,6 +41,7 @@ order and waiting for the request to complete.
|
|
|
41
41
|
* [isLoadingOrder](checkoutstorestatusselector.md#isloadingorder)
|
|
42
42
|
* [isLoadingPaymentMethod](checkoutstorestatusselector.md#isloadingpaymentmethod)
|
|
43
43
|
* [isLoadingPaymentMethods](checkoutstorestatusselector.md#isloadingpaymentmethods)
|
|
44
|
+
* [isLoadingPickupOptions](checkoutstorestatusselector.md#isloadingpickupoptions)
|
|
44
45
|
* [isLoadingShippingCountries](checkoutstorestatusselector.md#isloadingshippingcountries)
|
|
45
46
|
* [isLoadingShippingOptions](checkoutstorestatusselector.md#isloadingshippingoptions)
|
|
46
47
|
* [isPaymentStepPending](checkoutstorestatusselector.md#ispaymentsteppending)
|
|
@@ -417,6 +418,18 @@ True if payment methods are loading, otherwise false.
|
|
|
417
418
|
|
|
418
419
|
___
|
|
419
420
|
|
|
421
|
+
### isLoadingPickupOptions
|
|
422
|
+
|
|
423
|
+
▸ **isLoadingPickupOptions**(): *boolean*
|
|
424
|
+
|
|
425
|
+
Checks whether pickup options are loading.
|
|
426
|
+
|
|
427
|
+
**Returns:** *boolean*
|
|
428
|
+
|
|
429
|
+
True if pickup options are loading, otherwise false.
|
|
430
|
+
|
|
431
|
+
___
|
|
432
|
+
|
|
420
433
|
### isLoadingShippingCountries
|
|
421
434
|
|
|
422
435
|
▸ **isLoadingShippingCountries**(): *boolean*
|
package/docs/interfaces/item.md
CHANGED
|
@@ -10,21 +10,17 @@
|
|
|
10
10
|
|
|
11
11
|
### Properties
|
|
12
12
|
|
|
13
|
-
* [
|
|
14
|
-
* [
|
|
13
|
+
* [quantity](item.md#quantity)
|
|
14
|
+
* [variantId](item.md#variantid)
|
|
15
15
|
|
|
16
16
|
## Properties
|
|
17
17
|
|
|
18
|
-
###
|
|
18
|
+
### quantity
|
|
19
19
|
|
|
20
|
-
• **
|
|
21
|
-
|
|
22
|
-
The value to provide in the result.
|
|
20
|
+
• **quantity**: *number*
|
|
23
21
|
|
|
24
22
|
___
|
|
25
23
|
|
|
26
|
-
###
|
|
27
|
-
|
|
28
|
-
• **name**? : *undefined | string*
|
|
24
|
+
### variantId
|
|
29
25
|
|
|
30
|
-
|
|
26
|
+
• **variantId**: *number*
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
[@bigcommerce/checkout-sdk](../README.md) › [Item_3](item_3.md)
|
|
2
|
+
|
|
3
|
+
# Interface: Item_3
|
|
4
|
+
|
|
5
|
+
## Hierarchy
|
|
6
|
+
|
|
7
|
+
* **Item_3**
|
|
8
|
+
|
|
9
|
+
## Index
|
|
10
|
+
|
|
11
|
+
### Properties
|
|
12
|
+
|
|
13
|
+
* [id](item_3.md#optional-id)
|
|
14
|
+
* [name](item_3.md#optional-name)
|
|
15
|
+
|
|
16
|
+
## Properties
|
|
17
|
+
|
|
18
|
+
### `Optional` id
|
|
19
|
+
|
|
20
|
+
• **id**? : *undefined | string*
|
|
21
|
+
|
|
22
|
+
The value to provide in the result.
|
|
23
|
+
|
|
24
|
+
___
|
|
25
|
+
|
|
26
|
+
### `Optional` name
|
|
27
|
+
|
|
28
|
+
• **name**? : *undefined | string*
|
|
29
|
+
|
|
30
|
+
The display name.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
[@bigcommerce/checkout-sdk](../README.md) › [Option](option.md)
|
|
2
|
+
|
|
3
|
+
# Interface: Option
|
|
4
|
+
|
|
5
|
+
## Hierarchy
|
|
6
|
+
|
|
7
|
+
* **Option**
|
|
8
|
+
|
|
9
|
+
## Index
|
|
10
|
+
|
|
11
|
+
### Properties
|
|
12
|
+
|
|
13
|
+
* [itemQuantities](option.md#itemquantities)
|
|
14
|
+
* [pickupMethod](option.md#pickupmethod)
|
|
15
|
+
|
|
16
|
+
## Properties
|
|
17
|
+
|
|
18
|
+
### itemQuantities
|
|
19
|
+
|
|
20
|
+
• **itemQuantities**: *[Item](item.md)*
|
|
21
|
+
|
|
22
|
+
___
|
|
23
|
+
|
|
24
|
+
### pickupMethod
|
|
25
|
+
|
|
26
|
+
• **pickupMethod**: *[PickupMethod](pickupmethod.md)*
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
[@bigcommerce/checkout-sdk](../README.md) › [PickupMethod](pickupmethod.md)
|
|
2
|
+
|
|
3
|
+
# Interface: PickupMethod
|
|
4
|
+
|
|
5
|
+
## Hierarchy
|
|
6
|
+
|
|
7
|
+
* **PickupMethod**
|
|
8
|
+
|
|
9
|
+
## Index
|
|
10
|
+
|
|
11
|
+
### Properties
|
|
12
|
+
|
|
13
|
+
* [collectionInstructions](pickupmethod.md#collectioninstructions)
|
|
14
|
+
* [collectionTimeDescription](pickupmethod.md#collectiontimedescription)
|
|
15
|
+
* [displayName](pickupmethod.md#displayname)
|
|
16
|
+
* [id](pickupmethod.md#id)
|
|
17
|
+
* [locationId](pickupmethod.md#locationid)
|
|
18
|
+
|
|
19
|
+
## Properties
|
|
20
|
+
|
|
21
|
+
### collectionInstructions
|
|
22
|
+
|
|
23
|
+
• **collectionInstructions**: *string*
|
|
24
|
+
|
|
25
|
+
___
|
|
26
|
+
|
|
27
|
+
### collectionTimeDescription
|
|
28
|
+
|
|
29
|
+
• **collectionTimeDescription**: *string*
|
|
30
|
+
|
|
31
|
+
___
|
|
32
|
+
|
|
33
|
+
### displayName
|
|
34
|
+
|
|
35
|
+
• **displayName**: *string*
|
|
36
|
+
|
|
37
|
+
___
|
|
38
|
+
|
|
39
|
+
### id
|
|
40
|
+
|
|
41
|
+
• **id**: *number*
|
|
42
|
+
|
|
43
|
+
___
|
|
44
|
+
|
|
45
|
+
### locationId
|
|
46
|
+
|
|
47
|
+
• **locationId**: *number*
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
[@bigcommerce/checkout-sdk](../README.md) › [PickupOptionResult](pickupoptionresult.md)
|
|
2
|
+
|
|
3
|
+
# Interface: PickupOptionResult
|
|
4
|
+
|
|
5
|
+
## Hierarchy
|
|
6
|
+
|
|
7
|
+
* **PickupOptionResult**
|
|
8
|
+
|
|
9
|
+
## Index
|
|
10
|
+
|
|
11
|
+
### Properties
|
|
12
|
+
|
|
13
|
+
* [options](pickupoptionresult.md#options)
|
|
14
|
+
|
|
15
|
+
## Properties
|
|
16
|
+
|
|
17
|
+
### options
|
|
18
|
+
|
|
19
|
+
• **options**: *[Option](option.md)[]*
|