@feelflow/ffid-sdk 7.0.0 → 7.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkBI6UM2EJ_cjs = require('./chunk-BI6UM2EJ.cjs');
3
+ var chunkCI4N7KJK_cjs = require('./chunk-CI4N7KJK.cjs');
4
4
  var chunkXELXXL2F_cjs = require('./chunk-XELXXL2F.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 } = chunkBI6UM2EJ_cjs.useFFIDContext();
58
- const { effectiveStatus, isBlocked, isGrace } = chunkBI6UM2EJ_cjs.useSubscription();
57
+ const { isLoading, error } = chunkCI4N7KJK_cjs.useFFIDContext();
58
+ const { effectiveStatus, isBlocked, isGrace } = chunkCI4N7KJK_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 } = chunkBI6UM2EJ_cjs.useFFIDContext();
79
+ const { isLoading, isAuthenticated, login } = chunkCI4N7KJK_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,243 @@ 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 chunkBI6UM2EJ_cjs.ACCESS_GRANTING_EFFECTIVE_STATUSES; }
108
+ get: function () { return chunkCI4N7KJK_cjs.ACCESS_GRANTING_EFFECTIVE_STATUSES; }
109
109
  });
110
110
  Object.defineProperty(exports, "BLOCKING_EFFECTIVE_STATUSES", {
111
111
  enumerable: true,
112
- get: function () { return chunkBI6UM2EJ_cjs.BLOCKING_EFFECTIVE_STATUSES; }
112
+ get: function () { return chunkCI4N7KJK_cjs.BLOCKING_EFFECTIVE_STATUSES; }
113
113
  });
114
114
  Object.defineProperty(exports, "CATALOG_HASH_PATTERN", {
115
115
  enumerable: true,
116
- get: function () { return chunkBI6UM2EJ_cjs.CATALOG_HASH_PATTERN; }
116
+ get: function () { return chunkCI4N7KJK_cjs.CATALOG_HASH_PATTERN; }
117
117
  });
118
118
  Object.defineProperty(exports, "DEFAULT_API_BASE_URL", {
119
119
  enumerable: true,
120
- get: function () { return chunkBI6UM2EJ_cjs.DEFAULT_API_BASE_URL; }
120
+ get: function () { return chunkCI4N7KJK_cjs.DEFAULT_API_BASE_URL; }
121
121
  });
122
122
  Object.defineProperty(exports, "DEFAULT_OAUTH_SCOPES", {
123
123
  enumerable: true,
124
- get: function () { return chunkBI6UM2EJ_cjs.DEFAULT_OAUTH_SCOPES; }
124
+ get: function () { return chunkCI4N7KJK_cjs.DEFAULT_OAUTH_SCOPES; }
125
125
  });
126
126
  Object.defineProperty(exports, "EFFECTIVE_SUBSCRIPTION_STATUSES", {
127
127
  enumerable: true,
128
- get: function () { return chunkBI6UM2EJ_cjs.EFFECTIVE_SUBSCRIPTION_STATUSES; }
128
+ get: function () { return chunkCI4N7KJK_cjs.EFFECTIVE_SUBSCRIPTION_STATUSES; }
129
129
  });
130
130
  Object.defineProperty(exports, "FFIDAnnouncementBadge", {
131
131
  enumerable: true,
132
- get: function () { return chunkBI6UM2EJ_cjs.FFIDAnnouncementBadge; }
132
+ get: function () { return chunkCI4N7KJK_cjs.FFIDAnnouncementBadge; }
133
133
  });
134
134
  Object.defineProperty(exports, "FFIDAnnouncementList", {
135
135
  enumerable: true,
136
- get: function () { return chunkBI6UM2EJ_cjs.FFIDAnnouncementList; }
136
+ get: function () { return chunkCI4N7KJK_cjs.FFIDAnnouncementList; }
137
137
  });
138
138
  Object.defineProperty(exports, "FFIDCatalogHashError", {
139
139
  enumerable: true,
140
- get: function () { return chunkBI6UM2EJ_cjs.FFIDCatalogHashError; }
140
+ get: function () { return chunkCI4N7KJK_cjs.FFIDCatalogHashError; }
141
141
  });
142
142
  Object.defineProperty(exports, "FFIDInquiryForm", {
143
143
  enumerable: true,
144
- get: function () { return chunkBI6UM2EJ_cjs.FFIDInquiryForm; }
144
+ get: function () { return chunkCI4N7KJK_cjs.FFIDInquiryForm; }
145
145
  });
146
146
  Object.defineProperty(exports, "FFIDLoginButton", {
147
147
  enumerable: true,
148
- get: function () { return chunkBI6UM2EJ_cjs.FFIDLoginButton; }
148
+ get: function () { return chunkCI4N7KJK_cjs.FFIDLoginButton; }
149
149
  });
150
150
  Object.defineProperty(exports, "FFIDOrganizationSwitcher", {
151
151
  enumerable: true,
152
- get: function () { return chunkBI6UM2EJ_cjs.FFIDOrganizationSwitcher; }
152
+ get: function () { return chunkCI4N7KJK_cjs.FFIDOrganizationSwitcher; }
153
153
  });
154
154
  Object.defineProperty(exports, "FFIDProvider", {
155
155
  enumerable: true,
156
- get: function () { return chunkBI6UM2EJ_cjs.FFIDProvider; }
156
+ get: function () { return chunkCI4N7KJK_cjs.FFIDProvider; }
157
157
  });
158
158
  Object.defineProperty(exports, "FFIDSDKError", {
159
159
  enumerable: true,
160
- get: function () { return chunkBI6UM2EJ_cjs.FFIDSDKError; }
160
+ get: function () { return chunkCI4N7KJK_cjs.FFIDSDKError; }
161
161
  });
