@feelflow/ffid-sdk 5.9.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.
Files changed (33) hide show
  1. package/dist/{FFIDCookieLink-CE01gYc4.d.cts → FFIDCookieLink-D1WwE_ZO.d.cts} +5 -0
  2. package/dist/{FFIDCookieLink-CE01gYc4.d.ts → FFIDCookieLink-D1WwE_ZO.d.ts} +5 -0
  3. package/dist/{chunk-A6MOPB7D.cjs → chunk-AOJDV3UO.cjs} +88 -3
  4. package/dist/{chunk-KENJXMSG.js → chunk-KB2JG64Z.js} +88 -4
  5. package/dist/{chunk-KJ7FUNA6.js → chunk-M4N2PUX6.js} +64 -32
  6. package/dist/{chunk-Q5SZVLNB.cjs → chunk-R5WSZMUL.cjs} +64 -32
  7. package/dist/components/index.cjs +8 -8
  8. package/dist/components/index.d.cts +1 -1
  9. package/dist/components/index.d.ts +1 -1
  10. package/dist/components/index.js +1 -1
  11. package/dist/consent/index.cjs +64 -64
  12. package/dist/consent/index.d.cts +2 -2
  13. package/dist/consent/index.d.ts +2 -2
  14. package/dist/consent/index.js +1 -1
  15. package/dist/{ffid-client-gboJROw0.d.ts → ffid-client-5IprSUVR.d.ts} +169 -42
  16. package/dist/{ffid-client-DRjzfAaS.d.cts → ffid-client-Dx4oc4Cw.d.cts} +169 -42
  17. package/dist/{index-DSvX4q8E.d.cts → index-DqsWKU16.d.cts} +11 -43
  18. package/dist/{index-DSvX4q8E.d.ts → index-DqsWKU16.d.ts} +11 -43
  19. package/dist/index.cjs +61 -57
  20. package/dist/index.d.cts +172 -4
  21. package/dist/index.d.ts +172 -4
  22. package/dist/index.js +3 -3
  23. package/dist/server/index.cjs +78 -3
  24. package/dist/server/index.d.cts +3 -3
  25. package/dist/server/index.d.ts +3 -3
  26. package/dist/server/index.js +78 -3
  27. package/dist/server/test/index.d.cts +2 -2
  28. package/dist/server/test/index.d.ts +2 -2
  29. package/dist/{types-BYdtyO_2.d.cts → types-BeVl-z12.d.cts} +10 -1
  30. package/dist/{types-BYdtyO_2.d.ts → types-BeVl-z12.d.ts} +10 -1
  31. package/dist/webhooks/index.d.cts +1 -1
  32. package/dist/webhooks/index.d.ts +1 -1
  33. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { F as FFIDSubscriptionStatus, a as FFIDConfig, b as FFIDApiResponse, c as FFIDSessionResponse, d as FFIDRedirectResult, e as FFIDError, f as FFIDSubscriptionCheckResponse, g as FFIDCheckServiceAccessParams, h as FFIDServiceAccessDecision, i as FFIDProfileCallOptions, j as FFIDUserProfile, k as FFIDUpdateUserProfileRequest, l as FFIDAnalyticsConfig, m as FFIDCreateCheckoutParams, n as FFIDCheckoutSessionResponse, o as FFIDCreatePortalParams, p as FFIDPortalSessionResponse, q as FFIDVerifyAccessTokenOptions, r as FFIDOAuthUserInfo, s as FFIDInquiryCreateParams, t as FFIDInquiryCreateResponse, u as FFIDAuthMode, v as FFIDLogger, w as FFIDCacheAdapter, x as FFIDUser, y as FFIDOrganization, z as FFIDSubscription, A as FFIDSubscriptionContextValue, E as EffectiveSubscriptionStatus, B as FFIDOAuthUserInfoSubscription, C as FFIDAnnouncementsClientConfig, L as ListAnnouncementsOptions, D as FFIDAnnouncementsApiResponse, G as AnnouncementListResponse, H as FFIDAnnouncementsLogger } from './index-DSvX4q8E.js';
