@feelflow/ffid-sdk 4.2.0 → 4.3.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 +35 -0
- package/dist/{chunk-WI645CPU.js → chunk-35UOD62N.js} +36 -3
- package/dist/{chunk-U4XDH7TI.cjs → chunk-5MO7G2JW.cjs} +36 -3
- 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-CUOFknXy.d.ts → ffid-client-BaStAONh.d.ts} +20 -1
- package/dist/{ffid-client-CKMGqqPi.d.cts → ffid-client-DgprK2ec.d.cts} +20 -1
- package/dist/{index-DXgTH5vK.d.cts → index-CInGR4I9.d.cts} +16 -1
- package/dist/{index-DXgTH5vK.d.ts → index-CInGR4I9.d.ts} +16 -1
- package/dist/index.cjs +32 -32
- package/dist/index.d.cts +7 -3
- package/dist/index.d.ts +7 -3
- package/dist/index.js +2 -2
- package/dist/server/index.cjs +36 -3
- package/dist/server/index.d.cts +2 -2
- package/dist/server/index.d.ts +2 -2
- package/dist/server/index.js +36 -3
- package/dist/server/test/index.d.cts +1 -1
- package/dist/server/test/index.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -322,6 +322,41 @@ if (error || !access?.hasAccess) {
|
|
|
322
322
|
- `gracePeriodEndsAt`: `past_due_grace` が `blocked` に変わる時刻。表示・警告用であり、アクセス判定の source of truth にしない。
|
|
323
323
|
- `failPolicy`: 現在は `failClosed` 固定。FFID に到達できない、または canonical decision を取得できない場合は `result.error` ではなく `data.hasAccess=false` / `denialReason='ffid_unreachable'` / `data.error` を返す。呼び出し側は `result.error` だけで通過判定しない。
|
|
324
324
|
|
|
325
|
+
### Organization member management
|
|
326
|
+
|
|
327
|
+
`organization:read` / `organization:write` scope を持つ service-key または token で、組織メンバーの参照・追加・ロール変更・削除ができます。
|
|
328
|
+
|
|
329
|
+
```ts
|
|
330
|
+
import { createFFIDClient } from '@feelflow/ffid-sdk/server'
|
|
331
|
+
|
|
332
|
+
const ffid = createFFIDClient({
|
|
333
|
+
serviceCode: 'flow-board-ai',
|
|
334
|
+
scope: '',
|
|
335
|
+
authMode: 'service-key',
|
|
336
|
+
serviceApiKey: process.env.FFID_SERVICE_API_KEY!,
|
|
337
|
+
})
|
|
338
|
+
|
|
339
|
+
const addResult = await ffid.addMember({
|
|
340
|
+
organizationId,
|
|
341
|
+
email: 'new-member@example.com',
|
|
342
|
+
role: 'member',
|
|
343
|
+
})
|
|
344
|
+
|
|
345
|
+
if (addResult.error) {
|
|
346
|
+
throw new Error(addResult.error.message)
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
await ffid.updateMemberRole({
|
|
350
|
+
organizationId,
|
|
351
|
+
userId: addResult.data.member.userId,
|
|
352
|
+
role: 'admin',
|
|
353
|
+
})
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
- `addMember` は既存 FFID ユーザーを active member として追加します。招待メール送信や token 発行は行いません。
|
|
357
|
+
- `role` は `admin` / `member` / `viewer` のみ指定可能です。`owner` は追加・昇格 API では扱いません。
|
|
358
|
+
- agency client と同じ呼び味が必要な場合は `ffid.addMember(organizationId, { email, role })` も使えます。
|
|
359
|
+
|
|
325
360
|
### getProfile() / updateProfile()
|
|
326
361
|
|
|
327
362
|
ログイン中ユーザー自身のプロフィールを取得・更新するメソッド(`createFFIDClient` から呼び出し)。
|
|
@@ -708,6 +708,7 @@ function createSubscriptionMethods(deps) {
|
|
|
708
708
|
var EXT_MEMBERS_ENDPOINT = "/api/v1/organizations/ext/members";
|
|
709
709
|
function createMembersMethods(deps) {
|
|
710
710
|
const { fetchWithAuth, createError, serviceCode } = deps;
|
|
711
|
+
const assignableRoles = /* @__PURE__ */ new Set(["admin", "member", "viewer"]);
|
|
711
712
|
function buildQuery(organizationId) {
|
|
712
713
|
return new URLSearchParams({ organizationId, serviceCode }).toString();
|
|
713
714
|
}
|
|
@@ -721,6 +722,37 @@ function createMembersMethods(deps) {
|
|
|
721
722
|
`${EXT_MEMBERS_ENDPOINT}?${buildQuery(params.organizationId)}`
|
|
722
723
|
);
|
|
723
724
|
}
|
|
725
|
+
function normalizeAddMemberArgs(paramsOrOrganizationId, data) {
|
|
726
|
+
if (typeof paramsOrOrganizationId === "string") {
|
|
727
|
+
const params = {
|
|
728
|
+
organizationId: paramsOrOrganizationId,
|
|
729
|
+
email: data?.email ?? ""
|
|
730
|
+
};
|
|
731
|
+
if (data?.role !== void 0) params.role = data.role;
|
|
732
|
+
return params;
|
|
733
|
+
}
|
|
734
|
+
return paramsOrOrganizationId;
|
|
735
|
+
}
|
|
736
|
+
async function addMember(paramsOrOrganizationId, data) {
|
|
737
|
+
const params = normalizeAddMemberArgs(paramsOrOrganizationId, data);
|
|
738
|
+
if (!params.organizationId || !params.email) {
|
|
739
|
+
return {
|
|
740
|
+
error: createError("VALIDATION_ERROR", "organizationId \u3068 email \u306F\u5FC5\u9808\u3067\u3059")
|
|
741
|
+
};
|
|
742
|
+
}
|
|
743
|
+
if (params.role !== void 0 && !assignableRoles.has(params.role)) {
|
|
744
|
+
return {
|
|
745
|
+
error: createError("VALIDATION_ERROR", "role \u306F admin\u3001member\u3001viewer \u306E\u3044\u305A\u308C\u304B\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044")
|
|
746
|
+
};
|
|
747
|
+
}
|
|
748
|
+
return fetchWithAuth(
|
|
749
|
+
`${EXT_MEMBERS_ENDPOINT}?${buildQuery(params.organizationId)}`,
|
|
750
|
+
{
|
|
751
|
+
method: "POST",
|
|
752
|
+
body: JSON.stringify({ email: params.email, role: params.role })
|
|
753
|
+
}
|
|
754
|
+
);
|
|
755
|
+
}
|
|
724
756
|
async function updateMemberRole(params) {
|
|
725
757
|
if (!params.organizationId || !params.userId) {
|
|
726
758
|
return {
|
|
@@ -753,7 +785,7 @@ function createMembersMethods(deps) {
|
|
|
753
785
|
}
|
|
754
786
|
);
|
|
755
787
|
}
|
|
756
|
-
return { listMembers, updateMemberRole, removeMember };
|
|
788
|
+
return { listMembers, addMember, updateMemberRole, removeMember };
|
|
757
789
|
}
|
|
758
790
|
|
|
759
791
|
// src/client/profile-methods.ts
|
|
@@ -806,7 +838,7 @@ function createProfileMethods(deps) {
|
|
|
806
838
|
}
|
|
807
839
|
|
|
808
840
|
// src/client/version-check.ts
|
|
809
|
-
var SDK_VERSION = "4.
|
|
841
|
+
var SDK_VERSION = "4.3.0";
|
|
810
842
|
var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
|
|
811
843
|
var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
|
|
812
844
|
function sdkHeaders() {
|
|
@@ -2595,7 +2627,7 @@ function createFFIDClient(config) {
|
|
|
2595
2627
|
fetchWithAuth,
|
|
2596
2628
|
createError
|
|
2597
2629
|
});
|
|
2598
|
-
const { listMembers, updateMemberRole, removeMember } = createMembersMethods({
|
|
2630
|
+
const { listMembers, addMember, updateMemberRole, removeMember } = createMembersMethods({
|
|
2599
2631
|
fetchWithAuth,
|
|
2600
2632
|
createError,
|
|
2601
2633
|
serviceCode: config.serviceCode
|
|
@@ -2679,6 +2711,7 @@ function createFFIDClient(config) {
|
|
|
2679
2711
|
checkServiceAccess,
|
|
2680
2712
|
requireServiceAccess,
|
|
2681
2713
|
listMembers,
|
|
2714
|
+
addMember,
|
|
2682
2715
|
updateMemberRole,
|
|
2683
2716
|
removeMember,
|
|
2684
2717
|
getProfile,
|
|
@@ -710,6 +710,7 @@ function createSubscriptionMethods(deps) {
|
|
|
710
710
|
var EXT_MEMBERS_ENDPOINT = "/api/v1/organizations/ext/members";
|
|
711
711
|
function createMembersMethods(deps) {
|
|
712
712
|
const { fetchWithAuth, createError, serviceCode } = deps;
|
|
713
|
+
const assignableRoles = /* @__PURE__ */ new Set(["admin", "member", "viewer"]);
|
|
713
714
|
function buildQuery(organizationId) {
|
|
714
715
|
return new URLSearchParams({ organizationId, serviceCode }).toString();
|
|
715
716
|
}
|
|
@@ -723,6 +724,37 @@ function createMembersMethods(deps) {
|
|
|
723
724
|
`${EXT_MEMBERS_ENDPOINT}?${buildQuery(params.organizationId)}`
|
|
724
725
|
);
|
|
725
726
|
}
|
|
727
|
+
function normalizeAddMemberArgs(paramsOrOrganizationId, data) {
|
|
728
|
+
if (typeof paramsOrOrganizationId === "string") {
|
|
729
|
+
const params = {
|
|
730
|
+
organizationId: paramsOrOrganizationId,
|
|
731
|
+
email: data?.email ?? ""
|
|
732
|
+
};
|
|
733
|
+
if (data?.role !== void 0) params.role = data.role;
|
|
734
|
+
return params;
|
|
735
|
+
}
|
|
736
|
+
return paramsOrOrganizationId;
|
|
737
|
+
}
|
|
738
|
+
async function addMember(paramsOrOrganizationId, data) {
|
|
739
|
+
const params = normalizeAddMemberArgs(paramsOrOrganizationId, data);
|
|
740
|
+
if (!params.organizationId || !params.email) {
|
|
741
|
+
return {
|
|
742
|
+
error: createError("VALIDATION_ERROR", "organizationId \u3068 email \u306F\u5FC5\u9808\u3067\u3059")
|
|
743
|
+
};
|
|
744
|
+
}
|
|
745
|
+
if (params.role !== void 0 && !assignableRoles.has(params.role)) {
|
|
746
|
+
return {
|
|
747
|
+
error: createError("VALIDATION_ERROR", "role \u306F admin\u3001member\u3001viewer \u306E\u3044\u305A\u308C\u304B\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044")
|
|
748
|
+
};
|
|
749
|
+
}
|
|
750
|
+
return fetchWithAuth(
|
|
751
|
+
`${EXT_MEMBERS_ENDPOINT}?${buildQuery(params.organizationId)}`,
|
|
752
|
+
{
|
|
753
|
+
method: "POST",
|
|
754
|
+
body: JSON.stringify({ email: params.email, role: params.role })
|
|
755
|
+
}
|
|
756
|
+
);
|
|
757
|
+
}
|
|
726
758
|
async function updateMemberRole(params) {
|
|
727
759
|
if (!params.organizationId || !params.userId) {
|
|
728
760
|
return {
|
|
@@ -755,7 +787,7 @@ function createMembersMethods(deps) {
|
|
|
755
787
|
}
|
|
756
788
|
);
|
|
757
789
|
}
|
|
758
|
-
return { listMembers, updateMemberRole, removeMember };
|
|
790
|
+
return { listMembers, addMember, updateMemberRole, removeMember };
|
|
759
791
|
}
|
|
760
792
|
|
|
761
793
|
// src/client/profile-methods.ts
|
|
@@ -808,7 +840,7 @@ function createProfileMethods(deps) {
|
|
|
808
840
|
}
|
|
809
841
|
|
|
810
842
|
// src/client/version-check.ts
|
|
811
|
-
var SDK_VERSION = "4.
|
|
843
|
+
var SDK_VERSION = "4.3.0";
|
|
812
844
|
var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
|
|
813
845
|
var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
|
|
814
846
|
function sdkHeaders() {
|
|
@@ -2597,7 +2629,7 @@ function createFFIDClient(config) {
|
|
|
2597
2629
|
fetchWithAuth,
|
|
2598
2630
|
createError
|
|
2599
2631
|
});
|
|
2600
|
-
const { listMembers, updateMemberRole, removeMember } = createMembersMethods({
|
|
2632
|
+
const { listMembers, addMember, updateMemberRole, removeMember } = createMembersMethods({
|
|
2601
2633
|
fetchWithAuth,
|
|
2602
2634
|
createError,
|
|
2603
2635
|
serviceCode: config.serviceCode
|
|
@@ -2681,6 +2713,7 @@ function createFFIDClient(config) {
|
|
|
2681
2713
|
checkServiceAccess,
|
|
2682
2714
|
requireServiceAccess,
|
|
2683
2715
|
listMembers,
|
|
2716
|
+
addMember,
|
|
2684
2717
|
updateMemberRole,
|
|
2685
2718
|
removeMember,
|
|
2686
2719
|
getProfile,
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk5MO7G2JW_cjs = require('../chunk-5MO7G2JW.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 chunk5MO7G2JW_cjs.FFIDAnnouncementBadge; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "FFIDAnnouncementList", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunk5MO7G2JW_cjs.FFIDAnnouncementList; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "FFIDInquiryForm", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunk5MO7G2JW_cjs.FFIDInquiryForm; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "FFIDLoginButton", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunk5MO7G2JW_cjs.FFIDLoginButton; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "FFIDOrganizationSwitcher", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunk5MO7G2JW_cjs.FFIDOrganizationSwitcher; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "FFIDSubscriptionBadge", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunk5MO7G2JW_cjs.FFIDSubscriptionBadge; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "FFIDUserMenu", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunk5MO7G2JW_cjs.FFIDUserMenu; }
|
|
34
34
|
});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { S as FFIDAnnouncementBadge, av as FFIDAnnouncementBadgeClassNames, aw as FFIDAnnouncementBadgeProps, T as FFIDAnnouncementList, ax as FFIDAnnouncementListClassNames, ay as FFIDAnnouncementListProps, a0 as FFIDInquiryForm, a1 as FFIDInquiryFormCategoryItem, a2 as FFIDInquiryFormClassNames, a3 as FFIDInquiryFormLegalLayout, a4 as FFIDInquiryFormOrganization, a5 as FFIDInquiryFormPlaceholderContext, a6 as FFIDInquiryFormPrefill, a7 as FFIDInquiryFormProps, a8 as FFIDInquiryFormSubmitData, a9 as FFIDInquiryFormSubmitResult, ab as FFIDLoginButton, az as FFIDLoginButtonProps, ah as FFIDOrganizationSwitcher, aA as FFIDOrganizationSwitcherClassNames, aB as FFIDOrganizationSwitcherProps, am as FFIDSubscriptionBadge, aC as FFIDSubscriptionBadgeClassNames, aD as FFIDSubscriptionBadgeProps, ao as FFIDUserMenu, aE as FFIDUserMenuClassNames, aF as FFIDUserMenuProps } from '../index-CInGR4I9.cjs';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import 'react';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { S as FFIDAnnouncementBadge, av as FFIDAnnouncementBadgeClassNames, aw as FFIDAnnouncementBadgeProps, T as FFIDAnnouncementList, ax as FFIDAnnouncementListClassNames, ay as FFIDAnnouncementListProps, a0 as FFIDInquiryForm, a1 as FFIDInquiryFormCategoryItem, a2 as FFIDInquiryFormClassNames, a3 as FFIDInquiryFormLegalLayout, a4 as FFIDInquiryFormOrganization, a5 as FFIDInquiryFormPlaceholderContext, a6 as FFIDInquiryFormPrefill, a7 as FFIDInquiryFormProps, a8 as FFIDInquiryFormSubmitData, a9 as FFIDInquiryFormSubmitResult, ab as FFIDLoginButton, az as FFIDLoginButtonProps, ah as FFIDOrganizationSwitcher, aA as FFIDOrganizationSwitcherClassNames, aB as FFIDOrganizationSwitcherProps, am as FFIDSubscriptionBadge, aC as FFIDSubscriptionBadgeClassNames, aD as FFIDSubscriptionBadgeProps, ao as FFIDUserMenu, aE as FFIDUserMenuClassNames, aF as FFIDUserMenuProps } from '../index-CInGR4I9.js';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import 'react';
|
package/dist/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDSubscriptionBadge, FFIDUserMenu } from '../chunk-
|
|
1
|
+
export { FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDSubscriptionBadge, FFIDUserMenu } from '../chunk-35UOD62N.js';
|
|
@@ -867,6 +867,8 @@ interface FFIDCreatePortalParams {
|
|
|
867
867
|
|
|
868
868
|
/** Member role in an organization */
|
|
869
869
|
type FFIDMemberRole = 'owner' | 'admin' | 'member' | 'viewer';
|
|
870
|
+
/** Member role assignable through organization member management APIs */
|
|
871
|
+
type FFIDAssignableMemberRole = Exclude<FFIDMemberRole, 'owner'>;
|
|
870
872
|
/** Member status in an organization */
|
|
871
873
|
type FFIDMemberStatus = 'active' | 'invited' | 'suspended';
|
|
872
874
|
/** Organization member returned by the ext members API */
|
|
@@ -895,6 +897,19 @@ interface FFIDListMembersResponse {
|
|
|
895
897
|
organizationId: string;
|
|
896
898
|
members: FFIDOrganizationMember[];
|
|
897
899
|
}
|
|
900
|
+
/** Request body for addMember (ext) */
|
|
901
|
+
interface FFIDAddMemberRequest {
|
|
902
|
+
email: string;
|
|
903
|
+
role?: FFIDAssignableMemberRole;
|
|
904
|
+
}
|
|
905
|
+
/** Params object for addMember (ext), matching the existing organization members methods */
|
|
906
|
+
interface FFIDAddMemberParams extends FFIDAddMemberRequest {
|
|
907
|
+
organizationId: string;
|
|
908
|
+
}
|
|
909
|
+
/** Response from addMember (ext) */
|
|
910
|
+
interface FFIDAddMemberResponse {
|
|
911
|
+
member: FFIDOrganizationMember;
|
|
912
|
+
}
|
|
898
913
|
/** Response from updateMemberRole (ext) */
|
|
899
914
|
interface FFIDUpdateMemberRoleResponse {
|
|
900
915
|
member: FFIDOrganizationMember;
|
|
@@ -1223,6 +1238,10 @@ declare function createFFIDClient(config: FFIDConfig): {
|
|
|
1223
1238
|
listMembers: (params: {
|
|
1224
1239
|
organizationId: string;
|
|
1225
1240
|
}) => Promise<FFIDApiResponse<FFIDListMembersResponse>>;
|
|
1241
|
+
addMember: {
|
|
1242
|
+
(params: FFIDAddMemberParams): Promise<FFIDApiResponse<FFIDAddMemberResponse>>;
|
|
1243
|
+
(organizationId: string, data: FFIDAddMemberRequest): Promise<FFIDApiResponse<FFIDAddMemberResponse>>;
|
|
1244
|
+
};
|
|
1226
1245
|
updateMemberRole: (params: {
|
|
1227
1246
|
organizationId: string;
|
|
1228
1247
|
userId: string;
|
|
@@ -1292,4 +1311,4 @@ declare function createFFIDClient(config: FFIDConfig): {
|
|
|
1292
1311
|
/** Type of the FFID client */
|
|
1293
1312
|
type FFIDClient = ReturnType<typeof createFFIDClient>;
|
|
1294
1313
|
|
|
1295
|
-
export { type FFIDLogger as F, type TokenData as T, type FFIDError as a, type FFIDCacheAdapter as b, type FFIDVerifyAccessTokenOptions as c, type FFIDApiResponse as d, type FFIDOAuthUserInfo as e, type
|
|
1314
|
+
export { type FFIDUpdateUserProfileRequest as A, type FFIDUser as B, type FFIDUserProfile as C, type TokenStore as D, createFFIDClient as E, type FFIDLogger as F, createTokenStore as G, type TokenData as T, type FFIDError as a, type FFIDCacheAdapter as b, type FFIDVerifyAccessTokenOptions as c, type FFIDApiResponse as d, type FFIDOAuthUserInfo as e, type FFIDAddMemberParams as f, type FFIDAddMemberRequest as g, type FFIDAddMemberResponse as h, type FFIDAssignableMemberRole as i, type FFIDCacheConfig as j, type FFIDClient as k, type FFIDConfig as l, type FFIDListMembersResponse as m, type FFIDMemberRole as n, type FFIDOrganization as o, type FFIDOrganizationMember as p, type FFIDOtpSendResponse as q, type FFIDOtpVerifyResponse as r, type FFIDPasswordResetConfirmResponse as s, type FFIDPasswordResetResponse as t, type FFIDPasswordResetVerifyResponse as u, type FFIDProfileCallOptions as v, type FFIDRemoveMemberResponse as w, type FFIDResetSessionResponse as x, type FFIDSubscription as y, type FFIDUpdateMemberRoleResponse as z };
|
|
@@ -867,6 +867,8 @@ interface FFIDCreatePortalParams {
|
|
|
867
867
|
|
|
868
868
|
/** Member role in an organization */
|
|
869
869
|
type FFIDMemberRole = 'owner' | 'admin' | 'member' | 'viewer';
|
|
870
|
+
/** Member role assignable through organization member management APIs */
|
|
871
|
+
type FFIDAssignableMemberRole = Exclude<FFIDMemberRole, 'owner'>;
|
|
870
872
|
/** Member status in an organization */
|
|
871
873
|
type FFIDMemberStatus = 'active' | 'invited' | 'suspended';
|
|
872
874
|
/** Organization member returned by the ext members API */
|
|
@@ -895,6 +897,19 @@ interface FFIDListMembersResponse {
|
|
|
895
897
|
organizationId: string;
|
|
896
898
|
members: FFIDOrganizationMember[];
|
|
897
899
|
}
|
|
900
|
+
/** Request body for addMember (ext) */
|
|
901
|
+
interface FFIDAddMemberRequest {
|
|
902
|
+
email: string;
|
|
903
|
+
role?: FFIDAssignableMemberRole;
|
|
904
|
+
}
|
|
905
|
+
/** Params object for addMember (ext), matching the existing organization members methods */
|
|
906
|
+
interface FFIDAddMemberParams extends FFIDAddMemberRequest {
|
|
907
|
+
organizationId: string;
|
|
908
|
+
}
|
|
909
|
+
/** Response from addMember (ext) */
|
|
910
|
+
interface FFIDAddMemberResponse {
|
|
911
|
+
member: FFIDOrganizationMember;
|
|
912
|
+
}
|
|
898
913
|
/** Response from updateMemberRole (ext) */
|
|
899
914
|
interface FFIDUpdateMemberRoleResponse {
|
|
900
915
|
member: FFIDOrganizationMember;
|
|
@@ -1223,6 +1238,10 @@ declare function createFFIDClient(config: FFIDConfig): {
|
|
|
1223
1238
|
listMembers: (params: {
|
|
1224
1239
|
organizationId: string;
|
|
1225
1240
|
}) => Promise<FFIDApiResponse<FFIDListMembersResponse>>;
|
|
1241
|
+
addMember: {
|
|
1242
|
+
(params: FFIDAddMemberParams): Promise<FFIDApiResponse<FFIDAddMemberResponse>>;
|
|
1243
|
+
(organizationId: string, data: FFIDAddMemberRequest): Promise<FFIDApiResponse<FFIDAddMemberResponse>>;
|
|
1244
|
+
};
|
|
1226
1245
|
updateMemberRole: (params: {
|
|
1227
1246
|
organizationId: string;
|
|
1228
1247
|
userId: string;
|
|
@@ -1292,4 +1311,4 @@ declare function createFFIDClient(config: FFIDConfig): {
|
|
|
1292
1311
|
/** Type of the FFID client */
|
|
1293
1312
|
type FFIDClient = ReturnType<typeof createFFIDClient>;
|
|
1294
1313
|
|
|
1295
|
-
export { type FFIDLogger as F, type TokenData as T, type FFIDError as a, type FFIDCacheAdapter as b, type FFIDVerifyAccessTokenOptions as c, type FFIDApiResponse as d, type FFIDOAuthUserInfo as e, type
|
|
1314
|
+
export { type FFIDUpdateUserProfileRequest as A, type FFIDUser as B, type FFIDUserProfile as C, type TokenStore as D, createFFIDClient as E, type FFIDLogger as F, createTokenStore as G, type TokenData as T, type FFIDError as a, type FFIDCacheAdapter as b, type FFIDVerifyAccessTokenOptions as c, type FFIDApiResponse as d, type FFIDOAuthUserInfo as e, type FFIDAddMemberParams as f, type FFIDAddMemberRequest as g, type FFIDAddMemberResponse as h, type FFIDAssignableMemberRole as i, type FFIDCacheConfig as j, type FFIDClient as k, type FFIDConfig as l, type FFIDListMembersResponse as m, type FFIDMemberRole as n, type FFIDOrganization as o, type FFIDOrganizationMember as p, type FFIDOtpSendResponse as q, type FFIDOtpVerifyResponse as r, type FFIDPasswordResetConfirmResponse as s, type FFIDPasswordResetResponse as t, type FFIDPasswordResetVerifyResponse as u, type FFIDProfileCallOptions as v, type FFIDRemoveMemberResponse as w, type FFIDResetSessionResponse as x, type FFIDSubscription as y, type FFIDUpdateMemberRoleResponse as z };
|
|
@@ -573,6 +573,8 @@ interface FFIDCreatePortalParams {
|
|
|
573
573
|
|
|
574
574
|
/** Member role in an organization */
|
|
575
575
|
type FFIDMemberRole = 'owner' | 'admin' | 'member' | 'viewer';
|
|
576
|
+
/** Member role assignable through organization member management APIs */
|
|
577
|
+
type FFIDAssignableMemberRole = Exclude<FFIDMemberRole, 'owner'>;
|
|
576
578
|
/** Member status in an organization */
|
|
577
579
|
type FFIDMemberStatus = 'active' | 'invited' | 'suspended';
|
|
578
580
|
/** Organization member returned by the ext members API */
|
|
@@ -601,6 +603,19 @@ interface FFIDListMembersResponse {
|
|
|
601
603
|
organizationId: string;
|
|
602
604
|
members: FFIDOrganizationMember[];
|
|
603
605
|
}
|
|
606
|
+
/** Request body for addMember (ext) */
|
|
607
|
+
interface FFIDAddMemberRequest {
|
|
608
|
+
email: string;
|
|
609
|
+
role?: FFIDAssignableMemberRole;
|
|
610
|
+
}
|
|
611
|
+
/** Params object for addMember (ext), matching the existing organization members methods */
|
|
612
|
+
interface FFIDAddMemberParams extends FFIDAddMemberRequest {
|
|
613
|
+
organizationId: string;
|
|
614
|
+
}
|
|
615
|
+
/** Response from addMember (ext) */
|
|
616
|
+
interface FFIDAddMemberResponse {
|
|
617
|
+
member: FFIDOrganizationMember;
|
|
618
|
+
}
|
|
604
619
|
/** Response from updateMemberRole (ext) */
|
|
605
620
|
interface FFIDUpdateMemberRoleResponse {
|
|
606
621
|
member: FFIDOrganizationMember;
|
|
@@ -1518,4 +1533,4 @@ interface FFIDInquiryFormPlaceholderContext {
|
|
|
1518
1533
|
}
|
|
1519
1534
|
declare function FFIDInquiryForm({ mode, prefill, organizations, preselectedOrganizationId, categories, termsVersion, privacyVersion, termsHref, privacyHref, turnstileToken, turnstileSlot, onSubmit, onChange, legalLayout, messagePlaceholder, requireCategorySelection, unstyled, classNames, locale, className, }: FFIDInquiryFormProps): react_jsx_runtime.JSX.Element;
|
|
1520
1535
|
|
|
1521
|
-
export { type
|
|
1536
|
+
export { type FFIDInquiryCategorySite2026 as $, type FFIDInquiryCreateResponse as A, type FFIDAuthMode as B, type FFIDLogger as C, type FFIDCacheAdapter as D, type FFIDUser as E, type FFIDSubscriptionStatus as F, type FFIDOrganization as G, type FFIDSubscription as H, type FFIDSubscriptionContextValue as I, type EffectiveSubscriptionStatus as J, type FFIDAnnouncementsClientConfig as K, type ListAnnouncementsOptions as L, type FFIDAnnouncementsApiResponse as M, type AnnouncementListResponse as N, type FFIDAnnouncementsLogger as O, type Announcement as P, type AnnouncementStatus as Q, type AnnouncementType as R, FFIDAnnouncementBadge as S, FFIDAnnouncementList as T, type FFIDAnnouncementsError as U, type FFIDAnnouncementsErrorCode as V, type FFIDAnnouncementsServerResponse as W, type FFIDAssignableMemberRole as X, type FFIDCacheConfig as Y, type FFIDContextValue as Z, type FFIDInquiryCategory as _, type FFIDConfig as a, FFIDInquiryForm as a0, type FFIDInquiryFormCategoryItem as a1, type FFIDInquiryFormClassNames as a2, type FFIDInquiryFormLegalLayout as a3, type FFIDInquiryFormOrganization as a4, type FFIDInquiryFormPlaceholderContext as a5, type FFIDInquiryFormPrefill as a6, type FFIDInquiryFormProps as a7, type FFIDInquiryFormSubmitData as a8, type FFIDInquiryFormSubmitResult as a9, type FFIDOrganizationSwitcherClassNames as aA, type FFIDOrganizationSwitcherProps as aB, type FFIDSubscriptionBadgeClassNames as aC, type FFIDSubscriptionBadgeProps as aD, type FFIDUserMenuClassNames as aE, type FFIDUserMenuProps as aF, type FFIDJwtClaims as aa, FFIDLoginButton as ab, type FFIDMemberStatus as ac, type FFIDOAuthTokenResponse as ad, type FFIDOAuthUserInfoMemberRole as ae, type FFIDOAuthUserInfoSubscription as af, type FFIDOrganizationMember as ag, FFIDOrganizationSwitcher as ah, type FFIDRedirectErrorCode as ai, type FFIDSeatModel as aj, type FFIDServiceAccessDenialReason as ak, type FFIDServiceAccessFailPolicy as al, FFIDSubscriptionBadge as am, type FFIDTokenIntrospectionResponse as an, FFIDUserMenu as ao, FFID_INQUIRY_CATEGORIES as ap, FFID_INQUIRY_CATEGORIES_SITE_2026 as aq, type UseFFIDAnnouncementsOptions as ar, type UseFFIDAnnouncementsReturn as as, isFFIDInquiryCategorySite2026 as at, useFFIDAnnouncements as au, type FFIDAnnouncementBadgeClassNames as av, type FFIDAnnouncementBadgeProps as aw, type FFIDAnnouncementListClassNames as ax, type FFIDAnnouncementListProps as ay, type FFIDLoginButtonProps as az, type FFIDApiResponse as b, type FFIDSessionResponse as c, type FFIDRedirectResult as d, type FFIDError as e, type FFIDSubscriptionCheckResponse as f, type FFIDCheckServiceAccessParams as g, type FFIDServiceAccessDecision as h, type FFIDListMembersResponse as i, type FFIDAddMemberParams as j, type FFIDAddMemberResponse as k, type FFIDAddMemberRequest as l, type FFIDMemberRole as m, type FFIDUpdateMemberRoleResponse as n, type FFIDRemoveMemberResponse as o, type FFIDProfileCallOptions as p, type FFIDUserProfile as q, type FFIDUpdateUserProfileRequest as r, type FFIDAnalyticsConfig as s, type FFIDCreateCheckoutParams as t, type FFIDCheckoutSessionResponse as u, type FFIDCreatePortalParams as v, type FFIDPortalSessionResponse as w, type FFIDVerifyAccessTokenOptions as x, type FFIDOAuthUserInfo as y, type FFIDInquiryCreateParams as z };
|
|
@@ -573,6 +573,8 @@ interface FFIDCreatePortalParams {
|
|
|
573
573
|
|
|
574
574
|
/** Member role in an organization */
|
|
575
575
|
type FFIDMemberRole = 'owner' | 'admin' | 'member' | 'viewer';
|
|
576
|
+
/** Member role assignable through organization member management APIs */
|
|
577
|
+
type FFIDAssignableMemberRole = Exclude<FFIDMemberRole, 'owner'>;
|
|
576
578
|
/** Member status in an organization */
|
|
577
579
|
type FFIDMemberStatus = 'active' | 'invited' | 'suspended';
|
|
578
580
|
/** Organization member returned by the ext members API */
|
|
@@ -601,6 +603,19 @@ interface FFIDListMembersResponse {
|
|
|
601
603
|
organizationId: string;
|
|
602
604
|
members: FFIDOrganizationMember[];
|
|
603
605
|
}
|
|
606
|
+
/** Request body for addMember (ext) */
|
|
607
|
+
interface FFIDAddMemberRequest {
|
|
608
|
+
email: string;
|
|
609
|
+
role?: FFIDAssignableMemberRole;
|
|
610
|
+
}
|
|
611
|
+
/** Params object for addMember (ext), matching the existing organization members methods */
|
|
612
|
+
interface FFIDAddMemberParams extends FFIDAddMemberRequest {
|
|
613
|
+
organizationId: string;
|
|
614
|
+
}
|
|
615
|
+
/** Response from addMember (ext) */
|
|
616
|
+
interface FFIDAddMemberResponse {
|
|
617
|
+
member: FFIDOrganizationMember;
|
|
618
|
+
}
|
|
604
619
|
/** Response from updateMemberRole (ext) */
|
|
605
620
|
interface FFIDUpdateMemberRoleResponse {
|
|
606
621
|
member: FFIDOrganizationMember;
|
|
@@ -1518,4 +1533,4 @@ interface FFIDInquiryFormPlaceholderContext {
|
|
|
1518
1533
|
}
|
|
1519
1534
|
declare function FFIDInquiryForm({ mode, prefill, organizations, preselectedOrganizationId, categories, termsVersion, privacyVersion, termsHref, privacyHref, turnstileToken, turnstileSlot, onSubmit, onChange, legalLayout, messagePlaceholder, requireCategorySelection, unstyled, classNames, locale, className, }: FFIDInquiryFormProps): react_jsx_runtime.JSX.Element;
|
|
1520
1535
|
|
|
1521
|
-
export { type
|
|
1536
|
+
export { type FFIDInquiryCategorySite2026 as $, type FFIDInquiryCreateResponse as A, type FFIDAuthMode as B, type FFIDLogger as C, type FFIDCacheAdapter as D, type FFIDUser as E, type FFIDSubscriptionStatus as F, type FFIDOrganization as G, type FFIDSubscription as H, type FFIDSubscriptionContextValue as I, type EffectiveSubscriptionStatus as J, type FFIDAnnouncementsClientConfig as K, type ListAnnouncementsOptions as L, type FFIDAnnouncementsApiResponse as M, type AnnouncementListResponse as N, type FFIDAnnouncementsLogger as O, type Announcement as P, type AnnouncementStatus as Q, type AnnouncementType as R, FFIDAnnouncementBadge as S, FFIDAnnouncementList as T, type FFIDAnnouncementsError as U, type FFIDAnnouncementsErrorCode as V, type FFIDAnnouncementsServerResponse as W, type FFIDAssignableMemberRole as X, type FFIDCacheConfig as Y, type FFIDContextValue as Z, type FFIDInquiryCategory as _, type FFIDConfig as a, FFIDInquiryForm as a0, type FFIDInquiryFormCategoryItem as a1, type FFIDInquiryFormClassNames as a2, type FFIDInquiryFormLegalLayout as a3, type FFIDInquiryFormOrganization as a4, type FFIDInquiryFormPlaceholderContext as a5, type FFIDInquiryFormPrefill as a6, type FFIDInquiryFormProps as a7, type FFIDInquiryFormSubmitData as a8, type FFIDInquiryFormSubmitResult as a9, type FFIDOrganizationSwitcherClassNames as aA, type FFIDOrganizationSwitcherProps as aB, type FFIDSubscriptionBadgeClassNames as aC, type FFIDSubscriptionBadgeProps as aD, type FFIDUserMenuClassNames as aE, type FFIDUserMenuProps as aF, type FFIDJwtClaims as aa, FFIDLoginButton as ab, type FFIDMemberStatus as ac, type FFIDOAuthTokenResponse as ad, type FFIDOAuthUserInfoMemberRole as ae, type FFIDOAuthUserInfoSubscription as af, type FFIDOrganizationMember as ag, FFIDOrganizationSwitcher as ah, type FFIDRedirectErrorCode as ai, type FFIDSeatModel as aj, type FFIDServiceAccessDenialReason as ak, type FFIDServiceAccessFailPolicy as al, FFIDSubscriptionBadge as am, type FFIDTokenIntrospectionResponse as an, FFIDUserMenu as ao, FFID_INQUIRY_CATEGORIES as ap, FFID_INQUIRY_CATEGORIES_SITE_2026 as aq, type UseFFIDAnnouncementsOptions as ar, type UseFFIDAnnouncementsReturn as as, isFFIDInquiryCategorySite2026 as at, useFFIDAnnouncements as au, type FFIDAnnouncementBadgeClassNames as av, type FFIDAnnouncementBadgeProps as aw, type FFIDAnnouncementListClassNames as ax, type FFIDAnnouncementListProps as ay, type FFIDLoginButtonProps as az, type FFIDApiResponse as b, type FFIDSessionResponse as c, type FFIDRedirectResult as d, type FFIDError as e, type FFIDSubscriptionCheckResponse as f, type FFIDCheckServiceAccessParams as g, type FFIDServiceAccessDecision as h, type FFIDListMembersResponse as i, type FFIDAddMemberParams as j, type FFIDAddMemberResponse as k, type FFIDAddMemberRequest as l, type FFIDMemberRole as m, type FFIDUpdateMemberRoleResponse as n, type FFIDRemoveMemberResponse as o, type FFIDProfileCallOptions as p, type FFIDUserProfile as q, type FFIDUpdateUserProfileRequest as r, type FFIDAnalyticsConfig as s, type FFIDCreateCheckoutParams as t, type FFIDCheckoutSessionResponse as u, type FFIDCreatePortalParams as v, type FFIDPortalSessionResponse as w, type FFIDVerifyAccessTokenOptions as x, type FFIDOAuthUserInfo as y, type FFIDInquiryCreateParams as z };
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk5MO7G2JW_cjs = require('./chunk-5MO7G2JW.cjs');
|
|
4
4
|
var react = require('react');
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
|
|
@@ -53,8 +53,8 @@ function defaultRedirect(url) {
|
|
|
53
53
|
}
|
|
54
54
|
function useRequireActiveSubscription(options) {
|
|
55
55
|
const { redirectTo, allowGrace = true, onRedirect } = options;
|
|
56
|
-
const { isLoading, error } =
|
|
57
|
-
const { effectiveStatus, isBlocked, isGrace } =
|
|
56
|
+
const { isLoading, error } = chunk5MO7G2JW_cjs.useFFIDContext();
|
|
57
|
+
const { effectiveStatus, isBlocked, isGrace } = chunk5MO7G2JW_cjs.useSubscription();
|
|
58
58
|
const hasFetchError = error !== null && effectiveStatus === null;
|
|
59
59
|
const shouldRedirect = !isLoading && !hasFetchError && (isBlocked || !allowGrace && isGrace || effectiveStatus === null);
|
|
60
60
|
react.useEffect(() => {
|
|
@@ -75,7 +75,7 @@ function useRequireActiveSubscription(options) {
|
|
|
75
75
|
}
|
|
76
76
|
function withFFIDAuth(Component, options = {}) {
|
|
77
77
|
const WrappedComponent = (props) => {
|
|
78
|
-
const { isLoading, isAuthenticated, login } =
|
|
78
|
+
const { isLoading, isAuthenticated, login } = chunk5MO7G2JW_cjs.useFFIDContext();
|
|
79
79
|
const hasRedirected = react.useRef(false);
|
|
80
80
|
react.useEffect(() => {
|
|
81
81
|
if (!isLoading && !isAuthenticated && options.redirectToLogin && !hasRedirected.current) {
|
|
@@ -104,115 +104,115 @@ var FFID_NEWSLETTER_DISPATCH_MAX_RECIPIENTS = 1e3;
|
|
|
104
104
|
|
|
105
105
|
Object.defineProperty(exports, "DEFAULT_API_BASE_URL", {
|
|
106
106
|
enumerable: true,
|
|
107
|
-
get: function () { return
|
|
107
|
+
get: function () { return chunk5MO7G2JW_cjs.DEFAULT_API_BASE_URL; }
|
|
108
108
|
});
|
|
109
109
|
Object.defineProperty(exports, "DEFAULT_OAUTH_SCOPES", {
|
|
110
110
|
enumerable: true,
|
|
111
|
-
get: function () { return
|
|
111
|
+
get: function () { return chunk5MO7G2JW_cjs.DEFAULT_OAUTH_SCOPES; }
|
|
112
112
|
});
|
|
113
113
|
Object.defineProperty(exports, "FFIDAnnouncementBadge", {
|
|
114
114
|
enumerable: true,
|
|
115
|
-
get: function () { return
|
|
115
|
+
get: function () { return chunk5MO7G2JW_cjs.FFIDAnnouncementBadge; }
|
|
116
116
|
});
|
|
117
117
|
Object.defineProperty(exports, "FFIDAnnouncementList", {
|
|
118
118
|
enumerable: true,
|
|
119
|
-
get: function () { return
|
|
119
|
+
get: function () { return chunk5MO7G2JW_cjs.FFIDAnnouncementList; }
|
|
120
120
|
});
|
|
121
121
|
Object.defineProperty(exports, "FFIDInquiryForm", {
|
|
122
122
|
enumerable: true,
|
|
123
|
-
get: function () { return
|
|
123
|
+
get: function () { return chunk5MO7G2JW_cjs.FFIDInquiryForm; }
|
|
124
124
|
});
|
|
125
125
|
Object.defineProperty(exports, "FFIDLoginButton", {
|
|
126
126
|
enumerable: true,
|
|
127
|
-
get: function () { return
|
|
127
|
+
get: function () { return chunk5MO7G2JW_cjs.FFIDLoginButton; }
|
|
128
128
|
});
|
|
129
129
|
Object.defineProperty(exports, "FFIDOrganizationSwitcher", {
|
|
130
130
|
enumerable: true,
|
|
131
|
-
get: function () { return
|
|
131
|
+
get: function () { return chunk5MO7G2JW_cjs.FFIDOrganizationSwitcher; }
|
|
132
132
|
});
|
|
133
133
|
Object.defineProperty(exports, "FFIDProvider", {
|
|
134
134
|
enumerable: true,
|
|
135
|
-
get: function () { return
|
|
135
|
+
get: function () { return chunk5MO7G2JW_cjs.FFIDProvider; }
|
|
136
136
|
});
|
|
137
137
|
Object.defineProperty(exports, "FFIDSDKError", {
|
|
138
138
|
enumerable: true,
|
|
139
|
-
get: function () { return
|
|
139
|
+
get: function () { return chunk5MO7G2JW_cjs.FFIDSDKError; }
|
|
140
140
|
});
|
|
141
141
|
Object.defineProperty(exports, "FFIDSubscriptionBadge", {
|
|
142
142
|
enumerable: true,
|
|
143
|
-
get: function () { return
|
|
143
|
+
get: function () { return chunk5MO7G2JW_cjs.FFIDSubscriptionBadge; }
|
|
144
144
|
});
|
|
145
145
|
Object.defineProperty(exports, "FFIDUserMenu", {
|
|
146
146
|
enumerable: true,
|
|
147
|
-
get: function () { return
|
|
147
|
+
get: function () { return chunk5MO7G2JW_cjs.FFIDUserMenu; }
|
|
148
148
|
});
|
|
149
149
|
Object.defineProperty(exports, "FFID_ANNOUNCEMENTS_ERROR_CODES", {
|
|
150
150
|
enumerable: true,
|
|
151
|
-
get: function () { return
|
|
151
|
+
get: function () { return chunk5MO7G2JW_cjs.FFID_ANNOUNCEMENTS_ERROR_CODES; }
|
|
152
152
|
});
|
|
153
153
|
Object.defineProperty(exports, "FFID_INQUIRY_CATEGORIES", {
|
|
154
154
|
enumerable: true,
|
|
155
|
-
get: function () { return
|
|
155
|
+
get: function () { return chunk5MO7G2JW_cjs.FFID_INQUIRY_CATEGORIES; }
|
|
156
156
|
});
|
|
157
157
|
Object.defineProperty(exports, "FFID_INQUIRY_CATEGORIES_SITE_2026", {
|
|
158
158
|
enumerable: true,
|
|
159
|
-
get: function () { return
|
|
159
|
+
get: function () { return chunk5MO7G2JW_cjs.FFID_INQUIRY_CATEGORIES_SITE_2026; }
|
|
160
160
|
});
|
|
161
161
|
Object.defineProperty(exports, "computeEffectiveStatusFromSession", {
|
|
162
162
|
enumerable: true,
|
|
163
|
-
get: function () { return
|
|
163
|
+
get: function () { return chunk5MO7G2JW_cjs.computeEffectiveStatusFromSession; }
|
|
164
164
|
});
|
|
165
165
|
Object.defineProperty(exports, "createFFIDAnnouncementsClient", {
|
|
166
166
|
enumerable: true,
|
|
167
|
-
get: function () { return
|
|
167
|
+
get: function () { return chunk5MO7G2JW_cjs.createFFIDAnnouncementsClient; }
|
|
168
168
|
});
|
|
169
169
|
Object.defineProperty(exports, "createFFIDClient", {
|
|
170
170
|
enumerable: true,
|
|
171
|
-
get: function () { return
|
|
171
|
+
get: function () { return chunk5MO7G2JW_cjs.createFFIDClient; }
|
|
172
172
|
});
|
|
173
173
|
Object.defineProperty(exports, "createTokenStore", {
|
|
174
174
|
enumerable: true,
|
|
175
|
-
get: function () { return
|
|
175
|
+
get: function () { return chunk5MO7G2JW_cjs.createTokenStore; }
|
|
176
176
|
});
|
|
177
177
|
Object.defineProperty(exports, "generateCodeChallenge", {
|
|
178
178
|
enumerable: true,
|
|
179
|
-
get: function () { return
|
|
179
|
+
get: function () { return chunk5MO7G2JW_cjs.generateCodeChallenge; }
|
|
180
180
|
});
|
|
181
181
|
Object.defineProperty(exports, "generateCodeVerifier", {
|
|
182
182
|
enumerable: true,
|
|
183
|
-
get: function () { return
|
|
183
|
+
get: function () { return chunk5MO7G2JW_cjs.generateCodeVerifier; }
|
|
184
184
|
});
|
|
185
185
|
Object.defineProperty(exports, "isFFIDInquiryCategorySite2026", {
|
|
186
186
|
enumerable: true,
|
|
187
|
-
get: function () { return
|
|
187
|
+
get: function () { return chunk5MO7G2JW_cjs.isFFIDInquiryCategorySite2026; }
|
|
188
188
|
});
|
|
189
189
|
Object.defineProperty(exports, "normalizeRedirectUri", {
|
|
190
190
|
enumerable: true,
|
|
191
|
-
get: function () { return
|
|
191
|
+
get: function () { return chunk5MO7G2JW_cjs.normalizeRedirectUri; }
|
|
192
192
|
});
|
|
193
193
|
Object.defineProperty(exports, "retrieveCodeVerifier", {
|
|
194
194
|
enumerable: true,
|
|
195
|
-
get: function () { return
|
|
195
|
+
get: function () { return chunk5MO7G2JW_cjs.retrieveCodeVerifier; }
|
|
196
196
|
});
|
|
197
197
|
Object.defineProperty(exports, "storeCodeVerifier", {
|
|
198
198
|
enumerable: true,
|
|
199
|
-
get: function () { return
|
|
199
|
+
get: function () { return chunk5MO7G2JW_cjs.storeCodeVerifier; }
|
|
200
200
|
});
|
|
201
201
|
Object.defineProperty(exports, "useFFID", {
|
|
202
202
|
enumerable: true,
|
|
203
|
-
get: function () { return
|
|
203
|
+
get: function () { return chunk5MO7G2JW_cjs.useFFID; }
|
|
204
204
|
});
|
|
205
205
|
Object.defineProperty(exports, "useFFIDAnnouncements", {
|
|
206
206
|
enumerable: true,
|
|
207
|
-
get: function () { return
|
|
207
|
+
get: function () { return chunk5MO7G2JW_cjs.useFFIDAnnouncements; }
|
|
208
208
|
});
|
|
209
209
|
Object.defineProperty(exports, "useSubscription", {
|
|
210
210
|
enumerable: true,
|
|
211
|
-
get: function () { return
|
|
211
|
+
get: function () { return chunk5MO7G2JW_cjs.useSubscription; }
|
|
212
212
|
});
|
|
213
213
|
Object.defineProperty(exports, "withSubscription", {
|
|
214
214
|
enumerable: true,
|
|
215
|
-
get: function () { return
|
|
215
|
+
get: function () { return chunk5MO7G2JW_cjs.withSubscription; }
|
|
216
216
|
});
|
|
217
217
|
exports.FFID_NEWSLETTER_DISPATCH_MAX_RECIPIENTS = FFID_NEWSLETTER_DISPATCH_MAX_RECIPIENTS;
|
|
218
218
|
exports.FFID_NEWSLETTER_TYPES = FFID_NEWSLETTER_TYPES;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FFIDSubscriptionStatus, a as FFIDConfig, b as FFIDApiResponse, c as FFIDSessionResponse, d as FFIDRedirectResult, e as FFIDError, f as FFIDSubscriptionCheckResponse, g as FFIDCheckServiceAccessParams, h as FFIDServiceAccessDecision, i as FFIDListMembersResponse, j as
|
|
2
|
-
export {
|
|
1
|
+
import { F as FFIDSubscriptionStatus, a as FFIDConfig, b as FFIDApiResponse, c as FFIDSessionResponse, d as FFIDRedirectResult, e as FFIDError, f as FFIDSubscriptionCheckResponse, g as FFIDCheckServiceAccessParams, h as FFIDServiceAccessDecision, i as FFIDListMembersResponse, j as FFIDAddMemberParams, k as FFIDAddMemberResponse, l as FFIDAddMemberRequest, m as FFIDMemberRole, n as FFIDUpdateMemberRoleResponse, o as FFIDRemoveMemberResponse, p as FFIDProfileCallOptions, q as FFIDUserProfile, r as FFIDUpdateUserProfileRequest, s as FFIDAnalyticsConfig, t as FFIDCreateCheckoutParams, u as FFIDCheckoutSessionResponse, v as FFIDCreatePortalParams, w as FFIDPortalSessionResponse, x as FFIDVerifyAccessTokenOptions, y as FFIDOAuthUserInfo, z as FFIDInquiryCreateParams, A as FFIDInquiryCreateResponse, B as FFIDAuthMode, C as FFIDLogger, D as FFIDCacheAdapter, E as FFIDUser, G as FFIDOrganization, H as FFIDSubscription, I as FFIDSubscriptionContextValue, J as EffectiveSubscriptionStatus, K as FFIDAnnouncementsClientConfig, L as ListAnnouncementsOptions, M as FFIDAnnouncementsApiResponse, N as AnnouncementListResponse, O as FFIDAnnouncementsLogger } from './index-CInGR4I9.cjs';
|
|
2
|
+
export { P as Announcement, Q as AnnouncementStatus, R as AnnouncementType, S as FFIDAnnouncementBadge, T as FFIDAnnouncementList, U as FFIDAnnouncementsError, V as FFIDAnnouncementsErrorCode, W as FFIDAnnouncementsServerResponse, X as FFIDAssignableMemberRole, Y as FFIDCacheConfig, Z as FFIDContextValue, _ as FFIDInquiryCategory, $ as FFIDInquiryCategorySite2026, a0 as FFIDInquiryForm, a1 as FFIDInquiryFormCategoryItem, a2 as FFIDInquiryFormClassNames, a3 as FFIDInquiryFormLegalLayout, a4 as FFIDInquiryFormOrganization, a5 as FFIDInquiryFormPlaceholderContext, a6 as FFIDInquiryFormPrefill, a7 as FFIDInquiryFormProps, a8 as FFIDInquiryFormSubmitData, a9 as FFIDInquiryFormSubmitResult, aa as FFIDJwtClaims, ab as FFIDLoginButton, ac as FFIDMemberStatus, ad as FFIDOAuthTokenResponse, ae as FFIDOAuthUserInfoMemberRole, af as FFIDOAuthUserInfoSubscription, ag as FFIDOrganizationMember, ah as FFIDOrganizationSwitcher, ai as FFIDRedirectErrorCode, aj as FFIDSeatModel, ak as FFIDServiceAccessDenialReason, al as FFIDServiceAccessFailPolicy, am as FFIDSubscriptionBadge, an as FFIDTokenIntrospectionResponse, ao as FFIDUserMenu, ap as FFID_INQUIRY_CATEGORIES, aq as FFID_INQUIRY_CATEGORIES_SITE_2026, ar as UseFFIDAnnouncementsOptions, as as UseFFIDAnnouncementsReturn, at as isFFIDInquiryCategorySite2026, au as useFFIDAnnouncements } from './index-CInGR4I9.cjs';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import { ReactNode, ComponentType, FC } from 'react';
|
|
5
5
|
|
|
@@ -541,6 +541,10 @@ declare function createFFIDClient(config: FFIDConfig): {
|
|
|
541
541
|
listMembers: (params: {
|
|
542
542
|
organizationId: string;
|
|
543
543
|
}) => Promise<FFIDApiResponse<FFIDListMembersResponse>>;
|
|
544
|
+
addMember: {
|
|
545
|
+
(params: FFIDAddMemberParams): Promise<FFIDApiResponse<FFIDAddMemberResponse>>;
|
|
546
|
+
(organizationId: string, data: FFIDAddMemberRequest): Promise<FFIDApiResponse<FFIDAddMemberResponse>>;
|
|
547
|
+
};
|
|
544
548
|
updateMemberRole: (params: {
|
|
545
549
|
organizationId: string;
|
|
546
550
|
userId: string;
|
|
@@ -1202,4 +1206,4 @@ declare function createInquiryMethods(deps: InquiryMethodsDeps): {
|
|
|
1202
1206
|
};
|
|
1203
1207
|
type FFIDInquiryClient = ReturnType<typeof createInquiryMethods>;
|
|
1204
1208
|
|
|
1205
|
-
export { AnnouncementListResponse, type ComputeEffectiveStatusInput, type ContractWizardFlowType, type ContractWizardResubscribeOptions, type ContractWizardSubscribeOptions, type ContractWizardSubscriptionOptions, DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, EffectiveSubscriptionStatus, FFIDAnnouncementsApiResponse, type FFIDAnnouncementsClient, FFIDAnnouncementsClientConfig, FFIDAnnouncementsLogger, FFIDApiResponse, type FFIDBillingInterval, FFIDCacheAdapter, type FFIDCancelPendingDowngradeResponse, type FFIDCancelSubscriptionParams, type FFIDCancelSubscriptionResponse, type FFIDChangePlanParams, type FFIDChangePlanResponse, FFIDCheckServiceAccessParams, FFIDCheckoutSessionResponse, type FFIDClient, FFIDConfig, FFIDCreateCheckoutParams, FFIDCreatePortalParams, FFIDError, type FFIDInquiryClient, FFIDInquiryCreateParams, FFIDInquiryCreateResponse, FFIDListMembersResponse, type FFIDListPlansResponse, FFIDLogger, FFIDMemberRole, type FFIDNewsletterBodySource, type FFIDNewsletterCampaignStatus, type FFIDNewsletterClient, type FFIDNewsletterConfirmParams, type FFIDNewsletterConfirmResponse, type FFIDNewsletterDispatchParams, type FFIDNewsletterDispatchResponse, type FFIDNewsletterSegment, type FFIDNewsletterSubscribeParams, type FFIDNewsletterSubscribeResponse, type FFIDNewsletterType, type FFIDNewsletterUnsubscribeParams, type FFIDNewsletterUnsubscribeResponse, FFIDOAuthUserInfo, FFIDOrganization, type FFIDOtpSendResponse, type FFIDOtpVerifyResponse, type FFIDPasswordResetConfirmResponse, type FFIDPasswordResetResponse, type FFIDPasswordResetVerifyResponse, type FFIDPlanChangeLineItem, type FFIDPlanChangePreview, type FFIDPlanChangePreviewResponse, type FFIDPlanInfo, FFIDPortalSessionResponse, type FFIDPreviewPlanChangeParams, type FFIDPreviewSeatChangeParams, FFIDProfileCallOptions, FFIDProvider, type FFIDProviderProps, FFIDRedirectResult, FFIDRemoveMemberResponse, type FFIDResetSessionResponse, FFIDSDKError, type FFIDSeatChangeLineItem, type FFIDSeatChangePreview, type FFIDSeatChangePreviewResponse, FFIDServiceAccessDecision, type FFIDServiceInfo, FFIDSessionResponse, type FFIDSubscribeParams, type FFIDSubscribeResponse, FFIDSubscription, FFIDSubscriptionCheckResponse, FFIDSubscriptionContextValue, type FFIDSubscriptionDetail, FFIDSubscriptionStatus, type FFIDSubscriptionSummary, type FFIDSupportedCurrency, FFIDUpdateMemberRoleResponse, FFIDUpdateUserProfileRequest, FFIDUser, FFIDUserProfile, FFIDVerifyAccessTokenOptions, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_NEWSLETTER_DISPATCH_MAX_RECIPIENTS, FFID_NEWSLETTER_TYPES, type KVNamespaceLike, ListAnnouncementsOptions, type NormalizeRedirectUriResult, type RedirectToAuthorizeOptions, type TokenData, type TokenStore, type UseFFIDReturn, type UseRequireActiveSubscriptionOptions, type UseRequireActiveSubscriptionReturn, type WithFFIDAuthOptions, type WithSubscriptionOptions, computeEffectiveStatusFromSession, createFFIDAnnouncementsClient, createFFIDClient, createKVCacheAdapter, createMemoryCacheAdapter, createTokenStore, generateCodeChallenge, generateCodeVerifier, normalizeRedirectUri, retrieveCodeVerifier, storeCodeVerifier, useFFID, useRequireActiveSubscription, useSubscription, withFFIDAuth, withSubscription };
|
|
1209
|
+
export { AnnouncementListResponse, type ComputeEffectiveStatusInput, type ContractWizardFlowType, type ContractWizardResubscribeOptions, type ContractWizardSubscribeOptions, type ContractWizardSubscriptionOptions, DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, EffectiveSubscriptionStatus, FFIDAddMemberParams, FFIDAddMemberRequest, FFIDAddMemberResponse, FFIDAnnouncementsApiResponse, type FFIDAnnouncementsClient, FFIDAnnouncementsClientConfig, FFIDAnnouncementsLogger, FFIDApiResponse, type FFIDBillingInterval, FFIDCacheAdapter, type FFIDCancelPendingDowngradeResponse, type FFIDCancelSubscriptionParams, type FFIDCancelSubscriptionResponse, type FFIDChangePlanParams, type FFIDChangePlanResponse, FFIDCheckServiceAccessParams, FFIDCheckoutSessionResponse, type FFIDClient, FFIDConfig, FFIDCreateCheckoutParams, FFIDCreatePortalParams, FFIDError, type FFIDInquiryClient, FFIDInquiryCreateParams, FFIDInquiryCreateResponse, FFIDListMembersResponse, type FFIDListPlansResponse, FFIDLogger, FFIDMemberRole, type FFIDNewsletterBodySource, type FFIDNewsletterCampaignStatus, type FFIDNewsletterClient, type FFIDNewsletterConfirmParams, type FFIDNewsletterConfirmResponse, type FFIDNewsletterDispatchParams, type FFIDNewsletterDispatchResponse, type FFIDNewsletterSegment, type FFIDNewsletterSubscribeParams, type FFIDNewsletterSubscribeResponse, type FFIDNewsletterType, type FFIDNewsletterUnsubscribeParams, type FFIDNewsletterUnsubscribeResponse, FFIDOAuthUserInfo, FFIDOrganization, type FFIDOtpSendResponse, type FFIDOtpVerifyResponse, type FFIDPasswordResetConfirmResponse, type FFIDPasswordResetResponse, type FFIDPasswordResetVerifyResponse, type FFIDPlanChangeLineItem, type FFIDPlanChangePreview, type FFIDPlanChangePreviewResponse, type FFIDPlanInfo, FFIDPortalSessionResponse, type FFIDPreviewPlanChangeParams, type FFIDPreviewSeatChangeParams, FFIDProfileCallOptions, FFIDProvider, type FFIDProviderProps, FFIDRedirectResult, FFIDRemoveMemberResponse, type FFIDResetSessionResponse, FFIDSDKError, type FFIDSeatChangeLineItem, type FFIDSeatChangePreview, type FFIDSeatChangePreviewResponse, FFIDServiceAccessDecision, type FFIDServiceInfo, FFIDSessionResponse, type FFIDSubscribeParams, type FFIDSubscribeResponse, FFIDSubscription, FFIDSubscriptionCheckResponse, FFIDSubscriptionContextValue, type FFIDSubscriptionDetail, FFIDSubscriptionStatus, type FFIDSubscriptionSummary, type FFIDSupportedCurrency, FFIDUpdateMemberRoleResponse, FFIDUpdateUserProfileRequest, FFIDUser, FFIDUserProfile, FFIDVerifyAccessTokenOptions, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_NEWSLETTER_DISPATCH_MAX_RECIPIENTS, FFID_NEWSLETTER_TYPES, type KVNamespaceLike, ListAnnouncementsOptions, type NormalizeRedirectUriResult, type RedirectToAuthorizeOptions, type TokenData, type TokenStore, type UseFFIDReturn, type UseRequireActiveSubscriptionOptions, type UseRequireActiveSubscriptionReturn, type WithFFIDAuthOptions, type WithSubscriptionOptions, computeEffectiveStatusFromSession, createFFIDAnnouncementsClient, createFFIDClient, createKVCacheAdapter, createMemoryCacheAdapter, createTokenStore, generateCodeChallenge, generateCodeVerifier, normalizeRedirectUri, retrieveCodeVerifier, storeCodeVerifier, useFFID, useRequireActiveSubscription, useSubscription, withFFIDAuth, withSubscription };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FFIDSubscriptionStatus, a as FFIDConfig, b as FFIDApiResponse, c as FFIDSessionResponse, d as FFIDRedirectResult, e as FFIDError, f as FFIDSubscriptionCheckResponse, g as FFIDCheckServiceAccessParams, h as FFIDServiceAccessDecision, i as FFIDListMembersResponse, j as
|
|
2
|
-
export {
|
|
1
|
+
import { F as FFIDSubscriptionStatus, a as FFIDConfig, b as FFIDApiResponse, c as FFIDSessionResponse, d as FFIDRedirectResult, e as FFIDError, f as FFIDSubscriptionCheckResponse, g as FFIDCheckServiceAccessParams, h as FFIDServiceAccessDecision, i as FFIDListMembersResponse, j as FFIDAddMemberParams, k as FFIDAddMemberResponse, l as FFIDAddMemberRequest, m as FFIDMemberRole, n as FFIDUpdateMemberRoleResponse, o as FFIDRemoveMemberResponse, p as FFIDProfileCallOptions, q as FFIDUserProfile, r as FFIDUpdateUserProfileRequest, s as FFIDAnalyticsConfig, t as FFIDCreateCheckoutParams, u as FFIDCheckoutSessionResponse, v as FFIDCreatePortalParams, w as FFIDPortalSessionResponse, x as FFIDVerifyAccessTokenOptions, y as FFIDOAuthUserInfo, z as FFIDInquiryCreateParams, A as FFIDInquiryCreateResponse, B as FFIDAuthMode, C as FFIDLogger, D as FFIDCacheAdapter, E as FFIDUser, G as FFIDOrganization, H as FFIDSubscription, I as FFIDSubscriptionContextValue, J as EffectiveSubscriptionStatus, K as FFIDAnnouncementsClientConfig, L as ListAnnouncementsOptions, M as FFIDAnnouncementsApiResponse, N as AnnouncementListResponse, O as FFIDAnnouncementsLogger } from './index-CInGR4I9.js';
|
|
2
|
+
export { P as Announcement, Q as AnnouncementStatus, R as AnnouncementType, S as FFIDAnnouncementBadge, T as FFIDAnnouncementList, U as FFIDAnnouncementsError, V as FFIDAnnouncementsErrorCode, W as FFIDAnnouncementsServerResponse, X as FFIDAssignableMemberRole, Y as FFIDCacheConfig, Z as FFIDContextValue, _ as FFIDInquiryCategory, $ as FFIDInquiryCategorySite2026, a0 as FFIDInquiryForm, a1 as FFIDInquiryFormCategoryItem, a2 as FFIDInquiryFormClassNames, a3 as FFIDInquiryFormLegalLayout, a4 as FFIDInquiryFormOrganization, a5 as FFIDInquiryFormPlaceholderContext, a6 as FFIDInquiryFormPrefill, a7 as FFIDInquiryFormProps, a8 as FFIDInquiryFormSubmitData, a9 as FFIDInquiryFormSubmitResult, aa as FFIDJwtClaims, ab as FFIDLoginButton, ac as FFIDMemberStatus, ad as FFIDOAuthTokenResponse, ae as FFIDOAuthUserInfoMemberRole, af as FFIDOAuthUserInfoSubscription, ag as FFIDOrganizationMember, ah as FFIDOrganizationSwitcher, ai as FFIDRedirectErrorCode, aj as FFIDSeatModel, ak as FFIDServiceAccessDenialReason, al as FFIDServiceAccessFailPolicy, am as FFIDSubscriptionBadge, an as FFIDTokenIntrospectionResponse, ao as FFIDUserMenu, ap as FFID_INQUIRY_CATEGORIES, aq as FFID_INQUIRY_CATEGORIES_SITE_2026, ar as UseFFIDAnnouncementsOptions, as as UseFFIDAnnouncementsReturn, at as isFFIDInquiryCategorySite2026, au as useFFIDAnnouncements } from './index-CInGR4I9.js';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import { ReactNode, ComponentType, FC } from 'react';
|
|
5
5
|
|
|
@@ -541,6 +541,10 @@ declare function createFFIDClient(config: FFIDConfig): {
|
|
|
541
541
|
listMembers: (params: {
|
|
542
542
|
organizationId: string;
|
|
543
543
|
}) => Promise<FFIDApiResponse<FFIDListMembersResponse>>;
|
|
544
|
+
addMember: {
|
|
545
|
+
(params: FFIDAddMemberParams): Promise<FFIDApiResponse<FFIDAddMemberResponse>>;
|
|
546
|
+
(organizationId: string, data: FFIDAddMemberRequest): Promise<FFIDApiResponse<FFIDAddMemberResponse>>;
|
|
547
|
+
};
|
|
544
548
|
updateMemberRole: (params: {
|
|
545
549
|
organizationId: string;
|
|
546
550
|
userId: string;
|
|
@@ -1202,4 +1206,4 @@ declare function createInquiryMethods(deps: InquiryMethodsDeps): {
|
|
|
1202
1206
|
};
|
|
1203
1207
|
type FFIDInquiryClient = ReturnType<typeof createInquiryMethods>;
|
|
1204
1208
|
|
|
1205
|
-
export { AnnouncementListResponse, type ComputeEffectiveStatusInput, type ContractWizardFlowType, type ContractWizardResubscribeOptions, type ContractWizardSubscribeOptions, type ContractWizardSubscriptionOptions, DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, EffectiveSubscriptionStatus, FFIDAnnouncementsApiResponse, type FFIDAnnouncementsClient, FFIDAnnouncementsClientConfig, FFIDAnnouncementsLogger, FFIDApiResponse, type FFIDBillingInterval, FFIDCacheAdapter, type FFIDCancelPendingDowngradeResponse, type FFIDCancelSubscriptionParams, type FFIDCancelSubscriptionResponse, type FFIDChangePlanParams, type FFIDChangePlanResponse, FFIDCheckServiceAccessParams, FFIDCheckoutSessionResponse, type FFIDClient, FFIDConfig, FFIDCreateCheckoutParams, FFIDCreatePortalParams, FFIDError, type FFIDInquiryClient, FFIDInquiryCreateParams, FFIDInquiryCreateResponse, FFIDListMembersResponse, type FFIDListPlansResponse, FFIDLogger, FFIDMemberRole, type FFIDNewsletterBodySource, type FFIDNewsletterCampaignStatus, type FFIDNewsletterClient, type FFIDNewsletterConfirmParams, type FFIDNewsletterConfirmResponse, type FFIDNewsletterDispatchParams, type FFIDNewsletterDispatchResponse, type FFIDNewsletterSegment, type FFIDNewsletterSubscribeParams, type FFIDNewsletterSubscribeResponse, type FFIDNewsletterType, type FFIDNewsletterUnsubscribeParams, type FFIDNewsletterUnsubscribeResponse, FFIDOAuthUserInfo, FFIDOrganization, type FFIDOtpSendResponse, type FFIDOtpVerifyResponse, type FFIDPasswordResetConfirmResponse, type FFIDPasswordResetResponse, type FFIDPasswordResetVerifyResponse, type FFIDPlanChangeLineItem, type FFIDPlanChangePreview, type FFIDPlanChangePreviewResponse, type FFIDPlanInfo, FFIDPortalSessionResponse, type FFIDPreviewPlanChangeParams, type FFIDPreviewSeatChangeParams, FFIDProfileCallOptions, FFIDProvider, type FFIDProviderProps, FFIDRedirectResult, FFIDRemoveMemberResponse, type FFIDResetSessionResponse, FFIDSDKError, type FFIDSeatChangeLineItem, type FFIDSeatChangePreview, type FFIDSeatChangePreviewResponse, FFIDServiceAccessDecision, type FFIDServiceInfo, FFIDSessionResponse, type FFIDSubscribeParams, type FFIDSubscribeResponse, FFIDSubscription, FFIDSubscriptionCheckResponse, FFIDSubscriptionContextValue, type FFIDSubscriptionDetail, FFIDSubscriptionStatus, type FFIDSubscriptionSummary, type FFIDSupportedCurrency, FFIDUpdateMemberRoleResponse, FFIDUpdateUserProfileRequest, FFIDUser, FFIDUserProfile, FFIDVerifyAccessTokenOptions, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_NEWSLETTER_DISPATCH_MAX_RECIPIENTS, FFID_NEWSLETTER_TYPES, type KVNamespaceLike, ListAnnouncementsOptions, type NormalizeRedirectUriResult, type RedirectToAuthorizeOptions, type TokenData, type TokenStore, type UseFFIDReturn, type UseRequireActiveSubscriptionOptions, type UseRequireActiveSubscriptionReturn, type WithFFIDAuthOptions, type WithSubscriptionOptions, computeEffectiveStatusFromSession, createFFIDAnnouncementsClient, createFFIDClient, createKVCacheAdapter, createMemoryCacheAdapter, createTokenStore, generateCodeChallenge, generateCodeVerifier, normalizeRedirectUri, retrieveCodeVerifier, storeCodeVerifier, useFFID, useRequireActiveSubscription, useSubscription, withFFIDAuth, withSubscription };
|
|
1209
|
+
export { AnnouncementListResponse, type ComputeEffectiveStatusInput, type ContractWizardFlowType, type ContractWizardResubscribeOptions, type ContractWizardSubscribeOptions, type ContractWizardSubscriptionOptions, DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, EffectiveSubscriptionStatus, FFIDAddMemberParams, FFIDAddMemberRequest, FFIDAddMemberResponse, FFIDAnnouncementsApiResponse, type FFIDAnnouncementsClient, FFIDAnnouncementsClientConfig, FFIDAnnouncementsLogger, FFIDApiResponse, type FFIDBillingInterval, FFIDCacheAdapter, type FFIDCancelPendingDowngradeResponse, type FFIDCancelSubscriptionParams, type FFIDCancelSubscriptionResponse, type FFIDChangePlanParams, type FFIDChangePlanResponse, FFIDCheckServiceAccessParams, FFIDCheckoutSessionResponse, type FFIDClient, FFIDConfig, FFIDCreateCheckoutParams, FFIDCreatePortalParams, FFIDError, type FFIDInquiryClient, FFIDInquiryCreateParams, FFIDInquiryCreateResponse, FFIDListMembersResponse, type FFIDListPlansResponse, FFIDLogger, FFIDMemberRole, type FFIDNewsletterBodySource, type FFIDNewsletterCampaignStatus, type FFIDNewsletterClient, type FFIDNewsletterConfirmParams, type FFIDNewsletterConfirmResponse, type FFIDNewsletterDispatchParams, type FFIDNewsletterDispatchResponse, type FFIDNewsletterSegment, type FFIDNewsletterSubscribeParams, type FFIDNewsletterSubscribeResponse, type FFIDNewsletterType, type FFIDNewsletterUnsubscribeParams, type FFIDNewsletterUnsubscribeResponse, FFIDOAuthUserInfo, FFIDOrganization, type FFIDOtpSendResponse, type FFIDOtpVerifyResponse, type FFIDPasswordResetConfirmResponse, type FFIDPasswordResetResponse, type FFIDPasswordResetVerifyResponse, type FFIDPlanChangeLineItem, type FFIDPlanChangePreview, type FFIDPlanChangePreviewResponse, type FFIDPlanInfo, FFIDPortalSessionResponse, type FFIDPreviewPlanChangeParams, type FFIDPreviewSeatChangeParams, FFIDProfileCallOptions, FFIDProvider, type FFIDProviderProps, FFIDRedirectResult, FFIDRemoveMemberResponse, type FFIDResetSessionResponse, FFIDSDKError, type FFIDSeatChangeLineItem, type FFIDSeatChangePreview, type FFIDSeatChangePreviewResponse, FFIDServiceAccessDecision, type FFIDServiceInfo, FFIDSessionResponse, type FFIDSubscribeParams, type FFIDSubscribeResponse, FFIDSubscription, FFIDSubscriptionCheckResponse, FFIDSubscriptionContextValue, type FFIDSubscriptionDetail, FFIDSubscriptionStatus, type FFIDSubscriptionSummary, type FFIDSupportedCurrency, FFIDUpdateMemberRoleResponse, FFIDUpdateUserProfileRequest, FFIDUser, FFIDUserProfile, FFIDVerifyAccessTokenOptions, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_NEWSLETTER_DISPATCH_MAX_RECIPIENTS, FFID_NEWSLETTER_TYPES, type KVNamespaceLike, ListAnnouncementsOptions, type NormalizeRedirectUriResult, type RedirectToAuthorizeOptions, type TokenData, type TokenStore, type UseFFIDReturn, type UseRequireActiveSubscriptionOptions, type UseRequireActiveSubscriptionReturn, type WithFFIDAuthOptions, type WithSubscriptionOptions, computeEffectiveStatusFromSession, createFFIDAnnouncementsClient, createFFIDClient, createKVCacheAdapter, createMemoryCacheAdapter, createTokenStore, generateCodeChallenge, generateCodeVerifier, normalizeRedirectUri, retrieveCodeVerifier, storeCodeVerifier, useFFID, useRequireActiveSubscription, useSubscription, withFFIDAuth, withSubscription };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useFFIDContext, useSubscription } from './chunk-
|
|
2
|
-
export { DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDProvider, FFIDSDKError, FFIDSubscriptionBadge, FFIDUserMenu, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_INQUIRY_CATEGORIES, FFID_INQUIRY_CATEGORIES_SITE_2026, computeEffectiveStatusFromSession, createFFIDAnnouncementsClient, createFFIDClient, createTokenStore, generateCodeChallenge, generateCodeVerifier, isFFIDInquiryCategorySite2026, normalizeRedirectUri, retrieveCodeVerifier, storeCodeVerifier, useFFID, useFFIDAnnouncements, useSubscription, withSubscription } from './chunk-
|
|
1
|
+
import { useFFIDContext, useSubscription } from './chunk-35UOD62N.js';
|
|
2
|
+
export { DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDProvider, FFIDSDKError, FFIDSubscriptionBadge, FFIDUserMenu, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_INQUIRY_CATEGORIES, FFID_INQUIRY_CATEGORIES_SITE_2026, computeEffectiveStatusFromSession, createFFIDAnnouncementsClient, createFFIDClient, createTokenStore, generateCodeChallenge, generateCodeVerifier, isFFIDInquiryCategorySite2026, normalizeRedirectUri, retrieveCodeVerifier, storeCodeVerifier, useFFID, useFFIDAnnouncements, useSubscription, withSubscription } from './chunk-35UOD62N.js';
|
|
3
3
|
import { useEffect, useRef } from 'react';
|
|
4
4
|
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
|
package/dist/server/index.cjs
CHANGED
|
@@ -705,6 +705,7 @@ function createSubscriptionMethods(deps) {
|
|
|
705
705
|
var EXT_MEMBERS_ENDPOINT = "/api/v1/organizations/ext/members";
|
|
706
706
|
function createMembersMethods(deps) {
|
|
707
707
|
const { fetchWithAuth, createError, serviceCode } = deps;
|
|
708
|
+
const assignableRoles = /* @__PURE__ */ new Set(["admin", "member", "viewer"]);
|
|
708
709
|
function buildQuery(organizationId) {
|
|
709
710
|
return new URLSearchParams({ organizationId, serviceCode }).toString();
|
|
710
711
|
}
|
|
@@ -718,6 +719,37 @@ function createMembersMethods(deps) {
|
|
|
718
719
|
`${EXT_MEMBERS_ENDPOINT}?${buildQuery(params.organizationId)}`
|
|
719
720
|
);
|
|
720
721
|
}
|
|
722
|
+
function normalizeAddMemberArgs(paramsOrOrganizationId, data) {
|
|
723
|
+
if (typeof paramsOrOrganizationId === "string") {
|
|
724
|
+
const params = {
|
|
725
|
+
organizationId: paramsOrOrganizationId,
|
|
726
|
+
email: data?.email ?? ""
|
|
727
|
+
};
|
|
728
|
+
if (data?.role !== void 0) params.role = data.role;
|
|
729
|
+
return params;
|
|
730
|
+
}
|
|
731
|
+
return paramsOrOrganizationId;
|
|
732
|
+
}
|
|
733
|
+
async function addMember(paramsOrOrganizationId, data) {
|
|
734
|
+
const params = normalizeAddMemberArgs(paramsOrOrganizationId, data);
|
|
735
|
+
if (!params.organizationId || !params.email) {
|
|
736
|
+
return {
|
|
737
|
+
error: createError("VALIDATION_ERROR", "organizationId \u3068 email \u306F\u5FC5\u9808\u3067\u3059")
|
|
738
|
+
};
|
|
739
|
+
}
|
|
740
|
+
if (params.role !== void 0 && !assignableRoles.has(params.role)) {
|
|
741
|
+
return {
|
|
742
|
+
error: createError("VALIDATION_ERROR", "role \u306F admin\u3001member\u3001viewer \u306E\u3044\u305A\u308C\u304B\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044")
|
|
743
|
+
};
|
|
744
|
+
}
|
|
745
|
+
return fetchWithAuth(
|
|
746
|
+
`${EXT_MEMBERS_ENDPOINT}?${buildQuery(params.organizationId)}`,
|
|
747
|
+
{
|
|
748
|
+
method: "POST",
|
|
749
|
+
body: JSON.stringify({ email: params.email, role: params.role })
|
|
750
|
+
}
|
|
751
|
+
);
|
|
752
|
+
}
|
|
721
753
|
async function updateMemberRole(params) {
|
|
722
754
|
if (!params.organizationId || !params.userId) {
|
|
723
755
|
return {
|
|
@@ -750,7 +782,7 @@ function createMembersMethods(deps) {
|
|
|
750
782
|
}
|
|
751
783
|
);
|
|
752
784
|
}
|
|
753
|
-
return { listMembers, updateMemberRole, removeMember };
|
|
785
|
+
return { listMembers, addMember, updateMemberRole, removeMember };
|
|
754
786
|
}
|
|
755
787
|
|
|
756
788
|
// src/client/profile-methods.ts
|
|
@@ -803,7 +835,7 @@ function createProfileMethods(deps) {
|
|
|
803
835
|
}
|
|
804
836
|
|
|
805
837
|
// src/client/version-check.ts
|
|
806
|
-
var SDK_VERSION = "4.
|
|
838
|
+
var SDK_VERSION = "4.3.0";
|
|
807
839
|
var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
|
|
808
840
|
var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
|
|
809
841
|
function sdkHeaders() {
|
|
@@ -2553,7 +2585,7 @@ function createFFIDClient(config) {
|
|
|
2553
2585
|
fetchWithAuth,
|
|
2554
2586
|
createError
|
|
2555
2587
|
});
|
|
2556
|
-
const { listMembers, updateMemberRole, removeMember } = createMembersMethods({
|
|
2588
|
+
const { listMembers, addMember, updateMemberRole, removeMember } = createMembersMethods({
|
|
2557
2589
|
fetchWithAuth,
|
|
2558
2590
|
createError,
|
|
2559
2591
|
serviceCode: config.serviceCode
|
|
@@ -2637,6 +2669,7 @@ function createFFIDClient(config) {
|
|
|
2637
2669
|
checkServiceAccess,
|
|
2638
2670
|
requireServiceAccess,
|
|
2639
2671
|
listMembers,
|
|
2672
|
+
addMember,
|
|
2640
2673
|
updateMemberRole,
|
|
2641
2674
|
removeMember,
|
|
2642
2675
|
getProfile,
|
package/dist/server/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FFIDLogger, a as FFIDError, b as FFIDCacheAdapter, c as FFIDVerifyAccessTokenOptions, d as FFIDApiResponse, e as FFIDOAuthUserInfo } from '../ffid-client-
|
|
2
|
-
export { f as
|
|
1
|
+
import { F as FFIDLogger, a as FFIDError, b as FFIDCacheAdapter, c as FFIDVerifyAccessTokenOptions, d as FFIDApiResponse, e as FFIDOAuthUserInfo } from '../ffid-client-DgprK2ec.cjs';
|
|
2
|
+
export { f as FFIDAddMemberParams, g as FFIDAddMemberRequest, h as FFIDAddMemberResponse, i as FFIDAssignableMemberRole, j as FFIDCacheConfig, k as FFIDClient, l as FFIDConfig, m as FFIDListMembersResponse, n as FFIDMemberRole, o as FFIDOrganization, p as FFIDOrganizationMember, q as FFIDOtpSendResponse, r as FFIDOtpVerifyResponse, s as FFIDPasswordResetConfirmResponse, t as FFIDPasswordResetResponse, u as FFIDPasswordResetVerifyResponse, v as FFIDProfileCallOptions, w as FFIDRemoveMemberResponse, x as FFIDResetSessionResponse, y as FFIDSubscription, z as FFIDUpdateMemberRoleResponse, A as FFIDUpdateUserProfileRequest, B as FFIDUser, C as FFIDUserProfile, T as TokenData, D as TokenStore, E as createFFIDClient, G as createTokenStore } from '../ffid-client-DgprK2ec.cjs';
|
|
3
3
|
export { D as DEFAULT_API_BASE_URL, a as DEFAULT_OAUTH_SCOPES } from '../constants-D61jqRIO.cjs';
|
|
4
4
|
import '../types-5g_Bg6Ey.cjs';
|
|
5
5
|
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FFIDLogger, a as FFIDError, b as FFIDCacheAdapter, c as FFIDVerifyAccessTokenOptions, d as FFIDApiResponse, e as FFIDOAuthUserInfo } from '../ffid-client-
|
|
2
|
-
export { f as
|
|
1
|
+
import { F as FFIDLogger, a as FFIDError, b as FFIDCacheAdapter, c as FFIDVerifyAccessTokenOptions, d as FFIDApiResponse, e as FFIDOAuthUserInfo } from '../ffid-client-BaStAONh.js';
|
|
2
|
+
export { f as FFIDAddMemberParams, g as FFIDAddMemberRequest, h as FFIDAddMemberResponse, i as FFIDAssignableMemberRole, j as FFIDCacheConfig, k as FFIDClient, l as FFIDConfig, m as FFIDListMembersResponse, n as FFIDMemberRole, o as FFIDOrganization, p as FFIDOrganizationMember, q as FFIDOtpSendResponse, r as FFIDOtpVerifyResponse, s as FFIDPasswordResetConfirmResponse, t as FFIDPasswordResetResponse, u as FFIDPasswordResetVerifyResponse, v as FFIDProfileCallOptions, w as FFIDRemoveMemberResponse, x as FFIDResetSessionResponse, y as FFIDSubscription, z as FFIDUpdateMemberRoleResponse, A as FFIDUpdateUserProfileRequest, B as FFIDUser, C as FFIDUserProfile, T as TokenData, D as TokenStore, E as createFFIDClient, G as createTokenStore } from '../ffid-client-BaStAONh.js';
|
|
3
3
|
export { D as DEFAULT_API_BASE_URL, a as DEFAULT_OAUTH_SCOPES } from '../constants-D61jqRIO.js';
|
|
4
4
|
import '../types-5g_Bg6Ey.js';
|
|
5
5
|
|
package/dist/server/index.js
CHANGED
|
@@ -704,6 +704,7 @@ function createSubscriptionMethods(deps) {
|
|
|
704
704
|
var EXT_MEMBERS_ENDPOINT = "/api/v1/organizations/ext/members";
|
|
705
705
|
function createMembersMethods(deps) {
|
|
706
706
|
const { fetchWithAuth, createError, serviceCode } = deps;
|
|
707
|
+
const assignableRoles = /* @__PURE__ */ new Set(["admin", "member", "viewer"]);
|
|
707
708
|
function buildQuery(organizationId) {
|
|
708
709
|
return new URLSearchParams({ organizationId, serviceCode }).toString();
|
|
709
710
|
}
|
|
@@ -717,6 +718,37 @@ function createMembersMethods(deps) {
|
|
|
717
718
|
`${EXT_MEMBERS_ENDPOINT}?${buildQuery(params.organizationId)}`
|
|
718
719
|
);
|
|
719
720
|
}
|
|
721
|
+
function normalizeAddMemberArgs(paramsOrOrganizationId, data) {
|
|
722
|
+
if (typeof paramsOrOrganizationId === "string") {
|
|
723
|
+
const params = {
|
|
724
|
+
organizationId: paramsOrOrganizationId,
|
|
725
|
+
email: data?.email ?? ""
|
|
726
|
+
};
|
|
727
|
+
if (data?.role !== void 0) params.role = data.role;
|
|
728
|
+
return params;
|
|
729
|
+
}
|
|
730
|
+
return paramsOrOrganizationId;
|
|
731
|
+
}
|
|
732
|
+
async function addMember(paramsOrOrganizationId, data) {
|
|
733
|
+
const params = normalizeAddMemberArgs(paramsOrOrganizationId, data);
|
|
734
|
+
if (!params.organizationId || !params.email) {
|
|
735
|
+
return {
|
|
736
|
+
error: createError("VALIDATION_ERROR", "organizationId \u3068 email \u306F\u5FC5\u9808\u3067\u3059")
|
|
737
|
+
};
|
|
738
|
+
}
|
|
739
|
+
if (params.role !== void 0 && !assignableRoles.has(params.role)) {
|
|
740
|
+
return {
|
|
741
|
+
error: createError("VALIDATION_ERROR", "role \u306F admin\u3001member\u3001viewer \u306E\u3044\u305A\u308C\u304B\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044")
|
|
742
|
+
};
|
|
743
|
+
}
|
|
744
|
+
return fetchWithAuth(
|
|
745
|
+
`${EXT_MEMBERS_ENDPOINT}?${buildQuery(params.organizationId)}`,
|
|
746
|
+
{
|
|
747
|
+
method: "POST",
|
|
748
|
+
body: JSON.stringify({ email: params.email, role: params.role })
|
|
749
|
+
}
|
|
750
|
+
);
|
|
751
|
+
}
|
|
720
752
|
async function updateMemberRole(params) {
|
|
721
753
|
if (!params.organizationId || !params.userId) {
|
|
722
754
|
return {
|
|
@@ -749,7 +781,7 @@ function createMembersMethods(deps) {
|
|
|
749
781
|
}
|
|
750
782
|
);
|
|
751
783
|
}
|
|
752
|
-
return { listMembers, updateMemberRole, removeMember };
|
|
784
|
+
return { listMembers, addMember, updateMemberRole, removeMember };
|
|
753
785
|
}
|
|
754
786
|
|
|
755
787
|
// src/client/profile-methods.ts
|
|
@@ -802,7 +834,7 @@ function createProfileMethods(deps) {
|
|
|
802
834
|
}
|
|
803
835
|
|
|
804
836
|
// src/client/version-check.ts
|
|
805
|
-
var SDK_VERSION = "4.
|
|
837
|
+
var SDK_VERSION = "4.3.0";
|
|
806
838
|
var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
|
|
807
839
|
var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
|
|
808
840
|
function sdkHeaders() {
|
|
@@ -2552,7 +2584,7 @@ function createFFIDClient(config) {
|
|
|
2552
2584
|
fetchWithAuth,
|
|
2553
2585
|
createError
|
|
2554
2586
|
});
|
|
2555
|
-
const { listMembers, updateMemberRole, removeMember } = createMembersMethods({
|
|
2587
|
+
const { listMembers, addMember, updateMemberRole, removeMember } = createMembersMethods({
|
|
2556
2588
|
fetchWithAuth,
|
|
2557
2589
|
createError,
|
|
2558
2590
|
serviceCode: config.serviceCode
|
|
@@ -2636,6 +2668,7 @@ function createFFIDClient(config) {
|
|
|
2636
2668
|
checkServiceAccess,
|
|
2637
2669
|
requireServiceAccess,
|
|
2638
2670
|
listMembers,
|
|
2671
|
+
addMember,
|
|
2639
2672
|
updateMemberRole,
|
|
2640
2673
|
removeMember,
|
|
2641
2674
|
getProfile,
|