162
162
  Object.defineProperty(exports, "FFIDSubscriptionBadge", {
163
163
  enumerable: true,
164
- get: function () { return chunkBI6UM2EJ_cjs.FFIDSubscriptionBadge; }
164
+ get: function () { return chunkCI4N7KJK_cjs.FFIDSubscriptionBadge; }
165
165
  });
166
166
  Object.defineProperty(exports, "FFIDUserMenu", {
167
167
  enumerable: true,
168
- get: function () { return chunkBI6UM2EJ_cjs.FFIDUserMenu; }
168
+ get: function () { return chunkCI4N7KJK_cjs.FFIDUserMenu; }
169
+ });
170
+ Object.defineProperty(exports, "FFID_ALLOWED_ORGANIZATION_LOGO_MIME_TYPES", {
171
+ enumerable: true,
172
+ get: function () { return chunkCI4N7KJK_cjs.FFID_ALLOWED_ORGANIZATION_LOGO_MIME_TYPES; }
169
173
  });
170
174
  Object.defineProperty(exports, "FFID_ANNOUNCEMENTS_ERROR_CODES", {
171
175
  enumerable: true,
172
- get: function () { return chunkBI6UM2EJ_cjs.FFID_ANNOUNCEMENTS_ERROR_CODES; }
176
+ get: function () { return chunkCI4N7KJK_cjs.FFID_ANNOUNCEMENTS_ERROR_CODES; }
173
177
  });
174
178
  Object.defineProperty(exports, "FFID_CATALOG_ENVIRONMENTS", {
175
179
  enumerable: true,
176
- get: function () { return chunkBI6UM2EJ_cjs.FFID_CATALOG_ENVIRONMENTS; }
180
+ get: function () { return chunkCI4N7KJK_cjs.FFID_CATALOG_ENVIRONMENTS; }
177
181
  });
178
182
  Object.defineProperty(exports, "FFID_CATALOG_PUBLICATION_STATUSES", {
179
183
  enumerable: true,
180
- get: function () { return chunkBI6UM2EJ_cjs.FFID_CATALOG_PUBLICATION_STATUSES; }
184
+ get: function () { return chunkCI4N7KJK_cjs.FFID_CATALOG_PUBLICATION_STATUSES; }
185
+ });
186
+ Object.defineProperty(exports, "FFID_COMPANY_SIZE_CODES", {
187
+ enumerable: true,
188
+ get: function () { return chunkCI4N7KJK_cjs.FFID_COMPANY_SIZE_CODES; }
181
189
  });
182
190
  Object.defineProperty(exports, "FFID_ERROR_CODES", {
183
191
  enumerable: true,
184
- get: function () { return chunkBI6UM2EJ_cjs.FFID_ERROR_CODES; }
192
+ get: function () { return chunkCI4N7KJK_cjs.FFID_ERROR_CODES; }
193
+ });
194
+ Object.defineProperty(exports, "FFID_INDUSTRY_CODES", {
195
+ enumerable: true,
196
+ get: function () { return chunkCI4N7KJK_cjs.FFID_INDUSTRY_CODES; }
185
197
  });
186
198
  Object.defineProperty(exports, "FFID_INQUIRY_ACQUISITION_SOURCES", {
187
199
  enumerable: true,
188
- get: function () { return chunkBI6UM2EJ_cjs.FFID_INQUIRY_ACQUISITION_SOURCES; }
200
+ get: function () { return chunkCI4N7KJK_cjs.FFID_INQUIRY_ACQUISITION_SOURCES; }
189
201
  });
190
202
  Object.defineProperty(exports, "FFID_INQUIRY_CATEGORIES", {
191
203
  enumerable: true,
192
- get: function () { return chunkBI6UM2EJ_cjs.FFID_INQUIRY_CATEGORIES; }
204
+ get: function () { return chunkCI4N7KJK_cjs.FFID_INQUIRY_CATEGORIES; }
193
205
  });
194
206
  Object.defineProperty(exports, "FFID_INQUIRY_CATEGORIES_SITE_2026", {
195
207
  enumerable: true,
196
- get: function () { return chunkBI6UM2EJ_cjs.FFID_INQUIRY_CATEGORIES_SITE_2026; }
208
+ get: function () { return chunkCI4N7KJK_cjs.FFID_INQUIRY_CATEGORIES_SITE_2026; }
209
+ });
210
+ Object.defineProperty(exports, "FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_BYTES", {
211
+ enumerable: true,
212
+ get: function () { return chunkCI4N7KJK_cjs.FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_BYTES; }
213
+ });
214
+ Object.defineProperty(exports, "FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_MB", {
215
+ enumerable: true,
216
+ get: function () { return chunkCI4N7KJK_cjs.FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_MB; }
217
+ });
218
+ Object.defineProperty(exports, "FFID_ORGANIZATION_PROFILE_ERROR_CODES", {
219
+ enumerable: true,
220
+ get: function () { return chunkCI4N7KJK_cjs.FFID_ORGANIZATION_PROFILE_ERROR_CODES; }
197
221
  });
198
222
  Object.defineProperty(exports, "canonicalizeCatalogValue", {
199
223
  enumerable: true,
200
- get: function () { return chunkBI6UM2EJ_cjs.canonicalizeCatalogValue; }
224
+ get: function () { return chunkCI4N7KJK_cjs.canonicalizeCatalogValue; }
201
225
  });
202
226
  Object.defineProperty(exports, "clearState", {
203
227
  enumerable: true,
204
- get: function () { return chunkBI6UM2EJ_cjs.cleanupStateStorage; }
228
+ get: function () { return chunkCI4N7KJK_cjs.cleanupStateStorage; }
205
229
  });
206
230
  Object.defineProperty(exports, "computeEffectiveStatusFromSession", {
207
231
  enumerable: true,
208
- get: function () { return chunkBI6UM2EJ_cjs.computeEffectiveStatusFromSession; }
232
+ get: function () { return chunkCI4N7KJK_cjs.computeEffectiveStatusFromSession; }
209
233
  });
