@iblai/data-layer 1.5.10 → 1.5.11
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/index.d.ts +82 -392
- package/dist/index.esm.js +35 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +35 -1
- package/dist/index.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/src/features/periodic-agents/api-slice.d.ts +82 -390
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -44345,13 +44345,47 @@ exports.recommendationPromptTypeEnum = void 0;
|
|
|
44345
44345
|
recommendationPromptTypeEnum["catalog"] = "catalog";
|
|
44346
44346
|
})(exports.recommendationPromptTypeEnum || (exports.recommendationPromptTypeEnum = {}));
|
|
44347
44347
|
|
|
44348
|
+
const encodePathSegment = (value) => encodeURIComponent(value);
|
|
44349
|
+
const periodicAgentsListPath = ({ org, userId }) => `/api/ai-mentor/orgs/${encodePathSegment(org)}/users/${encodePathSegment(userId)}/periodic-agents/`;
|
|
44350
|
+
const periodicAgentsListParams = ({ enabled, mentorId, ordering, page, pageSize, parentMentorId, parentSessionId, previousAgent, previousAgentStatus, search, status, title, username, startDate, endDate, }) => ({
|
|
44351
|
+
enabled,
|
|
44352
|
+
mentor_id: mentorId,
|
|
44353
|
+
ordering,
|
|
44354
|
+
page,
|
|
44355
|
+
page_size: pageSize,
|
|
44356
|
+
parent_mentor_id: parentMentorId,
|
|
44357
|
+
parent_session_id: parentSessionId,
|
|
44358
|
+
previous_agent: previousAgent,
|
|
44359
|
+
previous_agent_status: previousAgentStatus,
|
|
44360
|
+
search,
|
|
44361
|
+
status,
|
|
44362
|
+
title,
|
|
44363
|
+
username,
|
|
44364
|
+
start_date: startDate,
|
|
44365
|
+
end_date: endDate,
|
|
44366
|
+
});
|
|
44348
44367
|
const periodicAgentsApiSlice = react.createApi({
|
|
44349
44368
|
reducerPath: 'periodicAgentsApiSlice',
|
|
44350
44369
|
baseQuery: iblFakeBaseQuery,
|
|
44351
44370
|
tagTypes: ['periodicAgents', 'periodicAgent', 'periodicAgentLogs'],
|
|
44352
44371
|
endpoints: (builder) => ({
|
|
44353
44372
|
getPeriodicAgents: builder.query({
|
|
44354
|
-
|
|
44373
|
+
async queryFn(args, api, extraOptions) {
|
|
44374
|
+
try {
|
|
44375
|
+
const result = await iblFetchBaseQuery({
|
|
44376
|
+
url: periodicAgentsListPath(args),
|
|
44377
|
+
service: exports.SERVICES.DM,
|
|
44378
|
+
params: periodicAgentsListParams(args),
|
|
44379
|
+
}, api, extraOptions);
|
|
44380
|
+
if ('error' in result) {
|
|
44381
|
+
return { error: result.error };
|
|
44382
|
+
}
|
|
44383
|
+
return { data: result.data };
|
|
44384
|
+
}
|
|
44385
|
+
catch (error) {
|
|
44386
|
+
return { error: error };
|
|
44387
|
+
}
|
|
44388
|
+
},
|
|
44355
44389
|
providesTags: ['periodicAgents'],
|
|
44356
44390
|
}),
|
|
44357
44391
|
getPeriodicAgent: builder.query({
|