@feelflow/ffid-sdk 2.3.0 → 2.4.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-KXX5RZKI.cjs → chunk-CECTOY4A.cjs} +7 -4
- package/dist/{chunk-W4FW7Z3F.js → chunk-VJHI6RQQ.js} +7 -4
- package/dist/components/index.cjs +7 -7
- package/dist/components/index.js +1 -1
- package/dist/index.cjs +22 -22
- package/dist/index.d.cts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +2 -2
- package/dist/server/index.cjs +7 -4
- package/dist/server/index.d.cts +6 -0
- package/dist/server/index.d.ts +6 -0
- package/dist/server/index.js +7 -4
- package/package.json +1 -1
|
@@ -600,7 +600,7 @@ function createMembersMethods(deps) {
|
|
|
600
600
|
}
|
|
601
601
|
|
|
602
602
|
// src/client/version-check.ts
|
|
603
|
-
var SDK_VERSION = "2.
|
|
603
|
+
var SDK_VERSION = "2.4.0";
|
|
604
604
|
var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
|
|
605
605
|
var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
|
|
606
606
|
function sdkHeaders() {
|
|
@@ -1488,13 +1488,15 @@ function createContractWizardMethods(deps) {
|
|
|
1488
1488
|
return buildWizardUrl(baseUrl, flow, {
|
|
1489
1489
|
service: serviceCode,
|
|
1490
1490
|
subscription: subscriptionId,
|
|
1491
|
-
redirect: options?.redirect
|
|
1491
|
+
redirect: options?.redirect,
|
|
1492
|
+
org: options?.organizationId
|
|
1492
1493
|
});
|
|
1493
1494
|
}
|
|
1494
1495
|
function getSubscribeUrl(options) {
|
|
1495
1496
|
return buildWizardUrl(baseUrl, "new-subscription", {
|
|
1496
1497
|
service: serviceCode,
|
|
1497
|
-
redirect: options?.redirect
|
|
1498
|
+
redirect: options?.redirect,
|
|
1499
|
+
org: options?.organizationId
|
|
1498
1500
|
});
|
|
1499
1501
|
}
|
|
1500
1502
|
function redirectToSubscribe(options) {
|
|
@@ -1521,7 +1523,8 @@ function createContractWizardMethods(deps) {
|
|
|
1521
1523
|
function getResubscribeUrl(options) {
|
|
1522
1524
|
return buildWizardUrl(baseUrl, "resubscribe", {
|
|
1523
1525
|
service: options?.serviceCode ?? serviceCode,
|
|
1524
|
-
redirect: options?.redirect
|
|
1526
|
+
redirect: options?.redirect,
|
|
1527
|
+
org: options?.organizationId
|
|
1525
1528
|
});
|
|
1526
1529
|
}
|
|
1527
1530
|
function redirectToResubscribe(options) {
|
|
@@ -598,7 +598,7 @@ function createMembersMethods(deps) {
|
|
|
598
598
|
}
|
|
599
599
|
|
|
600
600
|
// src/client/version-check.ts
|
|
601
|
-
var SDK_VERSION = "2.
|
|
601
|
+
var SDK_VERSION = "2.4.0";
|
|
602
602
|
var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
|
|
603
603
|
var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
|
|
604
604
|
function sdkHeaders() {
|
|
@@ -1486,13 +1486,15 @@ function createContractWizardMethods(deps) {
|
|
|
1486
1486
|
return buildWizardUrl(baseUrl, flow, {
|
|
1487
1487
|
service: serviceCode,
|
|
1488
1488
|
subscription: subscriptionId,
|
|
1489
|
-
redirect: options?.redirect
|
|
1489
|
+
redirect: options?.redirect,
|
|
1490
|
+
org: options?.organizationId
|
|
1490
1491
|
});
|
|
1491
1492
|
}
|
|
1492
1493
|
function getSubscribeUrl(options) {
|
|
1493
1494
|
return buildWizardUrl(baseUrl, "new-subscription", {
|
|
1494
1495
|
service: serviceCode,
|
|
1495
|
-
redirect: options?.redirect
|
|
1496
|
+
redirect: options?.redirect,
|
|
1497
|
+
org: options?.organizationId
|
|
1496
1498
|
});
|
|
1497
1499
|
}
|
|
1498
1500
|
function redirectToSubscribe(options) {
|
|
@@ -1519,7 +1521,8 @@ function createContractWizardMethods(deps) {
|
|
|
1519
1521
|
function getResubscribeUrl(options) {
|
|
1520
1522
|
return buildWizardUrl(baseUrl, "resubscribe", {
|
|
1521
1523
|
service: options?.serviceCode ?? serviceCode,
|
|
1522
|
-
redirect: options?.redirect
|
|
1524
|
+
redirect: options?.redirect,
|
|
1525
|
+
org: options?.organizationId
|
|
1523
1526
|
});
|
|
1524
1527
|
}
|
|
1525
1528
|
function redirectToResubscribe(options) {
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkCECTOY4A_cjs = require('../chunk-CECTOY4A.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 chunkCECTOY4A_cjs.FFIDAnnouncementBadge; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "FFIDAnnouncementList", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkCECTOY4A_cjs.FFIDAnnouncementList; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "FFIDLoginButton", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkCECTOY4A_cjs.FFIDLoginButton; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "FFIDOrganizationSwitcher", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkCECTOY4A_cjs.FFIDOrganizationSwitcher; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "FFIDSubscriptionBadge", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkCECTOY4A_cjs.FFIDSubscriptionBadge; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "FFIDUserMenu", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkCECTOY4A_cjs.FFIDUserMenu; }
|
|
30
30
|
});
|
package/dist/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDSubscriptionBadge, FFIDUserMenu } from '../chunk-
|
|
1
|
+
export { FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDSubscriptionBadge, FFIDUserMenu } from '../chunk-VJHI6RQQ.js';
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkCECTOY4A_cjs = require('./chunk-CECTOY4A.cjs');
|
|
4
4
|
var react = require('react');
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
|
|
@@ -46,7 +46,7 @@ function createKVCacheAdapter(kv) {
|
|
|
46
46
|
}
|
|
47
47
|
function withFFIDAuth(Component, options = {}) {
|
|
48
48
|
const WrappedComponent = (props) => {
|
|
49
|
-
const { isLoading, isAuthenticated, login } =
|
|
49
|
+
const { isLoading, isAuthenticated, login } = chunkCECTOY4A_cjs.useFFIDContext();
|
|
50
50
|
const hasRedirected = react.useRef(false);
|
|
51
51
|
react.useEffect(() => {
|
|
52
52
|
if (!isLoading && !isAuthenticated && options.redirectToLogin && !hasRedirected.current) {
|
|
@@ -71,83 +71,83 @@ function withFFIDAuth(Component, options = {}) {
|
|
|
71
71
|
|
|
72
72
|
Object.defineProperty(exports, "DEFAULT_API_BASE_URL", {
|
|
73
73
|
enumerable: true,
|
|
74
|
-
get: function () { return
|
|
74
|
+
get: function () { return chunkCECTOY4A_cjs.DEFAULT_API_BASE_URL; }
|
|
75
75
|
});
|
|
76
76
|
Object.defineProperty(exports, "FFIDAnnouncementBadge", {
|
|
77
77
|
enumerable: true,
|
|
78
|
-
get: function () { return
|
|
78
|
+
get: function () { return chunkCECTOY4A_cjs.FFIDAnnouncementBadge; }
|
|
79
79
|
});
|
|
80
80
|
Object.defineProperty(exports, "FFIDAnnouncementList", {
|
|
81
81
|
enumerable: true,
|
|
82
|
-
get: function () { return
|
|
82
|
+
get: function () { return chunkCECTOY4A_cjs.FFIDAnnouncementList; }
|
|
83
83
|
});
|
|
84
84
|
Object.defineProperty(exports, "FFIDLoginButton", {
|
|
85
85
|
enumerable: true,
|
|
86
|
-
get: function () { return
|
|
86
|
+
get: function () { return chunkCECTOY4A_cjs.FFIDLoginButton; }
|
|
87
87
|
});
|
|
88
88
|
Object.defineProperty(exports, "FFIDOrganizationSwitcher", {
|
|
89
89
|
enumerable: true,
|
|
90
|
-
get: function () { return
|
|
90
|
+
get: function () { return chunkCECTOY4A_cjs.FFIDOrganizationSwitcher; }
|
|
91
91
|
});
|
|
92
92
|
Object.defineProperty(exports, "FFIDProvider", {
|
|
93
93
|
enumerable: true,
|
|
94
|
-
get: function () { return
|
|
94
|
+
get: function () { return chunkCECTOY4A_cjs.FFIDProvider; }
|
|
95
95
|
});
|
|
96
96
|
Object.defineProperty(exports, "FFIDSubscriptionBadge", {
|
|
97
97
|
enumerable: true,
|
|
98
|
-
get: function () { return
|
|
98
|
+
get: function () { return chunkCECTOY4A_cjs.FFIDSubscriptionBadge; }
|
|
99
99
|
});
|
|
100
100
|
Object.defineProperty(exports, "FFIDUserMenu", {
|
|
101
101
|
enumerable: true,
|
|
102
|
-
get: function () { return
|
|
102
|
+
get: function () { return chunkCECTOY4A_cjs.FFIDUserMenu; }
|
|
103
103
|
});
|
|
104
104
|
Object.defineProperty(exports, "FFID_ANNOUNCEMENTS_ERROR_CODES", {
|
|
105
105
|
enumerable: true,
|
|
106
|
-
get: function () { return
|
|
106
|
+
get: function () { return chunkCECTOY4A_cjs.FFID_ANNOUNCEMENTS_ERROR_CODES; }
|
|
107
107
|
});
|
|
108
108
|
Object.defineProperty(exports, "createFFIDAnnouncementsClient", {
|
|
109
109
|
enumerable: true,
|
|
110
|
-
get: function () { return
|
|
110
|
+
get: function () { return chunkCECTOY4A_cjs.createFFIDAnnouncementsClient; }
|
|
111
111
|
});
|
|
112
112
|
Object.defineProperty(exports, "createFFIDClient", {
|
|
113
113
|
enumerable: true,
|
|
114
|
-
get: function () { return
|
|
114
|
+
get: function () { return chunkCECTOY4A_cjs.createFFIDClient; }
|
|
115
115
|
});
|
|
116
116
|
Object.defineProperty(exports, "createTokenStore", {
|
|
117
117
|
enumerable: true,
|
|
118
|
-
get: function () { return
|
|
118
|
+
get: function () { return chunkCECTOY4A_cjs.createTokenStore; }
|
|
119
119
|
});
|
|
120
120
|
Object.defineProperty(exports, "generateCodeChallenge", {
|
|
121
121
|
enumerable: true,
|
|
122
|
-
get: function () { return
|
|
122
|
+
get: function () { return chunkCECTOY4A_cjs.generateCodeChallenge; }
|
|
123
123
|
});
|
|
124
124
|
Object.defineProperty(exports, "generateCodeVerifier", {
|
|
125
125
|
enumerable: true,
|
|
126
|
-
get: function () { return
|
|
126
|
+
get: function () { return chunkCECTOY4A_cjs.generateCodeVerifier; }
|
|
127
127
|
});
|
|
128
128
|
Object.defineProperty(exports, "retrieveCodeVerifier", {
|
|
129
129
|
enumerable: true,
|
|
130
|
-
get: function () { return
|
|
130
|
+
get: function () { return chunkCECTOY4A_cjs.retrieveCodeVerifier; }
|
|
131
131
|
});
|
|
132
132
|
Object.defineProperty(exports, "storeCodeVerifier", {
|
|
133
133
|
enumerable: true,
|
|
134
|
-
get: function () { return
|
|
134
|
+
get: function () { return chunkCECTOY4A_cjs.storeCodeVerifier; }
|
|
135
135
|
});
|
|
136
136
|
Object.defineProperty(exports, "useFFID", {
|
|
137
137
|
enumerable: true,
|
|
138
|
-
get: function () { return
|
|
138
|
+
get: function () { return chunkCECTOY4A_cjs.useFFID; }
|
|
139
139
|
});
|
|
140
140
|
Object.defineProperty(exports, "useFFIDAnnouncements", {
|
|
141
141
|
enumerable: true,
|
|
142
|
-
get: function () { return
|
|
142
|
+
get: function () { return chunkCECTOY4A_cjs.useFFIDAnnouncements; }
|
|
143
143
|
});
|
|
144
144
|
Object.defineProperty(exports, "useSubscription", {
|
|
145
145
|
enumerable: true,
|
|
146
|
-
get: function () { return
|
|
146
|
+
get: function () { return chunkCECTOY4A_cjs.useSubscription; }
|
|
147
147
|
});
|
|
148
148
|
Object.defineProperty(exports, "withSubscription", {
|
|
149
149
|
enumerable: true,
|
|
150
|
-
get: function () { return
|
|
150
|
+
get: function () { return chunkCECTOY4A_cjs.withSubscription; }
|
|
151
151
|
});
|
|
152
152
|
exports.createKVCacheAdapter = createKVCacheAdapter;
|
|
153
153
|
exports.createMemoryCacheAdapter = createMemoryCacheAdapter;
|
package/dist/index.d.cts
CHANGED
|
@@ -339,6 +339,8 @@ type ContractWizardFlowType = 'new-subscription' | 'resubscribe' | 'change-plan'
|
|
|
339
339
|
interface ContractWizardSubscribeOptions {
|
|
340
340
|
/** URL to redirect back to after completion */
|
|
341
341
|
redirect?: string;
|
|
342
|
+
/** Organization ID — passed as ?org= so middleware auto-sets the org cookie */
|
|
343
|
+
organizationId?: string;
|
|
342
344
|
}
|
|
343
345
|
/** Options for the resubscribe wizard flow */
|
|
344
346
|
interface ContractWizardResubscribeOptions {
|
|
@@ -346,11 +348,15 @@ interface ContractWizardResubscribeOptions {
|
|
|
346
348
|
serviceCode?: string;
|
|
347
349
|
/** URL to redirect back to after completion */
|
|
348
350
|
redirect?: string;
|
|
351
|
+
/** Organization ID — passed as ?org= so middleware auto-sets the org cookie */
|
|
352
|
+
organizationId?: string;
|
|
349
353
|
}
|
|
350
354
|
/** Options for wizard flows that operate on an existing subscription */
|
|
351
355
|
interface ContractWizardSubscriptionOptions {
|
|
352
356
|
/** URL to redirect back to after completion */
|
|
353
357
|
redirect?: string;
|
|
358
|
+
/** Organization ID — passed as ?org= so middleware auto-sets the org cookie */
|
|
359
|
+
organizationId?: string;
|
|
354
360
|
}
|
|
355
361
|
|
|
356
362
|
/** Redirect and URL generation - redirectToLogin / redirectToAuthorize / redirectToLogout / getLoginUrl / getSignupUrl / getLogoutUrl */
|
package/dist/index.d.ts
CHANGED
|
@@ -339,6 +339,8 @@ type ContractWizardFlowType = 'new-subscription' | 'resubscribe' | 'change-plan'
|
|
|
339
339
|
interface ContractWizardSubscribeOptions {
|
|
340
340
|
/** URL to redirect back to after completion */
|
|
341
341
|
redirect?: string;
|
|
342
|
+
/** Organization ID — passed as ?org= so middleware auto-sets the org cookie */
|
|
343
|
+
organizationId?: string;
|
|
342
344
|
}
|
|
343
345
|
/** Options for the resubscribe wizard flow */
|
|
344
346
|
interface ContractWizardResubscribeOptions {
|
|
@@ -346,11 +348,15 @@ interface ContractWizardResubscribeOptions {
|
|
|
346
348
|
serviceCode?: string;
|
|
347
349
|
/** URL to redirect back to after completion */
|
|
348
350
|
redirect?: string;
|
|
351
|
+
/** Organization ID — passed as ?org= so middleware auto-sets the org cookie */
|
|
352
|
+
organizationId?: string;
|
|
349
353
|
}
|
|
350
354
|
/** Options for wizard flows that operate on an existing subscription */
|
|
351
355
|
interface ContractWizardSubscriptionOptions {
|
|
352
356
|
/** URL to redirect back to after completion */
|
|
353
357
|
redirect?: string;
|
|
358
|
+
/** Organization ID — passed as ?org= so middleware auto-sets the org cookie */
|
|
359
|
+
organizationId?: string;
|
|
354
360
|
}
|
|
355
361
|
|
|
356
362
|
/** Redirect and URL generation - redirectToLogin / redirectToAuthorize / redirectToLogout / getLoginUrl / getSignupUrl / getLogoutUrl */
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useFFIDContext } from './chunk-
|
|
2
|
-
export { DEFAULT_API_BASE_URL, FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDProvider, FFIDSubscriptionBadge, FFIDUserMenu, FFID_ANNOUNCEMENTS_ERROR_CODES, createFFIDAnnouncementsClient, createFFIDClient, createTokenStore, generateCodeChallenge, generateCodeVerifier, retrieveCodeVerifier, storeCodeVerifier, useFFID, useFFIDAnnouncements, useSubscription, withSubscription } from './chunk-
|
|
1
|
+
import { useFFIDContext } from './chunk-VJHI6RQQ.js';
|
|
2
|
+
export { DEFAULT_API_BASE_URL, FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDProvider, FFIDSubscriptionBadge, FFIDUserMenu, FFID_ANNOUNCEMENTS_ERROR_CODES, createFFIDAnnouncementsClient, createFFIDClient, createTokenStore, generateCodeChallenge, generateCodeVerifier, retrieveCodeVerifier, storeCodeVerifier, useFFID, useFFIDAnnouncements, useSubscription, withSubscription } from './chunk-VJHI6RQQ.js';
|
|
3
3
|
import { useRef, useEffect } from 'react';
|
|
4
4
|
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
|
package/dist/server/index.cjs
CHANGED
|
@@ -596,7 +596,7 @@ function createMembersMethods(deps) {
|
|
|
596
596
|
}
|
|
597
597
|
|
|
598
598
|
// src/client/version-check.ts
|
|
599
|
-
var SDK_VERSION = "2.
|
|
599
|
+
var SDK_VERSION = "2.4.0";
|
|
600
600
|
var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
|
|
601
601
|
var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
|
|
602
602
|
function sdkHeaders() {
|
|
@@ -1471,13 +1471,15 @@ function createContractWizardMethods(deps) {
|
|
|
1471
1471
|
return buildWizardUrl(baseUrl, flow, {
|
|
1472
1472
|
service: serviceCode,
|
|
1473
1473
|
subscription: subscriptionId,
|
|
1474
|
-
redirect: options?.redirect
|
|
1474
|
+
redirect: options?.redirect,
|
|
1475
|
+
org: options?.organizationId
|
|
1475
1476
|
});
|
|
1476
1477
|
}
|
|
1477
1478
|
function getSubscribeUrl(options) {
|
|
1478
1479
|
return buildWizardUrl(baseUrl, "new-subscription", {
|
|
1479
1480
|
service: serviceCode,
|
|
1480
|
-
redirect: options?.redirect
|
|
1481
|
+
redirect: options?.redirect,
|
|
1482
|
+
org: options?.organizationId
|
|
1481
1483
|
});
|
|
1482
1484
|
}
|
|
1483
1485
|
function redirectToSubscribe(options) {
|
|
@@ -1504,7 +1506,8 @@ function createContractWizardMethods(deps) {
|
|
|
1504
1506
|
function getResubscribeUrl(options) {
|
|
1505
1507
|
return buildWizardUrl(baseUrl, "resubscribe", {
|
|
1506
1508
|
service: options?.serviceCode ?? serviceCode,
|
|
1507
|
-
redirect: options?.redirect
|
|
1509
|
+
redirect: options?.redirect,
|
|
1510
|
+
org: options?.organizationId
|
|
1508
1511
|
});
|
|
1509
1512
|
}
|
|
1510
1513
|
function redirectToResubscribe(options) {
|
package/dist/server/index.d.cts
CHANGED
|
@@ -602,6 +602,8 @@ type FFIDPasswordResetConfirmResponse = FFIDPasswordResetResponse;
|
|
|
602
602
|
interface ContractWizardSubscribeOptions {
|
|
603
603
|
/** URL to redirect back to after completion */
|
|
604
604
|
redirect?: string;
|
|
605
|
+
/** Organization ID — passed as ?org= so middleware auto-sets the org cookie */
|
|
606
|
+
organizationId?: string;
|
|
605
607
|
}
|
|
606
608
|
/** Options for the resubscribe wizard flow */
|
|
607
609
|
interface ContractWizardResubscribeOptions {
|
|
@@ -609,11 +611,15 @@ interface ContractWizardResubscribeOptions {
|
|
|
609
611
|
serviceCode?: string;
|
|
610
612
|
/** URL to redirect back to after completion */
|
|
611
613
|
redirect?: string;
|
|
614
|
+
/** Organization ID — passed as ?org= so middleware auto-sets the org cookie */
|
|
615
|
+
organizationId?: string;
|
|
612
616
|
}
|
|
613
617
|
/** Options for wizard flows that operate on an existing subscription */
|
|
614
618
|
interface ContractWizardSubscriptionOptions {
|
|
615
619
|
/** URL to redirect back to after completion */
|
|
616
620
|
redirect?: string;
|
|
621
|
+
/** Organization ID — passed as ?org= so middleware auto-sets the org cookie */
|
|
622
|
+
organizationId?: string;
|
|
617
623
|
}
|
|
618
624
|
|
|
619
625
|
/** Redirect and URL generation - redirectToLogin / redirectToAuthorize / redirectToLogout / getLoginUrl / getSignupUrl / getLogoutUrl */
|
package/dist/server/index.d.ts
CHANGED
|
@@ -602,6 +602,8 @@ type FFIDPasswordResetConfirmResponse = FFIDPasswordResetResponse;
|
|
|
602
602
|
interface ContractWizardSubscribeOptions {
|
|
603
603
|
/** URL to redirect back to after completion */
|
|
604
604
|
redirect?: string;
|
|
605
|
+
/** Organization ID — passed as ?org= so middleware auto-sets the org cookie */
|
|
606
|
+
organizationId?: string;
|
|
605
607
|
}
|
|
606
608
|
/** Options for the resubscribe wizard flow */
|
|
607
609
|
interface ContractWizardResubscribeOptions {
|
|
@@ -609,11 +611,15 @@ interface ContractWizardResubscribeOptions {
|
|
|
609
611
|
serviceCode?: string;
|
|
610
612
|
/** URL to redirect back to after completion */
|
|
611
613
|
redirect?: string;
|
|
614
|
+
/** Organization ID — passed as ?org= so middleware auto-sets the org cookie */
|
|
615
|
+
organizationId?: string;
|
|
612
616
|
}
|
|
613
617
|
/** Options for wizard flows that operate on an existing subscription */
|
|
614
618
|
interface ContractWizardSubscriptionOptions {
|
|
615
619
|
/** URL to redirect back to after completion */
|
|
616
620
|
redirect?: string;
|
|
621
|
+
/** Organization ID — passed as ?org= so middleware auto-sets the org cookie */
|
|
622
|
+
organizationId?: string;
|
|
617
623
|
}
|
|
618
624
|
|
|
619
625
|
/** Redirect and URL generation - redirectToLogin / redirectToAuthorize / redirectToLogout / getLoginUrl / getSignupUrl / getLogoutUrl */
|
package/dist/server/index.js
CHANGED
|
@@ -595,7 +595,7 @@ function createMembersMethods(deps) {
|
|
|
595
595
|
}
|
|
596
596
|
|
|
597
597
|
// src/client/version-check.ts
|
|
598
|
-
var SDK_VERSION = "2.
|
|
598
|
+
var SDK_VERSION = "2.4.0";
|
|
599
599
|
var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
|
|
600
600
|
var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
|
|
601
601
|
function sdkHeaders() {
|
|
@@ -1470,13 +1470,15 @@ function createContractWizardMethods(deps) {
|
|
|
1470
1470
|
return buildWizardUrl(baseUrl, flow, {
|
|
1471
1471
|
service: serviceCode,
|
|
1472
1472
|
subscription: subscriptionId,
|
|
1473
|
-
redirect: options?.redirect
|
|
1473
|
+
redirect: options?.redirect,
|
|
1474
|
+
org: options?.organizationId
|
|
1474
1475
|
});
|
|
1475
1476
|
}
|
|
1476
1477
|
function getSubscribeUrl(options) {
|
|
1477
1478
|
return buildWizardUrl(baseUrl, "new-subscription", {
|
|
1478
1479
|
service: serviceCode,
|
|
1479
|
-
redirect: options?.redirect
|
|
1480
|
+
redirect: options?.redirect,
|
|
1481
|
+
org: options?.organizationId
|
|
1480
1482
|
});
|
|
1481
1483
|
}
|
|
1482
1484
|
function redirectToSubscribe(options) {
|
|
@@ -1503,7 +1505,8 @@ function createContractWizardMethods(deps) {
|
|
|
1503
1505
|
function getResubscribeUrl(options) {
|
|
1504
1506
|
return buildWizardUrl(baseUrl, "resubscribe", {
|
|
1505
1507
|
service: options?.serviceCode ?? serviceCode,
|
|
1506
|
-
redirect: options?.redirect
|
|
1508
|
+
redirect: options?.redirect,
|
|
1509
|
+
org: options?.organizationId
|
|
1507
1510
|
});
|
|
1508
1511
|
}
|
|
1509
1512
|
function redirectToResubscribe(options) {
|