@feelflow/ffid-sdk 5.28.0 → 5.30.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/dist/{chunk-75UNNOLV.js → chunk-4E26AZIZ.js} +17 -4
- package/dist/{chunk-S5FV6H2U.cjs → chunk-MLYUDFV4.cjs} +17 -4
- package/dist/components/index.cjs +8 -8
- package/dist/components/index.js +1 -1
- package/dist/{ffid-client-B_VBvIt4.d.cts → ffid-client-CEta_n9x.d.cts} +35 -1
- package/dist/{ffid-client-DEM1nYqe.d.ts → ffid-client-MkXk4hun.d.ts} +35 -1
- package/dist/index.cjs +58 -58
- package/dist/index.d.cts +35 -1
- package/dist/index.d.ts +35 -1
- package/dist/index.js +2 -2
- package/dist/server/index.cjs +17 -4
- package/dist/server/index.d.cts +2 -2
- package/dist/server/index.d.ts +2 -2
- package/dist/server/index.js +17 -4
- package/dist/server/test/index.d.cts +1 -1
- package/dist/server/test/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1287,6 +1287,7 @@ function createMembersMethods(deps) {
|
|
|
1287
1287
|
|
|
1288
1288
|
// src/client/provisioning-methods.ts
|
|
1289
1289
|
var USER_PROVISION_ENDPOINT = "/api/v1/ext/users/provision";
|
|
1290
|
+
var USER_WELCOME_EMAIL_ENDPOINT = "/api/v1/ext/users/welcome-email";
|
|
1290
1291
|
var ORGANIZATION_PROVISION_ENDPOINT = "/api/v1/ext/organizations/provision";
|
|
1291
1292
|
var MAX_PROVISION_MEMBERS = 100;
|
|
1292
1293
|
var ASSIGNABLE_MEMBER_ROLES = {
|
|
@@ -1303,7 +1304,7 @@ function createProvisioningMethods(deps) {
|
|
|
1303
1304
|
if (authMode === "service-key") return null;
|
|
1304
1305
|
return createError(
|
|
1305
1306
|
"VALIDATION_ERROR",
|
|
1306
|
-
"provisionUser / provisionOrganization \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"
|
|
1307
|
+
"provisionUser / sendProvisionWelcomeEmail / provisionOrganization \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"
|
|
1307
1308
|
);
|
|
1308
1309
|
}
|
|
1309
1310
|
async function provisionUser(params) {
|
|
@@ -1320,6 +1321,17 @@ function createProvisioningMethods(deps) {
|
|
|
1320
1321
|
body: JSON.stringify(body)
|
|
1321
1322
|
});
|
|
1322
1323
|
}
|
|
1324
|
+
async function sendProvisionWelcomeEmail(params) {
|
|
1325
|
+
const modeError = serviceKeyModeError();
|
|
1326
|
+
if (modeError) return { error: modeError };
|
|
1327
|
+
if (!params.email || !params.email.trim()) {
|
|
1328
|
+
return { error: createError("VALIDATION_ERROR", "email \u306F\u5FC5\u9808\u3067\u3059") };
|
|
1329
|
+
}
|
|
1330
|
+
return fetchWithAuth(USER_WELCOME_EMAIL_ENDPOINT, {
|
|
1331
|
+
method: "POST",
|
|
1332
|
+
body: JSON.stringify({ email: params.email.trim() })
|
|
1333
|
+
});
|
|
1334
|
+
}
|
|
1323
1335
|
async function provisionOrganization(params) {
|
|
1324
1336
|
const modeError = serviceKeyModeError();
|
|
1325
1337
|
if (modeError) return { error: modeError };
|
|
@@ -1369,7 +1381,7 @@ function createProvisioningMethods(deps) {
|
|
|
1369
1381
|
body: JSON.stringify(body)
|
|
1370
1382
|
});
|
|
1371
1383
|
}
|
|
1372
|
-
return { provisionUser, provisionOrganization };
|
|
1384
|
+
return { provisionUser, sendProvisionWelcomeEmail, provisionOrganization };
|
|
1373
1385
|
}
|
|
1374
1386
|
|
|
1375
1387
|
// src/client/seat-methods.ts
|
|
@@ -1643,7 +1655,7 @@ function validateTokenResponse(tokenResponse) {
|
|
|
1643
1655
|
}
|
|
1644
1656
|
|
|
1645
1657
|
// src/client/version-check.ts
|
|
1646
|
-
var SDK_VERSION = "5.
|
|
1658
|
+
var SDK_VERSION = "5.30.0";
|
|
1647
1659
|
var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
|
|
1648
1660
|
var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
|
|
1649
1661
|
function sdkHeaders() {
|
|
@@ -3689,7 +3701,7 @@ function createFFIDClient(config) {
|
|
|
3689
3701
|
createError,
|
|
3690
3702
|
serviceCode: config.serviceCode
|
|
3691
3703
|
});
|
|
3692
|
-
const { provisionUser, provisionOrganization } = createProvisioningMethods({
|
|
3704
|
+
const { provisionUser, sendProvisionWelcomeEmail, provisionOrganization } = createProvisioningMethods({
|
|
3693
3705
|
fetchWithAuth,
|
|
3694
3706
|
createError,
|
|
3695
3707
|
authMode
|
|
@@ -3790,6 +3802,7 @@ function createFFIDClient(config) {
|
|
|
3790
3802
|
updateMemberRole,
|
|
3791
3803
|
removeMember,
|
|
3792
3804
|
provisionUser,
|
|
3805
|
+
sendProvisionWelcomeEmail,
|
|
3793
3806
|
provisionOrganization,
|
|
3794
3807
|
getProfile,
|
|
3795
3808
|
updateProfile,
|
|
@@ -1289,6 +1289,7 @@ function createMembersMethods(deps) {
|
|
|
1289
1289
|
|
|
1290
1290
|
// src/client/provisioning-methods.ts
|
|
1291
1291
|
var USER_PROVISION_ENDPOINT = "/api/v1/ext/users/provision";
|
|
1292
|
+
var USER_WELCOME_EMAIL_ENDPOINT = "/api/v1/ext/users/welcome-email";
|
|
1292
1293
|
var ORGANIZATION_PROVISION_ENDPOINT = "/api/v1/ext/organizations/provision";
|
|
1293
1294
|
var MAX_PROVISION_MEMBERS = 100;
|
|
1294
1295
|
var ASSIGNABLE_MEMBER_ROLES = {
|
|
@@ -1305,7 +1306,7 @@ function createProvisioningMethods(deps) {
|
|
|
1305
1306
|
if (authMode === "service-key") return null;
|
|
1306
1307
|
return createError(
|
|
1307
1308
|
"VALIDATION_ERROR",
|
|
1308
|
-
"provisionUser / provisionOrganization \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"
|
|
1309
|
+
"provisionUser / sendProvisionWelcomeEmail / provisionOrganization \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"
|
|
1309
1310
|
);
|
|
1310
1311
|
}
|
|
1311
1312
|
async function provisionUser(params) {
|
|
@@ -1322,6 +1323,17 @@ function createProvisioningMethods(deps) {
|
|
|
1322
1323
|
body: JSON.stringify(body)
|
|
1323
1324
|
});
|
|
1324
1325
|
}
|
|
1326
|
+
async function sendProvisionWelcomeEmail(params) {
|
|
1327
|
+
const modeError = serviceKeyModeError();
|
|
1328
|
+
if (modeError) return { error: modeError };
|
|
1329
|
+
if (!params.email || !params.email.trim()) {
|
|
1330
|
+
return { error: createError("VALIDATION_ERROR", "email \u306F\u5FC5\u9808\u3067\u3059") };
|
|
1331
|
+
}
|
|
1332
|
+
return fetchWithAuth(USER_WELCOME_EMAIL_ENDPOINT, {
|
|
1333
|
+
method: "POST",
|
|
1334
|
+
body: JSON.stringify({ email: params.email.trim() })
|
|
1335
|
+
});
|
|
1336
|
+
}
|
|
1325
1337
|
async function provisionOrganization(params) {
|
|
1326
1338
|
const modeError = serviceKeyModeError();
|
|
1327
1339
|
if (modeError) return { error: modeError };
|
|
@@ -1371,7 +1383,7 @@ function createProvisioningMethods(deps) {
|
|
|
1371
1383
|
body: JSON.stringify(body)
|
|
1372
1384
|
});
|
|
1373
1385
|
}
|
|
1374
|
-
return { provisionUser, provisionOrganization };
|
|
1386
|
+
return { provisionUser, sendProvisionWelcomeEmail, provisionOrganization };
|
|
1375
1387
|
}
|
|
1376
1388
|
|
|
1377
1389
|
// src/client/seat-methods.ts
|
|
@@ -1645,7 +1657,7 @@ function validateTokenResponse(tokenResponse) {
|
|
|
1645
1657
|
}
|
|
1646
1658
|
|
|
1647
1659
|
// src/client/version-check.ts
|
|
1648
|
-
var SDK_VERSION = "5.
|
|
1660
|
+
var SDK_VERSION = "5.30.0";
|
|
1649
1661
|
var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
|
|
1650
1662
|
var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
|
|
1651
1663
|
function sdkHeaders() {
|
|
@@ -3691,7 +3703,7 @@ function createFFIDClient(config) {
|
|
|
3691
3703
|
createError,
|
|
3692
3704
|
serviceCode: config.serviceCode
|
|
3693
3705
|
});
|
|
3694
|
-
const { provisionUser, provisionOrganization } = createProvisioningMethods({
|
|
3706
|
+
const { provisionUser, sendProvisionWelcomeEmail, provisionOrganization } = createProvisioningMethods({
|
|
3695
3707
|
fetchWithAuth,
|
|
3696
3708
|
createError,
|
|
3697
3709
|
authMode
|
|
@@ -3792,6 +3804,7 @@ function createFFIDClient(config) {
|
|
|
3792
3804
|
updateMemberRole,
|
|
3793
3805
|
removeMember,
|
|
3794
3806
|
provisionUser,
|
|
3807
|
+
sendProvisionWelcomeEmail,
|
|
3795
3808
|
provisionOrganization,
|
|
3796
3809
|
getProfile,
|
|
3797
3810
|
updateProfile,
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkMLYUDFV4_cjs = require('../chunk-MLYUDFV4.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 chunkMLYUDFV4_cjs.FFIDAnnouncementBadge; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "FFIDAnnouncementList", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkMLYUDFV4_cjs.FFIDAnnouncementList; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "FFIDInquiryForm", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkMLYUDFV4_cjs.FFIDInquiryForm; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "FFIDLoginButton", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkMLYUDFV4_cjs.FFIDLoginButton; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "FFIDOrganizationSwitcher", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkMLYUDFV4_cjs.FFIDOrganizationSwitcher; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "FFIDSubscriptionBadge", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkMLYUDFV4_cjs.FFIDSubscriptionBadge; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "FFIDUserMenu", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkMLYUDFV4_cjs.FFIDUserMenu; }
|
|
34
34
|
});
|
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-4E26AZIZ.js';
|
|
@@ -411,7 +411,15 @@ interface FFIDPlanInfo {
|
|
|
411
411
|
maxSeats: number | null;
|
|
412
412
|
seatSelectionEnabled: boolean;
|
|
413
413
|
trialDays: number;
|
|
414
|
-
|
|
414
|
+
/**
|
|
415
|
+
* Monthly price in the smallest currency unit.
|
|
416
|
+
*
|
|
417
|
+
* `null` when the plan is not self-serve priced. Once the FFID #4482 rollout
|
|
418
|
+
* is enabled, `customPricing: true` (Enterprise / "contact us") plans return
|
|
419
|
+
* `null` here — branch on `customPricing` to render an inquiry CTA rather than
|
|
420
|
+
* a price. Standard plans always return a number.
|
|
421
|
+
*/
|
|
422
|
+
priceMonthly: number | null;
|
|
415
423
|
priceYearly: number | null;
|
|
416
424
|
currency: string;
|
|
417
425
|
isActive: boolean;
|
|
@@ -852,6 +860,31 @@ interface FFIDProvisionUserDryRun {
|
|
|
852
860
|
* response. This mirrors how `FFIDApiResponse` is narrowed on `data` / `error`.
|
|
853
861
|
*/
|
|
854
862
|
type FFIDProvisionUserResponse = FFIDProvisionUserOutcome | FFIDProvisionUserDryRun;
|
|
863
|
+
/** Parameters for `sendProvisionWelcomeEmail` (#4449). */
|
|
864
|
+
interface FFIDProvisionWelcomeEmailParams {
|
|
865
|
+
/** Email of the provisioned FFID user to notify (must already exist). */
|
|
866
|
+
email: string;
|
|
867
|
+
}
|
|
868
|
+
/**
|
|
869
|
+
* Response from `sendProvisionWelcomeEmail` (#4449).
|
|
870
|
+
*
|
|
871
|
+
* `status` is always `'sent'` on the data branch. Non-success outcomes arrive
|
|
872
|
+
* on the error branch instead:
|
|
873
|
+
* - `USER_NOT_FOUND` (404) — provision the user first.
|
|
874
|
+
* - `RATE_LIMITED` (429) — per-recipient cooldown; `details.retryAfterSeconds`
|
|
875
|
+
* says when a resend will be accepted. The cooldown is claimed only after a
|
|
876
|
+
* successful send, so a 429 always means an email really was just sent.
|
|
877
|
+
* - `RECOVERY_LINK_GENERATION_FAILED` (502) — the password-setup link could
|
|
878
|
+
* not be generated; nothing was sent.
|
|
879
|
+
* - `EMAIL_SEND_FAILED` / `EMAIL_SEND_FAILED_PERMANENT` (502),
|
|
880
|
+
* `EMAIL_SERVICE_UNAVAILABLE` (503) — delivery-side failures; the caller
|
|
881
|
+
* should surface "not delivered" and offer a resend (failed attempts do not
|
|
882
|
+
* consume the cooldown, so an immediate retry is accepted).
|
|
883
|
+
*/
|
|
884
|
+
interface FFIDProvisionWelcomeEmailResponse {
|
|
885
|
+
status: 'sent';
|
|
886
|
+
user: FFIDProvisionedUser;
|
|
887
|
+
}
|
|
855
888
|
/** A member to add to the provisioned organization. */
|
|
856
889
|
interface FFIDProvisionOrganizationMemberInput {
|
|
857
890
|
email: string;
|
|
@@ -2178,6 +2211,7 @@ declare function createFFIDClient(config: FFIDConfig): {
|
|
|
2178
2211
|
userId: string;
|
|
2179
2212
|
}) => Promise<FFIDApiResponse<FFIDRemoveMemberResponse>>;
|
|
2180
2213
|
provisionUser: (params: FFIDProvisionUserParams) => Promise<FFIDApiResponse<FFIDProvisionUserResponse>>;
|
|
2214
|
+
sendProvisionWelcomeEmail: (params: FFIDProvisionWelcomeEmailParams) => Promise<FFIDApiResponse<FFIDProvisionWelcomeEmailResponse>>;
|
|
2181
2215
|
provisionOrganization: (params: FFIDProvisionOrganizationParams) => Promise<FFIDApiResponse<FFIDProvisionOrganizationResponse>>;
|
|
2182
2216
|
getProfile: (options?: FFIDProfileCallOptions) => Promise<FFIDApiResponse<FFIDUserProfile>>;
|
|
2183
2217
|
updateProfile: (data: FFIDUpdateUserProfileRequest, options?: FFIDProfileCallOptions) => Promise<FFIDApiResponse<FFIDUserProfile>>;
|
|
@@ -411,7 +411,15 @@ interface FFIDPlanInfo {
|
|
|
411
411
|
maxSeats: number | null;
|
|
412
412
|
seatSelectionEnabled: boolean;
|
|
413
413
|
trialDays: number;
|
|
414
|
-
|
|
414
|
+
/**
|
|
415
|
+
* Monthly price in the smallest currency unit.
|
|
416
|
+
*
|
|
417
|
+
* `null` when the plan is not self-serve priced. Once the FFID #4482 rollout
|
|
418
|
+
* is enabled, `customPricing: true` (Enterprise / "contact us") plans return
|
|
419
|
+
* `null` here — branch on `customPricing` to render an inquiry CTA rather than
|
|
420
|
+
* a price. Standard plans always return a number.
|
|
421
|
+
*/
|
|
422
|
+
priceMonthly: number | null;
|
|
415
423
|
priceYearly: number | null;
|
|
416
424
|
currency: string;
|
|
417
425
|
isActive: boolean;
|
|
@@ -852,6 +860,31 @@ interface FFIDProvisionUserDryRun {
|
|
|
852
860
|
* response. This mirrors how `FFIDApiResponse` is narrowed on `data` / `error`.
|
|
853
861
|
*/
|
|
854
862
|
type FFIDProvisionUserResponse = FFIDProvisionUserOutcome | FFIDProvisionUserDryRun;
|
|
863
|
+
/** Parameters for `sendProvisionWelcomeEmail` (#4449). */
|
|
864
|
+
interface FFIDProvisionWelcomeEmailParams {
|
|
865
|
+
/** Email of the provisioned FFID user to notify (must already exist). */
|
|
866
|
+
email: string;
|
|
867
|
+
}
|
|
868
|
+
/**
|
|
869
|
+
* Response from `sendProvisionWelcomeEmail` (#4449).
|
|
870
|
+
*
|
|
871
|
+
* `status` is always `'sent'` on the data branch. Non-success outcomes arrive
|
|
872
|
+
* on the error branch instead:
|
|
873
|
+
* - `USER_NOT_FOUND` (404) — provision the user first.
|
|
874
|
+
* - `RATE_LIMITED` (429) — per-recipient cooldown; `details.retryAfterSeconds`
|
|
875
|
+
* says when a resend will be accepted. The cooldown is claimed only after a
|
|
876
|
+
* successful send, so a 429 always means an email really was just sent.
|
|
877
|
+
* - `RECOVERY_LINK_GENERATION_FAILED` (502) — the password-setup link could
|
|
878
|
+
* not be generated; nothing was sent.
|
|
879
|
+
* - `EMAIL_SEND_FAILED` / `EMAIL_SEND_FAILED_PERMANENT` (502),
|
|
880
|
+
* `EMAIL_SERVICE_UNAVAILABLE` (503) — delivery-side failures; the caller
|
|
881
|
+
* should surface "not delivered" and offer a resend (failed attempts do not
|
|
882
|
+
* consume the cooldown, so an immediate retry is accepted).
|
|
883
|
+
*/
|
|
884
|
+
interface FFIDProvisionWelcomeEmailResponse {
|
|
885
|
+
status: 'sent';
|
|
886
|
+
user: FFIDProvisionedUser;
|
|
887
|
+
}
|
|
855
888
|
/** A member to add to the provisioned organization. */
|
|
856
889
|
interface FFIDProvisionOrganizationMemberInput {
|
|
857
890
|
email: string;
|
|
@@ -2178,6 +2211,7 @@ declare function createFFIDClient(config: FFIDConfig): {
|
|
|
2178
2211
|
userId: string;
|
|
2179
2212
|
}) => Promise<FFIDApiResponse<FFIDRemoveMemberResponse>>;
|
|
2180
2213
|
provisionUser: (params: FFIDProvisionUserParams) => Promise<FFIDApiResponse<FFIDProvisionUserResponse>>;
|
|
2214
|
+
sendProvisionWelcomeEmail: (params: FFIDProvisionWelcomeEmailParams) => Promise<FFIDApiResponse<FFIDProvisionWelcomeEmailResponse>>;
|
|
2181
2215
|
provisionOrganization: (params: FFIDProvisionOrganizationParams) => Promise<FFIDApiResponse<FFIDProvisionOrganizationResponse>>;
|
|
2182
2216
|
getProfile: (options?: FFIDProfileCallOptions) => Promise<FFIDApiResponse<FFIDUserProfile>>;
|
|
2183
2217
|
updateProfile: (data: FFIDUpdateUserProfileRequest, options?: FFIDProfileCallOptions) => Promise<FFIDApiResponse<FFIDUserProfile>>;
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkMLYUDFV4_cjs = require('./chunk-MLYUDFV4.cjs');
|
|
4
4
|
var chunkH5O2CCAY_cjs = require('./chunk-H5O2CCAY.cjs');
|
|
5
5
|
var react = require('react');
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -54,8 +54,8 @@ function defaultRedirect(url) {
|
|
|
54
54
|
}
|
|
55
55
|
function useRequireActiveSubscription(options) {
|
|
56
56
|
const { redirectTo, allowGrace = true, onRedirect } = options;
|
|
57
|
-
const { isLoading, error } =
|
|
58
|
-
const { effectiveStatus, isBlocked, isGrace } =
|
|
57
|
+
const { isLoading, error } = chunkMLYUDFV4_cjs.useFFIDContext();
|
|
58
|
+
const { effectiveStatus, isBlocked, isGrace } = chunkMLYUDFV4_cjs.useSubscription();
|
|
59
59
|
const hasFetchError = error !== null && effectiveStatus === null;
|
|
60
60
|
const shouldRedirect = !isLoading && !hasFetchError && (isBlocked || !allowGrace && isGrace || effectiveStatus === null);
|
|
61
61
|
react.useEffect(() => {
|
|
@@ -76,7 +76,7 @@ function useRequireActiveSubscription(options) {
|
|
|
76
76
|
}
|
|
77
77
|
function withFFIDAuth(Component, options = {}) {
|
|
78
78
|
const WrappedComponent = (props) => {
|
|
79
|
-
const { isLoading, isAuthenticated, login } =
|
|
79
|
+
const { isLoading, isAuthenticated, login } = chunkMLYUDFV4_cjs.useFFIDContext();
|
|
80
80
|
const hasRedirected = react.useRef(false);
|
|
81
81
|
react.useEffect(() => {
|
|
82
82
|
if (!isLoading && !isAuthenticated && options.redirectToLogin && !hasRedirected.current) {
|
|
@@ -105,219 +105,219 @@ var FFID_NEWSLETTER_DISPATCH_MAX_RECIPIENTS = 1e3;
|
|
|
105
105
|
|
|
106
106
|
Object.defineProperty(exports, "ACCESS_GRANTING_EFFECTIVE_STATUSES", {
|
|
107
107
|
enumerable: true,
|
|
108
|
-
get: function () { return
|
|
108
|
+
get: function () { return chunkMLYUDFV4_cjs.ACCESS_GRANTING_EFFECTIVE_STATUSES; }
|
|
109
109
|
});
|
|
110
110
|
Object.defineProperty(exports, "BLOCKING_EFFECTIVE_STATUSES", {
|
|
111
111
|
enumerable: true,
|
|
112
|
-
get: function () { return
|
|
112
|
+
get: function () { return chunkMLYUDFV4_cjs.BLOCKING_EFFECTIVE_STATUSES; }
|
|
113
113
|
});
|
|
114
114
|
Object.defineProperty(exports, "CATALOG_HASH_PATTERN", {
|
|
115
115
|
enumerable: true,
|
|
116
|
-
get: function () { return
|
|
116
|
+
get: function () { return chunkMLYUDFV4_cjs.CATALOG_HASH_PATTERN; }
|
|
117
117
|
});
|
|
118
118
|
Object.defineProperty(exports, "DEFAULT_API_BASE_URL", {
|
|
119
119
|
enumerable: true,
|
|
120
|
-
get: function () { return
|
|
120
|
+
get: function () { return chunkMLYUDFV4_cjs.DEFAULT_API_BASE_URL; }
|
|
121
121
|
});
|
|
122
122
|
Object.defineProperty(exports, "DEFAULT_OAUTH_SCOPES", {
|
|
123
123
|
enumerable: true,
|
|
124
|
-
get: function () { return
|
|
124
|
+
get: function () { return chunkMLYUDFV4_cjs.DEFAULT_OAUTH_SCOPES; }
|
|
125
125
|
});
|
|
126
126
|
Object.defineProperty(exports, "EFFECTIVE_SUBSCRIPTION_STATUSES", {
|
|
127
127
|
enumerable: true,
|
|
128
|
-
get: function () { return
|
|
128
|
+
get: function () { return chunkMLYUDFV4_cjs.EFFECTIVE_SUBSCRIPTION_STATUSES; }
|
|
129
129
|
});
|
|
130
130
|
Object.defineProperty(exports, "FFIDAnnouncementBadge", {
|
|
131
131
|
enumerable: true,
|
|
132
|
-
get: function () { return
|
|
132
|
+
get: function () { return chunkMLYUDFV4_cjs.FFIDAnnouncementBadge; }
|
|
133
133
|
});
|
|
134
134
|
Object.defineProperty(exports, "FFIDAnnouncementList", {
|
|
135
135
|
enumerable: true,
|
|
136
|
-
get: function () { return
|
|
136
|
+
get: function () { return chunkMLYUDFV4_cjs.FFIDAnnouncementList; }
|
|
137
137
|
});
|
|
138
138
|
Object.defineProperty(exports, "FFIDCatalogHashError", {
|
|
139
139
|
enumerable: true,
|
|
140
|
-
get: function () { return
|
|
140
|
+
get: function () { return chunkMLYUDFV4_cjs.FFIDCatalogHashError; }
|
|
141
141
|
});
|
|
142
142
|
Object.defineProperty(exports, "FFIDInquiryForm", {
|
|
143
143
|
enumerable: true,
|
|
144
|
-
get: function () { return
|
|
144
|
+
get: function () { return chunkMLYUDFV4_cjs.FFIDInquiryForm; }
|
|
145
145
|
});
|
|
146
146
|
Object.defineProperty(exports, "FFIDLoginButton", {
|
|
147
147
|
enumerable: true,
|
|
148
|
-
get: function () { return
|
|
148
|
+
get: function () { return chunkMLYUDFV4_cjs.FFIDLoginButton; }
|
|
149
149
|
});
|
|
150
150
|
Object.defineProperty(exports, "FFIDOrganizationSwitcher", {
|
|
151
151
|
enumerable: true,
|
|
152
|
-
get: function () { return
|
|
152
|
+
get: function () { return chunkMLYUDFV4_cjs.FFIDOrganizationSwitcher; }
|
|
153
153
|
});
|
|
154
154
|
Object.defineProperty(exports, "FFIDProvider", {
|
|
155
155
|
enumerable: true,
|
|
156
|
-
get: function () { return
|
|
156
|
+
get: function () { return chunkMLYUDFV4_cjs.FFIDProvider; }
|
|
157
157
|
});
|
|
158
158
|
Object.defineProperty(exports, "FFIDSDKError", {
|
|
159
159
|
enumerable: true,
|
|
160
|
-
get: function () { return
|
|
160
|
+
get: function () { return chunkMLYUDFV4_cjs.FFIDSDKError; }
|
|
161
161
|
});
|
|
162
162
|
Object.defineProperty(exports, "FFIDSubscriptionBadge", {
|
|
163
163
|
enumerable: true,
|
|
164
|
-
get: function () { return
|
|
164
|
+
get: function () { return chunkMLYUDFV4_cjs.FFIDSubscriptionBadge; }
|
|
165
165
|
});
|
|
166
166
|
Object.defineProperty(exports, "FFIDUserMenu", {
|
|
167
167
|
enumerable: true,
|
|
168
|
-
get: function () { return
|
|
168
|
+
get: function () { return chunkMLYUDFV4_cjs.FFIDUserMenu; }
|
|
169
169
|
});
|
|
170
170
|
Object.defineProperty(exports, "FFID_ANNOUNCEMENTS_ERROR_CODES", {
|
|
171
171
|
enumerable: true,
|
|
172
|
-
get: function () { return
|
|
172
|
+
get: function () { return chunkMLYUDFV4_cjs.FFID_ANNOUNCEMENTS_ERROR_CODES; }
|
|
173
173
|
});
|
|
174
174
|
Object.defineProperty(exports, "FFID_CATALOG_ENVIRONMENTS", {
|
|
175
175
|
enumerable: true,
|
|
176
|
-
get: function () { return
|
|
176
|
+
get: function () { return chunkMLYUDFV4_cjs.FFID_CATALOG_ENVIRONMENTS; }
|
|
177
177
|
});
|
|
178
178
|
Object.defineProperty(exports, "FFID_CATALOG_PUBLICATION_STATUSES", {
|
|
179
179
|
enumerable: true,
|
|
180
|
-
get: function () { return
|
|
180
|
+
get: function () { return chunkMLYUDFV4_cjs.FFID_CATALOG_PUBLICATION_STATUSES; }
|
|
181
181
|
});
|
|
182
182
|
Object.defineProperty(exports, "FFID_ERROR_CODES", {
|
|
183
183
|
enumerable: true,
|
|
184
|
-
get: function () { return
|
|
184
|
+
get: function () { return chunkMLYUDFV4_cjs.FFID_ERROR_CODES; }
|
|
185
185
|
});
|
|
186
186
|
Object.defineProperty(exports, "FFID_INQUIRY_ACQUISITION_SOURCES", {
|
|
187
187
|
enumerable: true,
|
|
188
|
-
get: function () { return
|
|
188
|
+
get: function () { return chunkMLYUDFV4_cjs.FFID_INQUIRY_ACQUISITION_SOURCES; }
|
|
189
189
|
});
|
|
190
190
|
Object.defineProperty(exports, "FFID_INQUIRY_CATEGORIES", {
|
|
191
191
|
enumerable: true,
|
|
192
|
-
get: function () { return
|
|
192
|
+
get: function () { return chunkMLYUDFV4_cjs.FFID_INQUIRY_CATEGORIES; }
|
|
193
193
|
});
|
|
194
194
|
Object.defineProperty(exports, "FFID_INQUIRY_CATEGORIES_SITE_2026", {
|
|
195
195
|
enumerable: true,
|
|
196
|
-
get: function () { return
|
|
196
|
+
get: function () { return chunkMLYUDFV4_cjs.FFID_INQUIRY_CATEGORIES_SITE_2026; }
|
|
197
197
|
});
|
|
198
198
|
Object.defineProperty(exports, "canonicalizeCatalogValue", {
|
|
199
199
|
enumerable: true,
|
|
200
|
-
get: function () { return
|
|
200
|
+
get: function () { return chunkMLYUDFV4_cjs.canonicalizeCatalogValue; }
|
|
201
201
|
});
|
|
202
202
|
Object.defineProperty(exports, "clearState", {
|
|
203
203
|
enumerable: true,
|
|
204
|
-
get: function () { return
|
|
204
|
+
get: function () { return chunkMLYUDFV4_cjs.cleanupStateStorage; }
|
|
205
205
|
});
|
|
206
206
|
Object.defineProperty(exports, "computeEffectiveStatusFromSession", {
|
|
207
207
|
enumerable: true,
|
|
208
|
-
get: function () { return
|
|
208
|
+
get: function () { return chunkMLYUDFV4_cjs.computeEffectiveStatusFromSession; }
|
|
209
209
|
});
|
|
210
210
|
Object.defineProperty(exports, "computeFFIDCheckoutCopyHash", {
|
|
211
211
|
enumerable: true,
|
|
212
|
-
get: function () { return
|
|
212
|
+
get: function () { return chunkMLYUDFV4_cjs.computeFFIDCheckoutCopyHash; }
|
|
213
213
|
});
|
|
214
214
|
Object.defineProperty(exports, "computeLegalDisclosureHash", {
|
|
215
215
|
enumerable: true,
|
|
216
|
-
get: function () { return
|
|
216
|
+
get: function () { return chunkMLYUDFV4_cjs.computeLegalDisclosureHash; }
|
|
217
217
|
});
|
|
218
218
|
Object.defineProperty(exports, "computePaymentConfigurationHash", {
|
|
219
219
|
enumerable: true,
|
|
220
|
-
get: function () { return
|
|
220
|
+
get: function () { return chunkMLYUDFV4_cjs.computePaymentConfigurationHash; }
|
|
221
221
|
});
|
|
222
222
|
Object.defineProperty(exports, "computePraxisCopyHash", {
|
|
223
223
|
enumerable: true,
|
|
224
|
-
get: function () { return
|
|
224
|
+
get: function () { return chunkMLYUDFV4_cjs.computePraxisCopyHash; }
|
|
225
225
|
});
|
|
226
226
|
Object.defineProperty(exports, "computeScopeHash", {
|
|
227
227
|
enumerable: true,
|
|
228
|
-
get: function () { return
|
|
228
|
+
get: function () { return chunkMLYUDFV4_cjs.computeScopeHash; }
|
|
229
229
|
});
|
|
230
230
|
Object.defineProperty(exports, "computeTaxConfigurationHash", {
|
|
231
231
|
enumerable: true,
|
|
232
|
-
get: function () { return
|
|
232
|
+
get: function () { return chunkMLYUDFV4_cjs.computeTaxConfigurationHash; }
|
|
233
233
|
});
|
|
234
234
|
Object.defineProperty(exports, "createFFIDAnnouncementsClient", {
|
|
235
235
|
enumerable: true,
|
|
236
|
-
get: function () { return
|
|
236
|
+
get: function () { return chunkMLYUDFV4_cjs.createFFIDAnnouncementsClient; }
|
|
237
237
|
});
|
|
238
238
|
Object.defineProperty(exports, "createFFIDClient", {
|
|
239
239
|
enumerable: true,
|
|
240
|
-
get: function () { return
|
|
240
|
+
get: function () { return chunkMLYUDFV4_cjs.createFFIDClient; }
|
|
241
241
|
});
|
|
242
242
|
Object.defineProperty(exports, "createTokenStore", {
|
|
243
243
|
enumerable: true,
|
|
244
|
-
get: function () { return
|
|
244
|
+
get: function () { return chunkMLYUDFV4_cjs.createTokenStore; }
|
|
245
245
|
});
|
|
246
246
|
Object.defineProperty(exports, "generateCodeChallenge", {
|
|
247
247
|
enumerable: true,
|
|
248
|
-
get: function () { return
|
|
248
|
+
get: function () { return chunkMLYUDFV4_cjs.generateCodeChallenge; }
|
|
249
249
|
});
|
|
250
250
|
Object.defineProperty(exports, "generateCodeVerifier", {
|
|
251
251
|
enumerable: true,
|
|
252
|
-
get: function () { return
|
|
252
|
+
get: function () { return chunkMLYUDFV4_cjs.generateCodeVerifier; }
|
|
253
253
|
});
|
|
254
254
|
Object.defineProperty(exports, "handleRedirectCallback", {
|
|
255
255
|
enumerable: true,
|
|
256
|
-
get: function () { return
|
|
256
|
+
get: function () { return chunkMLYUDFV4_cjs.handleRedirectCallback; }
|
|
257
257
|
});
|
|
258
258
|
Object.defineProperty(exports, "hasAccessFromUserinfo", {
|
|
259
259
|
enumerable: true,
|
|
260
|
-
get: function () { return
|
|
260
|
+
get: function () { return chunkMLYUDFV4_cjs.hasAccessFromUserinfo; }
|
|
261
261
|
});
|
|
262
262
|
Object.defineProperty(exports, "hashCanonicalJson", {
|
|
263
263
|
enumerable: true,
|
|
264
|
-
get: function () { return
|
|
264
|
+
get: function () { return chunkMLYUDFV4_cjs.hashCanonicalJson; }
|
|
265
265
|
});
|
|
266
266
|
Object.defineProperty(exports, "isBlockedFromUserinfo", {
|
|
267
267
|
enumerable: true,
|
|
268
|
-
get: function () { return
|
|
268
|
+
get: function () { return chunkMLYUDFV4_cjs.isBlockedFromUserinfo; }
|
|
269
269
|
});
|
|
270
270
|
Object.defineProperty(exports, "isFFIDInquiryAcquisitionSource", {
|
|
271
271
|
enumerable: true,
|
|
272
|
-
get: function () { return
|
|
272
|
+
get: function () { return chunkMLYUDFV4_cjs.isFFIDInquiryAcquisitionSource; }
|
|
273
273
|
});
|
|
274
274
|
Object.defineProperty(exports, "isFFIDInquiryCategorySite2026", {
|
|
275
275
|
enumerable: true,
|
|
276
|
-
get: function () { return
|
|
276
|
+
get: function () { return chunkMLYUDFV4_cjs.isFFIDInquiryCategorySite2026; }
|
|
277
277
|
});
|
|
278
278
|
Object.defineProperty(exports, "normalizeRedirectUri", {
|
|
279
279
|
enumerable: true,
|
|
280
|
-
get: function () { return
|
|
280
|
+
get: function () { return chunkMLYUDFV4_cjs.normalizeRedirectUri; }
|
|
281
281
|
});
|
|
282
282
|
Object.defineProperty(exports, "retrieveCodeVerifier", {
|
|
283
283
|
enumerable: true,
|
|
284
|
-
get: function () { return
|
|
284
|
+
get: function () { return chunkMLYUDFV4_cjs.retrieveCodeVerifier; }
|
|
285
285
|
});
|
|
286
286
|
Object.defineProperty(exports, "retrieveState", {
|
|
287
287
|
enumerable: true,
|
|
288
|
-
get: function () { return
|
|
288
|
+
get: function () { return chunkMLYUDFV4_cjs.retrieveState; }
|
|
289
289
|
});
|
|
290
290
|
Object.defineProperty(exports, "sha256Hex", {
|
|
291
291
|
enumerable: true,
|
|
292
|
-
get: function () { return
|
|
292
|
+
get: function () { return chunkMLYUDFV4_cjs.sha256Hex; }
|
|
293
293
|
});
|
|
294
294
|
Object.defineProperty(exports, "storeCodeVerifier", {
|
|
295
295
|
enumerable: true,
|
|
296
|
-
get: function () { return
|
|
296
|
+
get: function () { return chunkMLYUDFV4_cjs.storeCodeVerifier; }
|
|
297
297
|
});
|
|
298
298
|
Object.defineProperty(exports, "storeState", {
|
|
299
299
|
enumerable: true,
|
|
300
|
-
get: function () { return
|
|
300
|
+
get: function () { return chunkMLYUDFV4_cjs.storeState; }
|
|
301
301
|
});
|
|
302
302
|
Object.defineProperty(exports, "useFFID", {
|
|
303
303
|
enumerable: true,
|
|
304
|
-
get: function () { return
|
|
304
|
+
get: function () { return chunkMLYUDFV4_cjs.useFFID; }
|
|
305
305
|
});
|
|
306
306
|
Object.defineProperty(exports, "useFFIDAnnouncements", {
|
|
307
307
|
enumerable: true,
|
|
308
|
-
get: function () { return
|
|
308
|
+
get: function () { return chunkMLYUDFV4_cjs.useFFIDAnnouncements; }
|
|
309
309
|
});
|
|
310
310
|
Object.defineProperty(exports, "useSubscription", {
|
|
311
311
|
enumerable: true,
|
|
312
|
-
get: function () { return
|
|
312
|
+
get: function () { return chunkMLYUDFV4_cjs.useSubscription; }
|
|
313
313
|
});
|
|
314
314
|
Object.defineProperty(exports, "validatePublishedCatalog", {
|
|
315
315
|
enumerable: true,
|
|
316
|
-
get: function () { return
|
|
316
|
+
get: function () { return chunkMLYUDFV4_cjs.validatePublishedCatalog; }
|
|
317
317
|
});
|
|
318
318
|
Object.defineProperty(exports, "withSubscription", {
|
|
319
319
|
enumerable: true,
|
|
320
|
-
get: function () { return
|
|
320
|
+
get: function () { return chunkMLYUDFV4_cjs.withSubscription; }
|
|
321
321
|
});
|
|
322
322
|
Object.defineProperty(exports, "ALL_DENIED_EXCEPT_NECESSARY", {
|
|
323
323
|
enumerable: true,
|
package/dist/index.d.cts
CHANGED
|
@@ -184,7 +184,15 @@ interface FFIDPlanInfo {
|
|
|
184
184
|
maxSeats: number | null;
|
|
185
185
|
seatSelectionEnabled: boolean;
|
|
186
186
|
trialDays: number;
|
|
187
|
-
|
|
187
|
+
/**
|
|
188
|
+
* Monthly price in the smallest currency unit.
|
|
189
|
+
*
|
|
190
|
+
* `null` when the plan is not self-serve priced. Once the FFID #4482 rollout
|
|
191
|
+
* is enabled, `customPricing: true` (Enterprise / "contact us") plans return
|
|
192
|
+
* `null` here — branch on `customPricing` to render an inquiry CTA rather than
|
|
193
|
+
* a price. Standard plans always return a number.
|
|
194
|
+
*/
|
|
195
|
+
priceMonthly: number | null;
|
|
188
196
|
priceYearly: number | null;
|
|
189
197
|
currency: string;
|
|
190
198
|
isActive: boolean;
|
|
@@ -625,6 +633,31 @@ interface FFIDProvisionUserDryRun {
|
|
|
625
633
|
* response. This mirrors how `FFIDApiResponse` is narrowed on `data` / `error`.
|
|
626
634
|
*/
|
|
627
635
|
type FFIDProvisionUserResponse = FFIDProvisionUserOutcome | FFIDProvisionUserDryRun;
|
|
636
|
+
/** Parameters for `sendProvisionWelcomeEmail` (#4449). */
|
|
637
|
+
interface FFIDProvisionWelcomeEmailParams {
|
|
638
|
+
/** Email of the provisioned FFID user to notify (must already exist). */
|
|
639
|
+
email: string;
|
|
640
|
+
}
|
|
641
|
+
/**
|
|
642
|
+
* Response from `sendProvisionWelcomeEmail` (#4449).
|
|
643
|
+
*
|
|
644
|
+
* `status` is always `'sent'` on the data branch. Non-success outcomes arrive
|
|
645
|
+
* on the error branch instead:
|
|
646
|
+
* - `USER_NOT_FOUND` (404) — provision the user first.
|
|
647
|
+
* - `RATE_LIMITED` (429) — per-recipient cooldown; `details.retryAfterSeconds`
|
|
648
|
+
* says when a resend will be accepted. The cooldown is claimed only after a
|
|
649
|
+
* successful send, so a 429 always means an email really was just sent.
|
|
650
|
+
* - `RECOVERY_LINK_GENERATION_FAILED` (502) — the password-setup link could
|
|
651
|
+
* not be generated; nothing was sent.
|
|
652
|
+
* - `EMAIL_SEND_FAILED` / `EMAIL_SEND_FAILED_PERMANENT` (502),
|
|
653
|
+
* `EMAIL_SERVICE_UNAVAILABLE` (503) — delivery-side failures; the caller
|
|
654
|
+
* should surface "not delivered" and offer a resend (failed attempts do not
|
|
655
|
+
* consume the cooldown, so an immediate retry is accepted).
|
|
656
|
+
*/
|
|
657
|
+
interface FFIDProvisionWelcomeEmailResponse {
|
|
658
|
+
status: 'sent';
|
|
659
|
+
user: FFIDProvisionedUser;
|
|
660
|
+
}
|
|
628
661
|
/** A member to add to the provisioned organization. */
|
|
629
662
|
interface FFIDProvisionOrganizationMemberInput {
|
|
630
663
|
email: string;
|
|
@@ -1577,6 +1610,7 @@ declare function createFFIDClient(config: FFIDConfig): {
|
|
|
1577
1610
|
userId: string;
|
|
1578
1611
|
}) => Promise<FFIDApiResponse<FFIDRemoveMemberResponse>>;
|
|
1579
1612
|
provisionUser: (params: FFIDProvisionUserParams) => Promise<FFIDApiResponse<FFIDProvisionUserResponse>>;
|
|
1613
|
+
sendProvisionWelcomeEmail: (params: FFIDProvisionWelcomeEmailParams) => Promise<FFIDApiResponse<FFIDProvisionWelcomeEmailResponse>>;
|
|
1580
1614
|
provisionOrganization: (params: FFIDProvisionOrganizationParams) => Promise<FFIDApiResponse<FFIDProvisionOrganizationResponse>>;
|
|
1581
1615
|
getProfile: (options?: FFIDProfileCallOptions) => Promise<FFIDApiResponse<FFIDUserProfile>>;
|
|
1582
1616
|
updateProfile: (data: FFIDUpdateUserProfileRequest, options?: FFIDProfileCallOptions) => Promise<FFIDApiResponse<FFIDUserProfile>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -184,7 +184,15 @@ interface FFIDPlanInfo {
|
|
|
184
184
|
maxSeats: number | null;
|
|
185
185
|
seatSelectionEnabled: boolean;
|
|
186
186
|
trialDays: number;
|
|
187
|
-
|
|
187
|
+
/**
|
|
188
|
+
* Monthly price in the smallest currency unit.
|
|
189
|
+
*
|
|
190
|
+
* `null` when the plan is not self-serve priced. Once the FFID #4482 rollout
|
|
191
|
+
* is enabled, `customPricing: true` (Enterprise / "contact us") plans return
|
|
192
|
+
* `null` here — branch on `customPricing` to render an inquiry CTA rather than
|
|
193
|
+
* a price. Standard plans always return a number.
|
|
194
|
+
*/
|
|
195
|
+
priceMonthly: number | null;
|
|
188
196
|
priceYearly: number | null;
|
|
189
197
|
currency: string;
|
|
190
198
|
isActive: boolean;
|
|
@@ -625,6 +633,31 @@ interface FFIDProvisionUserDryRun {
|
|
|
625
633
|
* response. This mirrors how `FFIDApiResponse` is narrowed on `data` / `error`.
|
|
626
634
|
*/
|
|
627
635
|
type FFIDProvisionUserResponse = FFIDProvisionUserOutcome | FFIDProvisionUserDryRun;
|
|
636
|
+
/** Parameters for `sendProvisionWelcomeEmail` (#4449). */
|
|
637
|
+
interface FFIDProvisionWelcomeEmailParams {
|
|
638
|
+
/** Email of the provisioned FFID user to notify (must already exist). */
|
|
639
|
+
email: string;
|
|
640
|
+
}
|
|
641
|
+
/**
|
|
642
|
+
* Response from `sendProvisionWelcomeEmail` (#4449).
|
|
643
|
+
*
|
|
644
|
+
* `status` is always `'sent'` on the data branch. Non-success outcomes arrive
|
|
645
|
+
* on the error branch instead:
|
|
646
|
+
* - `USER_NOT_FOUND` (404) — provision the user first.
|
|
647
|
+
* - `RATE_LIMITED` (429) — per-recipient cooldown; `details.retryAfterSeconds`
|
|
648
|
+
* says when a resend will be accepted. The cooldown is claimed only after a
|
|
649
|
+
* successful send, so a 429 always means an email really was just sent.
|
|
650
|
+
* - `RECOVERY_LINK_GENERATION_FAILED` (502) — the password-setup link could
|
|
651
|
+
* not be generated; nothing was sent.
|
|
652
|
+
* - `EMAIL_SEND_FAILED` / `EMAIL_SEND_FAILED_PERMANENT` (502),
|
|
653
|
+
* `EMAIL_SERVICE_UNAVAILABLE` (503) — delivery-side failures; the caller
|
|
654
|
+
* should surface "not delivered" and offer a resend (failed attempts do not
|
|
655
|
+
* consume the cooldown, so an immediate retry is accepted).
|
|
656
|
+
*/
|
|
657
|
+
interface FFIDProvisionWelcomeEmailResponse {
|
|
658
|
+
status: 'sent';
|
|
659
|
+
user: FFIDProvisionedUser;
|
|
660
|
+
}
|
|
628
661
|
/** A member to add to the provisioned organization. */
|
|
629
662
|
interface FFIDProvisionOrganizationMemberInput {
|
|
630
663
|
email: string;
|
|
@@ -1577,6 +1610,7 @@ declare function createFFIDClient(config: FFIDConfig): {
|
|
|
1577
1610
|
userId: string;
|
|
1578
1611
|
}) => Promise<FFIDApiResponse<FFIDRemoveMemberResponse>>;
|
|
1579
1612
|
provisionUser: (params: FFIDProvisionUserParams) => Promise<FFIDApiResponse<FFIDProvisionUserResponse>>;
|
|
1613
|
+
sendProvisionWelcomeEmail: (params: FFIDProvisionWelcomeEmailParams) => Promise<FFIDApiResponse<FFIDProvisionWelcomeEmailResponse>>;
|
|
1580
1614
|
provisionOrganization: (params: FFIDProvisionOrganizationParams) => Promise<FFIDApiResponse<FFIDProvisionOrganizationResponse>>;
|
|
1581
1615
|
getProfile: (options?: FFIDProfileCallOptions) => Promise<FFIDApiResponse<FFIDUserProfile>>;
|
|
1582
1616
|
updateProfile: (data: FFIDUpdateUserProfileRequest, options?: FFIDProfileCallOptions) => Promise<FFIDApiResponse<FFIDUserProfile>>;
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useFFIDContext, useSubscription } from './chunk-
|
|
2
|
-
export { ACCESS_GRANTING_EFFECTIVE_STATUSES, BLOCKING_EFFECTIVE_STATUSES, CATALOG_HASH_PATTERN, DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, EFFECTIVE_SUBSCRIPTION_STATUSES, FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDCatalogHashError, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDProvider, FFIDSDKError, FFIDSubscriptionBadge, FFIDUserMenu, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_CATALOG_ENVIRONMENTS, FFID_CATALOG_PUBLICATION_STATUSES, FFID_ERROR_CODES, FFID_INQUIRY_ACQUISITION_SOURCES, FFID_INQUIRY_CATEGORIES, FFID_INQUIRY_CATEGORIES_SITE_2026, canonicalizeCatalogValue, cleanupStateStorage as clearState, computeEffectiveStatusFromSession, computeFFIDCheckoutCopyHash, computeLegalDisclosureHash, computePaymentConfigurationHash, computePraxisCopyHash, computeScopeHash, computeTaxConfigurationHash, createFFIDAnnouncementsClient, createFFIDClient, createTokenStore, generateCodeChallenge, generateCodeVerifier, handleRedirectCallback, hasAccessFromUserinfo, hashCanonicalJson, isBlockedFromUserinfo, isFFIDInquiryAcquisitionSource, isFFIDInquiryCategorySite2026, normalizeRedirectUri, retrieveCodeVerifier, retrieveState, sha256Hex, storeCodeVerifier, storeState, useFFID, useFFIDAnnouncements, useSubscription, validatePublishedCatalog, withSubscription } from './chunk-
|
|
1
|
+
import { useFFIDContext, useSubscription } from './chunk-4E26AZIZ.js';
|
|
2
|
+
export { ACCESS_GRANTING_EFFECTIVE_STATUSES, BLOCKING_EFFECTIVE_STATUSES, CATALOG_HASH_PATTERN, DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, EFFECTIVE_SUBSCRIPTION_STATUSES, FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDCatalogHashError, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDProvider, FFIDSDKError, FFIDSubscriptionBadge, FFIDUserMenu, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_CATALOG_ENVIRONMENTS, FFID_CATALOG_PUBLICATION_STATUSES, FFID_ERROR_CODES, FFID_INQUIRY_ACQUISITION_SOURCES, FFID_INQUIRY_CATEGORIES, FFID_INQUIRY_CATEGORIES_SITE_2026, canonicalizeCatalogValue, cleanupStateStorage as clearState, computeEffectiveStatusFromSession, computeFFIDCheckoutCopyHash, computeLegalDisclosureHash, computePaymentConfigurationHash, computePraxisCopyHash, computeScopeHash, computeTaxConfigurationHash, createFFIDAnnouncementsClient, createFFIDClient, createTokenStore, generateCodeChallenge, generateCodeVerifier, handleRedirectCallback, hasAccessFromUserinfo, hashCanonicalJson, isBlockedFromUserinfo, isFFIDInquiryAcquisitionSource, isFFIDInquiryCategorySite2026, normalizeRedirectUri, retrieveCodeVerifier, retrieveState, sha256Hex, storeCodeVerifier, storeState, useFFID, useFFIDAnnouncements, useSubscription, validatePublishedCatalog, withSubscription } from './chunk-4E26AZIZ.js';
|
|
3
3
|
export { ALL_DENIED_EXCEPT_NECESSARY, CONSENT_COOKIE_NAME, CONSENT_DISMISSAL_TIMESTAMP_KEY, COOKIE_VERSION, DEFAULT_CONSENT_ERROR_MESSAGES, FFIDAnalyticsProvider, FFIDConsentError, FFIDCookieBanner, FFIDCookieLink, FFIDCookieSettings, FFID_CONSENT_ERROR_CODES, clearConsentDismissalTimestamp, decodeConsentCookie, encodeConsentCookie, readConsentCookie, readConsentDismissalTimestamp, useFFIDConsent, useFFIDConsentPreferences, writeConsentCookie, writeConsentDismissalTimestamp } from './chunk-G7VOX64X.js';
|
|
4
4
|
import { useEffect, useRef } from 'react';
|
|
5
5
|
import { jsx, Fragment } from 'react/jsx-runtime';
|
package/dist/server/index.cjs
CHANGED
|
@@ -1284,6 +1284,7 @@ function createMembersMethods(deps) {
|
|
|
1284
1284
|
|
|
1285
1285
|
// src/client/provisioning-methods.ts
|
|
1286
1286
|
var USER_PROVISION_ENDPOINT = "/api/v1/ext/users/provision";
|
|
1287
|
+
var USER_WELCOME_EMAIL_ENDPOINT = "/api/v1/ext/users/welcome-email";
|
|
1287
1288
|
var ORGANIZATION_PROVISION_ENDPOINT = "/api/v1/ext/organizations/provision";
|
|
1288
1289
|
var MAX_PROVISION_MEMBERS = 100;
|
|
1289
1290
|
var ASSIGNABLE_MEMBER_ROLES = {
|
|
@@ -1300,7 +1301,7 @@ function createProvisioningMethods(deps) {
|
|
|
1300
1301
|
if (authMode === "service-key") return null;
|
|
1301
1302
|
return createError(
|
|
1302
1303
|
"VALIDATION_ERROR",
|
|
1303
|
-
"provisionUser / provisionOrganization \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"
|
|
1304
|
+
"provisionUser / sendProvisionWelcomeEmail / provisionOrganization \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"
|
|
1304
1305
|
);
|
|
1305
1306
|
}
|
|
1306
1307
|
async function provisionUser(params) {
|
|
@@ -1317,6 +1318,17 @@ function createProvisioningMethods(deps) {
|
|
|
1317
1318
|
body: JSON.stringify(body)
|
|
1318
1319
|
});
|
|
1319
1320
|
}
|
|
1321
|
+
async function sendProvisionWelcomeEmail(params) {
|
|
1322
|
+
const modeError = serviceKeyModeError();
|
|
1323
|
+
if (modeError) return { error: modeError };
|
|
1324
|
+
if (!params.email || !params.email.trim()) {
|
|
1325
|
+
return { error: createError("VALIDATION_ERROR", "email \u306F\u5FC5\u9808\u3067\u3059") };
|
|
1326
|
+
}
|
|
1327
|
+
return fetchWithAuth(USER_WELCOME_EMAIL_ENDPOINT, {
|
|
1328
|
+
method: "POST",
|
|
1329
|
+
body: JSON.stringify({ email: params.email.trim() })
|
|
1330
|
+
});
|
|
1331
|
+
}
|
|
1320
1332
|
async function provisionOrganization(params) {
|
|
1321
1333
|
const modeError = serviceKeyModeError();
|
|
1322
1334
|
if (modeError) return { error: modeError };
|
|
@@ -1366,7 +1378,7 @@ function createProvisioningMethods(deps) {
|
|
|
1366
1378
|
body: JSON.stringify(body)
|
|
1367
1379
|
});
|
|
1368
1380
|
}
|
|
1369
|
-
return { provisionUser, provisionOrganization };
|
|
1381
|
+
return { provisionUser, sendProvisionWelcomeEmail, provisionOrganization };
|
|
1370
1382
|
}
|
|
1371
1383
|
|
|
1372
1384
|
// src/client/seat-methods.ts
|
|
@@ -1640,7 +1652,7 @@ function validateTokenResponse(tokenResponse) {
|
|
|
1640
1652
|
}
|
|
1641
1653
|
|
|
1642
1654
|
// src/client/version-check.ts
|
|
1643
|
-
var SDK_VERSION = "5.
|
|
1655
|
+
var SDK_VERSION = "5.30.0";
|
|
1644
1656
|
var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
|
|
1645
1657
|
var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
|
|
1646
1658
|
function sdkHeaders() {
|
|
@@ -3516,7 +3528,7 @@ function createFFIDClient(config) {
|
|
|
3516
3528
|
createError,
|
|
3517
3529
|
serviceCode: config.serviceCode
|
|
3518
3530
|
});
|
|
3519
|
-
const { provisionUser, provisionOrganization } = createProvisioningMethods({
|
|
3531
|
+
const { provisionUser, sendProvisionWelcomeEmail, provisionOrganization } = createProvisioningMethods({
|
|
3520
3532
|
fetchWithAuth,
|
|
3521
3533
|
createError,
|
|
3522
3534
|
authMode
|
|
@@ -3617,6 +3629,7 @@ function createFFIDClient(config) {
|
|
|
3617
3629
|
updateMemberRole,
|
|
3618
3630
|
removeMember,
|
|
3619
3631
|
provisionUser,
|
|
3632
|
+
sendProvisionWelcomeEmail,
|
|
3620
3633
|
provisionOrganization,
|
|
3621
3634
|
getProfile,
|
|
3622
3635
|
updateProfile,
|
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, f as FFIDCatalogEnvironment, g as FFIDBillingInterval, h as FFIDTaxBehavior, i as FFIDPublishedCatalog } from '../ffid-client-
|
|
2
|
-
export { j as FFIDAddMemberParams, k as FFIDAddMemberRequest, l as FFIDAddMemberResponse, m as FFIDAssignableMemberRole, n as FFIDCacheConfig, o as FFIDCatalogPublication, p as FFIDCatalogPublicationStatus, q as FFIDClient, r as FFIDConfig, s as FFIDListMembersResponse, t as FFIDMemberRole, u as FFIDOrganization, v as FFIDOrganizationMember, w as FFIDOtpSendResponse, x as FFIDOtpVerifyResponse, y as FFIDPasswordResetConfirmResponse, z as FFIDPasswordResetResponse, A as FFIDPasswordResetVerifyResponse, B as FFIDProfileCallOptions, C as FFIDProvisionMemberPlan, D as FFIDProvisionMemberPlanStatus, E as FFIDProvisionMemberResult, G as FFIDProvisionMemberStatus, H as FFIDProvisionOrganizationDryRun, I as FFIDProvisionOrganizationMemberInput, J as FFIDProvisionOrganizationOutcome, K as FFIDProvisionOrganizationParams, L as FFIDProvisionOrganizationResponse, M as FFIDProvisionUserDryRun, N as FFIDProvisionUserOutcome, O as FFIDProvisionUserParams, P as FFIDProvisionUserProfileInput, Q as FFIDProvisionUserResponse, R as FFIDProvisionedOrganization, S as FFIDProvisionedUser, T as FFIDPublishedPlan, U as FFIDRemoveMemberResponse, V as FFIDResetSessionResponse, W as FFIDSubscription, X as FFIDUpdateMemberRoleResponse, Y as FFIDUpdateUserProfileRequest, Z as FFIDUser, _ as FFIDUserProfile, $ as FFID_CATALOG_ENVIRONMENTS, a0 as FFID_CATALOG_PUBLICATION_STATUSES, a1 as TokenData, a2 as TokenStore, a3 as createFFIDClient, a4 as createTokenStore } from '../ffid-client-
|
|
1
|
+
import { F as FFIDLogger, a as FFIDError, b as FFIDCacheAdapter, c as FFIDVerifyAccessTokenOptions, d as FFIDApiResponse, e as FFIDOAuthUserInfo, f as FFIDCatalogEnvironment, g as FFIDBillingInterval, h as FFIDTaxBehavior, i as FFIDPublishedCatalog } from '../ffid-client-CEta_n9x.cjs';
|
|
2
|
+
export { j as FFIDAddMemberParams, k as FFIDAddMemberRequest, l as FFIDAddMemberResponse, m as FFIDAssignableMemberRole, n as FFIDCacheConfig, o as FFIDCatalogPublication, p as FFIDCatalogPublicationStatus, q as FFIDClient, r as FFIDConfig, s as FFIDListMembersResponse, t as FFIDMemberRole, u as FFIDOrganization, v as FFIDOrganizationMember, w as FFIDOtpSendResponse, x as FFIDOtpVerifyResponse, y as FFIDPasswordResetConfirmResponse, z as FFIDPasswordResetResponse, A as FFIDPasswordResetVerifyResponse, B as FFIDProfileCallOptions, C as FFIDProvisionMemberPlan, D as FFIDProvisionMemberPlanStatus, E as FFIDProvisionMemberResult, G as FFIDProvisionMemberStatus, H as FFIDProvisionOrganizationDryRun, I as FFIDProvisionOrganizationMemberInput, J as FFIDProvisionOrganizationOutcome, K as FFIDProvisionOrganizationParams, L as FFIDProvisionOrganizationResponse, M as FFIDProvisionUserDryRun, N as FFIDProvisionUserOutcome, O as FFIDProvisionUserParams, P as FFIDProvisionUserProfileInput, Q as FFIDProvisionUserResponse, R as FFIDProvisionedOrganization, S as FFIDProvisionedUser, T as FFIDPublishedPlan, U as FFIDRemoveMemberResponse, V as FFIDResetSessionResponse, W as FFIDSubscription, X as FFIDUpdateMemberRoleResponse, Y as FFIDUpdateUserProfileRequest, Z as FFIDUser, _ as FFIDUserProfile, $ as FFID_CATALOG_ENVIRONMENTS, a0 as FFID_CATALOG_PUBLICATION_STATUSES, a1 as TokenData, a2 as TokenStore, a3 as createFFIDClient, a4 as createTokenStore } from '../ffid-client-CEta_n9x.cjs';
|
|
3
3
|
export { D as DEFAULT_API_BASE_URL, a as DEFAULT_OAUTH_SCOPES } from '../constants-D61jqRIO.cjs';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
import '../types-Cjb9J0rL.cjs';
|
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, f as FFIDCatalogEnvironment, g as FFIDBillingInterval, h as FFIDTaxBehavior, i as FFIDPublishedCatalog } from '../ffid-client-
|
|
2
|
-
export { j as FFIDAddMemberParams, k as FFIDAddMemberRequest, l as FFIDAddMemberResponse, m as FFIDAssignableMemberRole, n as FFIDCacheConfig, o as FFIDCatalogPublication, p as FFIDCatalogPublicationStatus, q as FFIDClient, r as FFIDConfig, s as FFIDListMembersResponse, t as FFIDMemberRole, u as FFIDOrganization, v as FFIDOrganizationMember, w as FFIDOtpSendResponse, x as FFIDOtpVerifyResponse, y as FFIDPasswordResetConfirmResponse, z as FFIDPasswordResetResponse, A as FFIDPasswordResetVerifyResponse, B as FFIDProfileCallOptions, C as FFIDProvisionMemberPlan, D as FFIDProvisionMemberPlanStatus, E as FFIDProvisionMemberResult, G as FFIDProvisionMemberStatus, H as FFIDProvisionOrganizationDryRun, I as FFIDProvisionOrganizationMemberInput, J as FFIDProvisionOrganizationOutcome, K as FFIDProvisionOrganizationParams, L as FFIDProvisionOrganizationResponse, M as FFIDProvisionUserDryRun, N as FFIDProvisionUserOutcome, O as FFIDProvisionUserParams, P as FFIDProvisionUserProfileInput, Q as FFIDProvisionUserResponse, R as FFIDProvisionedOrganization, S as FFIDProvisionedUser, T as FFIDPublishedPlan, U as FFIDRemoveMemberResponse, V as FFIDResetSessionResponse, W as FFIDSubscription, X as FFIDUpdateMemberRoleResponse, Y as FFIDUpdateUserProfileRequest, Z as FFIDUser, _ as FFIDUserProfile, $ as FFID_CATALOG_ENVIRONMENTS, a0 as FFID_CATALOG_PUBLICATION_STATUSES, a1 as TokenData, a2 as TokenStore, a3 as createFFIDClient, a4 as createTokenStore } from '../ffid-client-
|
|
1
|
+
import { F as FFIDLogger, a as FFIDError, b as FFIDCacheAdapter, c as FFIDVerifyAccessTokenOptions, d as FFIDApiResponse, e as FFIDOAuthUserInfo, f as FFIDCatalogEnvironment, g as FFIDBillingInterval, h as FFIDTaxBehavior, i as FFIDPublishedCatalog } from '../ffid-client-MkXk4hun.js';
|
|
2
|
+
export { j as FFIDAddMemberParams, k as FFIDAddMemberRequest, l as FFIDAddMemberResponse, m as FFIDAssignableMemberRole, n as FFIDCacheConfig, o as FFIDCatalogPublication, p as FFIDCatalogPublicationStatus, q as FFIDClient, r as FFIDConfig, s as FFIDListMembersResponse, t as FFIDMemberRole, u as FFIDOrganization, v as FFIDOrganizationMember, w as FFIDOtpSendResponse, x as FFIDOtpVerifyResponse, y as FFIDPasswordResetConfirmResponse, z as FFIDPasswordResetResponse, A as FFIDPasswordResetVerifyResponse, B as FFIDProfileCallOptions, C as FFIDProvisionMemberPlan, D as FFIDProvisionMemberPlanStatus, E as FFIDProvisionMemberResult, G as FFIDProvisionMemberStatus, H as FFIDProvisionOrganizationDryRun, I as FFIDProvisionOrganizationMemberInput, J as FFIDProvisionOrganizationOutcome, K as FFIDProvisionOrganizationParams, L as FFIDProvisionOrganizationResponse, M as FFIDProvisionUserDryRun, N as FFIDProvisionUserOutcome, O as FFIDProvisionUserParams, P as FFIDProvisionUserProfileInput, Q as FFIDProvisionUserResponse, R as FFIDProvisionedOrganization, S as FFIDProvisionedUser, T as FFIDPublishedPlan, U as FFIDRemoveMemberResponse, V as FFIDResetSessionResponse, W as FFIDSubscription, X as FFIDUpdateMemberRoleResponse, Y as FFIDUpdateUserProfileRequest, Z as FFIDUser, _ as FFIDUserProfile, $ as FFID_CATALOG_ENVIRONMENTS, a0 as FFID_CATALOG_PUBLICATION_STATUSES, a1 as TokenData, a2 as TokenStore, a3 as createFFIDClient, a4 as createTokenStore } from '../ffid-client-MkXk4hun.js';
|
|
3
3
|
export { D as DEFAULT_API_BASE_URL, a as DEFAULT_OAUTH_SCOPES } from '../constants-D61jqRIO.js';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
import '../types-Cjb9J0rL.js';
|
package/dist/server/index.js
CHANGED
|
@@ -1283,6 +1283,7 @@ function createMembersMethods(deps) {
|
|
|
1283
1283
|
|
|
1284
1284
|
// src/client/provisioning-methods.ts
|
|
1285
1285
|
var USER_PROVISION_ENDPOINT = "/api/v1/ext/users/provision";
|
|
1286
|
+
var USER_WELCOME_EMAIL_ENDPOINT = "/api/v1/ext/users/welcome-email";
|
|
1286
1287
|
var ORGANIZATION_PROVISION_ENDPOINT = "/api/v1/ext/organizations/provision";
|
|
1287
1288
|
var MAX_PROVISION_MEMBERS = 100;
|
|
1288
1289
|
var ASSIGNABLE_MEMBER_ROLES = {
|
|
@@ -1299,7 +1300,7 @@ function createProvisioningMethods(deps) {
|
|
|
1299
1300
|
if (authMode === "service-key") return null;
|
|
1300
1301
|
return createError(
|
|
1301
1302
|
"VALIDATION_ERROR",
|
|
1302
|
-
"provisionUser / provisionOrganization \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"
|
|
1303
|
+
"provisionUser / sendProvisionWelcomeEmail / provisionOrganization \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"
|
|
1303
1304
|
);
|
|
1304
1305
|
}
|
|
1305
1306
|
async function provisionUser(params) {
|
|
@@ -1316,6 +1317,17 @@ function createProvisioningMethods(deps) {
|
|
|
1316
1317
|
body: JSON.stringify(body)
|
|
1317
1318
|
});
|
|
1318
1319
|
}
|
|
1320
|
+
async function sendProvisionWelcomeEmail(params) {
|
|
1321
|
+
const modeError = serviceKeyModeError();
|
|
1322
|
+
if (modeError) return { error: modeError };
|
|
1323
|
+
if (!params.email || !params.email.trim()) {
|
|
1324
|
+
return { error: createError("VALIDATION_ERROR", "email \u306F\u5FC5\u9808\u3067\u3059") };
|
|
1325
|
+
}
|
|
1326
|
+
return fetchWithAuth(USER_WELCOME_EMAIL_ENDPOINT, {
|
|
1327
|
+
method: "POST",
|
|
1328
|
+
body: JSON.stringify({ email: params.email.trim() })
|
|
1329
|
+
});
|
|
1330
|
+
}
|
|
1319
1331
|
async function provisionOrganization(params) {
|
|
1320
1332
|
const modeError = serviceKeyModeError();
|
|
1321
1333
|
if (modeError) return { error: modeError };
|
|
@@ -1365,7 +1377,7 @@ function createProvisioningMethods(deps) {
|
|
|
1365
1377
|
body: JSON.stringify(body)
|
|
1366
1378
|
});
|
|
1367
1379
|
}
|
|
1368
|
-
return { provisionUser, provisionOrganization };
|
|
1380
|
+
return { provisionUser, sendProvisionWelcomeEmail, provisionOrganization };
|
|
1369
1381
|
}
|
|
1370
1382
|
|
|
1371
1383
|
// src/client/seat-methods.ts
|
|
@@ -1639,7 +1651,7 @@ function validateTokenResponse(tokenResponse) {
|
|
|
1639
1651
|
}
|
|
1640
1652
|
|
|
1641
1653
|
// src/client/version-check.ts
|
|
1642
|
-
var SDK_VERSION = "5.
|
|
1654
|
+
var SDK_VERSION = "5.30.0";
|
|
1643
1655
|
var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
|
|
1644
1656
|
var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
|
|
1645
1657
|
function sdkHeaders() {
|
|
@@ -3515,7 +3527,7 @@ function createFFIDClient(config) {
|
|
|
3515
3527
|
createError,
|
|
3516
3528
|
serviceCode: config.serviceCode
|
|
3517
3529
|
});
|
|
3518
|
-
const { provisionUser, provisionOrganization } = createProvisioningMethods({
|
|
3530
|
+
const { provisionUser, sendProvisionWelcomeEmail, provisionOrganization } = createProvisioningMethods({
|
|
3519
3531
|
fetchWithAuth,
|
|
3520
3532
|
createError,
|
|
3521
3533
|
authMode
|
|
@@ -3616,6 +3628,7 @@ function createFFIDClient(config) {
|
|
|
3616
3628
|
updateMemberRole,
|
|
3617
3629
|
removeMember,
|
|
3618
3630
|
provisionUser,
|
|
3631
|
+
sendProvisionWelcomeEmail,
|
|
3619
3632
|
provisionOrganization,
|
|
3620
3633
|
getProfile,
|
|
3621
3634
|
updateProfile,
|