@burdenoff/microfe-notification 2026.525.1 → 2026.525.3
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/package.json +1 -1
- package/dist/AdminNotificationRoot.d.ts +0 -35
- package/dist/AdminNotificationRoot.d.ts.map +0 -1
- package/dist/AdminNotificationRoutes.d.ts +0 -2
- package/dist/AdminNotificationRoutes.d.ts.map +0 -1
- package/dist/NotificationRoot.d.ts +0 -31
- package/dist/NotificationRoot.d.ts.map +0 -1
- package/dist/NotificationRoutes.d.ts +0 -17
- package/dist/NotificationRoutes.d.ts.map +0 -1
- package/dist/UserNotificationRoot.d.ts +0 -34
- package/dist/UserNotificationRoot.d.ts.map +0 -1
- package/dist/UserNotificationRoutes.d.ts +0 -15
- package/dist/UserNotificationRoutes.d.ts.map +0 -1
- package/dist/__tests__/setup.d.ts +0 -2
- package/dist/__tests__/setup.d.ts.map +0 -1
- package/dist/components/FeatureDisabledPage.d.ts +0 -7
- package/dist/components/FeatureDisabledPage.d.ts.map +0 -1
- package/dist/components/NotificationBell.d.ts +0 -14
- package/dist/components/NotificationBell.d.ts.map +0 -1
- package/dist/components/NotificationCard.d.ts +0 -20
- package/dist/components/NotificationCard.d.ts.map +0 -1
- package/dist/components/NotificationPanel.d.ts +0 -11
- package/dist/components/NotificationPanel.d.ts.map +0 -1
- package/dist/components/RecipientSelector.d.ts +0 -34
- package/dist/components/RecipientSelector.d.ts.map +0 -1
- package/dist/components/TemplatePreview.d.ts +0 -22
- package/dist/components/TemplatePreview.d.ts.map +0 -1
- package/dist/components/VariableInserter.d.ts +0 -12
- package/dist/components/VariableInserter.d.ts.map +0 -1
- package/dist/components/index.d.ts +0 -4
- package/dist/components/index.d.ts.map +0 -1
- package/dist/constants/permissions.d.ts +0 -24
- package/dist/constants/permissions.d.ts.map +0 -1
- package/dist/dev/main.d.ts +0 -2
- package/dist/dev/main.d.ts.map +0 -1
- package/dist/generated/global-operations.d.ts +0 -1956
- package/dist/generated/global-operations.d.ts.map +0 -1
- package/dist/generated/global-types.d.ts +0 -23527
- package/dist/generated/global-types.d.ts.map +0 -1
- package/dist/generated/wspace-operations.d.ts +0 -2
- package/dist/generated/wspace-operations.d.ts.map +0 -1
- package/dist/generated/wspace-types.d.ts +0 -57851
- package/dist/generated/wspace-types.d.ts.map +0 -1
- package/dist/graphql/global-client.d.ts +0 -19
- package/dist/graphql/global-client.d.ts.map +0 -1
- package/dist/hooks/index.d.ts +0 -8
- package/dist/hooks/index.d.ts.map +0 -1
- package/dist/hooks/useNotificationAdmin.d.ts +0 -51
- package/dist/hooks/useNotificationAdmin.d.ts.map +0 -1
- package/dist/hooks/useNotificationAnalytics.d.ts +0 -67
- package/dist/hooks/useNotificationAnalytics.d.ts.map +0 -1
- package/dist/hooks/useNotificationPreferences.d.ts +0 -12
- package/dist/hooks/useNotificationPreferences.d.ts.map +0 -1
- package/dist/hooks/useNotificationTemplates.d.ts +0 -136
- package/dist/hooks/useNotificationTemplates.d.ts.map +0 -1
- package/dist/hooks/useNotificationTopics.d.ts +0 -36
- package/dist/hooks/useNotificationTopics.d.ts.map +0 -1
- package/dist/hooks/useNotifications.d.ts +0 -41
- package/dist/hooks/useNotifications.d.ts.map +0 -1
- package/dist/hooks/useSendNotification.d.ts +0 -159
- package/dist/hooks/useSendNotification.d.ts.map +0 -1
- package/dist/hooks/useUserSearch.d.ts +0 -27
- package/dist/hooks/useUserSearch.d.ts.map +0 -1
- package/dist/index.d.ts +0 -37
- package/dist/index.d.ts.map +0 -1
- package/dist/pages/CreateNotificationPage.d.ts +0 -6
- package/dist/pages/CreateNotificationPage.d.ts.map +0 -1
- package/dist/pages/NotificationCenterPage.d.ts +0 -7
- package/dist/pages/NotificationCenterPage.d.ts.map +0 -1
- package/dist/pages/NotificationHistoryAdminPage.d.ts +0 -3
- package/dist/pages/NotificationHistoryAdminPage.d.ts.map +0 -1
- package/dist/pages/NotificationHistoryPage.d.ts +0 -3
- package/dist/pages/NotificationHistoryPage.d.ts.map +0 -1
- package/dist/pages/NotificationLandingPage.d.ts +0 -11
- package/dist/pages/NotificationLandingPage.d.ts.map +0 -1
- package/dist/pages/NotificationPreferencesPage.d.ts +0 -2
- package/dist/pages/NotificationPreferencesPage.d.ts.map +0 -1
- package/dist/pages/NotificationTemplatesPage.d.ts +0 -8
- package/dist/pages/NotificationTemplatesPage.d.ts.map +0 -1
- package/dist/pages/NotificationTopicsPage.d.ts +0 -2
- package/dist/pages/NotificationTopicsPage.d.ts.map +0 -1
- package/dist/pages/TemplateEditorPage.d.ts +0 -13
- package/dist/pages/TemplateEditorPage.d.ts.map +0 -1
- package/dist/providers/NotificationProvider.d.ts +0 -19
- package/dist/providers/NotificationProvider.d.ts.map +0 -1
- package/dist/shared/hooks/useTr.d.ts +0 -14
- package/dist/shared/hooks/useTr.d.ts.map +0 -1
- package/dist/store/notificationStore.d.ts +0 -32
- package/dist/store/notificationStore.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -251
- package/dist/types/index.d.ts.map +0 -1
- package/dist/utils/index.d.ts +0 -68
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/nativeBridge.d.ts +0 -3
- package/dist/utils/nativeBridge.d.ts.map +0 -1
- package/dist/utils/notificationHistoryExport.d.ts +0 -13
- package/dist/utils/notificationHistoryExport.d.ts.map +0 -1
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { ApolloClient } from '@apollo/client';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Default Global Gateway URL
|
|
5
|
-
* Notifications are a GLOBAL service and must use the global gateway
|
|
6
|
-
*/
|
|
7
|
-
export declare const DEFAULT_GLOBAL_GATEWAY_URL = "https://gw-global.local.burdenoff.com/global/graphql";
|
|
8
|
-
/**
|
|
9
|
-
* Get or create the singleton Apollo client for global notification operations
|
|
10
|
-
*
|
|
11
|
-
* @param globalGatewayUrl - Global Gateway GraphQL URL (default: https://gw-global.local.burdenoff.com/global/graphql)
|
|
12
|
-
* @param authToken - Optional JWT auth token
|
|
13
|
-
*/
|
|
14
|
-
export declare function getGlobalNotificationClient(globalGatewayUrl?: string, authToken?: string): InstanceType<typeof ApolloClient>;
|
|
15
|
-
/**
|
|
16
|
-
* Reset the singleton client (useful for testing or re-initialization)
|
|
17
|
-
*/
|
|
18
|
-
export declare function resetGlobalNotificationClient(): void;
|
|
19
|
-
//# sourceMappingURL=global-client.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"global-client.d.ts","sourceRoot":"","sources":["../../src/graphql/global-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAwC,MAAM,gBAAgB,CAAC;AAmCpF;;;GAGG;AACH,eAAO,MAAM,0BAA0B,yDAAyD,CAAC;AAejG;;;;;GAKG;AACH,wBAAgB,2BAA2B,CACzC,gBAAgB,CAAC,EAAE,MAAM,EACzB,SAAS,CAAC,EAAE,MAAM,GACjB,YAAY,CAAC,OAAO,YAAY,CAAC,CA4GnC;AAED;;GAEG;AACH,wBAAgB,6BAA6B,IAAI,IAAI,CAOpD"}
|
package/dist/hooks/index.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export { useNotifications } from './useNotifications';
|
|
2
|
-
export { useNotificationAdmin } from './useNotificationAdmin';
|
|
3
|
-
export { useNotificationPreferences } from './useNotificationPreferences';
|
|
4
|
-
export { useNotificationTopics } from './useNotificationTopics';
|
|
5
|
-
export { useNotificationAnalytics } from './useNotificationAnalytics';
|
|
6
|
-
export { useNotificationStore } from '../store/notificationStore';
|
|
7
|
-
export { useNotification } from '../providers/NotificationProvider';
|
|
8
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { Notification, NotificationAdminFilters } from '../types';
|
|
2
|
-
|
|
3
|
-
export declare function useNotificationAdmin(): {
|
|
4
|
-
filters: NotificationAdminFilters;
|
|
5
|
-
setFilters: import('react').Dispatch<import('react').SetStateAction<NotificationAdminFilters>>;
|
|
6
|
-
notifications: Notification[];
|
|
7
|
-
scheduledNotifications: {
|
|
8
|
-
__typename?: "ScheduledNotification";
|
|
9
|
-
id: string;
|
|
10
|
-
scheduledFor: string;
|
|
11
|
-
status: import('../generated/global-types').ScheduledNotificationStatus;
|
|
12
|
-
timezone?: string | null;
|
|
13
|
-
retryCount: number;
|
|
14
|
-
errorMessage?: string | null;
|
|
15
|
-
createdAt: string;
|
|
16
|
-
notification: {
|
|
17
|
-
__typename?: "Notification";
|
|
18
|
-
id: string;
|
|
19
|
-
title: string;
|
|
20
|
-
message: string;
|
|
21
|
-
type: import('../generated/global-types').NotificationType;
|
|
22
|
-
priority: import('../generated/global-types').NotificationPriority;
|
|
23
|
-
channel: import('../generated/global-types').NotificationChannel;
|
|
24
|
-
userId: string;
|
|
25
|
-
topicId?: string | null;
|
|
26
|
-
};
|
|
27
|
-
}[];
|
|
28
|
-
selectedNotification: Notification | null;
|
|
29
|
-
events: {
|
|
30
|
-
__typename?: "NotificationEvent";
|
|
31
|
-
id: string;
|
|
32
|
-
notificationId: string;
|
|
33
|
-
eventType: import('../generated/global-types').NotificationEventType;
|
|
34
|
-
deliveryStatus?: import('../generated/global-types').NotificationDeliveryStatus | null;
|
|
35
|
-
timestamp: string;
|
|
36
|
-
externalId?: string | null;
|
|
37
|
-
channelServiceEventId?: string | null;
|
|
38
|
-
details?: Record<string, unknown> | null;
|
|
39
|
-
metadata?: Record<string, unknown> | null;
|
|
40
|
-
}[];
|
|
41
|
-
isLoading: boolean;
|
|
42
|
-
error: string | null;
|
|
43
|
-
refetch: () => Promise<void>;
|
|
44
|
-
loadNotification: (notificationId: string) => Promise<void>;
|
|
45
|
-
archiveNotification: (notificationId: string) => Promise<void>;
|
|
46
|
-
unarchiveNotification: (notificationId: string) => Promise<void>;
|
|
47
|
-
cancelScheduledNotification: (scheduledNotificationId: string) => Promise<void>;
|
|
48
|
-
rescheduleNotification: (scheduledNotificationId: string, scheduledFor: string, timezone?: string) => Promise<void>;
|
|
49
|
-
clearSelection: () => void;
|
|
50
|
-
};
|
|
51
|
-
//# sourceMappingURL=useNotificationAdmin.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useNotificationAdmin.d.ts","sourceRoot":"","sources":["../../src/hooks/useNotificationAdmin.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AA+GvE,wBAAgB,oBAAoB;;;;;;;;;;;;;;sBAkL2na,CAAC;;;;;;;;mBAA6L,CAAC;;;;;;;;;;;;;;;;;;;uCAhHn0a,MAAM;0CA+BN,MAAM;4CAYN,MAAM;2DAYG,MAAM;sDAaN,MAAM,gBAAgB,MAAM,aAAa,MAAM;;EA2ClF"}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { Notification, NotificationPreferenceScope } from '../types';
|
|
2
|
-
import { NotificationChannelType, NotificationPriorityEnum, NotificationTypeEnum } from './useSendNotification';
|
|
3
|
-
|
|
4
|
-
interface NotificationAnalyticsPayload {
|
|
5
|
-
source?: 'center' | 'panel' | 'history' | 'preferences' | 'admin_history' | 'composer' | 'template_editor';
|
|
6
|
-
action?: 'open' | 'set' | 'reset' | 'send' | 'create' | 'update' | 'cancel' | 'reschedule';
|
|
7
|
-
interaction?: 'card' | 'primary_action' | 'custom_action';
|
|
8
|
-
scope?: 'GLOBAL' | 'CHANNEL' | 'TYPE' | 'TOPIC';
|
|
9
|
-
channel?: string;
|
|
10
|
-
type?: string;
|
|
11
|
-
priority?: string;
|
|
12
|
-
mode?: 'compose' | 'template';
|
|
13
|
-
recipientSource?: 'manual' | 'directory';
|
|
14
|
-
recipientCount?: number;
|
|
15
|
-
successCount?: number;
|
|
16
|
-
failedCount?: number;
|
|
17
|
-
scheduled?: boolean;
|
|
18
|
-
includeInApp?: boolean;
|
|
19
|
-
enabled?: boolean;
|
|
20
|
-
hasActions?: boolean;
|
|
21
|
-
hasMedia?: boolean;
|
|
22
|
-
hasHtml?: boolean;
|
|
23
|
-
variableCount?: number;
|
|
24
|
-
}
|
|
25
|
-
type NotificationAnalyticsSource = NonNullable<NotificationAnalyticsPayload['source']>;
|
|
26
|
-
type NotificationAnalyticsAction = NonNullable<NotificationAnalyticsPayload['action']>;
|
|
27
|
-
type NotificationInteraction = NonNullable<NotificationAnalyticsPayload['interaction']>;
|
|
28
|
-
interface NotificationSentInput {
|
|
29
|
-
mode: 'compose' | 'template';
|
|
30
|
-
channel: NotificationChannelType;
|
|
31
|
-
type?: NotificationTypeEnum | string;
|
|
32
|
-
priority?: NotificationPriorityEnum | string;
|
|
33
|
-
recipientSource: 'manual' | 'directory';
|
|
34
|
-
recipientCount: number;
|
|
35
|
-
successCount?: number;
|
|
36
|
-
failedCount?: number;
|
|
37
|
-
scheduled: boolean;
|
|
38
|
-
includeInApp: boolean;
|
|
39
|
-
hasActions: boolean;
|
|
40
|
-
hasMedia: boolean;
|
|
41
|
-
}
|
|
42
|
-
interface TemplateSavedInput {
|
|
43
|
-
action: Extract<NotificationAnalyticsAction, 'create' | 'update'>;
|
|
44
|
-
channel?: string;
|
|
45
|
-
type?: string;
|
|
46
|
-
variableCount: number;
|
|
47
|
-
hasHtml?: boolean;
|
|
48
|
-
}
|
|
49
|
-
interface PreferenceUpdatedInput {
|
|
50
|
-
action: Extract<NotificationAnalyticsAction, 'set' | 'reset'>;
|
|
51
|
-
scope: NotificationPreferenceScope;
|
|
52
|
-
channel?: string;
|
|
53
|
-
type?: string;
|
|
54
|
-
enabled?: boolean;
|
|
55
|
-
}
|
|
56
|
-
interface ScheduleUpdatedInput {
|
|
57
|
-
action: Extract<NotificationAnalyticsAction, 'cancel' | 'reschedule'>;
|
|
58
|
-
}
|
|
59
|
-
export declare function useNotificationAnalytics(): {
|
|
60
|
-
trackNotificationOpened: (notification: Notification, source: NotificationAnalyticsSource, interaction: NotificationInteraction) => void;
|
|
61
|
-
trackPreferenceUpdated: (input: PreferenceUpdatedInput) => void;
|
|
62
|
-
trackNotificationSent: (input: NotificationSentInput) => void;
|
|
63
|
-
trackTemplateSaved: (input: TemplateSavedInput) => void;
|
|
64
|
-
trackScheduleUpdated: (input: ScheduleUpdatedInput) => void;
|
|
65
|
-
};
|
|
66
|
-
export {};
|
|
67
|
-
//# sourceMappingURL=useNotificationAnalytics.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useNotificationAnalytics.d.ts","sourceRoot":"","sources":["../../src/hooks/useNotificationAnalytics.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAC;AAC1E,OAAO,KAAK,EACV,uBAAuB,EACvB,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,uBAAuB,CAAC;AAS/B,UAAU,4BAA4B;IACpC,MAAM,CAAC,EACH,QAAQ,GACR,OAAO,GACP,SAAS,GACT,aAAa,GACb,eAAe,GACf,UAAU,GACV,iBAAiB,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,YAAY,CAAC;IAC3F,WAAW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,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,UAAU,kBAAkB;IAC1B,MAAM,EAAE,OAAO,CAAC,2BAA2B,EAAE,QAAQ,GAAG,QAAQ,CAAC,CAAC;IAClE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,UAAU,sBAAsB;IAC9B,MAAM,EAAE,OAAO,CAAC,2BAA2B,EAAE,KAAK,GAAG,OAAO,CAAC,CAAC;IAC9D,KAAK,EAAE,2BAA2B,CAAC;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,UAAU,oBAAoB;IAC5B,MAAM,EAAE,OAAO,CAAC,2BAA2B,EAAE,QAAQ,GAAG,YAAY,CAAC,CAAC;CACvE;AAmBD,wBAAgB,wBAAwB;4CAgBpB,YAAY,UAClB,2BAA2B,eACtB,uBAAuB;oCAU9B,sBAAsB;mCAatB,qBAAqB;gCAqBrB,kBAAkB;kCAalB,oBAAoB;EAgB/B"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { NotificationPreference, UpsertNotificationPreferenceInput } from '../types';
|
|
2
|
-
|
|
3
|
-
export declare function useNotificationPreferences(): {
|
|
4
|
-
preferences: NotificationPreference[];
|
|
5
|
-
preferencesByKey: Map<string, NotificationPreference>;
|
|
6
|
-
isLoading: boolean;
|
|
7
|
-
error: string | null;
|
|
8
|
-
refetch: () => Promise<void>;
|
|
9
|
-
setPreference: (input: UpsertNotificationPreferenceInput) => Promise<NotificationPreference | null>;
|
|
10
|
-
deletePreference: (id: string) => Promise<boolean>;
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=useNotificationPreferences.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useNotificationPreferences.d.ts","sourceRoot":"","sources":["../../src/hooks/useNotificationPreferences.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EACV,sBAAsB,EAEtB,iCAAiC,EAClC,MAAM,UAAU,CAAC;AA2ClB,wBAAgB,0BAA0B;;;;;;2BAuCxB,iCAAiC,KAAG,OAAO,CAAC,sBAAsB,GAAG,IAAI,CAAC;2BAgE7E,MAAM,KAAG,OAAO,CAAC,OAAO,CAAC;EA2BvC"}
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import { NotificationType } from '../types';
|
|
2
|
-
import { GetNotificationTemplatesQuery } from '../generated/global-operations';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Backend template type derived from the generated query
|
|
6
|
-
*/
|
|
7
|
-
export type BackendNotificationTemplate = GetNotificationTemplatesQuery['notificationTemplates']['items'][number];
|
|
8
|
-
/**
|
|
9
|
-
* Input type for creating a template (matches backend CreateTemplateInput)
|
|
10
|
-
* Note: Templates are content-only - channel is specified at send time
|
|
11
|
-
*/
|
|
12
|
-
export interface CreateTemplateInput {
|
|
13
|
-
slug: string;
|
|
14
|
-
name: string;
|
|
15
|
-
description?: string;
|
|
16
|
-
type: NotificationType;
|
|
17
|
-
channel?: string;
|
|
18
|
-
locale?: string;
|
|
19
|
-
subject?: string;
|
|
20
|
-
bodyTemplate: string;
|
|
21
|
-
htmlTemplate?: string;
|
|
22
|
-
variables: Record<string, unknown>;
|
|
23
|
-
metadata?: Record<string, unknown>;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Input type for updating a template (matches backend UpdateTemplateInput)
|
|
27
|
-
*/
|
|
28
|
-
export interface UpdateTemplateInput {
|
|
29
|
-
name?: string;
|
|
30
|
-
description?: string;
|
|
31
|
-
subject?: string;
|
|
32
|
-
bodyTemplate?: string;
|
|
33
|
-
htmlTemplate?: string;
|
|
34
|
-
variables?: Record<string, unknown>;
|
|
35
|
-
enabled?: boolean;
|
|
36
|
-
metadata?: Record<string, unknown>;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Filter options for templates (matches backend TemplateFilterInput)
|
|
40
|
-
* Note: channel filter removed - templates are content-only
|
|
41
|
-
*/
|
|
42
|
-
export interface TemplateFilter {
|
|
43
|
-
type?: NotificationType;
|
|
44
|
-
locale?: string;
|
|
45
|
-
enabled?: boolean;
|
|
46
|
-
search?: string;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Hook to manage notification templates
|
|
50
|
-
* Uses the GLOBAL Apollo client for API calls
|
|
51
|
-
*/
|
|
52
|
-
export declare function useNotificationTemplates(initialFilter?: TemplateFilter): {
|
|
53
|
-
templates: {
|
|
54
|
-
__typename?: "NotificationTemplate";
|
|
55
|
-
id: string;
|
|
56
|
-
slug: string;
|
|
57
|
-
name: string;
|
|
58
|
-
description?: string | null;
|
|
59
|
-
type: import('../generated/global-types').NotificationType;
|
|
60
|
-
locale: string;
|
|
61
|
-
subject?: string | null;
|
|
62
|
-
bodyTemplate: string;
|
|
63
|
-
htmlTemplate?: string | null;
|
|
64
|
-
variables: Record<string, unknown>;
|
|
65
|
-
enabled: boolean;
|
|
66
|
-
version: number;
|
|
67
|
-
createdAt: string;
|
|
68
|
-
updatedAt: string;
|
|
69
|
-
createdBy: string;
|
|
70
|
-
metadata?: Record<string, unknown> | null;
|
|
71
|
-
}[];
|
|
72
|
-
allTemplates: {
|
|
73
|
-
__typename?: "NotificationTemplate";
|
|
74
|
-
id: string;
|
|
75
|
-
slug: string;
|
|
76
|
-
name: string;
|
|
77
|
-
description?: string | null;
|
|
78
|
-
type: import('../generated/global-types').NotificationType;
|
|
79
|
-
locale: string;
|
|
80
|
-
subject?: string | null;
|
|
81
|
-
bodyTemplate: string;
|
|
82
|
-
htmlTemplate?: string | null;
|
|
83
|
-
variables: Record<string, unknown>;
|
|
84
|
-
enabled: boolean;
|
|
85
|
-
version: number;
|
|
86
|
-
createdAt: string;
|
|
87
|
-
updatedAt: string;
|
|
88
|
-
createdBy: string;
|
|
89
|
-
metadata?: Record<string, unknown> | null;
|
|
90
|
-
}[];
|
|
91
|
-
isLoading: boolean;
|
|
92
|
-
isCreating: boolean;
|
|
93
|
-
isUpdating: boolean;
|
|
94
|
-
isDeleting: boolean;
|
|
95
|
-
isMutating: boolean;
|
|
96
|
-
error: string | null;
|
|
97
|
-
hasMore: boolean;
|
|
98
|
-
total: number;
|
|
99
|
-
filter: TemplateFilter;
|
|
100
|
-
refetch: () => Promise<void>;
|
|
101
|
-
loadMore: () => Promise<void>;
|
|
102
|
-
createTemplate: (input: CreateTemplateInput) => Promise<BackendNotificationTemplate>;
|
|
103
|
-
updateTemplate: (id: string, input: UpdateTemplateInput) => Promise<BackendNotificationTemplate>;
|
|
104
|
-
deleteTemplate: (id: string) => Promise<boolean>;
|
|
105
|
-
updateFilter: (newFilter: Partial<TemplateFilter>) => void;
|
|
106
|
-
resetFilter: () => void;
|
|
107
|
-
};
|
|
108
|
-
/**
|
|
109
|
-
* Hook to fetch a single template by slug
|
|
110
|
-
* Uses the GLOBAL Apollo client for API calls
|
|
111
|
-
*/
|
|
112
|
-
export declare function useNotificationTemplate(slug: string | undefined, locale?: string): {
|
|
113
|
-
template: {
|
|
114
|
-
__typename?: "NotificationTemplate";
|
|
115
|
-
id: string;
|
|
116
|
-
slug: string;
|
|
117
|
-
name: string;
|
|
118
|
-
description?: string | null;
|
|
119
|
-
type: import('../generated/global-types').NotificationType;
|
|
120
|
-
locale: string;
|
|
121
|
-
subject?: string | null;
|
|
122
|
-
bodyTemplate: string;
|
|
123
|
-
htmlTemplate?: string | null;
|
|
124
|
-
variables: Record<string, unknown>;
|
|
125
|
-
enabled: boolean;
|
|
126
|
-
version: number;
|
|
127
|
-
createdAt: string;
|
|
128
|
-
updatedAt: string;
|
|
129
|
-
createdBy: string;
|
|
130
|
-
metadata?: Record<string, unknown> | null;
|
|
131
|
-
} | undefined;
|
|
132
|
-
isLoading: boolean;
|
|
133
|
-
error: string | null;
|
|
134
|
-
refetch: () => Promise<void>;
|
|
135
|
-
};
|
|
136
|
-
//# sourceMappingURL=useNotificationTemplates.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useNotificationTemplates.d.ts","sourceRoot":"","sources":["../../src/hooks/useNotificationTemplates.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD,OAAO,KAAK,EACV,6BAA6B,EAI9B,MAAM,gCAAgC,CAAC;AAExC;;GAEG;AACH,MAAM,MAAM,2BAA2B,GACrC,6BAA6B,CAAC,uBAAuB,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;AAC1E;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,gBAAgB,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,aAAa,CAAC,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BA8ErD,mBAAmB,KAAG,OAAO,CAAC,2BAA2B,CAAC;yBA0B7D,MAAM,SAAS,mBAAmB,KAAG,OAAO,CAAC,2BAA2B,CAAC;yBA0BzE,MAAM,KAAG,OAAO,CAAC,OAAO,CAAC;8BAsDO,OAAO,CAAC,cAAc,CAAC;;EA6BrE;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,MAAM,CAAC,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;EAiDhF"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { NotificationTopic, NotificationTopicSubscription } from '../types';
|
|
2
|
-
|
|
3
|
-
export interface NotificationTopicFilter {
|
|
4
|
-
search?: string;
|
|
5
|
-
type?: string;
|
|
6
|
-
isActive?: boolean;
|
|
7
|
-
}
|
|
8
|
-
export interface CreateNotificationTopicInput {
|
|
9
|
-
name: string;
|
|
10
|
-
slug: string;
|
|
11
|
-
description?: string;
|
|
12
|
-
type: string;
|
|
13
|
-
isActive?: boolean;
|
|
14
|
-
metadata?: Record<string, unknown>;
|
|
15
|
-
}
|
|
16
|
-
export interface UpdateNotificationTopicInput {
|
|
17
|
-
name?: string;
|
|
18
|
-
slug?: string;
|
|
19
|
-
description?: string;
|
|
20
|
-
type?: string;
|
|
21
|
-
isActive?: boolean;
|
|
22
|
-
metadata?: Record<string, unknown>;
|
|
23
|
-
}
|
|
24
|
-
export declare function useNotificationTopics(initialFilter?: NotificationTopicFilter): {
|
|
25
|
-
topics: NotificationTopic[];
|
|
26
|
-
isLoading: boolean;
|
|
27
|
-
error: string | null;
|
|
28
|
-
filter: NotificationTopicFilter;
|
|
29
|
-
setFilter: import('react').Dispatch<import('react').SetStateAction<NotificationTopicFilter>>;
|
|
30
|
-
refetch: () => Promise<void>;
|
|
31
|
-
createTopic: (input: CreateNotificationTopicInput) => Promise<NotificationTopic | null>;
|
|
32
|
-
updateTopic: (id: string, input: UpdateNotificationTopicInput) => Promise<NotificationTopic | null>;
|
|
33
|
-
deleteTopic: (id: string) => Promise<boolean>;
|
|
34
|
-
setTopicSubscription: (topicId: string, subscribed: boolean) => Promise<NotificationTopicSubscription | null>;
|
|
35
|
-
};
|
|
36
|
-
//# sourceMappingURL=useNotificationTopics.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useNotificationTopics.d.ts","sourceRoot":"","sources":["../../src/hooks/useNotificationTopics.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,6BAA6B,EAAE,MAAM,UAAU,CAAC;AASjF,MAAM,WAAW,uBAAuB;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED,MAAM,WAAW,4BAA4B;IAC3C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AA4BD,wBAAgB,qBAAqB,CAAC,aAAa,CAAC,EAAE,uBAAuB;;;;;;;yBA8C3D,4BAA4B,KAAG,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC;sBA0BnE,MAAM,SAAS,4BAA4B,KAAG,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC;sBA0B/E,MAAM,KAAG,OAAO,CAAC,OAAO,CAAC;oCAapB,MAAM,cAAc,OAAO,KAAG,OAAO,CAAC,6BAA6B,GAAG,IAAI,CAAC;EAuC9F"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { Notification, NotificationFilter } from '../types';
|
|
2
|
-
|
|
3
|
-
interface UseNotificationsOptions {
|
|
4
|
-
baseFilter?: Partial<NotificationFilter>;
|
|
5
|
-
unreadFilter?: Record<string, unknown>;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Hook to manage notifications with real GraphQL backend integration.
|
|
9
|
-
*
|
|
10
|
-
* Uses the global Apollo client to query the notification service via the
|
|
11
|
-
* public gateway (https://gw-global.local.burdenoff.com/global/graphql).
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```tsx
|
|
15
|
-
* const { notifications, unreadCount, markAsRead } = useNotifications();
|
|
16
|
-
* ```
|
|
17
|
-
*/
|
|
18
|
-
export declare function useNotifications(options?: UseNotificationsOptions): {
|
|
19
|
-
notifications: Notification[];
|
|
20
|
-
allNotifications: Notification[];
|
|
21
|
-
unreadCount: number;
|
|
22
|
-
selectedNotification: Notification | null;
|
|
23
|
-
notificationFilter: NotificationFilter;
|
|
24
|
-
isLoading: boolean;
|
|
25
|
-
error: string | null;
|
|
26
|
-
hasMore: boolean;
|
|
27
|
-
total: number;
|
|
28
|
-
markAsRead: (notificationId: string) => Promise<void>;
|
|
29
|
-
markAllAsRead: () => Promise<void>;
|
|
30
|
-
archiveNotification: (notificationId: string) => Promise<void>;
|
|
31
|
-
bulkArchive: (notificationIds: string[]) => Promise<void>;
|
|
32
|
-
unarchiveNotification: (notificationId: string) => Promise<void>;
|
|
33
|
-
recordAction: (notificationId: string, actionId?: string) => Promise<void>;
|
|
34
|
-
setSelectedNotification: import('react').Dispatch<import('react').SetStateAction<Notification | null>>;
|
|
35
|
-
updateFilter: (filter: Partial<NotificationFilter>) => void;
|
|
36
|
-
resetFilter: () => void;
|
|
37
|
-
refetch: () => Promise<void>;
|
|
38
|
-
loadMore: () => Promise<void>;
|
|
39
|
-
};
|
|
40
|
-
export {};
|
|
41
|
-
//# sourceMappingURL=useNotifications.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useNotifications.d.ts","sourceRoot":"","sources":["../../src/hooks/useNotifications.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAmBjE,UAAU,uBAAuB;IAC/B,UAAU,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACzC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACxC;AAoMD;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,GAAE,uBAA4B;;;;;;;;;;iCA2H3C,MAAM;;0CAsCN,MAAM;mCAqBL,MAAM,EAAE;4CAoBT,MAAM;mCAoBN,MAAM,aAAa,MAAM;;;;;;EA+InD"}
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
export type NotificationChannelType = 'DISCORD' | 'EMAIL' | 'PUSH' | 'SLACK' | 'SMS' | 'TEAMS' | 'TELEGRAM' | 'WEBHOOK' | 'WHATSAPP';
|
|
2
|
-
export type NotificationTypeEnum = 'ALERT' | 'MARKETING' | 'SYSTEM' | 'TRANSACTIONAL';
|
|
3
|
-
export type NotificationPriorityEnum = 'HIGH' | 'LOW' | 'MEDIUM' | 'URGENT';
|
|
4
|
-
export type NotificationStatusEnum = 'CANCELLED' | 'DELIVERED' | 'DRAFT' | 'EXPIRED' | 'FAILED' | 'PENDING' | 'READ' | 'SCHEDULED' | 'SENT' | 'TRIGGERED';
|
|
5
|
-
export type NotificationDeliveryStatusEnum = 'BOUNCED' | 'CLICKED' | 'COMPLAINED' | 'DELIVERED' | 'DELIVERING' | 'FAILED' | 'OPENED' | 'PENDING' | 'PROCESSING' | 'QUEUED' | 'RETRYING' | 'SENT' | 'UNSUBSCRIBED';
|
|
6
|
-
export type TriggerStatusEnum = 'CANCELLED' | 'FAILED' | 'PENDING' | 'TRIGGERED';
|
|
7
|
-
export interface RecipientInput {
|
|
8
|
-
email?: string;
|
|
9
|
-
locale?: string;
|
|
10
|
-
name?: string;
|
|
11
|
-
phoneNumber?: string;
|
|
12
|
-
pushToken?: string;
|
|
13
|
-
slackUserId?: string;
|
|
14
|
-
teamsUserId?: string;
|
|
15
|
-
timezone?: string;
|
|
16
|
-
userId?: string;
|
|
17
|
-
webhookUrl?: string;
|
|
18
|
-
whatsappNumber?: string;
|
|
19
|
-
}
|
|
20
|
-
export interface CreateNotificationInput {
|
|
21
|
-
actions?: Array<{
|
|
22
|
-
id?: string;
|
|
23
|
-
label: string;
|
|
24
|
-
url: string;
|
|
25
|
-
style?: string;
|
|
26
|
-
actionType?: string;
|
|
27
|
-
metadata?: Record<string, unknown>;
|
|
28
|
-
}>;
|
|
29
|
-
appName?: string;
|
|
30
|
-
body: string;
|
|
31
|
-
channel: NotificationChannelType;
|
|
32
|
-
data?: Record<string, unknown>;
|
|
33
|
-
expiresAt?: string;
|
|
34
|
-
htmlBody?: string;
|
|
35
|
-
media?: Array<{
|
|
36
|
-
url: string;
|
|
37
|
-
label?: string;
|
|
38
|
-
kind?: string;
|
|
39
|
-
contentType?: string;
|
|
40
|
-
thumbnailUrl?: string;
|
|
41
|
-
}>;
|
|
42
|
-
metadata?: Record<string, unknown>;
|
|
43
|
-
priority?: NotificationPriorityEnum;
|
|
44
|
-
recipient: RecipientInput;
|
|
45
|
-
redirectUrl?: string;
|
|
46
|
-
subject?: string;
|
|
47
|
-
trackClicks?: boolean;
|
|
48
|
-
trackOpens?: boolean;
|
|
49
|
-
topicId?: string;
|
|
50
|
-
type?: NotificationTypeEnum;
|
|
51
|
-
}
|
|
52
|
-
export interface TriggerNotificationInput {
|
|
53
|
-
notificationId?: string;
|
|
54
|
-
notification?: CreateNotificationInput;
|
|
55
|
-
channelId?: string;
|
|
56
|
-
platform?: NotificationChannelType;
|
|
57
|
-
includeInApp?: boolean;
|
|
58
|
-
userIds?: string[];
|
|
59
|
-
}
|
|
60
|
-
export interface TemplateNotificationResult {
|
|
61
|
-
totalRequested: number;
|
|
62
|
-
totalTriggered: number;
|
|
63
|
-
totalFailed: number;
|
|
64
|
-
notifications: TriggerNotificationResult[];
|
|
65
|
-
}
|
|
66
|
-
export interface TriggerWithTemplateInput {
|
|
67
|
-
actions?: Array<{
|
|
68
|
-
id?: string;
|
|
69
|
-
label: string;
|
|
70
|
-
url: string;
|
|
71
|
-
style?: string;
|
|
72
|
-
actionType?: string;
|
|
73
|
-
metadata?: Record<string, unknown>;
|
|
74
|
-
}>;
|
|
75
|
-
channelId?: string;
|
|
76
|
-
platform?: NotificationChannelType;
|
|
77
|
-
includeInApp?: boolean;
|
|
78
|
-
userIds?: string[];
|
|
79
|
-
expiresAt?: string;
|
|
80
|
-
redirectUrl?: string;
|
|
81
|
-
priority?: NotificationPriorityEnum;
|
|
82
|
-
/** Single recipient (use this OR recipients, not both) */
|
|
83
|
-
recipient?: RecipientInput;
|
|
84
|
-
/** Multiple recipients for bulk delivery (use this OR recipient, not both) */
|
|
85
|
-
recipients?: RecipientInput[];
|
|
86
|
-
templateSlug: string;
|
|
87
|
-
trackClicks?: boolean;
|
|
88
|
-
trackOpens?: boolean;
|
|
89
|
-
media?: Array<{
|
|
90
|
-
url: string;
|
|
91
|
-
label?: string;
|
|
92
|
-
kind?: string;
|
|
93
|
-
contentType?: string;
|
|
94
|
-
thumbnailUrl?: string;
|
|
95
|
-
}>;
|
|
96
|
-
topicId?: string;
|
|
97
|
-
variables: Record<string, unknown>;
|
|
98
|
-
scheduledFor?: string;
|
|
99
|
-
timezone?: string;
|
|
100
|
-
}
|
|
101
|
-
export interface TriggerBatchInput {
|
|
102
|
-
notificationIds?: string[];
|
|
103
|
-
notifications?: CreateNotificationInput[];
|
|
104
|
-
priority?: NotificationPriorityEnum;
|
|
105
|
-
delayBetweenBatches?: number;
|
|
106
|
-
batchSize?: number;
|
|
107
|
-
scheduledFor?: string;
|
|
108
|
-
timezone?: string;
|
|
109
|
-
}
|
|
110
|
-
export interface TriggerNotificationResult {
|
|
111
|
-
id: string;
|
|
112
|
-
status: NotificationStatusEnum;
|
|
113
|
-
deliveryStatus?: NotificationDeliveryStatusEnum;
|
|
114
|
-
triggerStatus: TriggerStatusEnum;
|
|
115
|
-
sentAt?: string;
|
|
116
|
-
title: string;
|
|
117
|
-
message: string;
|
|
118
|
-
}
|
|
119
|
-
export interface BatchNotificationResult {
|
|
120
|
-
batchId: string;
|
|
121
|
-
totalRequested: number;
|
|
122
|
-
totalTriggered: number;
|
|
123
|
-
totalFailed: number;
|
|
124
|
-
successCount: number;
|
|
125
|
-
failureCount: number;
|
|
126
|
-
results: Record<string, unknown>;
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* Hook to send notifications
|
|
130
|
-
* Provides methods for triggering single, batch, and template-based notifications
|
|
131
|
-
*/
|
|
132
|
-
export declare function useSendNotification(): {
|
|
133
|
-
isLoading: boolean;
|
|
134
|
-
isSending: boolean;
|
|
135
|
-
error: string | null;
|
|
136
|
-
lastResult: TemplateNotificationResult | TriggerNotificationResult | BatchNotificationResult | null;
|
|
137
|
-
sendNotification: (input: TriggerNotificationInput) => Promise<TriggerNotificationResult | null>;
|
|
138
|
-
sendWithTemplate: (input: TriggerWithTemplateInput) => Promise<TemplateNotificationResult | null>;
|
|
139
|
-
sendBatch: (input: TriggerBatchInput) => Promise<BatchNotificationResult | null>;
|
|
140
|
-
sendSimple: (params: {
|
|
141
|
-
recipient: RecipientInput;
|
|
142
|
-
channel: NotificationChannelType;
|
|
143
|
-
body: string;
|
|
144
|
-
subject?: string;
|
|
145
|
-
type?: NotificationTypeEnum;
|
|
146
|
-
priority?: NotificationPriorityEnum;
|
|
147
|
-
}) => Promise<TriggerNotificationResult | null>;
|
|
148
|
-
sendToMultiple: (params: {
|
|
149
|
-
recipients: RecipientInput[];
|
|
150
|
-
channel: NotificationChannelType;
|
|
151
|
-
body: string;
|
|
152
|
-
subject?: string;
|
|
153
|
-
type?: NotificationTypeEnum;
|
|
154
|
-
priority?: NotificationPriorityEnum;
|
|
155
|
-
}) => Promise<BatchNotificationResult | null>;
|
|
156
|
-
clearError: () => void;
|
|
157
|
-
clearResult: () => void;
|
|
158
|
-
};
|
|
159
|
-
//# sourceMappingURL=useSendNotification.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useSendNotification.d.ts","sourceRoot":"","sources":["../../src/hooks/useSendNotification.ts"],"names":[],"mappings":"AAcA,MAAM,MAAM,uBAAuB,GAC/B,SAAS,GACT,OAAO,GACP,MAAM,GACN,OAAO,GACP,KAAK,GACL,OAAO,GACP,UAAU,GACV,SAAS,GACT,UAAU,CAAC;AAEf,MAAM,MAAM,oBAAoB,GAAG,OAAO,GAAG,WAAW,GAAG,QAAQ,GAAG,eAAe,CAAC;AAEtF,MAAM,MAAM,wBAAwB,GAAG,MAAM,GAAG,KA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,CAAC,yBAAyB,GAAG,IAAI,CAAC;6BAoB9B;QACb,UAAU,EAAE,cAAc,EAAE,CAAC;QAC7B,OAAO,EAAE,uBAAuB,CAAC;QACjC,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,IAAI,CAAC,EAAE,oBAAoB,CAAC;QAC5B,QAAQ,CAAC,EAAE,wBAAwB,CAAC;KACrC,KAAG,OAAO,CAAC,uBAAuB,GAAG,IAAI,CAAC;;;EAiD9C"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export interface User {
|
|
2
|
-
id: string;
|
|
3
|
-
name: string;
|
|
4
|
-
email: string;
|
|
5
|
-
phoneNumber?: string;
|
|
6
|
-
role?: string;
|
|
7
|
-
status?: string;
|
|
8
|
-
username?: string;
|
|
9
|
-
}
|
|
10
|
-
export interface UserSearchFilter {
|
|
11
|
-
search?: string;
|
|
12
|
-
role?: string;
|
|
13
|
-
status?: string;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Hook for searching users via the global auth service.
|
|
17
|
-
* Uses the Apollo client from notification context (not raw fetch).
|
|
18
|
-
*/
|
|
19
|
-
export declare function useUserSearch(): {
|
|
20
|
-
searchUsers: (query: string, extraFilter?: Omit<UserSearchFilter, "search">) => void;
|
|
21
|
-
fetchAllUsers: (filter: UserSearchFilter) => Promise<User[]>;
|
|
22
|
-
results: User[];
|
|
23
|
-
isLoading: boolean;
|
|
24
|
-
error: string | null;
|
|
25
|
-
clearResults: () => void;
|
|
26
|
-
};
|
|
27
|
-
//# sourceMappingURL=useUserSearch.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useUserSearch.d.ts","sourceRoot":"","sources":["../../src/hooks/useUserSearch.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAgB,aAAa;yBA0CjB,MAAM,gBAAgB,IAAI,CAAC,gBAAgB,EAAE,QAAQ,CAAC;4BA8B/C,gBAAgB,KAAG,OAAO,CAAC,IAAI,EAAE,CAAC;;;;;EA+CpD"}
|
package/dist/index.d.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Notification Microfrontend
|
|
3
|
-
*
|
|
4
|
-
* Provides a UI for managing multi-channel notifications,
|
|
5
|
-
* notification history, and notification templates.
|
|
6
|
-
* This is a GLOBAL module that integrates with the global API gateway (gw-global.local.burdenoff.com).
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* ```tsx
|
|
10
|
-
* import { NotificationRoot, type NotificationRootProps } from '@burdenoff/micro-fe/notification';
|
|
11
|
-
*
|
|
12
|
-
* function App() {
|
|
13
|
-
* const props: NotificationRootProps = {
|
|
14
|
-
* basePath: '/notifications',
|
|
15
|
-
* navigate: (path) => router.push(path),
|
|
16
|
-
* currentUser: { id: '1', email: 'user@example.com' },
|
|
17
|
-
* workspaceId: 'ws-123',
|
|
18
|
-
* apiGatewayUrl: 'https://gw-global.local.burdenoff.com/global/graphql',
|
|
19
|
-
* authToken: 'token',
|
|
20
|
-
* registerNavItems: (items) => { return () => {}; },
|
|
21
|
-
* onNotificationClick: (notification) => console.log('Clicked:', notification),
|
|
22
|
-
* };
|
|
23
|
-
*
|
|
24
|
-
* return <NotificationRoot {...props} />;
|
|
25
|
-
* }
|
|
26
|
-
* ```
|
|
27
|
-
*
|
|
28
|
-
* @module @burdenoff/micro-fe/notification
|
|
29
|
-
*/
|
|
30
|
-
export { NotificationRoot } from './NotificationRoot';
|
|
31
|
-
export { UserNotificationRoot } from './UserNotificationRoot';
|
|
32
|
-
export { AdminNotificationRoot } from './AdminNotificationRoot';
|
|
33
|
-
export type { NotificationRootProps, NavItem, FooterItem, Notification, NotificationType, NotificationPriority, NotificationStatus, NotificationChannel, NotificationTemplate, NotificationFilter, } from './types';
|
|
34
|
-
export { useNotifications, useNotificationStore, useNotification } from './hooks';
|
|
35
|
-
export { NotificationBell, NotificationCard, NotificationPanel } from './components';
|
|
36
|
-
export { formatRelativeTime, getPriorityColor, getPriorityIcon, getNotificationTypeLabel, getNotificationTypeIcon, filterNotifications, sortNotificationsByDate, groupNotificationsByDate, truncateText, validateTemplateVariables, substituteTemplateVariables, } from './utils';
|
|
37
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAGhE,YAAY,EACV,qBAAqB,EACrB,OAAO,EACP,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAGlF,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAGrF,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EACf,wBAAwB,EACxB,uBAAuB,EACvB,mBAAmB,EACnB,uBAAuB,EACvB,wBAAwB,EACxB,YAAY,EACZ,yBAAyB,EACzB,2BAA2B,GAC5B,MAAM,SAAS,CAAC"}
|