@feelflow/ffid-sdk 8.0.0 → 8.1.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.
@@ -1378,7 +1378,7 @@ var FFID_ORGANIZATION_PROFILE_ERROR_CODES = {
1378
1378
  };
1379
1379
 
1380
1380
  // src/client/version-check.ts
1381
- var SDK_VERSION = "8.0.0";
1381
+ var SDK_VERSION = "8.1.0";
1382
1382
  var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
1383
1383
  var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
1384
1384
  function sdkHeaders() {
@@ -1376,7 +1376,7 @@ var FFID_ORGANIZATION_PROFILE_ERROR_CODES = {
1376
1376
  };
1377
1377
 
1378
1378
  // src/client/version-check.ts
1379
- var SDK_VERSION = "8.0.0";
1379
+ var SDK_VERSION = "8.1.0";
1380
1380
  var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
1381
1381
  var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
1382
1382
  function sdkHeaders() {
@@ -1,34 +1,34 @@
1
1
  'use strict';
2
2
 
3
- var chunkRNCK5E3Y_cjs = require('../chunk-RNCK5E3Y.cjs');
3
+ var chunkCPXTIRB6_cjs = require('../chunk-CPXTIRB6.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "FFIDAnnouncementBadge", {
8
8
  enumerable: true,
9
- get: function () { return chunkRNCK5E3Y_cjs.FFIDAnnouncementBadge; }
9
+ get: function () { return chunkCPXTIRB6_cjs.FFIDAnnouncementBadge; }
10
10
  });
11
11
  Object.defineProperty(exports, "FFIDAnnouncementList", {
12
12
  enumerable: true,
13
- get: function () { return chunkRNCK5E3Y_cjs.FFIDAnnouncementList; }
13
+ get: function () { return chunkCPXTIRB6_cjs.FFIDAnnouncementList; }
14
14
  });
15
15
  Object.defineProperty(exports, "FFIDInquiryForm", {
16
16
  enumerable: true,
17
- get: function () { return chunkRNCK5E3Y_cjs.FFIDInquiryForm; }
17
+ get: function () { return chunkCPXTIRB6_cjs.FFIDInquiryForm; }
18
18
  });
19
19
  Object.defineProperty(exports, "FFIDLoginButton", {
20
20
  enumerable: true,
21
- get: function () { return chunkRNCK5E3Y_cjs.FFIDLoginButton; }
21
+ get: function () { return chunkCPXTIRB6_cjs.FFIDLoginButton; }
22
22
  });
23
23
  Object.defineProperty(exports, "FFIDOrganizationSwitcher", {
24
24
  enumerable: true,
25
- get: function () { return chunkRNCK5E3Y_cjs.FFIDOrganizationSwitcher; }
25
+ get: function () { return chunkCPXTIRB6_cjs.FFIDOrganizationSwitcher; }
26
26
  });
27
27
  Object.defineProperty(exports, "FFIDSubscriptionBadge", {
28
28
  enumerable: true,
29
- get: function () { return chunkRNCK5E3Y_cjs.FFIDSubscriptionBadge; }
29
+ get: function () { return chunkCPXTIRB6_cjs.FFIDSubscriptionBadge; }
30
30
  });
31
31
  Object.defineProperty(exports, "FFIDUserMenu", {
32
32
  enumerable: true,
33
- get: function () { return chunkRNCK5E3Y_cjs.FFIDUserMenu; }
33
+ get: function () { return chunkCPXTIRB6_cjs.FFIDUserMenu; }
34
34
  });
@@ -1 +1 @@
1
- export { FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDSubscriptionBadge, FFIDUserMenu } from '../chunk-YKBAFPX5.js';
1
+ export { FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDSubscriptionBadge, FFIDUserMenu } from '../chunk-P5A6C5SK.js';
@@ -411,6 +411,8 @@ interface FFIDPlanInfo {
411
411
  maxSeats: number | null;
412
412
  seatSelectionEnabled: boolean;
413
413
  trialDays: number;
414
+ /** flat: period fee; per_seat: multiply by selected quantity. Older servers omit this. */
415
+ pricingModel?: 'per_seat' | 'flat';
414
416
  /**
415
417
  * Monthly price in the smallest currency unit.
416
418
  *
@@ -646,12 +648,12 @@ interface FFIDPlanChangeLineItem {
646
648
  interface FFIDPlanChangePreviewBase {
647
649
  /** Discriminant for preview response variants (reserved for future unions with e.g. seat-change previews) */
648
650
  type: 'plan-change';
649
- /** Current plan display info. `price` is the total for the current quantity (unitPrice × quantity), not per-seat. */
651
+ /** Current plan display info. `price` is the period total: flat fee, or per-seat price times quantity. */
650
652
  currentPlan: {
651
653
  name: string;
652
654
  price: number;
653
655
  };
654
- /** New plan display info. `price` is the total for the effective quantity (unitPrice × quantity), not per-seat. */
656
+ /** New plan display info. `price` is the period total: flat fee, or per-seat price times quantity. */
655
657
  newPlan: {
656
658
  name: string;
657
659
  price: number;
@@ -725,7 +727,8 @@ interface FFIDSeatChangeLineItem {
725
727
  * `proratedAmount` is computed locally. `isEstimate=false`: it reflects Stripe's live
726
728
  * proration calculation.
727
729
  *
728
- * `nextInvoiceAmount` is always a local estimate (`unitPrice * newQuantity`).
730
+ * `nextInvoiceAmount` is a local estimate: flat period fee, or `unitPrice * newQuantity`.
731
+ * Flat capacity changes have zero prorated cost.
729
732
  *
730
733
  * `pricingUnavailable=true` means custom pricing or an unverified contracted Stripe
731
734
  * Price. Hide amounts; zero is not a quote. `custom_pricing` permits the existing
@@ -738,6 +741,8 @@ interface FFIDSeatChangeLineItem {
738
741
  * external consumers should guide users to the FFID portal for seat changes.
739
742
  */
740
743
  interface FFIDSeatChangePreview {
744
+ /** flat: unitPrice is the whole period fee; per_seat: multiply by capacity. */
745
+ pricingModel?: 'per_seat' | 'flat';
741
746
  /** Discriminant for preview response variants (pairs with `FFIDPlanChangePreview.type`) */
742
747
  type: 'seat-change';
743
748
  currentQuantity: number;
@@ -751,7 +756,7 @@ interface FFIDSeatChangePreview {
751
756
  * be reserved. Also `0` when `pricingUnavailable === true`; hide it instead of quoting zero.
752
757
  */
753
758
  proratedAmount: number;
754
- /** Next invoice full amount — always a local estimate (`unitPrice * newQuantity`) */
759
+ /** Next invoice full amount — flat period fee or per-seat price times newQuantity */
755
760
  nextInvoiceAmount: number;
756
761
  nextInvoiceDate: string | null;
757
762
  currency: FFIDSupportedCurrency;
@@ -411,6 +411,8 @@ interface FFIDPlanInfo {
411
411
  maxSeats: number | null;
412
412
  seatSelectionEnabled: boolean;
413
413
  trialDays: number;
414
+ /** flat: period fee; per_seat: multiply by selected quantity. Older servers omit this. */
415
+ pricingModel?: 'per_seat' | 'flat';
414
416
  /**
415
417
  * Monthly price in the smallest currency unit.
416
418
  *
@@ -646,12 +648,12 @@ interface FFIDPlanChangeLineItem {
646
648
  interface FFIDPlanChangePreviewBase {
647
649
  /** Discriminant for preview response variants (reserved for future unions with e.g. seat-change previews) */
648
650
  type: 'plan-change';
649
- /** Current plan display info. `price` is the total for the current quantity (unitPrice × quantity), not per-seat. */
651
+ /** Current plan display info. `price` is the period total: flat fee, or per-seat price times quantity. */
650
652
  currentPlan: {
651
653
  name: string;
652
654
  price: number;
653
655
  };
654
- /** New plan display info. `price` is the total for the effective quantity (unitPrice × quantity), not per-seat. */
656
+ /** New plan display info. `price` is the period total: flat fee, or per-seat price times quantity. */
655
657
  newPlan: {
656
658
  name: string;
657
659
  price: number;
@@ -725,7 +727,8 @@ interface FFIDSeatChangeLineItem {
725
727
  * `proratedAmount` is computed locally. `isEstimate=false`: it reflects Stripe's live
726
728
  * proration calculation.
727
729
  *
728
- * `nextInvoiceAmount` is always a local estimate (`unitPrice * newQuantity`).
730
+ * `nextInvoiceAmount` is a local estimate: flat period fee, or `unitPrice * newQuantity`.
731
+ * Flat capacity changes have zero prorated cost.
729
732
  *
730
733
  * `pricingUnavailable=true` means custom pricing or an unverified contracted Stripe
731
734
  * Price. Hide amounts; zero is not a quote. `custom_pricing` permits the existing
@@ -738,6 +741,8 @@ interface FFIDSeatChangeLineItem {
738
741
  * external consumers should guide users to the FFID portal for seat changes.
739
742
  */
740
743
  interface FFIDSeatChangePreview {
744
+ /** flat: unitPrice is the whole period fee; per_seat: multiply by capacity. */
745
+ pricingModel?: 'per_seat' | 'flat';
741
746
  /** Discriminant for preview response variants (pairs with `FFIDPlanChangePreview.type`) */
742
747
  type: 'seat-change';
743
748
  currentQuantity: number;
@@ -751,7 +756,7 @@ interface FFIDSeatChangePreview {
751
756
  * be reserved. Also `0` when `pricingUnavailable === true`; hide it instead of quoting zero.
752
757
  */
753
758
  proratedAmount: number;
754
- /** Next invoice full amount — always a local estimate (`unitPrice * newQuantity`) */
759
+ /** Next invoice full amount — flat period fee or per-seat price times newQuantity */
755
760
  nextInvoiceAmount: number;
756
761
  nextInvoiceDate: string | null;
757
762
  currency: FFIDSupportedCurrency;
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkRNCK5E3Y_cjs = require('./chunk-RNCK5E3Y.cjs');
3
+ var chunkCPXTIRB6_cjs = require('./chunk-CPXTIRB6.cjs');
4
4
  var chunkXELXXL2F_cjs = require('./chunk-XELXXL2F.cjs');
5
5
  var react = require('react');
6
6
  var jsxRuntime = require('react/jsx-runtime');
@@ -54,8 +54,8 @@ function defaultRedirect(url) {
54
54
  }
55
55
  function useRequireActiveSubscription(options) {
56
56
  const { redirectTo, allowGrace = true, onRedirect } = options;
57
- const { isLoading, error } = chunkRNCK5E3Y_cjs.useFFIDContext();
58
- const { effectiveStatus, isBlocked, isGrace } = chunkRNCK5E3Y_cjs.useSubscription();
57
+ const { isLoading, error } = chunkCPXTIRB6_cjs.useFFIDContext();
58
+ const { effectiveStatus, isBlocked, isGrace } = chunkCPXTIRB6_cjs.useSubscription();
59
59
  const hasFetchError = error !== null && effectiveStatus === null;
60
60
  const shouldRedirect = !isLoading && !hasFetchError && (isBlocked || !allowGrace && isGrace || effectiveStatus === null);
61
61
  react.useEffect(() => {
@@ -76,7 +76,7 @@ function useRequireActiveSubscription(options) {
76
76
  }
77
77
  function withFFIDAuth(Component, options = {}) {
78
78
  const WrappedComponent = (props) => {
79
- const { isLoading, isAuthenticated, login } = chunkRNCK5E3Y_cjs.useFFIDContext();
79
+ const { isLoading, isAuthenticated, login } = chunkCPXTIRB6_cjs.useFFIDContext();
80
80
  const hasRedirected = react.useRef(false);
81
81
  react.useEffect(() => {
82
82
  if (!isLoading && !isAuthenticated && options.redirectToLogin && !hasRedirected.current) {
@@ -105,283 +105,283 @@ var FFID_NEWSLETTER_DISPATCH_MAX_RECIPIENTS = 1e3;
105
105
 
106
106
  Object.defineProperty(exports, "ACCESS_GRANTING_EFFECTIVE_STATUSES", {
107
107
  enumerable: true,
108
- get: function () { return chunkRNCK5E3Y_cjs.ACCESS_GRANTING_EFFECTIVE_STATUSES; }
108
+ get: function () { return chunkCPXTIRB6_cjs.ACCESS_GRANTING_EFFECTIVE_STATUSES; }
109
109
  });
110
110
  Object.defineProperty(exports, "AGENCY_INVITE_COOKIE_MAX_AGE_SEC", {
111
111
  enumerable: true,
112
- get: function () { return chunkRNCK5E3Y_cjs.AGENCY_INVITE_COOKIE_MAX_AGE_SEC; }
112
+ get: function () { return chunkCPXTIRB6_cjs.AGENCY_INVITE_COOKIE_MAX_AGE_SEC; }
113
113
  });
114
114
  Object.defineProperty(exports, "AGENCY_INVITE_COOKIE_NAME", {
115
115
  enumerable: true,
116
- get: function () { return chunkRNCK5E3Y_cjs.AGENCY_INVITE_COOKIE_NAME; }
116
+ get: function () { return chunkCPXTIRB6_cjs.AGENCY_INVITE_COOKIE_NAME; }
117
117
  });
118
118
  Object.defineProperty(exports, "AGENCY_INVITE_TOKEN_PARAM", {
119
119
  enumerable: true,
120
- get: function () { return chunkRNCK5E3Y_cjs.AGENCY_INVITE_TOKEN_PARAM; }
120
+ get: function () { return chunkCPXTIRB6_cjs.AGENCY_INVITE_TOKEN_PARAM; }
121
121
  });
122
122
  Object.defineProperty(exports, "AGENCY_INVITE_TOKEN_REDACTION", {
123
123
  enumerable: true,
124
- get: function () { return chunkRNCK5E3Y_cjs.AGENCY_INVITE_TOKEN_REDACTION; }
124
+ get: function () { return chunkCPXTIRB6_cjs.AGENCY_INVITE_TOKEN_REDACTION; }
125
125
  });
126
126
  Object.defineProperty(exports, "BLOCKING_EFFECTIVE_STATUSES", {
127
127
  enumerable: true,
128
- get: function () { return chunkRNCK5E3Y_cjs.BLOCKING_EFFECTIVE_STATUSES; }
128
+ get: function () { return chunkCPXTIRB6_cjs.BLOCKING_EFFECTIVE_STATUSES; }
129
129
  });
130
130
  Object.defineProperty(exports, "CATALOG_HASH_PATTERN", {
131
131
  enumerable: true,
132
- get: function () { return chunkRNCK5E3Y_cjs.CATALOG_HASH_PATTERN; }
132
+ get: function () { return chunkCPXTIRB6_cjs.CATALOG_HASH_PATTERN; }
133
133
  });
134
134
  Object.defineProperty(exports, "DEFAULT_API_BASE_URL", {
135
135
  enumerable: true,
136
- get: function () { return chunkRNCK5E3Y_cjs.DEFAULT_API_BASE_URL; }
136
+ get: function () { return chunkCPXTIRB6_cjs.DEFAULT_API_BASE_URL; }
137
137
  });
138
138
  Object.defineProperty(exports, "DEFAULT_OAUTH_SCOPES", {
139
139
  enumerable: true,
140
- get: function () { return chunkRNCK5E3Y_cjs.DEFAULT_OAUTH_SCOPES; }
140
+ get: function () { return chunkCPXTIRB6_cjs.DEFAULT_OAUTH_SCOPES; }
141
141
  });
142
142
  Object.defineProperty(exports, "EFFECTIVE_SUBSCRIPTION_STATUSES", {
143
143
  enumerable: true,
144
- get: function () { return chunkRNCK5E3Y_cjs.EFFECTIVE_SUBSCRIPTION_STATUSES; }
144
+ get: function () { return chunkCPXTIRB6_cjs.EFFECTIVE_SUBSCRIPTION_STATUSES; }
145
145
  });
146
146
  Object.defineProperty(exports, "FFIDAnnouncementBadge", {
147
147
  enumerable: true,
148
- get: function () { return chunkRNCK5E3Y_cjs.FFIDAnnouncementBadge; }
148
+ get: function () { return chunkCPXTIRB6_cjs.FFIDAnnouncementBadge; }
149
149
  });
150
150
  Object.defineProperty(exports, "FFIDAnnouncementList", {
151
151
  enumerable: true,
152
- get: function () { return chunkRNCK5E3Y_cjs.FFIDAnnouncementList; }
152
+ get: function () { return chunkCPXTIRB6_cjs.FFIDAnnouncementList; }
153
153
  });
154
154
  Object.defineProperty(exports, "FFIDCatalogHashError", {
155
155
  enumerable: true,
156
- get: function () { return chunkRNCK5E3Y_cjs.FFIDCatalogHashError; }
156
+ get: function () { return chunkCPXTIRB6_cjs.FFIDCatalogHashError; }
157
157
  });
158
158
  Object.defineProperty(exports, "FFIDInquiryForm", {
159
159
  enumerable: true,
160
- get: function () { return chunkRNCK5E3Y_cjs.FFIDInquiryForm; }
160
+ get: function () { return chunkCPXTIRB6_cjs.FFIDInquiryForm; }
161
161
  });
162
162
  Object.defineProperty(exports, "FFIDLoginButton", {
163
163
  enumerable: true,
164
- get: function () { return chunkRNCK5E3Y_cjs.FFIDLoginButton; }
164
+ get: function () { return chunkCPXTIRB6_cjs.FFIDLoginButton; }
165
165
  });
166
166
  Object.defineProperty(exports, "FFIDOrganizationSwitcher", {
167
167
  enumerable: true,
168
- get: function () { return chunkRNCK5E3Y_cjs.FFIDOrganizationSwitcher; }
168
+ get: function () { return chunkCPXTIRB6_cjs.FFIDOrganizationSwitcher; }
169
169
  });
170
170
  Object.defineProperty(exports, "FFIDProvider", {
171
171
  enumerable: true,
172
- get: function () { return chunkRNCK5E3Y_cjs.FFIDProvider; }
172
+ get: function () { return chunkCPXTIRB6_cjs.FFIDProvider; }
173
173
  });
174
174
  Object.defineProperty(exports, "FFIDSDKError", {
175
175
  enumerable: true,
176
- get: function () { return chunkRNCK5E3Y_cjs.FFIDSDKError; }
176
+ get: function () { return chunkCPXTIRB6_cjs.FFIDSDKError; }
177
177
  });
178
178
  Object.defineProperty(exports, "FFIDSubscriptionBadge", {
179
179
  enumerable: true,
180
- get: function () { return chunkRNCK5E3Y_cjs.FFIDSubscriptionBadge; }
180
+ get: function () { return chunkCPXTIRB6_cjs.FFIDSubscriptionBadge; }
181
181
  });
182
182
  Object.defineProperty(exports, "FFIDUserMenu", {
183
183
  enumerable: true,
184
- get: function () { return chunkRNCK5E3Y_cjs.FFIDUserMenu; }
184
+ get: function () { return chunkCPXTIRB6_cjs.FFIDUserMenu; }
185
185
  });
186
186
  Object.defineProperty(exports, "FFID_ALLOWED_ORGANIZATION_LOGO_MIME_TYPES", {
187
187
  enumerable: true,
188
- get: function () { return chunkRNCK5E3Y_cjs.FFID_ALLOWED_ORGANIZATION_LOGO_MIME_TYPES; }
188
+ get: function () { return chunkCPXTIRB6_cjs.FFID_ALLOWED_ORGANIZATION_LOGO_MIME_TYPES; }
189
189
  });
190
190
  Object.defineProperty(exports, "FFID_ANNOUNCEMENTS_ERROR_CODES", {
191
191
  enumerable: true,
192
- get: function () { return chunkRNCK5E3Y_cjs.FFID_ANNOUNCEMENTS_ERROR_CODES; }
192
+ get: function () { return chunkCPXTIRB6_cjs.FFID_ANNOUNCEMENTS_ERROR_CODES; }
193
193
  });
194
194
  Object.defineProperty(exports, "FFID_CATALOG_ENVIRONMENTS", {
195
195
  enumerable: true,
196
- get: function () { return chunkRNCK5E3Y_cjs.FFID_CATALOG_ENVIRONMENTS; }
196
+ get: function () { return chunkCPXTIRB6_cjs.FFID_CATALOG_ENVIRONMENTS; }
197
197
  });
198
198
  Object.defineProperty(exports, "FFID_CATALOG_PUBLICATION_STATUSES", {
199
199
  enumerable: true,
200
- get: function () { return chunkRNCK5E3Y_cjs.FFID_CATALOG_PUBLICATION_STATUSES; }
200
+ get: function () { return chunkCPXTIRB6_cjs.FFID_CATALOG_PUBLICATION_STATUSES; }
201
201
  });
202
202
  Object.defineProperty(exports, "FFID_COMPANY_SIZE_CODES", {
203
203
  enumerable: true,
204
- get: function () { return chunkRNCK5E3Y_cjs.FFID_COMPANY_SIZE_CODES; }
204
+ get: function () { return chunkCPXTIRB6_cjs.FFID_COMPANY_SIZE_CODES; }
205
205
  });
206
206
  Object.defineProperty(exports, "FFID_ERROR_CODES", {
207
207
  enumerable: true,
208
- get: function () { return chunkRNCK5E3Y_cjs.FFID_ERROR_CODES; }
208
+ get: function () { return chunkCPXTIRB6_cjs.FFID_ERROR_CODES; }
209
209
  });
210
210
  Object.defineProperty(exports, "FFID_INDUSTRY_CODES", {
211
211
  enumerable: true,
212
- get: function () { return chunkRNCK5E3Y_cjs.FFID_INDUSTRY_CODES; }
212
+ get: function () { return chunkCPXTIRB6_cjs.FFID_INDUSTRY_CODES; }
213
213
  });
214
214
  Object.defineProperty(exports, "FFID_INQUIRY_ACQUISITION_SOURCES", {
215
215
  enumerable: true,
216
- get: function () { return chunkRNCK5E3Y_cjs.FFID_INQUIRY_ACQUISITION_SOURCES; }
216
+ get: function () { return chunkCPXTIRB6_cjs.FFID_INQUIRY_ACQUISITION_SOURCES; }
217
217
  });
218
218
  Object.defineProperty(exports, "FFID_INQUIRY_CATEGORIES", {
219
219
  enumerable: true,
220
- get: function () { return chunkRNCK5E3Y_cjs.FFID_INQUIRY_CATEGORIES; }
220
+ get: function () { return chunkCPXTIRB6_cjs.FFID_INQUIRY_CATEGORIES; }
221
221
  });
222
222
  Object.defineProperty(exports, "FFID_INQUIRY_CATEGORIES_SITE_2026", {
223
223
  enumerable: true,
224
- get: function () { return chunkRNCK5E3Y_cjs.FFID_INQUIRY_CATEGORIES_SITE_2026; }
224
+ get: function () { return chunkCPXTIRB6_cjs.FFID_INQUIRY_CATEGORIES_SITE_2026; }
225
225
  });
226
226
  Object.defineProperty(exports, "FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_BYTES", {
227
227
  enumerable: true,
228
- get: function () { return chunkRNCK5E3Y_cjs.FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_BYTES; }
228
+ get: function () { return chunkCPXTIRB6_cjs.FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_BYTES; }
229
229
  });
230
230
  Object.defineProperty(exports, "FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_MB", {
231
231
  enumerable: true,
232
- get: function () { return chunkRNCK5E3Y_cjs.FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_MB; }
232
+ get: function () { return chunkCPXTIRB6_cjs.FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_MB; }
233
233
  });
234
234
  Object.defineProperty(exports, "FFID_ORGANIZATION_PROFILE_ERROR_CODES", {
235
235
  enumerable: true,
236
- get: function () { return chunkRNCK5E3Y_cjs.FFID_ORGANIZATION_PROFILE_ERROR_CODES; }
236
+ get: function () { return chunkCPXTIRB6_cjs.FFID_ORGANIZATION_PROFILE_ERROR_CODES; }
237
237
  });
238
238
  Object.defineProperty(exports, "FFID_SUBSCRIPTION_ERROR_CODES", {
239
239
  enumerable: true,
240
- get: function () { return chunkRNCK5E3Y_cjs.FFID_SUBSCRIPTION_ERROR_CODES; }
240
+ get: function () { return chunkCPXTIRB6_cjs.FFID_SUBSCRIPTION_ERROR_CODES; }
241
241
  });
242
242
  Object.defineProperty(exports, "canonicalizeCatalogValue", {
243
243
  enumerable: true,
244
- get: function () { return chunkRNCK5E3Y_cjs.canonicalizeCatalogValue; }
244
+ get: function () { return chunkCPXTIRB6_cjs.canonicalizeCatalogValue; }
245
245
  });
246
246
  Object.defineProperty(exports, "captureAgencyInviteToken", {
247
247
  enumerable: true,
248
- get: function () { return chunkRNCK5E3Y_cjs.captureAgencyInviteToken; }
248
+ get: function () { return chunkCPXTIRB6_cjs.captureAgencyInviteToken; }
249
249
  });
250
250
  Object.defineProperty(exports, "clearAgencyInviteToken", {
251
251
  enumerable: true,
252
- get: function () { return chunkRNCK5E3Y_cjs.clearAgencyInviteToken; }
252
+ get: function () { return chunkCPXTIRB6_cjs.clearAgencyInviteToken; }
253
253
  });
254
254
  Object.defineProperty(exports, "clearState", {
255
255
  enumerable: true,
256
- get: function () { return chunkRNCK5E3Y_cjs.cleanupStateStorage; }
256
+ get: function () { return chunkCPXTIRB6_cjs.cleanupStateStorage; }
257
257
  });
258
258
  Object.defineProperty(exports, "computeEffectiveStatusFromSession", {
259
259
  enumerable: true,
260
- get: function () { return chunkRNCK5E3Y_cjs.computeEffectiveStatusFromSession; }
260
+ get: function () { return chunkCPXTIRB6_cjs.computeEffectiveStatusFromSession; }
261
261
  });
262
262
  Object.defineProperty(exports, "computeFFIDCheckoutCopyHash", {
263
263
  enumerable: true,
264
- get: function () { return chunkRNCK5E3Y_cjs.computeFFIDCheckoutCopyHash; }
264
+ get: function () { return chunkCPXTIRB6_cjs.computeFFIDCheckoutCopyHash; }
265
265
  });
266
266
  Object.defineProperty(exports, "computeLegalDisclosureHash", {
267
267
  enumerable: true,
268
- get: function () { return chunkRNCK5E3Y_cjs.computeLegalDisclosureHash; }
268
+ get: function () { return chunkCPXTIRB6_cjs.computeLegalDisclosureHash; }
269
269
  });
270
270
  Object.defineProperty(exports, "computePaymentConfigurationHash", {
271
271
  enumerable: true,
272
- get: function () { return chunkRNCK5E3Y_cjs.computePaymentConfigurationHash; }
272
+ get: function () { return chunkCPXTIRB6_cjs.computePaymentConfigurationHash; }
273
273
  });
274
274
  Object.defineProperty(exports, "computePraxisCopyHash", {
275
275
  enumerable: true,
276
- get: function () { return chunkRNCK5E3Y_cjs.computePraxisCopyHash; }
276
+ get: function () { return chunkCPXTIRB6_cjs.computePraxisCopyHash; }
277
277
  });
278
278
  Object.defineProperty(exports, "computeScopeHash", {
279
279
  enumerable: true,
280
- get: function () { return chunkRNCK5E3Y_cjs.computeScopeHash; }
280
+ get: function () { return chunkCPXTIRB6_cjs.computeScopeHash; }
281
281
  });
282
282
  Object.defineProperty(exports, "computeTaxConfigurationHash", {
283
283
  enumerable: true,
284
- get: function () { return chunkRNCK5E3Y_cjs.computeTaxConfigurationHash; }
284
+ get: function () { return chunkCPXTIRB6_cjs.computeTaxConfigurationHash; }
285
285
  });
286
286
  Object.defineProperty(exports, "createFFIDAnnouncementsClient", {
287
287
  enumerable: true,
288
- get: function () { return chunkRNCK5E3Y_cjs.createFFIDAnnouncementsClient; }
288
+ get: function () { return chunkCPXTIRB6_cjs.createFFIDAnnouncementsClient; }
289
289
  });
290
290
  Object.defineProperty(exports, "createFFIDClient", {
291
291
  enumerable: true,
292
- get: function () { return chunkRNCK5E3Y_cjs.createFFIDClient; }
292
+ get: function () { return chunkCPXTIRB6_cjs.createFFIDClient; }
293
293
  });
294
294
  Object.defineProperty(exports, "createTokenStore", {
295
295
  enumerable: true,
296
- get: function () { return chunkRNCK5E3Y_cjs.createTokenStore; }
296
+ get: function () { return chunkCPXTIRB6_cjs.createTokenStore; }
297
297
  });
298
298
  Object.defineProperty(exports, "generateCodeChallenge", {
299
299
  enumerable: true,
300
- get: function () { return chunkRNCK5E3Y_cjs.generateCodeChallenge; }
300
+ get: function () { return chunkCPXTIRB6_cjs.generateCodeChallenge; }
301
301
  });
302
302
  Object.defineProperty(exports, "generateCodeVerifier", {
303
303
  enumerable: true,
304
- get: function () { return chunkRNCK5E3Y_cjs.generateCodeVerifier; }
304
+ get: function () { return chunkCPXTIRB6_cjs.generateCodeVerifier; }
305
305
  });
306
306
  Object.defineProperty(exports, "handleRedirectCallback", {
307
307
  enumerable: true,
308
- get: function () { return chunkRNCK5E3Y_cjs.handleRedirectCallback; }
308
+ get: function () { return chunkCPXTIRB6_cjs.handleRedirectCallback; }
309
309
  });
310
310
  Object.defineProperty(exports, "hasAccessFromUserinfo", {
311
311
  enumerable: true,
312
- get: function () { return chunkRNCK5E3Y_cjs.hasAccessFromUserinfo; }
312
+ get: function () { return chunkCPXTIRB6_cjs.hasAccessFromUserinfo; }
313
313
  });
314
314
  Object.defineProperty(exports, "hashCanonicalJson", {
315
315
  enumerable: true,
316
- get: function () { return chunkRNCK5E3Y_cjs.hashCanonicalJson; }
316
+ get: function () { return chunkCPXTIRB6_cjs.hashCanonicalJson; }
317
317
  });
318
318
  Object.defineProperty(exports, "isBlockedFromUserinfo", {
319
319
  enumerable: true,
320
- get: function () { return chunkRNCK5E3Y_cjs.isBlockedFromUserinfo; }
320
+ get: function () { return chunkCPXTIRB6_cjs.isBlockedFromUserinfo; }
321
321
  });
322
322
  Object.defineProperty(exports, "isFFIDInquiryAcquisitionSource", {
323
323
  enumerable: true,
324
- get: function () { return chunkRNCK5E3Y_cjs.isFFIDInquiryAcquisitionSource; }
324
+ get: function () { return chunkCPXTIRB6_cjs.isFFIDInquiryAcquisitionSource; }
325
325
  });
326
326
  Object.defineProperty(exports, "isFFIDInquiryCategorySite2026", {
327
327
  enumerable: true,
328
- get: function () { return chunkRNCK5E3Y_cjs.isFFIDInquiryCategorySite2026; }
328
+ get: function () { return chunkCPXTIRB6_cjs.isFFIDInquiryCategorySite2026; }
329
329
  });
330
330
  Object.defineProperty(exports, "normalizeRedirectUri", {
331
331
  enumerable: true,
332
- get: function () { return chunkRNCK5E3Y_cjs.normalizeRedirectUri; }
332
+ get: function () { return chunkCPXTIRB6_cjs.normalizeRedirectUri; }
333
333
  });
334
334
  Object.defineProperty(exports, "readAgencyInviteCookie", {
335
335
  enumerable: true,
336
- get: function () { return chunkRNCK5E3Y_cjs.readAgencyInviteCookie; }
336
+ get: function () { return chunkCPXTIRB6_cjs.readAgencyInviteCookie; }
337
337
  });
338
338
  Object.defineProperty(exports, "readAgencyInviteToken", {
339
339
  enumerable: true,
340
- get: function () { return chunkRNCK5E3Y_cjs.readAgencyInviteToken; }
340
+ get: function () { return chunkCPXTIRB6_cjs.readAgencyInviteToken; }
341
341
  });
342
342
  Object.defineProperty(exports, "redactAgencyInviteToken", {
343
343
  enumerable: true,
344
- get: function () { return chunkRNCK5E3Y_cjs.redactAgencyInviteToken; }
344
+ get: function () { return chunkCPXTIRB6_cjs.redactAgencyInviteToken; }
345
345
  });
346
346
  Object.defineProperty(exports, "retrieveCodeVerifier", {
347
347
  enumerable: true,
348
- get: function () { return chunkRNCK5E3Y_cjs.retrieveCodeVerifier; }
348
+ get: function () { return chunkCPXTIRB6_cjs.retrieveCodeVerifier; }
349
349
  });
350
350
  Object.defineProperty(exports, "retrieveState", {
351
351
  enumerable: true,
352
- get: function () { return chunkRNCK5E3Y_cjs.retrieveState; }
352
+ get: function () { return chunkCPXTIRB6_cjs.retrieveState; }
353
353
  });
354
354
  Object.defineProperty(exports, "sha256Hex", {
355
355
  enumerable: true,
356
- get: function () { return chunkRNCK5E3Y_cjs.sha256Hex; }
356
+ get: function () { return chunkCPXTIRB6_cjs.sha256Hex; }
357
357
  });
358
358
  Object.defineProperty(exports, "storeCodeVerifier", {
359
359
  enumerable: true,
360
- get: function () { return chunkRNCK5E3Y_cjs.storeCodeVerifier; }
360
+ get: function () { return chunkCPXTIRB6_cjs.storeCodeVerifier; }
361
361
  });
362
362
  Object.defineProperty(exports, "storeState", {
363
363
  enumerable: true,
364
- get: function () { return chunkRNCK5E3Y_cjs.storeState; }
364
+ get: function () { return chunkCPXTIRB6_cjs.storeState; }
365
365
  });
366
366
  Object.defineProperty(exports, "useFFID", {
367
367
  enumerable: true,
368
- get: function () { return chunkRNCK5E3Y_cjs.useFFID; }
368
+ get: function () { return chunkCPXTIRB6_cjs.useFFID; }
369
369
  });
370
370
  Object.defineProperty(exports, "useFFIDAnnouncements", {
371
371
  enumerable: true,
372
- get: function () { return chunkRNCK5E3Y_cjs.useFFIDAnnouncements; }
372
+ get: function () { return chunkCPXTIRB6_cjs.useFFIDAnnouncements; }
373
373
  });
374
374
  Object.defineProperty(exports, "useSubscription", {
375
375
  enumerable: true,
376
- get: function () { return chunkRNCK5E3Y_cjs.useSubscription; }
376
+ get: function () { return chunkCPXTIRB6_cjs.useSubscription; }
377
377
  });
378
378
  Object.defineProperty(exports, "validatePublishedCatalog", {
379
379
  enumerable: true,
380
- get: function () { return chunkRNCK5E3Y_cjs.validatePublishedCatalog; }
380
+ get: function () { return chunkCPXTIRB6_cjs.validatePublishedCatalog; }
381
381
  });
382
382
  Object.defineProperty(exports, "withSubscription", {
383
383
  enumerable: true,
384
- get: function () { return chunkRNCK5E3Y_cjs.withSubscription; }
384
+ get: function () { return chunkCPXTIRB6_cjs.withSubscription; }
385
385
  });
386
386
  Object.defineProperty(exports, "ALL_DENIED_EXCEPT_NECESSARY", {
387
387
  enumerable: true,
package/dist/index.d.cts CHANGED
@@ -187,6 +187,8 @@ interface FFIDPlanInfo {
187
187
  maxSeats: number | null;
188
188
  seatSelectionEnabled: boolean;
189
189
  trialDays: number;
190
+ /** flat: period fee; per_seat: multiply by selected quantity. Older servers omit this. */
191
+ pricingModel?: 'per_seat' | 'flat';
190
192
  /**
191
193
  * Monthly price in the smallest currency unit.
192
194
  *
@@ -422,12 +424,12 @@ interface FFIDPlanChangeLineItem {
422
424
  interface FFIDPlanChangePreviewBase {
423
425
  /** Discriminant for preview response variants (reserved for future unions with e.g. seat-change previews) */
424
426
  type: 'plan-change';
425
- /** Current plan display info. `price` is the total for the current quantity (unitPrice × quantity), not per-seat. */
427
+ /** Current plan display info. `price` is the period total: flat fee, or per-seat price times quantity. */
426
428
  currentPlan: {
427
429
  name: string;
428
430
  price: number;
429
431
  };
430
- /** New plan display info. `price` is the total for the effective quantity (unitPrice × quantity), not per-seat. */
432
+ /** New plan display info. `price` is the period total: flat fee, or per-seat price times quantity. */
431
433
  newPlan: {
432
434
  name: string;
433
435
  price: number;
@@ -501,7 +503,8 @@ interface FFIDSeatChangeLineItem {
501
503
  * `proratedAmount` is computed locally. `isEstimate=false`: it reflects Stripe's live
502
504
  * proration calculation.
503
505
  *
504
- * `nextInvoiceAmount` is always a local estimate (`unitPrice * newQuantity`).
506
+ * `nextInvoiceAmount` is a local estimate: flat period fee, or `unitPrice * newQuantity`.
507
+ * Flat capacity changes have zero prorated cost.
505
508
  *
506
509
  * `pricingUnavailable=true` means custom pricing or an unverified contracted Stripe
507
510
  * Price. Hide amounts; zero is not a quote. `custom_pricing` permits the existing
@@ -514,6 +517,8 @@ interface FFIDSeatChangeLineItem {
514
517
  * external consumers should guide users to the FFID portal for seat changes.
515
518
  */
516
519
  interface FFIDSeatChangePreview {
520
+ /** flat: unitPrice is the whole period fee; per_seat: multiply by capacity. */
521
+ pricingModel?: 'per_seat' | 'flat';
517
522
  /** Discriminant for preview response variants (pairs with `FFIDPlanChangePreview.type`) */
518
523
  type: 'seat-change';
519
524
  currentQuantity: number;
@@ -527,7 +532,7 @@ interface FFIDSeatChangePreview {
527
532
  * be reserved. Also `0` when `pricingUnavailable === true`; hide it instead of quoting zero.
528
533
  */
529
534
  proratedAmount: number;
530
- /** Next invoice full amount — always a local estimate (`unitPrice * newQuantity`) */
535
+ /** Next invoice full amount — flat period fee or per-seat price times newQuantity */
531
536
  nextInvoiceAmount: number;
532
537
  nextInvoiceDate: string | null;
533
538
  currency: FFIDSupportedCurrency;
package/dist/index.d.ts CHANGED
@@ -187,6 +187,8 @@ interface FFIDPlanInfo {
187
187
  maxSeats: number | null;
188
188
  seatSelectionEnabled: boolean;
189
189
  trialDays: number;
190
+ /** flat: period fee; per_seat: multiply by selected quantity. Older servers omit this. */
191
+ pricingModel?: 'per_seat' | 'flat';
190
192
  /**
191
193
  * Monthly price in the smallest currency unit.
192
194
  *
@@ -422,12 +424,12 @@ interface FFIDPlanChangeLineItem {
422
424
  interface FFIDPlanChangePreviewBase {
423
425
  /** Discriminant for preview response variants (reserved for future unions with e.g. seat-change previews) */
424
426
  type: 'plan-change';
425
- /** Current plan display info. `price` is the total for the current quantity (unitPrice × quantity), not per-seat. */
427
+ /** Current plan display info. `price` is the period total: flat fee, or per-seat price times quantity. */
426
428
  currentPlan: {
427
429
  name: string;
428
430
  price: number;
429
431
  };
430
- /** New plan display info. `price` is the total for the effective quantity (unitPrice × quantity), not per-seat. */
432
+ /** New plan display info. `price` is the period total: flat fee, or per-seat price times quantity. */
431
433
  newPlan: {
432
434
  name: string;
433
435
  price: number;
@@ -501,7 +503,8 @@ interface FFIDSeatChangeLineItem {
501
503
  * `proratedAmount` is computed locally. `isEstimate=false`: it reflects Stripe's live
502
504
  * proration calculation.
503
505
  *
504
- * `nextInvoiceAmount` is always a local estimate (`unitPrice * newQuantity`).
506
+ * `nextInvoiceAmount` is a local estimate: flat period fee, or `unitPrice * newQuantity`.
507
+ * Flat capacity changes have zero prorated cost.
505
508
  *
506
509
  * `pricingUnavailable=true` means custom pricing or an unverified contracted Stripe
507
510
  * Price. Hide amounts; zero is not a quote. `custom_pricing` permits the existing
@@ -514,6 +517,8 @@ interface FFIDSeatChangeLineItem {
514
517
  * external consumers should guide users to the FFID portal for seat changes.
515
518
  */
516
519
  interface FFIDSeatChangePreview {
520
+ /** flat: unitPrice is the whole period fee; per_seat: multiply by capacity. */
521
+ pricingModel?: 'per_seat' | 'flat';
517
522
  /** Discriminant for preview response variants (pairs with `FFIDPlanChangePreview.type`) */
518
523
  type: 'seat-change';
519
524
  currentQuantity: number;
@@ -527,7 +532,7 @@ interface FFIDSeatChangePreview {
527
532
  * be reserved. Also `0` when `pricingUnavailable === true`; hide it instead of quoting zero.
528
533
  */
529
534
  proratedAmount: number;
530
- /** Next invoice full amount — always a local estimate (`unitPrice * newQuantity`) */
535
+ /** Next invoice full amount — flat period fee or per-seat price times newQuantity */
531
536
  nextInvoiceAmount: number;
532
537
  nextInvoiceDate: string | null;
533
538
  currency: FFIDSupportedCurrency;
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { useFFIDContext, useSubscription } from './chunk-YKBAFPX5.js';
2
- export { ACCESS_GRANTING_EFFECTIVE_STATUSES, AGENCY_INVITE_COOKIE_MAX_AGE_SEC, AGENCY_INVITE_COOKIE_NAME, AGENCY_INVITE_TOKEN_PARAM, AGENCY_INVITE_TOKEN_REDACTION, BLOCKING_EFFECTIVE_STATUSES, CATALOG_HASH_PATTERN, DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, EFFECTIVE_SUBSCRIPTION_STATUSES, FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDCatalogHashError, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDProvider, FFIDSDKError, FFIDSubscriptionBadge, FFIDUserMenu, FFID_ALLOWED_ORGANIZATION_LOGO_MIME_TYPES, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_CATALOG_ENVIRONMENTS, FFID_CATALOG_PUBLICATION_STATUSES, FFID_COMPANY_SIZE_CODES, FFID_ERROR_CODES, FFID_INDUSTRY_CODES, FFID_INQUIRY_ACQUISITION_SOURCES, FFID_INQUIRY_CATEGORIES, FFID_INQUIRY_CATEGORIES_SITE_2026, FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_BYTES, FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_MB, FFID_ORGANIZATION_PROFILE_ERROR_CODES, FFID_SUBSCRIPTION_ERROR_CODES, canonicalizeCatalogValue, captureAgencyInviteToken, clearAgencyInviteToken, cleanupStateStorage as clearState, computeEffectiveStatusFromSession, computeFFIDCheckoutCopyHash, computeLegalDisclosureHash, computePaymentConfigurationHash, computePraxisCopyHash, computeScopeHash, computeTaxConfigurationHash, createFFIDAnnouncementsClient, createFFIDClient, createTokenStore, generateCodeChallenge, generateCodeVerifier, handleRedirectCallback, hasAccessFromUserinfo, hashCanonicalJson, isBlockedFromUserinfo, isFFIDInquiryAcquisitionSource, isFFIDInquiryCategorySite2026, normalizeRedirectUri, readAgencyInviteCookie, readAgencyInviteToken, redactAgencyInviteToken, retrieveCodeVerifier, retrieveState, sha256Hex, storeCodeVerifier, storeState, useFFID, useFFIDAnnouncements, useSubscription, validatePublishedCatalog, withSubscription } from './chunk-YKBAFPX5.js';
1
+ import { useFFIDContext, useSubscription } from './chunk-P5A6C5SK.js';
2
+ export { ACCESS_GRANTING_EFFECTIVE_STATUSES, AGENCY_INVITE_COOKIE_MAX_AGE_SEC, AGENCY_INVITE_COOKIE_NAME, AGENCY_INVITE_TOKEN_PARAM, AGENCY_INVITE_TOKEN_REDACTION, BLOCKING_EFFECTIVE_STATUSES, CATALOG_HASH_PATTERN, DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, EFFECTIVE_SUBSCRIPTION_STATUSES, FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDCatalogHashError, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDProvider, FFIDSDKError, FFIDSubscriptionBadge, FFIDUserMenu, FFID_ALLOWED_ORGANIZATION_LOGO_MIME_TYPES, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_CATALOG_ENVIRONMENTS, FFID_CATALOG_PUBLICATION_STATUSES, FFID_COMPANY_SIZE_CODES, FFID_ERROR_CODES, FFID_INDUSTRY_CODES, FFID_INQUIRY_ACQUISITION_SOURCES, FFID_INQUIRY_CATEGORIES, FFID_INQUIRY_CATEGORIES_SITE_2026, FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_BYTES, FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_MB, FFID_ORGANIZATION_PROFILE_ERROR_CODES, FFID_SUBSCRIPTION_ERROR_CODES, canonicalizeCatalogValue, captureAgencyInviteToken, clearAgencyInviteToken, cleanupStateStorage as clearState, computeEffectiveStatusFromSession, computeFFIDCheckoutCopyHash, computeLegalDisclosureHash, computePaymentConfigurationHash, computePraxisCopyHash, computeScopeHash, computeTaxConfigurationHash, createFFIDAnnouncementsClient, createFFIDClient, createTokenStore, generateCodeChallenge, generateCodeVerifier, handleRedirectCallback, hasAccessFromUserinfo, hashCanonicalJson, isBlockedFromUserinfo, isFFIDInquiryAcquisitionSource, isFFIDInquiryCategorySite2026, normalizeRedirectUri, readAgencyInviteCookie, readAgencyInviteToken, redactAgencyInviteToken, retrieveCodeVerifier, retrieveState, sha256Hex, storeCodeVerifier, storeState, useFFID, useFFIDAnnouncements, useSubscription, validatePublishedCatalog, withSubscription } from './chunk-P5A6C5SK.js';
3
3
  export { ALL_DENIED_EXCEPT_NECESSARY, CONSENT_COOKIE_NAME, CONSENT_DISMISSAL_TIMESTAMP_KEY, COOKIE_VERSION, DEFAULT_CONSENT_ERROR_MESSAGES, FFIDAnalyticsProvider, FFIDConsentError, FFIDCookieBanner, FFIDCookieLink, FFIDCookieSettings, FFID_CONSENT_ERROR_CODES, clearConsentDismissalTimestamp, decodeConsentCookie, encodeConsentCookie, readConsentCookie, readConsentDismissalTimestamp, useFFIDConsent, useFFIDConsentPreferences, writeConsentCookie, writeConsentDismissalTimestamp } from './chunk-RHBZHSRD.js';
4
4
  import { useEffect, useRef } from 'react';
5
5
  import { jsx, Fragment } from 'react/jsx-runtime';
@@ -1373,7 +1373,7 @@ var FFID_ORGANIZATION_PROFILE_ERROR_CODES = {
1373
1373
  };
1374
1374
 
1375
1375
  // src/client/version-check.ts
1376
- var SDK_VERSION = "8.0.0";
1376
+ var SDK_VERSION = "8.1.0";
1377
1377
  var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
1378
1378
  var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
1379
1379
  function sdkHeaders() {
@@ -1,5 +1,5 @@
1
- import { F as FFIDLogger, a as FFIDError, b as FFIDCacheAdapter, c as FFIDVerifyAccessTokenOptions, d as FFIDApiResponse, e as FFIDOAuthUserInfo, f as FFIDCatalogEnvironment, g as FFIDBillingInterval, h as FFIDTaxBehavior, i as FFIDPublishedCatalog } from '../ffid-client-BaEmw7jP.cjs';
2
- export { j as FFIDAddMemberParams, k as FFIDAddMemberRequest, l as FFIDAddMemberResponse, m as FFIDAllowedLogoMimeType, n as FFIDAssignableMemberRole, o as FFIDCacheConfig, p as FFIDCatalogPublication, q as FFIDCatalogPublicationStatus, r as FFIDClient, s as FFIDCompanySizeCode, t as FFIDConfig, u as FFIDIndustryCode, v as FFIDListMembersResponse, w as FFIDListingConsentInput, x as FFIDLogoWallEntry, y as FFIDLogoWallResponse, z as FFIDMemberRole, A as FFIDOrganization, B as FFIDOrganizationLogoUploadResponse, C as FFIDOrganizationMember, D as FFIDOrganizationProfile, E as FFIDOrganizationProfileErrorCode, G as FFIDOrganizationProfileResponse, H as FFIDOtpSendResponse, I as FFIDOtpVerifyResponse, J as FFIDPasswordResetConfirmResponse, K as FFIDPasswordResetResponse, L as FFIDPasswordResetVerifyResponse, M as FFIDProfileCallOptions, N as FFIDProvisionMemberPlan, O as FFIDProvisionMemberPlanStatus, P as FFIDProvisionMemberResult, Q as FFIDProvisionMemberStatus, R as FFIDProvisionOrganizationDryRun, S as FFIDProvisionOrganizationMemberInput, T as FFIDProvisionOrganizationOutcome, U as FFIDProvisionOrganizationParams, V as FFIDProvisionOrganizationResponse, W as FFIDProvisionUserDryRun, X as FFIDProvisionUserOutcome, Y as FFIDProvisionUserParams, Z as FFIDProvisionUserProfileInput, _ as FFIDProvisionUserResponse, $ as FFIDProvisionedOrganization, a0 as FFIDProvisionedUser, a1 as FFIDPublishedPlan, a2 as FFIDRemoveMemberResponse, a3 as FFIDResetSessionResponse, a4 as FFIDSubscription, a5 as FFIDUpdateMemberRoleResponse, a6 as FFIDUpdateUserProfileRequest, a7 as FFIDUploadOrganizationLogoParams, a8 as FFIDUpsertOrganizationProfileParams, a9 as FFIDUpsertOrganizationProfileRequest, aa as FFIDUser, ab as FFIDUserProfile, ac as FFID_ALLOWED_ORGANIZATION_LOGO_MIME_TYPES, ad as FFID_CATALOG_ENVIRONMENTS, ae as FFID_CATALOG_PUBLICATION_STATUSES, af as FFID_COMPANY_SIZE_CODES, ag as FFID_INDUSTRY_CODES, ah as FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_BYTES, ai as FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_MB, aj as FFID_ORGANIZATION_PROFILE_ERROR_CODES, ak as TokenData, al as TokenStore, am as createFFIDClient, an as createTokenStore } from '../ffid-client-BaEmw7jP.cjs';
1
+ import { F as FFIDLogger, a as FFIDError, b as FFIDCacheAdapter, c as FFIDVerifyAccessTokenOptions, d as FFIDApiResponse, e as FFIDOAuthUserInfo, f as FFIDCatalogEnvironment, g as FFIDBillingInterval, h as FFIDTaxBehavior, i as FFIDPublishedCatalog } from '../ffid-client-6aLs9Fqc.cjs';
2
+ export { j as FFIDAddMemberParams, k as FFIDAddMemberRequest, l as FFIDAddMemberResponse, m as FFIDAllowedLogoMimeType, n as FFIDAssignableMemberRole, o as FFIDCacheConfig, p as FFIDCatalogPublication, q as FFIDCatalogPublicationStatus, r as FFIDClient, s as FFIDCompanySizeCode, t as FFIDConfig, u as FFIDIndustryCode, v as FFIDListMembersResponse, w as FFIDListingConsentInput, x as FFIDLogoWallEntry, y as FFIDLogoWallResponse, z as FFIDMemberRole, A as FFIDOrganization, B as FFIDOrganizationLogoUploadResponse, C as FFIDOrganizationMember, D as FFIDOrganizationProfile, E as FFIDOrganizationProfileErrorCode, G as FFIDOrganizationProfileResponse, H as FFIDOtpSendResponse, I as FFIDOtpVerifyResponse, J as FFIDPasswordResetConfirmResponse, K as FFIDPasswordResetResponse, L as FFIDPasswordResetVerifyResponse, M as FFIDProfileCallOptions, N as FFIDProvisionMemberPlan, O as FFIDProvisionMemberPlanStatus, P as FFIDProvisionMemberResult, Q as FFIDProvisionMemberStatus, R as FFIDProvisionOrganizationDryRun, S as FFIDProvisionOrganizationMemberInput, T as FFIDProvisionOrganizationOutcome, U as FFIDProvisionOrganizationParams, V as FFIDProvisionOrganizationResponse, W as FFIDProvisionUserDryRun, X as FFIDProvisionUserOutcome, Y as FFIDProvisionUserParams, Z as FFIDProvisionUserProfileInput, _ as FFIDProvisionUserResponse, $ as FFIDProvisionedOrganization, a0 as FFIDProvisionedUser, a1 as FFIDPublishedPlan, a2 as FFIDRemoveMemberResponse, a3 as FFIDResetSessionResponse, a4 as FFIDSubscription, a5 as FFIDUpdateMemberRoleResponse, a6 as FFIDUpdateUserProfileRequest, a7 as FFIDUploadOrganizationLogoParams, a8 as FFIDUpsertOrganizationProfileParams, a9 as FFIDUpsertOrganizationProfileRequest, aa as FFIDUser, ab as FFIDUserProfile, ac as FFID_ALLOWED_ORGANIZATION_LOGO_MIME_TYPES, ad as FFID_CATALOG_ENVIRONMENTS, ae as FFID_CATALOG_PUBLICATION_STATUSES, af as FFID_COMPANY_SIZE_CODES, ag as FFID_INDUSTRY_CODES, ah as FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_BYTES, ai as FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_MB, aj as FFID_ORGANIZATION_PROFILE_ERROR_CODES, ak as TokenData, al as TokenStore, am as createFFIDClient, an as createTokenStore } from '../ffid-client-6aLs9Fqc.cjs';
3
3
  export { D as DEFAULT_API_BASE_URL, a as DEFAULT_OAUTH_SCOPES } from '../constants-Ce2eXQtB.cjs';
4
4
  import { z } from 'zod';
5
5
  import '../types-Cjb9J0rL.cjs';
@@ -1,5 +1,5 @@
1
- import { F as FFIDLogger, a as FFIDError, b as FFIDCacheAdapter, c as FFIDVerifyAccessTokenOptions, d as FFIDApiResponse, e as FFIDOAuthUserInfo, f as FFIDCatalogEnvironment, g as FFIDBillingInterval, h as FFIDTaxBehavior, i as FFIDPublishedCatalog } from '../ffid-client-5GAPcRIG.js';
2
- export { j as FFIDAddMemberParams, k as FFIDAddMemberRequest, l as FFIDAddMemberResponse, m as FFIDAllowedLogoMimeType, n as FFIDAssignableMemberRole, o as FFIDCacheConfig, p as FFIDCatalogPublication, q as FFIDCatalogPublicationStatus, r as FFIDClient, s as FFIDCompanySizeCode, t as FFIDConfig, u as FFIDIndustryCode, v as FFIDListMembersResponse, w as FFIDListingConsentInput, x as FFIDLogoWallEntry, y as FFIDLogoWallResponse, z as FFIDMemberRole, A as FFIDOrganization, B as FFIDOrganizationLogoUploadResponse, C as FFIDOrganizationMember, D as FFIDOrganizationProfile, E as FFIDOrganizationProfileErrorCode, G as FFIDOrganizationProfileResponse, H as FFIDOtpSendResponse, I as FFIDOtpVerifyResponse, J as FFIDPasswordResetConfirmResponse, K as FFIDPasswordResetResponse, L as FFIDPasswordResetVerifyResponse, M as FFIDProfileCallOptions, N as FFIDProvisionMemberPlan, O as FFIDProvisionMemberPlanStatus, P as FFIDProvisionMemberResult, Q as FFIDProvisionMemberStatus, R as FFIDProvisionOrganizationDryRun, S as FFIDProvisionOrganizationMemberInput, T as FFIDProvisionOrganizationOutcome, U as FFIDProvisionOrganizationParams, V as FFIDProvisionOrganizationResponse, W as FFIDProvisionUserDryRun, X as FFIDProvisionUserOutcome, Y as FFIDProvisionUserParams, Z as FFIDProvisionUserProfileInput, _ as FFIDProvisionUserResponse, $ as FFIDProvisionedOrganization, a0 as FFIDProvisionedUser, a1 as FFIDPublishedPlan, a2 as FFIDRemoveMemberResponse, a3 as FFIDResetSessionResponse, a4 as FFIDSubscription, a5 as FFIDUpdateMemberRoleResponse, a6 as FFIDUpdateUserProfileRequest, a7 as FFIDUploadOrganizationLogoParams, a8 as FFIDUpsertOrganizationProfileParams, a9 as FFIDUpsertOrganizationProfileRequest, aa as FFIDUser, ab as FFIDUserProfile, ac as FFID_ALLOWED_ORGANIZATION_LOGO_MIME_TYPES, ad as FFID_CATALOG_ENVIRONMENTS, ae as FFID_CATALOG_PUBLICATION_STATUSES, af as FFID_COMPANY_SIZE_CODES, ag as FFID_INDUSTRY_CODES, ah as FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_BYTES, ai as FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_MB, aj as FFID_ORGANIZATION_PROFILE_ERROR_CODES, ak as TokenData, al as TokenStore, am as createFFIDClient, an as createTokenStore } from '../ffid-client-5GAPcRIG.js';
1
+ import { F as FFIDLogger, a as FFIDError, b as FFIDCacheAdapter, c as FFIDVerifyAccessTokenOptions, d as FFIDApiResponse, e as FFIDOAuthUserInfo, f as FFIDCatalogEnvironment, g as FFIDBillingInterval, h as FFIDTaxBehavior, i as FFIDPublishedCatalog } from '../ffid-client-B0cORHac.js';
2
+ export { j as FFIDAddMemberParams, k as FFIDAddMemberRequest, l as FFIDAddMemberResponse, m as FFIDAllowedLogoMimeType, n as FFIDAssignableMemberRole, o as FFIDCacheConfig, p as FFIDCatalogPublication, q as FFIDCatalogPublicationStatus, r as FFIDClient, s as FFIDCompanySizeCode, t as FFIDConfig, u as FFIDIndustryCode, v as FFIDListMembersResponse, w as FFIDListingConsentInput, x as FFIDLogoWallEntry, y as FFIDLogoWallResponse, z as FFIDMemberRole, A as FFIDOrganization, B as FFIDOrganizationLogoUploadResponse, C as FFIDOrganizationMember, D as FFIDOrganizationProfile, E as FFIDOrganizationProfileErrorCode, G as FFIDOrganizationProfileResponse, H as FFIDOtpSendResponse, I as FFIDOtpVerifyResponse, J as FFIDPasswordResetConfirmResponse, K as FFIDPasswordResetResponse, L as FFIDPasswordResetVerifyResponse, M as FFIDProfileCallOptions, N as FFIDProvisionMemberPlan, O as FFIDProvisionMemberPlanStatus, P as FFIDProvisionMemberResult, Q as FFIDProvisionMemberStatus, R as FFIDProvisionOrganizationDryRun, S as FFIDProvisionOrganizationMemberInput, T as FFIDProvisionOrganizationOutcome, U as FFIDProvisionOrganizationParams, V as FFIDProvisionOrganizationResponse, W as FFIDProvisionUserDryRun, X as FFIDProvisionUserOutcome, Y as FFIDProvisionUserParams, Z as FFIDProvisionUserProfileInput, _ as FFIDProvisionUserResponse, $ as FFIDProvisionedOrganization, a0 as FFIDProvisionedUser, a1 as FFIDPublishedPlan, a2 as FFIDRemoveMemberResponse, a3 as FFIDResetSessionResponse, a4 as FFIDSubscription, a5 as FFIDUpdateMemberRoleResponse, a6 as FFIDUpdateUserProfileRequest, a7 as FFIDUploadOrganizationLogoParams, a8 as FFIDUpsertOrganizationProfileParams, a9 as FFIDUpsertOrganizationProfileRequest, aa as FFIDUser, ab as FFIDUserProfile, ac as FFID_ALLOWED_ORGANIZATION_LOGO_MIME_TYPES, ad as FFID_CATALOG_ENVIRONMENTS, ae as FFID_CATALOG_PUBLICATION_STATUSES, af as FFID_COMPANY_SIZE_CODES, ag as FFID_INDUSTRY_CODES, ah as FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_BYTES, ai as FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_MB, aj as FFID_ORGANIZATION_PROFILE_ERROR_CODES, ak as TokenData, al as TokenStore, am as createFFIDClient, an as createTokenStore } from '../ffid-client-B0cORHac.js';
3
3
  export { D as DEFAULT_API_BASE_URL, a as DEFAULT_OAUTH_SCOPES } from '../constants-Ce2eXQtB.js';
4
4
  import { z } from 'zod';
5
5
  import '../types-Cjb9J0rL.js';
@@ -1372,7 +1372,7 @@ var FFID_ORGANIZATION_PROFILE_ERROR_CODES = {
1372
1372
  };
1373
1373
 
1374
1374
  // src/client/version-check.ts
1375
- var SDK_VERSION = "8.0.0";
1375
+ var SDK_VERSION = "8.1.0";
1376
1376
  var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
1377
1377
  var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
1378
1378
  function sdkHeaders() {
@@ -1,4 +1,4 @@
1
- import { r as FFIDClient, e as FFIDOAuthUserInfo } from '../../ffid-client-BaEmw7jP.cjs';
1
+ import { r as FFIDClient, e as FFIDOAuthUserInfo } from '../../ffid-client-6aLs9Fqc.cjs';
2
2
  import '../../types-Cjb9J0rL.cjs';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { r as FFIDClient, e as FFIDOAuthUserInfo } from '../../ffid-client-5GAPcRIG.js';
1
+ import { r as FFIDClient, e as FFIDOAuthUserInfo } from '../../ffid-client-B0cORHac.js';
2
2
  import '../../types-Cjb9J0rL.js';
3
3
 
4
4
  /**
@@ -55,6 +55,14 @@ interface FFIDSubscriptionCreatedPayload {
55
55
  status?: string;
56
56
  effectiveStatus?: EffectiveSubscriptionStatus;
57
57
  gracePeriodEndsAt?: string | null;
58
+ /**
59
+ * Code of the service the subscription belongs to (e.g. `chatbot-v2`), resolved by FFID when
60
+ * the event is sent. Every `subscription.*` event is broadcast to all endpoints subscribed to
61
+ * that event type, so compare this with your own service code to skip events for other
62
+ * services. Absent only when FFID could not resolve it — do not read absence as
63
+ * "not addressed to this service".
64
+ */
65
+ serviceCode?: string;
58
66
  }
59
67
  interface FFIDSubscriptionUpdatedPayload {
60
68
  subscriptionId: string;
@@ -64,6 +72,14 @@ interface FFIDSubscriptionUpdatedPayload {
64
72
  status?: string;
65
73
  effectiveStatus?: EffectiveSubscriptionStatus;
66
74
  gracePeriodEndsAt?: string | null;
75
+ /**
76
+ * Code of the service the subscription belongs to (e.g. `chatbot-v2`), resolved by FFID when
77
+ * the event is sent. Every `subscription.*` event is broadcast to all endpoints subscribed to
78
+ * that event type, so compare this with your own service code to skip events for other
79
+ * services. Absent only when FFID could not resolve it — do not read absence as
80
+ * "not addressed to this service".
81
+ */
82
+ serviceCode?: string;
67
83
  }
68
84
  /**
69
85
  * `subscription.reactivated` (8.0.0): a cancellation reserved until the period end was
@@ -81,7 +97,13 @@ interface FFIDSubscriptionReactivatedPayload {
81
97
  gracePeriodEndsAt?: string | null;
82
98
  stripeSubscriptionId: string;
83
99
  stripeCustomerId: string;
84
- /** Code of the service the subscription belongs to (resolved by FFID when the event is sent) */
100
+ /**
101
+ * Code of the service the subscription belongs to (e.g. `chatbot-v2`), resolved by FFID when
102
+ * the event is sent. Every `subscription.*` event is broadcast to all endpoints subscribed to
103
+ * that event type, so compare this with your own service code to skip events for other
104
+ * services. Absent only when FFID could not resolve it — do not read absence as
105
+ * "not addressed to this service".
106
+ */
85
107
  serviceCode?: string;
86
108
  }
87
109
  /**
@@ -145,6 +167,14 @@ interface FFIDSubscriptionCanceledPayload {
145
167
  effectiveStatus?: EffectiveSubscriptionStatus;
146
168
  /** Always null for cancellation events because no grace window remains. */
147
169
  gracePeriodEndsAt?: string | null;
170
+ /**
171
+ * Code of the service the subscription belongs to (e.g. `chatbot-v2`), resolved by FFID when
172
+ * the event is sent. Every `subscription.*` event is broadcast to all endpoints subscribed to
173
+ * that event type, so compare this with your own service code to skip events for other
174
+ * services. Absent only when FFID could not resolve it — do not read absence as
175
+ * "not addressed to this service".
176
+ */
177
+ serviceCode?: string;
148
178
  }
149
179
  interface FFIDSubscriptionDowngradeScheduledPayload {
150
180
  /** FFID subscription UUID. */
@@ -161,6 +191,14 @@ interface FFIDSubscriptionDowngradeScheduledPayload {
161
191
  scheduledAt: string;
162
192
  /** ISO timestamp when the scheduled downgrade should take effect. */
163
193
  effectiveAt: string;
194
+ /**
195
+ * Code of the service the subscription belongs to (e.g. `chatbot-v2`), resolved by FFID when
196
+ * the event is sent. Every `subscription.*` event is broadcast to all endpoints subscribed to
197
+ * that event type, so compare this with your own service code to skip events for other
198
+ * services. Absent only when FFID could not resolve it — do not read absence as
199
+ * "not addressed to this service".
200
+ */
201
+ serviceCode?: string;
164
202
  }
165
203
  interface FFIDSubscriptionDowngradeAppliedPayload {
166
204
  /** FFID subscription UUID. */
@@ -175,6 +213,14 @@ interface FFIDSubscriptionDowngradeAppliedPayload {
175
213
  billingInterval: string;
176
214
  /** ISO timestamp when FFID applied the pending downgrade. */
177
215
  appliedAt: string;
216
+ /**
217
+ * Code of the service the subscription belongs to (e.g. `chatbot-v2`), resolved by FFID when
218
+ * the event is sent. Every `subscription.*` event is broadcast to all endpoints subscribed to
219
+ * that event type, so compare this with your own service code to skip events for other
220
+ * services. Absent only when FFID could not resolve it — do not read absence as
221
+ * "not addressed to this service".
222
+ */
223
+ serviceCode?: string;
178
224
  }
179
225
  interface FFIDSubscriptionDowngradeCanceledPayload {
180
226
  /** FFID subscription UUID. */
@@ -187,11 +233,27 @@ interface FFIDSubscriptionDowngradeCanceledPayload {
187
233
  currentPlanId: string;
188
234
  /** ISO timestamp when the pending downgrade was canceled. */
189
235
  canceledAt: string;
236
+ /**
237
+ * Code of the service the subscription belongs to (e.g. `chatbot-v2`), resolved by FFID when
238
+ * the event is sent. Every `subscription.*` event is broadcast to all endpoints subscribed to
239
+ * that event type, so compare this with your own service code to skip events for other
240
+ * services. Absent only when FFID could not resolve it — do not read absence as
241
+ * "not addressed to this service".
242
+ */
243
+ serviceCode?: string;
190
244
  }
191
245
  interface FFIDSubscriptionTrialEndingPayload {
192
246
  subscriptionId: string;
193
247
  organizationId?: string;
194
248
  trialEndDate: string;
249
+ /**
250
+ * Code of the service the subscription belongs to (e.g. `chatbot-v2`), resolved by FFID when
251
+ * the event is sent. Every `subscription.*` event is broadcast to all endpoints subscribed to
252
+ * that event type, so compare this with your own service code to skip events for other
253
+ * services. Absent only when FFID could not resolve it — do not read absence as
254
+ * "not addressed to this service".
255
+ */
256
+ serviceCode?: string;
195
257
  }
196
258
  interface FFIDSubscriptionPaymentFailedPayload {
197
259
  /**
@@ -249,6 +311,14 @@ interface FFIDSubscriptionPaymentFailedPayload {
249
311
  * "backend has no mapping yet" from "payload shape regression".
250
312
  */
251
313
  correlationUnavailable?: boolean;
314
+ /**
315
+ * Code of the service the subscription belongs to (e.g. `chatbot-v2`), resolved by FFID when
316
+ * the event is sent. Every `subscription.*` event is broadcast to all endpoints subscribed to
317
+ * that event type, so compare this with your own service code to skip events for other
318
+ * services. Absent only when FFID could not resolve it — do not read absence as
319
+ * "not addressed to this service".
320
+ */
321
+ serviceCode?: string;
252
322
  }
253
323
  interface FFIDUserCreatedPayload {
254
324
  userId: string;
@@ -55,6 +55,14 @@ interface FFIDSubscriptionCreatedPayload {
55
55
  status?: string;
56
56
  effectiveStatus?: EffectiveSubscriptionStatus;
57
57
  gracePeriodEndsAt?: string | null;
58
+ /**
59
+ * Code of the service the subscription belongs to (e.g. `chatbot-v2`), resolved by FFID when
60
+ * the event is sent. Every `subscription.*` event is broadcast to all endpoints subscribed to
61
+ * that event type, so compare this with your own service code to skip events for other
62
+ * services. Absent only when FFID could not resolve it — do not read absence as
63
+ * "not addressed to this service".
64
+ */
65
+ serviceCode?: string;
58
66
  }
59
67
  interface FFIDSubscriptionUpdatedPayload {
60
68
  subscriptionId: string;
@@ -64,6 +72,14 @@ interface FFIDSubscriptionUpdatedPayload {
64
72
  status?: string;
65
73
  effectiveStatus?: EffectiveSubscriptionStatus;
66
74
  gracePeriodEndsAt?: string | null;
75
+ /**
76
+ * Code of the service the subscription belongs to (e.g. `chatbot-v2`), resolved by FFID when
77
+ * the event is sent. Every `subscription.*` event is broadcast to all endpoints subscribed to
78
+ * that event type, so compare this with your own service code to skip events for other
79
+ * services. Absent only when FFID could not resolve it — do not read absence as
80
+ * "not addressed to this service".
81
+ */
82
+ serviceCode?: string;
67
83
  }
68
84
  /**
69
85
  * `subscription.reactivated` (8.0.0): a cancellation reserved until the period end was
@@ -81,7 +97,13 @@ interface FFIDSubscriptionReactivatedPayload {
81
97
  gracePeriodEndsAt?: string | null;
82
98
  stripeSubscriptionId: string;
83
99
  stripeCustomerId: string;
84
- /** Code of the service the subscription belongs to (resolved by FFID when the event is sent) */
100
+ /**
101
+ * Code of the service the subscription belongs to (e.g. `chatbot-v2`), resolved by FFID when
102
+ * the event is sent. Every `subscription.*` event is broadcast to all endpoints subscribed to
103
+ * that event type, so compare this with your own service code to skip events for other
104
+ * services. Absent only when FFID could not resolve it — do not read absence as
105
+ * "not addressed to this service".
106
+ */
85
107
  serviceCode?: string;
86
108
  }
87
109
  /**
@@ -145,6 +167,14 @@ interface FFIDSubscriptionCanceledPayload {
145
167
  effectiveStatus?: EffectiveSubscriptionStatus;
146
168
  /** Always null for cancellation events because no grace window remains. */
147
169
  gracePeriodEndsAt?: string | null;
170
+ /**
171
+ * Code of the service the subscription belongs to (e.g. `chatbot-v2`), resolved by FFID when
172
+ * the event is sent. Every `subscription.*` event is broadcast to all endpoints subscribed to
173
+ * that event type, so compare this with your own service code to skip events for other
174
+ * services. Absent only when FFID could not resolve it — do not read absence as
175
+ * "not addressed to this service".
176
+ */
177
+ serviceCode?: string;
148
178
  }
149
179
  interface FFIDSubscriptionDowngradeScheduledPayload {
150
180
  /** FFID subscription UUID. */
@@ -161,6 +191,14 @@ interface FFIDSubscriptionDowngradeScheduledPayload {
161
191
  scheduledAt: string;
162
192
  /** ISO timestamp when the scheduled downgrade should take effect. */
163
193
  effectiveAt: string;
194
+ /**
195
+ * Code of the service the subscription belongs to (e.g. `chatbot-v2`), resolved by FFID when
196
+ * the event is sent. Every `subscription.*` event is broadcast to all endpoints subscribed to
197
+ * that event type, so compare this with your own service code to skip events for other
198
+ * services. Absent only when FFID could not resolve it — do not read absence as
199
+ * "not addressed to this service".
200
+ */
201
+ serviceCode?: string;
164
202
  }
165
203
  interface FFIDSubscriptionDowngradeAppliedPayload {
166
204
  /** FFID subscription UUID. */
@@ -175,6 +213,14 @@ interface FFIDSubscriptionDowngradeAppliedPayload {
175
213
  billingInterval: string;
176
214
  /** ISO timestamp when FFID applied the pending downgrade. */
177
215
  appliedAt: string;
216
+ /**
217
+ * Code of the service the subscription belongs to (e.g. `chatbot-v2`), resolved by FFID when
218
+ * the event is sent. Every `subscription.*` event is broadcast to all endpoints subscribed to
219
+ * that event type, so compare this with your own service code to skip events for other
220
+ * services. Absent only when FFID could not resolve it — do not read absence as
221
+ * "not addressed to this service".
222
+ */
223
+ serviceCode?: string;
178
224
  }
179
225
  interface FFIDSubscriptionDowngradeCanceledPayload {
180
226
  /** FFID subscription UUID. */
@@ -187,11 +233,27 @@ interface FFIDSubscriptionDowngradeCanceledPayload {
187
233
  currentPlanId: string;
188
234
  /** ISO timestamp when the pending downgrade was canceled. */
189
235
  canceledAt: string;
236
+ /**
237
+ * Code of the service the subscription belongs to (e.g. `chatbot-v2`), resolved by FFID when
238
+ * the event is sent. Every `subscription.*` event is broadcast to all endpoints subscribed to
239
+ * that event type, so compare this with your own service code to skip events for other
240
+ * services. Absent only when FFID could not resolve it — do not read absence as
241
+ * "not addressed to this service".
242
+ */
243
+ serviceCode?: string;
190
244
  }
191
245
  interface FFIDSubscriptionTrialEndingPayload {
192
246
  subscriptionId: string;
193
247
  organizationId?: string;
194
248
  trialEndDate: string;
249
+ /**
250
+ * Code of the service the subscription belongs to (e.g. `chatbot-v2`), resolved by FFID when
251
+ * the event is sent. Every `subscription.*` event is broadcast to all endpoints subscribed to
252
+ * that event type, so compare this with your own service code to skip events for other
253
+ * services. Absent only when FFID could not resolve it — do not read absence as
254
+ * "not addressed to this service".
255
+ */
256
+ serviceCode?: string;
195
257
  }
196
258
  interface FFIDSubscriptionPaymentFailedPayload {
197
259
  /**
@@ -249,6 +311,14 @@ interface FFIDSubscriptionPaymentFailedPayload {
249
311
  * "backend has no mapping yet" from "payload shape regression".
250
312
  */
251
313
  correlationUnavailable?: boolean;
314
+ /**
315
+ * Code of the service the subscription belongs to (e.g. `chatbot-v2`), resolved by FFID when
316
+ * the event is sent. Every `subscription.*` event is broadcast to all endpoints subscribed to
317
+ * that event type, so compare this with your own service code to skip events for other
318
+ * services. Absent only when FFID could not resolve it — do not read absence as
319
+ * "not addressed to this service".
320
+ */
321
+ serviceCode?: string;
252
322
  }
253
323
  interface FFIDUserCreatedPayload {
254
324
  userId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feelflow/ffid-sdk",
3
- "version": "8.0.0",
3
+ "version": "8.1.0",
4
4
  "description": "FeelFlow ID Platform SDK for React/Next.js applications",
5
5
  "keywords": [
6
6
  "feelflow",