@feelflow/ffid-sdk 8.1.0 → 9.0.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/{FFIDCookieLink-Bwr0FBrV.d.cts → FFIDCookieLink-yt5SUr-W.d.cts} +47 -3
- package/dist/{FFIDCookieLink-Bwr0FBrV.d.ts → FFIDCookieLink-yt5SUr-W.d.ts} +47 -3
- package/dist/{chunk-CPXTIRB6.cjs → chunk-Q2ZQJS36.cjs} +5 -7
- package/dist/{chunk-XELXXL2F.cjs → chunk-RZCQ22GH.cjs} +29 -9
- package/dist/{chunk-RHBZHSRD.js → chunk-S2AEBJRX.js} +29 -9
- package/dist/{chunk-P5A6C5SK.js → chunk-TUXIJEEZ.js} +5 -7
- package/dist/components/index.cjs +8 -8
- package/dist/components/index.js +1 -1
- package/dist/consent/index.cjs +63 -63
- package/dist/consent/index.d.cts +2 -2
- package/dist/consent/index.d.ts +2 -2
- package/dist/consent/index.js +1 -1
- package/dist/index.cjs +95 -95
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/server/index.cjs +5 -7
- package/dist/server/index.js +5 -7
- package/dist/webhooks/index.d.cts +38 -5
- package/dist/webhooks/index.d.ts +38 -5
- package/package.json +1 -1
|
@@ -64,12 +64,27 @@ interface FFIDSubscriptionCreatedPayload {
|
|
|
64
64
|
*/
|
|
65
65
|
serviceCode?: string;
|
|
66
66
|
}
|
|
67
|
+
/**
|
|
68
|
+
* `subscription.updated`.
|
|
69
|
+
*
|
|
70
|
+
* 9.0.0 aligned this type with what FFID sends (#6380): `status` is always present, and
|
|
71
|
+
* `subscriptionId` / `organizationId` are absent when the event comes from a Stripe notice
|
|
72
|
+
* whose subscription FFID could not match to its own record (check before use).
|
|
73
|
+
* `previousPlan` was removed — FFID never sent it.
|
|
74
|
+
*/
|
|
67
75
|
interface FFIDSubscriptionUpdatedPayload {
|
|
68
|
-
|
|
76
|
+
/**
|
|
77
|
+
* Subscription status after the change — the raw status string (FFID's or Stripe's), not a
|
|
78
|
+
* closed enum. Use `effectiveStatus` for access decisions.
|
|
79
|
+
*/
|
|
80
|
+
status: string;
|
|
81
|
+
/** FFID subscription UUID. Absent when FFID could not match the Stripe subscription */
|
|
82
|
+
subscriptionId?: string;
|
|
83
|
+
/** Stripe subscription id (`sub_...`). Present on events that come from Stripe notices */
|
|
84
|
+
stripeSubscriptionId?: string;
|
|
69
85
|
organizationId?: string;
|
|
86
|
+
/** Plan code after the change */
|
|
70
87
|
plan?: string;
|
|
71
|
-
previousPlan?: string;
|
|
72
|
-
status?: string;
|
|
73
88
|
effectiveStatus?: EffectiveSubscriptionStatus;
|
|
74
89
|
gracePeriodEndsAt?: string | null;
|
|
75
90
|
/**
|
|
@@ -242,9 +257,27 @@ interface FFIDSubscriptionDowngradeCanceledPayload {
|
|
|
242
257
|
*/
|
|
243
258
|
serviceCode?: string;
|
|
244
259
|
}
|
|
260
|
+
/**
|
|
261
|
+
* `subscription.trial_ending` — sent when Stripe announces that a trial is about to end.
|
|
262
|
+
*
|
|
263
|
+
* 9.0.0 aligned this type with what FFID sends (#6380). FFID does not resolve its own
|
|
264
|
+
* subscription UUID for this event; identify the subscription by `stripeSubscriptionId`
|
|
265
|
+
* (and the service by `serviceCode`).
|
|
266
|
+
*/
|
|
245
267
|
interface FFIDSubscriptionTrialEndingPayload {
|
|
246
|
-
|
|
247
|
-
|
|
268
|
+
/** Stripe subscription id (`sub_...`) */
|
|
269
|
+
stripeSubscriptionId: string;
|
|
270
|
+
/**
|
|
271
|
+
* Days until the trial ends, rounded **up** at the moment FFID processed Stripe's notice
|
|
272
|
+
* (a trial ending later the same day is `1`). `0` only when the trial had already ended by
|
|
273
|
+
* then. Fixed when the event is created — a redelivered event carries the same value.
|
|
274
|
+
*/
|
|
275
|
+
daysRemaining: number;
|
|
276
|
+
/**
|
|
277
|
+
* Trial end date **for display**, in Japanese long form in JST (e.g. `2026年10月3日`) — not
|
|
278
|
+
* an ISO timestamp. `(無効な日時)` when FFID could not read Stripe's timestamp. Use
|
|
279
|
+
* `daysRemaining` for any calculation.
|
|
280
|
+
*/
|
|
248
281
|
trialEndDate: string;
|
|
249
282
|
/**
|
|
250
283
|
* Code of the service the subscription belongs to (e.g. `chatbot-v2`), resolved by FFID when
|
package/dist/webhooks/index.d.ts
CHANGED
|
@@ -64,12 +64,27 @@ interface FFIDSubscriptionCreatedPayload {
|
|
|
64
64
|
*/
|
|
65
65
|
serviceCode?: string;
|
|
66
66
|
}
|
|
67
|
+
/**
|
|
68
|
+
* `subscription.updated`.
|
|
69
|
+
*
|
|
70
|
+
* 9.0.0 aligned this type with what FFID sends (#6380): `status` is always present, and
|
|
71
|
+
* `subscriptionId` / `organizationId` are absent when the event comes from a Stripe notice
|
|
72
|
+
* whose subscription FFID could not match to its own record (check before use).
|
|
73
|
+
* `previousPlan` was removed — FFID never sent it.
|
|
74
|
+
*/
|
|
67
75
|
interface FFIDSubscriptionUpdatedPayload {
|
|
68
|
-
|
|
76
|
+
/**
|
|
77
|
+
* Subscription status after the change — the raw status string (FFID's or Stripe's), not a
|
|
78
|
+
* closed enum. Use `effectiveStatus` for access decisions.
|
|
79
|
+
*/
|
|
80
|
+
status: string;
|
|
81
|
+
/** FFID subscription UUID. Absent when FFID could not match the Stripe subscription */
|
|
82
|
+
subscriptionId?: string;
|
|
83
|
+
/** Stripe subscription id (`sub_...`). Present on events that come from Stripe notices */
|
|
84
|
+
stripeSubscriptionId?: string;
|
|
69
85
|
organizationId?: string;
|
|
86
|
+
/** Plan code after the change */
|
|
70
87
|
plan?: string;
|
|
71
|
-
previousPlan?: string;
|
|
72
|
-
status?: string;
|
|
73
88
|
effectiveStatus?: EffectiveSubscriptionStatus;
|
|
74
89
|
gracePeriodEndsAt?: string | null;
|
|
75
90
|
/**
|
|
@@ -242,9 +257,27 @@ interface FFIDSubscriptionDowngradeCanceledPayload {
|
|
|
242
257
|
*/
|
|
243
258
|
serviceCode?: string;
|
|
244
259
|
}
|
|
260
|
+
/**
|
|
261
|
+
* `subscription.trial_ending` — sent when Stripe announces that a trial is about to end.
|
|
262
|
+
*
|
|
263
|
+
* 9.0.0 aligned this type with what FFID sends (#6380). FFID does not resolve its own
|
|
264
|
+
* subscription UUID for this event; identify the subscription by `stripeSubscriptionId`
|
|
265
|
+
* (and the service by `serviceCode`).
|
|
266
|
+
*/
|
|
245
267
|
interface FFIDSubscriptionTrialEndingPayload {
|
|
246
|
-
|
|
247
|
-
|
|
268
|
+
/** Stripe subscription id (`sub_...`) */
|
|
269
|
+
stripeSubscriptionId: string;
|
|
270
|
+
/**
|
|
271
|
+
* Days until the trial ends, rounded **up** at the moment FFID processed Stripe's notice
|
|
272
|
+
* (a trial ending later the same day is `1`). `0` only when the trial had already ended by
|
|
273
|
+
* then. Fixed when the event is created — a redelivered event carries the same value.
|
|
274
|
+
*/
|
|
275
|
+
daysRemaining: number;
|
|
276
|
+
/**
|
|
277
|
+
* Trial end date **for display**, in Japanese long form in JST (e.g. `2026年10月3日`) — not
|
|
278
|
+
* an ISO timestamp. `(無効な日時)` when FFID could not read Stripe's timestamp. Use
|
|
279
|
+
* `daysRemaining` for any calculation.
|
|
280
|
+
*/
|
|
248
281
|
trialEndDate: string;
|
|
249
282
|
/**
|
|
250
283
|
* Code of the service the subscription belongs to (e.g. `chatbot-v2`), resolved by FFID when
|