@iblai/data-layer 1.23.0 → 1.24.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.
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iblai/data-layer",
3
- "version": "1.22.0",
3
+ "version": "1.23.0",
4
4
  "description": "ibl.ai data layer",
5
5
  "main": "dist/index.esm.js",
6
6
  "types": "dist/index.d.ts",
@@ -2,7 +2,7 @@ import type { ApiToken, ApiTokenFieldPermissions, ApiTokenWriteBody, PaginatedAp
2
2
  export type { ApiToken, ApiTokenAssociation, ApiTokenFieldPermissions, ApiTokenMode, ApiTokenWriteBody, PaginatedApiTokenList, } from './types';
3
3
  /**
4
4
  * Normalizes a `getApiKeys` result: the endpoint returns a bare array unless
5
- * `pageSize` is sent, in which case it returns a DRF page envelope.
5
+ * `pageSize` is sent, in which case it returns a `{count, next_page, previous_page, results}` envelope.
6
6
  */
7
7
  export declare function unwrapApiTokenList(response?: ApiToken[] | PaginatedApiTokenList): {
8
8
  tokens: ApiToken[];
@@ -31,10 +31,14 @@ export interface ApiToken {
31
31
  /** Present when the endpoint embeds per-field write flags in the payload. */
32
32
  field_permissions?: ApiTokenFieldPermissions;
33
33
  }
34
+ /**
35
+ * Page envelope returned when `page_size` is sent. The backend reports page
36
+ * NUMBERS (`next_page`/`previous_page`), not DRF `next`/`previous` URLs.
37
+ */
34
38
  export interface PaginatedApiTokenList {
35
39
  count: number;
36
- next?: string | null;
37
- previous?: string | null;
40
+ next_page?: number | null;
41
+ previous_page?: number | null;
38
42
  results: ApiToken[];
39
43
  }
40
44
  /** POST/PATCH body. `expires_in` is a duration; `expires` is read-only. */