@protobase/client 0.21.3 → 0.21.5

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/problem.d.ts CHANGED
@@ -25,6 +25,11 @@ export type ProblemDetails = {
25
25
  errors?: ProblemError[];
26
26
  /** The index of the operation that failed, when the request was a batch. */
27
27
  operation?: number;
28
+ /** For a delete other records still point at: their resource, and its field pointing at the record, as far as the caller may know. */
29
+ blockedBy?: {
30
+ resource: string;
31
+ field?: string;
32
+ };
28
33
  };
29
34
  /** A non-2xx response, parsed from `application/problem+json`. */
30
35
  export declare class ApiError extends Error {
@@ -35,6 +40,11 @@ export declare class ApiError extends Error {
35
40
  get slug(): string;
36
41
  /** For a batch: the index of the operation that failed, so the UI can name it. */
37
42
  get operation(): number | undefined;
43
+ /** For a delete other records still point at: their resource, and the field to filter its list by. */
44
+ get blockedBy(): {
45
+ resource: string;
46
+ field?: string;
47
+ } | undefined;
38
48
  get errors(): ProblemError[];
39
49
  /** Filter errors carry the span of the offending text, so the UI can underline it. */
40
50
  get filterErrors(): ProblemError[];
package/dist/problem.js CHANGED
@@ -18,6 +18,10 @@ var ApiError = class extends Error {
18
18
  get operation() {
19
19
  return this.problem.operation ?? this.errors.find((entry) => entry.operation !== void 0)?.operation;
20
20
  }
21
+ /** For a delete other records still point at: their resource, and the field to filter its list by. */
22
+ get blockedBy() {
23
+ return this.problem.blockedBy;
24
+ }
21
25
  get errors() {
22
26
  return this.problem.errors ?? [];
23
27
  }
package/dist/types.d.ts CHANGED
@@ -156,6 +156,7 @@ export type ResourcePermissions = {
156
156
  /**
157
157
  * `assistant`: the assistant backend, for a caller with the `admin` or `ai` role when the app has one.
158
158
  * `runtime`: the runtime updates endpoint, for a caller with the `admin` role when the app has one.
159
+ * `appName`: the app's name, which ends the admin app's tab titles.
159
160
  * `signIn`: for a visitor who is not signed in, the resources they could use once signed in, with what to tell them.
160
161
  * `bottomBar`: the tabs on phones, of the bottom bar that names the caller's active role.
161
162
  * `maps`: the map style the admin app draws maps with, and the layers of raster tiles its maps may switch to.
@@ -164,6 +165,7 @@ export type ResourcePermissions = {
164
165
  * `sources`: the other APIs whose resources the admin app draws for the caller.
165
166
  */
166
167
  export type Meta = {
168
+ appName: string;
167
169
  resources: ResourceModel[];
168
170
  views: ViewModel[];
169
171
  pages?: PageModel[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@protobase/client",
3
- "version": "0.21.3",
3
+ "version": "0.21.5",
4
4
  "description": "Typed fetch client for the Protobase REST API.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -30,8 +30,8 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@better-auth/passkey": "^1.7.7",
33
- "@protobase/layout": "0.21.3",
34
- "@protobase/schema": "0.21.3",
33
+ "@protobase/layout": "0.21.5",
34
+ "@protobase/schema": "0.21.5",
35
35
  "@simplewebauthn/browser": "^13.3.0",
36
36
  "better-auth": "^1.7.7"
37
37
  }