@feelflow/ffid-sdk 5.13.0 → 5.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-RATTQIKM.js → chunk-4II4R7NR.js} +175 -1
- package/dist/{chunk-JFFRO2Q5.cjs → chunk-BVDUQQHP.cjs} +175 -1
- package/dist/components/index.cjs +8 -8
- package/dist/components/index.d.cts +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +1 -1
- package/dist/{ffid-client-BG0Qr86U.d.ts → ffid-client-9-lh0G_h.d.ts} +331 -111
- package/dist/{ffid-client-C3K3sAqq.d.cts → ffid-client-CKFxY60u.d.cts} +331 -111
- package/dist/{index-C6dnexXf.d.cts → index-CsVJTuPv.d.cts} +1 -112
- package/dist/{index-C6dnexXf.d.ts → index-CsVJTuPv.d.ts} +1 -112
- package/dist/index.cjs +41 -41
- package/dist/index.d.cts +341 -3
- package/dist/index.d.ts +341 -3
- package/dist/index.js +2 -2
- package/dist/legal/index.cjs +14 -0
- package/dist/legal/index.d.cts +16 -1
- package/dist/legal/index.d.ts +16 -1
- package/dist/legal/index.js +14 -0
- package/dist/server/index.cjs +175 -1
- package/dist/server/index.d.cts +2 -2
- package/dist/server/index.d.ts +2 -2
- package/dist/server/index.js +175 -1
- package/dist/server/test/index.d.cts +1 -1
- package/dist/server/test/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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
|
|
2
|
-
export {
|
|
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 FFIDAnalyticsConfig, j as FFIDVerifyAccessTokenOptions, k as FFIDOAuthUserInfo, l as FFIDInquiryCreateParams, m as FFIDInquiryCreateResponse, n as FFIDAuthMode, o as FFIDLogger, p as FFIDCacheAdapter, q as FFIDUser, r as FFIDOrganization, s as FFIDSubscription, t as FFIDSubscriptionContextValue, E as EffectiveSubscriptionStatus, u as FFIDOAuthUserInfoSubscription, v as FFIDAnnouncementsClientConfig, L as ListAnnouncementsOptions, w as FFIDAnnouncementsApiResponse, A as AnnouncementListResponse, x as FFIDAnnouncementsLogger } from './index-CsVJTuPv.cjs';
|
|
2
|
+
export { y as Announcement, z as AnnouncementStatus, B as AnnouncementType, C as EFFECTIVE_SUBSCRIPTION_STATUSES, D as FFIDAnnouncementBadge, G as FFIDAnnouncementList, H as FFIDAnnouncementsError, I as FFIDAnnouncementsErrorCode, J as FFIDAnnouncementsServerResponse, K as FFIDCacheConfig, M as FFIDContextValue, N as FFIDInquiryCategory, O as FFIDInquiryCategorySite2026, P as FFIDInquiryForm, Q as FFIDInquiryFormCategoryItem, R as FFIDInquiryFormClassNames, S as FFIDInquiryFormLegalLayout, T as FFIDInquiryFormOrganization, U as FFIDInquiryFormPlaceholderContext, V as FFIDInquiryFormPrefill, W as FFIDInquiryFormProps, X as FFIDInquiryFormSubmitData, Y as FFIDInquiryFormSubmitResult, Z as FFIDJwtClaims, _ as FFIDLoginButton, $ as FFIDOAuthTokenResponse, a0 as FFIDOAuthUserInfoMemberRole, a1 as FFIDOrganizationSwitcher, a2 as FFIDRedirectErrorCode, a3 as FFIDSeatModel, a4 as FFIDServiceAccessDenialReason, a5 as FFIDServiceAccessFailPolicy, a6 as FFIDSubscriptionBadge, a7 as FFIDTokenIntrospectionResponse, a8 as FFIDUserMenu, a9 as FFID_INQUIRY_CATEGORIES, aa as FFID_INQUIRY_CATEGORIES_SITE_2026, ab as UseFFIDAnnouncementsOptions, ac as UseFFIDAnnouncementsReturn, ad as isFFIDInquiryCategorySite2026, ae as useFFIDAnnouncements } from './index-CsVJTuPv.cjs';
|
|
3
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.cjs';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import { ReactNode, ComponentType, FC } from 'react';
|
|
@@ -680,6 +680,307 @@ interface FFIDRetryPaymentSummary {
|
|
|
680
680
|
failures: FFIDRetryPaymentFailure[];
|
|
681
681
|
}
|
|
682
682
|
|
|
683
|
+
/**
|
|
684
|
+
* Login history types (ext API).
|
|
685
|
+
*
|
|
686
|
+
* Mirrors the data shape returned by `GET /api/v1/users/ext/me/login-history`
|
|
687
|
+
* (and its cookie counterpart `/api/v1/users/me/login-history`), which is
|
|
688
|
+
* derived from `audit_logs` rows. Field names are `camelCase` to match the
|
|
689
|
+
* route's `data` payload.
|
|
690
|
+
*/
|
|
691
|
+
/**
|
|
692
|
+
* A single login-history entry.
|
|
693
|
+
*
|
|
694
|
+
* Each entry corresponds to one auth audit event (sign-in / sign-out /
|
|
695
|
+
* password-reset). Failed attempts are flagged via {@link isSuspicious}.
|
|
696
|
+
*/
|
|
697
|
+
interface FFIDLoginHistoryEntry {
|
|
698
|
+
/** Audit log entry id (UUID). */
|
|
699
|
+
id: string;
|
|
700
|
+
/** ISO 8601 timestamp of the event. */
|
|
701
|
+
timestamp: string;
|
|
702
|
+
/** Source IP address, or `null` when not recorded. */
|
|
703
|
+
ipAddress: string | null;
|
|
704
|
+
/** User agent string, or `null` when not recorded. */
|
|
705
|
+
userAgent: string | null;
|
|
706
|
+
/** Audit action (e.g. `auth.signin`, `auth.signout`, `auth.password_reset`). */
|
|
707
|
+
action: string;
|
|
708
|
+
/** Whether the auth event succeeded or failed. */
|
|
709
|
+
result: 'success' | 'failure';
|
|
710
|
+
/** `true` for failed attempts (currently equivalent to `result === 'failure'`). */
|
|
711
|
+
isSuspicious: boolean;
|
|
712
|
+
}
|
|
713
|
+
/**
|
|
714
|
+
* Response payload from `getLoginHistory`.
|
|
715
|
+
*
|
|
716
|
+
* `total` is the number of entries returned (not a global count) — it equals
|
|
717
|
+
* `history.length`, matching the route's `{ history, total }` envelope.
|
|
718
|
+
*/
|
|
719
|
+
interface FFIDLoginHistoryResponse {
|
|
720
|
+
/** Recent login-history entries, newest first. */
|
|
721
|
+
history: FFIDLoginHistoryEntry[];
|
|
722
|
+
/** Number of entries returned (equal to `history.length`). */
|
|
723
|
+
total: number;
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
/**
|
|
727
|
+
* Types for the organization verified-domains ext API.
|
|
728
|
+
*
|
|
729
|
+
* Mirrors the `VerifiedDomain` row shape returned by the FFID server route
|
|
730
|
+
* `GET /api/v1/organizations/ext/domains` (data field of the response).
|
|
731
|
+
*
|
|
732
|
+
* @see Issue #3783 (non-contract SDK coverage)
|
|
733
|
+
* @see Issue #3757 (verified-domain claims)
|
|
734
|
+
*/
|
|
735
|
+
/** A single organization verified-domain claim. */
|
|
736
|
+
interface FFIDOrganizationDomain {
|
|
737
|
+
/** Domain claim ID (UUID) */
|
|
738
|
+
id: string;
|
|
739
|
+
/** Owning organization ID (UUID) */
|
|
740
|
+
organizationId: string;
|
|
741
|
+
/** Claimed domain (normalized, e.g. `example.com`) */
|
|
742
|
+
domain: string;
|
|
743
|
+
/** Token to publish as a DNS TXT record to prove ownership */
|
|
744
|
+
verificationToken: string;
|
|
745
|
+
/** When ownership was verified, or `null` while the claim is still pending */
|
|
746
|
+
verifiedAt: string | null;
|
|
747
|
+
/** User ID (UUID) that verified the claim, or `null` while pending */
|
|
748
|
+
verifiedBy: string | null;
|
|
749
|
+
/** Whether same-domain users can discover & request to join (only meaningful once verified) */
|
|
750
|
+
discoverable: boolean;
|
|
751
|
+
/** When the claim was created */
|
|
752
|
+
createdAt: string;
|
|
753
|
+
/** When the claim was last updated */
|
|
754
|
+
updatedAt: string;
|
|
755
|
+
}
|
|
756
|
+
/** Response from getOrganizationDomains (ext). */
|
|
757
|
+
interface FFIDOrganizationDomainsResponse {
|
|
758
|
+
domains: FFIDOrganizationDomain[];
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
/**
|
|
762
|
+
* Organization billing notification preference types (ext API).
|
|
763
|
+
*
|
|
764
|
+
* Mirrors the FFID backend `billing_notification_preferences` shape exposed via
|
|
765
|
+
* `GET /api/v1/organizations/ext/notification-preferences` and the matching
|
|
766
|
+
* `PATCH`. Keys use the backend's snake_case casing because they map directly to
|
|
767
|
+
* the stored JSONB column.
|
|
768
|
+
*/
|
|
769
|
+
/**
|
|
770
|
+
* An organization's billing notification preferences.
|
|
771
|
+
*
|
|
772
|
+
* `payment_failed` is a legal obligation and is always `true` — the server
|
|
773
|
+
* forces it on read and write regardless of the requested value.
|
|
774
|
+
*/
|
|
775
|
+
interface FFIDOrganizationNotificationPreferences {
|
|
776
|
+
/** Whether renewal reminder notifications are enabled */
|
|
777
|
+
renewal_reminders: boolean;
|
|
778
|
+
/** Whether monthly usage/summary notifications are enabled */
|
|
779
|
+
monthly_summary: boolean;
|
|
780
|
+
/** Always true — payment failure notifications cannot be disabled (legal obligation) */
|
|
781
|
+
payment_failed: boolean;
|
|
782
|
+
}
|
|
783
|
+
/** Response from getNotificationPreferences / updateNotificationPreferences (ext) */
|
|
784
|
+
interface FFIDOrganizationNotificationPreferencesResponse {
|
|
785
|
+
preferences: FFIDOrganizationNotificationPreferences;
|
|
786
|
+
}
|
|
787
|
+
/**
|
|
788
|
+
* Request payload for updateNotificationPreferences (ext).
|
|
789
|
+
*
|
|
790
|
+
* Partial of the writable keys — only the supplied keys are updated. Omitted
|
|
791
|
+
* keys are reset to their default (`true`) on the server. `payment_failed` is
|
|
792
|
+
* not writable: it is always forced to `true`.
|
|
793
|
+
*/
|
|
794
|
+
type FFIDUpdateNotificationPreferencesRequest = Partial<Pick<FFIDOrganizationNotificationPreferences, 'renewal_reminders' | 'monthly_summary'>>;
|
|
795
|
+
|
|
796
|
+
/**
|
|
797
|
+
* Invitation status returned by the ext invite endpoint.
|
|
798
|
+
*
|
|
799
|
+
* A freshly created invitation is always `pending`; the broader union is
|
|
800
|
+
* included to match the route's `status` field (sourced from the invitations
|
|
801
|
+
* table) so consumers can narrow safely.
|
|
802
|
+
*/
|
|
803
|
+
type FFIDInvitationStatus = 'pending' | 'accepted' | 'expired' | 'cancelled';
|
|
804
|
+
/** Request body for inviteMember (ext) */
|
|
805
|
+
interface FFIDInviteMemberRequest {
|
|
806
|
+
/** Email address to invite */
|
|
807
|
+
email: string;
|
|
808
|
+
/** Role to assign on acceptance (defaults to `member` server-side) */
|
|
809
|
+
role?: FFIDAssignableMemberRole;
|
|
810
|
+
}
|
|
811
|
+
/**
|
|
812
|
+
* Response from inviteMember (ext).
|
|
813
|
+
*
|
|
814
|
+
* Matches the `/api/v1/organizations/ext/invite` route data exactly:
|
|
815
|
+
* `{ id, email, role, status, expiresAt }`.
|
|
816
|
+
*/
|
|
817
|
+
interface FFIDInviteMemberResponse {
|
|
818
|
+
/** Invitation ID (UUID) */
|
|
819
|
+
id: string;
|
|
820
|
+
/** Invited email address (normalized server-side) */
|
|
821
|
+
email: string;
|
|
822
|
+
/** Role assigned to the invitation */
|
|
823
|
+
role: FFIDMemberRole;
|
|
824
|
+
/** Invitation lifecycle status (always `pending` on creation) */
|
|
825
|
+
status: FFIDInvitationStatus;
|
|
826
|
+
/** ISO 8601 timestamp when the invitation expires */
|
|
827
|
+
expiresAt: string;
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
/**
|
|
831
|
+
* Types for the user-scoped organization membership methods (ext API).
|
|
832
|
+
*
|
|
833
|
+
* Backs `leaveOrganization` — a DESTRUCTIVE self-leave operation against
|
|
834
|
+
* `DELETE /api/v1/users/ext/me/organizations/:organizationId`.
|
|
835
|
+
*/
|
|
836
|
+
/**
|
|
837
|
+
* Parameters for `leaveOrganization`.
|
|
838
|
+
*
|
|
839
|
+
* `userId` is REQUIRED in `service-key` auth mode (there is no ambient user on
|
|
840
|
+
* a service credential, so the leaving user must be named explicitly). In
|
|
841
|
+
* `token` / `cookie` modes it is derived server-side from the credential and
|
|
842
|
+
* may be omitted; if provided in those modes it is ignored by the server.
|
|
843
|
+
*/
|
|
844
|
+
interface FFIDLeaveOrganizationParams {
|
|
845
|
+
/** The organization the user is leaving (UUID). */
|
|
846
|
+
organizationId: string;
|
|
847
|
+
/**
|
|
848
|
+
* The leaving user's id (UUID). Required for `service-key` mode; optional
|
|
849
|
+
* (and server-ignored) for `token` / `cookie` modes.
|
|
850
|
+
*/
|
|
851
|
+
userId?: string;
|
|
852
|
+
}
|
|
853
|
+
/**
|
|
854
|
+
* Response from `leaveOrganization` (ext).
|
|
855
|
+
*
|
|
856
|
+
* Matches the route's success `data` shape `{ message }`.
|
|
857
|
+
*/
|
|
858
|
+
interface FFIDLeaveOrganizationResponse {
|
|
859
|
+
/** Human-readable confirmation message (Japanese). */
|
|
860
|
+
message: string;
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
/**
|
|
864
|
+
* User profile types (ext API: `GET` / `PUT /api/v1/users/ext/me`).
|
|
865
|
+
*
|
|
866
|
+
* Extracted from `./index.ts` to keep the types barrel under the file-size
|
|
867
|
+
* limit, consistent with the per-domain extraction already used for
|
|
868
|
+
* `service-access`, `organization-members`, `contract-resources`, etc. The
|
|
869
|
+
* barrel re-exports these so the public import path (`@feelflow/ffid-sdk`)
|
|
870
|
+
* is unchanged.
|
|
871
|
+
*/
|
|
872
|
+
/**
|
|
873
|
+
* User profile for the authenticated user (returned by `getProfile` / `updateProfile`).
|
|
874
|
+
*
|
|
875
|
+
* Mirrors the FFID backend `UserProfile` shape exposed via
|
|
876
|
+
* `GET /api/v1/users/ext/me` and `PUT /api/v1/users/ext/me`.
|
|
877
|
+
*/
|
|
878
|
+
interface FFIDUserProfile {
|
|
879
|
+
/** User ID (UUID) */
|
|
880
|
+
id: string;
|
|
881
|
+
/** Email address */
|
|
882
|
+
email: string;
|
|
883
|
+
/** Display name (nullable when not set) */
|
|
884
|
+
displayName: string | null;
|
|
885
|
+
/** Avatar URL (nullable when not set) */
|
|
886
|
+
avatarUrl: string | null;
|
|
887
|
+
/** Phone number (nullable when not set) */
|
|
888
|
+
phone: string | null;
|
|
889
|
+
/** Company name (nullable when not set) */
|
|
890
|
+
companyName: string | null;
|
|
891
|
+
/** Department (nullable when not set) */
|
|
892
|
+
department: string | null;
|
|
893
|
+
/** Job title (nullable when not set) */
|
|
894
|
+
jobTitle: string | null;
|
|
895
|
+
/** IANA timezone (e.g. 'Asia/Tokyo') */
|
|
896
|
+
timezone: string;
|
|
897
|
+
/** Locale (e.g. 'ja', 'en') */
|
|
898
|
+
locale: string;
|
|
899
|
+
/** Arbitrary user preferences bag */
|
|
900
|
+
preferences: Record<string, unknown>;
|
|
901
|
+
/** Account creation timestamp (ISO 8601) */
|
|
902
|
+
createdAt: string;
|
|
903
|
+
/** Profile last-updated timestamp (ISO 8601) */
|
|
904
|
+
updatedAt: string;
|
|
905
|
+
}
|
|
906
|
+
/**
|
|
907
|
+
* Per-call options for profile methods (`getProfile` / `updateProfile`).
|
|
908
|
+
*
|
|
909
|
+
* Supply `accessToken` to forward an end-user Bearer token for the single call
|
|
910
|
+
* without mutating client-level auth state. Designed for server runtimes (Cloudflare
|
|
911
|
+
* Workers, Edge, Node) that receive a user-scoped Bearer per request and want to
|
|
912
|
+
* act as that user against `/api/v1/users/ext/me`.
|
|
913
|
+
*
|
|
914
|
+
* When `accessToken` is supplied with a non-empty value, it overrides the client's
|
|
915
|
+
* configured auth mode: authentication for that request uses only
|
|
916
|
+
* `Authorization: Bearer <accessToken>` (no service key, no cookie, no token-store
|
|
917
|
+
* lookup, no auto-refresh on 401). Non-auth headers such as `Content-Type` are
|
|
918
|
+
* still attached. SDK metadata headers (`User-Agent` / `X-FFID-SDK-Version`) are
|
|
919
|
+
* attached on non-browser runtimes only (Node.js / Cloudflare Workers / Edge /
|
|
920
|
+
* Deno); browsers receive an empty object to avoid iOS WebKit `fetch()` breakage
|
|
921
|
+
* (see #2417).
|
|
922
|
+
*
|
|
923
|
+
* Runtime semantics:
|
|
924
|
+
* - `accessToken` omitted (or `undefined`) → no override, configured `authMode` is used
|
|
925
|
+
* - `accessToken` is empty string / whitespace-only → rejected as `VALIDATION_ERROR`
|
|
926
|
+
* before any network call (prevents silent impersonation fallback when a caller
|
|
927
|
+
* extracts a missing/blank `Authorization` header into this field)
|
|
928
|
+
* - `accessToken` is a non-empty string → override activated
|
|
929
|
+
*/
|
|
930
|
+
interface FFIDProfileCallOptions {
|
|
931
|
+
/**
|
|
932
|
+
* End-user Bearer token forwarded for this single request.
|
|
933
|
+
*
|
|
934
|
+
* Must be a non-empty string when supplied. Passing `''` or a whitespace-only
|
|
935
|
+
* string is treated as a caller error and surfaces as `VALIDATION_ERROR` —
|
|
936
|
+
* this guards against the common footgun where a server runtime extracts the
|
|
937
|
+
* Bearer from an incoming request without checking the header is present.
|
|
938
|
+
*/
|
|
939
|
+
accessToken?: string;
|
|
940
|
+
}
|
|
941
|
+
/**
|
|
942
|
+
* Request payload for `updateProfile`.
|
|
943
|
+
*
|
|
944
|
+
* Mirrors the FFID backend `UpdateUserProfileRequest` shape. All fields are
|
|
945
|
+
* optional — only the supplied keys will be updated (partial update semantics).
|
|
946
|
+
*
|
|
947
|
+
* Per-field value semantics:
|
|
948
|
+
* - `undefined` / key omitted → field is untouched (partial update)
|
|
949
|
+
* - `null` → clears the field (stores SQL NULL in the DB)
|
|
950
|
+
* - `""` (empty string) → stored as a literal empty string, **not** treated as
|
|
951
|
+
* a clear. Use `null` when you want the DB value to become NULL
|
|
952
|
+
*
|
|
953
|
+
* `timezone` and `locale` are intentionally modeled as non-null in this
|
|
954
|
+
* request type (application-level invariant — the DB columns have DEFAULT
|
|
955
|
+
* values but no NOT NULL constraint, yet the server-side normalization
|
|
956
|
+
* pipeline assumes a string is always present). Pass a string to update the
|
|
957
|
+
* value, or omit the key to leave the current value in place. Do not pass
|
|
958
|
+
* `null` to clear — there is no meaningful "no timezone" state for a user.
|
|
959
|
+
*
|
|
960
|
+
* `preferences: null` is accepted and clears the column. Subsequent reads
|
|
961
|
+
* return `{}` because the FFID backend normalizes a null `preferences` column
|
|
962
|
+
* to an empty object (`toUserProfile` helper) before serializing the response —
|
|
963
|
+
* the SDK itself does not transform the payload.
|
|
964
|
+
*/
|
|
965
|
+
interface FFIDUpdateUserProfileRequest {
|
|
966
|
+
/** Display name (null clears the field) */
|
|
967
|
+
displayName?: string | null;
|
|
968
|
+
/** Phone number (null clears the field) */
|
|
969
|
+
phone?: string | null;
|
|
970
|
+
/** Company name (null clears the field) */
|
|
971
|
+
companyName?: string | null;
|
|
972
|
+
/** Department (null clears the field) */
|
|
973
|
+
department?: string | null;
|
|
974
|
+
/** Job title (null clears the field) */
|
|
975
|
+
jobTitle?: string | null;
|
|
976
|
+
/** IANA timezone (non-null; omit the key to leave unchanged) */
|
|
977
|
+
timezone?: string;
|
|
978
|
+
/** Locale (non-null; omit the key to leave unchanged) */
|
|
979
|
+
locale?: string;
|
|
980
|
+
/** Arbitrary user preferences bag (null clears the column; reads return {}) */
|
|
981
|
+
preferences?: Record<string, unknown> | null;
|
|
982
|
+
}
|
|
983
|
+
|
|
683
984
|
/** OTP / magic link methods - sendOtp / verifyOtp */
|
|
684
985
|
|
|
685
986
|
/** Response from sendOtp */
|
|
@@ -745,6 +1046,26 @@ interface ContractWizardSubscriptionOptions {
|
|
|
745
1046
|
organizationId?: string;
|
|
746
1047
|
}
|
|
747
1048
|
|
|
1049
|
+
/** Login history methods - getLoginHistory (ext API) */
|
|
1050
|
+
|
|
1051
|
+
/** Parameters accepted by `getLoginHistory`. */
|
|
1052
|
+
interface FFIDGetLoginHistoryParams {
|
|
1053
|
+
/**
|
|
1054
|
+
* Target user id (UUID).
|
|
1055
|
+
*
|
|
1056
|
+
* **Required in `service-key` auth mode** — an `X-Service-Api-Key` request
|
|
1057
|
+
* has no ambient user, so the server requires `?userId=` to know whose
|
|
1058
|
+
* history to return. In `token` / `cookie` auth modes the user is derived
|
|
1059
|
+
* server-side from the credential, so `userId` is ignored if supplied.
|
|
1060
|
+
*/
|
|
1061
|
+
userId?: string;
|
|
1062
|
+
/**
|
|
1063
|
+
* Maximum number of entries to return. Clamped server-side to the route's
|
|
1064
|
+
* ceiling (20); omit to use the default.
|
|
1065
|
+
*/
|
|
1066
|
+
limit?: number;
|
|
1067
|
+
}
|
|
1068
|
+
|
|
748
1069
|
/** OAuth token operations - exchangeCodeForTokens / refreshAccessToken / signOutToken */
|
|
749
1070
|
|
|
750
1071
|
/**
|
|
@@ -829,6 +1150,23 @@ declare function createFFIDClient(config: FFIDConfig): {
|
|
|
829
1150
|
}) => Promise<FFIDApiResponse<FFIDRemoveMemberResponse>>;
|
|
830
1151
|
getProfile: (options?: FFIDProfileCallOptions) => Promise<FFIDApiResponse<FFIDUserProfile>>;
|
|
831
1152
|
updateProfile: (data: FFIDUpdateUserProfileRequest, options?: FFIDProfileCallOptions) => Promise<FFIDApiResponse<FFIDUserProfile>>;
|
|
1153
|
+
getLoginHistory: (params?: FFIDGetLoginHistoryParams) => Promise<FFIDApiResponse<FFIDLoginHistoryResponse>>;
|
|
1154
|
+
getOrganizationDomains: (params: {
|
|
1155
|
+
organizationId: string;
|
|
1156
|
+
}) => Promise<FFIDApiResponse<FFIDOrganizationDomainsResponse>>;
|
|
1157
|
+
getNotificationPreferences: (params: {
|
|
1158
|
+
organizationId: string;
|
|
1159
|
+
}) => Promise<FFIDApiResponse<FFIDOrganizationNotificationPreferencesResponse>>;
|
|
1160
|
+
updateNotificationPreferences: (params: {
|
|
1161
|
+
organizationId: string;
|
|
1162
|
+
preferences: FFIDUpdateNotificationPreferencesRequest;
|
|
1163
|
+
}) => Promise<FFIDApiResponse<FFIDOrganizationNotificationPreferencesResponse>>;
|
|
1164
|
+
inviteMember: (params: {
|
|
1165
|
+
organizationId: string;
|
|
1166
|
+
email: string;
|
|
1167
|
+
role?: FFIDAssignableMemberRole;
|
|
1168
|
+
}) => Promise<FFIDApiResponse<FFIDInviteMemberResponse>>;
|
|
1169
|
+
leaveOrganization: (params: FFIDLeaveOrganizationParams) => Promise<FFIDApiResponse<FFIDLeaveOrganizationResponse>>;
|
|
832
1170
|
getAnalyticsConfig: (serviceCode: string, options?: FFIDProfileCallOptions) => Promise<FFIDApiResponse<FFIDAnalyticsConfig>>;
|
|
833
1171
|
createCheckoutSession: (params: FFIDCreateCheckoutParams) => Promise<FFIDApiResponse<FFIDCheckoutSessionResponse>>;
|
|
834
1172
|
createPortalSession: (params: FFIDCreatePortalParams) => Promise<FFIDApiResponse<FFIDPortalSessionResponse>>;
|
|
@@ -1659,4 +1997,4 @@ declare function createInquiryMethods(deps: InquiryMethodsDeps): {
|
|
|
1659
1997
|
};
|
|
1660
1998
|
type FFIDInquiryClient = ReturnType<typeof createInquiryMethods>;
|
|
1661
1999
|
|
|
1662
|
-
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 ExchangeCodeForTokensOptions, 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 HandleRedirectCallbackClient, type HandleRedirectCallbackOptions, type KVNamespaceLike, ListAnnouncementsOptions, type NormalizeRedirectUriResult, type RedirectToAuthorizeOptions, type TokenData, type TokenStore, type UseFFIDReturn, type UseRequireActiveSubscriptionOptions, type UseRequireActiveSubscriptionReturn, type WithFFIDAuthOptions, type WithSubscriptionOptions, cleanupStateStorage as clearState, computeEffectiveStatusFromSession, createFFIDAnnouncementsClient, createFFIDClient, createKVCacheAdapter, createMemoryCacheAdapter, createTokenStore, generateCodeChallenge, generateCodeVerifier, handleRedirectCallback, hasAccessFromUserinfo, isBlockedFromUserinfo, normalizeRedirectUri, retrieveCodeVerifier, retrieveState, storeCodeVerifier, storeState, useFFID, useRequireActiveSubscription, useSubscription, withFFIDAuth, withSubscription };
|
|
2000
|
+
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 ExchangeCodeForTokensOptions, 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 FFIDInvitationStatus, type FFIDInviteMemberRequest, type FFIDInviteMemberResponse, type FFIDLeaveOrganizationParams, type FFIDLeaveOrganizationResponse, type FFIDListMembersResponse, type FFIDListPlansResponse, FFIDLogger, type FFIDLoginHistoryEntry, type FFIDLoginHistoryResponse, 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 FFIDOrganizationDomain, type FFIDOrganizationDomainsResponse, type FFIDOrganizationMember, type FFIDOrganizationNotificationPreferences, type FFIDOrganizationNotificationPreferencesResponse, type FFIDOtpSendResponse, type FFIDOtpVerifyResponse, type FFIDPasswordResetConfirmResponse, type FFIDPasswordResetResponse, type FFIDPasswordResetVerifyResponse, type FFIDPlanChangeLineItem, type FFIDPlanChangePreview, type FFIDPlanChangePreviewResponse, type FFIDPlanInfo, type FFIDPortalSessionResponse, type FFIDPreviewPlanChangeParams, type FFIDPreviewSeatChangeParams, type 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, type FFIDUpdateNotificationPreferencesRequest, type FFIDUpdateUserProfileRequest, FFIDUser, type FFIDUserProfile, FFIDVerifyAccessTokenOptions, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_NEWSLETTER_DISPATCH_MAX_RECIPIENTS, FFID_NEWSLETTER_TYPES, type HandleRedirectCallbackClient, type HandleRedirectCallbackOptions, type KVNamespaceLike, ListAnnouncementsOptions, type NormalizeRedirectUriResult, type RedirectToAuthorizeOptions, type TokenData, type TokenStore, type UseFFIDReturn, type UseRequireActiveSubscriptionOptions, type UseRequireActiveSubscriptionReturn, type WithFFIDAuthOptions, type WithSubscriptionOptions, cleanupStateStorage as clearState, computeEffectiveStatusFromSession, createFFIDAnnouncementsClient, createFFIDClient, createKVCacheAdapter, createMemoryCacheAdapter, createTokenStore, generateCodeChallenge, generateCodeVerifier, handleRedirectCallback, hasAccessFromUserinfo, isBlockedFromUserinfo, normalizeRedirectUri, retrieveCodeVerifier, retrieveState, storeCodeVerifier, storeState, useFFID, useRequireActiveSubscription, useSubscription, withFFIDAuth, withSubscription };
|