@feelflow/ffid-sdk 6.0.0 → 7.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 +47 -0
- package/dist/{FFIDCookieLink-BJgVcJyw.d.cts → FFIDCookieLink-Bwr0FBrV.d.cts} +13 -46
- package/dist/{FFIDCookieLink-BJgVcJyw.d.ts → FFIDCookieLink-Bwr0FBrV.d.ts} +13 -46
- package/dist/{chunk-CI6RBG77.cjs → chunk-CI4N7KJK.cjs} +350 -61
- package/dist/{chunk-G7VOX64X.js → chunk-RHBZHSRD.js} +4 -30
- package/dist/{chunk-H5O2CCAY.cjs → chunk-XELXXL2F.cjs} +2 -29
- package/dist/{chunk-NBBHMLXO.js → chunk-Y4TUICQZ.js} +345 -62
- package/dist/components/index.cjs +8 -8
- package/dist/components/index.js +1 -1
- package/dist/consent/index.cjs +63 -67
- package/dist/consent/index.d.cts +2 -2
- package/dist/consent/index.d.ts +2 -2
- package/dist/consent/index.js +1 -1
- package/dist/{ffid-client-C8XV7lUt.d.cts → ffid-client-BFgoVPOZ.d.cts} +161 -1
- package/dist/{ffid-client-CpVixUM3.d.ts → ffid-client-QNEFA3mv.d.ts} +161 -1
- package/dist/index.cjs +103 -79
- package/dist/index.d.cts +162 -2
- package/dist/index.d.ts +162 -2
- package/dist/index.js +3 -3
- package/dist/server/index.cjs +350 -61
- package/dist/server/index.d.cts +2 -2
- package/dist/server/index.d.ts +2 -2
- package/dist/server/index.js +345 -62
- package/dist/server/test/index.d.cts +1 -1
- package/dist/server/test/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1303,6 +1303,310 @@ function createMembersMethods(deps) {
|
|
|
1303
1303
|
return { listMembers, addMember, updateMemberRole, removeMember };
|
|
1304
1304
|
}
|
|
1305
1305
|
|
|
1306
|
+
// src/types/organization-profile.ts
|
|
1307
|
+
var FFID_INDUSTRY_CODES = [
|
|
1308
|
+
"agriculture",
|
|
1309
|
+
"construction",
|
|
1310
|
+
"manufacturing",
|
|
1311
|
+
"it-software",
|
|
1312
|
+
"telecom",
|
|
1313
|
+
"media",
|
|
1314
|
+
"retail",
|
|
1315
|
+
"wholesale",
|
|
1316
|
+
"finance-insurance",
|
|
1317
|
+
"real-estate",
|
|
1318
|
+
"transport-logistics",
|
|
1319
|
+
"hospitality-food",
|
|
1320
|
+
"healthcare",
|
|
1321
|
+
"education",
|
|
1322
|
+
"professional-services",
|
|
1323
|
+
"marketing-advertising",
|
|
1324
|
+
"energy-utilities",
|
|
1325
|
+
"public-sector",
|
|
1326
|
+
"nonprofit",
|
|
1327
|
+
"other"
|
|
1328
|
+
];
|
|
1329
|
+
var FFID_COMPANY_SIZE_CODES = [
|
|
1330
|
+
"1-10",
|
|
1331
|
+
"11-50",
|
|
1332
|
+
"51-200",
|
|
1333
|
+
"201-500",
|
|
1334
|
+
"501-1000",
|
|
1335
|
+
"1001+"
|
|
1336
|
+
];
|
|
1337
|
+
var BYTES_PER_KB = 1024;
|
|
1338
|
+
var KB_PER_MB = 1024;
|
|
1339
|
+
var FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_MB = 2;
|
|
1340
|
+
var FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_BYTES = FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_MB * KB_PER_MB * BYTES_PER_KB;
|
|
1341
|
+
var FFID_ALLOWED_ORGANIZATION_LOGO_MIME_TYPES = [
|
|
1342
|
+
"image/png",
|
|
1343
|
+
"image/jpeg",
|
|
1344
|
+
"image/webp"
|
|
1345
|
+
];
|
|
1346
|
+
var FFID_ORGANIZATION_PROFILE_ERROR_CODES = {
|
|
1347
|
+
VALIDATION_ERROR: "VALIDATION_ERROR",
|
|
1348
|
+
ORGANIZATION_NOT_FOUND: "ORGANIZATION_NOT_FOUND",
|
|
1349
|
+
CONSENTED_BY_NOT_MEMBER: "CONSENTED_BY_NOT_MEMBER",
|
|
1350
|
+
MISSING_FILE: "MISSING_FILE",
|
|
1351
|
+
INVALID_FILE_TYPE: "INVALID_FILE_TYPE",
|
|
1352
|
+
FILE_TOO_LARGE: "FILE_TOO_LARGE",
|
|
1353
|
+
INVALID_IMAGE: "INVALID_IMAGE",
|
|
1354
|
+
LOGO_UPLOAD_FAILED: "LOGO_UPLOAD_FAILED"
|
|
1355
|
+
};
|
|
1356
|
+
|
|
1357
|
+
// src/client/version-check.ts
|
|
1358
|
+
var SDK_VERSION = "7.1.0";
|
|
1359
|
+
var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
|
|
1360
|
+
var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
|
|
1361
|
+
function sdkHeaders() {
|
|
1362
|
+
if (typeof window !== "undefined") return {};
|
|
1363
|
+
return {
|
|
1364
|
+
"User-Agent": SDK_USER_AGENT,
|
|
1365
|
+
[SDK_VERSION_HEADER]: SDK_VERSION
|
|
1366
|
+
};
|
|
1367
|
+
}
|
|
1368
|
+
var LATEST_VERSION_HEADER = "X-FFID-SDK-Latest-Version";
|
|
1369
|
+
var SEMVER_PATTERN = /^\d+(\.\d+)*$/;
|
|
1370
|
+
var _versionWarningShown = false;
|
|
1371
|
+
function compareSemver(a, b) {
|
|
1372
|
+
const cleanA = a.replace(/^v/, "");
|
|
1373
|
+
const cleanB = b.replace(/^v/, "");
|
|
1374
|
+
if (!SEMVER_PATTERN.test(cleanA) || !SEMVER_PATTERN.test(cleanB)) return 0;
|
|
1375
|
+
const partsA = cleanA.split(".").map(Number);
|
|
1376
|
+
const partsB = cleanB.split(".").map(Number);
|
|
1377
|
+
const maxLen = Math.max(partsA.length, partsB.length);
|
|
1378
|
+
for (let i = 0; i < maxLen; i++) {
|
|
1379
|
+
const numA = partsA[i] ?? 0;
|
|
1380
|
+
const numB = partsB[i] ?? 0;
|
|
1381
|
+
if (numA < numB) return -1;
|
|
1382
|
+
if (numA > numB) return 1;
|
|
1383
|
+
}
|
|
1384
|
+
return 0;
|
|
1385
|
+
}
|
|
1386
|
+
function checkVersionHeader(response, logger) {
|
|
1387
|
+
if (_versionWarningShown) return;
|
|
1388
|
+
if (typeof process !== "undefined" && process.env?.NODE_ENV === "production") return;
|
|
1389
|
+
if (!response.headers?.get) return;
|
|
1390
|
+
const latestVersion = response.headers.get(LATEST_VERSION_HEADER);
|
|
1391
|
+
if (!latestVersion) return;
|
|
1392
|
+
if (compareSemver(SDK_VERSION, latestVersion) < 0) {
|
|
1393
|
+
_versionWarningShown = true;
|
|
1394
|
+
logger.warn(
|
|
1395
|
+
`\u65B0\u3057\u3044\u30D0\u30FC\u30B8\u30E7\u30F3\u304C\u5229\u7528\u53EF\u80FD\u3067\u3059: v${latestVersion} (\u73FE\u5728: v${SDK_VERSION})
|
|
1396
|
+
npm install @feelflow/ffid-sdk@latest \u3067\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u3067\u304D\u307E\u3059`
|
|
1397
|
+
);
|
|
1398
|
+
}
|
|
1399
|
+
}
|
|
1400
|
+
|
|
1401
|
+
// src/client/organization-profile-methods.ts
|
|
1402
|
+
var EXT_PROFILE_ENDPOINT = "/api/v1/organizations/ext/profile";
|
|
1403
|
+
var EXT_PROFILE_LOGO_ENDPOINT = "/api/v1/organizations/ext/profile/logo";
|
|
1404
|
+
var LOGO_WALL_ENDPOINT = "/api/v1/organizations/logo-wall";
|
|
1405
|
+
var DEFAULT_LOGO_UPLOAD_FILENAME = "logo";
|
|
1406
|
+
function isBlank(value) {
|
|
1407
|
+
return !value || !value.trim();
|
|
1408
|
+
}
|
|
1409
|
+
function resolveOrganizationId(organizationIdOrParams) {
|
|
1410
|
+
return typeof organizationIdOrParams === "string" ? organizationIdOrParams : organizationIdOrParams.organizationId;
|
|
1411
|
+
}
|
|
1412
|
+
function resolveUpsertParams(organizationIdOrParams, payload) {
|
|
1413
|
+
if (typeof organizationIdOrParams === "string") {
|
|
1414
|
+
return { ...payload, organizationId: organizationIdOrParams };
|
|
1415
|
+
}
|
|
1416
|
+
return organizationIdOrParams;
|
|
1417
|
+
}
|
|
1418
|
+
function resolveUploadParams(organizationIdOrParams, file) {
|
|
1419
|
+
if (typeof organizationIdOrParams === "string") {
|
|
1420
|
+
return { organizationId: organizationIdOrParams, file };
|
|
1421
|
+
}
|
|
1422
|
+
return organizationIdOrParams;
|
|
1423
|
+
}
|
|
1424
|
+
function buildUpsertBody(params) {
|
|
1425
|
+
const { organizationId, ...body } = params;
|
|
1426
|
+
return body;
|
|
1427
|
+
}
|
|
1428
|
+
function profileQuery(organizationId) {
|
|
1429
|
+
return new URLSearchParams({ organizationId }).toString();
|
|
1430
|
+
}
|
|
1431
|
+
function logoUploadFilename(file) {
|
|
1432
|
+
if (typeof File !== "undefined" && file instanceof File && file.name) {
|
|
1433
|
+
return file.name;
|
|
1434
|
+
}
|
|
1435
|
+
return DEFAULT_LOGO_UPLOAD_FILENAME;
|
|
1436
|
+
}
|
|
1437
|
+
function listingConsentValidationError(listingConsent, createError) {
|
|
1438
|
+
if (!listingConsent || listingConsent.consented !== true) return null;
|
|
1439
|
+
if (isBlank(listingConsent.consentVersion) || isBlank(listingConsent.consentedByUserId)) {
|
|
1440
|
+
return createError(
|
|
1441
|
+
FFID_ORGANIZATION_PROFILE_ERROR_CODES.VALIDATION_ERROR,
|
|
1442
|
+
"\u63B2\u8F09\u540C\u610F\u3092\u8A18\u9332\u3059\u308B\u5834\u5408\u306F consentVersion \u3068 consentedByUserId \u304C\u5FC5\u9808\u3067\u3059"
|
|
1443
|
+
);
|
|
1444
|
+
}
|
|
1445
|
+
return null;
|
|
1446
|
+
}
|
|
1447
|
+
function resolveLogoFile(file, createError) {
|
|
1448
|
+
if (!file) {
|
|
1449
|
+
return {
|
|
1450
|
+
ok: false,
|
|
1451
|
+
error: createError(
|
|
1452
|
+
FFID_ORGANIZATION_PROFILE_ERROR_CODES.MISSING_FILE,
|
|
1453
|
+
"file \u30D5\u30A3\u30FC\u30EB\u30C9\u306B\u30ED\u30B4\u753B\u50CF\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044"
|
|
1454
|
+
)
|
|
1455
|
+
};
|
|
1456
|
+
}
|
|
1457
|
+
if (file.size > FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_BYTES) {
|
|
1458
|
+
return {
|
|
1459
|
+
ok: false,
|
|
1460
|
+
error: createError(
|
|
1461
|
+
FFID_ORGANIZATION_PROFILE_ERROR_CODES.FILE_TOO_LARGE,
|
|
1462
|
+
`\u30ED\u30B4\u753B\u50CF\u306F${FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_MB}MB\u4EE5\u4E0B\u306B\u3057\u3066\u304F\u3060\u3055\u3044`
|
|
1463
|
+
)
|
|
1464
|
+
};
|
|
1465
|
+
}
|
|
1466
|
+
if (file.type !== "" && !FFID_ALLOWED_ORGANIZATION_LOGO_MIME_TYPES.includes(file.type)) {
|
|
1467
|
+
return {
|
|
1468
|
+
ok: false,
|
|
1469
|
+
error: createError(
|
|
1470
|
+
FFID_ORGANIZATION_PROFILE_ERROR_CODES.INVALID_FILE_TYPE,
|
|
1471
|
+
"\u30ED\u30B4\u753B\u50CF\u306F PNG / JPEG / WebP \u5F62\u5F0F\u3067\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044"
|
|
1472
|
+
)
|
|
1473
|
+
};
|
|
1474
|
+
}
|
|
1475
|
+
return { ok: true, file };
|
|
1476
|
+
}
|
|
1477
|
+
function createOrganizationProfileMethods(deps) {
|
|
1478
|
+
const { fetchWithAuth, createError, authMode, baseUrl, logger, errorCodes } = deps;
|
|
1479
|
+
function serviceKeyModeError() {
|
|
1480
|
+
if (authMode === "service-key") return null;
|
|
1481
|
+
return createError(
|
|
1482
|
+
FFID_ORGANIZATION_PROFILE_ERROR_CODES.VALIDATION_ERROR,
|
|
1483
|
+
"getOrganizationProfile / upsertOrganizationProfile / uploadOrganizationLogo \u306F service-key \u8A8D\u8A3C\uFF08X-Service-Api-Key\uFF09\u3067\u306E\u307F\u5229\u7528\u3067\u304D\u307E\u3059\u3002Bearer / cookie \u30E2\u30FC\u30C9\u3067\u306F\u547C\u3073\u51FA\u305B\u307E\u305B\u3093"
|
|
1484
|
+
);
|
|
1485
|
+
}
|
|
1486
|
+
function requireOrganizationId(organizationId) {
|
|
1487
|
+
if (isBlank(organizationId)) {
|
|
1488
|
+
return createError(
|
|
1489
|
+
FFID_ORGANIZATION_PROFILE_ERROR_CODES.VALIDATION_ERROR,
|
|
1490
|
+
"organizationId \u306F\u5FC5\u9808\u3067\u3059"
|
|
1491
|
+
);
|
|
1492
|
+
}
|
|
1493
|
+
return null;
|
|
1494
|
+
}
|
|
1495
|
+
async function fetchPublic(endpoint, options = {}) {
|
|
1496
|
+
const url = `${baseUrl}${endpoint}`;
|
|
1497
|
+
logger.debug("Fetching (public):", url);
|
|
1498
|
+
let response;
|
|
1499
|
+
try {
|
|
1500
|
+
response = await fetch(url, {
|
|
1501
|
+
...options,
|
|
1502
|
+
credentials: "omit",
|
|
1503
|
+
headers: {
|
|
1504
|
+
...sdkHeaders(),
|
|
1505
|
+
...options.headers
|
|
1506
|
+
}
|
|
1507
|
+
});
|
|
1508
|
+
} catch (error) {
|
|
1509
|
+
logger.error("Network error:", error);
|
|
1510
|
+
return {
|
|
1511
|
+
error: {
|
|
1512
|
+
code: errorCodes.NETWORK_ERROR,
|
|
1513
|
+
message: error instanceof Error ? error.message : "\u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F"
|
|
1514
|
+
}
|
|
1515
|
+
};
|
|
1516
|
+
}
|
|
1517
|
+
let parsed;
|
|
1518
|
+
try {
|
|
1519
|
+
parsed = await response.json();
|
|
1520
|
+
} catch (parseError) {
|
|
1521
|
+
logger.error("Parse error:", parseError, "Status:", response.status);
|
|
1522
|
+
return {
|
|
1523
|
+
error: {
|
|
1524
|
+
code: errorCodes.PARSE_ERROR,
|
|
1525
|
+
message: `\u30B5\u30FC\u30D0\u30FC\u304B\u3089\u4E0D\u6B63\u306A\u30EC\u30B9\u30DD\u30F3\u30B9\u3092\u53D7\u4FE1\u3057\u307E\u3057\u305F (status: ${response.status})`
|
|
1526
|
+
}
|
|
1527
|
+
};
|
|
1528
|
+
}
|
|
1529
|
+
if (!parsed || typeof parsed !== "object") {
|
|
1530
|
+
return {
|
|
1531
|
+
error: {
|
|
1532
|
+
code: errorCodes.PARSE_ERROR,
|
|
1533
|
+
message: `\u30B5\u30FC\u30D0\u30FC\u304B\u3089\u4E0D\u6B63\u306A\u30EC\u30B9\u30DD\u30F3\u30B9\u3092\u53D7\u4FE1\u3057\u307E\u3057\u305F (status: ${response.status})`
|
|
1534
|
+
}
|
|
1535
|
+
};
|
|
1536
|
+
}
|
|
1537
|
+
const raw = parsed;
|
|
1538
|
+
logger.debug("Response (public):", response.status, raw);
|
|
1539
|
+
checkVersionHeader(response, logger);
|
|
1540
|
+
if (!response.ok) {
|
|
1541
|
+
return {
|
|
1542
|
+
error: raw.error ?? {
|
|
1543
|
+
code: errorCodes.UNKNOWN_ERROR,
|
|
1544
|
+
message: "\u4E0D\u660E\u306A\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F"
|
|
1545
|
+
}
|
|
1546
|
+
};
|
|
1547
|
+
}
|
|
1548
|
+
if (raw.data === void 0) {
|
|
1549
|
+
return {
|
|
1550
|
+
error: {
|
|
1551
|
+
code: errorCodes.UNKNOWN_ERROR,
|
|
1552
|
+
message: "\u30B5\u30FC\u30D0\u30FC\u304B\u3089\u30C7\u30FC\u30BF\u304C\u8FD4\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F"
|
|
1553
|
+
}
|
|
1554
|
+
};
|
|
1555
|
+
}
|
|
1556
|
+
return { data: raw.data };
|
|
1557
|
+
}
|
|
1558
|
+
async function getOrganizationProfile(organizationIdOrParams) {
|
|
1559
|
+
const modeError = serviceKeyModeError();
|
|
1560
|
+
if (modeError) return { error: modeError };
|
|
1561
|
+
const organizationId = resolveOrganizationId(organizationIdOrParams);
|
|
1562
|
+
const idError = requireOrganizationId(organizationId);
|
|
1563
|
+
if (idError) return { error: idError };
|
|
1564
|
+
return fetchWithAuth(
|
|
1565
|
+
`${EXT_PROFILE_ENDPOINT}?${profileQuery(organizationId)}`
|
|
1566
|
+
);
|
|
1567
|
+
}
|
|
1568
|
+
async function upsertOrganizationProfile(organizationIdOrParams, payload) {
|
|
1569
|
+
const modeError = serviceKeyModeError();
|
|
1570
|
+
if (modeError) return { error: modeError };
|
|
1571
|
+
const params = resolveUpsertParams(organizationIdOrParams, payload);
|
|
1572
|
+
const idError = requireOrganizationId(params.organizationId);
|
|
1573
|
+
if (idError) return { error: idError };
|
|
1574
|
+
const consentError = listingConsentValidationError(params.listingConsent, createError);
|
|
1575
|
+
if (consentError) return { error: consentError };
|
|
1576
|
+
return fetchWithAuth(
|
|
1577
|
+
`${EXT_PROFILE_ENDPOINT}?${profileQuery(params.organizationId)}`,
|
|
1578
|
+
{
|
|
1579
|
+
method: "PUT",
|
|
1580
|
+
body: JSON.stringify(buildUpsertBody(params))
|
|
1581
|
+
}
|
|
1582
|
+
);
|
|
1583
|
+
}
|
|
1584
|
+
async function uploadOrganizationLogo(organizationIdOrParams, file) {
|
|
1585
|
+
const modeError = serviceKeyModeError();
|
|
1586
|
+
if (modeError) return { error: modeError };
|
|
1587
|
+
const params = resolveUploadParams(organizationIdOrParams, file);
|
|
1588
|
+
const idError = requireOrganizationId(params.organizationId);
|
|
1589
|
+
if (idError) return { error: idError };
|
|
1590
|
+
const logoFile = resolveLogoFile(params.file, createError);
|
|
1591
|
+
if (!logoFile.ok) return { error: logoFile.error };
|
|
1592
|
+
const form = new FormData();
|
|
1593
|
+
form.append("file", logoFile.file, logoUploadFilename(logoFile.file));
|
|
1594
|
+
return fetchWithAuth(
|
|
1595
|
+
`${EXT_PROFILE_LOGO_ENDPOINT}?${profileQuery(params.organizationId)}`,
|
|
1596
|
+
{ method: "POST", body: form }
|
|
1597
|
+
);
|
|
1598
|
+
}
|
|
1599
|
+
async function getPublicLogoWall() {
|
|
1600
|
+
return fetchPublic(LOGO_WALL_ENDPOINT);
|
|
1601
|
+
}
|
|
1602
|
+
return {
|
|
1603
|
+
getOrganizationProfile,
|
|
1604
|
+
upsertOrganizationProfile,
|
|
1605
|
+
uploadOrganizationLogo,
|
|
1606
|
+
getPublicLogoWall
|
|
1607
|
+
};
|
|
1608
|
+
}
|
|
1609
|
+
|
|
1306
1610
|
// src/client/provisioning-methods.ts
|
|
1307
1611
|
var USER_PROVISION_ENDPOINT = "/api/v1/ext/users/provision";
|
|
1308
1612
|
var USER_WELCOME_EMAIL_ENDPOINT = "/api/v1/ext/users/welcome-email";
|
|
@@ -1446,7 +1750,7 @@ function createSeatMethods(deps) {
|
|
|
1446
1750
|
}
|
|
1447
1751
|
|
|
1448
1752
|
// src/client/profile-methods.ts
|
|
1449
|
-
var
|
|
1753
|
+
var EXT_PROFILE_ENDPOINT2 = "/api/v1/users/ext/me";
|
|
1450
1754
|
function resolveAuthOverride(options, createError) {
|
|
1451
1755
|
if (!options || options.accessToken === void 0) {
|
|
1452
1756
|
return {};
|
|
@@ -1467,7 +1771,7 @@ function createProfileMethods(deps) {
|
|
|
1467
1771
|
async function getProfile(options) {
|
|
1468
1772
|
const { override, error } = resolveAuthOverride(options, createError);
|
|
1469
1773
|
if (error) return { error };
|
|
1470
|
-
return fetchWithAuth(
|
|
1774
|
+
return fetchWithAuth(EXT_PROFILE_ENDPOINT2, void 0, override);
|
|
1471
1775
|
}
|
|
1472
1776
|
async function updateProfile(data, options) {
|
|
1473
1777
|
if (data === null || typeof data !== "object" || Array.isArray(data)) {
|
|
@@ -1483,7 +1787,7 @@ function createProfileMethods(deps) {
|
|
|
1483
1787
|
const { override, error } = resolveAuthOverride(options, createError);
|
|
1484
1788
|
if (error) return { error };
|
|
1485
1789
|
return fetchWithAuth(
|
|
1486
|
-
|
|
1790
|
+
EXT_PROFILE_ENDPOINT2,
|
|
1487
1791
|
{
|
|
1488
1792
|
method: "PUT",
|
|
1489
1793
|
body: JSON.stringify(data)
|
|
@@ -1676,50 +1980,6 @@ function validateTokenResponse(tokenResponse) {
|
|
|
1676
1980
|
};
|
|
1677
1981
|
}
|
|
1678
1982
|
|
|
1679
|
-
// src/client/version-check.ts
|
|
1680
|
-
var SDK_VERSION = "6.0.0";
|
|
1681
|
-
var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
|
|
1682
|
-
var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
|
|
1683
|
-
function sdkHeaders() {
|
|
1684
|
-
if (typeof window !== "undefined") return {};
|
|
1685
|
-
return {
|
|
1686
|
-
"User-Agent": SDK_USER_AGENT,
|
|
1687
|
-
[SDK_VERSION_HEADER]: SDK_VERSION
|
|
1688
|
-
};
|
|
1689
|
-
}
|
|
1690
|
-
var LATEST_VERSION_HEADER = "X-FFID-SDK-Latest-Version";
|
|
1691
|
-
var SEMVER_PATTERN = /^\d+(\.\d+)*$/;
|
|
1692
|
-
var _versionWarningShown = false;
|
|
1693
|
-
function compareSemver(a, b) {
|
|
1694
|
-
const cleanA = a.replace(/^v/, "");
|
|
1695
|
-
const cleanB = b.replace(/^v/, "");
|
|
1696
|
-
if (!SEMVER_PATTERN.test(cleanA) || !SEMVER_PATTERN.test(cleanB)) return 0;
|
|
1697
|
-
const partsA = cleanA.split(".").map(Number);
|
|
1698
|
-
const partsB = cleanB.split(".").map(Number);
|
|
1699
|
-
const maxLen = Math.max(partsA.length, partsB.length);
|
|
1700
|
-
for (let i = 0; i < maxLen; i++) {
|
|
1701
|
-
const numA = partsA[i] ?? 0;
|
|
1702
|
-
const numB = partsB[i] ?? 0;
|
|
1703
|
-
if (numA < numB) return -1;
|
|
1704
|
-
if (numA > numB) return 1;
|
|
1705
|
-
}
|
|
1706
|
-
return 0;
|
|
1707
|
-
}
|
|
1708
|
-
function checkVersionHeader(response, logger) {
|
|
1709
|
-
if (_versionWarningShown) return;
|
|
1710
|
-
if (typeof process !== "undefined" && process.env?.NODE_ENV === "production") return;
|
|
1711
|
-
if (!response.headers?.get) return;
|
|
1712
|
-
const latestVersion = response.headers.get(LATEST_VERSION_HEADER);
|
|
1713
|
-
if (!latestVersion) return;
|
|
1714
|
-
if (compareSemver(SDK_VERSION, latestVersion) < 0) {
|
|
1715
|
-
_versionWarningShown = true;
|
|
1716
|
-
logger.warn(
|
|
1717
|
-
`\u65B0\u3057\u3044\u30D0\u30FC\u30B8\u30E7\u30F3\u304C\u5229\u7528\u53EF\u80FD\u3067\u3059: v${latestVersion} (\u73FE\u5728: v${SDK_VERSION})
|
|
1718
|
-
npm install @feelflow/ffid-sdk@latest \u3067\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u3067\u304D\u307E\u3059`
|
|
1719
|
-
);
|
|
1720
|
-
}
|
|
1721
|
-
}
|
|
1722
|
-
|
|
1723
1983
|
// src/client/oauth-token.ts
|
|
1724
1984
|
var OAUTH_TOKEN_ENDPOINT = "/api/v1/oauth/token";
|
|
1725
1985
|
var OAUTH_REVOKE_ENDPOINT = "/api/v1/oauth/revoke";
|
|
@@ -2635,7 +2895,7 @@ function normalizeRedirectUri(input) {
|
|
|
2635
2895
|
|
|
2636
2896
|
// src/client/password-reset.ts
|
|
2637
2897
|
var RESET_PASSWORD_BASE = "/api/v1/auth/reset-password";
|
|
2638
|
-
function
|
|
2898
|
+
function isBlank2(value) {
|
|
2639
2899
|
return !value || !value.trim();
|
|
2640
2900
|
}
|
|
2641
2901
|
function createPasswordResetMethods(deps) {
|
|
@@ -2696,7 +2956,7 @@ function createPasswordResetMethods(deps) {
|
|
|
2696
2956
|
return { data: raw.data };
|
|
2697
2957
|
}
|
|
2698
2958
|
async function requestPasswordReset(email) {
|
|
2699
|
-
if (
|
|
2959
|
+
if (isBlank2(email)) {
|
|
2700
2960
|
return {
|
|
2701
2961
|
error: createError("VALIDATION_ERROR", "\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u306F\u5FC5\u9808\u3067\u3059")
|
|
2702
2962
|
};
|
|
@@ -2710,7 +2970,7 @@ function createPasswordResetMethods(deps) {
|
|
|
2710
2970
|
);
|
|
2711
2971
|
}
|
|
2712
2972
|
async function verifyPasswordResetToken(accessToken) {
|
|
2713
|
-
if (
|
|
2973
|
+
if (isBlank2(accessToken)) {
|
|
2714
2974
|
return {
|
|
2715
2975
|
error: createError("VALIDATION_ERROR", "\u30A2\u30AF\u30BB\u30B9\u30C8\u30FC\u30AF\u30F3\u306F\u5FC5\u9808\u3067\u3059")
|
|
2716
2976
|
};
|
|
@@ -2724,12 +2984,12 @@ function createPasswordResetMethods(deps) {
|
|
|
2724
2984
|
);
|
|
2725
2985
|
}
|
|
2726
2986
|
async function establishResetSession(accessToken, refreshToken) {
|
|
2727
|
-
if (
|
|
2987
|
+
if (isBlank2(accessToken)) {
|
|
2728
2988
|
return {
|
|
2729
2989
|
error: createError("VALIDATION_ERROR", "\u30A2\u30AF\u30BB\u30B9\u30C8\u30FC\u30AF\u30F3\u306F\u5FC5\u9808\u3067\u3059")
|
|
2730
2990
|
};
|
|
2731
2991
|
}
|
|
2732
|
-
if (
|
|
2992
|
+
if (isBlank2(refreshToken)) {
|
|
2733
2993
|
return {
|
|
2734
2994
|
error: createError("VALIDATION_ERROR", "\u30EA\u30D5\u30EC\u30C3\u30B7\u30E5\u30C8\u30FC\u30AF\u30F3\u306F\u5FC5\u9808\u3067\u3059")
|
|
2735
2995
|
};
|
|
@@ -2743,7 +3003,7 @@ function createPasswordResetMethods(deps) {
|
|
|
2743
3003
|
);
|
|
2744
3004
|
}
|
|
2745
3005
|
async function confirmPasswordReset(password) {
|
|
2746
|
-
if (
|
|
3006
|
+
if (isBlank2(password)) {
|
|
2747
3007
|
return {
|
|
2748
3008
|
error: createError("VALIDATION_ERROR", "\u30D1\u30B9\u30EF\u30FC\u30C9\u306F\u5FC5\u9808\u3067\u3059")
|
|
2749
3009
|
};
|
|
@@ -2766,7 +3026,7 @@ function createPasswordResetMethods(deps) {
|
|
|
2766
3026
|
|
|
2767
3027
|
// src/client/otp.ts
|
|
2768
3028
|
var OTP_BASE = "/api/v1/auth/otp";
|
|
2769
|
-
function
|
|
3029
|
+
function isBlank3(value) {
|
|
2770
3030
|
return !value || !value.trim();
|
|
2771
3031
|
}
|
|
2772
3032
|
function createOtpMethods(deps) {
|
|
@@ -2827,7 +3087,7 @@ function createOtpMethods(deps) {
|
|
|
2827
3087
|
return { data: raw.data };
|
|
2828
3088
|
}
|
|
2829
3089
|
async function sendOtp(email, options) {
|
|
2830
|
-
if (
|
|
3090
|
+
if (isBlank3(email)) {
|
|
2831
3091
|
return {
|
|
2832
3092
|
error: createError("VALIDATION_ERROR", "\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u306F\u5FC5\u9808\u3067\u3059")
|
|
2833
3093
|
};
|
|
@@ -2844,12 +3104,12 @@ function createOtpMethods(deps) {
|
|
|
2844
3104
|
);
|
|
2845
3105
|
}
|
|
2846
3106
|
async function verifyOtp(params) {
|
|
2847
|
-
if (
|
|
3107
|
+
if (isBlank3(params.accessToken)) {
|
|
2848
3108
|
return {
|
|
2849
3109
|
error: createError("VALIDATION_ERROR", "\u30A2\u30AF\u30BB\u30B9\u30C8\u30FC\u30AF\u30F3\u306F\u5FC5\u9808\u3067\u3059")
|
|
2850
3110
|
};
|
|
2851
3111
|
}
|
|
2852
|
-
if (
|
|
3112
|
+
if (isBlank3(params.refreshToken)) {
|
|
2853
3113
|
return {
|
|
2854
3114
|
error: createError("VALIDATION_ERROR", "\u30EA\u30D5\u30EC\u30C3\u30B7\u30E5\u30C8\u30FC\u30AF\u30F3\u306F\u5FC5\u9808\u3067\u3059")
|
|
2855
3115
|
};
|
|
@@ -3415,6 +3675,12 @@ function resolveRedirectUri(raw, logger) {
|
|
|
3415
3675
|
return raw;
|
|
3416
3676
|
}
|
|
3417
3677
|
}
|
|
3678
|
+
function jsonContentTypeHeader(body) {
|
|
3679
|
+
if (typeof FormData !== "undefined" && body instanceof FormData) {
|
|
3680
|
+
return {};
|
|
3681
|
+
}
|
|
3682
|
+
return { "Content-Type": "application/json" };
|
|
3683
|
+
}
|
|
3418
3684
|
function createFFIDClient(config) {
|
|
3419
3685
|
if (!config.serviceCode || !config.serviceCode.trim()) {
|
|
3420
3686
|
throw new Error("FFID Client: serviceCode \u304C\u672A\u8A2D\u5B9A\u3067\u3059");
|
|
@@ -3467,7 +3733,7 @@ function createFFIDClient(config) {
|
|
|
3467
3733
|
...options,
|
|
3468
3734
|
credentials: "omit",
|
|
3469
3735
|
headers: {
|
|
3470
|
-
|
|
3736
|
+
...jsonContentTypeHeader(options.body),
|
|
3471
3737
|
...sdkHeaders(),
|
|
3472
3738
|
...options.headers,
|
|
3473
3739
|
Authorization: `Bearer ${authOverride.accessToken}`
|
|
@@ -3479,7 +3745,7 @@ function createFFIDClient(config) {
|
|
|
3479
3745
|
...options,
|
|
3480
3746
|
credentials: "omit",
|
|
3481
3747
|
headers: {
|
|
3482
|
-
|
|
3748
|
+
...jsonContentTypeHeader(options.body),
|
|
3483
3749
|
...sdkHeaders(),
|
|
3484
3750
|
"X-Service-Api-Key": serviceApiKey,
|
|
3485
3751
|
...options.headers
|
|
@@ -3489,7 +3755,7 @@ function createFFIDClient(config) {
|
|
|
3489
3755
|
if (authMode === "token") {
|
|
3490
3756
|
const tokens = tokenStore.getTokens();
|
|
3491
3757
|
const headers = {
|
|
3492
|
-
|
|
3758
|
+
...jsonContentTypeHeader(options.body),
|
|
3493
3759
|
...sdkHeaders(),
|
|
3494
3760
|
...options.headers
|
|
3495
3761
|
};
|
|
@@ -3506,7 +3772,7 @@ function createFFIDClient(config) {
|
|
|
3506
3772
|
...options,
|
|
3507
3773
|
credentials: "include",
|
|
3508
3774
|
headers: {
|
|
3509
|
-
|
|
3775
|
+
...jsonContentTypeHeader(options.body),
|
|
3510
3776
|
...sdkHeaders(),
|
|
3511
3777
|
...options.headers
|
|
3512
3778
|
}
|
|
@@ -3723,6 +3989,19 @@ function createFFIDClient(config) {
|
|
|
3723
3989
|
createError,
|
|
3724
3990
|
serviceCode: config.serviceCode
|
|
3725
3991
|
});
|
|
3992
|
+
const {
|
|
3993
|
+
getOrganizationProfile,
|
|
3994
|
+
upsertOrganizationProfile,
|
|
3995
|
+
uploadOrganizationLogo,
|
|
3996
|
+
getPublicLogoWall
|
|
3997
|
+
} = createOrganizationProfileMethods({
|
|
3998
|
+
fetchWithAuth,
|
|
3999
|
+
createError,
|
|
4000
|
+
authMode,
|
|
4001
|
+
baseUrl,
|
|
4002
|
+
logger,
|
|
4003
|
+
errorCodes: FFID_ERROR_CODES
|
|
4004
|
+
});
|
|
3726
4005
|
const { provisionUser, sendProvisionWelcomeEmail, provisionOrganization } = createProvisioningMethods({
|
|
3727
4006
|
fetchWithAuth,
|
|
3728
4007
|
createError,
|
|
@@ -3823,6 +4102,10 @@ function createFFIDClient(config) {
|
|
|
3823
4102
|
addMember,
|
|
3824
4103
|
updateMemberRole,
|
|
3825
4104
|
removeMember,
|
|
4105
|
+
getOrganizationProfile,
|
|
4106
|
+
upsertOrganizationProfile,
|
|
4107
|
+
uploadOrganizationLogo,
|
|
4108
|
+
getPublicLogoWall,
|
|
3826
4109
|
provisionUser,
|
|
3827
4110
|
sendProvisionWelcomeEmail,
|
|
3828
4111
|
provisionOrganization,
|
|
@@ -6027,13 +6310,19 @@ exports.FFIDProvider = FFIDProvider;
|
|
|
6027
6310
|
exports.FFIDSDKError = FFIDSDKError;
|
|
6028
6311
|
exports.FFIDSubscriptionBadge = FFIDSubscriptionBadge;
|
|
6029
6312
|
exports.FFIDUserMenu = FFIDUserMenu;
|
|
6313
|
+
exports.FFID_ALLOWED_ORGANIZATION_LOGO_MIME_TYPES = FFID_ALLOWED_ORGANIZATION_LOGO_MIME_TYPES;
|
|
6030
6314
|
exports.FFID_ANNOUNCEMENTS_ERROR_CODES = FFID_ANNOUNCEMENTS_ERROR_CODES;
|
|
6031
6315
|
exports.FFID_CATALOG_ENVIRONMENTS = FFID_CATALOG_ENVIRONMENTS;
|
|
6032
6316
|
exports.FFID_CATALOG_PUBLICATION_STATUSES = FFID_CATALOG_PUBLICATION_STATUSES;
|
|
6317
|
+
exports.FFID_COMPANY_SIZE_CODES = FFID_COMPANY_SIZE_CODES;
|
|
6033
6318
|
exports.FFID_ERROR_CODES = FFID_ERROR_CODES;
|
|
6319
|
+
exports.FFID_INDUSTRY_CODES = FFID_INDUSTRY_CODES;
|
|
6034
6320
|
exports.FFID_INQUIRY_ACQUISITION_SOURCES = FFID_INQUIRY_ACQUISITION_SOURCES;
|
|
6035
6321
|
exports.FFID_INQUIRY_CATEGORIES = FFID_INQUIRY_CATEGORIES;
|
|
6036
6322
|
exports.FFID_INQUIRY_CATEGORIES_SITE_2026 = FFID_INQUIRY_CATEGORIES_SITE_2026;
|
|
6323
|
+
exports.FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_BYTES = FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_BYTES;
|
|
6324
|
+
exports.FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_MB = FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_MB;
|
|
6325
|
+
exports.FFID_ORGANIZATION_PROFILE_ERROR_CODES = FFID_ORGANIZATION_PROFILE_ERROR_CODES;
|
|
6037
6326
|
exports.canonicalizeCatalogValue = canonicalizeCatalogValue;
|
|
6038
6327
|
exports.cleanupStateStorage = cleanupStateStorage;
|
|
6039
6328
|
exports.computeEffectiveStatusFromSession = computeEffectiveStatusFromSession;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { createContext,
|
|
2
|
+
import { createContext, useCallback, useState, useRef, useEffect, useMemo, useContext } from 'react';
|
|
3
3
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
4
|
|
|
5
5
|
var FFIDConsentCategoryCodeSchema = z.enum([
|
|
@@ -1077,11 +1077,6 @@ var FALLBACK_VALUE = {
|
|
|
1077
1077
|
syncWithUser: defaultAction
|
|
1078
1078
|
};
|
|
1079
1079
|
var FFIDConsentContext = createContext(FALLBACK_VALUE);
|
|
1080
|
-
var DEFAULT_MERGE_WARNING_MESSAGES = {
|
|
1081
|
-
local_state_overridden: "\u5225\u306E\u7AEF\u672B\u3067\u4FDD\u5B58\u3055\u308C\u305F Cookie \u540C\u610F\u8A2D\u5B9A\u3067\u66F4\u65B0\u3055\u308C\u307E\u3057\u305F",
|
|
1082
|
-
shared_device_detected: "\u3053\u306E\u7AEF\u672B\u306F\u5225\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u3067\u3082\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059\u3002Cookie \u8A2D\u5B9A\u306F\u30A2\u30AB\u30A6\u30F3\u30C8\u3054\u3068\u306B\u4FDD\u5B58\u3055\u308C\u3066\u3044\u307E\u3059",
|
|
1083
|
-
drift_detected: "\u4FDD\u5B58\u3055\u308C\u3066\u3044\u305F\u8A2D\u5B9A\u3068\u7570\u306A\u308B\u9805\u76EE\u304C\u3042\u3063\u305F\u305F\u3081\u3001\u65B0\u3057\u304F\u8A18\u9332\u3055\u308C\u307E\u3057\u305F"
|
|
1084
|
-
};
|
|
1085
1080
|
var DEFAULT_DISMISSAL_COOLDOWN_MINUTES = 30;
|
|
1086
1081
|
var MS_PER_MINUTE = 6e4;
|
|
1087
1082
|
function applyChanges(base, changes) {
|
|
@@ -1104,18 +1099,10 @@ function FFIDAnalyticsProvider({
|
|
|
1104
1099
|
onError,
|
|
1105
1100
|
autoShowBanner = true,
|
|
1106
1101
|
dismissalCooldownMinutes = DEFAULT_DISMISSAL_COOLDOWN_MINUTES,
|
|
1107
|
-
mergeWarningMessages,
|
|
1108
1102
|
fetchImpl,
|
|
1109
1103
|
children
|
|
1110
1104
|
}) {
|
|
1111
1105
|
const cooldownMs = Number.isFinite(dismissalCooldownMinutes) && dismissalCooldownMinutes > 0 ? dismissalCooldownMinutes * MS_PER_MINUTE : 0;
|
|
1112
|
-
const resolvedMergeWarningMessages = useMemo(
|
|
1113
|
-
() => ({
|
|
1114
|
-
...DEFAULT_MERGE_WARNING_MESSAGES,
|
|
1115
|
-
...mergeWarningMessages
|
|
1116
|
-
}),
|
|
1117
|
-
[mergeWarningMessages]
|
|
1118
|
-
);
|
|
1119
1106
|
const isWithinDismissalCooldown = useCallback(() => {
|
|
1120
1107
|
if (cooldownMs <= 0) return false;
|
|
1121
1108
|
const dismissedAt = readConsentDismissalTimestamp();
|
|
@@ -1385,19 +1372,7 @@ function FFIDAnalyticsProvider({
|
|
|
1385
1372
|
setState(result.value.state);
|
|
1386
1373
|
applyCategoriesSideEffects(result.value.state.categories);
|
|
1387
1374
|
persistCategories(result.value.state.categories);
|
|
1388
|
-
const warning = result.value.warning ? {
|
|
1389
|
-
code: result.value.warning,
|
|
1390
|
-
// Belt-and-suspenders fallback per spec §5.3: an empty-string
|
|
1391
|
-
// override (`mergeWarningMessages={{ code: '' }}`) or a future
|
|
1392
|
-
// wire-schema widening that adds a new `FFIDConsentMergeWarning`
|
|
1393
|
-
// literal without a default copy would otherwise leak `''` /
|
|
1394
|
-
// `undefined` into `warning.message`, silently breaking consumers
|
|
1395
|
-
// that render it (`<Toast>{warning.message}</Toast>`,
|
|
1396
|
-
// `Sentry.setContext`). Truthy-fallback preserves visibility of
|
|
1397
|
-
// the JP default; consumers wanting to suppress display should
|
|
1398
|
-
// pattern-match on `code` instead of mutating `message`.
|
|
1399
|
-
message: resolvedMergeWarningMessages[result.value.warning] || DEFAULT_MERGE_WARNING_MESSAGES[result.value.warning]
|
|
1400
|
-
} : null;
|
|
1375
|
+
const warning = result.value.warning ? { code: result.value.warning } : null;
|
|
1401
1376
|
onConsentChange?.(result.value.state, warning);
|
|
1402
1377
|
return result;
|
|
1403
1378
|
}, [
|
|
@@ -1405,8 +1380,7 @@ function FFIDAnalyticsProvider({
|
|
|
1405
1380
|
ensurePolicyVersion,
|
|
1406
1381
|
onConsentChange,
|
|
1407
1382
|
onError,
|
|
1408
|
-
persistCategories
|
|
1409
|
-
resolvedMergeWarningMessages
|
|
1383
|
+
persistCategories
|
|
1410
1384
|
]);
|
|
1411
1385
|
const openBanner = useCallback(() => setIsBannerOpen(true), []);
|
|
1412
1386
|
const closeBanner = useCallback(() => {
|
|
@@ -2003,4 +1977,4 @@ function FFIDCookieLink({
|
|
|
2003
1977
|
);
|
|
2004
1978
|
}
|
|
2005
1979
|
|
|
2006
|
-
export { ALL_DENIED_EXCEPT_NECESSARY, CONSENT_COOKIE_MAX_AGE_SEC, CONSENT_COOKIE_NAME, CONSENT_DISMISSAL_TIMESTAMP_KEY, CONSENT_SESSION_STORAGE_KEY, COOKIE_VERSION, DEFAULT_CONSENT_ERROR_MESSAGES,
|
|
1980
|
+
export { ALL_DENIED_EXCEPT_NECESSARY, CONSENT_COOKIE_MAX_AGE_SEC, CONSENT_COOKIE_NAME, CONSENT_DISMISSAL_TIMESTAMP_KEY, CONSENT_SESSION_STORAGE_KEY, COOKIE_VERSION, DEFAULT_CONSENT_ERROR_MESSAGES, DEVICE_ID_LOCAL_STORAGE_KEY, DEVICE_ID_SESSION_STORAGE_KEY, DeviceIdSchema, FFIDAnalyticsProvider, FFIDConsentCategoriesSchema, FFIDConsentCategoryCodeSchema, FFIDConsentCategoryMetadataSchema, FFIDConsentContext, FFIDConsentError, FFIDConsentMergeStrategySchema, FFIDConsentMergeWarningSchema, FFIDConsentSourceSchema, FFIDConsentStateSchema, FFIDConsentUpdateSchema, FFIDCookieBanner, FFIDCookieLink, FFIDCookiePolicySchema, FFIDCookieSettings, FFIDInternalConsentSourceSchema, FFIDPublicConsentSourceSchema, FFID_CONSENT_ERROR_CODES, FFID_CONSENT_NOT_DECIDED_STATE, GetCategoriesWireSchema, GetConsentMeWireSchema, GetDocumentWireSchema, PostConsentRequestSchema, PostConsentWireSchema, PostSyncRequestSchema, PostSyncWireSchema, PostWithdrawWireSchema, clearConsentDismissalTimestamp, clearConsentSessionMirror, clearDeviceId, createConsentClient, createGtagBridge, decodeConsentCookie, deleteConsentCookie, encodeConsentCookie, generateDeviceId, getOrCreateDeviceId, isUuidV7, isValidDeviceId, mapCategoriesToGtagParams, mapConsentWireToState, mapMeWireToState, mapSyncWireToResult, mapWithdrawWireToState, readConsentCookie, readConsentDismissalTimestamp, readConsentSessionMirror, useFFIDConsent, useFFIDConsentPreferences, writeConsentCookie, writeConsentDismissalTimestamp, writeConsentSessionMirror };
|