2
- export { I as Announcement, J as AnnouncementStatus, K as AnnouncementType, M as FFIDAnnouncementBadge, N as FFIDAnnouncementList, O as FFIDAnnouncementsError, P as FFIDAnnouncementsErrorCode, Q as FFIDAnnouncementsServerResponse, R as FFIDCacheConfig, S as FFIDContextValue, T as FFIDInquiryCategory, U as FFIDInquiryCategorySite2026, 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, a3 as FFIDJwtClaims, a4 as FFIDLoginButton, a5 as FFIDOAuthTokenResponse, a6 as FFIDOAuthUserInfoMemberRole, a7 as FFIDOrganizationSwitcher, a8 as FFIDRedirectErrorCode, a9 as FFIDSeatModel, aa as FFIDServiceAccessDenialReason, ab as FFIDServiceAccessFailPolicy, ac as FFIDSubscriptionBadge, ad as FFIDTokenIntrospectionResponse, ae as FFIDUserMenu, af as FFID_INQUIRY_CATEGORIES, ag as FFID_INQUIRY_CATEGORIES_SITE_2026, ah as UseFFIDAnnouncementsOptions, ai as UseFFIDAnnouncementsReturn, aj as isFFIDInquiryCategorySite2026, ak as useFFIDAnnouncements } from './index-DSvX4q8E.js';
3
- export { A as ALL_DENIED_EXCEPT_NECESSARY, i as CONSENT_COOKIE_NAME, j as CONSENT_DISMISSAL_TIMESTAMP_KEY, l as COOKIE_VERSION, D as DEFAULT_CONSENT_ERROR_MESSAGES, o as FFIDAnalyticsProvider, p as FFIDAnalyticsProviderProps, c as FFIDConsentCategories, r as FFIDConsentCategoryCode, e as FFIDConsentCategoryMetadata, w as FFIDConsentError, x as FFIDConsentErrorCode, y as FFIDConsentMergeStrategy, B as FFIDConsentMergeWarning, E as FFIDConsentMergeWarningEvent, F as FFIDConsentResult, I as FFIDConsentSource, a as FFIDConsentState, d as FFIDConsentSyncResult, M as FFIDCookieBanner, N as FFIDCookieBannerClassNames, O as FFIDCookieBannerProps, Q as FFIDCookieLink, R as FFIDCookieLinkProps, f as FFIDCookiePolicy, T as FFIDCookieSettings, U as FFIDCookieSettingsClassNames, V as FFIDCookieSettingsProps, _ as FFID_CONSENT_ERROR_CODES, ae as UseFFIDConsentPreferencesReturn, af as UseFFIDConsentReturn, ag as clearConsentDismissalTimestamp, aj as decodeConsentCookie, al as encodeConsentCookie, an as readConsentCookie, ao as readConsentDismissalTimestamp, aq as useFFIDConsent, ar as useFFIDConsentPreferences, as as writeConsentCookie, at as writeConsentDismissalTimestamp } from './FFIDCookieLink-CE01gYc4.js';
1
+ import { F as FFIDSubscriptionStatus, a as FFIDConfig, b as FFIDApiResponse, c as FFIDSessionResponse, d as FFIDRedirectResult, e as FFIDError, f as FFIDSubscriptionCheckResponse, g as FFIDCheckServiceAccessParams, h as FFIDServiceAccessDecision, i as FFIDProfileCallOptions, j as FFIDUserProfile, k as FFIDUpdateUserProfileRequest, l as FFIDAnalyticsConfig, m as FFIDVerifyAccessTokenOptions, n as FFIDOAuthUserInfo, o as FFIDInquiryCreateParams, p as FFIDInquiryCreateResponse, q as FFIDAuthMode, r as FFIDLogger, s as FFIDCacheAdapter, t as FFIDUser, u as FFIDOrganization, v as FFIDSubscription, w as FFIDSubscriptionContextValue, E as EffectiveSubscriptionStatus, x as FFIDOAuthUserInfoSubscription, y as FFIDAnnouncementsClientConfig, L as ListAnnouncementsOptions, z as FFIDAnnouncementsApiResponse, A as AnnouncementListResponse, B as FFIDAnnouncementsLogger } from './index-DqsWKU16.js';
2
+ export { C as Announcement, D as AnnouncementStatus, G as AnnouncementType, H as EFFECTIVE_SUBSCRIPTION_STATUSES, I as FFIDAnnouncementBadge, J as FFIDAnnouncementList, K as FFIDAnnouncementsError, M as FFIDAnnouncementsErrorCode, N as FFIDAnnouncementsServerResponse, O as FFIDCacheConfig, P as FFIDContextValue, Q as FFIDInquiryCategory, R as FFIDInquiryCategorySite2026, 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, a0 as FFIDJwtClaims, a1 as FFIDLoginButton, a2 as FFIDOAuthTokenResponse, a3 as FFIDOAuthUserInfoMemberRole, a4 as FFIDOrganizationSwitcher, a5 as FFIDRedirectErrorCode, a6 as FFIDSeatModel, a7 as FFIDServiceAccessDenialReason, a8 as FFIDServiceAccessFailPolicy, a9 as FFIDSubscriptionBadge, aa as FFIDTokenIntrospectionResponse, ab as FFIDUserMenu, ac as FFID_INQUIRY_CATEGORIES, ad as FFID_INQUIRY_CATEGORIES_SITE_2026, ae as UseFFIDAnnouncementsOptions, af as UseFFIDAnnouncementsReturn, ag as isFFIDInquiryCategorySite2026, ah as useFFIDAnnouncements } from './index-DqsWKU16.js';
3
+ export { A as ALL_DENIED_EXCEPT_NECESSARY, i as CONSENT_COOKIE_NAME, j as CONSENT_DISMISSAL_TIMESTAMP_KEY, l as COOKIE_VERSION, D as DEFAULT_CONSENT_ERROR_MESSAGES, o as FFIDAnalyticsProvider, p as FFIDAnalyticsProviderProps, c as FFIDConsentCategories, r as FFIDConsentCategoryCode, e as FFIDConsentCategoryMetadata, w as FFIDConsentError, x as FFIDConsentErrorCode, y as FFIDConsentMergeStrategy, B as FFIDConsentMergeWarning, E as FFIDConsentMergeWarningEvent, F as FFIDConsentResult, I as FFIDConsentSource, a as FFIDConsentState, d as FFIDConsentSyncResult, M as FFIDCookieBanner, N as FFIDCookieBannerClassNames, O as FFIDCookieBannerProps, Q as FFIDCookieLink, R as FFIDCookieLinkProps, f as FFIDCookiePolicy, T as FFIDCookieSettings, U as FFIDCookieSettingsClassNames, V as FFIDCookieSettingsProps, _ as FFID_CONSENT_ERROR_CODES, ae as UseFFIDConsentPreferencesReturn, af as UseFFIDConsentReturn, ag as clearConsentDismissalTimestamp, aj as decodeConsentCookie, al as encodeConsentCookie, an as readConsentCookie, ao as readConsentDismissalTimestamp, aq as useFFIDConsent, ar as useFFIDConsentPreferences, as as writeConsentCookie, at as writeConsentDismissalTimestamp } from './FFIDCookieLink-D1WwE_ZO.js';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import { ReactNode, ComponentType, FC } from 'react';
6
6
  import 'zod';
@@ -122,6 +122,52 @@ declare function storeCodeVerifier(verifier: string, logger?: PKCELogger): boole
122
122
  */
123
123
  declare function retrieveCodeVerifier(logger?: PKCELogger): string | null;
124
124
 
125
+ /**
126
+ * Billing checkout / portal session types.
127
+ *
128
+ * types/index.ts のサイズ上限対応で切り出し(中身は逐語移設、#3787 Phase A)。
129
+ */
130
+ /**
131
+ * Checkout session response from billing checkout endpoint
132
+ */
133
+ interface FFIDCheckoutSessionResponse {
134
+ /** Stripe Checkout session ID */
135
+ sessionId: string;
136
+ /** Stripe Checkout session URL (null if session creation had issues) */
137
+ url: string | null;
138
+ }
139
+ /**
140
+ * Portal session response from billing portal endpoint
141
+ */
142
+ interface FFIDPortalSessionResponse {
143
+ /** Stripe Billing Portal URL */
144
+ url: string;
145
+ }
146
+ /**
147
+ * Parameters for creating a checkout session
148
+ */
149
+ interface FFIDCreateCheckoutParams {
150
+ /** Organization ID (UUID) */
151
+ organizationId: string;
152
+ /** Subscription ID (UUID) */
153
+ subscriptionId: string;
154
+ /** URL to redirect after successful checkout */
155
+ successUrl: string;
156
+ /** URL to redirect after cancelled checkout */
157
+ cancelUrl: string;
158
+ /** Optional plan ID for upgrade or resubscription */
159
+ planId?: string;
160
+ }
161
+ /**
162
+ * Parameters for creating a billing portal session
163
+ */
164
+ interface FFIDCreatePortalParams {
165
+ /** Organization ID (UUID) */
166
+ organizationId: string;
167
+ /** URL to redirect when user exits the portal */
168
+ returnUrl: string;
169
+ }
170
+
125
171
  /** Billing interval for subscriptions */
