@feelflow/ffid-sdk 10.1.0 → 12.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -0
- package/dist/agency/index.d.cts +23 -1
- package/dist/agency/index.d.ts +23 -1
- package/dist/{chunk-ITSQIAO5.js → chunk-OL7KVPQ4.js} +52 -5
- package/dist/{chunk-VHOIA25Y.cjs → chunk-XRWDTYA7.cjs} +52 -5
- 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-DUbQLYTN.d.ts → ffid-client-ByfZA9sJ.d.ts} +32 -10
- package/dist/{ffid-client-qcfCWLfs.d.cts → ffid-client-DW8_m1_M.d.cts} +32 -10
- package/dist/{index-CWGoIgYL.d.cts → index-f9k9reXO.d.cts} +21 -9
- package/dist/{index-CWGoIgYL.d.ts → index-f9k9reXO.d.ts} +21 -9
- package/dist/index.cjs +91 -91
- package/dist/index.d.cts +21 -3
- package/dist/index.d.ts +21 -3
- package/dist/index.js +2 -2
- package/dist/server/index.cjs +86 -13
- package/dist/server/index.d.cts +22 -10
- package/dist/server/index.d.ts +22 -10
- package/dist/server/index.js +86 -13
- package/dist/server/test/index.d.cts +1 -1
- package/dist/server/test/index.d.ts +1 -1
- package/dist/webhooks/index.d.cts +13 -2
- package/dist/webhooks/index.d.ts +13 -2
- package/package.json +1 -1
|
@@ -361,11 +361,12 @@ interface FFIDSubscribeResponse {
|
|
|
361
361
|
code: string;
|
|
362
362
|
name: string;
|
|
363
363
|
};
|
|
364
|
+
/** `priceMonthly` は `customPricing` プランで `null`(個別見積り)。11.1.0 で `FFIDPlanInfo` と揃えた */
|
|
364
365
|
plan: {
|
|
365
366
|
id: string;
|
|
366
367
|
code: string;
|
|
367
368
|
name: string;
|
|
368
|
-
priceMonthly: number;
|
|
369
|
+
priceMonthly: number | null;
|
|
369
370
|
priceYearly: number | null;
|
|
370
371
|
trialDays: number;
|
|
371
372
|
};
|
|
@@ -961,12 +962,19 @@ interface FFIDBuyCreditsUrlParams {
|
|
|
961
962
|
type FFIDSubscriptionStatus = 'trialing' | 'active' | 'past_due' | 'canceled' | 'pending_invoice' | 'paused' | 'incomplete' | 'incomplete_expired' | 'unpaid';
|
|
962
963
|
interface FFIDSubscriptionCheckResponse {
|
|
963
964
|
hasActiveSubscription: boolean;
|
|
965
|
+
/**
|
|
966
|
+
* Active seat for the requested user; null for organization-only checks.
|
|
967
|
+
* Older servers omit this field. User access requires hasAccess AND
|
|
968
|
+
* seatAssigned === true; an omitted/null value is not proof of a seat.
|
|
969
|
+
*/
|
|
970
|
+
seatAssigned?: boolean | null;
|
|
964
971
|
/**
|
|
965
972
|
* Canonical access decision returned by FFID's `/subscriptions/ext/check`.
|
|
966
973
|
*
|
|
967
974
|
* This is the server-side source of truth for service gates. Consumers
|
|
968
975
|
* should not recompute access from `currentPeriodEnd`, `past_due_since`, or
|
|
969
976
|
* local payment timestamps.
|
|
977
|
+
* This is contract access; user access also requires seatAssigned === true.
|
|
970
978
|
*/
|
|
971
979
|
hasAccess?: boolean;
|
|
972
980
|
/** True when `effectiveStatus === 'past_due_grace'`. */
|
|
@@ -996,9 +1004,11 @@ interface FFIDSubscriptionCheckResponse {
|
|
|
996
1004
|
*/
|
|
997
1005
|
pricingModel?: FFIDPricingModel | null;
|
|
998
1006
|
/**
|
|
999
|
-
* Credit balance summary — flat plans only (10.0.0). `null` for per_seat, for
|
|
1000
|
-
*
|
|
1001
|
-
*
|
|
1007
|
+
* Credit balance summary — paid flat plans only (10.0.0). `null` for per_seat, for a
|
|
1008
|
+
* `free` plan (flat on the unified ladder since #6547, but outside credits — consume /
|
|
1009
|
+
* balance return 409 `CREDITS_NOT_APPLICABLE`), for no subscription, **and** when FFID
|
|
1010
|
+
* could not read the ledger, so `null` does not mean "not flat" (use `pricingModel`).
|
|
1011
|
+
* Never affects `hasAccess`.
|
|
1002
1012
|
*/
|
|
1003
1013
|
credits?: FFIDSubscriptionCheckCredits | null;
|
|
1004
1014
|
/**
|
|
@@ -1045,7 +1055,10 @@ interface FFIDServiceAccessError {
|
|
|
1045
1055
|
details?: unknown;
|
|
1046
1056
|
}
|
|
1047
1057
|
interface FFIDServiceAccessDecision {
|
|
1058
|
+
/** Contract access; user access also requires seatAssigned === true. */
|
|
1048
1059
|
hasAccess: boolean;
|
|
1060
|
+
/** User's active seat, passed through when returned. Gate user access with === true. */
|
|
1061
|
+
seatAssigned?: boolean | null;
|
|
1049
1062
|
effectiveStatus: EffectiveSubscriptionStatus | null;
|
|
1050
1063
|
isGrace: boolean;
|
|
1051
1064
|
isBlocked: boolean;
|
|
@@ -1210,9 +1223,18 @@ interface FFIDAddMemberRequest {
|
|
|
1210
1223
|
interface FFIDAddMemberParams extends FFIDAddMemberRequest {
|
|
1211
1224
|
organizationId: string;
|
|
1212
1225
|
}
|
|
1226
|
+
/** Seat assignment outcome after membership creation; membership exists in every case. */
|
|
1227
|
+
type FFIDMemberSeatAssignmentResult = 'assigned' | 'not_applicable' | 'member_limit_reached' | 'failed';
|
|
1213
1228
|
/** Response from addMember (ext) */
|
|
1214
1229
|
interface FFIDAddMemberResponse {
|
|
1215
1230
|
member: FFIDOrganizationMember;
|
|
1231
|
+
/**
|
|
1232
|
+
* Membership creation can succeed even when seat assignment fails.
|
|
1233
|
+
* Omitted by older servers. `not_applicable`/undefined do not prove an active seat.
|
|
1234
|
+
* Check the authenticated user's hasAccess and seatAssigned before granting access;
|
|
1235
|
+
* do not automatically restore a removed seat on a duplicate-member retry.
|
|
1236
|
+
*/
|
|
1237
|
+
seatAssignment?: FFIDMemberSeatAssignmentResult;
|
|
1216
1238
|
}
|
|
1217
1239
|
/** Response from updateMemberRole (ext) */
|
|
1218
1240
|
interface FFIDUpdateMemberRoleResponse {
|
|
@@ -2431,11 +2453,10 @@ interface FFIDConfig {
|
|
|
2431
2453
|
*/
|
|
2432
2454
|
cache?: FFIDCacheConfig | undefined;
|
|
2433
2455
|
/**
|
|
2434
|
-
*
|
|
2435
|
-
* token verification
|
|
2436
|
-
*
|
|
2437
|
-
*
|
|
2438
|
-
* surfaced through the normal error path (e.g. `NETWORK_ERROR`).
|
|
2456
|
+
* Per-HTTP timeout (ms): shared JSON APIs (e.g. checkSubscription/getProfile),
|
|
2457
|
+
* token verification/introspection, token OAuth exchange/refresh/revoke; also FFIDProvider.timeout.
|
|
2458
|
+
* Shared JSON includes body and preserves signals; refresh/retry have separate deadlines.
|
|
2459
|
+
* Excludes token getSession, cookie signOut, public/newsletter/inquiry; not a method deadline.
|
|
2439
2460
|
* @default undefined (no timeout, uses fetch default)
|
|
2440
2461
|
*/
|
|
2441
2462
|
timeout?: number | undefined;
|
|
@@ -2801,6 +2822,7 @@ declare function createFFIDClient(config: FFIDConfig): {
|
|
|
2801
2822
|
organizationId: string;
|
|
2802
2823
|
email: string;
|
|
2803
2824
|
role?: FFIDAssignableMemberRole;
|
|
2825
|
+
inviterUserId?: string;
|
|
2804
2826
|
}) => Promise<FFIDApiResponse<FFIDInviteMemberResponse>>;
|
|
2805
2827
|
leaveOrganization: (params: FFIDLeaveOrganizationParams) => Promise<FFIDApiResponse<FFIDLeaveOrganizationResponse>>;
|
|
2806
2828
|
getAnalyticsConfig: (serviceCode: string, options?: FFIDProfileCallOptions) => Promise<FFIDApiResponse<FFIDAnalyticsConfig>>;
|
|
@@ -2887,4 +2909,4 @@ declare function createFFIDClient(config: FFIDConfig): {
|
|
|
2887
2909
|
/** Type of the FFID client */
|
|
2888
2910
|
type FFIDClient = ReturnType<typeof createFFIDClient>;
|
|
2889
2911
|
|
|
2890
|
-
export { type
|
|
2912
|
+
export { type FFIDProvisionUserResponse as $, type FFIDMemberSeatAssignmentResult as A, type FFIDOrganization as B, type FFIDOrganizationLogoUploadResponse as C, type FFIDOrganizationMember as D, type FFIDOrganizationProfile as E, type FFIDError as F, type FFIDOrganizationProfileErrorCode as G, type FFIDOrganizationProfileResponse as H, type FFIDOtpSendResponse as I, type FFIDOtpVerifyResponse as J, type FFIDPasswordResetConfirmResponse as K, type FFIDPasswordResetResponse as L, type FFIDPasswordResetVerifyResponse as M, type FFIDProfileCallOptions as N, type FFIDProvisionMemberPlan as O, type FFIDProvisionMemberPlanStatus as P, type FFIDProvisionMemberResult as Q, type FFIDProvisionMemberStatus as R, type FFIDProvisionOrganizationDryRun as S, type FFIDProvisionOrganizationMemberInput as T, type FFIDProvisionOrganizationOutcome as U, type FFIDProvisionOrganizationParams as V, type FFIDProvisionOrganizationResponse as W, type FFIDProvisionUserDryRun as X, type FFIDProvisionUserOutcome as Y, type FFIDProvisionUserParams as Z, type FFIDProvisionUserProfileInput as _, type FFIDLogger as a, type FFIDProvisionedOrganization as a0, type FFIDProvisionedUser as a1, type FFIDPublishedPlan as a2, type FFIDRemoveMemberResponse as a3, type FFIDResetSessionResponse as a4, type FFIDSubscription as a5, type FFIDUpdateMemberRoleResponse as a6, type FFIDUpdateUserProfileRequest as a7, type FFIDUploadOrganizationLogoParams as a8, type FFIDUpsertOrganizationProfileParams as a9, type FFIDUpsertOrganizationProfileRequest as aa, type FFIDUser as ab, type FFIDUserProfile as ac, FFID_ALLOWED_ORGANIZATION_LOGO_MIME_TYPES as ad, FFID_CATALOG_ENVIRONMENTS as ae, FFID_CATALOG_PUBLICATION_STATUSES as af, FFID_COMPANY_SIZE_CODES as ag, FFID_INDUSTRY_CODES as ah, FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_BYTES as ai, FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_MB as aj, FFID_ORGANIZATION_PROFILE_ERROR_CODES as ak, type TokenData as al, type TokenStore as am, createFFIDClient as an, createTokenStore as ao, type FFIDCacheAdapter as b, type FFIDVerifyAccessTokenOptions as c, type FFIDApiResponse as d, type FFIDOAuthUserInfo as e, type FFIDCatalogEnvironment as f, type FFIDBillingInterval as g, type FFIDTaxBehavior as h, type FFIDPublishedCatalog as i, type FFIDAddMemberParams as j, type FFIDAddMemberRequest as k, type FFIDAddMemberResponse as l, type FFIDAllowedLogoMimeType as m, type FFIDAssignableMemberRole as n, type FFIDCacheConfig as o, type FFIDCatalogPublication as p, type FFIDCatalogPublicationStatus as q, type FFIDClient as r, type FFIDCompanySizeCode as s, type FFIDConfig as t, type FFIDIndustryCode as u, type FFIDListMembersResponse as v, type FFIDListingConsentInput as w, type FFIDLogoWallEntry as x, type FFIDLogoWallResponse as y, type FFIDMemberRole as z };
|
|
@@ -276,11 +276,12 @@ interface FFIDSubscribeResponse {
|
|
|
276
276
|
code: string;
|
|
277
277
|
name: string;
|
|
278
278
|
};
|
|
279
|
+
/** `priceMonthly` は `customPricing` プランで `null`(個別見積り)。11.1.0 で `FFIDPlanInfo` と揃えた */
|
|
279
280
|
plan: {
|
|
280
281
|
id: string;
|
|
281
282
|
code: string;
|
|
282
283
|
name: string;
|
|
283
|
-
priceMonthly: number;
|
|
284
|
+
priceMonthly: number | null;
|
|
284
285
|
priceYearly: number | null;
|
|
285
286
|
trialDays: number;
|
|
286
287
|
};
|
|
@@ -909,12 +910,19 @@ interface FFIDBuyCreditsUrlParams {
|
|
|
909
910
|
type FFIDSubscriptionStatus = 'trialing' | 'active' | 'past_due' | 'canceled' | 'pending_invoice' | 'paused' | 'incomplete' | 'incomplete_expired' | 'unpaid';
|
|
910
911
|
interface FFIDSubscriptionCheckResponse {
|
|
911
912
|
hasActiveSubscription: boolean;
|
|
913
|
+
/**
|
|
914
|
+
* Active seat for the requested user; null for organization-only checks.
|
|
915
|
+
* Older servers omit this field. User access requires hasAccess AND
|
|
916
|
+
* seatAssigned === true; an omitted/null value is not proof of a seat.
|
|
917
|
+
*/
|
|
918
|
+
seatAssigned?: boolean | null;
|
|
912
919
|
/**
|
|
913
920
|
* Canonical access decision returned by FFID's `/subscriptions/ext/check`.
|
|
914
921
|
*
|
|
915
922
|
* This is the server-side source of truth for service gates. Consumers
|
|
916
923
|
* should not recompute access from `currentPeriodEnd`, `past_due_since`, or
|
|
917
924
|
* local payment timestamps.
|
|
925
|
+
* This is contract access; user access also requires seatAssigned === true.
|
|
918
926
|
*/
|
|
919
927
|
hasAccess?: boolean;
|
|
920
928
|
/** True when `effectiveStatus === 'past_due_grace'`. */
|
|
@@ -944,9 +952,11 @@ interface FFIDSubscriptionCheckResponse {
|
|
|
944
952
|
*/
|
|
945
953
|
pricingModel?: FFIDPricingModel | null;
|
|
946
954
|
/**
|
|
947
|
-
* Credit balance summary — flat plans only (10.0.0). `null` for per_seat, for
|
|
948
|
-
*
|
|
949
|
-
*
|
|
955
|
+
* Credit balance summary — paid flat plans only (10.0.0). `null` for per_seat, for a
|
|
956
|
+
* `free` plan (flat on the unified ladder since #6547, but outside credits — consume /
|
|
957
|
+
* balance return 409 `CREDITS_NOT_APPLICABLE`), for no subscription, **and** when FFID
|
|
958
|
+
* could not read the ledger, so `null` does not mean "not flat" (use `pricingModel`).
|
|
959
|
+
* Never affects `hasAccess`.
|
|
950
960
|
*/
|
|
951
961
|
credits?: FFIDSubscriptionCheckCredits | null;
|
|
952
962
|
/**
|
|
@@ -993,7 +1003,10 @@ interface FFIDServiceAccessError {
|
|
|
993
1003
|
details?: unknown;
|
|
994
1004
|
}
|
|
995
1005
|
interface FFIDServiceAccessDecision {
|
|
1006
|
+
/** Contract access; user access also requires seatAssigned === true. */
|
|
996
1007
|
hasAccess: boolean;
|
|
1008
|
+
/** User's active seat, passed through when returned. Gate user access with === true. */
|
|
1009
|
+
seatAssigned?: boolean | null;
|
|
997
1010
|
effectiveStatus: EffectiveSubscriptionStatus | null;
|
|
998
1011
|
isGrace: boolean;
|
|
999
1012
|
isBlocked: boolean;
|
|
@@ -1351,11 +1364,10 @@ interface FFIDConfig {
|
|
|
1351
1364
|
*/
|
|
1352
1365
|
cache?: FFIDCacheConfig | undefined;
|
|
1353
1366
|
/**
|
|
1354
|
-
*
|
|
1355
|
-
* token verification
|
|
1356
|
-
*
|
|
1357
|
-
*
|
|
1358
|
-
* surfaced through the normal error path (e.g. `NETWORK_ERROR`).
|
|
1367
|
+
* Per-HTTP timeout (ms): shared JSON APIs (e.g. checkSubscription/getProfile),
|
|
1368
|
+
* token verification/introspection, token OAuth exchange/refresh/revoke; also FFIDProvider.timeout.
|
|
1369
|
+
* Shared JSON includes body and preserves signals; refresh/retry have separate deadlines.
|
|
1370
|
+
* Excludes token getSession, cookie signOut, public/newsletter/inquiry; not a method deadline.
|
|
1359
1371
|
* @default undefined (no timeout, uses fetch default)
|
|
1360
1372
|
*/
|
|
1361
1373
|
timeout?: number | undefined;
|
|
@@ -276,11 +276,12 @@ interface FFIDSubscribeResponse {
|
|
|
276
276
|
code: string;
|
|
277
277
|
name: string;
|
|
278
278
|
};
|
|
279
|
+
/** `priceMonthly` は `customPricing` プランで `null`(個別見積り)。11.1.0 で `FFIDPlanInfo` と揃えた */
|
|
279
280
|
plan: {
|
|
280
281
|
id: string;
|
|
281
282
|
code: string;
|
|
282
283
|
name: string;
|
|
283
|
-
priceMonthly: number;
|
|
284
|
+
priceMonthly: number | null;
|
|
284
285
|
priceYearly: number | null;
|
|
285
286
|
trialDays: number;
|
|
286
287
|
};
|
|
@@ -909,12 +910,19 @@ interface FFIDBuyCreditsUrlParams {
|
|
|
909
910
|
type FFIDSubscriptionStatus = 'trialing' | 'active' | 'past_due' | 'canceled' | 'pending_invoice' | 'paused' | 'incomplete' | 'incomplete_expired' | 'unpaid';
|
|
910
911
|
interface FFIDSubscriptionCheckResponse {
|
|
911
912
|
hasActiveSubscription: boolean;
|
|
913
|
+
/**
|
|
914
|
+
* Active seat for the requested user; null for organization-only checks.
|
|
915
|
+
* Older servers omit this field. User access requires hasAccess AND
|
|
916
|
+
* seatAssigned === true; an omitted/null value is not proof of a seat.
|
|
917
|
+
*/
|
|
918
|
+
seatAssigned?: boolean | null;
|
|
912
919
|
/**
|
|
913
920
|
* Canonical access decision returned by FFID's `/subscriptions/ext/check`.
|
|
914
921
|
*
|
|
915
922
|
* This is the server-side source of truth for service gates. Consumers
|
|
916
923
|
* should not recompute access from `currentPeriodEnd`, `past_due_since`, or
|
|
917
924
|
* local payment timestamps.
|
|
925
|
+
* This is contract access; user access also requires seatAssigned === true.
|
|
918
926
|
*/
|
|
919
927
|
hasAccess?: boolean;
|
|
920
928
|
/** True when `effectiveStatus === 'past_due_grace'`. */
|
|
@@ -944,9 +952,11 @@ interface FFIDSubscriptionCheckResponse {
|
|
|
944
952
|
*/
|
|
945
953
|
pricingModel?: FFIDPricingModel | null;
|
|
946
954
|
/**
|
|
947
|
-
* Credit balance summary — flat plans only (10.0.0). `null` for per_seat, for
|
|
948
|
-
*
|
|
949
|
-
*
|
|
955
|
+
* Credit balance summary — paid flat plans only (10.0.0). `null` for per_seat, for a
|
|
956
|
+
* `free` plan (flat on the unified ladder since #6547, but outside credits — consume /
|
|
957
|
+
* balance return 409 `CREDITS_NOT_APPLICABLE`), for no subscription, **and** when FFID
|
|
958
|
+
* could not read the ledger, so `null` does not mean "not flat" (use `pricingModel`).
|
|
959
|
+
* Never affects `hasAccess`.
|
|
950
960
|
*/
|
|
951
961
|
credits?: FFIDSubscriptionCheckCredits | null;
|
|
952
962
|
/**
|
|
@@ -993,7 +1003,10 @@ interface FFIDServiceAccessError {
|
|
|
993
1003
|
details?: unknown;
|
|
994
1004
|
}
|
|
995
1005
|
interface FFIDServiceAccessDecision {
|
|
1006
|
+
/** Contract access; user access also requires seatAssigned === true. */
|
|
996
1007
|
hasAccess: boolean;
|
|
1008
|
+
/** User's active seat, passed through when returned. Gate user access with === true. */
|
|
1009
|
+
seatAssigned?: boolean | null;
|
|
997
1010
|
effectiveStatus: EffectiveSubscriptionStatus | null;
|
|
998
1011
|
isGrace: boolean;
|
|
999
1012
|
isBlocked: boolean;
|
|
@@ -1351,11 +1364,10 @@ interface FFIDConfig {
|
|
|
1351
1364
|
*/
|
|
1352
1365
|
cache?: FFIDCacheConfig | undefined;
|
|
1353
1366
|
/**
|
|
1354
|
-
*
|
|
1355
|
-
* token verification
|
|
1356
|
-
*
|
|
1357
|
-
*
|
|
1358
|
-
* surfaced through the normal error path (e.g. `NETWORK_ERROR`).
|
|
1367
|
+
* Per-HTTP timeout (ms): shared JSON APIs (e.g. checkSubscription/getProfile),
|
|
1368
|
+
* token verification/introspection, token OAuth exchange/refresh/revoke; also FFIDProvider.timeout.
|
|
1369
|
+
* Shared JSON includes body and preserves signals; refresh/retry have separate deadlines.
|
|
1370
|
+
* Excludes token getSession, cookie signOut, public/newsletter/inquiry; not a method deadline.
|
|
1359
1371
|
* @default undefined (no timeout, uses fetch default)
|
|
1360
1372
|
*/
|
|
1361
1373
|
timeout?: number | undefined;
|