@iblai/data-layer 1.23.0 → 1.25.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.24.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. */
@@ -3,8 +3,9 @@ export type { DomainRecord };
3
3
  /**
4
4
  * A deployed app. `site_url` is the address to show the user and is final as
5
5
  * soon as the deploy is accepted — never build a host from `name`.
6
- * `shared_domain` is that same host on its own when the platform assigned it
7
- * automatically, and empty when the app is served at a custom domain.
6
+ * `shared_domain` is that same host on its own when it is the subdomain chosen
7
+ * under the platform's shared domain, and empty when the app is served at a
8
+ * custom domain.
8
9
  */
9
10
  export interface HostingProject {
10
11
  id: number;
@@ -68,10 +69,16 @@ export interface CreateHostingProjectDomainArgs {
68
69
  username: string;
69
70
  project: number;
70
71
  /**
71
- * Omit to have the platform assign a subdomain of its shared zone. That path
72
- * answers 503 on an instance where no shared zone is configured.
72
+ * Exactly one of `domain` and `subdomain`. `domain` is a domain the
73
+ * organization owns; `subdomain` is one label under the platform's shared
74
+ * domain, chosen like a username (`^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`).
75
+ * The backend refuses a body with neither (400, a `subdomain` field error —
76
+ * it never invents an address), answers 409 when the subdomain is taken, 200
77
+ * when the app already has it, and 503 when no shared domain is on offer for
78
+ * this organization.
73
79
  */
74
80
  domain?: string;
81
+ subdomain?: string;
75
82
  }
76
83
  export interface DeleteHostingProjectDomainArgs {
77
84
  org: string;