@trycourier/courier-ui-inbox 1.0.4-beta → 1.0.6-beta

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.
@@ -1,5 +1,7 @@
1
1
  import { InboxMessage } from '@trycourier/courier-js';
2
+ import { CourierInboxFeedType } from './feed-type';
2
3
  export type InboxDataSet = {
4
+ feedType: CourierInboxFeedType;
3
5
  messages: InboxMessage[];
4
6
  canPaginate: boolean;
5
7
  paginationCursor: string | null;
@@ -0,0 +1,12 @@
1
+ import { InboxMessage } from '@trycourier/courier-js';
2
+ import { InboxDataSet } from './inbox-data-set';
3
+ export type MessageSnapshot = {
4
+ message: InboxMessage;
5
+ archiveIndex?: number;
6
+ inboxIndex?: number;
7
+ };
8
+ export type DataSetSnapshot = {
9
+ unreadCount: number;
10
+ inbox: InboxDataSet;
11
+ archive: InboxDataSet;
12
+ };
@@ -4,4 +4,3 @@ export declare function markAsUnread(message: InboxMessage): Promise<void>;
4
4
  export declare function clickMessage(message: InboxMessage): Promise<void>;
5
5
  export declare function archiveMessage(message: InboxMessage): Promise<void>;
6
6
  export declare function openMessage(message: InboxMessage): Promise<void>;
7
- export declare function getMessageTime(message: InboxMessage): string;
@@ -1 +1,21 @@
1
- export declare function replaceElementInShadowRoot(shadowRoot: ShadowRoot, elementId: string, newElement: HTMLElement): void;
1
+ import { InboxMessage, InboxAction } from '@trycourier/courier-js';
2
+ import { InboxDataSet } from '../types/inbox-data-set';
3
+ /**
4
+ * Copy a message
5
+ * @param message - The message to copy
6
+ * @returns A copy of the message
7
+ */
8
+ export declare function copyMessage(message: InboxMessage): InboxMessage;
9
+ /**
10
+ * Copy an inbox action
11
+ * @param action - The inbox action to copy
12
+ * @returns A copy of the inbox action
13
+ */
14
+ export declare function copyInboxAction(action: InboxAction): InboxAction;
15
+ /**
16
+ * Copy an inbox data set
17
+ * @param dataSet - The inbox data set to copy
18
+ * @returns A copy of the inbox data set
19
+ */
20
+ export declare function copyInboxDataSet(dataSet: InboxDataSet): InboxDataSet;
21
+ export declare function getMessageTime(message: InboxMessage): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trycourier/courier-ui-inbox",
3
- "version": "1.0.4-beta",
3
+ "version": "1.0.6-beta",
4
4
  "description": "Inbox components for the Courier web UI",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -26,7 +26,7 @@
26
26
  "dist"
27
27
  ],
28
28
  "dependencies": {
29
- "@trycourier/courier-js": "2.0.2-beta",
29
+ "@trycourier/courier-js": "2.0.3-beta",
30
30
  "@trycourier/courier-ui-core": "1.0.4-beta"
31
31
  },
32
32
  "devDependencies": {