126
172
  type FFIDBillingInterval = 'monthly' | 'yearly';
127
173
  /**
@@ -489,6 +535,122 @@ interface FFIDRemoveMemberResponse {
489
535
  message: string;
490
536
  }
491
537
 
538
+ /**
539
+ * Contract resource types (#3787 Phase A)
540
+ *
541
+ * シート割り当て・請求書・支払い再試行の ext API 型。
542
+ * サーバー側の sanitize 済みレスポンス(Stripe 内部 ID を含まない)と対になる。
543
+ */
544
+ /** シート割り当て 1 件(ユーザー情報付き、一覧用) */
545
+ interface FFIDSeatAssignmentWithUser {
546
+ userId: string;
547
+ email: string;
548
+ name: string | null;
549
+ role: string;
550
+ assignedAt: string;
551
+ assignedBy: string | null;
552
+ }
553
+ /** シート割り当てレコード(割り当て直後のレスポンス用) */
554
+ interface FFIDSeatAssignmentRecord {
555
+ id: string;
556
+ subscriptionId: string;
557
+ userId: string;
558
+ assignedBy: string | null;
559
+ assignedAt: string;
560
+ createdAt: string;
561
+ updatedAt: string;
562
+ }
563
+ /** GET /api/v1/subscriptions/ext/{id}/seats/assignments のレスポンス */
564
+ interface FFIDListSeatAssignmentsResponse {
565
+ assignments: FFIDSeatAssignmentWithUser[];
566
+ totalSeats: number;
567
+ assignedSeats: number;
568
+ availableSeats: number;
569
+ }
570
+ /** listSeatAssignments のパラメータ */
571
+ interface FFIDListSeatAssignmentsParams {
572
+ subscriptionId: string;
573
+ }
574
+ /** assignSeats のパラメータ */
575
+ interface FFIDAssignSeatsParams {
576
+ subscriptionId: string;
577
+ userIds: string[];
578
+ }
579
+ /** POST /api/v1/subscriptions/ext/{id}/seats/assignments のレスポンス */
580
+ interface FFIDAssignSeatsResponse {
581
+ message: string;
582
+ assignments: FFIDSeatAssignmentRecord[];
583
+ }
584
+ /** unassignSeat のパラメータ */
585
+ interface FFIDUnassignSeatParams {
586
+ subscriptionId: string;
587
+ userId: string;
588
+ }
589
+ /** DELETE /api/v1/subscriptions/ext/{id}/seats/assignments/{userId} のレスポンス */
590
+ interface FFIDUnassignSeatResponse {
591
+ message: string;
592
+ }
593
+ /** 請求書サマリー(一覧用) */
594
+ interface FFIDInvoiceSummary {
595
+ id: string;
596
+ organizationId: string;
597
+ subscriptionId: string | null;
598
+ invoiceNumber: string;
599
+ description: string | null;
600
+ subtotal: number;
601
+ taxRate: number;
602
+ taxAmount: number;
603
+ totalAmount: number;
604
+ currency: string;
605
+ status: string;
606
+ issuedAt: string | null;
607
+ dueDate: string | null;
608
+ paidAt: string | null;
609
+ pdfUrl: string | null;
610
+ createdAt: string;
611
+ }
612
+ /** 請求書詳細(請求先情報・備考を含む) */
613
+ interface FFIDInvoiceDetail extends FFIDInvoiceSummary {
614
+ billingName: string | null;
615
+ billingEmail: string | null;
616
+ notes: string | null;
617
+ }
618
+ /** listInvoices のパラメータ */
619
+ interface FFIDListInvoicesParams {
620
+ organizationId: string;
621
+ }
622
+ /** GET /api/v1/billing/ext/invoices のレスポンス */
623
+ interface FFIDListInvoicesResponse {
624
+ invoices: FFIDInvoiceSummary[];
625
+ count: number;
626
+ }
627
+ /** getInvoice のパラメータ */
628
+ interface FFIDGetInvoiceParams {
629
+ invoiceId: string;
630
+ }
631
+ /** GET /api/v1/billing/ext/invoices/{id} のレスポンス */
632
+ interface FFIDGetInvoiceResponse {
633
+ invoice: FFIDInvoiceDetail;
634
+ }
635
+ /** retryPayment のパラメータ */
636
+ interface FFIDRetryPaymentParams {
637
+ organizationId: string;
638
+ }
639
+ /** 再試行に失敗した契約の詳細 */
640
+ interface FFIDRetryPaymentFailure {
641
+ subscriptionId: string;
642
+ reason: string;
643
+ stripeCode?: string;
644
+ }
645
+ /** POST /api/v1/billing/ext/retry-payment のレスポンス */
646
+ interface FFIDRetryPaymentSummary {
647
+ totalAttempted: number;
648
+ succeeded: number;
649
+ failed: number;
650
+ noOpenInvoice: number;
651
+ failures: FFIDRetryPaymentFailure[];
652
+ }
653
+
492
654
  /** OTP / magic link methods - sendOtp / verifyOtp */
493
655
 
494
656
  /** Response from sendOtp */
