@feelflow/ffid-sdk 2.1.0 → 2.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/dist/{chunk-C6Z4JPYE.cjs → chunk-KXX5RZKI.cjs} +1 -1
- package/dist/{chunk-NHVOLBE5.js → chunk-W4FW7Z3F.js} +1 -1
- 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 +14 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +2 -2
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.d.cts +14 -0
- package/dist/server/index.d.ts +14 -0
- package/dist/server/index.js +1 -1
- package/dist/webhooks/index.d.cts +1 -0
- package/dist/webhooks/index.d.ts +1 -0
- 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.3.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() {
|
|
@@ -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.3.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() {
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkKXX5RZKI_cjs = require('../chunk-KXX5RZKI.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 chunkKXX5RZKI_cjs.FFIDAnnouncementBadge; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "FFIDAnnouncementList", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkKXX5RZKI_cjs.FFIDAnnouncementList; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "FFIDLoginButton", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkKXX5RZKI_cjs.FFIDLoginButton; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "FFIDOrganizationSwitcher", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkKXX5RZKI_cjs.FFIDOrganizationSwitcher; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "FFIDSubscriptionBadge", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkKXX5RZKI_cjs.FFIDSubscriptionBadge; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "FFIDUserMenu", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkKXX5RZKI_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-W4FW7Z3F.js';
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkKXX5RZKI_cjs = require('./chunk-KXX5RZKI.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 } = chunkKXX5RZKI_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 chunkKXX5RZKI_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 chunkKXX5RZKI_cjs.FFIDAnnouncementBadge; }
|
|
79
79
|
});
|
|
80
80
|
Object.defineProperty(exports, "FFIDAnnouncementList", {
|
|
81
81
|
enumerable: true,
|
|
82
|
-
get: function () { return
|
|
82
|
+
get: function () { return chunkKXX5RZKI_cjs.FFIDAnnouncementList; }
|
|
83
83
|
});
|
|
84
84
|
Object.defineProperty(exports, "FFIDLoginButton", {
|
|
85
85
|
enumerable: true,
|
|
86
|
-
get: function () { return
|
|
86
|
+
get: function () { return chunkKXX5RZKI_cjs.FFIDLoginButton; }
|
|
87
87
|
});
|
|
88
88
|
Object.defineProperty(exports, "FFIDOrganizationSwitcher", {
|
|
89
89
|
enumerable: true,
|
|
90
|
-
get: function () { return
|
|
90
|
+
get: function () { return chunkKXX5RZKI_cjs.FFIDOrganizationSwitcher; }
|
|
91
91
|
});
|
|
92
92
|
Object.defineProperty(exports, "FFIDProvider", {
|
|
93
93
|
enumerable: true,
|
|
94
|
-
get: function () { return
|
|
94
|
+
get: function () { return chunkKXX5RZKI_cjs.FFIDProvider; }
|
|
95
95
|
});
|
|
96
96
|
Object.defineProperty(exports, "FFIDSubscriptionBadge", {
|
|
97
97
|
enumerable: true,
|
|
98
|
-
get: function () { return
|
|
98
|
+
get: function () { return chunkKXX5RZKI_cjs.FFIDSubscriptionBadge; }
|
|
99
99
|
});
|
|
100
100
|
Object.defineProperty(exports, "FFIDUserMenu", {
|
|
101
101
|
enumerable: true,
|
|
102
|
-
get: function () { return
|
|
102
|
+
get: function () { return chunkKXX5RZKI_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 chunkKXX5RZKI_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 chunkKXX5RZKI_cjs.createFFIDAnnouncementsClient; }
|
|
111
111
|
});
|
|
112
112
|
Object.defineProperty(exports, "createFFIDClient", {
|
|
113
113
|
enumerable: true,
|
|
114
|
-
get: function () { return
|
|
114
|
+
get: function () { return chunkKXX5RZKI_cjs.createFFIDClient; }
|
|
115
115
|
});
|
|
116
116
|
Object.defineProperty(exports, "createTokenStore", {
|
|
117
117
|
enumerable: true,
|
|
118
|
-
get: function () { return
|
|
118
|
+
get: function () { return chunkKXX5RZKI_cjs.createTokenStore; }
|
|
119
119
|
});
|
|
120
120
|
Object.defineProperty(exports, "generateCodeChallenge", {
|
|
121
121
|
enumerable: true,
|
|
122
|
-
get: function () { return
|
|
122
|
+
get: function () { return chunkKXX5RZKI_cjs.generateCodeChallenge; }
|
|
123
123
|
});
|
|
124
124
|
Object.defineProperty(exports, "generateCodeVerifier", {
|
|
125
125
|
enumerable: true,
|
|
126
|
-
get: function () { return
|
|
126
|
+
get: function () { return chunkKXX5RZKI_cjs.generateCodeVerifier; }
|
|
127
127
|
});
|
|
128
128
|
Object.defineProperty(exports, "retrieveCodeVerifier", {
|
|
129
129
|
enumerable: true,
|
|
130
|
-
get: function () { return
|
|
130
|
+
get: function () { return chunkKXX5RZKI_cjs.retrieveCodeVerifier; }
|
|
131
131
|
});
|
|
132
132
|
Object.defineProperty(exports, "storeCodeVerifier", {
|
|
133
133
|
enumerable: true,
|
|
134
|
-
get: function () { return
|
|
134
|
+
get: function () { return chunkKXX5RZKI_cjs.storeCodeVerifier; }
|
|
135
135
|
});
|
|
136
136
|
Object.defineProperty(exports, "useFFID", {
|
|
137
137
|
enumerable: true,
|
|
138
|
-
get: function () { return
|
|
138
|
+
get: function () { return chunkKXX5RZKI_cjs.useFFID; }
|
|
139
139
|
});
|
|
140
140
|
Object.defineProperty(exports, "useFFIDAnnouncements", {
|
|
141
141
|
enumerable: true,
|
|
142
|
-
get: function () { return
|
|
142
|
+
get: function () { return chunkKXX5RZKI_cjs.useFFIDAnnouncements; }
|
|
143
143
|
});
|
|
144
144
|
Object.defineProperty(exports, "useSubscription", {
|
|
145
145
|
enumerable: true,
|
|
146
|
-
get: function () { return
|
|
146
|
+
get: function () { return chunkKXX5RZKI_cjs.useSubscription; }
|
|
147
147
|
});
|
|
148
148
|
Object.defineProperty(exports, "withSubscription", {
|
|
149
149
|
enumerable: true,
|
|
150
|
-
get: function () { return
|
|
150
|
+
get: function () { return chunkKXX5RZKI_cjs.withSubscription; }
|
|
151
151
|
});
|
|
152
152
|
exports.createKVCacheAdapter = createKVCacheAdapter;
|
|
153
153
|
exports.createMemoryCacheAdapter = createMemoryCacheAdapter;
|
package/dist/index.d.cts
CHANGED
|
@@ -147,6 +147,14 @@ interface FFIDSubscriptionDetail {
|
|
|
147
147
|
trialEnd: string | null;
|
|
148
148
|
canceledAt: string | null;
|
|
149
149
|
cancelAtPeriodEnd: boolean;
|
|
150
|
+
/** Pending period-end downgrade info (null = no scheduled downgrade) */
|
|
151
|
+
pendingDowngrade: {
|
|
152
|
+
planCode: string;
|
|
153
|
+
planName: string;
|
|
154
|
+
billingInterval: FFIDBillingInterval;
|
|
155
|
+
scheduledAt: string;
|
|
156
|
+
requestedAt: string;
|
|
157
|
+
} | null;
|
|
150
158
|
createdAt: string;
|
|
151
159
|
}
|
|
152
160
|
/** Parameters for subscribing to a plan */
|
|
@@ -223,6 +231,12 @@ interface FFIDChangePlanResponse {
|
|
|
223
231
|
status: FFIDSubscriptionStatus;
|
|
224
232
|
isUpgrade: boolean;
|
|
225
233
|
};
|
|
234
|
+
/** Present when downgrade is scheduled for period end instead of immediate */
|
|
235
|
+
pendingDowngrade?: {
|
|
236
|
+
planCode: string;
|
|
237
|
+
planName: string;
|
|
238
|
+
scheduledAt: string;
|
|
239
|
+
};
|
|
226
240
|
}
|
|
227
241
|
/** Parameters for canceling subscription */
|
|
228
242
|
interface FFIDCancelSubscriptionParams {
|
package/dist/index.d.ts
CHANGED
|
@@ -147,6 +147,14 @@ interface FFIDSubscriptionDetail {
|
|
|
147
147
|
trialEnd: string | null;
|
|
148
148
|
canceledAt: string | null;
|
|
149
149
|
cancelAtPeriodEnd: boolean;
|
|
150
|
+
/** Pending period-end downgrade info (null = no scheduled downgrade) */
|
|
151
|
+
pendingDowngrade: {
|
|
152
|
+
planCode: string;
|
|
153
|
+
planName: string;
|
|
154
|
+
billingInterval: FFIDBillingInterval;
|
|
155
|
+
scheduledAt: string;
|
|
156
|
+
requestedAt: string;
|
|
157
|
+
} | null;
|
|
150
158
|
createdAt: string;
|
|
151
159
|
}
|
|
152
160
|
/** Parameters for subscribing to a plan */
|
|
@@ -223,6 +231,12 @@ interface FFIDChangePlanResponse {
|
|
|
223
231
|
status: FFIDSubscriptionStatus;
|
|
224
232
|
isUpgrade: boolean;
|
|
225
233
|
};
|
|
234
|
+
/** Present when downgrade is scheduled for period end instead of immediate */
|
|
235
|
+
pendingDowngrade?: {
|
|
236
|
+
planCode: string;
|
|
237
|
+
planName: string;
|
|
238
|
+
scheduledAt: string;
|
|
239
|
+
};
|
|
226
240
|
}
|
|
227
241
|
/** Parameters for canceling subscription */
|
|
228
242
|
interface FFIDCancelSubscriptionParams {
|
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-W4FW7Z3F.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-W4FW7Z3F.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.3.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() {
|
package/dist/server/index.d.cts
CHANGED
|
@@ -76,6 +76,14 @@ interface FFIDSubscriptionDetail {
|
|
|
76
76
|
trialEnd: string | null;
|
|
77
77
|
canceledAt: string | null;
|
|
78
78
|
cancelAtPeriodEnd: boolean;
|
|
79
|
+
/** Pending period-end downgrade info (null = no scheduled downgrade) */
|
|
80
|
+
pendingDowngrade: {
|
|
81
|
+
planCode: string;
|
|
82
|
+
planName: string;
|
|
83
|
+
billingInterval: FFIDBillingInterval;
|
|
84
|
+
scheduledAt: string;
|
|
85
|
+
requestedAt: string;
|
|
86
|
+
} | null;
|
|
79
87
|
createdAt: string;
|
|
80
88
|
}
|
|
81
89
|
/** Parameters for subscribing to a plan */
|
|
@@ -152,6 +160,12 @@ interface FFIDChangePlanResponse {
|
|
|
152
160
|
status: FFIDSubscriptionStatus;
|
|
153
161
|
isUpgrade: boolean;
|
|
154
162
|
};
|
|
163
|
+
/** Present when downgrade is scheduled for period end instead of immediate */
|
|
164
|
+
pendingDowngrade?: {
|
|
165
|
+
planCode: string;
|
|
166
|
+
planName: string;
|
|
167
|
+
scheduledAt: string;
|
|
168
|
+
};
|
|
155
169
|
}
|
|
156
170
|
/** Parameters for canceling subscription */
|
|
157
171
|
interface FFIDCancelSubscriptionParams {
|
package/dist/server/index.d.ts
CHANGED
|
@@ -76,6 +76,14 @@ interface FFIDSubscriptionDetail {
|
|
|
76
76
|
trialEnd: string | null;
|
|
77
77
|
canceledAt: string | null;
|
|
78
78
|
cancelAtPeriodEnd: boolean;
|
|
79
|
+
/** Pending period-end downgrade info (null = no scheduled downgrade) */
|
|
80
|
+
pendingDowngrade: {
|
|
81
|
+
planCode: string;
|
|
82
|
+
planName: string;
|
|
83
|
+
billingInterval: FFIDBillingInterval;
|
|
84
|
+
scheduledAt: string;
|
|
85
|
+
requestedAt: string;
|
|
86
|
+
} | null;
|
|
79
87
|
createdAt: string;
|
|
80
88
|
}
|
|
81
89
|
/** Parameters for subscribing to a plan */
|
|
@@ -152,6 +160,12 @@ interface FFIDChangePlanResponse {
|
|
|
152
160
|
status: FFIDSubscriptionStatus;
|
|
153
161
|
isUpgrade: boolean;
|
|
154
162
|
};
|
|
163
|
+
/** Present when downgrade is scheduled for period end instead of immediate */
|
|
164
|
+
pendingDowngrade?: {
|
|
165
|
+
planCode: string;
|
|
166
|
+
planName: string;
|
|
167
|
+
scheduledAt: string;
|
|
168
|
+
};
|
|
155
169
|
}
|
|
156
170
|
/** Parameters for canceling subscription */
|
|
157
171
|
interface FFIDCancelSubscriptionParams {
|
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.3.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() {
|
package/dist/webhooks/index.d.ts
CHANGED