@iblai/data-layer 1.29.1 → 1.30.0

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.
@@ -7,6 +7,7 @@ export declare const MEMORY_QUERY_KEYS: {
7
7
  MEMSEARCH_MEMORY_CATEGORIES: () => string[];
8
8
  MEMSEARCH_PLATFORM_CONFIG: () => string[];
9
9
  MEMSEARCH_STATUS: () => string[];
10
+ MEMSEARCH_SHARED_MEMORIES: () => string[];
10
11
  };
11
12
  export declare const MEMSEARCH_ENDPOINTS: {
12
13
  GET_USER_SETTINGS: {
@@ -85,4 +86,20 @@ export declare const MEMSEARCH_ENDPOINTS: {
85
86
  service: SERVICES;
86
87
  path: (org: string, userId: string) => string;
87
88
  };
89
+ GET_SHARED_MEMORIES: {
90
+ service: SERVICES;
91
+ path: (org: string, mentorId: string) => string;
92
+ };
93
+ CREATE_SHARED_MEMORY: {
94
+ service: SERVICES;
95
+ path: (org: string, mentorId: string) => string;
96
+ };
97
+ UPDATE_SHARED_MEMORY: {
98
+ service: SERVICES;
99
+ path: (org: string, mentorId: string, memoryId: number) => string;
100
+ };
101
+ DELETE_SHARED_MEMORY: {
102
+ service: SERVICES;
103
+ path: (org: string, mentorId: string, memoryId: number) => string;
104
+ };
88
105
  };
@@ -246,3 +246,47 @@ export type GetMemsearchStatusArgs = {
246
246
  org: string;
247
247
  userId: string;
248
248
  };
249
+ export interface SharedMemoryEntry {
250
+ id: number;
251
+ mentor_id: string;
252
+ mentor_name: string;
253
+ content: string;
254
+ created_by: string | null;
255
+ created_by_email?: string | null;
256
+ created_by_full_name?: string | null;
257
+ created_at: string;
258
+ updated_at: string;
259
+ }
260
+ export type SharedMemoryListResponse = {
261
+ count: number;
262
+ next: string | null;
263
+ previous: string | null;
264
+ results: SharedMemoryEntry[];
265
+ };
266
+ export type GetSharedMemoriesArgs = {
267
+ org: string;
268
+ mentorId: string;
269
+ params?: {
270
+ page?: number;
271
+ /** Server caps this at 100. */
272
+ page_size?: number;
273
+ start_date?: string;
274
+ end_date?: string;
275
+ };
276
+ };
277
+ export type CreateSharedMemoryArgs = {
278
+ org: string;
279
+ mentorId: string;
280
+ content: string;
281
+ };
282
+ export type UpdateSharedMemoryArgs = {
283
+ org: string;
284
+ mentorId: string;
285
+ memoryId: number;
286
+ content: string;
287
+ };
288
+ export type DeleteSharedMemoryArgs = {
289
+ org: string;
290
+ mentorId: string;
291
+ memoryId: number;
292
+ };
@@ -59,7 +59,9 @@ export declare const buildEndpointFromAxdService: <Args extends Record<string, u
59
59
  * Build an endpoint from a hand-assembled URL (rather than a generated service
60
60
  * method), routed through `iblFetchBaseQuery`. Defaults to the DM service.
61
61
  */
62
- export declare const buildEndpointFromDmUrl: <Args extends Record<string, unknown>, Result>(buildUrl: (args: Args) => string, service?: SERVICES) => {
62
+ export declare const buildEndpointFromDmUrl: <Args extends Record<string, unknown>, Result>(buildUrl: (args: Args) => string, service?: SERVICES, options?: {
63
+ returnErrorStatuses?: number[];
64
+ }) => {
63
65
  queryFn: BaseQueryFn<Args, Result, FetchBaseQueryError | CustomError>;
64
66
  };
65
67
  /**
@@ -77,6 +79,15 @@ export interface CustomQueryArgs extends Omit<FetchArgs, 'url'> {
77
79
  isJson?: boolean;
78
80
  contentType?: string;
79
81
  skipAuth?: boolean;
82
+ /**
83
+ * Statuses the caller needs to inspect (e.g. a 404 for a session the
84
+ * caller no longer holds). Retries are unchanged; once they are exhausted
85
+ * these are logged via `console.warn` and returned as `{ error }` instead
86
+ * of thrown — RTK Query serializes a thrown error to `{}`, dropping
87
+ * `status`. Defaults to `[]`, so existing endpoints behave exactly as
88
+ * before.
89
+ */
90
+ returnErrorStatuses?: number[];
80
91
  }
81
92
  export type ExtendedFetchBaseQueryError = FetchBaseQueryError & {
82
93
  data?: {