@@ -622,6 +784,12 @@ declare function createFFIDClient(config: FFIDConfig): {
622
784
  getAnalyticsConfig: (serviceCode: string, options?: FFIDProfileCallOptions) => Promise<FFIDApiResponse<FFIDAnalyticsConfig>>;
623
785
  createCheckoutSession: (params: FFIDCreateCheckoutParams) => Promise<FFIDApiResponse<FFIDCheckoutSessionResponse>>;
624
786
  createPortalSession: (params: FFIDCreatePortalParams) => Promise<FFIDApiResponse<FFIDPortalSessionResponse>>;
787
+ listInvoices: (params: FFIDListInvoicesParams) => Promise<FFIDApiResponse<FFIDListInvoicesResponse>>;
788
+ getInvoice: (params: FFIDGetInvoiceParams) => Promise<FFIDApiResponse<FFIDGetInvoiceResponse>>;
789
+ retryPayment: (params: FFIDRetryPaymentParams) => Promise<FFIDApiResponse<FFIDRetryPaymentSummary>>;
790
+ listSeatAssignments: (params: FFIDListSeatAssignmentsParams) => Promise<FFIDApiResponse<FFIDListSeatAssignmentsResponse>>;
791
+ assignSeats: (params: FFIDAssignSeatsParams) => Promise<FFIDApiResponse<FFIDAssignSeatsResponse>>;
792
+ unassignSeat: (params: FFIDUnassignSeatParams) => Promise<FFIDApiResponse<FFIDUnassignSeatResponse>>;
625
793
  listPlans: () => Promise<FFIDApiResponse<FFIDListPlansResponse>>;
626
794
  getSubscription: (subscriptionId: string) => Promise<FFIDApiResponse<FFIDSubscriptionDetail>>;
627
795
  subscribe: (params: FFIDSubscribeParams) => Promise<FFIDApiResponse<FFIDSubscribeResponse>>;
@@ -1397,4 +1565,4 @@ declare function createInquiryMethods(deps: InquiryMethodsDeps): {
1397
1565
  };
1398
1566
  type FFIDInquiryClient = ReturnType<typeof createInquiryMethods>;
1399
1567
 
1400
- export { ACCESS_GRANTING_EFFECTIVE_STATUSES, AnnouncementListResponse, BLOCKING_EFFECTIVE_STATUSES, type ComputeEffectiveStatusInput, type ContractWizardFlowType, type ContractWizardResubscribeOptions, type ContractWizardSubscribeOptions, type ContractWizardSubscriptionOptions, DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, EffectiveSubscriptionStatus, type FFIDAddMemberParams, type FFIDAddMemberRequest, type FFIDAddMemberResponse, FFIDAnnouncementsApiResponse, type FFIDAnnouncementsClient, FFIDAnnouncementsClientConfig, FFIDAnnouncementsLogger, FFIDApiResponse, type FFIDAssignableMemberRole, type FFIDBillingInterval, FFIDCacheAdapter, type FFIDCancelPendingDowngradeResponse, type FFIDCancelSubscriptionParams, type FFIDCancelSubscriptionResponse, type FFIDChangePlanParams, type FFIDChangePlanResponse, FFIDCheckServiceAccessParams, FFIDCheckoutSessionResponse, type FFIDClient, FFIDConfig, FFIDCreateCheckoutParams, FFIDCreatePortalParams, FFIDError, type FFIDInquiryClient, FFIDInquiryCreateParams, FFIDInquiryCreateResponse, type FFIDListMembersResponse, type FFIDListPlansResponse, FFIDLogger, type FFIDMemberRole, type FFIDMemberStatus, type FFIDNewsletterBodySource, type FFIDNewsletterCampaignStatus, type FFIDNewsletterClient, type FFIDNewsletterConfirmParams, type FFIDNewsletterConfirmResponse, type FFIDNewsletterDispatchParams, type FFIDNewsletterDispatchResponse, type FFIDNewsletterSegment, type FFIDNewsletterSubscribeParams, type FFIDNewsletterSubscribeResponse, type FFIDNewsletterType, type FFIDNewsletterUnsubscribeParams, type FFIDNewsletterUnsubscribeResponse, FFIDOAuthUserInfo, FFIDOAuthUserInfoSubscription, FFIDOrganization, type FFIDOrganizationMember, type FFIDOtpSendResponse, type FFIDOtpVerifyResponse, type FFIDPasswordResetConfirmResponse, type FFIDPasswordResetResponse, type FFIDPasswordResetVerifyResponse, type FFIDPlanChangeLineItem, type FFIDPlanChangePreview, type FFIDPlanChangePreviewResponse, type FFIDPlanInfo, FFIDPortalSessionResponse, type FFIDPreviewPlanChangeParams, type FFIDPreviewSeatChangeParams, FFIDProfileCallOptions, FFIDProvider, type FFIDProviderProps, FFIDRedirectResult, type FFIDRemoveMemberResponse, type FFIDResetSessionResponse, FFIDSDKError, type FFIDSeatChangeLineItem, type FFIDSeatChangePreview, type FFIDSeatChangePreviewResponse, FFIDServiceAccessDecision, type FFIDServiceInfo, FFIDSessionResponse, type FFIDSubscribeParams, type FFIDSubscribeResponse, FFIDSubscription, FFIDSubscriptionCheckResponse, FFIDSubscriptionContextValue, type FFIDSubscriptionDetail, FFIDSubscriptionStatus, type FFIDSubscriptionSummary, type FFIDSupportedCurrency, type FFIDUpdateMemberRoleResponse, FFIDUpdateUserProfileRequest, FFIDUser, FFIDUserProfile, FFIDVerifyAccessTokenOptions, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_NEWSLETTER_DISPATCH_MAX_RECIPIENTS, FFID_NEWSLETTER_TYPES, type KVNamespaceLike, ListAnnouncementsOptions, type NormalizeRedirectUriResult, type RedirectToAuthorizeOptions, type TokenData, type TokenStore, type UseFFIDReturn, type UseRequireActiveSubscriptionOptions, type UseRequireActiveSubscriptionReturn, type WithFFIDAuthOptions, type WithSubscriptionOptions, computeEffectiveStatusFromSession, createFFIDAnnouncementsClient, createFFIDClient, createKVCacheAdapter, createMemoryCacheAdapter, createTokenStore, generateCodeChallenge, generateCodeVerifier, hasAccessFromUserinfo, isBlockedFromUserinfo, normalizeRedirectUri, retrieveCodeVerifier, storeCodeVerifier, useFFID, useRequireActiveSubscription, useSubscription, withFFIDAuth, withSubscription };
1568
+ export { ACCESS_GRANTING_EFFECTIVE_STATUSES, AnnouncementListResponse, BLOCKING_EFFECTIVE_STATUSES, type ComputeEffectiveStatusInput, type ContractWizardFlowType, type ContractWizardResubscribeOptions, type ContractWizardSubscribeOptions, type ContractWizardSubscriptionOptions, DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, EffectiveSubscriptionStatus, type FFIDAddMemberParams, type FFIDAddMemberRequest, type FFIDAddMemberResponse, FFIDAnnouncementsApiResponse, type FFIDAnnouncementsClient, FFIDAnnouncementsClientConfig, FFIDAnnouncementsLogger, FFIDApiResponse, type FFIDAssignableMemberRole, type FFIDBillingInterval, FFIDCacheAdapter, type FFIDCancelPendingDowngradeResponse, type FFIDCancelSubscriptionParams, type FFIDCancelSubscriptionResponse, type FFIDChangePlanParams, type FFIDChangePlanResponse, FFIDCheckServiceAccessParams, type FFIDCheckoutSessionResponse, type FFIDClient, FFIDConfig, type FFIDCreateCheckoutParams, type FFIDCreatePortalParams, FFIDError, type FFIDInquiryClient, FFIDInquiryCreateParams, FFIDInquiryCreateResponse, type FFIDListMembersResponse, type FFIDListPlansResponse, FFIDLogger, type FFIDMemberRole, type FFIDMemberStatus, type FFIDNewsletterBodySource, type FFIDNewsletterCampaignStatus, type FFIDNewsletterClient, type FFIDNewsletterConfirmParams, type FFIDNewsletterConfirmResponse, type FFIDNewsletterDispatchParams, type FFIDNewsletterDispatchResponse, type FFIDNewsletterSegment, type FFIDNewsletterSubscribeParams, type FFIDNewsletterSubscribeResponse, type FFIDNewsletterType, type FFIDNewsletterUnsubscribeParams, type FFIDNewsletterUnsubscribeResponse, FFIDOAuthUserInfo, FFIDOAuthUserInfoSubscription, FFIDOrganization, type FFIDOrganizationMember, type FFIDOtpSendResponse, type FFIDOtpVerifyResponse, type FFIDPasswordResetConfirmResponse, type FFIDPasswordResetResponse, type FFIDPasswordResetVerifyResponse, type FFIDPlanChangeLineItem, type FFIDPlanChangePreview, type FFIDPlanChangePreviewResponse, type FFIDPlanInfo, type FFIDPortalSessionResponse, type FFIDPreviewPlanChangeParams, type FFIDPreviewSeatChangeParams, FFIDProfileCallOptions, FFIDProvider, type FFIDProviderProps, FFIDRedirectResult, type FFIDRemoveMemberResponse, type FFIDResetSessionResponse, FFIDSDKError, type FFIDSeatChangeLineItem, type FFIDSeatChangePreview, type FFIDSeatChangePreviewResponse, FFIDServiceAccessDecision, type FFIDServiceInfo, FFIDSessionResponse, type FFIDSubscribeParams, type FFIDSubscribeResponse, FFIDSubscription, FFIDSubscriptionCheckResponse, FFIDSubscriptionContextValue, type FFIDSubscriptionDetail, FFIDSubscriptionStatus, type FFIDSubscriptionSummary, type FFIDSupportedCurrency, type FFIDUpdateMemberRoleResponse, FFIDUpdateUserProfileRequest, FFIDUser, FFIDUserProfile, FFIDVerifyAccessTokenOptions, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_NEWSLETTER_DISPATCH_MAX_RECIPIENTS, FFID_NEWSLETTER_TYPES, type KVNamespaceLike, ListAnnouncementsOptions, type NormalizeRedirectUriResult, type RedirectToAuthorizeOptions, type TokenData, type TokenStore, type UseFFIDReturn, type UseRequireActiveSubscriptionOptions, type UseRequireActiveSubscriptionReturn, type WithFFIDAuthOptions, type WithSubscriptionOptions, computeEffectiveStatusFromSession, createFFIDAnnouncementsClient, createFFIDClient, createKVCacheAdapter, createMemoryCacheAdapter, createTokenStore, generateCodeChallenge, generateCodeVerifier, hasAccessFromUserinfo, isBlockedFromUserinfo, normalizeRedirectUri, retrieveCodeVerifier, storeCodeVerifier, useFFID, useRequireActiveSubscription, useSubscription, withFFIDAuth, withSubscription };
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { useFFIDContext, useSubscription } from './chunk-KENJXMSG.js';
2
- 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, useSubscription, withSubscription } from './chunk-KENJXMSG.js';
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-KJ7FUNA6.js';
1
+ import { useFFIDContext, useSubscription } from './chunk-KB2JG64Z.js';
2
+ 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, useSubscription, withSubscription } from './chunk-KB2JG64Z.js';
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-M4N2PUX6.js';
4
4
  import { useEffect, useRef } from 'react';