210
234
  Object.defineProperty(exports, "computeFFIDCheckoutCopyHash", {
211
235
  enumerable: true,
212
- get: function () { return chunkBI6UM2EJ_cjs.computeFFIDCheckoutCopyHash; }
236
+ get: function () { return chunkCI4N7KJK_cjs.computeFFIDCheckoutCopyHash; }
213
237
  });
214
238
  Object.defineProperty(exports, "computeLegalDisclosureHash", {
215
239
  enumerable: true,
216
- get: function () { return chunkBI6UM2EJ_cjs.computeLegalDisclosureHash; }
240
+ get: function () { return chunkCI4N7KJK_cjs.computeLegalDisclosureHash; }
217
241
  });
218
242
  Object.defineProperty(exports, "computePaymentConfigurationHash", {
219
243
  enumerable: true,
220
- get: function () { return chunkBI6UM2EJ_cjs.computePaymentConfigurationHash; }
244
+ get: function () { return chunkCI4N7KJK_cjs.computePaymentConfigurationHash; }
221
245
  });
222
246
  Object.defineProperty(exports, "computePraxisCopyHash", {
223
247
  enumerable: true,
224
- get: function () { return chunkBI6UM2EJ_cjs.computePraxisCopyHash; }
248
+ get: function () { return chunkCI4N7KJK_cjs.computePraxisCopyHash; }
225
249
  });
226
250
  Object.defineProperty(exports, "computeScopeHash", {
227
251
  enumerable: true,
228
- get: function () { return chunkBI6UM2EJ_cjs.computeScopeHash; }
252
+ get: function () { return chunkCI4N7KJK_cjs.computeScopeHash; }
229
253
  });
230
254
  Object.defineProperty(exports, "computeTaxConfigurationHash", {
231
255
  enumerable: true,
232
- get: function () { return chunkBI6UM2EJ_cjs.computeTaxConfigurationHash; }
256
+ get: function () { return chunkCI4N7KJK_cjs.computeTaxConfigurationHash; }
233
257
  });
234
258
  Object.defineProperty(exports, "createFFIDAnnouncementsClient", {
235
259
  enumerable: true,
236
- get: function () { return chunkBI6UM2EJ_cjs.createFFIDAnnouncementsClient; }
260
+ get: function () { return chunkCI4N7KJK_cjs.createFFIDAnnouncementsClient; }
237
261
  });
238
262
  Object.defineProperty(exports, "createFFIDClient", {
239
263
  enumerable: true,
240
- get: function () { return chunkBI6UM2EJ_cjs.createFFIDClient; }
264
+ get: function () { return chunkCI4N7KJK_cjs.createFFIDClient; }
241
265
  });
242
266
  Object.defineProperty(exports, "createTokenStore", {
243
267
  enumerable: true,
244
- get: function () { return chunkBI6UM2EJ_cjs.createTokenStore; }
268
+ get: function () { return chunkCI4N7KJK_cjs.createTokenStore; }
245
269
  });
246
270
  Object.defineProperty(exports, "generateCodeChallenge", {
247
271
  enumerable: true,
248
- get: function () { return chunkBI6UM2EJ_cjs.generateCodeChallenge; }
272
+ get: function () { return chunkCI4N7KJK_cjs.generateCodeChallenge; }
249
273
  });
250
274
  Object.defineProperty(exports, "generateCodeVerifier", {
251
275
  enumerable: true,
252
- get: function () { return chunkBI6UM2EJ_cjs.generateCodeVerifier; }
276
+ get: function () { return chunkCI4N7KJK_cjs.generateCodeVerifier; }
253
277
  });
254
278
  Object.defineProperty(exports, "handleRedirectCallback", {
255
279
  enumerable: true,
256
- get: function () { return chunkBI6UM2EJ_cjs.handleRedirectCallback; }
280
+ get: function () { return chunkCI4N7KJK_cjs.handleRedirectCallback; }
257
281
  });
258
282
  Object.defineProperty(exports, "hasAccessFromUserinfo", {
259
283
  enumerable: true,
260
- get: function () { return chunkBI6UM2EJ_cjs.hasAccessFromUserinfo; }
284
+ get: function () { return chunkCI4N7KJK_cjs.hasAccessFromUserinfo; }
261
285
  });
262
286
  Object.defineProperty(exports, "hashCanonicalJson", {
263
287
  enumerable: true,
264
- get: function () { return chunkBI6UM2EJ_cjs.hashCanonicalJson; }
288
+ get: function () { return chunkCI4N7KJK_cjs.hashCanonicalJson; }
265
289
  });
266
290
  Object.defineProperty(exports, "isBlockedFromUserinfo", {
267
291
  enumerable: true,
268
- get: function () { return chunkBI6UM2EJ_cjs.isBlockedFromUserinfo; }
292
+ get: function () { return chunkCI4N7KJK_cjs.isBlockedFromUserinfo; }
269
293
  });
270
294
  Object.defineProperty(exports, "isFFIDInquiryAcquisitionSource", {
271
295
  enumerable: true,
272
- get: function () { return chunkBI6UM2EJ_cjs.isFFIDInquiryAcquisitionSource; }
296
+ get: function () { return chunkCI4N7KJK_cjs.isFFIDInquiryAcquisitionSource; }
273
297
  });
274
298
  Object.defineProperty(exports, "isFFIDInquiryCategorySite2026", {
275
299
  enumerable: true,
276
- get: function () { return chunkBI6UM2EJ_cjs.isFFIDInquiryCategorySite2026; }
300
+ get: function () { return chunkCI4N7KJK_cjs.isFFIDInquiryCategorySite2026; }
277
301
  });
278
302
  Object.defineProperty(exports, "normalizeRedirectUri", {
279
303
  enumerable: true,
280
- get: function () { return chunkBI6UM2EJ_cjs.normalizeRedirectUri; }
304
+ get: function () { return chunkCI4N7KJK_cjs.normalizeRedirectUri; }
281
305
  });
