@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
|
@@ -1376,7 +1376,7 @@ var FFID_ORGANIZATION_PROFILE_ERROR_CODES = {
|
|
|
1376
1376
|
};
|
|
1377
1377
|
|
|
1378
1378
|
// src/client/version-check.ts
|
|
1379
|
-
var SDK_VERSION = "
|
|
1379
|
+
var SDK_VERSION = "10.1.0";
|
|
1380
1380
|
var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
|
|
1381
1381
|
var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
|
|
1382
1382
|
function sdkHeaders() {
|
|
@@ -1732,8 +1732,11 @@ function createProvisioningMethods(deps) {
|
|
|
1732
1732
|
}
|
|
1733
1733
|
|
|
1734
1734
|
// src/client/seat-methods.ts
|
|
1735
|
+
function seatSummaryEndpoint(subscriptionId) {
|
|
1736
|
+
return `/api/v1/subscriptions/ext/${encodeURIComponent(subscriptionId)}/seats`;
|
|
1737
|
+
}
|
|
1735
1738
|
function seatsEndpoint(subscriptionId) {
|
|
1736
|
-
return
|
|
1739
|
+
return `${seatSummaryEndpoint(subscriptionId)}/assignments`;
|
|
1737
1740
|
}
|
|
1738
1741
|
function createSeatMethods(deps) {
|
|
1739
1742
|
const { fetchWithAuth, createError } = deps;
|
|
@@ -1743,6 +1746,12 @@ function createSeatMethods(deps) {
|
|
|
1743
1746
|
}
|
|
1744
1747
|
return fetchWithAuth(seatsEndpoint(params.subscriptionId));
|
|
1745
1748
|
}
|
|
1749
|
+
async function getSeats(subscriptionId) {
|
|
1750
|
+
if (!subscriptionId || !subscriptionId.trim()) {
|
|
1751
|
+
return { error: createError("VALIDATION_ERROR", "subscriptionId \u306F\u5FC5\u9808\u3067\u3059") };
|
|
1752
|
+
}
|
|
1753
|
+
return fetchWithAuth(seatSummaryEndpoint(subscriptionId));
|
|
1754
|
+
}
|
|
1746
1755
|
async function assignSeats(params) {
|
|
1747
1756
|
if (!params.subscriptionId) {
|
|
1748
1757
|
return { error: createError("VALIDATION_ERROR", "subscriptionId \u306F\u5FC5\u9808\u3067\u3059") };
|
|
@@ -1767,7 +1776,7 @@ function createSeatMethods(deps) {
|
|
|
1767
1776
|
{ method: "DELETE" }
|
|
1768
1777
|
);
|
|
1769
1778
|
}
|
|
1770
|
-
return { listSeatAssignments, assignSeats, unassignSeat };
|
|
1779
|
+
return { listSeatAssignments, getSeats, assignSeats, unassignSeat };
|
|
1771
1780
|
}
|
|
1772
1781
|
|
|
1773
1782
|
// src/client/profile-methods.ts
|
|
@@ -3632,6 +3641,225 @@ function createInquiryMethods(deps) {
|
|
|
3632
3641
|
return { create };
|
|
3633
3642
|
}
|
|
3634
3643
|
|
|
3644
|
+
// src/types/credits.ts
|
|
3645
|
+
var FFID_CREDITS_LOW_THRESHOLD_PERCENT = 20;
|
|
3646
|
+
var FFID_CREDITS_CONSUME_MIN_AMOUNT = 1;
|
|
3647
|
+
var FFID_CREDITS_CONSUME_MAX_AMOUNT = 1e6;
|
|
3648
|
+
var FFID_CREDITS_METADATA_MAX_BYTES = 4096;
|
|
3649
|
+
var FFID_CREDITS_HISTORY_MIN_LIMIT = 1;
|
|
3650
|
+
var FFID_CREDITS_HISTORY_MAX_LIMIT = 100;
|
|
3651
|
+
var FFID_CREDITS_HISTORY_DEFAULT_LIMIT = 20;
|
|
3652
|
+
var FFID_CREDIT_PACK_MIN_QUANTITY = 1;
|
|
3653
|
+
var FFID_CREDIT_PACK_MAX_QUANTITY = 10;
|
|
3654
|
+
var FFID_CREDITS_IDEMPOTENCY_KEY_PATTERN = /^[A-Za-z0-9._:-]{8,128}$/;
|
|
3655
|
+
var FFID_CREDITS_FEATURE_PATTERN = /^[a-z0-9][a-z0-9._-]{0,63}$/;
|
|
3656
|
+
var FFID_CREDIT_HISTORY_TYPES = ["grant", "consumption", "revocation"];
|
|
3657
|
+
var FFID_CREDIT_GRANT_KINDS = ["monthly", "manual", "pack"];
|
|
3658
|
+
|
|
3659
|
+
// src/client/credits-methods.ts
|
|
3660
|
+
var EXT_SUBSCRIPTIONS_PATH = "/api/v1/subscriptions/ext";
|
|
3661
|
+
var CREDIT_PACKS_ENDPOINT = `${EXT_SUBSCRIPTIONS_PATH}/credits/packs`;
|
|
3662
|
+
var CREDIT_PACK_CHECKOUT_ENDPOINT = `${CREDIT_PACKS_ENDPOINT}/checkout`;
|
|
3663
|
+
var PORTAL_SUBSCRIPTION_PATH = "/subscriptions";
|
|
3664
|
+
var BUY_CREDITS_QUERY = { key: "purchase", value: "credits" };
|
|
3665
|
+
var ORG_QUERY_KEY = "org";
|
|
3666
|
+
var FFID_CONTRACT_ID_PREFIX = "ffid:";
|
|
3667
|
+
var STRIPE_SUBSCRIPTION_ID_PREFIX = "sub_";
|
|
3668
|
+
var UUID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
3669
|
+
var VALIDATION_ERROR = "VALIDATION_ERROR";
|
|
3670
|
+
var FORBIDDEN = "FORBIDDEN";
|
|
3671
|
+
var utf8Encoder = new TextEncoder();
|
|
3672
|
+
function creditsEndpoint(subscriptionId, action) {
|
|
3673
|
+
return `${EXT_SUBSCRIPTIONS_PATH}/${encodeURIComponent(subscriptionId)}/credits/${action}`;
|
|
3674
|
+
}
|
|
3675
|
+
function isPlainObject2(value) {
|
|
3676
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
3677
|
+
}
|
|
3678
|
+
function isIntegerInRange(value, min, max) {
|
|
3679
|
+
return typeof value === "number" && Number.isInteger(value) && value >= min && value <= max;
|
|
3680
|
+
}
|
|
3681
|
+
function createCreditsMethods(deps) {
|
|
3682
|
+
const { fetchWithAuth, createError, authMode, baseUrl, serviceCode, logger } = deps;
|
|
3683
|
+
function validationError(field, message) {
|
|
3684
|
+
return { error: { ...createError(VALIDATION_ERROR, message), details: { field } } };
|
|
3685
|
+
}
|
|
3686
|
+
function forbidden(reason, message) {
|
|
3687
|
+
return { error: { ...createError(FORBIDDEN, message), details: { reason } } };
|
|
3688
|
+
}
|
|
3689
|
+
function missingSubscriptionId(subscriptionId) {
|
|
3690
|
+
return subscriptionId && subscriptionId.trim() ? null : validationError("subscriptionId", "subscriptionId \u306F\u5FC5\u9808\u3067\u3059");
|
|
3691
|
+
}
|
|
3692
|
+
async function getBalance(subscriptionId) {
|
|
3693
|
+
const invalid = missingSubscriptionId(subscriptionId);
|
|
3694
|
+
if (invalid) return invalid;
|
|
3695
|
+
return fetchWithAuth(creditsEndpoint(subscriptionId, "balance"));
|
|
3696
|
+
}
|
|
3697
|
+
async function listHistory(subscriptionId, options = {}) {
|
|
3698
|
+
const invalid = missingSubscriptionId(subscriptionId);
|
|
3699
|
+
if (invalid) return invalid;
|
|
3700
|
+
const query = new URLSearchParams();
|
|
3701
|
+
if (options.cursor !== void 0) query.set("cursor", options.cursor);
|
|
3702
|
+
if (options.limit !== void 0) {
|
|
3703
|
+
if (!isIntegerInRange(options.limit, FFID_CREDITS_HISTORY_MIN_LIMIT, FFID_CREDITS_HISTORY_MAX_LIMIT)) {
|
|
3704
|
+
return validationError(
|
|
3705
|
+
"limit",
|
|
3706
|
+
`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`
|
|
3707
|
+
);
|
|
3708
|
+
}
|
|
3709
|
+
query.set("limit", String(options.limit));
|
|
3710
|
+
}
|
|
3711
|
+
if (options.type !== void 0) {
|
|
3712
|
+
if (!FFID_CREDIT_HISTORY_TYPES.includes(options.type)) {
|
|
3713
|
+
return validationError("type", `type \u306F ${FFID_CREDIT_HISTORY_TYPES.join(" / ")} \u306E\u3044\u305A\u308C\u304B\u3067\u3059`);
|
|
3714
|
+
}
|
|
3715
|
+
query.set("type", options.type);
|
|
3716
|
+
}
|
|
3717
|
+
const qs = query.toString();
|
|
3718
|
+
return fetchWithAuth(
|
|
3719
|
+
`${creditsEndpoint(subscriptionId, "history")}${qs ? `?${qs}` : ""}`
|
|
3720
|
+
);
|
|
3721
|
+
}
|
|
3722
|
+
async function listPacks(packServiceCode) {
|
|
3723
|
+
const resolved = packServiceCode ?? (authMode === "service-key" ? void 0 : serviceCode);
|
|
3724
|
+
if (resolved !== void 0 && !resolved.trim()) {
|
|
3725
|
+
return validationError("serviceCode", "serviceCode \u3092\u6307\u5B9A\u3059\u308B\u5834\u5408\u3001\u7A7A\u6587\u5B57\u306F\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093");
|
|
3726
|
+
}
|
|
3727
|
+
const qs = resolved === void 0 ? "" : `?${new URLSearchParams({ serviceCode: resolved }).toString()}`;
|
|
3728
|
+
return fetchWithAuth(`${CREDIT_PACKS_ENDPOINT}${qs}`);
|
|
3729
|
+
}
|
|
3730
|
+
async function createPackCheckout(params) {
|
|
3731
|
+
if (authMode !== "token") {
|
|
3732
|
+
return forbidden(
|
|
3733
|
+
"bearer_required",
|
|
3734
|
+
"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"
|
|
3735
|
+
);
|
|
3736
|
+
}
|
|
3737
|
+
const invalid = missingSubscriptionId(params.subscriptionId);
|
|
3738
|
+
if (invalid) return invalid;
|
|
3739
|
+
for (const field of ["packCode", "successUrl", "cancelUrl"]) {
|
|
3740
|
+
if (!params[field] || !params[field].trim()) {
|
|
3741
|
+
return validationError(field, `${field} \u306F\u5FC5\u9808\u3067\u3059`);
|
|
3742
|
+
}
|
|
3743
|
+
}
|
|
3744
|
+
if (params.quantity !== void 0 && !isIntegerInRange(params.quantity, FFID_CREDIT_PACK_MIN_QUANTITY, FFID_CREDIT_PACK_MAX_QUANTITY)) {
|
|
3745
|
+
return validationError(
|
|
3746
|
+
"quantity",
|
|
3747
|
+
`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`
|
|
3748
|
+
);
|
|
3749
|
+
}
|
|
3750
|
+
const body = {
|
|
3751
|
+
subscriptionId: params.subscriptionId,
|
|
3752
|
+
packCode: params.packCode,
|
|
3753
|
+
successUrl: params.successUrl,
|
|
3754
|
+
cancelUrl: params.cancelUrl
|
|
3755
|
+
};
|
|
3756
|
+
if (params.quantity !== void 0) body.quantity = params.quantity;
|
|
3757
|
+
return fetchWithAuth(CREDIT_PACK_CHECKOUT_ENDPOINT, {
|
|
3758
|
+
method: "POST",
|
|
3759
|
+
body: JSON.stringify(body)
|
|
3760
|
+
});
|
|
3761
|
+
}
|
|
3762
|
+
function validateConsume(params) {
|
|
3763
|
+
const invalid = missingSubscriptionId(params.subscriptionId);
|
|
3764
|
+
if (invalid) return invalid;
|
|
3765
|
+
if (!isIntegerInRange(params.amount, FFID_CREDITS_CONSUME_MIN_AMOUNT, FFID_CREDITS_CONSUME_MAX_AMOUNT)) {
|
|
3766
|
+
return validationError(
|
|
3767
|
+
"amount",
|
|
3768
|
+
`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`
|
|
3769
|
+
);
|
|
3770
|
+
}
|
|
3771
|
+
if (typeof params.idempotencyKey !== "string" || !FFID_CREDITS_IDEMPOTENCY_KEY_PATTERN.test(params.idempotencyKey)) {
|
|
3772
|
+
return validationError(
|
|
3773
|
+
"idempotencyKey",
|
|
3774
|
+
"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"
|
|
3775
|
+
);
|
|
3776
|
+
}
|
|
3777
|
+
if (typeof params.feature !== "string" || !FFID_CREDITS_FEATURE_PATTERN.test(params.feature)) {
|
|
3778
|
+
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");
|
|
3779
|
+
}
|
|
3780
|
+
if (params.metadata !== void 0) {
|
|
3781
|
+
if (!isPlainObject2(params.metadata)) {
|
|
3782
|
+
return validationError("metadata", "metadata \u306F JSON \u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059");
|
|
3783
|
+
}
|
|
3784
|
+
let serialized;
|
|
3785
|
+
try {
|
|
3786
|
+
serialized = JSON.stringify(params.metadata);
|
|
3787
|
+
} catch {
|
|
3788
|
+
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");
|
|
3789
|
+
}
|
|
3790
|
+
if (utf8Encoder.encode(serialized).byteLength > FFID_CREDITS_METADATA_MAX_BYTES) {
|
|
3791
|
+
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`);
|
|
3792
|
+
}
|
|
3793
|
+
}
|
|
3794
|
+
if (params.userId !== void 0 && !UUID_PATTERN.test(params.userId)) {
|
|
3795
|
+
return validationError("userId", "userId \u306F\u6709\u52B9\u306AUUID\u5F62\u5F0F\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059");
|
|
3796
|
+
}
|
|
3797
|
+
return null;
|
|
3798
|
+
}
|
|
3799
|
+
async function consume(params) {
|
|
3800
|
+
if (authMode !== "service-key") {
|
|
3801
|
+
return forbidden(
|
|
3802
|
+
"api_key_required",
|
|
3803
|
+
"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"
|
|
3804
|
+
);
|
|
3805
|
+
}
|
|
3806
|
+
const invalid = validateConsume(params);
|
|
3807
|
+
if (invalid) return invalid;
|
|
3808
|
+
const body = {
|
|
3809
|
+
amount: params.amount,
|
|
3810
|
+
idempotencyKey: params.idempotencyKey,
|
|
3811
|
+
feature: params.feature
|
|
3812
|
+
};
|
|
3813
|
+
if (params.metadata !== void 0) body.metadata = params.metadata;
|
|
3814
|
+
if (params.userId !== void 0) body.userId = params.userId;
|
|
3815
|
+
return fetchWithAuth(creditsEndpoint(params.subscriptionId, "consume"), {
|
|
3816
|
+
method: "POST",
|
|
3817
|
+
body: JSON.stringify(body)
|
|
3818
|
+
});
|
|
3819
|
+
}
|
|
3820
|
+
function getBuyCreditsUrl(params) {
|
|
3821
|
+
const raw = params.subscriptionId?.trim() ?? "";
|
|
3822
|
+
if (raw.startsWith(STRIPE_SUBSCRIPTION_ID_PREFIX)) {
|
|
3823
|
+
return validationError(
|
|
3824
|
+
"subscriptionId",
|
|
3825
|
+
"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"
|
|
3826
|
+
);
|
|
3827
|
+
}
|
|
3828
|
+
const uuid = raw.startsWith(FFID_CONTRACT_ID_PREFIX) ? raw.slice(FFID_CONTRACT_ID_PREFIX.length) : raw;
|
|
3829
|
+
if (!UUID_PATTERN.test(uuid)) {
|
|
3830
|
+
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");
|
|
3831
|
+
}
|
|
3832
|
+
const query = new URLSearchParams({ [BUY_CREDITS_QUERY.key]: BUY_CREDITS_QUERY.value });
|
|
3833
|
+
if (params.orgId !== void 0 && params.orgId.trim()) {
|
|
3834
|
+
query.set(ORG_QUERY_KEY, params.orgId);
|
|
3835
|
+
}
|
|
3836
|
+
return { data: `${baseUrl}${PORTAL_SUBSCRIPTION_PATH}/${encodeURIComponent(uuid)}?${query.toString()}` };
|
|
3837
|
+
}
|
|
3838
|
+
function redirectToBuyCredits(params) {
|
|
3839
|
+
const result = getBuyCreditsUrl(params);
|
|
3840
|
+
if (result.error) {
|
|
3841
|
+
logger.warn("redirectToBuyCredits:", result.error.message);
|
|
3842
|
+
return { success: false, error: result.error.message };
|
|
3843
|
+
}
|
|
3844
|
+
if (typeof window === "undefined") {
|
|
3845
|
+
logger.warn("SSR \u74B0\u5883\u3067\u306F\u30EA\u30C0\u30A4\u30EC\u30AF\u30C8\u3067\u304D\u307E\u305B\u3093");
|
|
3846
|
+
return { success: false, error: "SSR \u74B0\u5883\u3067\u306F\u30EA\u30C0\u30A4\u30EC\u30AF\u30C8\u3067\u304D\u307E\u305B\u3093" };
|
|
3847
|
+
}
|
|
3848
|
+
logger.debug("Redirecting to buy credits:", result.data);
|
|
3849
|
+
window.location.href = result.data;
|
|
3850
|
+
return { success: true };
|
|
3851
|
+
}
|
|
3852
|
+
return {
|
|
3853
|
+
getBalance,
|
|
3854
|
+
listHistory,
|
|
3855
|
+
listPacks,
|
|
3856
|
+
createPackCheckout,
|
|
3857
|
+
consume,
|
|
3858
|
+
getBuyCreditsUrl,
|
|
3859
|
+
redirectToBuyCredits
|
|
3860
|
+
};
|
|
3861
|
+
}
|
|
3862
|
+
|
|
3635
3863
|
// src/subscriptions/types.ts
|
|
3636
3864
|
var EFFECTIVE_SUBSCRIPTION_STATUSES = [
|
|
3637
3865
|
"active",
|
|
@@ -3765,7 +3993,12 @@ function toServiceAccessDecision(response, allowGrace) {
|
|
|
3765
3993
|
planCode: response.planCode,
|
|
3766
3994
|
currentPeriodEnd: response.currentPeriodEnd,
|
|
3767
3995
|
gracePeriodEndsAt: response.gracePeriodEndsAt ?? null,
|
|
3768
|
-
reactivatable: response.reactivatable ?? false
|
|
3996
|
+
reactivatable: response.reactivatable ?? false,
|
|
3997
|
+
// Informational pass-through (10.0.0). Deliberately not part of hasAccess /
|
|
3998
|
+
// denialReason: credits and the member limit never gate access (CREDITS_API §1-5).
|
|
3999
|
+
...response.pricingModel !== void 0 ? { pricingModel: response.pricingModel } : {},
|
|
4000
|
+
...response.credits !== void 0 ? { credits: response.credits } : {},
|
|
4001
|
+
...response.memberLimitReached !== void 0 ? { memberLimitReached: response.memberLimitReached } : {}
|
|
3769
4002
|
};
|
|
3770
4003
|
}
|
|
3771
4004
|
function failClosedServiceAccessDecision(params, error) {
|
|
@@ -3812,6 +4045,19 @@ var FFID_SUBSCRIPTION_ERROR_CODES = {
|
|
|
3812
4045
|
FREE_DOWNGRADE_NOT_ALLOWED: "FREE_DOWNGRADE_NOT_ALLOWED",
|
|
3813
4046
|
PAYMENT_METHOD_REQUIRED: "PAYMENT_METHOD_REQUIRED"
|
|
3814
4047
|
};
|
|
4048
|
+
var FFID_CREDITS_ERROR_CODES = {
|
|
4049
|
+
CREDITS_INSUFFICIENT: "CREDITS_INSUFFICIENT",
|
|
4050
|
+
CREDITS_IDEMPOTENCY_CONFLICT: "CREDITS_IDEMPOTENCY_CONFLICT",
|
|
4051
|
+
CREDITS_NOT_APPLICABLE: "CREDITS_NOT_APPLICABLE",
|
|
4052
|
+
CREDITS_BALANCE_CAP_EXCEEDED: "CREDITS_BALANCE_CAP_EXCEEDED",
|
|
4053
|
+
SEAT_BILLING_NOT_APPLICABLE: "SEAT_BILLING_NOT_APPLICABLE",
|
|
4054
|
+
MEMBER_LIMIT_REACHED: "MEMBER_LIMIT_REACHED",
|
|
4055
|
+
CREDIT_PACK_NOT_FOUND: "CREDIT_PACK_NOT_FOUND",
|
|
4056
|
+
CREDIT_PACK_REGION_NOT_SUPPORTED: "CREDIT_PACK_REGION_NOT_SUPPORTED",
|
|
4057
|
+
CREDIT_PACK_STRIPE_NOT_SYNCED: "CREDIT_PACK_STRIPE_NOT_SYNCED",
|
|
4058
|
+
CREDIT_PACK_STRIPE_OUT_OF_SYNC: "CREDIT_PACK_STRIPE_OUT_OF_SYNC",
|
|
4059
|
+
CREDIT_PACK_CHANGED: "CREDIT_PACK_CHANGED"
|
|
4060
|
+
};
|
|
3815
4061
|
|
|
3816
4062
|
// src/client/ffid-client.ts
|
|
3817
4063
|
var UNAUTHORIZED_STATUS2 = 401;
|
|
@@ -4139,7 +4385,7 @@ function createFFIDClient(config) {
|
|
|
4139
4385
|
fetchWithAuth,
|
|
4140
4386
|
createError
|
|
4141
4387
|
});
|
|
4142
|
-
const { listSeatAssignments, assignSeats, unassignSeat } = createSeatMethods({
|
|
4388
|
+
const { listSeatAssignments, getSeats, assignSeats, unassignSeat } = createSeatMethods({
|
|
4143
4389
|
fetchWithAuth,
|
|
4144
4390
|
createError
|
|
4145
4391
|
});
|
|
@@ -4246,6 +4492,14 @@ function createFFIDClient(config) {
|
|
|
4246
4492
|
fetchWithAuth,
|
|
4247
4493
|
createError
|
|
4248
4494
|
});
|
|
4495
|
+
const credits = createCreditsMethods({
|
|
4496
|
+
fetchWithAuth,
|
|
4497
|
+
createError,
|
|
4498
|
+
authMode,
|
|
4499
|
+
baseUrl,
|
|
4500
|
+
serviceCode: config.serviceCode,
|
|
4501
|
+
logger
|
|
4502
|
+
});
|
|
4249
4503
|
const verifyAccessToken = createVerifyAccessToken({
|
|
4250
4504
|
authMode,
|
|
4251
4505
|
baseUrl,
|
|
@@ -4301,6 +4555,7 @@ function createFFIDClient(config) {
|
|
|
4301
4555
|
getInvoice,
|
|
4302
4556
|
retryPayment,
|
|
4303
4557
|
listSeatAssignments,
|
|
4558
|
+
getSeats,
|
|
4304
4559
|
assignSeats,
|
|
4305
4560
|
unassignSeat,
|
|
4306
4561
|
listPlans,
|
|
@@ -4311,13 +4566,16 @@ function createFFIDClient(config) {
|
|
|
4311
4566
|
cancelSubscription,
|
|
4312
4567
|
cancelPendingDowngrade,
|
|
4313
4568
|
previewPlanChange,
|
|
4569
|
+
/** @deprecated 10.0.0: per_seat (praxis) only; removed in 11.0.0 */
|
|
4314
4570
|
previewSeatChange,
|
|
4315
4571
|
verifyAccessToken,
|
|
4316
4572
|
getSubscribeUrl,
|
|
4317
4573
|
redirectToSubscribe,
|
|
4318
4574
|
getChangePlanUrl,
|
|
4319
4575
|
redirectToChangePlan,
|
|
4576
|
+
/** @deprecated 10.0.0: per_seat (praxis) only; removed in 11.0.0 */
|
|
4320
4577
|
getChangeSeatsUrl,
|
|
4578
|
+
/** @deprecated 10.0.0: per_seat (praxis) only; removed in 11.0.0 */
|
|
4321
4579
|
redirectToChangeSeats,
|
|
4322
4580
|
getRecoverPaymentUrl,
|
|
4323
4581
|
redirectToRecoverPayment,
|
|
@@ -4333,6 +4591,8 @@ function createFFIDClient(config) {
|
|
|
4333
4591
|
newsletter,
|
|
4334
4592
|
/** Inquiry methods (create) */
|
|
4335
4593
|
inquiry,
|
|
4594
|
+
/** Credits methods for flat plans (consume / balance / history / packs) */
|
|
4595
|
+
credits,
|
|
4336
4596
|
/** Token store (token mode only) */
|
|
4337
4597
|
tokenStore,
|
|
4338
4598
|
/**
|
|
@@ -4351,6 +4611,50 @@ function createFFIDClient(config) {
|
|
|
4351
4611
|
};
|
|
4352
4612
|
}
|
|
4353
4613
|
|
|
4614
|
+
// src/client/authorization-error.ts
|
|
4615
|
+
var FFID_OAUTH_DENIAL_REASONS = [
|
|
4616
|
+
/** The user is not a member of the organization */
|
|
4617
|
+
"no_membership",
|
|
4618
|
+
/** The organization has no usable subscription for the service */
|
|
4619
|
+
"no_active_subscription",
|
|
4620
|
+
/** The organization has a subscription, but the user has no seat in it */
|
|
4621
|
+
"no_seat_assignment",
|
|
4622
|
+
/** The subscription has expired (canceled / past due beyond grace) */
|
|
4623
|
+
"subscription_expired",
|
|
4624
|
+
/** The flat plan's member limit is full, so no seat could be given */
|
|
4625
|
+
"member_limit_reached"
|
|
4626
|
+
];
|
|
4627
|
+
function isFFIDOAuthDenialReason(value) {
|
|
4628
|
+
return typeof value === "string" && FFID_OAUTH_DENIAL_REASONS.includes(value);
|
|
4629
|
+
}
|
|
4630
|
+
var DEFAULT_AUTHORIZATION_ERROR_MESSAGE = "\u8A8D\u53EF\u30B5\u30FC\u30D0\u30FC\u304C\u30A8\u30E9\u30FC\u3092\u8FD4\u3057\u307E\u3057\u305F";
|
|
4631
|
+
function buildAuthorizationError(params) {
|
|
4632
|
+
const oauthError = params.get("error");
|
|
4633
|
+
if (!oauthError) return null;
|
|
4634
|
+
const rawReason = params.get("denial_reason");
|
|
4635
|
+
const errorDescription = params.get("error_description");
|
|
4636
|
+
const details = {
|
|
4637
|
+
source: "authorization",
|
|
4638
|
+
denialReason: isFFIDOAuthDenialReason(rawReason) ? rawReason : null,
|
|
4639
|
+
errorDescription
|
|
4640
|
+
};
|
|
4641
|
+
return {
|
|
4642
|
+
code: oauthError,
|
|
4643
|
+
message: errorDescription ?? DEFAULT_AUTHORIZATION_ERROR_MESSAGE,
|
|
4644
|
+
details: { ...details }
|
|
4645
|
+
};
|
|
4646
|
+
}
|
|
4647
|
+
function getFFIDAuthorizationError(error) {
|
|
4648
|
+
const details = error?.details;
|
|
4649
|
+
if (!error || !details || details.source !== "authorization") return null;
|
|
4650
|
+
const description = details.errorDescription;
|
|
4651
|
+
return {
|
|
4652
|
+
oauthError: error.code,
|
|
4653
|
+
denialReason: isFFIDOAuthDenialReason(details.denialReason) ? details.denialReason : null,
|
|
4654
|
+
errorDescription: typeof description === "string" ? description : null
|
|
4655
|
+
};
|
|
4656
|
+
}
|
|
4657
|
+
|
|
4354
4658
|
// src/client/callback.ts
|
|
4355
4659
|
var CALLBACK_ERROR_CODES = {
|
|
4356
4660
|
/** Stored state missing or did not match the callback `state` (CSRF guard) */
|
|
@@ -4375,16 +4679,43 @@ function extractSearchParams(source) {
|
|
|
4375
4679
|
return new URLSearchParams(query);
|
|
4376
4680
|
}
|
|
4377
4681
|
}
|
|
4378
|
-
|
|
4682
|
+
var CODE_CALLBACK_PARAMS = ["code", "state"];
|
|
4683
|
+
var ERROR_CALLBACK_CONSUMED_PARAMS = ["state"];
|
|
4684
|
+
function cleanCallbackUrlParams(logger, names) {
|
|
4379
4685
|
try {
|
|
4380
4686
|
const cleanUrl = new URL(window.location.href);
|
|
4381
|
-
cleanUrl.searchParams.delete(
|
|
4382
|
-
cleanUrl.searchParams.delete("state");
|
|
4687
|
+
for (const name of names) cleanUrl.searchParams.delete(name);
|
|
4383
4688
|
window.history.replaceState({}, "", cleanUrl.toString());
|
|
4384
4689
|
} catch (error) {
|
|
4385
4690
|
logger.warn("handleRedirectCallback: URL \u306E\u30AF\u30EA\u30FC\u30F3\u30A2\u30C3\u30D7\u306B\u5931\u6557\u3057\u307E\u3057\u305F:", error);
|
|
4386
4691
|
}
|
|
4387
4692
|
}
|
|
4693
|
+
function validateCallbackState(client, urlState) {
|
|
4694
|
+
const { logger } = client;
|
|
4695
|
+
const storedState = retrieveState(logger);
|
|
4696
|
+
if (storedState === null && urlState === null) return null;
|
|
4697
|
+
if (storedState !== null && storedState === urlState) return null;
|
|
4698
|
+
if (storedState === null && !isStateStorageAvailable()) {
|
|
4699
|
+
logger.error(
|
|
4700
|
+
"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"
|
|
4701
|
+
);
|
|
4702
|
+
return {
|
|
4703
|
+
error: client.createError(
|
|
4704
|
+
CALLBACK_ERROR_CODES.STATE_UNAVAILABLE,
|
|
4705
|
+
"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"
|
|
4706
|
+
)
|
|
4707
|
+
};
|
|
4708
|
+
}
|
|
4709
|
+
logger.error(
|
|
4710
|
+
"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"
|
|
4711
|
+
);
|
|
4712
|
+
return {
|
|
4713
|
+
error: client.createError(
|
|
4714
|
+
CALLBACK_ERROR_CODES.STATE_MISMATCH,
|
|
4715
|
+
"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"
|
|
4716
|
+
)
|
|
4717
|
+
};
|
|
4718
|
+
}
|
|
4388
4719
|
async function handleRedirectCallback(client, options) {
|
|
4389
4720
|
const { logger } = client;
|
|
4390
4721
|
const hasWindow = typeof window !== "undefined";
|
|
@@ -4401,6 +4732,24 @@ async function handleRedirectCallback(client, options) {
|
|
|
4401
4732
|
const params = extractSearchParams(source);
|
|
4402
4733
|
const code = params.get("code");
|
|
4403
4734
|
const urlState = params.get("state");
|
|
4735
|
+
const authorizationError = buildAuthorizationError(params);
|
|
4736
|
+
if (authorizationError && urlState !== null) {
|
|
4737
|
+
const stateError2 = validateCallbackState(client, urlState);
|
|
4738
|
+
if (stateError2) return stateError2;
|
|
4739
|
+
retrieveCodeVerifier(logger);
|
|
4740
|
+
logger.warn("handleRedirectCallback: \u8A8D\u53EF\u30B5\u30FC\u30D0\u30FC\u304C\u30A8\u30E9\u30FC\u3092\u8FD4\u3057\u307E\u3057\u305F:", {
|
|
4741
|
+
error: authorizationError.code,
|
|
4742
|
+
denialReason: params.get("denial_reason")
|
|
4743
|
+
});
|
|
4744
|
+
if (hasWindow) {
|
|
4745
|
+
if (options?.cleanUrl !== false) {
|
|
4746
|
+
cleanCallbackUrlParams(logger, ERROR_CALLBACK_CONSUMED_PARAMS);
|
|
4747
|
+
} else {
|
|
4748
|
+
logger.debug("handleRedirectCallback: cleanUrl=false \u306E\u305F\u3081 URL cleanup \u3092 consumer \u306B\u59D4\u8B72\u3057\u307E\u3057\u305F");
|
|
4749
|
+
}
|
|
4750
|
+
}
|
|
4751
|
+
return { error: authorizationError };
|
|
4752
|
+
}
|
|
4404
4753
|
if (!code) {
|
|
4405
4754
|
logger.warn("handleRedirectCallback: \u8A8D\u53EF\u30B3\u30FC\u30C9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093");
|
|
4406
4755
|
return {
|
|
@@ -4410,37 +4759,13 @@ async function handleRedirectCallback(client, options) {
|
|
|
4410
4759
|
)
|
|
4411
4760
|
};
|
|
4412
4761
|
}
|
|
4413
|
-
const
|
|
4414
|
-
if (
|
|
4415
|
-
const stateMatches = storedState !== null && storedState === urlState;
|
|
4416
|
-
if (!stateMatches) {
|
|
4417
|
-
if (storedState === null && !isStateStorageAvailable()) {
|
|
4418
|
-
logger.error(
|
|
4419
|
-
"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"
|
|
4420
|
-
);
|
|
4421
|
-
return {
|
|
4422
|
-
error: client.createError(
|
|
4423
|
-
CALLBACK_ERROR_CODES.STATE_UNAVAILABLE,
|
|
4424
|
-
"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"
|
|
4425
|
-
)
|
|
4426
|
-
};
|
|
4427
|
-
}
|
|
4428
|
-
logger.error(
|
|
4429
|
-
"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"
|
|
4430
|
-
);
|
|
4431
|
-
return {
|
|
4432
|
-
error: client.createError(
|
|
4433
|
-
CALLBACK_ERROR_CODES.STATE_MISMATCH,
|
|
4434
|
-
"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"
|
|
4435
|
-
)
|
|
4436
|
-
};
|
|
4437
|
-
}
|
|
4438
|
-
}
|
|
4762
|
+
const stateError = validateCallbackState(client, urlState);
|
|
4763
|
+
if (stateError) return stateError;
|
|
4439
4764
|
const verifier = retrieveCodeVerifier(logger);
|
|
4440
4765
|
const result = await client.exchangeCodeForTokens(code, verifier ?? void 0);
|
|
4441
4766
|
if (!result.error && hasWindow) {
|
|
4442
4767
|
if (options?.cleanUrl !== false) {
|
|
4443
|
-
cleanCallbackUrlParams(logger);
|
|
4768
|
+
cleanCallbackUrlParams(logger, CODE_CALLBACK_PARAMS);
|
|
4444
4769
|
} else {
|
|
4445
4770
|
logger.debug("handleRedirectCallback: cleanUrl=false \u306E\u305F\u3081 URL cleanup \u3092 consumer \u306B\u59D4\u8B72\u3057\u307E\u3057\u305F");
|
|
4446
4771
|
}
|
|
@@ -4449,6 +4774,13 @@ async function handleRedirectCallback(client, options) {
|
|
|
4449
4774
|
}
|
|
4450
4775
|
var DEFAULT_REFRESH_INTERVAL_MS = 5 * 60 * 1e3;
|
|
4451
4776
|
var TOKEN_REFRESH_RATIO = 0.8;
|
|
4777
|
+
function resolveCallbackKey(params) {
|
|
4778
|
+
const code = params.get("code");
|
|
4779
|
+
if (code) return code;
|
|
4780
|
+
const error = params.get("error");
|
|
4781
|
+
const state = params.get("state");
|
|
4782
|
+
return error && state ? `error:${error}:${state}` : null;
|
|
4783
|
+
}
|
|
4452
4784
|
var FFIDContext = react.createContext(null);
|
|
4453
4785
|
var FFIDClientContext = react.createContext(null);
|
|
4454
4786
|
function FFIDProvider({
|
|
@@ -4628,19 +4960,26 @@ function FFIDProvider({
|
|
|
4628
4960
|
},
|
|
4629
4961
|
[organizations, client]
|
|
4630
4962
|
);
|
|
4631
|
-
const
|
|
4963
|
+
const handledCallbackRef = react.useRef(null);
|
|
4964
|
+
const callbackPendingRef = react.useRef(false);
|
|
4965
|
+
const authorizationDeniedRef = react.useRef(false);
|
|
4632
4966
|
react.useEffect(() => {
|
|
4633
4967
|
if (client.authMode !== "token") return;
|
|
4634
4968
|
if (typeof window === "undefined") return;
|
|
4635
|
-
const
|
|
4636
|
-
|
|
4637
|
-
if (
|
|
4638
|
-
|
|
4639
|
-
|
|
4640
|
-
client.logger.debug("
|
|
4969
|
+
const callbackKey = resolveCallbackKey(new URLSearchParams(window.location.search));
|
|
4970
|
+
if (!callbackKey) return;
|
|
4971
|
+
if (handledCallbackRef.current === callbackKey) return;
|
|
4972
|
+
handledCallbackRef.current = callbackKey;
|
|
4973
|
+
callbackPendingRef.current = true;
|
|
4974
|
+
client.logger.debug("OAuth callback detected, handling it");
|
|
4641
4975
|
handleRedirectCallback(client, { cleanUrl: cleanCallbackUrl }).then((result) => {
|
|
4642
4976
|
if (result.error) {
|
|
4643
|
-
|
|
4977
|
+
if (getFFIDAuthorizationError(result.error)) {
|
|
4978
|
+
client.logger.warn("FFID \u304C\u30ED\u30B0\u30A4\u30F3\u3092\u62D2\u5426\u3057\u307E\u3057\u305F:", result.error);
|
|
4979
|
+
authorizationDeniedRef.current = true;
|
|
4980
|
+
} else {
|
|
4981
|
+
client.logger.error("Token exchange failed:", result.error);
|
|
4982
|
+
}
|
|
4644
4983
|
if (result.error.code === FFID_ERROR_CODES.STATE_MISMATCH_ERROR && client.tokenStore.getTokens()) {
|
|
4645
4984
|
client.logger.debug(
|
|
4646
4985
|
"Stale callback rejected but stored tokens present, restoring session via refresh"
|
|
@@ -4658,13 +4997,15 @@ function FFIDProvider({
|
|
|
4658
4997
|
}).catch((err) => {
|
|
4659
4998
|
client.logger.error("Token exchange error:", err);
|
|
4660
4999
|
setIsLoading(false);
|
|
5000
|
+
}).finally(() => {
|
|
5001
|
+
callbackPendingRef.current = false;
|
|
4661
5002
|
});
|
|
4662
5003
|
}, [client]);
|
|
4663
5004
|
react.useEffect(() => {
|
|
4664
5005
|
if (client.authMode === "token") {
|
|
5006
|
+
if (callbackPendingRef.current || authorizationDeniedRef.current) return;
|
|
4665
5007
|
if (typeof window !== "undefined") {
|
|
4666
|
-
|
|
4667
|
-
if (urlParams.has("code")) {
|
|
5008
|
+
if (resolveCallbackKey(new URLSearchParams(window.location.search))) {
|
|
4668
5009
|
return;
|
|
4669
5010
|
}
|
|
4670
5011
|
}
|
|
@@ -6504,6 +6845,20 @@ exports.FFID_ANNOUNCEMENTS_ERROR_CODES = FFID_ANNOUNCEMENTS_ERROR_CODES;
|
|
|
6504
6845
|
exports.FFID_CATALOG_ENVIRONMENTS = FFID_CATALOG_ENVIRONMENTS;
|
|
6505
6846
|
exports.FFID_CATALOG_PUBLICATION_STATUSES = FFID_CATALOG_PUBLICATION_STATUSES;
|
|
6506
6847
|
exports.FFID_COMPANY_SIZE_CODES = FFID_COMPANY_SIZE_CODES;
|
|
6848
|
+
exports.FFID_CREDITS_CONSUME_MAX_AMOUNT = FFID_CREDITS_CONSUME_MAX_AMOUNT;
|
|
6849
|
+
exports.FFID_CREDITS_CONSUME_MIN_AMOUNT = FFID_CREDITS_CONSUME_MIN_AMOUNT;
|
|
6850
|
+
exports.FFID_CREDITS_ERROR_CODES = FFID_CREDITS_ERROR_CODES;
|
|
6851
|
+
exports.FFID_CREDITS_FEATURE_PATTERN = FFID_CREDITS_FEATURE_PATTERN;
|
|
6852
|
+
exports.FFID_CREDITS_HISTORY_DEFAULT_LIMIT = FFID_CREDITS_HISTORY_DEFAULT_LIMIT;
|
|
6853
|
+
exports.FFID_CREDITS_HISTORY_MAX_LIMIT = FFID_CREDITS_HISTORY_MAX_LIMIT;
|
|
6854
|
+
exports.FFID_CREDITS_HISTORY_MIN_LIMIT = FFID_CREDITS_HISTORY_MIN_LIMIT;
|
|
6855
|
+
exports.FFID_CREDITS_IDEMPOTENCY_KEY_PATTERN = FFID_CREDITS_IDEMPOTENCY_KEY_PATTERN;
|
|
6856
|
+
exports.FFID_CREDITS_LOW_THRESHOLD_PERCENT = FFID_CREDITS_LOW_THRESHOLD_PERCENT;
|
|
6857
|
+
exports.FFID_CREDITS_METADATA_MAX_BYTES = FFID_CREDITS_METADATA_MAX_BYTES;
|
|
6858
|
+
exports.FFID_CREDIT_GRANT_KINDS = FFID_CREDIT_GRANT_KINDS;
|
|
6859
|
+
exports.FFID_CREDIT_HISTORY_TYPES = FFID_CREDIT_HISTORY_TYPES;
|
|
6860
|
+
exports.FFID_CREDIT_PACK_MAX_QUANTITY = FFID_CREDIT_PACK_MAX_QUANTITY;
|
|
6861
|
+
exports.FFID_CREDIT_PACK_MIN_QUANTITY = FFID_CREDIT_PACK_MIN_QUANTITY;
|
|
6507
6862
|
exports.FFID_ERROR_CODES = FFID_ERROR_CODES;
|
|
6508
6863
|
exports.FFID_INDUSTRY_CODES = FFID_INDUSTRY_CODES;
|
|
6509
6864
|
exports.FFID_INQUIRY_ACQUISITION_SOURCES = FFID_INQUIRY_ACQUISITION_SOURCES;
|
|
@@ -6511,6 +6866,7 @@ exports.FFID_INQUIRY_CATEGORIES = FFID_INQUIRY_CATEGORIES;
|
|
|
6511
6866
|
exports.FFID_INQUIRY_CATEGORIES_SITE_2026 = FFID_INQUIRY_CATEGORIES_SITE_2026;
|
|
6512
6867
|
exports.FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_BYTES = FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_BYTES;
|
|
6513
6868
|
exports.FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_MB = FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_MB;
|
|
6869
|
+
exports.FFID_OAUTH_DENIAL_REASONS = FFID_OAUTH_DENIAL_REASONS;
|
|
6514
6870
|
exports.FFID_ORGANIZATION_PROFILE_ERROR_CODES = FFID_ORGANIZATION_PROFILE_ERROR_CODES;
|
|
6515
6871
|
exports.FFID_SUBSCRIPTION_ERROR_CODES = FFID_SUBSCRIPTION_ERROR_CODES;
|
|
6516
6872
|
exports.canonicalizeCatalogValue = canonicalizeCatalogValue;
|
|
@@ -6529,12 +6885,14 @@ exports.createFFIDClient = createFFIDClient;
|
|
|
6529
6885
|
exports.createTokenStore = createTokenStore;
|
|
6530
6886
|
exports.generateCodeChallenge = generateCodeChallenge;
|
|
6531
6887
|
exports.generateCodeVerifier = generateCodeVerifier;
|
|
6888
|
+
exports.getFFIDAuthorizationError = getFFIDAuthorizationError;
|
|
6532
6889
|
exports.handleRedirectCallback = handleRedirectCallback;
|
|
6533
6890
|
exports.hasAccessFromUserinfo = hasAccessFromUserinfo;
|
|
6534
6891
|
exports.hashCanonicalJson = hashCanonicalJson;
|
|
6535
6892
|
exports.isBlockedFromUserinfo = isBlockedFromUserinfo;
|
|
6536
6893
|
exports.isFFIDInquiryAcquisitionSource = isFFIDInquiryAcquisitionSource;
|
|
6537
6894
|
exports.isFFIDInquiryCategorySite2026 = isFFIDInquiryCategorySite2026;
|
|
6895
|
+
exports.isFFIDOAuthDenialReason = isFFIDOAuthDenialReason;
|
|
6538
6896
|
exports.normalizeRedirectUri = normalizeRedirectUri;
|
|
6539
6897
|
exports.readAgencyInviteCookie = readAgencyInviteCookie;
|
|
6540
6898
|
exports.readAgencyInviteToken = readAgencyInviteToken;
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkVHOIA25Y_cjs = require('../chunk-VHOIA25Y.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "FFIDAnnouncementBadge", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkVHOIA25Y_cjs.FFIDAnnouncementBadge; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "FFIDAnnouncementList", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkVHOIA25Y_cjs.FFIDAnnouncementList; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "FFIDInquiryForm", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkVHOIA25Y_cjs.FFIDInquiryForm; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "FFIDLoginButton", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkVHOIA25Y_cjs.FFIDLoginButton; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "FFIDOrganizationSwitcher", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkVHOIA25Y_cjs.FFIDOrganizationSwitcher; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "FFIDSubscriptionBadge", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkVHOIA25Y_cjs.FFIDSubscriptionBadge; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "FFIDUserMenu", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkVHOIA25Y_cjs.FFIDUserMenu; }
|
|
34
34
|
});
|