5
5
  import { jsx, Fragment } from 'react/jsx-runtime';
6
6
 
@@ -431,6 +431,8 @@ function createVerifyAccessToken(deps) {
431
431
  // src/client/billing-methods.ts
432
432
  var BILLING_CHECKOUT_ENDPOINT = "/api/v1/billing/checkout";
433
433
  var BILLING_PORTAL_ENDPOINT = "/api/v1/billing/portal";
434
+ var EXT_INVOICES_ENDPOINT = "/api/v1/billing/ext/invoices";
435
+ var EXT_RETRY_PAYMENT_ENDPOINT = "/api/v1/billing/ext/retry-payment";
434
436
  function createBillingMethods(deps) {
435
437
  const { fetchWithAuth, createError } = deps;
436
438
  async function createCheckoutSession(params) {
@@ -472,7 +474,31 @@ function createBillingMethods(deps) {
472
474
  `${BILLING_PORTAL_ENDPOINT}?${query.toString()}`
473
475
  );
474
476
  }
475
- return { createCheckoutSession, createPortalSession };
477
+ async function listInvoices(params) {
478
+ if (!params.organizationId) {
479
+ return { error: createError("VALIDATION_ERROR", "organizationId \u306F\u5FC5\u9808\u3067\u3059") };
480
+ }
481
+ const query = new URLSearchParams({ organizationId: params.organizationId });
482
+ return fetchWithAuth(`${EXT_INVOICES_ENDPOINT}?${query.toString()}`);
483
+ }
484
+ async function getInvoice(params) {
485
+ if (!params.invoiceId) {
486
+ return { error: createError("VALIDATION_ERROR", "invoiceId \u306F\u5FC5\u9808\u3067\u3059") };
487
+ }
488
+ return fetchWithAuth(
489
+ `${EXT_INVOICES_ENDPOINT}/${encodeURIComponent(params.invoiceId)}`
490
+ );
491
+ }
492
+ async function retryPayment(params) {
493
+ if (!params.organizationId) {
494
+ return { error: createError("VALIDATION_ERROR", "organizationId \u306F\u5FC5\u9808\u3067\u3059") };
495
+ }
496
+ return fetchWithAuth(EXT_RETRY_PAYMENT_ENDPOINT, {
497
+ method: "POST",
498
+ body: JSON.stringify({ organizationId: params.organizationId })
499
+ });
500
+ }
501
+ return { createCheckoutSession, createPortalSession, listInvoices, getInvoice, retryPayment };
476
502
  }
477
503
 
478
504
  // src/client/subscription-methods.ts
@@ -814,6 +840,45 @@ function createMembersMethods(deps) {
814
840
  return { listMembers, addMember, updateMemberRole, removeMember };
815
841
  }
816
842
 
843
+ // src/client/seat-methods.ts
844
+ function seatsEndpoint(subscriptionId) {
845
+ return `/api/v1/subscriptions/ext/${encodeURIComponent(subscriptionId)}/seats/assignments`;
846
+ }
847
+ function createSeatMethods(deps) {
848
+ const { fetchWithAuth, createError } = deps;
849
+ async function listSeatAssignments(params) {
850
+ if (!params.subscriptionId) {
851
+ return { error: createError("VALIDATION_ERROR", "subscriptionId \u306F\u5FC5\u9808\u3067\u3059") };
852
+ }
853
+ return fetchWithAuth(seatsEndpoint(params.subscriptionId));
854
+ }
855
+ async function assignSeats(params) {
856
+ if (!params.subscriptionId) {
857
+ return { error: createError("VALIDATION_ERROR", "subscriptionId \u306F\u5FC5\u9808\u3067\u3059") };
858
+ }
859
+ if (!Array.isArray(params.userIds) || params.userIds.length === 0) {
860
+ return { error: createError("VALIDATION_ERROR", "userIds \u306F 1 \u4EF6\u4EE5\u4E0A\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044") };
861
+ }
862
+ return fetchWithAuth(seatsEndpoint(params.subscriptionId), {
863
+ method: "POST",
864
+ body: JSON.stringify({ userIds: params.userIds })
865
+ });
866
+ }
867
+ async function unassignSeat(params) {
868
+ if (!params.subscriptionId) {
869
+ return { error: createError("VALIDATION_ERROR", "subscriptionId \u306F\u5FC5\u9808\u3067\u3059") };
870
+ }
871
+ if (!params.userId) {
872
+ return { error: createError("VALIDATION_ERROR", "userId \u306F\u5FC5\u9808\u3067\u3059") };
873
+ }
874
+ return fetchWithAuth(
875
+ `${seatsEndpoint(params.subscriptionId)}/${encodeURIComponent(params.userId)}`,
876
+ { method: "DELETE" }
877
+ );
878
+ }
879
+ return { listSeatAssignments, assignSeats, unassignSeat };
880
+ }
881
+
817
882
  // src/client/profile-methods.ts
818
883
  var EXT_PROFILE_ENDPOINT = "/api/v1/users/ext/me";
819
884
  function resolveAuthOverride(options, createError) {
@@ -864,7 +929,7 @@ function createProfileMethods(deps) {
864
929
  }
865
930
 
866
931
  // src/client/version-check.ts
867
- var SDK_VERSION = "5.9.0";
932
+ var SDK_VERSION = "5.12.0";
868
933
  var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
869
934
  var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
870
935
  function sdkHeaders() {
@@ -2609,7 +2674,11 @@ function createFFIDClient(config) {
2609
2674
  }
2610
2675
  return result;
2611
2676
  }
2612
- const { createCheckoutSession, createPortalSession } = createBillingMethods({
2677
+ const { createCheckoutSession, createPortalSession, listInvoices, getInvoice, retryPayment } = createBillingMethods({
2678
+ fetchWithAuth,
2679
+ createError
2680
+ });
2681
+ const { listSeatAssignments, assignSeats, unassignSeat } = createSeatMethods({
2613
2682
  fetchWithAuth,
2614
2683
  createError
2615
2684
  });
@@ -2718,6 +2787,12 @@ function createFFIDClient(config) {
2718
2787
  getAnalyticsConfig,
2719
2788
  createCheckoutSession,
2720
2789
  createPortalSession,
2790
+ listInvoices,
2791
+ getInvoice,
2792
+ retryPayment,
2793
+ listSeatAssignments,
2794
+ assignSeats,
2795
+ unassignSeat,
2721
2796
  listPlans,
2722
2797
  getSubscription,
2723
2798
  subscribe,
@@ -1,8 +1,8 @@
1
- import { F as FFIDLogger, a as FFIDError, b as FFIDCacheAdapter, c as FFIDVerifyAccessTokenOptions, d as FFIDApiResponse, e as FFIDOAuthUserInfo } from '../ffid-client-DRjzfAaS.cjs';
2
- export { f as FFIDAddMemberParams, g as FFIDAddMemberRequest, h as FFIDAddMemberResponse, i as FFIDAssignableMemberRole, j as FFIDCacheConfig, k as FFIDClient, l as FFIDConfig, m as FFIDListMembersResponse, n as FFIDMemberRole, o as FFIDOrganization, p as FFIDOrganizationMember, q as FFIDOtpSendResponse, r as FFIDOtpVerifyResponse, s as FFIDPasswordResetConfirmResponse, t as FFIDPasswordResetResponse, u as FFIDPasswordResetVerifyResponse, v as FFIDProfileCallOptions, w as FFIDRemoveMemberResponse, x as FFIDResetSessionResponse, y as FFIDSubscription, z as FFIDUpdateMemberRoleResponse, A as FFIDUpdateUserProfileRequest, B as FFIDUser, C as FFIDUserProfile, T as TokenData, D as TokenStore, E as createFFIDClient, G as createTokenStore } from '../ffid-client-DRjzfAaS.cjs';
1
+ import { F as FFIDLogger, a as FFIDError, b as FFIDCacheAdapter, c as FFIDVerifyAccessTokenOptions, d as FFIDApiResponse, e as FFIDOAuthUserInfo } from '../ffid-client-Dx4oc4Cw.cjs';
2
+ export { f as FFIDAddMemberParams, g as FFIDAddMemberRequest, h as FFIDAddMemberResponse, i as FFIDAssignableMemberRole, j as FFIDCacheConfig, k as FFIDClient, l as FFIDConfig, m as FFIDListMembersResponse, n as FFIDMemberRole, o as FFIDOrganization, p as FFIDOrganizationMember, q as FFIDOtpSendResponse, r as FFIDOtpVerifyResponse, s as FFIDPasswordResetConfirmResponse, t as FFIDPasswordResetResponse, u as FFIDPasswordResetVerifyResponse, v as FFIDProfileCallOptions, w as FFIDRemoveMemberResponse, x as FFIDResetSessionResponse, y as FFIDSubscription, z as FFIDUpdateMemberRoleResponse, A as FFIDUpdateUserProfileRequest, B as FFIDUser, C as FFIDUserProfile, T as TokenData, D as TokenStore, E as createFFIDClient, G as createTokenStore } from '../ffid-client-Dx4oc4Cw.cjs';
3
3
  export { D as DEFAULT_API_BASE_URL, a as DEFAULT_OAUTH_SCOPES } from '../constants-D61jqRIO.cjs';
4
4
  import { z } from 'zod';
5
- import '../types-BYdtyO_2.cjs';
5
+ import '../types-BeVl-z12.cjs';
6
6
 
7
7
  /** Token verification - verifyAccessToken() implementation */
8
8
 
@@ -1,8 +1,8 @@
1
- import { F as FFIDLogger, a as FFIDError, b as FFIDCacheAdapter, c as FFIDVerifyAccessTokenOptions, d as FFIDApiResponse, e as FFIDOAuthUserInfo } from '../ffid-client-gboJROw0.js';
2
- export { f as FFIDAddMemberParams, g as FFIDAddMemberRequest, h as FFIDAddMemberResponse, i as FFIDAssignableMemberRole, j as FFIDCacheConfig, k as FFIDClient, l as FFIDConfig, m as FFIDListMembersResponse, n as FFIDMemberRole, o as FFIDOrganization, p as FFIDOrganizationMember, q as FFIDOtpSendResponse, r as FFIDOtpVerifyResponse, s as FFIDPasswordResetConfirmResponse, t as FFIDPasswordResetResponse, u as FFIDPasswordResetVerifyResponse, v as FFIDProfileCallOptions, w as FFIDRemoveMemberResponse, x as FFIDResetSessionResponse, y as FFIDSubscription, z as FFIDUpdateMemberRoleResponse, A as FFIDUpdateUserProfileRequest, B as FFIDUser, C as FFIDUserProfile, T as TokenData, D as TokenStore, E as createFFIDClient, G as createTokenStore } from '../ffid-client-gboJROw0.js';
1
+ import { F as FFIDLogger, a as FFIDError, b as FFIDCacheAdapter, c as FFIDVerifyAccessTokenOptions, d as FFIDApiResponse, e as FFIDOAuthUserInfo } from '../ffid-client-5IprSUVR.js';
2
+ export { f as FFIDAddMemberParams, g as FFIDAddMemberRequest, h as FFIDAddMemberResponse, i as FFIDAssignableMemberRole, j as FFIDCacheConfig, k as FFIDClient, l as FFIDConfig, m as FFIDListMembersResponse, n as FFIDMemberRole, o as FFIDOrganization, p as FFIDOrganizationMember, q as FFIDOtpSendResponse, r as FFIDOtpVerifyResponse, s as FFIDPasswordResetConfirmResponse, t as FFIDPasswordResetResponse, u as FFIDPasswordResetVerifyResponse, v as FFIDProfileCallOptions, w as FFIDRemoveMemberResponse, x as FFIDResetSessionResponse, y as FFIDSubscription, z as FFIDUpdateMemberRoleResponse, A as FFIDUpdateUserProfileRequest, B as FFIDUser, C as FFIDUserProfile, T as TokenData, D as TokenStore, E as createFFIDClient, G as createTokenStore } from '../ffid-client-5IprSUVR.js';
3
3
  export { D as DEFAULT_API_BASE_URL, a as DEFAULT_OAUTH_SCOPES } from '../constants-D61jqRIO.js';
4
4
  import { z } from 'zod';
5
- import '../types-BYdtyO_2.js';
5
+ import '../types-BeVl-z12.js';
6
6
 
7
7
  /** Token verification - verifyAccessToken() implementation */
8
8
 
@@ -430,6 +430,8 @@ function createVerifyAccessToken(deps) {
430
430
  // src/client/billing-methods.ts
431
431
  var BILLING_CHECKOUT_ENDPOINT = "/api/v1/billing/checkout";
432
432
  var BILLING_PORTAL_ENDPOINT = "/api/v1/billing/portal";
433
+ var EXT_INVOICES_ENDPOINT = "/api/v1/billing/ext/invoices";
434
+ var EXT_RETRY_PAYMENT_ENDPOINT = "/api/v1/billing/ext/retry-payment";
433
435
  function createBillingMethods(deps) {
434
436
  const { fetchWithAuth, createError } = deps;
435
437
  async function createCheckoutSession(params) {
@@ -471,7 +473,31 @@ function createBillingMethods(deps) {
471
473
  `${BILLING_PORTAL_ENDPOINT}?${query.toString()}`
472
474
  );
473
475
  }
474
- return { createCheckoutSession, createPortalSession };
476
+ async function listInvoices(params) {
477
+ if (!params.organizationId) {
478
+ return { error: createError("VALIDATION_ERROR", "organizationId \u306F\u5FC5\u9808\u3067\u3059") };
479
+ }
480
+ const query = new URLSearchParams({ organizationId: params.organizationId });
481
+ return fetchWithAuth(`${EXT_INVOICES_ENDPOINT}?${query.toString()}`);
482
+ }
483
+ async function getInvoice(params) {
484
+ if (!params.invoiceId) {
485
+ return { error: createError("VALIDATION_ERROR", "invoiceId \u306F\u5FC5\u9808\u3067\u3059") };
486
+ }
487
+ return fetchWithAuth(
488
+ `${EXT_INVOICES_ENDPOINT}/${encodeURIComponent(params.invoiceId)}`
489
+ );
490
+ }
491
+ async function retryPayment(params) {
492
+ if (!params.organizationId) {
493
+ return { error: createError("VALIDATION_ERROR", "organizationId \u306F\u5FC5\u9808\u3067\u3059") };
494
+ }
495
+ return fetchWithAuth(EXT_RETRY_PAYMENT_ENDPOINT, {
496
+ method: "POST",
497
+ body: JSON.stringify({ organizationId: params.organizationId })
498
+ });
499
+ }
500
+ return { createCheckoutSession, createPortalSession, listInvoices, getInvoice, retryPayment };
475
501
  }
476
502
 
477
503
  // src/client/subscription-methods.ts
@@ -813,6 +839,45 @@ function createMembersMethods(deps) {
813
839
  return { listMembers, addMember, updateMemberRole, removeMember };
814
840
  }
815
841
 
842
+ // src/client/seat-methods.ts
843
+ function seatsEndpoint(subscriptionId) {
844
+ return `/api/v1/subscriptions/ext/${encodeURIComponent(subscriptionId)}/seats/assignments`;
845
+ }
846
+ function createSeatMethods(deps) {
847
+ const { fetchWithAuth, createError } = deps;
848
+ async function listSeatAssignments(params) {
849
+ if (!params.subscriptionId) {
850
+ return { error: createError("VALIDATION_ERROR", "subscriptionId \u306F\u5FC5\u9808\u3067\u3059") };
851
+ }
852
+ return fetchWithAuth(seatsEndpoint(params.subscriptionId));
853
+ }
854
+ async function assignSeats(params) {
855
+ if (!params.subscriptionId) {
856
+ return { error: createError("VALIDATION_ERROR", "subscriptionId \u306F\u5FC5\u9808\u3067\u3059") };
857
+ }
858
+ if (!Array.isArray(params.userIds) || params.userIds.length === 0) {
859
+ return { error: createError("VALIDATION_ERROR", "userIds \u306F 1 \u4EF6\u4EE5\u4E0A\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044") };
860
+ }
861
+ return fetchWithAuth(seatsEndpoint(params.subscriptionId), {
862
+ method: "POST",
863
+ body: JSON.stringify({ userIds: params.userIds })
864
+ });
865
+ }
866
+ async function unassignSeat(params) {
867
+ if (!params.subscriptionId) {
868
+ return { error: createError("VALIDATION_ERROR", "subscriptionId \u306F\u5FC5\u9808\u3067\u3059") };
869
+ }
870
+ if (!params.userId) {
871
+ return { error: createError("VALIDATION_ERROR", "userId \u306F\u5FC5\u9808\u3067\u3059") };
872
+ }
873
+ return fetchWithAuth(
874
+ `${seatsEndpoint(params.subscriptionId)}/${encodeURIComponent(params.userId)}`,
875
+ { method: "DELETE" }
876
+ );
877
+ }
878
+ return { listSeatAssignments, assignSeats, unassignSeat };
879
+ }
880
+
816
881
  // src/client/profile-methods.ts
817
882
  var EXT_PROFILE_ENDPOINT = "/api/v1/users/ext/me";
818
883
  function resolveAuthOverride(options, createError) {
@@ -863,7 +928,7 @@ function createProfileMethods(deps) {
863
928
  }
864
929
 
865
930
  // src/client/version-check.ts
866
- var SDK_VERSION = "5.9.0";
931
+ var SDK_VERSION = "5.12.0";
867
932
  var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
868
933
  var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
869
934
  function sdkHeaders() {
@@ -2608,7 +2673,11 @@ function createFFIDClient(config) {
2608
2673
  }
2609
2674
  return result;
2610
2675
  }
2611
- const { createCheckoutSession, createPortalSession } = createBillingMethods({
2676
+ const { createCheckoutSession, createPortalSession, listInvoices, getInvoice, retryPayment } = createBillingMethods({
2677
+ fetchWithAuth,
2678
+ createError
2679
+ });
2680
+ const { listSeatAssignments, assignSeats, unassignSeat } = createSeatMethods({
2612
2681
  fetchWithAuth,
2613
2682
  createError
2614
2683
  });
@@ -2717,6 +2786,12 @@ function createFFIDClient(config) {
2717
2786
  getAnalyticsConfig,
2718
2787
  createCheckoutSession,
2719
2788
  createPortalSession,
2789
+ listInvoices,
2790
+ getInvoice,
2791
+ retryPayment,
2792
+ listSeatAssignments,
2793
+ assignSeats,
2794
+ unassignSeat,
2720
2795
  listPlans,
2721
2796
  getSubscription,
2722
2797
  subscribe,
@@ -1,5 +1,5 @@
1
- import { k as FFIDClient, e as FFIDOAuthUserInfo } from '../../ffid-client-DRjzfAaS.cjs';
2
- import '../../types-BYdtyO_2.cjs';
1
+ import { k as FFIDClient, e as FFIDOAuthUserInfo } from '../../ffid-client-Dx4oc4Cw.cjs';
2
+ import '../../types-BeVl-z12.cjs';
3
3
 
4
4
  /**
5
5
  * FFID SDK - Test mode client (E2E / integration test bypass)
@@ -1,5 +1,5 @@
1
- import { k as FFIDClient, e as FFIDOAuthUserInfo } from '../../ffid-client-gboJROw0.js';
2
- import '../../types-BYdtyO_2.js';
1
+ import { k as FFIDClient, e as FFIDOAuthUserInfo } from '../../ffid-client-5IprSUVR.js';
2
+ import '../../types-BeVl-z12.js';
3
3
 
4
4
  /**
5
5
  * FFID SDK - Test mode client (E2E / integration test bypass)
@@ -49,6 +49,15 @@
49
49
  * @see /api/v1/subscriptions/ext/check
50
50
  * @see docs/03-implementation/EXPIRED_CONTRACT_HANDLING.md
51
51
  */
52
- type EffectiveSubscriptionStatus = 'active' | 'active_canceling' | 'past_due_grace' | 'blocked' | 'canceled' | 'trial_expired' | 'expired';
52
+ declare const EFFECTIVE_SUBSCRIPTION_STATUSES: readonly ["active", "active_canceling", "past_due_grace", "blocked", "canceled", "trial_expired", "expired"];
53
+ /**
54
+ * Derived from {@link EFFECTIVE_SUBSCRIPTION_STATUSES} so the literal set has
55
+ * a runtime representation. The server mirrors the same const in
56
+ * `src/lib/common/subscription-helpers.ts`, and a server-side unit test pins
57
+ * element-equality between the two arrays (#3474) — convention-only sync
58
+ * could drift silently in the server-extending direction (a new server
59
+ * literal would fall through SDK consumers' `switch` defaults).
60
+ */
61
+ type EffectiveSubscriptionStatus = (typeof EFFECTIVE_SUBSCRIPTION_STATUSES)[number];
53
62
 
54
63
  export type { EffectiveSubscriptionStatus as E };
@@ -49,6 +49,15 @@
49
49
  * @see /api/v1/subscriptions/ext/check
50
50
  * @see docs/03-implementation/EXPIRED_CONTRACT_HANDLING.md
51
51
  */
52
- type EffectiveSubscriptionStatus = 'active' | 'active_canceling' | 'past_due_grace' | 'blocked' | 'canceled' | 'trial_expired' | 'expired';
52
+ declare const EFFECTIVE_SUBSCRIPTION_STATUSES: readonly ["active", "active_canceling", "past_due_grace", "blocked", "canceled", "trial_expired", "expired"];
53
+ /**
54
+ * Derived from {@link EFFECTIVE_SUBSCRIPTION_STATUSES} so the literal set has
55
+ * a runtime representation. The server mirrors the same const in
56
+ * `src/lib/common/subscription-helpers.ts`, and a server-side unit test pins
57
+ * element-equality between the two arrays (#3474) — convention-only sync
58
+ * could drift silently in the server-extending direction (a new server
59
+ * literal would fall through SDK consumers' `switch` defaults).
60
+ */
61
+ type EffectiveSubscriptionStatus = (typeof EFFECTIVE_SUBSCRIPTION_STATUSES)[number];
53
62
 
54
63
  export type { EffectiveSubscriptionStatus as E };
@@ -1,4 +1,4 @@
1
- import { E as EffectiveSubscriptionStatus } from '../types-BYdtyO_2.cjs';
1
+ import { E as EffectiveSubscriptionStatus } from '../types-BeVl-z12.cjs';
2
2
 
3
3
  /**
4
4
  * FFID Webhook SDK Constants
@@ -1,4 +1,4 @@
1
- import { E as EffectiveSubscriptionStatus } from '../types-BYdtyO_2.js';
1
+ import { E as EffectiveSubscriptionStatus } from '../types-BeVl-z12.js';
2
2
 
3
3
  /**
4
4
  * FFID Webhook SDK Constants
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feelflow/ffid-sdk",
3
- "version": "5.9.0",
3
+ "version": "5.12.0",
4
4
  "description": "FeelFlow ID Platform SDK for React/Next.js applications",
5
5
  "keywords": [
6
6
  "feelflow",