@bigcommerce/checkout-sdk 1.392.0 → 1.393.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/dist/checkout-button.js +1 -1
- package/dist/checkout-button.js.map +1 -1
- package/dist/checkout-button.umd.js +1 -1
- package/dist/checkout-button.umd.js.map +1 -1
- package/dist/checkout-sdk.d.ts +42 -0
- package/dist/checkout-sdk.js +1 -1
- package/dist/checkout-sdk.js.map +1 -1
- package/dist/checkout-sdk.umd.js +1 -1
- package/dist/checkout-sdk.umd.js.map +1 -1
- package/docs/README.md +2 -0
- package/docs/classes/CheckoutService.md +29 -0
- package/docs/enums/ExtensionRegions.md +22 -0
- package/docs/interfaces/CheckoutStoreErrorSelector.md +17 -0
- package/docs/interfaces/CheckoutStoreSelector.md +17 -0
- package/docs/interfaces/Extension.md +36 -0
- package/package.json +1 -1
package/docs/README.md
CHANGED
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
- [CheckoutButtonMethodType](enums/CheckoutButtonMethodType.md)
|
|
20
20
|
- [CheckoutIncludes](enums/CheckoutIncludes.md)
|
|
21
21
|
- [EmbeddedCheckoutEventType](enums/EmbeddedCheckoutEventType.md)
|
|
22
|
+
- [ExtensionRegions](enums/ExtensionRegions.md)
|
|
22
23
|
- [HostedFieldType](enums/HostedFieldType.md)
|
|
23
24
|
- [HostedInputEventType](enums/HostedInputEventType.md)
|
|
24
25
|
- [IconStyle](enums/IconStyle.md)
|
|
@@ -217,6 +218,7 @@
|
|
|
217
218
|
- [EmbeddedCheckoutStyles](interfaces/EmbeddedCheckoutStyles.md)
|
|
218
219
|
- [EmbeddedContentOptions](interfaces/EmbeddedContentOptions.md)
|
|
219
220
|
- [ExecutePaymentMethodCheckoutOptions](interfaces/ExecutePaymentMethodCheckoutOptions.md)
|
|
221
|
+
- [Extension](interfaces/Extension.md)
|
|
220
222
|
- [FlashMessage](interfaces/FlashMessage.md)
|
|
221
223
|
- [FormField](interfaces/FormField.md)
|
|
222
224
|
- [FormFieldItem](interfaces/FormFieldItem.md)
|
|
@@ -41,6 +41,7 @@ retrieve the current checkout state and subscribe to its changes.
|
|
|
41
41
|
- [loadBillingAddressFields](CheckoutService.md#loadbillingaddressfields)
|
|
42
42
|
- [loadBillingCountries](CheckoutService.md#loadbillingcountries)
|
|
43
43
|
- [loadCheckout](CheckoutService.md#loadcheckout)
|
|
44
|
+
- [loadExtensions](CheckoutService.md#loadextensions)
|
|
44
45
|
- [loadInstruments](CheckoutService.md#loadinstruments)
|
|
45
46
|
- [loadOrder](CheckoutService.md#loadorder)
|
|
46
47
|
- [loadPaymentMethods](CheckoutService.md#loadpaymentmethods)
|
|
@@ -865,6 +866,34 @@ A promise that resolves to the current state.
|
|
|
865
866
|
|
|
866
867
|
___
|
|
867
868
|
|
|
869
|
+
### loadExtensions
|
|
870
|
+
|
|
871
|
+
▸ **loadExtensions**(`options?`): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
|
|
872
|
+
|
|
873
|
+
Loads a list of extensions available for checkout.
|
|
874
|
+
|
|
875
|
+
```js
|
|
876
|
+
const state = service.loadExtensions();
|
|
877
|
+
|
|
878
|
+
console.log(state.data.getExtensions());
|
|
879
|
+
```
|
|
880
|
+
|
|
881
|
+
**`alpha`**
|
|
882
|
+
|
|
883
|
+
#### Parameters
|
|
884
|
+
|
|
885
|
+
| Name | Type | Description |
|
|
886
|
+
| :------ | :------ | :------ |
|
|
887
|
+
| `options?` | [`RequestOptions`](../interfaces/RequestOptions.md)<`Object`\> | Options for loading the extensions that are available to the current customer. |
|
|
888
|
+
|
|
889
|
+
#### Returns
|
|
890
|
+
|
|
891
|
+
`Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
|
|
892
|
+
|
|
893
|
+
A promise that resolves to the current state.
|
|
894
|
+
|
|
895
|
+
___
|
|
896
|
+
|
|
868
897
|
### loadInstruments
|
|
869
898
|
|
|
870
899
|
▸ **loadInstruments**(): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
[@bigcommerce/checkout-sdk](../README.md) / ExtensionRegions
|
|
2
|
+
|
|
3
|
+
# Enumeration: ExtensionRegions
|
|
4
|
+
|
|
5
|
+
## Table of contents
|
|
6
|
+
|
|
7
|
+
### Enumeration Members
|
|
8
|
+
|
|
9
|
+
- [ShippingShippingAddressFormAfter](ExtensionRegions.md#shippingshippingaddressformafter)
|
|
10
|
+
- [ShippingShippingAddressFormBefore](ExtensionRegions.md#shippingshippingaddressformbefore)
|
|
11
|
+
|
|
12
|
+
## Enumeration Members
|
|
13
|
+
|
|
14
|
+
### ShippingShippingAddressFormAfter
|
|
15
|
+
|
|
16
|
+
• **ShippingShippingAddressFormAfter**
|
|
17
|
+
|
|
18
|
+
___
|
|
19
|
+
|
|
20
|
+
### ShippingShippingAddressFormBefore
|
|
21
|
+
|
|
22
|
+
• **ShippingShippingAddressFormBefore**
|
|
@@ -31,6 +31,7 @@ you can use this object to retrieve the reason for the failure.
|
|
|
31
31
|
- [getLoadCartError](CheckoutStoreErrorSelector.md#getloadcarterror)
|
|
32
32
|
- [getLoadCheckoutError](CheckoutStoreErrorSelector.md#getloadcheckouterror)
|
|
33
33
|
- [getLoadConfigError](CheckoutStoreErrorSelector.md#getloadconfigerror)
|
|
34
|
+
- [getLoadExtensionsError](CheckoutStoreErrorSelector.md#getloadextensionserror)
|
|
34
35
|
- [getLoadInstrumentsError](CheckoutStoreErrorSelector.md#getloadinstrumentserror)
|
|
35
36
|
- [getLoadOrderError](CheckoutStoreErrorSelector.md#getloadordererror)
|
|
36
37
|
- [getLoadPaymentMethodError](CheckoutStoreErrorSelector.md#getloadpaymentmethoderror)
|
|
@@ -347,6 +348,22 @@ The error object if unable to load, otherwise undefined.
|
|
|
347
348
|
|
|
348
349
|
___
|
|
349
350
|
|
|
351
|
+
### getLoadExtensionsError
|
|
352
|
+
|
|
353
|
+
▸ **getLoadExtensionsError**(): `undefined` \| `Error`
|
|
354
|
+
|
|
355
|
+
Returns an error if unable to fetch extensions.
|
|
356
|
+
|
|
357
|
+
**`alpha`**
|
|
358
|
+
|
|
359
|
+
#### Returns
|
|
360
|
+
|
|
361
|
+
`undefined` \| `Error`
|
|
362
|
+
|
|
363
|
+
The error object if unable to fetch extensions, otherwise undefined.
|
|
364
|
+
|
|
365
|
+
___
|
|
366
|
+
|
|
350
367
|
### getLoadInstrumentsError
|
|
351
368
|
|
|
352
369
|
▸ **getLoadInstrumentsError**(): `undefined` \| `Error`
|
|
@@ -21,6 +21,7 @@ checkout information, such as shipping and billing details.
|
|
|
21
21
|
- [getCoupons](CheckoutStoreSelector.md#getcoupons)
|
|
22
22
|
- [getCustomer](CheckoutStoreSelector.md#getcustomer)
|
|
23
23
|
- [getCustomerAccountFields](CheckoutStoreSelector.md#getcustomeraccountfields)
|
|
24
|
+
- [getExtensions](CheckoutStoreSelector.md#getextensions)
|
|
24
25
|
- [getFlashMessages](CheckoutStoreSelector.md#getflashmessages)
|
|
25
26
|
- [getGiftCertificates](CheckoutStoreSelector.md#getgiftcertificates)
|
|
26
27
|
- [getInstruments](CheckoutStoreSelector.md#getinstruments)
|
|
@@ -194,6 +195,22 @@ otherwise undefined.
|
|
|
194
195
|
|
|
195
196
|
___
|
|
196
197
|
|
|
198
|
+
### getExtensions
|
|
199
|
+
|
|
200
|
+
▸ **getExtensions**(): `undefined` \| [`Extension`](Extension.md)[]
|
|
201
|
+
|
|
202
|
+
Gets a list of extensions available for checkout.
|
|
203
|
+
|
|
204
|
+
**`alpha`**
|
|
205
|
+
|
|
206
|
+
#### Returns
|
|
207
|
+
|
|
208
|
+
`undefined` \| [`Extension`](Extension.md)[]
|
|
209
|
+
|
|
210
|
+
The list of extensions if it is loaded, otherwise undefined.
|
|
211
|
+
|
|
212
|
+
___
|
|
213
|
+
|
|
197
214
|
### getFlashMessages
|
|
198
215
|
|
|
199
216
|
▸ **getFlashMessages**(`type?`): `undefined` \| [`FlashMessage`](FlashMessage.md)[]
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
[@bigcommerce/checkout-sdk](../README.md) / Extension
|
|
2
|
+
|
|
3
|
+
# Interface: Extension
|
|
4
|
+
|
|
5
|
+
## Table of contents
|
|
6
|
+
|
|
7
|
+
### Properties
|
|
8
|
+
|
|
9
|
+
- [id](Extension.md#id)
|
|
10
|
+
- [name](Extension.md#name)
|
|
11
|
+
- [region](Extension.md#region)
|
|
12
|
+
- [url](Extension.md#url)
|
|
13
|
+
|
|
14
|
+
## Properties
|
|
15
|
+
|
|
16
|
+
### id
|
|
17
|
+
|
|
18
|
+
• **id**: `string`
|
|
19
|
+
|
|
20
|
+
___
|
|
21
|
+
|
|
22
|
+
### name
|
|
23
|
+
|
|
24
|
+
• **name**: `string`
|
|
25
|
+
|
|
26
|
+
___
|
|
27
|
+
|
|
28
|
+
### region
|
|
29
|
+
|
|
30
|
+
• **region**: [`ExtensionRegions`](../enums/ExtensionRegions.md)
|
|
31
|
+
|
|
32
|
+
___
|
|
33
|
+
|
|
34
|
+
### url
|
|
35
|
+
|
|
36
|
+
• **url**: `string`
|