@bluecopa/core 0.1.45 → 0.1.48
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/api/emailEngine/getAllConversations.d.ts +19 -3
- package/dist/api/emailEngine/getMessageBySenderId.d.ts +31 -0
- package/dist/api/emailEngine/index.d.ts +1 -0
- package/dist/api/workbook/publishWorkbook.d.ts +3 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.es.js +32 -4
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
|
@@ -19,9 +19,25 @@ export interface EmailConversation {
|
|
|
19
19
|
lastModifiedDate?: string;
|
|
20
20
|
workspaceId?: string;
|
|
21
21
|
}
|
|
22
|
+
export interface GetAllConversationsParams {
|
|
23
|
+
page?: number;
|
|
24
|
+
pageSize?: number;
|
|
25
|
+
orderByCreatedDate?: boolean;
|
|
26
|
+
tag?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface PageChunkEmailConversation {
|
|
29
|
+
content: EmailConversation[];
|
|
30
|
+
pageNumber: number;
|
|
31
|
+
pageSize: number;
|
|
32
|
+
}
|
|
22
33
|
/**
|
|
23
|
-
* Gets all email conversations
|
|
24
|
-
* @
|
|
34
|
+
* Gets all email conversations with pagination and optional tag filter
|
|
35
|
+
* @param params - Optional query parameters
|
|
36
|
+
* @param params.page - Page number (default: 1)
|
|
37
|
+
* @param params.pageSize - Page size (default: 10)
|
|
38
|
+
* @param params.orderByCreatedDate - Order by created date (default: false)
|
|
39
|
+
* @param params.tag - Optional tag to filter by
|
|
40
|
+
* @returns Promise<PageChunkEmailConversation> Paginated conversations
|
|
25
41
|
* @throws Error if the request fails
|
|
26
42
|
*/
|
|
27
|
-
export declare function getAllConversations(): Promise<
|
|
43
|
+
export declare function getAllConversations(params?: GetAllConversationsParams): Promise<PageChunkEmailConversation>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export interface FilterOnSenderId {
|
|
2
|
+
senderId: string;
|
|
3
|
+
direction: "INBOUND" | "OUTBOUND";
|
|
4
|
+
}
|
|
5
|
+
export interface EmailMessage {
|
|
6
|
+
id?: string;
|
|
7
|
+
conversationId?: string;
|
|
8
|
+
senderId?: string;
|
|
9
|
+
toEmail?: string[];
|
|
10
|
+
cc?: string[];
|
|
11
|
+
bcc?: string[];
|
|
12
|
+
subject?: string;
|
|
13
|
+
bodyText?: string;
|
|
14
|
+
bodyHtml?: string;
|
|
15
|
+
messagePreview?: string;
|
|
16
|
+
accountId?: string;
|
|
17
|
+
workspaceId?: string;
|
|
18
|
+
createdBy?: string;
|
|
19
|
+
createdDate?: string;
|
|
20
|
+
lastModifiedBy?: string;
|
|
21
|
+
lastModifiedDate?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Filters email messages by sender ID
|
|
25
|
+
* @param params - The filter parameters
|
|
26
|
+
* @param params.senderId - Required: The sender email address
|
|
27
|
+
* @param params.direction - Required: 'INBOUND' or 'OUTBOUND'
|
|
28
|
+
* @returns Promise<EmailMessage[]> List of matching messages
|
|
29
|
+
* @throws Error if the request fails
|
|
30
|
+
*/
|
|
31
|
+
export declare function getMessageBySenderId(params: FilterOnSenderId): Promise<EmailMessage[]>;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { Workbook } from '../../../../models/src/lib/gen/Api';
|
|
2
2
|
export interface PublishWorkbookRequest {
|
|
3
3
|
workbookId: string;
|
|
4
|
+
comment?: string;
|
|
4
5
|
}
|
|
5
6
|
/**
|
|
6
7
|
* Publishes a workbook
|
|
7
8
|
* @param params - The workbook publish parameters
|
|
8
9
|
* @param params.workbookId - Required: The ID of the workbook to publish
|
|
10
|
+
* @param params.comment - Optional: Comment for approval workflow
|
|
9
11
|
* @returns Promise<Workbook> The published workbook
|
|
10
12
|
* @throws Error if the request fails
|
|
11
13
|
*/
|
|
12
|
-
export declare function publishWorkbook({ workbookId, }: PublishWorkbookRequest): Promise<Workbook>;
|
|
14
|
+
export declare function publishWorkbook({ workbookId, comment, }: PublishWorkbookRequest): Promise<Workbook>;
|
package/dist/index.d.ts
CHANGED
|
@@ -25,7 +25,8 @@ export type { MarkItemAsReadRequest } from './api/inboxItems/markItemAsRead';
|
|
|
25
25
|
export type { MarkItemAsUnreadRequest } from './api/inboxItems/markItemAsUnread';
|
|
26
26
|
export type { PermissionsResponse, GetPermissionsParams, } from './api/permissions/getPermissions';
|
|
27
27
|
export type { ClientIpResponse } from './api/clientIp/getClientIp';
|
|
28
|
-
export type { EmailConversation, } from './api/emailEngine/getAllConversations';
|
|
28
|
+
export type { EmailConversation, GetAllConversationsParams, PageChunkEmailConversation, } from './api/emailEngine/getAllConversations';
|
|
29
29
|
export type { GetConversationRequest, } from './api/emailEngine/getConversation';
|
|
30
30
|
export type { CreateConversationRequest, } from './api/emailEngine/createConversation';
|
|
31
31
|
export type { ReplyToConversationRequest, } from './api/emailEngine/replyToConversation';
|
|
32
|
+
export type { FilterOnSenderId, EmailMessage, } from './api/emailEngine/getMessageBySenderId';
|
package/dist/index.es.js
CHANGED
|
@@ -10780,7 +10780,8 @@ async function saveWorkbook({
|
|
|
10780
10780
|
}
|
|
10781
10781
|
}
|
|
10782
10782
|
async function publishWorkbook({
|
|
10783
|
-
workbookId
|
|
10783
|
+
workbookId,
|
|
10784
|
+
comment
|
|
10784
10785
|
}) {
|
|
10785
10786
|
var _a, _b, _c;
|
|
10786
10787
|
try {
|
|
@@ -10788,7 +10789,8 @@ async function publishWorkbook({
|
|
|
10788
10789
|
throw { message: "Workbook ID is required", status: 400 };
|
|
10789
10790
|
}
|
|
10790
10791
|
const response = await apiClient.post("/workbook/publish-workbook", {
|
|
10791
|
-
workbookId
|
|
10792
|
+
workbookId,
|
|
10793
|
+
comment
|
|
10792
10794
|
});
|
|
10793
10795
|
if (!response.data) {
|
|
10794
10796
|
throw { message: "Failed to publish workbook", status: 500 };
|
|
@@ -11492,10 +11494,17 @@ const index$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
|
|
|
11492
11494
|
__proto__: null,
|
|
11493
11495
|
getClientIp
|
|
11494
11496
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
11495
|
-
async function getAllConversations() {
|
|
11497
|
+
async function getAllConversations(params) {
|
|
11496
11498
|
var _a, _b, _c, _d;
|
|
11497
11499
|
try {
|
|
11498
|
-
const response = await apiClient.get("/email/conversations"
|
|
11500
|
+
const response = await apiClient.get("/email/conversations", {
|
|
11501
|
+
params: {
|
|
11502
|
+
page: (params == null ? void 0 : params.page) ?? 1,
|
|
11503
|
+
pageSize: (params == null ? void 0 : params.pageSize) ?? 10,
|
|
11504
|
+
orderByCreatedDate: (params == null ? void 0 : params.orderByCreatedDate) ?? false,
|
|
11505
|
+
...(params == null ? void 0 : params.tag) && { tag: params.tag }
|
|
11506
|
+
}
|
|
11507
|
+
});
|
|
11499
11508
|
return ((_a = response.data) == null ? void 0 : _a.data) ?? response.data;
|
|
11500
11509
|
} catch (error) {
|
|
11501
11510
|
const message = ((_c = (_b = error.response) == null ? void 0 : _b.data) == null ? void 0 : _c.message) || error.message || "An unexpected error occurred while fetching conversations";
|
|
@@ -11590,11 +11599,30 @@ async function replyToConversation(params) {
|
|
|
11590
11599
|
throw { message, status };
|
|
11591
11600
|
}
|
|
11592
11601
|
}
|
|
11602
|
+
async function getMessageBySenderId(params) {
|
|
11603
|
+
var _a, _b, _c, _d, _e;
|
|
11604
|
+
if (!((_a = params.senderId) == null ? void 0 : _a.trim())) {
|
|
11605
|
+
throw { message: "senderId is required", status: 400 };
|
|
11606
|
+
}
|
|
11607
|
+
try {
|
|
11608
|
+
const response = await apiClient.post(
|
|
11609
|
+
"/email/messages/filter/senderId",
|
|
11610
|
+
params
|
|
11611
|
+
);
|
|
11612
|
+
return ((_b = response.data) == null ? void 0 : _b.data) ?? response.data;
|
|
11613
|
+
} catch (error) {
|
|
11614
|
+
const axiosError = error;
|
|
11615
|
+
const message = ((_d = (_c = axiosError.response) == null ? void 0 : _c.data) == null ? void 0 : _d.message) || axiosError.message || "An unexpected error occurred while filtering messages";
|
|
11616
|
+
const status = ((_e = axiosError.response) == null ? void 0 : _e.status) || 500;
|
|
11617
|
+
throw { message, status };
|
|
11618
|
+
}
|
|
11619
|
+
}
|
|
11593
11620
|
const index$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
11594
11621
|
__proto__: null,
|
|
11595
11622
|
createConversation,
|
|
11596
11623
|
getAllConversations,
|
|
11597
11624
|
getConversation,
|
|
11625
|
+
getMessageBySenderId,
|
|
11598
11626
|
replyToConversation
|
|
11599
11627
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
11600
11628
|
const index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|