282
306
  Object.defineProperty(exports, "retrieveCodeVerifier", {
283
307
  enumerable: true,
284
- get: function () { return chunkBI6UM2EJ_cjs.retrieveCodeVerifier; }
308
+ get: function () { return chunkCI4N7KJK_cjs.retrieveCodeVerifier; }
285
309
  });
286
310
  Object.defineProperty(exports, "retrieveState", {
287
311
  enumerable: true,
288
- get: function () { return chunkBI6UM2EJ_cjs.retrieveState; }
312
+ get: function () { return chunkCI4N7KJK_cjs.retrieveState; }
289
313
  });
290
314
  Object.defineProperty(exports, "sha256Hex", {
291
315
  enumerable: true,
292
- get: function () { return chunkBI6UM2EJ_cjs.sha256Hex; }
316
+ get: function () { return chunkCI4N7KJK_cjs.sha256Hex; }
293
317
  });
294
318
  Object.defineProperty(exports, "storeCodeVerifier", {
295
319
  enumerable: true,
296
- get: function () { return chunkBI6UM2EJ_cjs.storeCodeVerifier; }
320
+ get: function () { return chunkCI4N7KJK_cjs.storeCodeVerifier; }
297
321
  });
298
322
  Object.defineProperty(exports, "storeState", {
299
323
  enumerable: true,
300
- get: function () { return chunkBI6UM2EJ_cjs.storeState; }
324
+ get: function () { return chunkCI4N7KJK_cjs.storeState; }
301
325
  });
302
326
  Object.defineProperty(exports, "useFFID", {
303
327
  enumerable: true,
304
- get: function () { return chunkBI6UM2EJ_cjs.useFFID; }
328
+ get: function () { return chunkCI4N7KJK_cjs.useFFID; }
305
329
  });
306
330
  Object.defineProperty(exports, "useFFIDAnnouncements", {
307
331
  enumerable: true,
308
- get: function () { return chunkBI6UM2EJ_cjs.useFFIDAnnouncements; }
332
+ get: function () { return chunkCI4N7KJK_cjs.useFFIDAnnouncements; }
309
333
  });
310
334
  Object.defineProperty(exports, "useSubscription", {
311
335
  enumerable: true,
312
- get: function () { return chunkBI6UM2EJ_cjs.useSubscription; }
336
+ get: function () { return chunkCI4N7KJK_cjs.useSubscription; }
313
337
  });
314
338
  Object.defineProperty(exports, "validatePublishedCatalog", {
315
339
  enumerable: true,
316
- get: function () { return chunkBI6UM2EJ_cjs.validatePublishedCatalog; }
340
+ get: function () { return chunkCI4N7KJK_cjs.validatePublishedCatalog; }
317
341
  });
318
342
  Object.defineProperty(exports, "withSubscription", {
319
343
  enumerable: true,
320
- get: function () { return chunkBI6UM2EJ_cjs.withSubscription; }
344
+ get: function () { return chunkCI4N7KJK_cjs.withSubscription; }
321
345
  });
