@feelflow/ffid-sdk 0.1.0 → 0.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.
@@ -25,6 +25,26 @@ interface FFIDUser {
25
25
  /** Account creation timestamp */
26
26
  createdAt: string;
27
27
  }
28
+ /**
29
+ * Agency branding information for white-label support.
30
+ * Included in organization when it is linked to an agency.
31
+ */
32
+ interface FFIDAgencyBranding {
33
+ /** Agency ID (UUID) */
34
+ agencyId: string;
35
+ /** Agency display name */
36
+ agencyName: string;
37
+ /** Custom logo URL */
38
+ logoUrl?: string;
39
+ /** Custom favicon URL */
40
+ faviconUrl?: string;
41
+ /** Primary brand color (hex) */
42
+ primaryColor?: string;
43
+ /** Secondary brand color (hex) */
44
+ secondaryColor?: string;
45
+ /** White-label company name */
46
+ companyName?: string;
47
+ }
28
48
  /**
29
49
  * Organization membership information
30
50
  */
@@ -39,6 +59,8 @@ interface FFIDOrganization {
39
59
  role: 'owner' | 'admin' | 'member';
40
60
  /** Membership status */
41
61
  status: 'active' | 'invited' | 'suspended';
62
+ /** Agency branding (null if org is not linked to an agency) */
63
+ agencyBranding: FFIDAgencyBranding | null;
42
64
  }
