@feelflow/ffid-sdk 9.0.0 → 10.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +88 -2
- package/dist/{chunk-TUXIJEEZ.js → chunk-ITSQIAO5.js} +387 -46
- package/dist/{chunk-Q2ZQJS36.cjs → chunk-VHOIA25Y.cjs} +403 -45
- 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-B0cORHac.d.ts → ffid-client-DUbQLYTN.d.ts} +688 -377
- package/dist/{ffid-client-6aLs9Fqc.d.cts → ffid-client-qcfCWLfs.d.cts} +688 -377
- package/dist/{index-BG7g99pK.d.cts → index-CWGoIgYL.d.cts} +814 -2
- package/dist/{index-BG7g99pK.d.ts → index-CWGoIgYL.d.ts} +814 -2
- package/dist/index.cjs +142 -74
- package/dist/index.d.cts +211 -508
- package/dist/index.d.ts +211 -508
- package/dist/index.js +2 -2
- package/dist/server/index.cjs +299 -13
- package/dist/server/index.d.cts +74 -3
- package/dist/server/index.d.ts +74 -3
- package/dist/server/index.js +297 -14
- package/dist/server/test/index.d.cts +1 -1
- package/dist/server/test/index.d.ts +1 -1
- package/dist/webhooks/index.d.cts +74 -2
- package/dist/webhooks/index.d.ts +74 -2
- package/package.json +1 -1
|
@@ -1374,7 +1374,7 @@ var FFID_ORGANIZATION_PROFILE_ERROR_CODES = {
|
|
|
1374
1374
|
};
|
|
1375
1375
|
|
|
1376
1376
|
// src/client/version-check.ts
|
|
1377
|
-
var SDK_VERSION = "
|
|
1377
|
+
var SDK_VERSION = "10.1.0";
|
|
1378
1378
|
var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
|
|
1379
1379
|
var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
|
|
1380
1380
|
function sdkHeaders() {
|
|
@@ -1730,8 +1730,11 @@ function createProvisioningMethods(deps) {
|
|
|
1730
1730
|
}
|
|
1731
1731
|
|
|
1732
1732
|
// src/client/seat-methods.ts
|
|
1733
|
+
function seatSummaryEndpoint(subscriptionId) {
|
|
1734
|
+
return `/api/v1/subscriptions/ext/${encodeURIComponent(subscriptionId)}/seats`;
|
|
1735
|
+
}
|
|
1733
1736
|
function seatsEndpoint(subscriptionId) {
|
|
1734
|
-
return
|
|
1737
|
+
return `${seatSummaryEndpoint(subscriptionId)}/assignments`;
|
|
1735
1738
|
}
|
|
1736
1739
|
function createSeatMethods(deps) {
|
|
1737
1740
|
const { fetchWithAuth, createError } = deps;
|
|
@@ -1741,6 +1744,12 @@ function createSeatMethods(deps) {
|
|
|
1741
1744
|
}
|
|
1742
1745
|
return fetchWithAuth(seatsEndpoint(params.subscriptionId));
|
|
1743
1746
|
}
|
|
1747
|
+
async function getSeats(subscriptionId) {
|
|
1748
|
+
if (!subscriptionId || !subscriptionId.trim()) {
|
|
1749
|
+
return { error: createError("VALIDATION_ERROR", "subscriptionId \u306F\u5FC5\u9808\u3067\u3059") };
|
|
1750
|
+
}
|
|
1751
|
+
return fetchWithAuth(seatSummaryEndpoint(subscriptionId));
|
|
1752
|
+
}
|
|
1744
1753
|
async function assignSeats(params) {
|
|
1745
1754
|
if (!params.subscriptionId) {
|
|
1746
1755
|
return { error: createError("VALIDATION_ERROR", "subscriptionId \u306F\u5FC5\u9808\u3067\u3059") };
|
|
@@ -1765,7 +1774,7 @@ function createSeatMethods(deps) {
|
|
|
1765
1774
|
{ method: "DELETE" }
|
|
1766
1775
|
);
|
|
1767
1776
|
}
|
|
1768
|
-
return { listSeatAssignments, assignSeats, unassignSeat };
|
|
1777
|
+
return { listSeatAssignments, getSeats, assignSeats, unassignSeat };
|
|
1769
1778
|
}
|
|
1770
1779
|
|
|
1771
1780
|
// src/client/profile-methods.ts
|
|
@@ -3630,6 +3639,225 @@ function createInquiryMethods(deps) {
|
|
|
3630
3639
|
return { create };
|
|
3631
3640
|
}
|
|
3632
3641
|
|
|
3642
|
+
// src/types/credits.ts
|
|
3643
|
+
var FFID_CREDITS_LOW_THRESHOLD_PERCENT = 20;
|
|
3644
|
+
var FFID_CREDITS_CONSUME_MIN_AMOUNT = 1;
|
|
3645
|
+
var FFID_CREDITS_CONSUME_MAX_AMOUNT = 1e6;
|
|
3646
|
+
var FFID_CREDITS_METADATA_MAX_BYTES = 4096;
|
|
3647
|
+
var FFID_CREDITS_HISTORY_MIN_LIMIT = 1;
|
|
3648
|
+
var FFID_CREDITS_HISTORY_MAX_LIMIT = 100;
|
|
3649
|
+
var FFID_CREDITS_HISTORY_DEFAULT_LIMIT = 20;
|
|
3650
|
+
var FFID_CREDIT_PACK_MIN_QUANTITY = 1;
|
|
3651
|
+
var FFID_CREDIT_PACK_MAX_QUANTITY = 10;
|
|
3652
|
+
var FFID_CREDITS_IDEMPOTENCY_KEY_PATTERN = /^[A-Za-z0-9._:-]{8,128}$/;
|
|
3653
|
+
var FFID_CREDITS_FEATURE_PATTERN = /^[a-z0-9][a-z0-9._-]{0,63}$/;
|
|
3654
|
+
var FFID_CREDIT_HISTORY_TYPES = ["grant", "consumption", "revocation"];
|
|
3655
|
+
var FFID_CREDIT_GRANT_KINDS = ["monthly", "manual", "pack"];
|
|
3656
|
+
|
|
3657
|
+
// src/client/credits-methods.ts
|
|
3658
|
+
var EXT_SUBSCRIPTIONS_PATH = "/api/v1/subscriptions/ext";
|
|
3659
|
+
var CREDIT_PACKS_ENDPOINT = `${EXT_SUBSCRIPTIONS_PATH}/credits/packs`;
|
|
3660
|
+
var CREDIT_PACK_CHECKOUT_ENDPOINT = `${CREDIT_PACKS_ENDPOINT}/checkout`;
|
|
3661
|
+
var PORTAL_SUBSCRIPTION_PATH = "/subscriptions";
|
|
3662
|
+
var BUY_CREDITS_QUERY = { key: "purchase", value: "credits" };
|
|
3663
|
+
var ORG_QUERY_KEY = "org";
|
|
3664
|
+
var FFID_CONTRACT_ID_PREFIX = "ffid:";
|
|
3665
|
+
var STRIPE_SUBSCRIPTION_ID_PREFIX = "sub_";
|
|
3666
|
+
var UUID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
3667
|
+
var VALIDATION_ERROR = "VALIDATION_ERROR";
|
|
3668
|
+
var FORBIDDEN = "FORBIDDEN";
|
|
3669
|
+
var utf8Encoder = new TextEncoder();
|
|
3670
|
+
function creditsEndpoint(subscriptionId, action) {
|
|
3671
|
+
return `${EXT_SUBSCRIPTIONS_PATH}/${encodeURIComponent(subscriptionId)}/credits/${action}`;
|
|
3672
|
+
}
|
|
3673
|
+
function isPlainObject2(value) {
|
|
3674
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
3675
|
+
}
|
|
3676
|
+
function isIntegerInRange(value, min, max) {
|
|
3677
|
+
return typeof value === "number" && Number.isInteger(value) && value >= min && value <= max;
|
|
3678
|
+
}
|
|
3679
|
+
function createCreditsMethods(deps) {
|
|
3680
|
+
const { fetchWithAuth, createError, authMode, baseUrl, serviceCode, logger } = deps;
|
|
3681
|
+
function validationError(field, message) {
|
|
3682
|
+
return { error: { ...createError(VALIDATION_ERROR, message), details: { field } } };
|
|
3683
|
+
}
|
|
3684
|
+
function forbidden(reason, message) {
|
|
3685
|
+
return { error: { ...createError(FORBIDDEN, message), details: { reason } } };
|
|
3686
|
+
}
|
|
3687
|
+
function missingSubscriptionId(subscriptionId) {
|
|
3688
|
+
return subscriptionId && subscriptionId.trim() ? null : validationError("subscriptionId", "subscriptionId \u306F\u5FC5\u9808\u3067\u3059");
|
|
3689
|
+
}
|
|
3690
|
+
async function getBalance(subscriptionId) {
|
|
3691
|
+
const invalid = missingSubscriptionId(subscriptionId);
|
|
3692
|
+
if (invalid) return invalid;
|
|
3693
|
+
return fetchWithAuth(creditsEndpoint(subscriptionId, "balance"));
|
|
3694
|
+
}
|
|
3695
|
+
async function listHistory(subscriptionId, options = {}) {
|
|
3696
|
+
const invalid = missingSubscriptionId(subscriptionId);
|
|
3697
|
+
if (invalid) return invalid;
|
|
3698
|
+
const query = new URLSearchParams();
|
|
3699
|
+
if (options.cursor !== void 0) query.set("cursor", options.cursor);
|
|
3700
|
+
if (options.limit !== void 0) {
|
|
3701
|
+
if (!isIntegerInRange(options.limit, FFID_CREDITS_HISTORY_MIN_LIMIT, FFID_CREDITS_HISTORY_MAX_LIMIT)) {
|
|
3702
|
+
return validationError(
|
|
3703
|
+
"limit",
|
|
3704
|
+
`limit \u306F ${FFID_CREDITS_HISTORY_MIN_LIMIT}\u301C${FFID_CREDITS_HISTORY_MAX_LIMIT} \u306E\u6574\u6570\u3067\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044`
|
|
3705
|
+
);
|
|
3706
|
+
}
|
|
3707
|
+
query.set("limit", String(options.limit));
|
|
3708
|
+
}
|
|
3709
|
+
if (options.type !== void 0) {
|
|
3710
|
+
if (!FFID_CREDIT_HISTORY_TYPES.includes(options.type)) {
|
|
3711
|
+
return validationError("type", `type \u306F ${FFID_CREDIT_HISTORY_TYPES.join(" / ")} \u306E\u3044\u305A\u308C\u304B\u3067\u3059`);
|
|
3712
|
+
}
|
|
3713
|
+
query.set("type", options.type);
|
|
3714
|
+
}
|
|
3715
|
+
const qs = query.toString();
|
|
3716
|
+
return fetchWithAuth(
|
|
3717
|
+
`${creditsEndpoint(subscriptionId, "history")}${qs ? `?${qs}` : ""}`
|
|
3718
|
+
);
|
|
3719
|
+
}
|
|
3720
|
+
async function listPacks(packServiceCode) {
|
|
3721
|
+
const resolved = packServiceCode ?? (authMode === "service-key" ? void 0 : serviceCode);
|
|
3722
|
+
if (resolved !== void 0 && !resolved.trim()) {
|
|
3723
|
+
return validationError("serviceCode", "serviceCode \u3092\u6307\u5B9A\u3059\u308B\u5834\u5408\u3001\u7A7A\u6587\u5B57\u306F\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093");
|
|
3724
|
+
}
|
|
3725
|
+
const qs = resolved === void 0 ? "" : `?${new URLSearchParams({ serviceCode: resolved }).toString()}`;
|
|
3726
|
+
return fetchWithAuth(`${CREDIT_PACKS_ENDPOINT}${qs}`);
|
|
3727
|
+
}
|
|
3728
|
+
async function createPackCheckout(params) {
|
|
3729
|
+
if (authMode !== "token") {
|
|
3730
|
+
return forbidden(
|
|
3731
|
+
"bearer_required",
|
|
3732
|
+
"createPackCheckout \u306F token \u30E2\u30FC\u30C9\uFF08Bearer\uFF09\u3067\u306E\u307F\u5229\u7528\u3067\u304D\u307E\u3059\u3002\u8CFC\u5165\u8005\u306E\u8A18\u9332\u306B\u5B9F\u30E6\u30FC\u30B6\u30FC\u304C\u5FC5\u8981\u306A\u305F\u3081\u3067\u3059"
|
|
3733
|
+
);
|
|
3734
|
+
}
|
|
3735
|
+
const invalid = missingSubscriptionId(params.subscriptionId);
|
|
3736
|
+
if (invalid) return invalid;
|
|
3737
|
+
for (const field of ["packCode", "successUrl", "cancelUrl"]) {
|
|
3738
|
+
if (!params[field] || !params[field].trim()) {
|
|
3739
|
+
return validationError(field, `${field} \u306F\u5FC5\u9808\u3067\u3059`);
|
|
3740
|
+
}
|
|
3741
|
+
}
|
|
3742
|
+
if (params.quantity !== void 0 && !isIntegerInRange(params.quantity, FFID_CREDIT_PACK_MIN_QUANTITY, FFID_CREDIT_PACK_MAX_QUANTITY)) {
|
|
3743
|
+
return validationError(
|
|
3744
|
+
"quantity",
|
|
3745
|
+
`quantity \u306F ${FFID_CREDIT_PACK_MIN_QUANTITY}\u301C${FFID_CREDIT_PACK_MAX_QUANTITY} \u306E\u6574\u6570\u3067\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044`
|
|
3746
|
+
);
|
|
3747
|
+
}
|
|
3748
|
+
const body = {
|
|
3749
|
+
subscriptionId: params.subscriptionId,
|
|
3750
|
+
packCode: params.packCode,
|
|
3751
|
+
successUrl: params.successUrl,
|
|
3752
|
+
cancelUrl: params.cancelUrl
|
|
3753
|
+
};
|
|
3754
|
+
if (params.quantity !== void 0) body.quantity = params.quantity;
|
|
3755
|
+
return fetchWithAuth(CREDIT_PACK_CHECKOUT_ENDPOINT, {
|
|
3756
|
+
method: "POST",
|
|
3757
|
+
body: JSON.stringify(body)
|
|
3758
|
+
});
|
|
3759
|
+
}
|
|
3760
|
+
function validateConsume(params) {
|
|
3761
|
+
const invalid = missingSubscriptionId(params.subscriptionId);
|
|
3762
|
+
if (invalid) return invalid;
|
|
3763
|
+
if (!isIntegerInRange(params.amount, FFID_CREDITS_CONSUME_MIN_AMOUNT, FFID_CREDITS_CONSUME_MAX_AMOUNT)) {
|
|
3764
|
+
return validationError(
|
|
3765
|
+
"amount",
|
|
3766
|
+
`amount \u306F ${FFID_CREDITS_CONSUME_MIN_AMOUNT}\u301C${FFID_CREDITS_CONSUME_MAX_AMOUNT} \u306E\u6574\u6570\u3067\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044`
|
|
3767
|
+
);
|
|
3768
|
+
}
|
|
3769
|
+
if (typeof params.idempotencyKey !== "string" || !FFID_CREDITS_IDEMPOTENCY_KEY_PATTERN.test(params.idempotencyKey)) {
|
|
3770
|
+
return validationError(
|
|
3771
|
+
"idempotencyKey",
|
|
3772
|
+
"idempotencyKey \u306E\u5F62\u5F0F\u304C\u4E0D\u6B63\u3067\u3059\uFF08\u82F1\u6570\u5B57\u3068 . _ : - \u306E 8\u301C128 \u6587\u5B57\u3002\u63A8\u5968\u306F feature:requestId\uFF09"
|
|
3773
|
+
);
|
|
3774
|
+
}
|
|
3775
|
+
if (typeof params.feature !== "string" || !FFID_CREDITS_FEATURE_PATTERN.test(params.feature)) {
|
|
3776
|
+
return validationError("feature", "feature \u306E\u5F62\u5F0F\u304C\u4E0D\u6B63\u3067\u3059\uFF08\u5C0F\u6587\u5B57\u82F1\u6570\u5B57\u3067\u59CB\u307E\u308B\u3001\u5C0F\u6587\u5B57\u82F1\u6570\u5B57\u3068 . _ - \u306E 1\u301C64 \u6587\u5B57\uFF09");
|
|
3777
|
+
}
|
|
3778
|
+
if (params.metadata !== void 0) {
|
|
3779
|
+
if (!isPlainObject2(params.metadata)) {
|
|
3780
|
+
return validationError("metadata", "metadata \u306F JSON \u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059");
|
|
3781
|
+
}
|
|
3782
|
+
let serialized;
|
|
3783
|
+
try {
|
|
3784
|
+
serialized = JSON.stringify(params.metadata);
|
|
3785
|
+
} catch {
|
|
3786
|
+
return validationError("metadata", "metadata \u306F JSON \u306B\u5909\u63DB\u3067\u304D\u308B\u5024\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\uFF08BigInt\u30FB\u5FAA\u74B0\u53C2\u7167\u306F\u4E0D\u53EF\uFF09");
|
|
3787
|
+
}
|
|
3788
|
+
if (utf8Encoder.encode(serialized).byteLength > FFID_CREDITS_METADATA_MAX_BYTES) {
|
|
3789
|
+
return validationError("metadata", `metadata \u306F ${FFID_CREDITS_METADATA_MAX_BYTES} \u30D0\u30A4\u30C8\u4EE5\u4E0B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`);
|
|
3790
|
+
}
|
|
3791
|
+
}
|
|
3792
|
+
if (params.userId !== void 0 && !UUID_PATTERN.test(params.userId)) {
|
|
3793
|
+
return validationError("userId", "userId \u306F\u6709\u52B9\u306AUUID\u5F62\u5F0F\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059");
|
|
3794
|
+
}
|
|
3795
|
+
return null;
|
|
3796
|
+
}
|
|
3797
|
+
async function consume(params) {
|
|
3798
|
+
if (authMode !== "service-key") {
|
|
3799
|
+
return forbidden(
|
|
3800
|
+
"api_key_required",
|
|
3801
|
+
"credits.consume \u306F service-key \u8A8D\u8A3C\uFF08X-Service-Api-Key\uFF09\u3067\u306E\u307F\u5229\u7528\u3067\u304D\u307E\u3059\u3002\u6D88\u8CBB\u306E\u5831\u544A\u306F\u30B5\u30FC\u30D3\u30B9\u306E\u30D0\u30C3\u30AF\u30A8\u30F3\u30C9\u304B\u3089\u884C\u3063\u3066\u304F\u3060\u3055\u3044"
|
|
3802
|
+
);
|
|
3803
|
+
}
|
|
3804
|
+
const invalid = validateConsume(params);
|
|
3805
|
+
if (invalid) return invalid;
|
|
3806
|
+
const body = {
|
|
3807
|
+
amount: params.amount,
|
|
3808
|
+
idempotencyKey: params.idempotencyKey,
|
|
3809
|
+
feature: params.feature
|
|
3810
|
+
};
|
|
3811
|
+
if (params.metadata !== void 0) body.metadata = params.metadata;
|
|
3812
|
+
if (params.userId !== void 0) body.userId = params.userId;
|
|
3813
|
+
return fetchWithAuth(creditsEndpoint(params.subscriptionId, "consume"), {
|
|
3814
|
+
method: "POST",
|
|
3815
|
+
body: JSON.stringify(body)
|
|
3816
|
+
});
|
|
3817
|
+
}
|
|
3818
|
+
function getBuyCreditsUrl(params) {
|
|
3819
|
+
const raw = params.subscriptionId?.trim() ?? "";
|
|
3820
|
+
if (raw.startsWith(STRIPE_SUBSCRIPTION_ID_PREFIX)) {
|
|
3821
|
+
return validationError(
|
|
3822
|
+
"subscriptionId",
|
|
3823
|
+
"getBuyCreditsUrl \u306B\u306F\u5951\u7D04\u306E UUID\uFF08\u307E\u305F\u306F ffid:<uuid>\uFF09\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002Stripe \u306E sub_... \u306F\u4F7F\u3048\u307E\u305B\u3093"
|
|
3824
|
+
);
|
|
3825
|
+
}
|
|
3826
|
+
const uuid = raw.startsWith(FFID_CONTRACT_ID_PREFIX) ? raw.slice(FFID_CONTRACT_ID_PREFIX.length) : raw;
|
|
3827
|
+
if (!UUID_PATTERN.test(uuid)) {
|
|
3828
|
+
return validationError("subscriptionId", "subscriptionId \u306F\u5951\u7D04\u306E UUID\uFF08\u307E\u305F\u306F ffid:<uuid>\uFF09\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059");
|
|
3829
|
+
}
|
|
3830
|
+
const query = new URLSearchParams({ [BUY_CREDITS_QUERY.key]: BUY_CREDITS_QUERY.value });
|
|
3831
|
+
if (params.orgId !== void 0 && params.orgId.trim()) {
|
|
3832
|
+
query.set(ORG_QUERY_KEY, params.orgId);
|
|
3833
|
+
}
|
|
3834
|
+
return { data: `${baseUrl}${PORTAL_SUBSCRIPTION_PATH}/${encodeURIComponent(uuid)}?${query.toString()}` };
|
|
3835
|
+
}
|
|
3836
|
+
function redirectToBuyCredits(params) {
|
|
3837
|
+
const result = getBuyCreditsUrl(params);
|
|
3838
|
+
if (result.error) {
|
|
3839
|
+
logger.warn("redirectToBuyCredits:", result.error.message);
|
|
3840
|
+
return { success: false, error: result.error.message };
|
|
3841
|
+
}
|
|
3842
|
+
if (typeof window === "undefined") {
|
|
3843
|
+
logger.warn("SSR \u74B0\u5883\u3067\u306F\u30EA\u30C0\u30A4\u30EC\u30AF\u30C8\u3067\u304D\u307E\u305B\u3093");
|
|
3844
|
+
return { success: false, error: "SSR \u74B0\u5883\u3067\u306F\u30EA\u30C0\u30A4\u30EC\u30AF\u30C8\u3067\u304D\u307E\u305B\u3093" };
|
|
3845
|
+
}
|
|
3846
|
+
logger.debug("Redirecting to buy credits:", result.data);
|
|
3847
|
+
window.location.href = result.data;
|
|
3848
|
+
return { success: true };
|
|
3849
|
+
}
|
|
3850
|
+
return {
|
|
3851
|
+
getBalance,
|
|
3852
|
+
listHistory,
|
|
3853
|
+
listPacks,
|
|
3854
|
+
createPackCheckout,
|
|
3855
|
+
consume,
|
|
3856
|
+
getBuyCreditsUrl,
|
|
3857
|
+
redirectToBuyCredits
|
|
3858
|
+
};
|
|
3859
|
+
}
|
|
3860
|
+
|
|
3633
3861
|
// src/subscriptions/types.ts
|
|
3634
3862
|
var EFFECTIVE_SUBSCRIPTION_STATUSES = [
|
|
3635
3863
|
"active",
|
|
@@ -3763,7 +3991,12 @@ function toServiceAccessDecision(response, allowGrace) {
|
|
|
3763
3991
|
planCode: response.planCode,
|
|
3764
3992
|
currentPeriodEnd: response.currentPeriodEnd,
|
|
3765
3993
|
gracePeriodEndsAt: response.gracePeriodEndsAt ?? null,
|
|
3766
|
-
reactivatable: response.reactivatable ?? false
|
|
3994
|
+
reactivatable: response.reactivatable ?? false,
|
|
3995
|
+
// Informational pass-through (10.0.0). Deliberately not part of hasAccess /
|
|
3996
|
+
// denialReason: credits and the member limit never gate access (CREDITS_API §1-5).
|
|
3997
|
+
...response.pricingModel !== void 0 ? { pricingModel: response.pricingModel } : {},
|
|
3998
|
+
...response.credits !== void 0 ? { credits: response.credits } : {},
|
|
3999
|
+
...response.memberLimitReached !== void 0 ? { memberLimitReached: response.memberLimitReached } : {}
|
|
3767
4000
|
};
|
|
3768
4001
|
}
|
|
3769
4002
|
function failClosedServiceAccessDecision(params, error) {
|
|
@@ -3810,6 +4043,19 @@ var FFID_SUBSCRIPTION_ERROR_CODES = {
|
|
|
3810
4043
|
FREE_DOWNGRADE_NOT_ALLOWED: "FREE_DOWNGRADE_NOT_ALLOWED",
|
|
3811
4044
|
PAYMENT_METHOD_REQUIRED: "PAYMENT_METHOD_REQUIRED"
|
|
3812
4045
|
};
|
|
4046
|
+
var FFID_CREDITS_ERROR_CODES = {
|
|
4047
|
+
CREDITS_INSUFFICIENT: "CREDITS_INSUFFICIENT",
|
|
4048
|
+
CREDITS_IDEMPOTENCY_CONFLICT: "CREDITS_IDEMPOTENCY_CONFLICT",
|
|
4049
|
+
CREDITS_NOT_APPLICABLE: "CREDITS_NOT_APPLICABLE",
|
|
4050
|
+
CREDITS_BALANCE_CAP_EXCEEDED: "CREDITS_BALANCE_CAP_EXCEEDED",
|
|
4051
|
+
SEAT_BILLING_NOT_APPLICABLE: "SEAT_BILLING_NOT_APPLICABLE",
|
|
4052
|
+
MEMBER_LIMIT_REACHED: "MEMBER_LIMIT_REACHED",
|
|
4053
|
+
CREDIT_PACK_NOT_FOUND: "CREDIT_PACK_NOT_FOUND",
|
|
4054
|
+
CREDIT_PACK_REGION_NOT_SUPPORTED: "CREDIT_PACK_REGION_NOT_SUPPORTED",
|
|
4055
|
+
CREDIT_PACK_STRIPE_NOT_SYNCED: "CREDIT_PACK_STRIPE_NOT_SYNCED",
|
|
4056
|
+
CREDIT_PACK_STRIPE_OUT_OF_SYNC: "CREDIT_PACK_STRIPE_OUT_OF_SYNC",
|
|
4057
|
+
CREDIT_PACK_CHANGED: "CREDIT_PACK_CHANGED"
|
|
4058
|
+
};
|
|
3813
4059
|
|
|
3814
4060
|
// src/client/ffid-client.ts
|
|
3815
4061
|
var UNAUTHORIZED_STATUS2 = 401;
|
|
@@ -4137,7 +4383,7 @@ function createFFIDClient(config) {
|
|
|
4137
4383
|
fetchWithAuth,
|
|
4138
4384
|
createError
|
|
4139
4385
|
});
|
|
4140
|
-
const { listSeatAssignments, assignSeats, unassignSeat } = createSeatMethods({
|
|
4386
|
+
const { listSeatAssignments, getSeats, assignSeats, unassignSeat } = createSeatMethods({
|
|
4141
4387
|
fetchWithAuth,
|
|
4142
4388
|
createError
|
|
4143
4389
|
});
|
|
@@ -4244,6 +4490,14 @@ function createFFIDClient(config) {
|
|
|
4244
4490
|
fetchWithAuth,
|
|
4245
4491
|
createError
|
|
4246
4492
|
});
|
|
4493
|
+
const credits = createCreditsMethods({
|
|
4494
|
+
fetchWithAuth,
|
|
4495
|
+
createError,
|
|
4496
|
+
authMode,
|
|
4497
|
+
baseUrl,
|
|
4498
|
+
serviceCode: config.serviceCode,
|
|
4499
|
+
logger
|
|
4500
|
+
});
|
|
4247
4501
|
const verifyAccessToken = createVerifyAccessToken({
|
|
4248
4502
|
authMode,
|
|
4249
4503
|
baseUrl,
|
|
@@ -4299,6 +4553,7 @@ function createFFIDClient(config) {
|
|
|
4299
4553
|
getInvoice,
|
|
4300
4554
|
retryPayment,
|
|
4301
4555
|
listSeatAssignments,
|
|
4556
|
+
getSeats,
|
|
4302
4557
|
assignSeats,
|
|
4303
4558
|
unassignSeat,
|
|
4304
4559
|
listPlans,
|
|
@@ -4309,13 +4564,16 @@ function createFFIDClient(config) {
|
|
|
4309
4564
|
cancelSubscription,
|
|
4310
4565
|
cancelPendingDowngrade,
|
|
4311
4566
|
previewPlanChange,
|
|
4567
|
+
/** @deprecated 10.0.0: per_seat (praxis) only; removed in 11.0.0 */
|
|
4312
4568
|
previewSeatChange,
|
|
4313
4569
|
verifyAccessToken,
|
|
4314
4570
|
getSubscribeUrl,
|
|
4315
4571
|
redirectToSubscribe,
|
|
4316
4572
|
getChangePlanUrl,
|
|
4317
4573
|
redirectToChangePlan,
|
|
4574
|
+
/** @deprecated 10.0.0: per_seat (praxis) only; removed in 11.0.0 */
|
|
4318
4575
|
getChangeSeatsUrl,
|
|
4576
|
+
/** @deprecated 10.0.0: per_seat (praxis) only; removed in 11.0.0 */
|
|
4319
4577
|
redirectToChangeSeats,
|
|
4320
4578
|
getRecoverPaymentUrl,
|
|
4321
4579
|
redirectToRecoverPayment,
|
|
@@ -4331,6 +4589,8 @@ function createFFIDClient(config) {
|
|
|
4331
4589
|
newsletter,
|
|
4332
4590
|
/** Inquiry methods (create) */
|
|
4333
4591
|
inquiry,
|
|
4592
|
+
/** Credits methods for flat plans (consume / balance / history / packs) */
|
|
4593
|
+
credits,
|
|
4334
4594
|
/** Token store (token mode only) */
|
|
4335
4595
|
tokenStore,
|
|
4336
4596
|
/**
|
|
@@ -4349,6 +4609,50 @@ function createFFIDClient(config) {
|
|
|
4349
4609
|
};
|
|
4350
4610
|
}
|
|
4351
4611
|
|
|
4612
|
+
// src/client/authorization-error.ts
|
|
4613
|
+
var FFID_OAUTH_DENIAL_REASONS = [
|
|
4614
|
+
/** The user is not a member of the organization */
|
|
4615
|
+
"no_membership",
|
|
4616
|
+
/** The organization has no usable subscription for the service */
|
|
4617
|
+
"no_active_subscription",
|
|
4618
|
+
/** The organization has a subscription, but the user has no seat in it */
|
|
4619
|
+
"no_seat_assignment",
|
|
4620
|
+
/** The subscription has expired (canceled / past due beyond grace) */
|
|
4621
|
+
"subscription_expired",
|
|
4622
|
+
/** The flat plan's member limit is full, so no seat could be given */
|
|
4623
|
+
"member_limit_reached"
|
|
4624
|
+
];
|
|
4625
|
+
function isFFIDOAuthDenialReason(value) {
|
|
4626
|
+
return typeof value === "string" && FFID_OAUTH_DENIAL_REASONS.includes(value);
|
|
4627
|
+
}
|
|
4628
|
+
var DEFAULT_AUTHORIZATION_ERROR_MESSAGE = "\u8A8D\u53EF\u30B5\u30FC\u30D0\u30FC\u304C\u30A8\u30E9\u30FC\u3092\u8FD4\u3057\u307E\u3057\u305F";
|
|
4629
|
+
function buildAuthorizationError(params) {
|
|
4630
|
+
const oauthError = params.get("error");
|
|
4631
|
+
if (!oauthError) return null;
|
|
4632
|
+
const rawReason = params.get("denial_reason");
|
|
4633
|
+
const errorDescription = params.get("error_description");
|
|
4634
|
+
const details = {
|
|
4635
|
+
source: "authorization",
|
|
4636
|
+
denialReason: isFFIDOAuthDenialReason(rawReason) ? rawReason : null,
|
|
4637
|
+
errorDescription
|
|
4638
|
+
};
|
|
4639
|
+
return {
|
|
4640
|
+
code: oauthError,
|
|
4641
|
+
message: errorDescription ?? DEFAULT_AUTHORIZATION_ERROR_MESSAGE,
|
|
4642
|
+
details: { ...details }
|
|
4643
|
+
};
|
|
4644
|
+
}
|
|
4645
|
+
function getFFIDAuthorizationError(error) {
|
|
4646
|
+
const details = error?.details;
|
|
4647
|
+
if (!error || !details || details.source !== "authorization") return null;
|
|
4648
|
+
const description = details.errorDescription;
|
|
4649
|
+
return {
|
|
4650
|
+
oauthError: error.code,
|
|
4651
|
+
denialReason: isFFIDOAuthDenialReason(details.denialReason) ? details.denialReason : null,
|
|
4652
|
+
errorDescription: typeof description === "string" ? description : null
|
|
4653
|
+
};
|
|
4654
|
+
}
|
|
4655
|
+
|
|
4352
4656
|
// src/client/callback.ts
|
|
4353
4657
|
var CALLBACK_ERROR_CODES = {
|
|
4354
4658
|
/** Stored state missing or did not match the callback `state` (CSRF guard) */
|
|
@@ -4373,16 +4677,43 @@ function extractSearchParams(source) {
|
|
|
4373
4677
|
return new URLSearchParams(query);
|
|
4374
4678
|
}
|
|
4375
4679
|
}
|
|
4376
|
-
|
|
4680
|
+
var CODE_CALLBACK_PARAMS = ["code", "state"];
|
|
4681
|
+
var ERROR_CALLBACK_CONSUMED_PARAMS = ["state"];
|
|
4682
|
+
function cleanCallbackUrlParams(logger, names) {
|
|
4377
4683
|
try {
|
|
4378
4684
|
const cleanUrl = new URL(window.location.href);
|
|
4379
|
-
cleanUrl.searchParams.delete(
|
|
4380
|
-
cleanUrl.searchParams.delete("state");
|
|
4685
|
+
for (const name of names) cleanUrl.searchParams.delete(name);
|
|
4381
4686
|
window.history.replaceState({}, "", cleanUrl.toString());
|
|
4382
4687
|
} catch (error) {
|
|
4383
4688
|
logger.warn("handleRedirectCallback: URL \u306E\u30AF\u30EA\u30FC\u30F3\u30A2\u30C3\u30D7\u306B\u5931\u6557\u3057\u307E\u3057\u305F:", error);
|
|
4384
4689
|
}
|
|
4385
4690
|
}
|
|
4691
|
+
function validateCallbackState(client, urlState) {
|
|
4692
|
+
const { logger } = client;
|
|
4693
|
+
const storedState = retrieveState(logger);
|
|
4694
|
+
if (storedState === null && urlState === null) return null;
|
|
4695
|
+
if (storedState !== null && storedState === urlState) return null;
|
|
4696
|
+
if (storedState === null && !isStateStorageAvailable()) {
|
|
4697
|
+
logger.error(
|
|
4698
|
+
"handleRedirectCallback: OAuth state \u3092\u4FDD\u5B58\u3067\u304D\u308B storage \u304C\u5229\u7528\u3067\u304D\u306A\u3044\u305F\u3081 CSRF \u691C\u8A3C\u304C\u3067\u304D\u307E\u305B\u3093\uFF08iOS private mode \u7B49\uFF09"
|
|
4699
|
+
);
|
|
4700
|
+
return {
|
|
4701
|
+
error: client.createError(
|
|
4702
|
+
CALLBACK_ERROR_CODES.STATE_UNAVAILABLE,
|
|
4703
|
+
"OAuth state \u3092\u4FDD\u5B58\u3067\u304D\u308B storage \u304C\u5229\u7528\u3067\u304D\u306A\u3044\u305F\u3081\u8A8D\u8A3C\u3092\u5B8C\u4E86\u3067\u304D\u307E\u305B\u3093\u3002\u30D6\u30E9\u30A6\u30B6\u306E\u30D7\u30E9\u30A4\u30D9\u30FC\u30C8\u30E2\u30FC\u30C9\u3084\u30B9\u30C8\u30EC\u30FC\u30B8\u8A2D\u5B9A\u3092\u3054\u78BA\u8A8D\u304F\u3060\u3055\u3044"
|
|
4704
|
+
)
|
|
4705
|
+
};
|
|
4706
|
+
}
|
|
4707
|
+
logger.error(
|
|
4708
|
+
"handleRedirectCallback: OAuth state mismatch or omitted (possible CSRF) \u2014 \u8A8D\u8A3C\u3092\u4E2D\u6B62\u3057\u307E\u3057\u305F\u3002\u6D88\u8CBB\u6E08\u307F callback \u30D1\u30E9\u30E1\u30FC\u30BF\u306E\u518D\u51E6\u7406\uFF08`cleanUrl: false` \u5229\u7528\u6642\u306E cleanup \u6F0F\u308C\u3084 reload \u7B49\uFF09\u3067\u3082\u767A\u751F\u3057\u307E\u3059"
|
|
4709
|
+
);
|
|
4710
|
+
return {
|
|
4711
|
+
error: client.createError(
|
|
4712
|
+
CALLBACK_ERROR_CODES.STATE_MISMATCH,
|
|
4713
|
+
"OAuth state \u304C\u4E00\u81F4\u3057\u307E\u305B\u3093\u3002CSRF \u306E\u53EF\u80FD\u6027\u304C\u3042\u308B\u305F\u3081\u8A8D\u8A3C\u3092\u4E2D\u6B62\u3057\u307E\u3057\u305F"
|
|
4714
|
+
)
|
|
4715
|
+
};
|
|
4716
|
+
}
|
|
4386
4717
|
async function handleRedirectCallback(client, options) {
|
|
4387
4718
|
const { logger } = client;
|
|
4388
4719
|
const hasWindow = typeof window !== "undefined";
|
|
@@ -4399,6 +4730,24 @@ async function handleRedirectCallback(client, options) {
|
|
|
4399
4730
|
const params = extractSearchParams(source);
|
|
4400
4731
|
const code = params.get("code");
|
|
4401
4732
|
const urlState = params.get("state");
|
|
4733
|
+
const authorizationError = buildAuthorizationError(params);
|
|
4734
|
+
if (authorizationError && urlState !== null) {
|
|
4735
|
+
const stateError2 = validateCallbackState(client, urlState);
|
|
4736
|
+
if (stateError2) return stateError2;
|
|
4737
|
+
retrieveCodeVerifier(logger);
|
|
4738
|
+
logger.warn("handleRedirectCallback: \u8A8D\u53EF\u30B5\u30FC\u30D0\u30FC\u304C\u30A8\u30E9\u30FC\u3092\u8FD4\u3057\u307E\u3057\u305F:", {
|
|
4739
|
+
error: authorizationError.code,
|
|
4740
|
+
denialReason: params.get("denial_reason")
|
|
4741
|
+
});
|
|
4742
|
+
if (hasWindow) {
|
|
4743
|
+
if (options?.cleanUrl !== false) {
|
|
4744
|
+
cleanCallbackUrlParams(logger, ERROR_CALLBACK_CONSUMED_PARAMS);
|
|
4745
|
+
} else {
|
|
4746
|
+
logger.debug("handleRedirectCallback: cleanUrl=false \u306E\u305F\u3081 URL cleanup \u3092 consumer \u306B\u59D4\u8B72\u3057\u307E\u3057\u305F");
|
|
4747
|
+
}
|
|
4748
|
+
}
|
|
4749
|
+
return { error: authorizationError };
|
|
4750
|
+
}
|
|
4402
4751
|
if (!code) {
|
|
4403
4752
|
logger.warn("handleRedirectCallback: \u8A8D\u53EF\u30B3\u30FC\u30C9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093");
|
|
4404
4753
|
return {
|
|
@@ -4408,37 +4757,13 @@ async function handleRedirectCallback(client, options) {
|
|
|
4408
4757
|
)
|
|
4409
4758
|
};
|
|
4410
4759
|
}
|
|
4411
|
-
const
|
|
4412
|
-
if (
|
|
4413
|
-
const stateMatches = storedState !== null && storedState === urlState;
|
|
4414
|
-
if (!stateMatches) {
|
|
4415
|
-
if (storedState === null && !isStateStorageAvailable()) {
|
|
4416
|
-
logger.error(
|
|
4417
|
-
"handleRedirectCallback: OAuth state \u3092\u4FDD\u5B58\u3067\u304D\u308B storage \u304C\u5229\u7528\u3067\u304D\u306A\u3044\u305F\u3081 CSRF \u691C\u8A3C\u304C\u3067\u304D\u307E\u305B\u3093\uFF08iOS private mode \u7B49\uFF09"
|
|
4418
|
-
);
|
|
4419
|
-
return {
|
|
4420
|
-
error: client.createError(
|
|
4421
|
-
CALLBACK_ERROR_CODES.STATE_UNAVAILABLE,
|
|
4422
|
-
"OAuth state \u3092\u4FDD\u5B58\u3067\u304D\u308B storage \u304C\u5229\u7528\u3067\u304D\u306A\u3044\u305F\u3081\u8A8D\u8A3C\u3092\u5B8C\u4E86\u3067\u304D\u307E\u305B\u3093\u3002\u30D6\u30E9\u30A6\u30B6\u306E\u30D7\u30E9\u30A4\u30D9\u30FC\u30C8\u30E2\u30FC\u30C9\u3084\u30B9\u30C8\u30EC\u30FC\u30B8\u8A2D\u5B9A\u3092\u3054\u78BA\u8A8D\u304F\u3060\u3055\u3044"
|
|
4423
|
-
)
|
|
4424
|
-
};
|
|
4425
|
-
}
|
|
4426
|
-
logger.error(
|
|
4427
|
-
"handleRedirectCallback: OAuth state mismatch or omitted (possible CSRF) \u2014 \u8A8D\u8A3C\u3092\u4E2D\u6B62\u3057\u307E\u3057\u305F\u3002\u6D88\u8CBB\u6E08\u307F callback \u30D1\u30E9\u30E1\u30FC\u30BF\u306E\u518D\u51E6\u7406\uFF08`cleanUrl: false` \u5229\u7528\u6642\u306E cleanup \u6F0F\u308C\u3084 reload \u7B49\uFF09\u3067\u3082\u767A\u751F\u3057\u307E\u3059"
|
|
4428
|
-
);
|
|
4429
|
-
return {
|
|
4430
|
-
error: client.createError(
|
|
4431
|
-
CALLBACK_ERROR_CODES.STATE_MISMATCH,
|
|
4432
|
-
"OAuth state \u304C\u4E00\u81F4\u3057\u307E\u305B\u3093\u3002CSRF \u306E\u53EF\u80FD\u6027\u304C\u3042\u308B\u305F\u3081\u8A8D\u8A3C\u3092\u4E2D\u6B62\u3057\u307E\u3057\u305F"
|
|
4433
|
-
)
|
|
4434
|
-
};
|
|
4435
|
-
}
|
|
4436
|
-
}
|
|
4760
|
+
const stateError = validateCallbackState(client, urlState);
|
|
4761
|
+
if (stateError) return stateError;
|
|
4437
4762
|
const verifier = retrieveCodeVerifier(logger);
|
|
4438
4763
|
const result = await client.exchangeCodeForTokens(code, verifier ?? void 0);
|
|
4439
4764
|
if (!result.error && hasWindow) {
|
|
4440
4765
|
if (options?.cleanUrl !== false) {
|
|
4441
|
-
cleanCallbackUrlParams(logger);
|
|
4766
|
+
cleanCallbackUrlParams(logger, CODE_CALLBACK_PARAMS);
|
|
4442
4767
|
} else {
|
|
4443
4768
|
logger.debug("handleRedirectCallback: cleanUrl=false \u306E\u305F\u3081 URL cleanup \u3092 consumer \u306B\u59D4\u8B72\u3057\u307E\u3057\u305F");
|
|
4444
4769
|
}
|
|
@@ -4447,6 +4772,13 @@ async function handleRedirectCallback(client, options) {
|
|
|
4447
4772
|
}
|
|
4448
4773
|
var DEFAULT_REFRESH_INTERVAL_MS = 5 * 60 * 1e3;
|
|
4449
4774
|
var TOKEN_REFRESH_RATIO = 0.8;
|
|
4775
|
+
function resolveCallbackKey(params) {
|
|
4776
|
+
const code = params.get("code");
|
|
4777
|
+
if (code) return code;
|
|
4778
|
+
const error = params.get("error");
|
|
4779
|
+
const state = params.get("state");
|
|
4780
|
+
return error && state ? `error:${error}:${state}` : null;
|
|
4781
|
+
}
|
|
4450
4782
|
var FFIDContext = createContext(null);
|
|
4451
4783
|
var FFIDClientContext = createContext(null);
|
|
4452
4784
|
function FFIDProvider({
|
|
@@ -4626,19 +4958,26 @@ function FFIDProvider({
|
|
|
4626
4958
|
},
|
|
4627
4959
|
[organizations, client]
|
|
4628
4960
|
);
|
|
4629
|
-
const
|
|
4961
|
+
const handledCallbackRef = useRef(null);
|
|
4962
|
+
const callbackPendingRef = useRef(false);
|
|
4963
|
+
const authorizationDeniedRef = useRef(false);
|
|
4630
4964
|
useEffect(() => {
|
|
4631
4965
|
if (client.authMode !== "token") return;
|
|
4632
4966
|
if (typeof window === "undefined") return;
|
|
4633
|
-
const
|
|
4634
|
-
|
|
4635
|
-
if (
|
|
4636
|
-
|
|
4637
|
-
|
|
4638
|
-
client.logger.debug("
|
|
4967
|
+
const callbackKey = resolveCallbackKey(new URLSearchParams(window.location.search));
|
|
4968
|
+
if (!callbackKey) return;
|
|
4969
|
+
if (handledCallbackRef.current === callbackKey) return;
|
|
4970
|
+
handledCallbackRef.current = callbackKey;
|
|
4971
|
+
callbackPendingRef.current = true;
|
|
4972
|
+
client.logger.debug("OAuth callback detected, handling it");
|
|
4639
4973
|
handleRedirectCallback(client, { cleanUrl: cleanCallbackUrl }).then((result) => {
|
|
4640
4974
|
if (result.error) {
|
|
4641
|
-
|
|
4975
|
+
if (getFFIDAuthorizationError(result.error)) {
|
|
4976
|
+
client.logger.warn("FFID \u304C\u30ED\u30B0\u30A4\u30F3\u3092\u62D2\u5426\u3057\u307E\u3057\u305F:", result.error);
|
|
4977
|
+
authorizationDeniedRef.current = true;
|
|
4978
|
+
} else {
|
|
4979
|
+
client.logger.error("Token exchange failed:", result.error);
|
|
4980
|
+
}
|
|
4642
4981
|
if (result.error.code === FFID_ERROR_CODES.STATE_MISMATCH_ERROR && client.tokenStore.getTokens()) {
|
|
4643
4982
|
client.logger.debug(
|
|
4644
4983
|
"Stale callback rejected but stored tokens present, restoring session via refresh"
|
|
@@ -4656,13 +4995,15 @@ function FFIDProvider({
|
|
|
4656
4995
|
}).catch((err) => {
|
|
4657
4996
|
client.logger.error("Token exchange error:", err);
|
|
4658
4997
|
setIsLoading(false);
|
|
4998
|
+
}).finally(() => {
|
|
4999
|
+
callbackPendingRef.current = false;
|
|
4659
5000
|
});
|
|
4660
5001
|
}, [client]);
|
|
4661
5002
|
useEffect(() => {
|
|
4662
5003
|
if (client.authMode === "token") {
|
|
5004
|
+
if (callbackPendingRef.current || authorizationDeniedRef.current) return;
|
|
4663
5005
|
if (typeof window !== "undefined") {
|
|
4664
|
-
|
|
4665
|
-
if (urlParams.has("code")) {
|
|
5006
|
+
if (resolveCallbackKey(new URLSearchParams(window.location.search))) {
|
|
4666
5007
|
return;
|
|
4667
5008
|
}
|
|
4668
5009
|
}
|
|
@@ -6477,4 +6818,4 @@ function FFIDInquiryForm({
|
|
|
6477
6818
|
);
|
|
6478
6819
|
}
|
|
6479
6820
|
|
|
6480
|
-
export { ACCESS_GRANTING_EFFECTIVE_STATUSES, AGENCY_INVITE_COOKIE_MAX_AGE_SEC, AGENCY_INVITE_COOKIE_NAME, AGENCY_INVITE_TOKEN_PARAM, AGENCY_INVITE_TOKEN_REDACTION, BLOCKING_EFFECTIVE_STATUSES, CATALOG_HASH_PATTERN, DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, EFFECTIVE_SUBSCRIPTION_STATUSES, FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDCatalogHashError, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDProvider, FFIDSDKError, FFIDSubscriptionBadge, FFIDUserMenu, FFID_ALLOWED_ORGANIZATION_LOGO_MIME_TYPES, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_CATALOG_ENVIRONMENTS, FFID_CATALOG_PUBLICATION_STATUSES, FFID_COMPANY_SIZE_CODES, FFID_ERROR_CODES, FFID_INDUSTRY_CODES, FFID_INQUIRY_ACQUISITION_SOURCES, FFID_INQUIRY_CATEGORIES, FFID_INQUIRY_CATEGORIES_SITE_2026, FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_BYTES, FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_MB, FFID_ORGANIZATION_PROFILE_ERROR_CODES, FFID_SUBSCRIPTION_ERROR_CODES, canonicalizeCatalogValue, captureAgencyInviteToken, cleanupStateStorage, clearAgencyInviteToken, computeEffectiveStatusFromSession, computeFFIDCheckoutCopyHash, computeLegalDisclosureHash, computePaymentConfigurationHash, computePraxisCopyHash, computeScopeHash, computeTaxConfigurationHash, createFFIDAnnouncementsClient, createFFIDClient, createTokenStore, generateCodeChallenge, generateCodeVerifier, handleRedirectCallback, hasAccessFromUserinfo, hashCanonicalJson, isBlockedFromUserinfo, isFFIDInquiryAcquisitionSource, isFFIDInquiryCategorySite2026, normalizeRedirectUri, readAgencyInviteCookie, readAgencyInviteToken, redactAgencyInviteToken, retrieveCodeVerifier, retrieveState, sha256Hex, storeCodeVerifier, storeState, useFFID, useFFIDAnnouncements, useFFIDContext, useSubscription, validatePublishedCatalog, withSubscription };
|
|
6821
|
+
export { ACCESS_GRANTING_EFFECTIVE_STATUSES, AGENCY_INVITE_COOKIE_MAX_AGE_SEC, AGENCY_INVITE_COOKIE_NAME, AGENCY_INVITE_TOKEN_PARAM, AGENCY_INVITE_TOKEN_REDACTION, BLOCKING_EFFECTIVE_STATUSES, CATALOG_HASH_PATTERN, DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, EFFECTIVE_SUBSCRIPTION_STATUSES, FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDCatalogHashError, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDProvider, FFIDSDKError, FFIDSubscriptionBadge, FFIDUserMenu, FFID_ALLOWED_ORGANIZATION_LOGO_MIME_TYPES, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_CATALOG_ENVIRONMENTS, FFID_CATALOG_PUBLICATION_STATUSES, FFID_COMPANY_SIZE_CODES, FFID_CREDITS_CONSUME_MAX_AMOUNT, FFID_CREDITS_CONSUME_MIN_AMOUNT, FFID_CREDITS_ERROR_CODES, FFID_CREDITS_FEATURE_PATTERN, FFID_CREDITS_HISTORY_DEFAULT_LIMIT, FFID_CREDITS_HISTORY_MAX_LIMIT, FFID_CREDITS_HISTORY_MIN_LIMIT, FFID_CREDITS_IDEMPOTENCY_KEY_PATTERN, FFID_CREDITS_LOW_THRESHOLD_PERCENT, FFID_CREDITS_METADATA_MAX_BYTES, FFID_CREDIT_GRANT_KINDS, FFID_CREDIT_HISTORY_TYPES, FFID_CREDIT_PACK_MAX_QUANTITY, FFID_CREDIT_PACK_MIN_QUANTITY, FFID_ERROR_CODES, FFID_INDUSTRY_CODES, FFID_INQUIRY_ACQUISITION_SOURCES, FFID_INQUIRY_CATEGORIES, FFID_INQUIRY_CATEGORIES_SITE_2026, FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_BYTES, FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_MB, FFID_OAUTH_DENIAL_REASONS, FFID_ORGANIZATION_PROFILE_ERROR_CODES, FFID_SUBSCRIPTION_ERROR_CODES, canonicalizeCatalogValue, captureAgencyInviteToken, cleanupStateStorage, clearAgencyInviteToken, computeEffectiveStatusFromSession, computeFFIDCheckoutCopyHash, computeLegalDisclosureHash, computePaymentConfigurationHash, computePraxisCopyHash, computeScopeHash, computeTaxConfigurationHash, createFFIDAnnouncementsClient, createFFIDClient, createTokenStore, generateCodeChallenge, generateCodeVerifier, getFFIDAuthorizationError, handleRedirectCallback, hasAccessFromUserinfo, hashCanonicalJson, isBlockedFromUserinfo, isFFIDInquiryAcquisitionSource, isFFIDInquiryCategorySite2026, isFFIDOAuthDenialReason, normalizeRedirectUri, readAgencyInviteCookie, readAgencyInviteToken, redactAgencyInviteToken, retrieveCodeVerifier, retrieveState, sha256Hex, storeCodeVerifier, storeState, useFFID, useFFIDAnnouncements, useFFIDContext, useSubscription, validatePublishedCatalog, withSubscription };
|