@bluecopa/core 0.1.29 → 0.1.30
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/inboxItems/getAllInboxItems.d.ts +16 -0
- package/dist/api/inboxItems/index.d.ts +6 -0
- package/dist/api/inboxItems/markItemAsRead.d.ts +11 -0
- package/dist/api/inboxItems/markItemAsUnread.d.ts +11 -0
- package/dist/api/index.d.ts +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.es.js +109 -36
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface GetAllInboxItemsRequest {
|
|
2
|
+
page?: number;
|
|
3
|
+
perPage?: number;
|
|
4
|
+
}
|
|
5
|
+
export interface InboxItem {
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Gets all inbox items
|
|
10
|
+
* @param params - The inbox items request parameters
|
|
11
|
+
* @param params.page - Optional: Page number (default: 0)
|
|
12
|
+
* @param params.perPage - Optional: Items per page (default: 50)
|
|
13
|
+
* @returns Promise<InboxItem[]> Array of inbox items
|
|
14
|
+
* @throws Error if the request fails
|
|
15
|
+
*/
|
|
16
|
+
export declare function getAllInboxItems({ page, perPage, }?: GetAllInboxItemsRequest): Promise<InboxItem[]>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { getAllInboxItems } from './getAllInboxItems';
|
|
2
|
+
export { markItemAsRead } from './markItemAsRead';
|
|
3
|
+
export { markItemAsUnread } from './markItemAsUnread';
|
|
4
|
+
export type { GetAllInboxItemsRequest, InboxItem } from './getAllInboxItems';
|
|
5
|
+
export type { MarkItemAsReadRequest } from './markItemAsRead';
|
|
6
|
+
export type { MarkItemAsUnreadRequest } from './markItemAsUnread';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface MarkItemAsReadRequest {
|
|
2
|
+
inboxItemIds: string[];
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* Marks inbox items as read
|
|
6
|
+
* @param params - The mark as read request parameters
|
|
7
|
+
* @param params.inboxItemIds - Required: Array of inbox item IDs to mark as read
|
|
8
|
+
* @returns Promise<void>
|
|
9
|
+
* @throws Error if the request fails
|
|
10
|
+
*/
|
|
11
|
+
export declare function markItemAsRead({ inboxItemIds, }: MarkItemAsReadRequest): Promise<void>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface MarkItemAsUnreadRequest {
|
|
2
|
+
inboxItemIds: string[];
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* Marks inbox items as unread
|
|
6
|
+
* @param params - The mark as unread request parameters
|
|
7
|
+
* @param params.inboxItemIds - Required: Array of inbox item IDs to mark as unread
|
|
8
|
+
* @returns Promise<void>
|
|
9
|
+
* @throws Error if the request fails
|
|
10
|
+
*/
|
|
11
|
+
export declare function markItemAsUnread({ inboxItemIds, }: MarkItemAsUnreadRequest): Promise<void>;
|
package/dist/api/index.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -20,3 +20,6 @@ export type { User } from './api/user/getAllUsers';
|
|
|
20
20
|
export type { HttpTrigger } from './api/workflow/getAllHttpTriggers';
|
|
21
21
|
export type { GetRowsOptions, GetRowsResponse } from './api/inputTable/getRows';
|
|
22
22
|
export type { UpdateRowOptions } from './api/inputTable/updateRow';
|
|
23
|
+
export type { GetAllInboxItemsRequest, InboxItem } from './api/inboxItems/getAllInboxItems';
|
|
24
|
+
export type { MarkItemAsReadRequest } from './api/inboxItems/markItemAsRead';
|
|
25
|
+
export type { MarkItemAsUnreadRequest } from './api/inboxItems/markItemAsUnread';
|
package/dist/index.es.js
CHANGED
|
@@ -114,7 +114,7 @@ async function getAllUsers() {
|
|
|
114
114
|
throw { message, status };
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
const index$
|
|
117
|
+
const index$j = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
118
118
|
__proto__: null,
|
|
119
119
|
getAllUsers,
|
|
120
120
|
getLoggedInUserDetails
|
|
@@ -188,7 +188,7 @@ async function getAllHttpTriggers() {
|
|
|
188
188
|
throw { message, status };
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
|
-
const index$
|
|
191
|
+
const index$i = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
192
192
|
__proto__: null,
|
|
193
193
|
WorkflowStatus,
|
|
194
194
|
getAllHttpTriggers,
|
|
@@ -290,7 +290,7 @@ async function fileDownload({
|
|
|
290
290
|
throw { message, status };
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
|
-
const index$
|
|
293
|
+
const index$h = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
294
294
|
__proto__: null,
|
|
295
295
|
fileDownload,
|
|
296
296
|
fileUpload,
|
|
@@ -364,7 +364,7 @@ const runDefinition = async (props) => {
|
|
|
364
364
|
};
|
|
365
365
|
}
|
|
366
366
|
};
|
|
367
|
-
const index$
|
|
367
|
+
const index$g = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
368
368
|
__proto__: null,
|
|
369
369
|
runDefinition,
|
|
370
370
|
runPublishedDefinition,
|
|
@@ -402,7 +402,7 @@ const getWorksheetsByType = async (type) => {
|
|
|
402
402
|
throw { message, status };
|
|
403
403
|
}
|
|
404
404
|
};
|
|
405
|
-
const index$
|
|
405
|
+
const index$f = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
406
406
|
__proto__: null,
|
|
407
407
|
getWorksheets,
|
|
408
408
|
getWorksheetsByType
|
|
@@ -5544,7 +5544,7 @@ const getUniqueDuplicateName = (name, collectionToCheckIn, suffix = "Copy", conc
|
|
|
5544
5544
|
}
|
|
5545
5545
|
return newName.trim();
|
|
5546
5546
|
};
|
|
5547
|
-
const index$
|
|
5547
|
+
const index$e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5548
5548
|
__proto__: null,
|
|
5549
5549
|
formatDate,
|
|
5550
5550
|
generatePushID,
|
|
@@ -5709,7 +5709,7 @@ const getData$3 = async (metricSheetId, options) => {
|
|
|
5709
5709
|
resultData = _.flatten(resultData);
|
|
5710
5710
|
return { data: resultData };
|
|
5711
5711
|
};
|
|
5712
|
-
const index$
|
|
5712
|
+
const index$d = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5713
5713
|
__proto__: null,
|
|
5714
5714
|
getData: getData$3
|
|
5715
5715
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -5860,7 +5860,7 @@ async function checkSubscriptionStatus(userId, threadId) {
|
|
|
5860
5860
|
throw { message, status };
|
|
5861
5861
|
}
|
|
5862
5862
|
}
|
|
5863
|
-
const index$
|
|
5863
|
+
const index$c = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5864
5864
|
__proto__: null,
|
|
5865
5865
|
checkSubscriptionStatus,
|
|
5866
5866
|
createThread,
|
|
@@ -6065,7 +6065,7 @@ const getAllDatasets = async () => {
|
|
|
6065
6065
|
throw { message, status };
|
|
6066
6066
|
}
|
|
6067
6067
|
};
|
|
6068
|
-
const index$
|
|
6068
|
+
const index$b = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6069
6069
|
__proto__: null,
|
|
6070
6070
|
getAllDatasets,
|
|
6071
6071
|
getData: getData$2,
|
|
@@ -6384,7 +6384,7 @@ const deleteRow = async (tableId, rowId, idField = "_copa_id") => {
|
|
|
6384
6384
|
throw { message, status };
|
|
6385
6385
|
}
|
|
6386
6386
|
};
|
|
6387
|
-
const index$
|
|
6387
|
+
const index$a = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6388
6388
|
__proto__: null,
|
|
6389
6389
|
deleteRow,
|
|
6390
6390
|
getData: getData$1,
|
|
@@ -6476,7 +6476,7 @@ async function publishWorkbook({
|
|
|
6476
6476
|
throw { message, status };
|
|
6477
6477
|
}
|
|
6478
6478
|
}
|
|
6479
|
-
const index$
|
|
6479
|
+
const index$9 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6480
6480
|
__proto__: null,
|
|
6481
6481
|
getPublishedWorkbookById,
|
|
6482
6482
|
getWorkbookDetails,
|
|
@@ -6744,7 +6744,7 @@ const getRunResultById = async (runId) => {
|
|
|
6744
6744
|
throw { message, status };
|
|
6745
6745
|
}
|
|
6746
6746
|
};
|
|
6747
|
-
const index$
|
|
6747
|
+
const index$8 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6748
6748
|
__proto__: null,
|
|
6749
6749
|
createNewRun,
|
|
6750
6750
|
getData,
|
|
@@ -6774,7 +6774,7 @@ async function getTaskDetails({
|
|
|
6774
6774
|
throw { message, status };
|
|
6775
6775
|
}
|
|
6776
6776
|
}
|
|
6777
|
-
const index$
|
|
6777
|
+
const index$7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6778
6778
|
__proto__: null,
|
|
6779
6779
|
getTaskDetails
|
|
6780
6780
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -6820,7 +6820,7 @@ async function getAllReconWorkflows() {
|
|
|
6820
6820
|
throw { message, status };
|
|
6821
6821
|
}
|
|
6822
6822
|
}
|
|
6823
|
-
const index$
|
|
6823
|
+
const index$6 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6824
6824
|
__proto__: null,
|
|
6825
6825
|
getAllReconWorkflows,
|
|
6826
6826
|
runRecon
|
|
@@ -6918,7 +6918,7 @@ async function createOrUpdateForm({
|
|
|
6918
6918
|
throw { message, status: status2 };
|
|
6919
6919
|
}
|
|
6920
6920
|
}
|
|
6921
|
-
const index$
|
|
6921
|
+
const index$5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6922
6922
|
__proto__: null,
|
|
6923
6923
|
createOrUpdateForm,
|
|
6924
6924
|
getFormById,
|
|
@@ -6962,7 +6962,7 @@ async function createAuditLog(params) {
|
|
|
6962
6962
|
throw { message, status };
|
|
6963
6963
|
}
|
|
6964
6964
|
}
|
|
6965
|
-
const index$
|
|
6965
|
+
const index$4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6966
6966
|
__proto__: null,
|
|
6967
6967
|
createAuditLog,
|
|
6968
6968
|
getAuditLogs
|
|
@@ -6981,7 +6981,7 @@ async function getAllTemplatedPipelines() {
|
|
|
6981
6981
|
throw { message, status };
|
|
6982
6982
|
}
|
|
6983
6983
|
}
|
|
6984
|
-
const index$
|
|
6984
|
+
const index$3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6985
6985
|
__proto__: null,
|
|
6986
6986
|
getAllTemplatedPipelines
|
|
6987
6987
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -7042,31 +7042,104 @@ async function reassignTask({
|
|
|
7042
7042
|
throw { message, status };
|
|
7043
7043
|
}
|
|
7044
7044
|
}
|
|
7045
|
-
const index$
|
|
7045
|
+
const index$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
7046
7046
|
__proto__: null,
|
|
7047
7047
|
markTaskDone,
|
|
7048
7048
|
reassignTask
|
|
7049
7049
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
7050
|
+
async function getAllInboxItems({
|
|
7051
|
+
page,
|
|
7052
|
+
perPage
|
|
7053
|
+
} = {}) {
|
|
7054
|
+
var _a, _b, _c;
|
|
7055
|
+
try {
|
|
7056
|
+
const queryParams = new URLSearchParams();
|
|
7057
|
+
if (page !== void 0) {
|
|
7058
|
+
queryParams.append("page", page.toString());
|
|
7059
|
+
}
|
|
7060
|
+
if (perPage !== void 0) {
|
|
7061
|
+
queryParams.append("perPage", perPage.toString());
|
|
7062
|
+
}
|
|
7063
|
+
const queryString = queryParams.toString();
|
|
7064
|
+
const url = `/inbox-items/get-all-inbox-items${queryString ? `?${queryString}` : ""}`;
|
|
7065
|
+
const response = await apiClient.get(url);
|
|
7066
|
+
if (!response.data || !response.data.data) {
|
|
7067
|
+
throw { message: "Failed to fetch inbox items", status: 500 };
|
|
7068
|
+
}
|
|
7069
|
+
return response.data.data;
|
|
7070
|
+
} catch (error) {
|
|
7071
|
+
const message = ((_b = (_a = error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.message) || error.message || "An unexpected error occurred while fetching inbox items";
|
|
7072
|
+
const status = ((_c = error.response) == null ? void 0 : _c.status) || 500;
|
|
7073
|
+
throw { message, status };
|
|
7074
|
+
}
|
|
7075
|
+
}
|
|
7076
|
+
async function markItemAsRead({
|
|
7077
|
+
inboxItemIds
|
|
7078
|
+
}) {
|
|
7079
|
+
var _a, _b, _c;
|
|
7080
|
+
try {
|
|
7081
|
+
if (!inboxItemIds || !Array.isArray(inboxItemIds) || inboxItemIds.length === 0) {
|
|
7082
|
+
throw { message: "inboxItemIds array is required", status: 400 };
|
|
7083
|
+
}
|
|
7084
|
+
const response = await apiClient.put("/inbox-items/mark-item-as-read", {
|
|
7085
|
+
inboxItemIds
|
|
7086
|
+
});
|
|
7087
|
+
if (response.status >= 400) {
|
|
7088
|
+
throw { message: "Failed to mark items as read", status: response.status };
|
|
7089
|
+
}
|
|
7090
|
+
} catch (error) {
|
|
7091
|
+
const message = ((_b = (_a = error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.message) || error.message || "An unexpected error occurred while marking items as read";
|
|
7092
|
+
const status = ((_c = error.response) == null ? void 0 : _c.status) || 500;
|
|
7093
|
+
throw { message, status };
|
|
7094
|
+
}
|
|
7095
|
+
}
|
|
7096
|
+
async function markItemAsUnread({
|
|
7097
|
+
inboxItemIds
|
|
7098
|
+
}) {
|
|
7099
|
+
var _a, _b, _c;
|
|
7100
|
+
try {
|
|
7101
|
+
if (!inboxItemIds || !Array.isArray(inboxItemIds) || inboxItemIds.length === 0) {
|
|
7102
|
+
throw { message: "inboxItemIds array is required", status: 400 };
|
|
7103
|
+
}
|
|
7104
|
+
const response = await apiClient.put("/inbox-items/mark-item-as-unread", {
|
|
7105
|
+
inboxItemIds
|
|
7106
|
+
});
|
|
7107
|
+
if (response.status >= 400) {
|
|
7108
|
+
throw { message: "Failed to mark items as unread", status: response.status };
|
|
7109
|
+
}
|
|
7110
|
+
} catch (error) {
|
|
7111
|
+
const message = ((_b = (_a = error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.message) || error.message || "An unexpected error occurred while marking items as unread";
|
|
7112
|
+
const status = ((_c = error.response) == null ? void 0 : _c.status) || 500;
|
|
7113
|
+
throw { message, status };
|
|
7114
|
+
}
|
|
7115
|
+
}
|
|
7116
|
+
const index$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
7117
|
+
__proto__: null,
|
|
7118
|
+
getAllInboxItems,
|
|
7119
|
+
markItemAsRead,
|
|
7120
|
+
markItemAsUnread
|
|
7121
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
7050
7122
|
const index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
7051
7123
|
__proto__: null,
|
|
7052
7124
|
apiClient,
|
|
7053
|
-
audit: index$
|
|
7054
|
-
chat: index$
|
|
7055
|
-
dataset: index$
|
|
7056
|
-
definition: index$
|
|
7057
|
-
files: index$
|
|
7058
|
-
form: index$
|
|
7059
|
-
|
|
7060
|
-
|
|
7061
|
-
|
|
7062
|
-
|
|
7063
|
-
|
|
7064
|
-
|
|
7065
|
-
|
|
7066
|
-
|
|
7067
|
-
|
|
7068
|
-
|
|
7069
|
-
|
|
7125
|
+
audit: index$4,
|
|
7126
|
+
chat: index$c,
|
|
7127
|
+
dataset: index$b,
|
|
7128
|
+
definition: index$g,
|
|
7129
|
+
files: index$h,
|
|
7130
|
+
form: index$5,
|
|
7131
|
+
inboxItems: index$1,
|
|
7132
|
+
inputTable: index$a,
|
|
7133
|
+
metric: index$d,
|
|
7134
|
+
process: index$2,
|
|
7135
|
+
recon: index$6,
|
|
7136
|
+
statement: index$8,
|
|
7137
|
+
task: index$7,
|
|
7138
|
+
templatedPipeline: index$3,
|
|
7139
|
+
user: index$j,
|
|
7140
|
+
workbook: index$9,
|
|
7141
|
+
workflow: index$i,
|
|
7142
|
+
worksheet: index$f
|
|
7070
7143
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
7071
7144
|
const bluecopaTailwindConfig = {
|
|
7072
7145
|
darkMode: "class",
|
|
@@ -7230,6 +7303,6 @@ export {
|
|
|
7230
7303
|
getConfig as copaGetConfig,
|
|
7231
7304
|
setConfig as copaSetConfig,
|
|
7232
7305
|
bluecopaTailwindConfig as copaTailwindConfig,
|
|
7233
|
-
index$
|
|
7306
|
+
index$e as copaUtils
|
|
7234
7307
|
};
|
|
7235
7308
|
//# sourceMappingURL=index.es.js.map
|