322
346
  Object.defineProperty(exports, "ALL_DENIED_EXCEPT_NECESSARY", {
323
347
  enumerable: true,
package/dist/index.d.cts CHANGED
@@ -1087,6 +1087,151 @@ interface FFIDLeaveOrganizationResponse {
1087
1087
  message: string;
1088
1088
  }
1089
1089
 
1090
+ /**
1091
+ * Types for the organization profile + public logo-wall APIs (#5485 / #5547).
1092
+ *
1093
+ * Mirrors:
1094
+ * - `GET/PUT /api/v1/organizations/ext/profile`
1095
+ * - `POST /api/v1/organizations/ext/profile/logo`
1096
+ * - `GET /api/v1/organizations/logo-wall`
1097
+ *
1098
+ * Industry / company-size / logo MIME+size values are copied from the
1099
+ * server SSOT (`src/lib/organizations/profile/constants.ts`) so consumers
1100
+ * can build forms without importing the platform package. Machine-checked by
1101
+ * `scripts/verify-sdk-constants-sync.ts`. Pixel dimensions (64–4096) are
1102
+ * **server-only** and surface as `INVALID_IMAGE`. Request fields use the
1103
+ * unions; response `industry` / `companySize` stay `string | null` so a
1104
+ * server-side code added before the next SDK release still type-checks.
1105
+ */
1106
+ /**
1107
+ * Industry codes for the listing profile (select options).
1108
+ * Append-only: existing published profiles keep referencing these values.
1109
+ */
1110
+ declare const FFID_INDUSTRY_CODES: readonly ["agriculture", "construction", "manufacturing", "it-software", "telecom", "media", "retail", "wholesale", "finance-insurance", "real-estate", "transport-logistics", "hospitality-food", "healthcare", "education", "professional-services", "marketing-advertising", "energy-utilities", "public-sector", "nonprofit", "other"];
1111
+ /** Industry code accepted by `upsertOrganizationProfile`. */
1112
+ type FFIDIndustryCode = (typeof FFID_INDUSTRY_CODES)[number];
1113
+ /** Company-size codes (employee-count ranges). */
1114
+ declare const FFID_COMPANY_SIZE_CODES: readonly ["1-10", "11-50", "51-200", "201-500", "501-1000", "1001+"];
1115
+ /** Company-size code accepted by `upsertOrganizationProfile`. */
1116
+ type FFIDCompanySizeCode = (typeof FFID_COMPANY_SIZE_CODES)[number];
1117
+ /** Max logo file size in MB (shown in client-side error messages). */
1118
+ declare const FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_MB = 2;
1119
+ /** Max logo file size in bytes (matches the storage bucket limit). */
1120
+ declare const FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_BYTES: number;
1121
+ /**
1122
+ * Allowed logo MIME types. SVG is excluded (magic-byte / dimension checks
1123
+ * cannot run, and it can carry script). Empty `file.type` is allowed through
1124
+ * so the server can sniff magic bytes.
1125
+ */
1126
+ declare const FFID_ALLOWED_ORGANIZATION_LOGO_MIME_TYPES: readonly ["image/png", "image/jpeg", "image/webp"];
1127
+ /** Allowed logo MIME type. */
1128
+ type FFIDAllowedLogoMimeType = (typeof FFID_ALLOWED_ORGANIZATION_LOGO_MIME_TYPES)[number];
1129
+ /**
1130
+ * Domain error codes from the profile GET/PUT and logo POST routes
1131
+ * (`CONSENTED_BY_NOT_MEMBER`, `MISSING_FILE`, …). Auth / `DATABASE_ERROR` /
1132
+ * `INTERNAL_ERROR` still pass through as `FFIDError.code: string`.
1133
+ * Logo-wall failures are `INTERNAL_ERROR` only (not listed here).
1134
+ * Branch on these constants instead of string literals.
1135
+ */
1136
+ declare const FFID_ORGANIZATION_PROFILE_ERROR_CODES: {
1137
+ readonly VALIDATION_ERROR: "VALIDATION_ERROR";
1138
+ readonly ORGANIZATION_NOT_FOUND: "ORGANIZATION_NOT_FOUND";
1139
+ readonly CONSENTED_BY_NOT_MEMBER: "CONSENTED_BY_NOT_MEMBER";
1140
+ readonly MISSING_FILE: "MISSING_FILE";
1141
+ readonly INVALID_FILE_TYPE: "INVALID_FILE_TYPE";
1142
+ readonly FILE_TOO_LARGE: "FILE_TOO_LARGE";
1143
+ readonly INVALID_IMAGE: "INVALID_IMAGE";
1144
+ readonly LOGO_UPLOAD_FAILED: "LOGO_UPLOAD_FAILED";
1145
+ };
1146
+ /** Union of organization-profile server error code literals. */
1147
+ type FFIDOrganizationProfileErrorCode = (typeof FFID_ORGANIZATION_PROFILE_ERROR_CODES)[keyof typeof FFID_ORGANIZATION_PROFILE_ERROR_CODES];
1148
+ /** Organization listing profile (camelCase, matches the ext/profile wire). */
1149
+ interface FFIDOrganizationProfile {
1150
+ organizationId: string;
1151
+ displayName: string | null;
1152
+ industry: string | null;
1153
+ companySize: string | null;
1154
+ websiteUrl: string | null;
1155
+ logoPath: string | null;
1156
+ /** Public URL derived from `logoPath` (`null` when no logo is stored). */
1157
+ logoUrl: string | null;
1158
+ listingConsentedAt: string | null;
1159
+ listingConsentVersion: string | null;
1160
+ listingConsentedBy: string | null;
1161
+ listingRevokedAt: string | null;
1162
+ /** True when consent is recorded and not revoked. */
1163
+ listingActive: boolean;
1164
+ createdAt: string;
1165
+ updatedAt: string;
1166
+ }
1167
+ /**
1168
+ * Response from `getOrganizationProfile` / `upsertOrganizationProfile`.
1169
+ * GET: `profile` is `null` (HTTP 200) when the org exists but has no row yet.
1170
+ * PUT upsert always returns a profile object (empty body still inserts a row).
1171
+ */
1172
+ interface FFIDOrganizationProfileResponse {
1173
+ organizationId: string;
1174
+ profile: FFIDOrganizationProfile | null;
1175
+ }
1176
+ /**
1177
+ * Listing-consent mutation.
1178
+ *
1179
+ * - `{ consented: true, consentVersion, consentedByUserId }` records consent
1180
+ * (`consentedByUserId` must be an active member of the target org; otherwise
1181
+ * the server returns {@link FFID_ORGANIZATION_PROFILE_ERROR_CODES.CONSENTED_BY_NOT_MEMBER}).
1182
+ * - `{ consented: false }` revokes (no-op if never consented).
1183
+ * - Omit the field to leave consent unchanged.
1184
+ */
1185
+ type FFIDListingConsentInput = {
1186
+ consented: true;
1187
+ consentVersion: string;
1188
+ consentedByUserId: string;
1189
+ } | {
1190
+ consented: false;
1191
+ consentVersion?: never;
1192
+ consentedByUserId?: never;
1193
+ };
1194
+ /**
1195
+ * PUT body fields (all optional partial update).
1196
+ * `null` clears `displayName` / `industry` / `companySize` / `websiteUrl`.
1197
+ * Consent is not nullable — omit to leave unchanged, or pass
1198
+ * `{ consented: false }` to revoke.
1199
+ */
1200
+ interface FFIDUpsertOrganizationProfileRequest {
1201
+ displayName?: string | null;
1202
+ industry?: FFIDIndustryCode | null;
1203
+ companySize?: FFIDCompanySizeCode | null;
1204
+ websiteUrl?: string | null;
1205
+ listingConsent?: FFIDListingConsentInput;
1206
+ }
1207
+ /** Params for `upsertOrganizationProfile` (params-object form). */
1208
+ interface FFIDUpsertOrganizationProfileParams extends FFIDUpsertOrganizationProfileRequest {
1209
+ organizationId: string;
1210
+ }
1211
+ /** Params for `uploadOrganizationLogo` (params-object form). */
1212
+ interface FFIDUploadOrganizationLogoParams {
1213
+ organizationId: string;
1214
+ /** Image blob (`File` in browsers; `Blob` is enough in Node 18+). */
1215
+ file: Blob;
1216
+ }
1217
+ /** Response from `uploadOrganizationLogo`. */
1218
+ interface FFIDOrganizationLogoUploadResponse {
1219
+ organizationId: string;
1220
+ logoPath: string;
1221
+ logoUrl: string;
1222
+ }
1223
+ /** One public logo-wall entry (public listing fields only; omits consent metadata). */
1224
+ interface FFIDLogoWallEntry {
1225
+ displayName: string | null;
1226
+ logoUrl: string;
1227
+ websiteUrl: string | null;
1228
+ }
1229
+ /** Response from `getPublicLogoWall`. */
1230
+ interface FFIDLogoWallResponse {
1231
+ entries: FFIDLogoWallEntry[];
1232
+ count: number;
1233
+ }
1234
+
1090
1235
  /**
1091
1236
  * User profile types (ext API: `GET` / `PUT /api/v1/users/ext/me`).
1092
1237
  *
@@ -1635,6 +1780,21 @@ declare function createFFIDClient(config: FFIDConfig): {
1635
1780
  organizationId: string;
1636
1781
  userId: string;
1637
1782
  }) => Promise<FFIDApiResponse<FFIDRemoveMemberResponse>>;
1783
+ getOrganizationProfile: {
1784
+ (organizationId: string): Promise<FFIDApiResponse<FFIDOrganizationProfileResponse>>;
1785
+ (params: {
1786
+ organizationId: string;
1787
+ }): Promise<FFIDApiResponse<FFIDOrganizationProfileResponse>>;
1788
+ };
1789
+ upsertOrganizationProfile: {
1790
+ (organizationId: string, payload?: FFIDUpsertOrganizationProfileRequest): Promise<FFIDApiResponse<FFIDOrganizationProfileResponse>>;
1791
+ (params: FFIDUpsertOrganizationProfileParams): Promise<FFIDApiResponse<FFIDOrganizationProfileResponse>>;
1792
+ };
1793
+ uploadOrganizationLogo: {
1794
+ (organizationId: string, file: Blob): Promise<FFIDApiResponse<FFIDOrganizationLogoUploadResponse>>;
1795
+ (params: FFIDUploadOrganizationLogoParams): Promise<FFIDApiResponse<FFIDOrganizationLogoUploadResponse>>;
1796
+ };
1797
+ getPublicLogoWall: () => Promise<FFIDApiResponse<FFIDLogoWallResponse>>;
1638
1798
  provisionUser: (params: FFIDProvisionUserParams) => Promise<FFIDApiResponse<FFIDProvisionUserResponse>>;
1639
1799
  sendProvisionWelcomeEmail: (params: FFIDProvisionWelcomeEmailParams) => Promise<FFIDApiResponse<FFIDProvisionWelcomeEmailResponse>>;
1640
1800
  provisionOrganization: (params: FFIDProvisionOrganizationParams) => Promise<FFIDApiResponse<FFIDProvisionOrganizationResponse>>;
@@ -2738,4 +2898,4 @@ declare function createInquiryMethods(deps: InquiryMethodsDeps): {
2738
2898
  };
2739
2899
  type FFIDInquiryClient = ReturnType<typeof createInquiryMethods>;
2740
2900
 
2741
- export { ACCESS_GRANTING_EFFECTIVE_STATUSES, AnnouncementListResponse, BLOCKING_EFFECTIVE_STATUSES, CATALOG_HASH_PATTERN, type ComputeEffectiveStatusInput, type ContractWizardFlowType, type ContractWizardResubscribeOptions, type ContractWizardSubscribeOptions, type ContractWizardSubscriptionOptions, DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, EffectiveSubscriptionStatus, type ExchangeCodeForTokensOptions, FFIDAccountType, type FFIDAddMemberParams, type FFIDAddMemberRequest, type FFIDAddMemberResponse, FFIDAnnouncementsApiResponse, type FFIDAnnouncementsClient, FFIDAnnouncementsClientConfig, FFIDAnnouncementsLogger, FFIDApiResponse, type FFIDAssignableMemberRole, type FFIDBillingInterval, FFIDCacheAdapter, type FFIDCancelPendingDowngradeResponse, type FFIDCancelSubscriptionParams, type FFIDCancelSubscriptionResponse, type FFIDCanonicalJsonValue, type FFIDCatalogEnvironment, FFIDCatalogHashError, type FFIDCatalogPublication, type FFIDCatalogPublicationStatus, type FFIDChangePlanParams, type FFIDChangePlanResponse, FFIDCheckServiceAccessParams, type FFIDCheckoutSessionResponse, type FFIDClient, FFIDConfig, type FFIDCreateCheckoutParams, type FFIDCreatePortalParams, FFIDError, type FFIDErrorCode, type FFIDInquiryClient, FFIDInquiryCreateParams, FFIDInquiryCreateResponse, type FFIDInvitationStatus, type FFIDInviteMemberRequest, type FFIDInviteMemberResponse, type FFIDLeaveOrganizationParams, type FFIDLeaveOrganizationResponse, type FFIDListMembersResponse, type FFIDListPlansResponse, FFIDLogger, type FFIDLoginHistoryEntry, type FFIDLoginHistoryResponse, type FFIDMemberRole, type FFIDMemberStatus, type FFIDNewsletterBodySource, type FFIDNewsletterCampaignStatus, type FFIDNewsletterClient, type FFIDNewsletterConfirmParams, type FFIDNewsletterConfirmResponse, type FFIDNewsletterDispatchParams, type FFIDNewsletterDispatchResponse, type FFIDNewsletterSegment, type FFIDNewsletterSubscribeParams, type FFIDNewsletterSubscribeResponse, type FFIDNewsletterType, type FFIDNewsletterUnsubscribeParams, type FFIDNewsletterUnsubscribeResponse, type FFIDOAuthTokenResponse, FFIDOAuthUserInfo, FFIDOAuthUserInfoSubscription, FFIDOrganization, type FFIDOrganizationDomain, type FFIDOrganizationDomainsResponse, type FFIDOrganizationMember, type FFIDOrganizationNotificationPreferences, type FFIDOrganizationNotificationPreferencesResponse, type FFIDOtpSendResponse, type FFIDOtpVerifyResponse, type FFIDPasswordResetConfirmResponse, type FFIDPasswordResetResponse, type FFIDPasswordResetVerifyResponse, type FFIDPaymentConfiguration, type FFIDPlanChangeLineItem, type FFIDPlanChangePreview, type FFIDPlanChangePreviewResponse, type FFIDPlanInfo, type FFIDPortalSessionResponse, type FFIDPreviewPlanChangeParams, type FFIDPreviewSeatChangeParams, type FFIDProfileCallOptions, FFIDProvider, type FFIDProviderProps, type FFIDProvisionMemberPlan, type FFIDProvisionMemberPlanStatus, type FFIDProvisionMemberResult, type FFIDProvisionMemberStatus, type FFIDProvisionOrganizationDryRun, type FFIDProvisionOrganizationMemberInput, type FFIDProvisionOrganizationOutcome, type FFIDProvisionOrganizationParams, type FFIDProvisionOrganizationResponse, type FFIDProvisionUserDryRun, type FFIDProvisionUserOutcome, type FFIDProvisionUserParams, type FFIDProvisionUserProfileInput, type FFIDProvisionUserResponse, type FFIDProvisionedOrganization, type FFIDProvisionedUser, type FFIDPublishedCatalog, type FFIDPublishedPlan, type FFIDRedirectErrorCode, type FFIDRedirectResult, type FFIDRemoveMemberResponse, type FFIDResetSessionResponse, FFIDSDKError, type FFIDScopeHashInput, type FFIDScopeHashPlan, type FFIDSeatChangeLineItem, type FFIDSeatChangePreview, type FFIDSeatChangePreviewResponse, FFIDServiceAccessDecision, type FFIDServiceInfo, FFIDSessionResponse, FFIDSignOutResult, type FFIDSubscribeParams, type FFIDSubscribeResponse, FFIDSubscription, FFIDSubscriptionCheckResponse, FFIDSubscriptionContextValue, type FFIDSubscriptionDetail, FFIDSubscriptionStatus, type FFIDSubscriptionSummary, type FFIDSupportedCurrency, type FFIDTaxBehavior, type FFIDTaxConfiguration, type FFIDTokenIntrospectionResponse, type FFIDUpdateMemberRoleResponse, type FFIDUpdateNotificationPreferencesRequest, type FFIDUpdateUserProfileRequest, FFIDUser, type FFIDUserProfile, FFIDVerifyAccessTokenOptions, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_CATALOG_ENVIRONMENTS, FFID_CATALOG_PUBLICATION_STATUSES, FFID_ERROR_CODES, FFID_NEWSLETTER_DISPATCH_MAX_RECIPIENTS, FFID_NEWSLETTER_TYPES, type HandleRedirectCallbackClient, type HandleRedirectCallbackOptions, type KVNamespaceLike, ListAnnouncementsOptions, type NormalizeRedirectUriResult, type RedirectToAuthorizeOptions, TokenStore, type UseFFIDReturn, type UseRequireActiveSubscriptionOptions, type UseRequireActiveSubscriptionReturn, type WithFFIDAuthOptions, type WithSubscriptionOptions, canonicalizeCatalogValue, cleanupStateStorage as clearState, computeEffectiveStatusFromSession, computeFFIDCheckoutCopyHash, computeLegalDisclosureHash, computePaymentConfigurationHash, computePraxisCopyHash, computeScopeHash, computeTaxConfigurationHash, createFFIDAnnouncementsClient, createFFIDClient, createKVCacheAdapter, createMemoryCacheAdapter, generateCodeChallenge, generateCodeVerifier, handleRedirectCallback, hasAccessFromUserinfo, hashCanonicalJson, isBlockedFromUserinfo, normalizeRedirectUri, retrieveCodeVerifier, retrieveState, sha256Hex, storeCodeVerifier, storeState, useFFID, useRequireActiveSubscription, useSubscription, validatePublishedCatalog, withFFIDAuth, withSubscription };
2901
+ export { ACCESS_GRANTING_EFFECTIVE_STATUSES, AnnouncementListResponse, BLOCKING_EFFECTIVE_STATUSES, CATALOG_HASH_PATTERN, type ComputeEffectiveStatusInput, type ContractWizardFlowType, type ContractWizardResubscribeOptions, type ContractWizardSubscribeOptions, type ContractWizardSubscriptionOptions, DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, EffectiveSubscriptionStatus, type ExchangeCodeForTokensOptions, FFIDAccountType, type FFIDAddMemberParams, type FFIDAddMemberRequest, type FFIDAddMemberResponse, type FFIDAllowedLogoMimeType, FFIDAnnouncementsApiResponse, type FFIDAnnouncementsClient, FFIDAnnouncementsClientConfig, FFIDAnnouncementsLogger, FFIDApiResponse, type FFIDAssignableMemberRole, type FFIDBillingInterval, FFIDCacheAdapter, type FFIDCancelPendingDowngradeResponse, type FFIDCancelSubscriptionParams, type FFIDCancelSubscriptionResponse, type FFIDCanonicalJsonValue, type FFIDCatalogEnvironment, FFIDCatalogHashError, type FFIDCatalogPublication, type FFIDCatalogPublicationStatus, type FFIDChangePlanParams, type FFIDChangePlanResponse, FFIDCheckServiceAccessParams, type FFIDCheckoutSessionResponse, type FFIDClient, type FFIDCompanySizeCode, FFIDConfig, type FFIDCreateCheckoutParams, type FFIDCreatePortalParams, FFIDError, type FFIDErrorCode, type FFIDIndustryCode, type FFIDInquiryClient, FFIDInquiryCreateParams, FFIDInquiryCreateResponse, type FFIDInvitationStatus, type FFIDInviteMemberRequest, type FFIDInviteMemberResponse, type FFIDLeaveOrganizationParams, type FFIDLeaveOrganizationResponse, type FFIDListMembersResponse, type FFIDListPlansResponse, type FFIDListingConsentInput, FFIDLogger, type FFIDLoginHistoryEntry, type FFIDLoginHistoryResponse, type FFIDLogoWallEntry, type FFIDLogoWallResponse, type FFIDMemberRole, type FFIDMemberStatus, type FFIDNewsletterBodySource, type FFIDNewsletterCampaignStatus, type FFIDNewsletterClient, type FFIDNewsletterConfirmParams, type FFIDNewsletterConfirmResponse, type FFIDNewsletterDispatchParams, type FFIDNewsletterDispatchResponse, type FFIDNewsletterSegment, type FFIDNewsletterSubscribeParams, type FFIDNewsletterSubscribeResponse, type FFIDNewsletterType, type FFIDNewsletterUnsubscribeParams, type FFIDNewsletterUnsubscribeResponse, type FFIDOAuthTokenResponse, FFIDOAuthUserInfo, FFIDOAuthUserInfoSubscription, FFIDOrganization, type FFIDOrganizationDomain, type FFIDOrganizationDomainsResponse, type FFIDOrganizationLogoUploadResponse, type FFIDOrganizationMember, type FFIDOrganizationNotificationPreferences, type FFIDOrganizationNotificationPreferencesResponse, type FFIDOrganizationProfile, type FFIDOrganizationProfileErrorCode, type FFIDOrganizationProfileResponse, type FFIDOtpSendResponse, type FFIDOtpVerifyResponse, type FFIDPasswordResetConfirmResponse, type FFIDPasswordResetResponse, type FFIDPasswordResetVerifyResponse, type FFIDPaymentConfiguration, type FFIDPlanChangeLineItem, type FFIDPlanChangePreview, type FFIDPlanChangePreviewResponse, type FFIDPlanInfo, type FFIDPortalSessionResponse, type FFIDPreviewPlanChangeParams, type FFIDPreviewSeatChangeParams, type FFIDProfileCallOptions, FFIDProvider, type FFIDProviderProps, type FFIDProvisionMemberPlan, type FFIDProvisionMemberPlanStatus, type FFIDProvisionMemberResult, type FFIDProvisionMemberStatus, type FFIDProvisionOrganizationDryRun, type FFIDProvisionOrganizationMemberInput, type FFIDProvisionOrganizationOutcome, type FFIDProvisionOrganizationParams, type FFIDProvisionOrganizationResponse, type FFIDProvisionUserDryRun, type FFIDProvisionUserOutcome, type FFIDProvisionUserParams, type FFIDProvisionUserProfileInput, type FFIDProvisionUserResponse, type FFIDProvisionedOrganization, type FFIDProvisionedUser, type FFIDPublishedCatalog, type FFIDPublishedPlan, type FFIDRedirectErrorCode, type FFIDRedirectResult, type FFIDRemoveMemberResponse, type FFIDResetSessionResponse, FFIDSDKError, type FFIDScopeHashInput, type FFIDScopeHashPlan, type FFIDSeatChangeLineItem, type FFIDSeatChangePreview, type FFIDSeatChangePreviewResponse, FFIDServiceAccessDecision, type FFIDServiceInfo, FFIDSessionResponse, FFIDSignOutResult, type FFIDSubscribeParams, type FFIDSubscribeResponse, FFIDSubscription, FFIDSubscriptionCheckResponse, FFIDSubscriptionContextValue, type FFIDSubscriptionDetail, FFIDSubscriptionStatus, type FFIDSubscriptionSummary, type FFIDSupportedCurrency, type FFIDTaxBehavior, type FFIDTaxConfiguration, type FFIDTokenIntrospectionResponse, type FFIDUpdateMemberRoleResponse, type FFIDUpdateNotificationPreferencesRequest, type FFIDUpdateUserProfileRequest, type FFIDUploadOrganizationLogoParams, type FFIDUpsertOrganizationProfileParams, type FFIDUpsertOrganizationProfileRequest, FFIDUser, type FFIDUserProfile, FFIDVerifyAccessTokenOptions, FFID_ALLOWED_ORGANIZATION_LOGO_MIME_TYPES, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_CATALOG_ENVIRONMENTS, FFID_CATALOG_PUBLICATION_STATUSES, FFID_COMPANY_SIZE_CODES, FFID_ERROR_CODES, FFID_INDUSTRY_CODES, FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_BYTES, FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_MB, FFID_NEWSLETTER_DISPATCH_MAX_RECIPIENTS, FFID_NEWSLETTER_TYPES, FFID_ORGANIZATION_PROFILE_ERROR_CODES, type HandleRedirectCallbackClient, type HandleRedirectCallbackOptions, type KVNamespaceLike, ListAnnouncementsOptions, type NormalizeRedirectUriResult, type RedirectToAuthorizeOptions, TokenStore, type UseFFIDReturn, type UseRequireActiveSubscriptionOptions, type UseRequireActiveSubscriptionReturn, type WithFFIDAuthOptions, type WithSubscriptionOptions, canonicalizeCatalogValue, cleanupStateStorage as clearState, computeEffectiveStatusFromSession, computeFFIDCheckoutCopyHash, computeLegalDisclosureHash, computePaymentConfigurationHash, computePraxisCopyHash, computeScopeHash, computeTaxConfigurationHash, createFFIDAnnouncementsClient, createFFIDClient, createKVCacheAdapter, createMemoryCacheAdapter, generateCodeChallenge, generateCodeVerifier, handleRedirectCallback, hasAccessFromUserinfo, hashCanonicalJson, isBlockedFromUserinfo, normalizeRedirectUri, retrieveCodeVerifier, retrieveState, sha256Hex, storeCodeVerifier, storeState, useFFID, useRequireActiveSubscription, useSubscription, validatePublishedCatalog, withFFIDAuth, withSubscription };