@churnkey/react 0.1.2 → 0.3.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/README.md +1 -1
- package/dist/{chunk-CPBEP4NW.cjs → chunk-2VQNWZWO.cjs} +35 -23
- package/dist/chunk-2VQNWZWO.cjs.map +1 -0
- package/dist/{chunk-XU7KDCXO.cjs → chunk-42SJA62X.cjs} +9 -7
- package/dist/chunk-42SJA62X.cjs.map +1 -0
- package/dist/{chunk-SIYJ4R4B.cjs → chunk-LVUDBCQ2.cjs} +57 -11
- package/dist/chunk-LVUDBCQ2.cjs.map +1 -0
- package/dist/{chunk-GCQ75J4G.js → chunk-SQ35G4LA.js} +55 -11
- package/dist/chunk-SQ35G4LA.js.map +1 -0
- package/dist/{chunk-IFVMM2LB.js → chunk-UNSSI6KX.js} +35 -23
- package/dist/chunk-UNSSI6KX.js.map +1 -0
- package/dist/{chunk-QTMZI5I2.js → chunk-YZERGV7F.js} +6 -4
- package/dist/chunk-YZERGV7F.js.map +1 -0
- package/dist/core.cjs +20 -12
- package/dist/core.d.cts +14 -3
- package/dist/core.d.ts +14 -3
- package/dist/core.js +2 -2
- package/dist/headless.cjs +3 -3
- package/dist/headless.d.cts +5 -1
- package/dist/headless.d.ts +5 -1
- package/dist/headless.js +2 -2
- package/dist/index.cjs +199 -189
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +116 -114
- package/dist/index.js.map +1 -1
- package/dist/{step-graph-ChdI-VXV.d.ts → step-graph-ChlSCUGk.d.cts} +89 -20
- package/dist/{step-graph-ChdI-VXV.d.cts → step-graph-ChlSCUGk.d.ts} +89 -20
- package/dist/styles.css +173 -67
- package/package.json +1 -1
- package/dist/chunk-CPBEP4NW.cjs.map +0 -1
- package/dist/chunk-GCQ75J4G.js.map +0 -1
- package/dist/chunk-IFVMM2LB.js.map +0 -1
- package/dist/chunk-QTMZI5I2.js.map +0 -1
- package/dist/chunk-SIYJ4R4B.cjs.map +0 -1
- package/dist/chunk-XU7KDCXO.cjs.map +0 -1
package/dist/core.cjs
CHANGED
|
@@ -1,49 +1,57 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkLVUDBCQ2_cjs = require('./chunk-LVUDBCQ2.cjs');
|
|
4
|
+
var chunk2VQNWZWO_cjs = require('./chunk-2VQNWZWO.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
+
Object.defineProperty(exports, "BUILT_IN_OFFER_TYPES", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunkLVUDBCQ2_cjs.BUILT_IN_OFFER_TYPES; }
|
|
11
|
+
});
|
|
8
12
|
Object.defineProperty(exports, "BUILT_IN_STEP_TYPES", {
|
|
9
13
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkLVUDBCQ2_cjs.BUILT_IN_STEP_TYPES; }
|
|
11
15
|
});
|
|
12
16
|
Object.defineProperty(exports, "appearanceToStyle", {
|
|
13
17
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkLVUDBCQ2_cjs.appearanceToStyle; }
|
|
15
19
|
});
|
|
16
20
|
Object.defineProperty(exports, "calculateDiscountedPrice", {
|
|
17
21
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkLVUDBCQ2_cjs.calculateDiscountedPrice; }
|
|
19
23
|
});
|
|
20
24
|
Object.defineProperty(exports, "cn", {
|
|
21
25
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkLVUDBCQ2_cjs.cn; }
|
|
23
27
|
});
|
|
24
28
|
Object.defineProperty(exports, "defaultTitles", {
|
|
25
29
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkLVUDBCQ2_cjs.defaultTitles; }
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(exports, "formatPeriodEnd", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () { return chunkLVUDBCQ2_cjs.formatPeriodEnd; }
|
|
27
35
|
});
|
|
28
36
|
Object.defineProperty(exports, "formatPrice", {
|
|
29
37
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunkLVUDBCQ2_cjs.formatPrice; }
|
|
31
39
|
});
|
|
32
40
|
Object.defineProperty(exports, "AnalyticsClient", {
|
|
33
41
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunk2VQNWZWO_cjs.AnalyticsClient; }
|
|
35
43
|
});
|
|
36
44
|
Object.defineProperty(exports, "CancelFlowMachine", {
|
|
37
45
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunk2VQNWZWO_cjs.CancelFlowMachine; }
|
|
39
47
|
});
|
|
40
48
|
Object.defineProperty(exports, "ChurnkeyApi", {
|
|
41
49
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunk2VQNWZWO_cjs.ChurnkeyApi; }
|
|
43
51
|
});
|
|
44
52
|
Object.defineProperty(exports, "decodeSessionToken", {
|
|
45
53
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
54
|
+
get: function () { return chunk2VQNWZWO_cjs.decodeSessionToken; }
|
|
47
55
|
});
|
|
48
56
|
//# sourceMappingURL=core.cjs.map
|
|
49
57
|
//# sourceMappingURL=core.cjs.map
|
package/dist/core.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { N as PlanOption, s as DirectCustomer, u as DirectSubscription, z as FlowConfig, E as FlowState, Q as ReasonConfig, U as ResolvedStep, J as OfferDecision, d as Appearance } from './step-graph-
|
|
2
|
-
export { A as AcceptedOffer, e as AppearanceVariables, B as BackButtonProps, f as BuiltInOfferConfig, g as BuiltInStep, h as BuiltInStepType, C as CancelFlowProps, c as CloseButtonProps, i as ComponentOverrides, j as ConfirmClassNames, k as ConfirmStep, a as ConfirmStepProps, l as ContactOffer, m as CustomComponents, n as CustomOfferConfig, o as CustomOfferProps, p as CustomStepConfig, q as CustomStepProps, D as DirectAddress, r as DirectCoupon, t as DirectPrice, v as DirectSubscriptionItem, w as DiscountOffer, x as FeedbackClassNames, y as FeedbackStep, F as FeedbackStepProps, M as ModalProps, G as OfferClassNames, H as OfferConfig, I as OfferCopy, K as OfferStep, O as OfferStepProps, P as PauseOffer, L as PlanChangeOffer, R as ReasonButtonProps, T as RedirectOffer, V as Step, W as StructuralClassNames, X as SubscriptionStatus, Y as SuccessClassNames, Z as SuccessStep, S as SuccessStepProps, _ as SurveyClassNames, $ as SurveyStep, b as SurveyStepProps, a0 as TrialExtensionOffer } from './step-graph-
|
|
1
|
+
import { N as PlanOption, s as DirectCustomer, u as DirectSubscription, z as FlowConfig, E as FlowState, Q as ReasonConfig, U as ResolvedStep, J as OfferDecision, d as Appearance } from './step-graph-ChlSCUGk.cjs';
|
|
2
|
+
export { A as AcceptedOffer, e as AppearanceVariables, B as BackButtonProps, f as BuiltInOfferConfig, g as BuiltInStep, h as BuiltInStepType, C as CancelFlowProps, c as CloseButtonProps, i as ComponentOverrides, j as ConfirmClassNames, k as ConfirmStep, a as ConfirmStepProps, l as ContactOffer, m as CustomComponents, n as CustomOfferConfig, o as CustomOfferProps, p as CustomStepConfig, q as CustomStepProps, D as DirectAddress, r as DirectCoupon, t as DirectPrice, v as DirectSubscriptionItem, w as DiscountOffer, x as FeedbackClassNames, y as FeedbackStep, F as FeedbackStepProps, M as ModalProps, G as OfferClassNames, H as OfferConfig, I as OfferCopy, K as OfferStep, O as OfferStepProps, P as PauseOffer, L as PlanChangeOffer, R as ReasonButtonProps, T as RedirectOffer, V as Step, W as StructuralClassNames, X as SubscriptionStatus, Y as SuccessClassNames, Z as SuccessStep, S as SuccessStepProps, _ as SurveyClassNames, $ as SurveyStep, b as SurveyStepProps, a0 as TrialExtensionOffer } from './step-graph-ChlSCUGk.cjs';
|
|
3
3
|
import { CSSProperties } from 'react';
|
|
4
4
|
|
|
5
5
|
interface SdkConfig {
|
|
@@ -164,6 +164,8 @@ interface SessionPayload {
|
|
|
164
164
|
aborted?: boolean;
|
|
165
165
|
surveyChoiceId?: string;
|
|
166
166
|
surveyChoiceValue?: string;
|
|
167
|
+
/** Free-text from a `freeform: true` reason. The reason's static `label` still travels on `surveyChoiceValue`. */
|
|
168
|
+
followupResponse?: string;
|
|
167
169
|
feedback?: string;
|
|
168
170
|
acceptedOffer?: AcceptedOfferPayload;
|
|
169
171
|
presentedOffers?: PresentedOffer[];
|
|
@@ -214,6 +216,13 @@ declare class AnalyticsClient {
|
|
|
214
216
|
*/
|
|
215
217
|
declare function formatPrice(amount: number, currency?: string, locale?: string): string;
|
|
216
218
|
declare function calculateDiscountedPrice(originalPrice: number, percentOff: number): number;
|
|
219
|
+
/**
|
|
220
|
+
* Long-form access period end ("June 14, 2026") for the first subscription's
|
|
221
|
+
* current period. Returns null for canceled subscriptions, missing periods,
|
|
222
|
+
* and unparseable dates so Confirm can drop the "access continues until"
|
|
223
|
+
* notice cleanly instead of rendering "Invalid Date".
|
|
224
|
+
*/
|
|
225
|
+
declare function formatPeriodEnd(subscriptions: DirectSubscription[] | null | undefined, locale?: string): string | null;
|
|
217
226
|
|
|
218
227
|
declare class CancelFlowMachine {
|
|
219
228
|
private state;
|
|
@@ -254,6 +263,7 @@ declare class CancelFlowMachine {
|
|
|
254
263
|
get stepIndex(): number;
|
|
255
264
|
get totalSteps(): number;
|
|
256
265
|
selectReason: (id: string) => void;
|
|
266
|
+
setFollowupResponse: (text: string) => void;
|
|
257
267
|
next: (result?: Record<string, unknown>) => void;
|
|
258
268
|
back: () => void;
|
|
259
269
|
accept: (result?: Record<string, unknown>) => Promise<void>;
|
|
@@ -287,6 +297,7 @@ declare class CancelFlowMachine {
|
|
|
287
297
|
}
|
|
288
298
|
|
|
289
299
|
declare const BUILT_IN_STEP_TYPES: readonly string[];
|
|
300
|
+
declare const BUILT_IN_OFFER_TYPES: readonly string[];
|
|
290
301
|
declare function cn(...classes: (string | undefined | null | false)[]): string;
|
|
291
302
|
declare function appearanceToStyle(appearance?: Appearance): CSSProperties | undefined;
|
|
292
303
|
declare const defaultTitles: {
|
|
@@ -295,4 +306,4 @@ declare const defaultTitles: {
|
|
|
295
306
|
readonly confirm: "Confirm cancellation";
|
|
296
307
|
};
|
|
297
308
|
|
|
298
|
-
export { AnalyticsClient, Appearance, BUILT_IN_STEP_TYPES, CancelFlowMachine, ChurnkeyApi, DirectCustomer, DirectSubscription, FlowConfig, FlowState, OfferDecision, PlanOption, ReasonConfig, ResolvedStep, type SdkConfig, type SdkConfirmStep, type SdkFeedbackStep, type SdkOffer, type SdkOfferCopy, type SdkOfferStep, type SdkReason, type SdkSettings, type SdkStep, type SdkSurveyStep, type SessionCredentials, type SessionPayload, appearanceToStyle, calculateDiscountedPrice, cn, decodeSessionToken, defaultTitles, formatPrice };
|
|
309
|
+
export { AnalyticsClient, Appearance, BUILT_IN_OFFER_TYPES, BUILT_IN_STEP_TYPES, CancelFlowMachine, ChurnkeyApi, DirectCustomer, DirectSubscription, FlowConfig, FlowState, OfferDecision, PlanOption, ReasonConfig, ResolvedStep, type SdkConfig, type SdkConfirmStep, type SdkFeedbackStep, type SdkOffer, type SdkOfferCopy, type SdkOfferStep, type SdkReason, type SdkSettings, type SdkStep, type SdkSurveyStep, type SessionCredentials, type SessionPayload, appearanceToStyle, calculateDiscountedPrice, cn, decodeSessionToken, defaultTitles, formatPeriodEnd, formatPrice };
|
package/dist/core.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { N as PlanOption, s as DirectCustomer, u as DirectSubscription, z as FlowConfig, E as FlowState, Q as ReasonConfig, U as ResolvedStep, J as OfferDecision, d as Appearance } from './step-graph-
|
|
2
|
-
export { A as AcceptedOffer, e as AppearanceVariables, B as BackButtonProps, f as BuiltInOfferConfig, g as BuiltInStep, h as BuiltInStepType, C as CancelFlowProps, c as CloseButtonProps, i as ComponentOverrides, j as ConfirmClassNames, k as ConfirmStep, a as ConfirmStepProps, l as ContactOffer, m as CustomComponents, n as CustomOfferConfig, o as CustomOfferProps, p as CustomStepConfig, q as CustomStepProps, D as DirectAddress, r as DirectCoupon, t as DirectPrice, v as DirectSubscriptionItem, w as DiscountOffer, x as FeedbackClassNames, y as FeedbackStep, F as FeedbackStepProps, M as ModalProps, G as OfferClassNames, H as OfferConfig, I as OfferCopy, K as OfferStep, O as OfferStepProps, P as PauseOffer, L as PlanChangeOffer, R as ReasonButtonProps, T as RedirectOffer, V as Step, W as StructuralClassNames, X as SubscriptionStatus, Y as SuccessClassNames, Z as SuccessStep, S as SuccessStepProps, _ as SurveyClassNames, $ as SurveyStep, b as SurveyStepProps, a0 as TrialExtensionOffer } from './step-graph-
|
|
1
|
+
import { N as PlanOption, s as DirectCustomer, u as DirectSubscription, z as FlowConfig, E as FlowState, Q as ReasonConfig, U as ResolvedStep, J as OfferDecision, d as Appearance } from './step-graph-ChlSCUGk.js';
|
|
2
|
+
export { A as AcceptedOffer, e as AppearanceVariables, B as BackButtonProps, f as BuiltInOfferConfig, g as BuiltInStep, h as BuiltInStepType, C as CancelFlowProps, c as CloseButtonProps, i as ComponentOverrides, j as ConfirmClassNames, k as ConfirmStep, a as ConfirmStepProps, l as ContactOffer, m as CustomComponents, n as CustomOfferConfig, o as CustomOfferProps, p as CustomStepConfig, q as CustomStepProps, D as DirectAddress, r as DirectCoupon, t as DirectPrice, v as DirectSubscriptionItem, w as DiscountOffer, x as FeedbackClassNames, y as FeedbackStep, F as FeedbackStepProps, M as ModalProps, G as OfferClassNames, H as OfferConfig, I as OfferCopy, K as OfferStep, O as OfferStepProps, P as PauseOffer, L as PlanChangeOffer, R as ReasonButtonProps, T as RedirectOffer, V as Step, W as StructuralClassNames, X as SubscriptionStatus, Y as SuccessClassNames, Z as SuccessStep, S as SuccessStepProps, _ as SurveyClassNames, $ as SurveyStep, b as SurveyStepProps, a0 as TrialExtensionOffer } from './step-graph-ChlSCUGk.js';
|
|
3
3
|
import { CSSProperties } from 'react';
|
|
4
4
|
|
|
5
5
|
interface SdkConfig {
|
|
@@ -164,6 +164,8 @@ interface SessionPayload {
|
|
|
164
164
|
aborted?: boolean;
|
|
165
165
|
surveyChoiceId?: string;
|
|
166
166
|
surveyChoiceValue?: string;
|
|
167
|
+
/** Free-text from a `freeform: true` reason. The reason's static `label` still travels on `surveyChoiceValue`. */
|
|
168
|
+
followupResponse?: string;
|
|
167
169
|
feedback?: string;
|
|
168
170
|
acceptedOffer?: AcceptedOfferPayload;
|
|
169
171
|
presentedOffers?: PresentedOffer[];
|
|
@@ -214,6 +216,13 @@ declare class AnalyticsClient {
|
|
|
214
216
|
*/
|
|
215
217
|
declare function formatPrice(amount: number, currency?: string, locale?: string): string;
|
|
216
218
|
declare function calculateDiscountedPrice(originalPrice: number, percentOff: number): number;
|
|
219
|
+
/**
|
|
220
|
+
* Long-form access period end ("June 14, 2026") for the first subscription's
|
|
221
|
+
* current period. Returns null for canceled subscriptions, missing periods,
|
|
222
|
+
* and unparseable dates so Confirm can drop the "access continues until"
|
|
223
|
+
* notice cleanly instead of rendering "Invalid Date".
|
|
224
|
+
*/
|
|
225
|
+
declare function formatPeriodEnd(subscriptions: DirectSubscription[] | null | undefined, locale?: string): string | null;
|
|
217
226
|
|
|
218
227
|
declare class CancelFlowMachine {
|
|
219
228
|
private state;
|
|
@@ -254,6 +263,7 @@ declare class CancelFlowMachine {
|
|
|
254
263
|
get stepIndex(): number;
|
|
255
264
|
get totalSteps(): number;
|
|
256
265
|
selectReason: (id: string) => void;
|
|
266
|
+
setFollowupResponse: (text: string) => void;
|
|
257
267
|
next: (result?: Record<string, unknown>) => void;
|
|
258
268
|
back: () => void;
|
|
259
269
|
accept: (result?: Record<string, unknown>) => Promise<void>;
|
|
@@ -287,6 +297,7 @@ declare class CancelFlowMachine {
|
|
|
287
297
|
}
|
|
288
298
|
|
|
289
299
|
declare const BUILT_IN_STEP_TYPES: readonly string[];
|
|
300
|
+
declare const BUILT_IN_OFFER_TYPES: readonly string[];
|
|
290
301
|
declare function cn(...classes: (string | undefined | null | false)[]): string;
|
|
291
302
|
declare function appearanceToStyle(appearance?: Appearance): CSSProperties | undefined;
|
|
292
303
|
declare const defaultTitles: {
|
|
@@ -295,4 +306,4 @@ declare const defaultTitles: {
|
|
|
295
306
|
readonly confirm: "Confirm cancellation";
|
|
296
307
|
};
|
|
297
308
|
|
|
298
|
-
export { AnalyticsClient, Appearance, BUILT_IN_STEP_TYPES, CancelFlowMachine, ChurnkeyApi, DirectCustomer, DirectSubscription, FlowConfig, FlowState, OfferDecision, PlanOption, ReasonConfig, ResolvedStep, type SdkConfig, type SdkConfirmStep, type SdkFeedbackStep, type SdkOffer, type SdkOfferCopy, type SdkOfferStep, type SdkReason, type SdkSettings, type SdkStep, type SdkSurveyStep, type SessionCredentials, type SessionPayload, appearanceToStyle, calculateDiscountedPrice, cn, decodeSessionToken, defaultTitles, formatPrice };
|
|
309
|
+
export { AnalyticsClient, Appearance, BUILT_IN_OFFER_TYPES, BUILT_IN_STEP_TYPES, CancelFlowMachine, ChurnkeyApi, DirectCustomer, DirectSubscription, FlowConfig, FlowState, OfferDecision, PlanOption, ReasonConfig, ResolvedStep, type SdkConfig, type SdkConfirmStep, type SdkFeedbackStep, type SdkOffer, type SdkOfferCopy, type SdkOfferStep, type SdkReason, type SdkSettings, type SdkStep, type SdkSurveyStep, type SessionCredentials, type SessionPayload, appearanceToStyle, calculateDiscountedPrice, cn, decodeSessionToken, defaultTitles, formatPeriodEnd, formatPrice };
|
package/dist/core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { BUILT_IN_STEP_TYPES, appearanceToStyle, calculateDiscountedPrice, cn, defaultTitles, formatPrice } from './chunk-
|
|
2
|
-
export { AnalyticsClient, CancelFlowMachine, ChurnkeyApi, decodeSessionToken } from './chunk-
|
|
1
|
+
export { BUILT_IN_OFFER_TYPES, BUILT_IN_STEP_TYPES, appearanceToStyle, calculateDiscountedPrice, cn, defaultTitles, formatPeriodEnd, formatPrice } from './chunk-SQ35G4LA.js';
|
|
2
|
+
export { AnalyticsClient, CancelFlowMachine, ChurnkeyApi, decodeSessionToken } from './chunk-UNSSI6KX.js';
|
|
3
3
|
//# sourceMappingURL=core.js.map
|
|
4
4
|
//# sourceMappingURL=core.js.map
|
package/dist/headless.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var chunk42SJA62X_cjs = require('./chunk-42SJA62X.cjs');
|
|
4
|
+
require('./chunk-2VQNWZWO.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "useCancelFlow", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunk42SJA62X_cjs.useCancelFlow; }
|
|
11
11
|
});
|
|
12
12
|
//# sourceMappingURL=headless.cjs.map
|
|
13
13
|
//# sourceMappingURL=headless.cjs.map
|
package/dist/headless.d.cts
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import { z as FlowConfig, Q as ReasonConfig, U as ResolvedStep, J as OfferDecision, s as DirectCustomer } from './step-graph-
|
|
1
|
+
import { z as FlowConfig, Q as ReasonConfig, U as ResolvedStep, J as OfferDecision, s as DirectCustomer, u as DirectSubscription } from './step-graph-ChlSCUGk.cjs';
|
|
2
2
|
import 'react';
|
|
3
3
|
|
|
4
4
|
declare function useCancelFlow(config: FlowConfig): {
|
|
5
5
|
isLoading: boolean;
|
|
6
6
|
loadError: Error | null;
|
|
7
|
+
retry: () => void;
|
|
7
8
|
reasons: ReasonConfig[];
|
|
8
9
|
currentStep: ResolvedStep | undefined;
|
|
9
10
|
currentOffer: OfferDecision | null;
|
|
10
11
|
stepIndex: number;
|
|
11
12
|
totalSteps: number;
|
|
12
13
|
selectReason: (id: string) => void;
|
|
14
|
+
setFollowupResponse: (text: string) => void;
|
|
13
15
|
setFeedback: (text: string) => void;
|
|
14
16
|
accept: (result?: Record<string, unknown>) => Promise<void>;
|
|
15
17
|
decline: () => void;
|
|
@@ -20,11 +22,13 @@ declare function useCancelFlow(config: FlowConfig): {
|
|
|
20
22
|
step: string;
|
|
21
23
|
currentStepId: string;
|
|
22
24
|
selectedReason: string | null;
|
|
25
|
+
followupResponse: string;
|
|
23
26
|
feedback: string;
|
|
24
27
|
outcome: "saved" | "cancelled" | null;
|
|
25
28
|
isProcessing: boolean;
|
|
26
29
|
error: Error | null;
|
|
27
30
|
customer: DirectCustomer | null;
|
|
31
|
+
subscriptions: DirectSubscription[];
|
|
28
32
|
};
|
|
29
33
|
|
|
30
34
|
export { useCancelFlow };
|
package/dist/headless.d.ts
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import { z as FlowConfig, Q as ReasonConfig, U as ResolvedStep, J as OfferDecision, s as DirectCustomer } from './step-graph-
|
|
1
|
+
import { z as FlowConfig, Q as ReasonConfig, U as ResolvedStep, J as OfferDecision, s as DirectCustomer, u as DirectSubscription } from './step-graph-ChlSCUGk.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
|
|
4
4
|
declare function useCancelFlow(config: FlowConfig): {
|
|
5
5
|
isLoading: boolean;
|
|
6
6
|
loadError: Error | null;
|
|
7
|
+
retry: () => void;
|
|
7
8
|
reasons: ReasonConfig[];
|
|
8
9
|
currentStep: ResolvedStep | undefined;
|
|
9
10
|
currentOffer: OfferDecision | null;
|
|
10
11
|
stepIndex: number;
|
|
11
12
|
totalSteps: number;
|
|
12
13
|
selectReason: (id: string) => void;
|
|
14
|
+
setFollowupResponse: (text: string) => void;
|
|
13
15
|
setFeedback: (text: string) => void;
|
|
14
16
|
accept: (result?: Record<string, unknown>) => Promise<void>;
|
|
15
17
|
decline: () => void;
|
|
@@ -20,11 +22,13 @@ declare function useCancelFlow(config: FlowConfig): {
|
|
|
20
22
|
step: string;
|
|
21
23
|
currentStepId: string;
|
|
22
24
|
selectedReason: string | null;
|
|
25
|
+
followupResponse: string;
|
|
23
26
|
feedback: string;
|
|
24
27
|
outcome: "saved" | "cancelled" | null;
|
|
25
28
|
isProcessing: boolean;
|
|
26
29
|
error: Error | null;
|
|
27
30
|
customer: DirectCustomer | null;
|
|
31
|
+
subscriptions: DirectSubscription[];
|
|
28
32
|
};
|
|
29
33
|
|
|
30
34
|
export { useCancelFlow };
|
package/dist/headless.js
CHANGED