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