@rokt/dcui-orchestrator 1.0.1-rc.2 → 1.0.1-rc.3
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/index.cjs +23 -23
- package/dist/index.js +23 -23
- package/dist/libraries/dcui-components/src/components/apple-pay-button/apple-pay-button.d.ts +1 -1
- package/dist/libraries/dcui-components/src/components/apple-pay-button/index.d.ts +1 -0
- package/dist/libraries/dcui-components/src/components/apple-pay-button/retryable-device-pay-error.d.ts +8 -0
- package/dist/libraries/domain/src/behaviors/custom-states.d.ts +2 -0
- package/dist/modules/instant-purchase/src/components/catalog-device-pay-button/retryable-device-pay-error.d.ts +1 -7
- package/dist/modules/instant-purchase/src/constants/device-pay-error.d.ts +1 -1
- package/dist/modules/instant-purchase/src/constants/device-pay-providers.d.ts +2 -15
- package/package.json +1 -1
package/dist/libraries/dcui-components/src/components/apple-pay-button/apple-pay-button.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export type ButtonStyleInput = ApplePayButtonStyle | ThemedApplePayButtonStyle;
|
|
|
14
14
|
/**
|
|
15
15
|
* Structural shape of the `own` style hints this module reads. Declared
|
|
16
16
|
* structurally rather than against one schema node so both the layout-variant
|
|
17
|
-
* `CatalogDevicePayButton` and
|
|
17
|
+
* `CatalogDevicePayButton` and its child-layout override can pass their own
|
|
18
18
|
* schema without either owning the other's types.
|
|
19
19
|
*/
|
|
20
20
|
export type ApplePayButtonStyleSource = {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type JSX } from 'react';
|
|
2
|
+
export declare const RETRYABLE_DEVICE_PAY_ERROR_MESSAGE = "Payment failed. Choose another card and try again.";
|
|
3
|
+
interface RetryableDevicePayErrorProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
message?: null | string;
|
|
6
|
+
}
|
|
7
|
+
export declare function RetryableDevicePayError({ className, message, }: RetryableDevicePayErrorProps): JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -17,6 +17,8 @@ export declare function isValidSetCustomStatePayload(payload: unknown): payload
|
|
|
17
17
|
export declare const DEVICE_PAY_PROCESSING_STATE_KEY = "ProcessingState";
|
|
18
18
|
export declare const DEVICE_PAY_PROCESSING_IDLE = 0;
|
|
19
19
|
export declare const DEVICE_PAY_PROCESSING_IN_FLIGHT = 1;
|
|
20
|
+
export declare const DEVICE_PAY_AVAILABILITY_KEYS: readonly ["applePay", "afterpay"];
|
|
21
|
+
export type DevicePayProviderKey = (typeof DEVICE_PAY_AVAILABILITY_KEYS)[number];
|
|
20
22
|
export declare const DEVICE_PAY_APPLE_PAY_AVAILABLE_STATE_KEY = "applePayAvailable";
|
|
21
23
|
export declare const DEVICE_PAY_ERROR_STATE_KEY = "DevicePayErrorState";
|
|
22
24
|
export declare const DEVICE_PAY_ERROR_HIDDEN = 0;
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
|
|
2
|
-
interface RetryableDevicePayErrorProps {
|
|
3
|
-
className?: string;
|
|
4
|
-
message?: null | string;
|
|
5
|
-
}
|
|
6
|
-
export declare function RetryableDevicePayError({ className, message, }: RetryableDevicePayErrorProps): JSX.Element;
|
|
7
|
-
export {};
|
|
1
|
+
export { RetryableDevicePayError } from '../../../../../libraries/dcui-components/src/index';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { DEVICE_PAY_ERROR_STATE_KEY, DEVICE_PAY_ERROR_HIDDEN, DEVICE_PAY_ERROR_RETRYABLE_DECLINE, } from '../../../../libraries/domain/src/behaviors';
|
|
2
|
-
export
|
|
2
|
+
export { RETRYABLE_DEVICE_PAY_ERROR_MESSAGE } from '../../../../libraries/dcui-components/src/index';
|
|
@@ -1,26 +1,13 @@
|
|
|
1
1
|
import { LayoutPaymentMethodType, PaymentMethodType } from '../../../../libraries/domain/src/models';
|
|
2
|
+
import { DevicePayProviderKey } from '../../../../libraries/domain/src/behaviors';
|
|
2
3
|
import { PaymentProvider } from '@rokt/dcui-layout-schema';
|
|
3
4
|
import { DevicePayAvailabilityResponse } from '../models';
|
|
4
5
|
export type DevicePayProviderEntry = {
|
|
5
6
|
provider: PaymentProvider;
|
|
6
|
-
responseKey: keyof DevicePayAvailabilityResponse;
|
|
7
|
+
responseKey: DevicePayProviderKey & keyof DevicePayAvailabilityResponse;
|
|
7
8
|
paymentMethodType: PaymentMethodType;
|
|
8
9
|
layoutPaymentMethodType: LayoutPaymentMethodType;
|
|
9
10
|
displayName: string;
|
|
10
11
|
};
|
|
11
|
-
/**
|
|
12
|
-
* Source of truth for every device-pay provider DCUI knows about.
|
|
13
|
-
*
|
|
14
|
-
* Invariant: every device-pay-class member of `PaymentMethodType` (e.g. ApplePay,
|
|
15
|
-
* Afterpay, future GooglePay) MUST appear here. The dismissal selector / saga
|
|
16
|
-
* silently no-op for any supported method that has no entry — adding a new
|
|
17
|
-
* device-pay method to `PaymentMethodType` without adding a row here means
|
|
18
|
-
* "supported method failed" can never be detected and the offer never dismisses.
|
|
19
|
-
*
|
|
20
|
-
* Adding a provider:
|
|
21
|
-
* 1. Add the literal to `PaymentMethodType` and `LayoutPaymentMethodType` (+ converter).
|
|
22
|
-
* 2. Add the response key to `DevicePayAvailabilityResponse`.
|
|
23
|
-
* 3. Add a row here.
|
|
24
|
-
*/
|
|
25
12
|
export declare const DEVICE_PAY_PROVIDERS: ReadonlyArray<DevicePayProviderEntry>;
|
|
26
13
|
export declare function getDevicePayProviderEntry(provider: PaymentProvider): DevicePayProviderEntry | undefined;
|