@feelflow/ffid-sdk 5.10.0 → 5.12.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.
@@ -436,6 +436,8 @@ function createVerifyAccessToken(deps) {
436
436
  // src/client/billing-methods.ts
437
437
  var BILLING_CHECKOUT_ENDPOINT = "/api/v1/billing/checkout";
438
438
  var BILLING_PORTAL_ENDPOINT = "/api/v1/billing/portal";
439
+ var EXT_INVOICES_ENDPOINT = "/api/v1/billing/ext/invoices";
440
+ var EXT_RETRY_PAYMENT_ENDPOINT = "/api/v1/billing/ext/retry-payment";
439
441
  function createBillingMethods(deps) {
440
442
  const { fetchWithAuth, createError } = deps;
441
443
  async function createCheckoutSession(params) {
@@ -477,7 +479,31 @@ function createBillingMethods(deps) {
477
479
  `${BILLING_PORTAL_ENDPOINT}?${query.toString()}`
478
480
  );
479
481
  }
480
- return { createCheckoutSession, createPortalSession };
482
+ async function listInvoices(params) {
483
+ if (!params.organizationId) {
484
+ return { error: createError("VALIDATION_ERROR", "organizationId \u306F\u5FC5\u9808\u3067\u3059") };
485
+ }
486
+ const query = new URLSearchParams({ organizationId: params.organizationId });
487
+ return fetchWithAuth(`${EXT_INVOICES_ENDPOINT}?${query.toString()}`);
488
+ }
489
+ async function getInvoice(params) {
490
+ if (!params.invoiceId) {
491
+ return { error: createError("VALIDATION_ERROR", "invoiceId \u306F\u5FC5\u9808\u3067\u3059") };
492
+ }
493
+ return fetchWithAuth(
494
+ `${EXT_INVOICES_ENDPOINT}/${encodeURIComponent(params.invoiceId)}`
495
+ );
496
+ }
497
+ async function retryPayment(params) {
498
+ if (!params.organizationId) {
499
+ return { error: createError("VALIDATION_ERROR", "organizationId \u306F\u5FC5\u9808\u3067\u3059") };
500
+ }
501
+ return fetchWithAuth(EXT_RETRY_PAYMENT_ENDPOINT, {
502
+ method: "POST",
503
+ body: JSON.stringify({ organizationId: params.organizationId })
504
+ });
505
+ }
506
+ return { createCheckoutSession, createPortalSession, listInvoices, getInvoice, retryPayment };
481
507
  }
482
508
 
483
509
  // src/client/subscription-methods.ts
@@ -819,6 +845,45 @@ function createMembersMethods(deps) {
819
845
  return { listMembers, addMember, updateMemberRole, removeMember };
820
846
  }
821
847
 
848
+ // src/client/seat-methods.ts
849
+ function seatsEndpoint(subscriptionId) {
850
+ return `/api/v1/subscriptions/ext/${encodeURIComponent(subscriptionId)}/seats/assignments`;
851
+ }
852
+ function createSeatMethods(deps) {
853
+ const { fetchWithAuth, createError } = deps;
854
+ async function listSeatAssignments(params) {
855
+ if (!params.subscriptionId) {
856
+ return { error: createError("VALIDATION_ERROR", "subscriptionId \u306F\u5FC5\u9808\u3067\u3059") };
857
+ }
858
+ return fetchWithAuth(seatsEndpoint(params.subscriptionId));
859
+ }
860
+ async function assignSeats(params) {
861
+ if (!params.subscriptionId) {
862
+ return { error: createError("VALIDATION_ERROR", "subscriptionId \u306F\u5FC5\u9808\u3067\u3059") };
863
+ }
864
+ if (!Array.isArray(params.userIds) || params.userIds.length === 0) {
865
+ return { error: createError("VALIDATION_ERROR", "userIds \u306F 1 \u4EF6\u4EE5\u4E0A\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044") };
866
+ }
867
+ return fetchWithAuth(seatsEndpoint(params.subscriptionId), {
868
+ method: "POST",
869
+ body: JSON.stringify({ userIds: params.userIds })
870
+ });
871
+ }
872
+ async function unassignSeat(params) {
873
+ if (!params.subscriptionId) {
874
+ return { error: createError("VALIDATION_ERROR", "subscriptionId \u306F\u5FC5\u9808\u3067\u3059") };
875
+ }
876
+ if (!params.userId) {
877
+ return { error: createError("VALIDATION_ERROR", "userId \u306F\u5FC5\u9808\u3067\u3059") };
878
+ }
879
+ return fetchWithAuth(
880
+ `${seatsEndpoint(params.subscriptionId)}/${encodeURIComponent(params.userId)}`,
881
+ { method: "DELETE" }
882
+ );
883
+ }
884
+ return { listSeatAssignments, assignSeats, unassignSeat };
885
+ }
886
+
822
887
  // src/client/profile-methods.ts
823
888
  var EXT_PROFILE_ENDPOINT = "/api/v1/users/ext/me";
824
889
  function resolveAuthOverride(options, createError) {
@@ -869,7 +934,7 @@ function createProfileMethods(deps) {
869
934
  }
870
935
 
871
936
  // src/client/version-check.ts
872
- var SDK_VERSION = "5.10.0";
937
+ var SDK_VERSION = "5.12.0";
873
938
  var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
874
939
  var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
875
940
  function sdkHeaders() {
@@ -2259,6 +2324,15 @@ function createInquiryMethods(deps) {
2259
2324
  }
2260
2325
 
2261
2326
  // src/subscriptions/types.ts
2327
+ var EFFECTIVE_SUBSCRIPTION_STATUSES = [
2328
+ "active",
2329
+ "active_canceling",
2330
+ "past_due_grace",
2331
+ "blocked",
2332
+ "canceled",
2333
+ "trial_expired",
2334
+ "expired"
2335
+ ];
2262
2336
  var PAST_DUE_GRACE_PERIOD_DAYS = 7;
2263
2337
  var HOURS_PER_DAY = 24;
2264
2338
  var MINUTES_PER_HOUR = 60;
@@ -2719,7 +2793,11 @@ function createFFIDClient(config) {
2719
2793
  }
2720
2794
  return result;
2721
2795
  }
2722
- const { createCheckoutSession, createPortalSession } = createBillingMethods({
2796
+ const { createCheckoutSession, createPortalSession, listInvoices, getInvoice, retryPayment } = createBillingMethods({
2797
+ fetchWithAuth,
2798
+ createError
2799
+ });
2800
+ const { listSeatAssignments, assignSeats, unassignSeat } = createSeatMethods({
2723
2801
  fetchWithAuth,
2724
2802
  createError
2725
2803
  });
@@ -2828,6 +2906,12 @@ function createFFIDClient(config) {
2828
2906
  getAnalyticsConfig,
2829
2907
  createCheckoutSession,
2830
2908
  createPortalSession,
2909
+ listInvoices,
2910
+ getInvoice,
2911
+ retryPayment,
2912
+ listSeatAssignments,
2913
+ assignSeats,
2914
+ unassignSeat,
2831
2915
  listPlans,
2832
2916
  getSubscription,
2833
2917
  subscribe,
@@ -4860,6 +4944,7 @@ exports.ACCESS_GRANTING_EFFECTIVE_STATUSES = ACCESS_GRANTING_EFFECTIVE_STATUSES;
4860
4944
  exports.BLOCKING_EFFECTIVE_STATUSES = BLOCKING_EFFECTIVE_STATUSES;
4861
4945
  exports.DEFAULT_API_BASE_URL = DEFAULT_API_BASE_URL;
4862
4946
  exports.DEFAULT_OAUTH_SCOPES = DEFAULT_OAUTH_SCOPES;
4947
+ exports.EFFECTIVE_SUBSCRIPTION_STATUSES = EFFECTIVE_SUBSCRIPTION_STATUSES;
4863
4948
  exports.FFIDAnnouncementBadge = FFIDAnnouncementBadge;
4864
4949
  exports.FFIDAnnouncementList = FFIDAnnouncementList;
4865
4950
  exports.FFIDInquiryForm = FFIDInquiryForm;
@@ -434,6 +434,8 @@ function createVerifyAccessToken(deps) {
434
434
  // src/client/billing-methods.ts
435
435
  var BILLING_CHECKOUT_ENDPOINT = "/api/v1/billing/checkout";
436
436
  var BILLING_PORTAL_ENDPOINT = "/api/v1/billing/portal";
437
+ var EXT_INVOICES_ENDPOINT = "/api/v1/billing/ext/invoices";
438
+ var EXT_RETRY_PAYMENT_ENDPOINT = "/api/v1/billing/ext/retry-payment";
437
439
  function createBillingMethods(deps) {
438
440
  const { fetchWithAuth, createError } = deps;
439
441
  async function createCheckoutSession(params) {
@@ -475,7 +477,31 @@ function createBillingMethods(deps) {
475
477
  `${BILLING_PORTAL_ENDPOINT}?${query.toString()}`
476
478
  );
477
479
  }
478
- return { createCheckoutSession, createPortalSession };
480
+ async function listInvoices(params) {
481
+ if (!params.organizationId) {
482
+ return { error: createError("VALIDATION_ERROR", "organizationId \u306F\u5FC5\u9808\u3067\u3059") };
483
+ }
484
+ const query = new URLSearchParams({ organizationId: params.organizationId });
485
+ return fetchWithAuth(`${EXT_INVOICES_ENDPOINT}?${query.toString()}`);
486
+ }
487
+ async function getInvoice(params) {
488
+ if (!params.invoiceId) {
489
+ return { error: createError("VALIDATION_ERROR", "invoiceId \u306F\u5FC5\u9808\u3067\u3059") };
490
+ }
491
+ return fetchWithAuth(
492
+ `${EXT_INVOICES_ENDPOINT}/${encodeURIComponent(params.invoiceId)}`
493
+ );
494
+ }
495
+ async function retryPayment(params) {
496
+ if (!params.organizationId) {
497
+ return { error: createError("VALIDATION_ERROR", "organizationId \u306F\u5FC5\u9808\u3067\u3059") };
498
+ }
499
+ return fetchWithAuth(EXT_RETRY_PAYMENT_ENDPOINT, {
500
+ method: "POST",
501
+ body: JSON.stringify({ organizationId: params.organizationId })
502
+ });
503
+ }
504
+ return { createCheckoutSession, createPortalSession, listInvoices, getInvoice, retryPayment };
479
505
  }
480
506
 
481
507
  // src/client/subscription-methods.ts
@@ -817,6 +843,45 @@ function createMembersMethods(deps) {
817
843
  return { listMembers, addMember, updateMemberRole, removeMember };
818
844
  }
819
845
 
846
+ // src/client/seat-methods.ts
847
+ function seatsEndpoint(subscriptionId) {
848
+ return `/api/v1/subscriptions/ext/${encodeURIComponent(subscriptionId)}/seats/assignments`;
849
+ }
850
+ function createSeatMethods(deps) {
851
+ const { fetchWithAuth, createError } = deps;
852
+ async function listSeatAssignments(params) {
853
+ if (!params.subscriptionId) {
854
+ return { error: createError("VALIDATION_ERROR", "subscriptionId \u306F\u5FC5\u9808\u3067\u3059") };
855
+ }
856
+ return fetchWithAuth(seatsEndpoint(params.subscriptionId));
857
+ }
858
+ async function assignSeats(params) {
859
+ if (!params.subscriptionId) {
860
+ return { error: createError("VALIDATION_ERROR", "subscriptionId \u306F\u5FC5\u9808\u3067\u3059") };
861
+ }
862
+ if (!Array.isArray(params.userIds) || params.userIds.length === 0) {
863
+ return { error: createError("VALIDATION_ERROR", "userIds \u306F 1 \u4EF6\u4EE5\u4E0A\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044") };
864
+ }
865
+ return fetchWithAuth(seatsEndpoint(params.subscriptionId), {
866
+ method: "POST",
867
+ body: JSON.stringify({ userIds: params.userIds })
868
+ });
869
+ }
870
+ async function unassignSeat(params) {
871
+ if (!params.subscriptionId) {
872
+ return { error: createError("VALIDATION_ERROR", "subscriptionId \u306F\u5FC5\u9808\u3067\u3059") };
873
+ }
874
+ if (!params.userId) {
875
+ return { error: createError("VALIDATION_ERROR", "userId \u306F\u5FC5\u9808\u3067\u3059") };
876
+ }
877
+ return fetchWithAuth(
878
+ `${seatsEndpoint(params.subscriptionId)}/${encodeURIComponent(params.userId)}`,
879
+ { method: "DELETE" }
880
+ );
881
+ }
882
+ return { listSeatAssignments, assignSeats, unassignSeat };
883
+ }
884
+
820
885
  // src/client/profile-methods.ts
821
886
  var EXT_PROFILE_ENDPOINT = "/api/v1/users/ext/me";
822
887
  function resolveAuthOverride(options, createError) {
@@ -867,7 +932,7 @@ function createProfileMethods(deps) {
867
932
  }
868
933
 
869
934
  // src/client/version-check.ts
870
- var SDK_VERSION = "5.10.0";
935
+ var SDK_VERSION = "5.12.0";
871
936
  var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
872
937
  var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
873
938
  function sdkHeaders() {
@@ -2257,6 +2322,15 @@ function createInquiryMethods(deps) {
2257
2322
  }
2258
2323
 
2259
2324
  // src/subscriptions/types.ts
2325
+ var EFFECTIVE_SUBSCRIPTION_STATUSES = [
2326
+ "active",
2327
+ "active_canceling",
2328
+ "past_due_grace",
2329
+ "blocked",
2330
+ "canceled",
2331
+ "trial_expired",
2332
+ "expired"
2333
+ ];
2260
2334
  var PAST_DUE_GRACE_PERIOD_DAYS = 7;
2261
2335
  var HOURS_PER_DAY = 24;
2262
2336
  var MINUTES_PER_HOUR = 60;
@@ -2717,7 +2791,11 @@ function createFFIDClient(config) {
2717
2791
  }
2718
2792
  return result;
2719
2793
  }
2720
- const { createCheckoutSession, createPortalSession } = createBillingMethods({
2794
+ const { createCheckoutSession, createPortalSession, listInvoices, getInvoice, retryPayment } = createBillingMethods({
2795
+ fetchWithAuth,
2796
+ createError
2797
+ });
2798
+ const { listSeatAssignments, assignSeats, unassignSeat } = createSeatMethods({
2721
2799
  fetchWithAuth,
2722
2800
  createError
2723
2801
  });
@@ -2826,6 +2904,12 @@ function createFFIDClient(config) {
2826
2904
  getAnalyticsConfig,
2827
2905
  createCheckoutSession,
2828
2906
  createPortalSession,
2907
+ listInvoices,
2908
+ getInvoice,
2909
+ retryPayment,
2910
+ listSeatAssignments,
2911
+ assignSeats,
2912
+ unassignSeat,
2829
2913
  listPlans,
2830
2914
  getSubscription,
2831
2915
  subscribe,
@@ -4854,4 +4938,4 @@ function FFIDInquiryForm({
4854
4938
  );
4855
4939
  }
4856
4940
 
4857
- export { ACCESS_GRANTING_EFFECTIVE_STATUSES, BLOCKING_EFFECTIVE_STATUSES, DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDProvider, FFIDSDKError, FFIDSubscriptionBadge, FFIDUserMenu, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_INQUIRY_CATEGORIES, FFID_INQUIRY_CATEGORIES_SITE_2026, computeEffectiveStatusFromSession, createFFIDAnnouncementsClient, createFFIDClient, createTokenStore, generateCodeChallenge, generateCodeVerifier, hasAccessFromUserinfo, isBlockedFromUserinfo, isFFIDInquiryCategorySite2026, normalizeRedirectUri, retrieveCodeVerifier, storeCodeVerifier, useFFID, useFFIDAnnouncements, useFFIDContext, useSubscription, withSubscription };
4941
+ export { ACCESS_GRANTING_EFFECTIVE_STATUSES, BLOCKING_EFFECTIVE_STATUSES, DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, EFFECTIVE_SUBSCRIPTION_STATUSES, FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDProvider, FFIDSDKError, FFIDSubscriptionBadge, FFIDUserMenu, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_INQUIRY_CATEGORIES, FFID_INQUIRY_CATEGORIES_SITE_2026, computeEffectiveStatusFromSession, createFFIDAnnouncementsClient, createFFIDClient, createTokenStore, generateCodeChallenge, generateCodeVerifier, hasAccessFromUserinfo, isBlockedFromUserinfo, isFFIDInquiryCategorySite2026, normalizeRedirectUri, retrieveCodeVerifier, storeCodeVerifier, useFFID, useFFIDAnnouncements, useFFIDContext, useSubscription, withSubscription };
@@ -1,34 +1,34 @@
1
1
  'use strict';
2
2
 
3
- var chunkIZSL6DI7_cjs = require('../chunk-IZSL6DI7.cjs');
3
+ var chunkAOJDV3UO_cjs = require('../chunk-AOJDV3UO.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "FFIDAnnouncementBadge", {
8
8
  enumerable: true,
9
- get: function () { return chunkIZSL6DI7_cjs.FFIDAnnouncementBadge; }
9
+ get: function () { return chunkAOJDV3UO_cjs.FFIDAnnouncementBadge; }
10
10
  });
11
11
  Object.defineProperty(exports, "FFIDAnnouncementList", {
12
12
  enumerable: true,
13
- get: function () { return chunkIZSL6DI7_cjs.FFIDAnnouncementList; }
13
+ get: function () { return chunkAOJDV3UO_cjs.FFIDAnnouncementList; }
14
14
  });
15
15
  Object.defineProperty(exports, "FFIDInquiryForm", {
16
16
  enumerable: true,
17
- get: function () { return chunkIZSL6DI7_cjs.FFIDInquiryForm; }
17
+ get: function () { return chunkAOJDV3UO_cjs.FFIDInquiryForm; }
18
18
  });
19
19
  Object.defineProperty(exports, "FFIDLoginButton", {
20
20
  enumerable: true,
21
- get: function () { return chunkIZSL6DI7_cjs.FFIDLoginButton; }
21
+ get: function () { return chunkAOJDV3UO_cjs.FFIDLoginButton; }
22
22
  });
23
23
  Object.defineProperty(exports, "FFIDOrganizationSwitcher", {
24
24
  enumerable: true,
25
- get: function () { return chunkIZSL6DI7_cjs.FFIDOrganizationSwitcher; }
25
+ get: function () { return chunkAOJDV3UO_cjs.FFIDOrganizationSwitcher; }
26
26
  });
27
27
  Object.defineProperty(exports, "FFIDSubscriptionBadge", {
28
28
  enumerable: true,
29
- get: function () { return chunkIZSL6DI7_cjs.FFIDSubscriptionBadge; }
29
+ get: function () { return chunkAOJDV3UO_cjs.FFIDSubscriptionBadge; }
30
30
  });
31
31
  Object.defineProperty(exports, "FFIDUserMenu", {
32
32
  enumerable: true,
33
- get: function () { return chunkIZSL6DI7_cjs.FFIDUserMenu; }
33
+ get: function () { return chunkAOJDV3UO_cjs.FFIDUserMenu; }
34
34
  });
@@ -1,3 +1,3 @@
1
- export { M as FFIDAnnouncementBadge, al as FFIDAnnouncementBadgeClassNames, am as FFIDAnnouncementBadgeProps, N as FFIDAnnouncementList, an as FFIDAnnouncementListClassNames, ao as FFIDAnnouncementListProps, V as FFIDInquiryForm, W as FFIDInquiryFormCategoryItem, X as FFIDInquiryFormClassNames, Y as FFIDInquiryFormLegalLayout, Z as FFIDInquiryFormOrganization, _ as FFIDInquiryFormPlaceholderContext, $ as FFIDInquiryFormPrefill, a0 as FFIDInquiryFormProps, a1 as FFIDInquiryFormSubmitData, a2 as FFIDInquiryFormSubmitResult, a4 as FFIDLoginButton, ap as FFIDLoginButtonProps, a7 as FFIDOrganizationSwitcher, aq as FFIDOrganizationSwitcherClassNames, ar as FFIDOrganizationSwitcherProps, ac as FFIDSubscriptionBadge, as as FFIDSubscriptionBadgeClassNames, at as FFIDSubscriptionBadgeProps, ae as FFIDUserMenu, au as FFIDUserMenuClassNames, av as FFIDUserMenuProps } from '../index-DSvX4q8E.cjs';
1
+ export { I as FFIDAnnouncementBadge, ai as FFIDAnnouncementBadgeClassNames, aj as FFIDAnnouncementBadgeProps, J as FFIDAnnouncementList, ak as FFIDAnnouncementListClassNames, al as FFIDAnnouncementListProps, S as FFIDInquiryForm, T as FFIDInquiryFormCategoryItem, U as FFIDInquiryFormClassNames, V as FFIDInquiryFormLegalLayout, W as FFIDInquiryFormOrganization, X as FFIDInquiryFormPlaceholderContext, Y as FFIDInquiryFormPrefill, Z as FFIDInquiryFormProps, _ as FFIDInquiryFormSubmitData, $ as FFIDInquiryFormSubmitResult, a1 as FFIDLoginButton, am as FFIDLoginButtonProps, a4 as FFIDOrganizationSwitcher, an as FFIDOrganizationSwitcherClassNames, ao as FFIDOrganizationSwitcherProps, a9 as FFIDSubscriptionBadge, ap as FFIDSubscriptionBadgeClassNames, aq as FFIDSubscriptionBadgeProps, ab as FFIDUserMenu, ar as FFIDUserMenuClassNames, as as FFIDUserMenuProps } from '../index-DqsWKU16.cjs';
2
2
  import 'react/jsx-runtime';
3
3
  import 'react';
@@ -1,3 +1,3 @@
1
- export { M as FFIDAnnouncementBadge, al as FFIDAnnouncementBadgeClassNames, am as FFIDAnnouncementBadgeProps, N as FFIDAnnouncementList, an as FFIDAnnouncementListClassNames, ao as FFIDAnnouncementListProps, V as FFIDInquiryForm, W as FFIDInquiryFormCategoryItem, X as FFIDInquiryFormClassNames, Y as FFIDInquiryFormLegalLayout, Z as FFIDInquiryFormOrganization, _ as FFIDInquiryFormPlaceholderContext, $ as FFIDInquiryFormPrefill, a0 as FFIDInquiryFormProps, a1 as FFIDInquiryFormSubmitData, a2 as FFIDInquiryFormSubmitResult, a4 as FFIDLoginButton, ap as FFIDLoginButtonProps, a7 as FFIDOrganizationSwitcher, aq as FFIDOrganizationSwitcherClassNames, ar as FFIDOrganizationSwitcherProps, ac as FFIDSubscriptionBadge, as as FFIDSubscriptionBadgeClassNames, at as FFIDSubscriptionBadgeProps, ae as FFIDUserMenu, au as FFIDUserMenuClassNames, av as FFIDUserMenuProps } from '../index-DSvX4q8E.js';
1
+ export { I as FFIDAnnouncementBadge, ai as FFIDAnnouncementBadgeClassNames, aj as FFIDAnnouncementBadgeProps, J as FFIDAnnouncementList, ak as FFIDAnnouncementListClassNames, al as FFIDAnnouncementListProps, S as FFIDInquiryForm, T as FFIDInquiryFormCategoryItem, U as FFIDInquiryFormClassNames, V as FFIDInquiryFormLegalLayout, W as FFIDInquiryFormOrganization, X as FFIDInquiryFormPlaceholderContext, Y as FFIDInquiryFormPrefill, Z as FFIDInquiryFormProps, _ as FFIDInquiryFormSubmitData, $ as FFIDInquiryFormSubmitResult, a1 as FFIDLoginButton, am as FFIDLoginButtonProps, a4 as FFIDOrganizationSwitcher, an as FFIDOrganizationSwitcherClassNames, ao as FFIDOrganizationSwitcherProps, a9 as FFIDSubscriptionBadge, ap as FFIDSubscriptionBadgeClassNames, aq as FFIDSubscriptionBadgeProps, ab as FFIDUserMenu, ar as FFIDUserMenuClassNames, as as FFIDUserMenuProps } from '../index-DqsWKU16.js';
2
2
  import 'react/jsx-runtime';
3
3
  import 'react';
@@ -1 +1 @@
1
- export { FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDSubscriptionBadge, FFIDUserMenu } from '../chunk-OJ3OJTIE.js';
1
+ export { FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDSubscriptionBadge, FFIDUserMenu } from '../chunk-KB2JG64Z.js';
@@ -1,4 +1,4 @@
1
- import { E as EffectiveSubscriptionStatus } from './types-BYdtyO_2.cjs';
1
+ import { E as EffectiveSubscriptionStatus } from './types-BeVl-z12.js';
2
2
 
3
3
  /**
4
4
  * Inquiry types exposed by the FFID SDK.
@@ -270,6 +270,52 @@ interface FFIDServiceAccessDecision {
270
270
  error?: FFIDServiceAccessError;
271
271
  }
272
272
 
273
+ /**
274
+ * Billing checkout / portal session types.
275
+ *
276
+ * types/index.ts のサイズ上限対応で切り出し(中身は逐語移設、#3787 Phase A)。
277
+ */
278
+ /**
279
+ * Checkout session response from billing checkout endpoint
280
+ */
281
+ interface FFIDCheckoutSessionResponse {
282
+ /** Stripe Checkout session ID */
283
+ sessionId: string;
284
+ /** Stripe Checkout session URL (null if session creation had issues) */
285
+ url: string | null;
286
+ }
287
+ /**
288
+ * Portal session response from billing portal endpoint
289
+ */
290
+ interface FFIDPortalSessionResponse {
291
+ /** Stripe Billing Portal URL */
292
+ url: string;
293
+ }
294
+ /**
295
+ * Parameters for creating a checkout session
296
+ */
297
+ interface FFIDCreateCheckoutParams {
298
+ /** Organization ID (UUID) */
299
+ organizationId: string;
300
+ /** Subscription ID (UUID) */
301
+ subscriptionId: string;
302
+ /** URL to redirect after successful checkout */
303
+ successUrl: string;
304
+ /** URL to redirect after cancelled checkout */
305
+ cancelUrl: string;
306
+ /** Optional plan ID for upgrade or resubscription */
307
+ planId?: string;
308
+ }
309
+ /**
310
+ * Parameters for creating a billing portal session
311
+ */
312
+ interface FFIDCreatePortalParams {
313
+ /** Organization ID (UUID) */
314
+ organizationId: string;
315
+ /** URL to redirect when user exits the portal */
316
+ returnUrl: string;
317
+ }
318
+
273
319
  /** Billing interval for subscriptions */
274
320
  type FFIDBillingInterval = 'monthly' | 'yearly';
275
321
  /**
@@ -637,6 +683,122 @@ interface FFIDRemoveMemberResponse {
637
683
  message: string;
638
684
  }
639
685
 
686
+ /**
687
+ * Contract resource types (#3787 Phase A)
688
+ *
689
+ * シート割り当て・請求書・支払い再試行の ext API 型。
690
+ * サーバー側の sanitize 済みレスポンス(Stripe 内部 ID を含まない)と対になる。
691
+ */
692
+ /** シート割り当て 1 件(ユーザー情報付き、一覧用) */
693
+ interface FFIDSeatAssignmentWithUser {
694
+ userId: string;
695
+ email: string;
696
+ name: string | null;
697
+ role: string;
698
+ assignedAt: string;
699
+ assignedBy: string | null;
700
+ }
701
+ /** シート割り当てレコード(割り当て直後のレスポンス用) */
702
+ interface FFIDSeatAssignmentRecord {
703
+ id: string;
704
+ subscriptionId: string;
705
+ userId: string;
706
+ assignedBy: string | null;
707
+ assignedAt: string;
708
+ createdAt: string;
709
+ updatedAt: string;
710
+ }
711
+ /** GET /api/v1/subscriptions/ext/{id}/seats/assignments のレスポンス */
712
+ interface FFIDListSeatAssignmentsResponse {
713
+ assignments: FFIDSeatAssignmentWithUser[];
714
+ totalSeats: number;
715
+ assignedSeats: number;
716
+ availableSeats: number;
717
+ }
718
+ /** listSeatAssignments のパラメータ */
719
+ interface FFIDListSeatAssignmentsParams {
720
+ subscriptionId: string;
721
+ }
722
+ /** assignSeats のパラメータ */
723
+ interface FFIDAssignSeatsParams {
724
+ subscriptionId: string;
725
+ userIds: string[];
726
+ }
727
+ /** POST /api/v1/subscriptions/ext/{id}/seats/assignments のレスポンス */
728
+ interface FFIDAssignSeatsResponse {
729
+ message: string;
730
+ assignments: FFIDSeatAssignmentRecord[];
731
+ }
732
+ /** unassignSeat のパラメータ */
733
+ interface FFIDUnassignSeatParams {
734
+ subscriptionId: string;
735
+ userId: string;
736
+ }
737
+ /** DELETE /api/v1/subscriptions/ext/{id}/seats/assignments/{userId} のレスポンス */
738
+ interface FFIDUnassignSeatResponse {
739
+ message: string;
740
+ }
741
+ /** 請求書サマリー(一覧用) */
742
+ interface FFIDInvoiceSummary {
743
+ id: string;
744
+ organizationId: string;
745
+ subscriptionId: string | null;
746
+ invoiceNumber: string;
747
+ description: string | null;
748
+ subtotal: number;
749
+ taxRate: number;
750
+ taxAmount: number;
751
+ totalAmount: number;
752
+ currency: string;
753
+ status: string;
754
+ issuedAt: string | null;
755
+ dueDate: string | null;
756
+ paidAt: string | null;
757
+ pdfUrl: string | null;
758
+ createdAt: string;
759
+ }
760
+ /** 請求書詳細(請求先情報・備考を含む) */
761
+ interface FFIDInvoiceDetail extends FFIDInvoiceSummary {
762
+ billingName: string | null;
763
+ billingEmail: string | null;
764
+ notes: string | null;
765
+ }
766
+ /** listInvoices のパラメータ */
767
+ interface FFIDListInvoicesParams {
768
+ organizationId: string;
769
+ }
770
+ /** GET /api/v1/billing/ext/invoices のレスポンス */
771
+ interface FFIDListInvoicesResponse {
772
+ invoices: FFIDInvoiceSummary[];
773
+ count: number;
774
+ }
775
+ /** getInvoice のパラメータ */
776
+ interface FFIDGetInvoiceParams {
777
+ invoiceId: string;
778
+ }
779
+ /** GET /api/v1/billing/ext/invoices/{id} のレスポンス */
780
+ interface FFIDGetInvoiceResponse {
781
+ invoice: FFIDInvoiceDetail;
782
+ }
783
+ /** retryPayment のパラメータ */
784
+ interface FFIDRetryPaymentParams {
785
+ organizationId: string;
786
+ }
787
+ /** 再試行に失敗した契約の詳細 */
788
+ interface FFIDRetryPaymentFailure {
789
+ subscriptionId: string;
790
+ reason: string;
791
+ stripeCode?: string;
792
+ }
793
+ /** POST /api/v1/billing/ext/retry-payment のレスポンス */
794
+ interface FFIDRetryPaymentSummary {
795
+ totalAttempted: number;
796
+ succeeded: number;
797
+ failed: number;
798
+ noOpenInvoice: number;
799
+ failures: FFIDRetryPaymentFailure[];
800
+ }
801
+
640
802
  /**
641
803
  * FFID SDK Type Definitions
642
804
  *
@@ -962,47 +1124,6 @@ type FFIDApiResponse<T> = {
962
1124
  error: FFIDError;
963
1125
  };
964
1126
 
965
- /**
966
- * Checkout session response from billing checkout endpoint
967
- */
968
- interface FFIDCheckoutSessionResponse {
969
- /** Stripe Checkout session ID */
970
- sessionId: string;
971
- /** Stripe Checkout session URL (null if session creation had issues) */
972
- url: string | null;
973
- }
974
- /**
975
- * Portal session response from billing portal endpoint
976
- */
977
- interface FFIDPortalSessionResponse {
978
- /** Stripe Billing Portal URL */
979
- url: string;
980
- }
981
- /**
982
- * Parameters for creating a checkout session
983
- */
984
- interface FFIDCreateCheckoutParams {
985
- /** Organization ID (UUID) */
986
- organizationId: string;
987
- /** Subscription ID (UUID) */
988
- subscriptionId: string;
989
- /** URL to redirect after successful checkout */
990
- successUrl: string;
991
- /** URL to redirect after cancelled checkout */
992
- cancelUrl: string;
993
- /** Optional plan ID for upgrade or resubscription */
994
- planId?: string;
995
- }
996
- /**
997
- * Parameters for creating a billing portal session
998
- */
999
- interface FFIDCreatePortalParams {
1000
- /** Organization ID (UUID) */
1001
- organizationId: string;
1002
- /** URL to redirect when user exits the portal */
1003
- returnUrl: string;
1004
- }
1005
-
1006
1127
  /**
1007
1128
  * User profile for the authenticated user (returned by `getProfile` / `updateProfile`).
1008
1129
  *
@@ -1341,6 +1462,12 @@ declare function createFFIDClient(config: FFIDConfig): {
1341
1462
  getAnalyticsConfig: (serviceCode: string, options?: FFIDProfileCallOptions) => Promise<FFIDApiResponse<FFIDAnalyticsConfig>>;
1342
1463
  createCheckoutSession: (params: FFIDCreateCheckoutParams) => Promise<FFIDApiResponse<FFIDCheckoutSessionResponse>>;
1343
1464
  createPortalSession: (params: FFIDCreatePortalParams) => Promise<FFIDApiResponse<FFIDPortalSessionResponse>>;
1465
+ listInvoices: (params: FFIDListInvoicesParams) => Promise<FFIDApiResponse<FFIDListInvoicesResponse>>;
1466
+ getInvoice: (params: FFIDGetInvoiceParams) => Promise<FFIDApiResponse<FFIDGetInvoiceResponse>>;
1467
+ retryPayment: (params: FFIDRetryPaymentParams) => Promise<FFIDApiResponse<FFIDRetryPaymentSummary>>;
1468
+ listSeatAssignments: (params: FFIDListSeatAssignmentsParams) => Promise<FFIDApiResponse<FFIDListSeatAssignmentsResponse>>;
1469
+ assignSeats: (params: FFIDAssignSeatsParams) => Promise<FFIDApiResponse<FFIDAssignSeatsResponse>>;
1470
+ unassignSeat: (params: FFIDUnassignSeatParams) => Promise<FFIDApiResponse<FFIDUnassignSeatResponse>>;
1344
1471
  listPlans: () => Promise<FFIDApiResponse<FFIDListPlansResponse>>;
1345
1472
  getSubscription: (subscriptionId: string) => Promise<FFIDApiResponse<FFIDSubscriptionDetail>>;
1346
1473
  subscribe: (params: FFIDSubscribeParams) => Promise<FFIDApiResponse<FFIDSubscribeResponse>>;