43
65
  /**
44
66
  * Subscription/contract information
@@ -181,6 +203,153 @@ type FFIDApiResponse<T> = {
181
203
  error: FFIDError;
182
204
  };
183
205
 
206
+ /**
207
+ * FFID Announcements SDK Type Definitions
208
+ *
209
+ * Types for the FeelFlow ID Announcements SDK.
210
+ * Used by client applications to fetch and display announcements.
211
+ * Issue: #286
212
+ */
213
+ /**
214
+ * Announcement type values.
215
+ * Uses string union with open extension for forward compatibility.
216
+ */
217
+ type AnnouncementType = 'maintenance.scheduled' | 'maintenance.reminder' | 'maintenance.started' | 'maintenance.completed' | 'incident.detected' | 'incident.resolved' | 'api.deprecation' | 'api.breaking_change' | 'sdk.update_available' | 'security.advisory' | 'billing.payment_reminder' | 'billing.payment_failed' | 'legal.terms_updated' | 'account.security_alert' | (string & {});
218
+ /** Announcement status (only 'published' is visible via public API) */
219
+ type AnnouncementStatus = 'draft' | 'published' | 'archived';
220
+ /** Single announcement returned from the public API */
221
+ interface Announcement {
222
+ /** Announcement ID (UUID) */
223
+ id: string;
224
+ /** Announcement type */
225
+ type: AnnouncementType;
226
+ /** Title */
227
+ title: string;
228
+ /** Content (Markdown) */
229
+ content: string;
230
+ /** Announcement status */
231
+ status: AnnouncementStatus;
232
+ /** Scheduled maintenance start time (ISO 8601) */
233
+ scheduledAt: string | null;
234
+ /** Maintenance duration in minutes */
235
+ durationMinutes: number | null;
236
+ /** Affected service codes */
237
+ affectedServices: string[];
238
+ /** Notification channels */
239
+ channels: string[];
240
+ /** When the announcement was published (ISO 8601) */
241
+ publishedAt: string | null;
242
+ /** Created timestamp (ISO 8601) */
243
+ createdAt: string;
244
+ /** Updated timestamp (ISO 8601) */
245
+ updatedAt: string;
246
+ }
247
+ /** Response from list announcements endpoint */
248
+ interface AnnouncementListResponse {
249
+ /** List of announcements */
250
+ announcements: Announcement[];
251
+ /** Total number of matching announcements */
252
+ total: number;
253
+ }
254
+ /** Options for listing announcements */
255
+ interface ListAnnouncementsOptions {
256
+ /** Number of items to return (server default: 20, server max: 100) */
257
+ limit?: number;
258
+ /** Offset for pagination (default: 0) */
259
+ offset?: number;
260
+ }
261
+ /** Configuration for the FFID Announcements Client */
262
+ interface FFIDAnnouncementsClientConfig {
263
+ /** FFID API base URL (defaults to https://id.feelflow.co.jp) */
264
+ apiBaseUrl?: string | undefined;
265
+ /** Enable debug logging */
266
+ debug?: boolean | undefined;
267
+ /** Custom logger */
268
+ logger?: FFIDAnnouncementsLogger | undefined;
269
+ }
270
+ /** Logger interface for Announcements SDK */
271
+ interface FFIDAnnouncementsLogger {
272
+ debug: (...args: unknown[]) => void;
273
+ info: (...args: unknown[]) => void;
274
+ warn: (...args: unknown[]) => void;
275
+ error: (...args: unknown[]) => void;
276
+ }
277
+ /**
278
+ * API response wrapper (discriminated union for type safety)
279
+ *
280
+ * Either data is present (success) or error is present (failure), never both.
281
+ */
282
+ type FFIDAnnouncementsApiResponse<T> = {
283
+ data: T;
284
+ error?: undefined;
285
+ } | {
286
+ data?: undefined;
287
+ error: FFIDAnnouncementsError;
288
+ };
289
+ /**
290
+ * Known SDK error codes.
291
+ * Uses string union with open extension for forward compatibility with server error codes.
292
+ */
293
+ type FFIDAnnouncementsErrorCode = 'NETWORK_ERROR' | 'PARSE_ERROR' | 'UNKNOWN_ERROR' | (string & {});
294
+ /** Error from the Announcements SDK */
295
+ interface FFIDAnnouncementsError {
296
+ /** Error code (known SDK codes provide autocomplete; server codes also accepted) */
297
+ code: FFIDAnnouncementsErrorCode;
298
+ /** Human-readable error message */
299
+ message: string;
300
+ }
301
+ /** Server response envelope */
302
+ type FFIDAnnouncementsServerResponse<T> = {
303
+ success: true;
304
+ data: T;
305
+ error?: undefined;
306
+ } | {
307
+ success: false;
308
+ data?: undefined;
309
+ error?: {
310
+ code: string;
311
+ message: string;
312
+ };
313
+ };
314
+
315
+ /** Options for the useFFIDAnnouncements hook */
316
+ interface UseFFIDAnnouncementsOptions {
317
+ /** Number of items to fetch (default: 20) */
318
+ limit?: number;
319
+ /** Offset for pagination (default: 0) */
320
+ offset?: number;
321
+ /** FFID API base URL (defaults to production) */
322
+ apiBaseUrl?: string;
323
+ /** Enable debug logging */
324
+ debug?: boolean;
325
+ /** Auto-fetch on mount (default: true) */
326
+ enabled?: boolean;
327
+ }
328
+ /** Return type for the useFFIDAnnouncements hook */
329
+ interface UseFFIDAnnouncementsReturn {
330
+ /** List of announcements */
331
+ announcements: Announcement[];
332
+ /** Total number of announcements */
333
+ total: number;
334
+ /** Number of unread announcements */
335
+ unreadCount: number;
336
+ /** Whether data is being loaded */
337
+ isLoading: boolean;
338
+ /** Any error that occurred */
339
+ error: FFIDAnnouncementsError | null;
340
+ /** Refetch announcements */
341
+ refetch: () => Promise<void>;
342
+ /** Mark all announcements as read */
343
+ markAsRead: () => void;
344
+ }
345
+ /**
346
+ * Hook to fetch and manage announcements from FFID Platform
347
+ *
348
+ * Tracks unread count by storing the last read timestamp in localStorage.
349
+ * Announcements published after the last read time are counted as unread.
350
+ */
351
+ declare function useFFIDAnnouncements(options?: UseFFIDAnnouncementsOptions): UseFFIDAnnouncementsReturn;
352
+
184
353
  interface FFIDLoginButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
185
354
  /** Button content */
186
355
  children?: ReactNode;
