@bigcommerce/checkout-sdk 1.700.2 → 1.701.1
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.umd.js +1 -1
- package/dist/checkout-sdk.d.ts +26 -7
- 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/dist/extension.js +1 -1
- package/dist/extension.js.map +1 -1
- package/dist/extension.umd.js +1 -1
- package/dist/extension.umd.js.map +1 -1
- package/dist/hosted-form-v2-iframe-host.js +1 -1
- package/dist/hosted-form-v2-iframe-host.umd.js +1 -1
- package/docs/README.md +3 -1
- package/docs/classes/CheckoutService.md +43 -0
- package/docs/enums/ExtensionCommandType.md +0 -7
- package/docs/enums/ExtensionQueryType.md +15 -0
- package/docs/interfaces/ExtensionCommandMap.md +0 -7
- package/docs/interfaces/ExtensionQueryMap.md +15 -0
- package/docs/interfaces/GetConsignmentsQuery.md +28 -0
- package/package.json +1 -1
- package/docs/interfaces/GetConsignmentsCommand.md +0 -15
package/docs/README.md
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
- [ExtensionCommandType](enums/ExtensionCommandType.md)
|
|
15
15
|
- [ExtensionEventType](enums/ExtensionEventType.md)
|
|
16
16
|
- [ExtensionMessageType](enums/ExtensionMessageType.md)
|
|
17
|
+
- [ExtensionQueryType](enums/ExtensionQueryType.md)
|
|
17
18
|
- [ExtensionRegion](enums/ExtensionRegion.md)
|
|
18
19
|
- [GooglePayKey](enums/GooglePayKey.md)
|
|
19
20
|
- [HostedFieldEventType](enums/HostedFieldEventType.md)
|
|
@@ -235,6 +236,7 @@
|
|
|
235
236
|
- [ExecutePaymentMethodCheckoutOptions](interfaces/ExecutePaymentMethodCheckoutOptions.md)
|
|
236
237
|
- [Extension](interfaces/Extension.md)
|
|
237
238
|
- [ExtensionCommandMap](interfaces/ExtensionCommandMap.md)
|
|
239
|
+
- [ExtensionQueryMap](interfaces/ExtensionQueryMap.md)
|
|
238
240
|
- [ExtensionSelector](interfaces/ExtensionSelector.md)
|
|
239
241
|
- [Fee](interfaces/Fee.md)
|
|
240
242
|
- [FlashMessage](interfaces/FlashMessage.md)
|
|
@@ -244,8 +246,8 @@
|
|
|
244
246
|
- [FormFields](interfaces/FormFields.md)
|
|
245
247
|
- [FormSelector](interfaces/FormSelector.md)
|
|
246
248
|
- [GatewayOrderPayment](interfaces/GatewayOrderPayment.md)
|
|
247
|
-
- [GetConsignmentsCommand](interfaces/GetConsignmentsCommand.md)
|
|
248
249
|
- [GetConsignmentsMessage](interfaces/GetConsignmentsMessage.md)
|
|
250
|
+
- [GetConsignmentsQuery](interfaces/GetConsignmentsQuery.md)
|
|
249
251
|
- [GiftCertificate](interfaces/GiftCertificate.md)
|
|
250
252
|
- [GiftCertificateItem](interfaces/GiftCertificateItem.md)
|
|
251
253
|
- [GiftCertificateOrderPayment](interfaces/GiftCertificateOrderPayment.md)
|
|
@@ -36,6 +36,7 @@ retrieve the current checkout state and subscribe to its changes.
|
|
|
36
36
|
- [finalizeOrderIfNeeded](CheckoutService.md#finalizeorderifneeded)
|
|
37
37
|
- [getState](CheckoutService.md#getstate)
|
|
38
38
|
- [handleExtensionCommand](CheckoutService.md#handleextensioncommand)
|
|
39
|
+
- [handleExtensionQuery](CheckoutService.md#handleextensionquery)
|
|
39
40
|
- [initializeCustomer](CheckoutService.md#initializecustomer)
|
|
40
41
|
- [initializePayment](CheckoutService.md#initializepayment)
|
|
41
42
|
- [initializeShipping](CheckoutService.md#initializeshipping)
|
|
@@ -708,6 +709,48 @@ A function that, when called, will deregister the command handler.
|
|
|
708
709
|
|
|
709
710
|
___
|
|
710
711
|
|
|
712
|
+
### handleExtensionQuery
|
|
713
|
+
|
|
714
|
+
▸ **handleExtensionQuery**<`T`\>(`extensionId`, `query`, `handler`): () => `void`
|
|
715
|
+
|
|
716
|
+
Manages the query handler for an extension.
|
|
717
|
+
|
|
718
|
+
**`alpha`**
|
|
719
|
+
|
|
720
|
+
#### Type parameters
|
|
721
|
+
|
|
722
|
+
| Name | Type |
|
|
723
|
+
| :------ | :------ |
|
|
724
|
+
| `T` | extends [`GetConsignments`](../enums/ExtensionQueryType.md#getconsignments) |
|
|
725
|
+
|
|
726
|
+
#### Parameters
|
|
727
|
+
|
|
728
|
+
| Name | Type | Description |
|
|
729
|
+
| :------ | :------ | :------ |
|
|
730
|
+
| `extensionId` | `string` | The ID of the extension sending the query. |
|
|
731
|
+
| `query` | `T` | The query to be handled. |
|
|
732
|
+
| `handler` | (`command`: [`ExtensionQueryMap`](../interfaces/ExtensionQueryMap.md)[`T`]) => `void` | The handler function for the extension query. |
|
|
733
|
+
|
|
734
|
+
#### Returns
|
|
735
|
+
|
|
736
|
+
`fn`
|
|
737
|
+
|
|
738
|
+
A function that, when called, will deregister the query handler.
|
|
739
|
+
|
|
740
|
+
▸ (): `void`
|
|
741
|
+
|
|
742
|
+
Manages the query handler for an extension.
|
|
743
|
+
|
|
744
|
+
**`alpha`**
|
|
745
|
+
|
|
746
|
+
##### Returns
|
|
747
|
+
|
|
748
|
+
`void`
|
|
749
|
+
|
|
750
|
+
A function that, when called, will deregister the query handler.
|
|
751
|
+
|
|
752
|
+
___
|
|
753
|
+
|
|
711
754
|
### initializeCustomer
|
|
712
755
|
|
|
713
756
|
▸ **initializeCustomer**(`options?`): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
|
|
@@ -6,19 +6,12 @@
|
|
|
6
6
|
|
|
7
7
|
### Enumeration Members
|
|
8
8
|
|
|
9
|
-
- [GetConsignments](ExtensionCommandType.md#getconsignments)
|
|
10
9
|
- [ReloadCheckout](ExtensionCommandType.md#reloadcheckout)
|
|
11
10
|
- [SetIframeStyle](ExtensionCommandType.md#setiframestyle)
|
|
12
11
|
- [ShowLoadingIndicator](ExtensionCommandType.md#showloadingindicator)
|
|
13
12
|
|
|
14
13
|
## Enumeration Members
|
|
15
14
|
|
|
16
|
-
### GetConsignments
|
|
17
|
-
|
|
18
|
-
• **GetConsignments**
|
|
19
|
-
|
|
20
|
-
___
|
|
21
|
-
|
|
22
15
|
### ReloadCheckout
|
|
23
16
|
|
|
24
17
|
• **ReloadCheckout**
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
[@bigcommerce/checkout-sdk](../README.md) / ExtensionQueryType
|
|
2
|
+
|
|
3
|
+
# Enumeration: ExtensionQueryType
|
|
4
|
+
|
|
5
|
+
## Table of contents
|
|
6
|
+
|
|
7
|
+
### Enumeration Members
|
|
8
|
+
|
|
9
|
+
- [GetConsignments](ExtensionQueryType.md#getconsignments)
|
|
10
|
+
|
|
11
|
+
## Enumeration Members
|
|
12
|
+
|
|
13
|
+
### GetConsignments
|
|
14
|
+
|
|
15
|
+
• **GetConsignments**
|
|
@@ -6,19 +6,12 @@
|
|
|
6
6
|
|
|
7
7
|
### Properties
|
|
8
8
|
|
|
9
|
-
- [EXTENSION%3AGET_CONSIGNMENTS](ExtensionCommandMap.md#extension:get_consignments)
|
|
10
9
|
- [EXTENSION%3ARELOAD_CHECKOUT](ExtensionCommandMap.md#extension:reload_checkout)
|
|
11
10
|
- [EXTENSION%3ASET_IFRAME_STYLE](ExtensionCommandMap.md#extension:set_iframe_style)
|
|
12
11
|
- [EXTENSION%3ASHOW_LOADING_INDICATOR](ExtensionCommandMap.md#extension:show_loading_indicator)
|
|
13
12
|
|
|
14
13
|
## Properties
|
|
15
14
|
|
|
16
|
-
### EXTENSION:GET\_CONSIGNMENTS
|
|
17
|
-
|
|
18
|
-
• **EXTENSION:GET\_CONSIGNMENTS**: [`GetConsignmentsCommand`](GetConsignmentsCommand.md)
|
|
19
|
-
|
|
20
|
-
___
|
|
21
|
-
|
|
22
15
|
### EXTENSION:RELOAD\_CHECKOUT
|
|
23
16
|
|
|
24
17
|
• **EXTENSION:RELOAD\_CHECKOUT**: [`ReloadCheckoutCommand`](ReloadCheckoutCommand.md)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
[@bigcommerce/checkout-sdk](../README.md) / ExtensionQueryMap
|
|
2
|
+
|
|
3
|
+
# Interface: ExtensionQueryMap
|
|
4
|
+
|
|
5
|
+
## Table of contents
|
|
6
|
+
|
|
7
|
+
### Properties
|
|
8
|
+
|
|
9
|
+
- [EXTENSION%3AGET_CONSIGNMENTS](ExtensionQueryMap.md#extension:get_consignments)
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
### EXTENSION:GET\_CONSIGNMENTS
|
|
14
|
+
|
|
15
|
+
• **EXTENSION:GET\_CONSIGNMENTS**: [`GetConsignmentsQuery`](GetConsignmentsQuery.md)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
[@bigcommerce/checkout-sdk](../README.md) / GetConsignmentsQuery
|
|
2
|
+
|
|
3
|
+
# Interface: GetConsignmentsQuery
|
|
4
|
+
|
|
5
|
+
## Table of contents
|
|
6
|
+
|
|
7
|
+
### Properties
|
|
8
|
+
|
|
9
|
+
- [payload](GetConsignmentsQuery.md#payload)
|
|
10
|
+
- [type](GetConsignmentsQuery.md#type)
|
|
11
|
+
|
|
12
|
+
## Properties
|
|
13
|
+
|
|
14
|
+
### payload
|
|
15
|
+
|
|
16
|
+
• `Optional` **payload**: `Object`
|
|
17
|
+
|
|
18
|
+
#### Type declaration
|
|
19
|
+
|
|
20
|
+
| Name | Type |
|
|
21
|
+
| :------ | :------ |
|
|
22
|
+
| `useCache?` | `boolean` |
|
|
23
|
+
|
|
24
|
+
___
|
|
25
|
+
|
|
26
|
+
### type
|
|
27
|
+
|
|
28
|
+
• **type**: [`GetConsignments`](../enums/ExtensionQueryType.md#getconsignments)
|
package/package.json
CHANGED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
[@bigcommerce/checkout-sdk](../README.md) / GetConsignmentsCommand
|
|
2
|
-
|
|
3
|
-
# Interface: GetConsignmentsCommand
|
|
4
|
-
|
|
5
|
-
## Table of contents
|
|
6
|
-
|
|
7
|
-
### Properties
|
|
8
|
-
|
|
9
|
-
- [type](GetConsignmentsCommand.md#type)
|
|
10
|
-
|
|
11
|
-
## Properties
|
|
12
|
-
|
|
13
|
-
### type
|
|
14
|
-
|
|
15
|
-
• **type**: [`GetConsignments`](../enums/ExtensionCommandType.md#getconsignments)
|