@iblai/data-layer 1.29.2 → 1.30.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iblai/data-layer",
3
- "version": "1.29.1",
3
+ "version": "1.30.0",
4
4
  "description": "ibl.ai data layer",
5
5
  "main": "dist/index.esm.js",
6
6
  "types": "dist/index.d.ts",
@@ -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?: {