@@ -319,4 +488,80 @@ interface FFIDSubscriptionBadgeProps {
319
488
  */
320
489
  declare function FFIDSubscriptionBadge({ className, classNames, style, showPlanName, labels, render, }: FFIDSubscriptionBadgeProps): react_jsx_runtime.JSX.Element;
321
490
 
322
- export { type FFIDConfig as F, type FFIDUser as a, type FFIDOrganization as b, type FFIDError as c, type FFIDSubscriptionContextValue as d, type FFIDApiResponse as e, type FFIDContextValue as f, type FFIDLogger as g, FFIDLoginButton as h, FFIDOrganizationSwitcher as i, type FFIDSessionResponse as j, type FFIDSubscription as k, FFIDSubscriptionBadge as l, FFIDUserMenu as m, type FFIDLoginButtonProps as n, type FFIDOrganizationSwitcherClassNames as o, type FFIDOrganizationSwitcherProps as p, type FFIDSubscriptionBadgeClassNames as q, type FFIDSubscriptionBadgeProps as r, type FFIDUserMenuClassNames as s, type FFIDUserMenuProps as t };
491
+ /** ClassNames for styling individual parts */
492
+ interface FFIDAnnouncementBadgeClassNames {
493
+ /** The button wrapper element */
494
+ button?: string;
495
+ /** The badge count element */
496
+ badge?: string;
497
+ /** The bell icon SVG */
498
+ icon?: string;
499
+ }
500
+ interface FFIDAnnouncementBadgeProps {
501
+ /** Click handler (e.g., open announcement panel) */
502
+ onClick?: () => void;
503
+ /** Custom class name (applies to button) */
504
+ className?: string;
505
+ /** Class names for individual parts */
506
+ classNames?: FFIDAnnouncementBadgeClassNames;
507
+ /** Custom style for the button */
508
+ style?: CSSProperties;
509
+ /** Options passed to useFFIDAnnouncements */
510
+ announcementOptions?: UseFFIDAnnouncementsOptions;
511
+ /** Icon size in pixels (default: 20) */
512
+ iconSize?: number;
513
+ /** Accessible label (default: 'お知らせ') */
514
+ ariaLabel?: string;
515
+ }
516
+ /**
517
+ * Announcement badge with bell icon and unread count
518
+ */
519
+ declare function FFIDAnnouncementBadge({ onClick, className, classNames, style, announcementOptions, iconSize, ariaLabel, }: FFIDAnnouncementBadgeProps): react_jsx_runtime.JSX.Element;
520
+
521
+ /** ClassNames for styling individual parts */
522
+ interface FFIDAnnouncementListClassNames {
523
+ /** The list container */
524
+ container?: string;
525
+ /** Each announcement item */
526
+ item?: string;
527
+ /** The type icon */
528
+ icon?: string;
529
+ /** The title text */
530
+ title?: string;
531
+ /** The content text */
532
+ content?: string;
533
+ /** The timestamp */
534
+ timestamp?: string;
535
+ /** Affected service tag */
536
+ serviceTag?: string;
537
+ /** Empty state message */
538
+ empty?: string;
539
+ }
540
+ interface FFIDAnnouncementListProps {
541
+ /** Announcements to display */
542
+ announcements: Announcement[];
543
+ /** Whether data is loading */
544
+ isLoading?: boolean;
545
+ /** Custom class name (applies to container) */
546
+ className?: string;
547
+ /** Class names for individual parts */
548
+ classNames?: FFIDAnnouncementListClassNames;
549
+ /** Custom style for the container */
550
+ style?: CSSProperties;
551
+ /** Date/time formatter (default: Japanese locale) */
552
+ formatDate?: (dateStr: string) => string;
553
+ /** Empty state message */
554
+ emptyMessage?: ReactNode;
555
+ /** Loading state render */
556
+ loadingRender?: ReactNode;
557
+ /** Custom item render */
558
+ renderItem?: (announcement: Announcement) => ReactNode;
559
+ /** Max lines for content preview (0 = hide content) */
560
+ maxContentLines?: number;
561
+ }
562
+ /**
563
+ * Announcement list component
564
+ */
565
+ declare function FFIDAnnouncementList({ announcements, isLoading, className, classNames, style, formatDate, emptyMessage, loadingRender, renderItem, maxContentLines, }: FFIDAnnouncementListProps): react_jsx_runtime.JSX.Element;
566
+
567
+ export { type AnnouncementListResponse as A, type FFIDAnnouncementBadgeClassNames as B, type FFIDAnnouncementBadgeProps as C, type FFIDAnnouncementListClassNames as D, type FFIDAnnouncementListProps as E, type FFIDConfig as F, type FFIDLoginButtonProps as G, type FFIDOrganizationSwitcherClassNames as H, type FFIDOrganizationSwitcherProps as I, type FFIDSubscriptionBadgeClassNames as J, type FFIDSubscriptionBadgeProps as K, type ListAnnouncementsOptions as L, type FFIDUserMenuClassNames as M, type FFIDUserMenuProps as N, type UseFFIDAnnouncementsOptions as U, type FFIDUser as a, type FFIDOrganization as b, type FFIDError as c, type FFIDSubscriptionContextValue as d, type FFIDAnnouncementsClientConfig as e, type FFIDAnnouncementsApiResponse as f, type FFIDAnnouncementsLogger as g, type Announcement as h, type AnnouncementStatus as i, type AnnouncementType as j, FFIDAnnouncementBadge as k, FFIDAnnouncementList as l, type FFIDAnnouncementsError as m, type FFIDAnnouncementsErrorCode as n, type FFIDAnnouncementsServerResponse as o, type FFIDApiResponse as p, type FFIDContextValue as q, type FFIDLogger as r, FFIDLoginButton as s, FFIDOrganizationSwitcher as t, type FFIDSessionResponse as u, type FFIDSubscription as v, FFIDSubscriptionBadge as w, FFIDUserMenu as x, type UseFFIDAnnouncementsReturn as y, useFFIDAnnouncements as z };
@@ -25,6 +25,26 @@ interface FFIDUser {
25
25
  /** Account creation timestamp */
26
26
  createdAt: string;
27
27
  }
28
+ /**
29
+ * Agency branding information for white-label support.
30
+ * Included in organization when it is linked to an agency.
31
+ */
32
+ interface FFIDAgencyBranding {
33
+ /** Agency ID (UUID) */
34
+ agencyId: string;
35
+ /** Agency display name */
36
+ agencyName: string;
37
+ /** Custom logo URL */
38
+ logoUrl?: string;
39
+ /** Custom favicon URL */
40
+ faviconUrl?: string;
41
+ /** Primary brand color (hex) */
42
+ primaryColor?: string;
43
+ /** Secondary brand color (hex) */
44
+ secondaryColor?: string;
45
+ /** White-label company name */
46
+ companyName?: string;
47
+ }
28
48
  /**
29
49
  * Organization membership information
30
50
  */
@@ -39,6 +59,8 @@ interface FFIDOrganization {
39
59
  role: 'owner' | 'admin' | 'member';
40
60
  /** Membership status */
41
61
  status: 'active' | 'invited' | 'suspended';
62
+ /** Agency branding (null if org is not linked to an agency) */
63
+ agencyBranding: FFIDAgencyBranding | null;
42
64
  }
43
65
  /**
44
66
  * Subscription/contract information
@@ -181,6 +203,153 @@ type FFIDApiResponse<T> = {
181
203
  error: FFIDError;
182
204
  };
183
205
 
206
+ /**
207
+ * FFID Announcements SDK Type Definitions
208
+ *
209
+ * Types for the FeelFlow ID Announcements SDK.
210
+ * Used by client applications to fetch and display announcements.
211
+ * Issue: #286
212
+ */
213
+ /**
214
+ * Announcement type values.
215
+ * Uses string union with open extension for forward compatibility.
216
+ */
217
+ type AnnouncementType = 'maintenance.scheduled' | 'maintenance.reminder' | 'maintenance.started' | 'maintenance.completed' | 'incident.detected' | 'incident.resolved' | 'api.deprecation' | 'api.breaking_change' | 'sdk.update_available' | 'security.advisory' | 'billing.payment_reminder' | 'billing.payment_failed' | 'legal.terms_updated' | 'account.security_alert' | (string & {});
218
+ /** Announcement status (only 'published' is visible via public API) */
219
+ type AnnouncementStatus = 'draft' | 'published' | 'archived';
220
+ /** Single announcement returned from the public API */
221
+ interface Announcement {
222
+ /** Announcement ID (UUID) */
223
+ id: string;
224
+ /** Announcement type */
225
+ type: AnnouncementType;
226
+ /** Title */
227
+ title: string;
228
+ /** Content (Markdown) */
229
+ content: string;
230
+ /** Announcement status */
231
+ status: AnnouncementStatus;
232
+ /** Scheduled maintenance start time (ISO 8601) */
233
+ scheduledAt: string | null;
234
+ /** Maintenance duration in minutes */
235
+ durationMinutes: number | null;
236
+ /** Affected service codes */
237
+ affectedServices: string[];
238
+ /** Notification channels */
239
+ channels: string[];
240
+ /** When the announcement was published (ISO 8601) */
241
+ publishedAt: string | null;
242
+ /** Created timestamp (ISO 8601) */
243
+ createdAt: string;
244
+ /** Updated timestamp (ISO 8601) */
245
+ updatedAt: string;
246
+ }
247
+ /** Response from list announcements endpoint */
248
+ interface AnnouncementListResponse {
249
+ /** List of announcements */
250
+ announcements: Announcement[];
251
+ /** Total number of matching announcements */
252
+ total: number;
253
+ }
254
+ /** Options for listing announcements */
255
+ interface ListAnnouncementsOptions {
256
+ /** Number of items to return (server default: 20, server max: 100) */
257
+ limit?: number;
258
+ /** Offset for pagination (default: 0) */
259
+ offset?: number;
260
+ }
261
+ /** Configuration for the FFID Announcements Client */
262
+ interface FFIDAnnouncementsClientConfig {
263
+ /** FFID API base URL (defaults to https://id.feelflow.co.jp) */
264
+ apiBaseUrl?: string | undefined;
265
+ /** Enable debug logging */
266
+ debug?: boolean | undefined;
267
+ /** Custom logger */
268
+ logger?: FFIDAnnouncementsLogger | undefined;
269
+ }
270
+ /** Logger interface for Announcements SDK */
271
+ interface FFIDAnnouncementsLogger {
272
+ debug: (...args: unknown[]) => void;
273
+ info: (...args: unknown[]) => void;
274
+ warn: (...args: unknown[]) => void;
275
+ error: (...args: unknown[]) => void;
276
+ }
277
+ /**
278
+ * API response wrapper (discriminated union for type safety)
279
+ *
280
+ * Either data is present (success) or error is present (failure), never both.
281
+ */
282
+ type FFIDAnnouncementsApiResponse<T> = {
283
+ data: T;
284
+ error?: undefined;
285
+ } | {
286
+ data?: undefined;
287
+ error: FFIDAnnouncementsError;
288
+ };
289
+ /**
290
+ * Known SDK error codes.
291
+ * Uses string union with open extension for forward compatibility with server error codes.
292
+ */
293
+ type FFIDAnnouncementsErrorCode = 'NETWORK_ERROR' | 'PARSE_ERROR' | 'UNKNOWN_ERROR' | (string & {});
294
+ /** Error from the Announcements SDK */
295
+ interface FFIDAnnouncementsError {
296
+ /** Error code (known SDK codes provide autocomplete; server codes also accepted) */
297
+ code: FFIDAnnouncementsErrorCode;
298
+ /** Human-readable error message */
299
+ message: string;
300
+ }
301
+ /** Server response envelope */
302
+ type FFIDAnnouncementsServerResponse<T> = {
303
+ success: true;
304
+ data: T;
305
+ error?: undefined;
306
+ } | {
307
+ success: false;
308
+ data?: undefined;
309
+ error?: {
310
+ code: string;
311
+ message: string;
312
+ };
313
+ };
314
+
315
+ /** Options for the useFFIDAnnouncements hook */
316
+ interface UseFFIDAnnouncementsOptions {
317
+ /** Number of items to fetch (default: 20) */
318
+ limit?: number;
319
+ /** Offset for pagination (default: 0) */
320
+ offset?: number;
321
+ /** FFID API base URL (defaults to production) */
322
+ apiBaseUrl?: string;
323
+ /** Enable debug logging */
324
+ debug?: boolean;
325
+ /** Auto-fetch on mount (default: true) */
326
+ enabled?: boolean;
327
+ }
328
+ /** Return type for the useFFIDAnnouncements hook */
329
+ interface UseFFIDAnnouncementsReturn {
330
+ /** List of announcements */
331
+ announcements: Announcement[];
332
+ /** Total number of announcements */
333
+ total: number;
334
+ /** Number of unread announcements */
335
+ unreadCount: number;
336
+ /** Whether data is being loaded */
337
+ isLoading: boolean;
338
+ /** Any error that occurred */
339
+ error: FFIDAnnouncementsError | null;
340
+ /** Refetch announcements */
341
+ refetch: () => Promise<void>;
342
+ /** Mark all announcements as read */
343
+ markAsRead: () => void;
344
+ }
345
+ /**
346
+ * Hook to fetch and manage announcements from FFID Platform
347
+ *
348
+ * Tracks unread count by storing the last read timestamp in localStorage.
349
+ * Announcements published after the last read time are counted as unread.
350
+ */
351
+ declare function useFFIDAnnouncements(options?: UseFFIDAnnouncementsOptions): UseFFIDAnnouncementsReturn;
352
+
184
353
  interface FFIDLoginButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
185
354
  /** Button content */
186
355
  children?: ReactNode;
@@ -319,4 +488,80 @@ interface FFIDSubscriptionBadgeProps {
319
488
  */
320
489
  declare function FFIDSubscriptionBadge({ className, classNames, style, showPlanName, labels, render, }: FFIDSubscriptionBadgeProps): react_jsx_runtime.JSX.Element;
321
490
 
322
- export { type FFIDConfig as F, type FFIDUser as a, type FFIDOrganization as b, type FFIDError as c, type FFIDSubscriptionContextValue as d, type FFIDApiResponse as e, type FFIDContextValue as f, type FFIDLogger as g, FFIDLoginButton as h, FFIDOrganizationSwitcher as i, type FFIDSessionResponse as j, type FFIDSubscription as k, FFIDSubscriptionBadge as l, FFIDUserMenu as m, type FFIDLoginButtonProps as n, type FFIDOrganizationSwitcherClassNames as o, type FFIDOrganizationSwitcherProps as p, type FFIDSubscriptionBadgeClassNames as q, type FFIDSubscriptionBadgeProps as r, type FFIDUserMenuClassNames as s, type FFIDUserMenuProps as t };
491
+ /** ClassNames for styling individual parts */
492
+ interface FFIDAnnouncementBadgeClassNames {
493
+ /** The button wrapper element */
494
+ button?: string;
495
+ /** The badge count element */
496
+ badge?: string;
497
+ /** The bell icon SVG */
498
+ icon?: string;
499
+ }
500
+ interface FFIDAnnouncementBadgeProps {
501
+ /** Click handler (e.g., open announcement panel) */
502
+ onClick?: () => void;
503
+ /** Custom class name (applies to button) */
504
+ className?: string;
505
+ /** Class names for individual parts */
506
+ classNames?: FFIDAnnouncementBadgeClassNames;
507
+ /** Custom style for the button */
508
+ style?: CSSProperties;
509
+ /** Options passed to useFFIDAnnouncements */
510
+ announcementOptions?: UseFFIDAnnouncementsOptions;
511
+ /** Icon size in pixels (default: 20) */
512
+ iconSize?: number;
513
+ /** Accessible label (default: 'お知らせ') */
514
+ ariaLabel?: string;
515
+ }
516
+ /**
517
+ * Announcement badge with bell icon and unread count
518
+ */
519
+ declare function FFIDAnnouncementBadge({ onClick, className, classNames, style, announcementOptions, iconSize, ariaLabel, }: FFIDAnnouncementBadgeProps): react_jsx_runtime.JSX.Element;
520
+
521
+ /** ClassNames for styling individual parts */
522
+ interface FFIDAnnouncementListClassNames {
523
+ /** The list container */
524
+ container?: string;
525
+ /** Each announcement item */
526
+ item?: string;
527
+ /** The type icon */
528
+ icon?: string;
529
+ /** The title text */
530
+ title?: string;
531
+ /** The content text */
532
+ content?: string;
533
+ /** The timestamp */
534
+ timestamp?: string;
535
+ /** Affected service tag */
536
+ serviceTag?: string;
537
+ /** Empty state message */
538
+ empty?: string;
539
+ }
540
+ interface FFIDAnnouncementListProps {
541
+ /** Announcements to display */
542
+ announcements: Announcement[];
543
+ /** Whether data is loading */
544
+ isLoading?: boolean;
545
+ /** Custom class name (applies to container) */
546
+ className?: string;
547
+ /** Class names for individual parts */
548
+ classNames?: FFIDAnnouncementListClassNames;
549
+ /** Custom style for the container */
550
+ style?: CSSProperties;
551
+ /** Date/time formatter (default: Japanese locale) */
552
+ formatDate?: (dateStr: string) => string;
553
+ /** Empty state message */
554
+ emptyMessage?: ReactNode;
555
+ /** Loading state render */
556
+ loadingRender?: ReactNode;
557
+ /** Custom item render */
558
+ renderItem?: (announcement: Announcement) => ReactNode;
559
+ /** Max lines for content preview (0 = hide content) */
560
+ maxContentLines?: number;
561
+ }
562
+ /**
563
+ * Announcement list component
564
+ */
565
+ declare function FFIDAnnouncementList({ announcements, isLoading, className, classNames, style, formatDate, emptyMessage, loadingRender, renderItem, maxContentLines, }: FFIDAnnouncementListProps): react_jsx_runtime.JSX.Element;
566
+
567
+ export { type AnnouncementListResponse as A, type FFIDAnnouncementBadgeClassNames as B, type FFIDAnnouncementBadgeProps as C, type FFIDAnnouncementListClassNames as D, type FFIDAnnouncementListProps as E, type FFIDConfig as F, type FFIDLoginButtonProps as G, type FFIDOrganizationSwitcherClassNames as H, type FFIDOrganizationSwitcherProps as I, type FFIDSubscriptionBadgeClassNames as J, type FFIDSubscriptionBadgeProps as K, type ListAnnouncementsOptions as L, type FFIDUserMenuClassNames as M, type FFIDUserMenuProps as N, type UseFFIDAnnouncementsOptions as U, type FFIDUser as a, type FFIDOrganization as b, type FFIDError as c, type FFIDSubscriptionContextValue as d, type FFIDAnnouncementsClientConfig as e, type FFIDAnnouncementsApiResponse as f, type FFIDAnnouncementsLogger as g, type Announcement as h, type AnnouncementStatus as i, type AnnouncementType as j, FFIDAnnouncementBadge as k, FFIDAnnouncementList as l, type FFIDAnnouncementsError as m, type FFIDAnnouncementsErrorCode as n, type FFIDAnnouncementsServerResponse as o, type FFIDApiResponse as p, type FFIDContextValue as q, type FFIDLogger as r, FFIDLoginButton as s, FFIDOrganizationSwitcher as t, type FFIDSessionResponse as u, type FFIDSubscription as v, FFIDSubscriptionBadge as w, FFIDUserMenu as x, type UseFFIDAnnouncementsReturn as y, useFFIDAnnouncements as z };
package/dist/index.cjs CHANGED
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
- var chunkYCMQXJOS_cjs = require('./chunk-YCMQXJOS.cjs');
3
+ var chunkA6YJDYIX_cjs = require('./chunk-A6YJDYIX.cjs');
4
4
  var react = require('react');
5
5
  var jsxRuntime = require('react/jsx-runtime');
6
6
 
7
7
  function withFFIDAuth(Component, options = {}) {
8
8
  const WrappedComponent = (props) => {
9
- const { isLoading, isAuthenticated, login } = chunkYCMQXJOS_cjs.useFFIDContext();
9
+ const { isLoading, isAuthenticated, login } = chunkA6YJDYIX_cjs.useFFIDContext();
10
10
  const hasRedirected = react.useRef(false);
11
11
  react.useEffect(() => {
12
12
  if (!isLoading && !isAuthenticated && options.redirectToLogin && !hasRedirected.current) {
@@ -31,38 +31,58 @@ function withFFIDAuth(Component, options = {}) {
31
31
 
32
32
  Object.defineProperty(exports, "DEFAULT_API_BASE_URL", {
33
33
  enumerable: true,
34
- get: function () { return chunkYCMQXJOS_cjs.DEFAULT_API_BASE_URL; }
34
+ get: function () { return chunkA6YJDYIX_cjs.DEFAULT_API_BASE_URL; }
35
+ });
36
+ Object.defineProperty(exports, "FFIDAnnouncementBadge", {
37
+ enumerable: true,
38
+ get: function () { return chunkA6YJDYIX_cjs.FFIDAnnouncementBadge; }
39
+ });
40
+ Object.defineProperty(exports, "FFIDAnnouncementList", {
41
+ enumerable: true,
42
+ get: function () { return chunkA6YJDYIX_cjs.FFIDAnnouncementList; }
35
43
  });
36
44
  Object.defineProperty(exports, "FFIDLoginButton", {
37
45
  enumerable: true,
38
- get: function () { return chunkYCMQXJOS_cjs.FFIDLoginButton; }
46
+ get: function () { return chunkA6YJDYIX_cjs.FFIDLoginButton; }
39
47
  });
40
48
  Object.defineProperty(exports, "FFIDOrganizationSwitcher", {
41
49
  enumerable: true,
42
- get: function () { return chunkYCMQXJOS_cjs.FFIDOrganizationSwitcher; }
50
+ get: function () { return chunkA6YJDYIX_cjs.FFIDOrganizationSwitcher; }
43
51
  });
44
52
  Object.defineProperty(exports, "FFIDProvider", {
45
53
  enumerable: true,
46
- get: function () { return chunkYCMQXJOS_cjs.FFIDProvider; }
54
+ get: function () { return chunkA6YJDYIX_cjs.FFIDProvider; }
47
55
  });
48
56
  Object.defineProperty(exports, "FFIDSubscriptionBadge", {
49
57
  enumerable: true,
50
- get: function () { return chunkYCMQXJOS_cjs.FFIDSubscriptionBadge; }
58
+ get: function () { return chunkA6YJDYIX_cjs.FFIDSubscriptionBadge; }
51
59
  });
52
60
  Object.defineProperty(exports, "FFIDUserMenu", {
53
61
  enumerable: true,
54
- get: function () { return chunkYCMQXJOS_cjs.FFIDUserMenu; }
62
+ get: function () { return chunkA6YJDYIX_cjs.FFIDUserMenu; }
63
+ });
64
+ Object.defineProperty(exports, "FFID_ANNOUNCEMENTS_ERROR_CODES", {
65
+ enumerable: true,
66
+ get: function () { return chunkA6YJDYIX_cjs.FFID_ANNOUNCEMENTS_ERROR_CODES; }
67
+ });
68
+ Object.defineProperty(exports, "createFFIDAnnouncementsClient", {
69
+ enumerable: true,
70
+ get: function () { return chunkA6YJDYIX_cjs.createFFIDAnnouncementsClient; }
55
71
  });
56
72
  Object.defineProperty(exports, "useFFID", {
57
73
  enumerable: true,
58
- get: function () { return chunkYCMQXJOS_cjs.useFFID; }
74
+ get: function () { return chunkA6YJDYIX_cjs.useFFID; }
75
+ });
76
+ Object.defineProperty(exports, "useFFIDAnnouncements", {
77
+ enumerable: true,
78
+ get: function () { return chunkA6YJDYIX_cjs.useFFIDAnnouncements; }
59
79
  });
60
80
  Object.defineProperty(exports, "useSubscription", {
61
81
  enumerable: true,
62
- get: function () { return chunkYCMQXJOS_cjs.useSubscription; }
82
+ get: function () { return chunkA6YJDYIX_cjs.useSubscription; }
63
83
  });
64
84
  Object.defineProperty(exports, "withSubscription", {
65
85
  enumerable: true,
66
- get: function () { return chunkYCMQXJOS_cjs.withSubscription; }
86
+ get: function () { return chunkA6YJDYIX_cjs.withSubscription; }
67
87
  });
68
88
  exports.withFFIDAuth = withFFIDAuth;