@teable/app 7.0.2 → 7.0.3
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/build/cli.js +2 -2
- package/dist/build/index.js +2 -2
- package/dist/chunks/{HOJZKDRT.js → C74GVJIJ.js} +1 -1
- package/dist/chunks/{55AX7R35.js → UAHL536U.js} +13 -0
- package/dist/chunks/{2VHESBP6.js → VUAUTXE2.js} +1 -1
- package/dist/chunks/{N57JCM5C.js → WOZYDEVS.js} +1 -1
- package/dist/chunks/{TSMB4OBX.js → WVY4PINE.js} +2 -2
- package/dist/client.js +2 -2
- package/dist/dev/host.js +1 -1
- package/dist/index.js +3 -3
- package/dist/protocol.d.ts +69 -2
- package/dist/protocol.js +7 -1
- package/dist/schema.js +2 -2
- package/dist/testing.js +4 -4
- package/dist/worker.js +2 -2
- package/package.json +1 -1
package/dist/build/cli.js
CHANGED
package/dist/build/index.js
CHANGED
|
@@ -271,6 +271,16 @@ function fileKeyPath(key) {
|
|
|
271
271
|
var DEPLOY_HEADERS = { commit: "X-Teable-Commit", message: "X-Teable-Message" };
|
|
272
272
|
var DEPLOY_PARTS = { server: "server", worker: "worker", pages: "pages" };
|
|
273
273
|
var PAGES_APP_META = "teable-app";
|
|
274
|
+
var BADGE_RULES = ["required", "optional", "off"];
|
|
275
|
+
var SITE_LIMITS = { title: 120, description: 500, iconBytes: 1024 * 1024 };
|
|
276
|
+
var SITE_ICON_TYPES = [
|
|
277
|
+
"image/png",
|
|
278
|
+
"image/jpeg",
|
|
279
|
+
"image/webp",
|
|
280
|
+
"image/svg+xml",
|
|
281
|
+
"image/x-icon",
|
|
282
|
+
"image/vnd.microsoft.icon"
|
|
283
|
+
];
|
|
274
284
|
var SECRET_NAME_PATTERN = "[A-Z][A-Z0-9_]{0,63}";
|
|
275
285
|
var SECRET_NAME = new RegExp(`^${SECRET_NAME_PATTERN}$`);
|
|
276
286
|
function secretPlaceholder(name) {
|
|
@@ -346,6 +356,9 @@ export {
|
|
|
346
356
|
DEPLOY_HEADERS,
|
|
347
357
|
DEPLOY_PARTS,
|
|
348
358
|
PAGES_APP_META,
|
|
359
|
+
BADGE_RULES,
|
|
360
|
+
SITE_LIMITS,
|
|
361
|
+
SITE_ICON_TYPES,
|
|
349
362
|
SECRET_NAME,
|
|
350
363
|
secretPlaceholder,
|
|
351
364
|
SECRET_PLACEHOLDER,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
describeTables
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./VUAUTXE2.js";
|
|
4
4
|
import {
|
|
5
5
|
CAPABILITIES,
|
|
6
6
|
PROTOCOL_VERSION,
|
|
7
7
|
admit,
|
|
8
8
|
isPageAccess
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./UAHL536U.js";
|
|
10
10
|
|
|
11
11
|
// src/server/errors.ts
|
|
12
12
|
import { z } from "zod";
|
package/dist/client.js
CHANGED
package/dist/dev/host.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createApp,
|
|
3
3
|
fail
|
|
4
|
-
} from "./chunks/
|
|
5
|
-
import "./chunks/
|
|
6
|
-
import "./chunks/
|
|
4
|
+
} from "./chunks/WVY4PINE.js";
|
|
5
|
+
import "./chunks/VUAUTXE2.js";
|
|
6
|
+
import "./chunks/UAHL536U.js";
|
|
7
7
|
|
|
8
8
|
// src/index.ts
|
|
9
9
|
import { z } from "zod";
|
package/dist/protocol.d.ts
CHANGED
|
@@ -407,8 +407,9 @@ export declare const ASSETS_HEADER = "X-Teable-Assets";
|
|
|
407
407
|
* Where the runtime answers on an app's own host before its Worker (ADR
|
|
408
408
|
* 0014): `sign-in?return=<path>` (to Teable and back), `callback`,
|
|
409
409
|
* `session` (`SessionResponse`) and `sign-out` (POST); for an app's accounts
|
|
410
|
-
* (ADR 0021), `sign-in/email` and `sign-in/code` (POST, `SignInCodeRequest`)
|
|
411
|
-
*
|
|
410
|
+
* (ADR 0021), `sign-in/email` and `sign-in/code` (POST, `SignInCodeRequest`);
|
|
411
|
+
* and the icon its creators set and the script of its badge (ADR 0023),
|
|
412
|
+
* `icon` and `badge.js`. With `${APPS_PATH}/`,
|
|
412
413
|
* the app's own API there, the app's Worker never sees these paths.
|
|
413
414
|
*/
|
|
414
415
|
export declare const SESSION_PATH = "/.teable";
|
|
@@ -750,6 +751,72 @@ export interface AppSubdomain {
|
|
|
750
751
|
/** `https://<subdomain>.teable.uk`, or its id's host; null when it has neither. */
|
|
751
752
|
url: string | null;
|
|
752
753
|
}
|
|
754
|
+
/**
|
|
755
|
+
* Whether an app's pages show the "Build with Teable" badge (ADR 0023), as
|
|
756
|
+
* the old platform decides from its space's plan: always (`required`),
|
|
757
|
+
* unless its creators hide it (`optional`), or never (`off`).
|
|
758
|
+
*/
|
|
759
|
+
export type BadgeRule = "required" | "optional" | "off";
|
|
760
|
+
/** What a badge rule may be. */
|
|
761
|
+
export declare const BADGE_RULES: readonly ["required", "optional", "off"];
|
|
762
|
+
/**
|
|
763
|
+
* An app's site info (ADR 0023), as `GET {APPS_PATH}/:appId/site` says it
|
|
764
|
+
* to its creators: the title, description and icon the runtime puts in its
|
|
765
|
+
* pages' head over what their code says, each null to leave the pages'
|
|
766
|
+
* own; and its badge.
|
|
767
|
+
*/
|
|
768
|
+
export interface AppSite {
|
|
769
|
+
title: string | null;
|
|
770
|
+
description: string | null;
|
|
771
|
+
/** The icon, as a `data:` URL; null: the pages' own. */
|
|
772
|
+
icon: string | null;
|
|
773
|
+
badge: {
|
|
774
|
+
rule: BadgeRule;
|
|
775
|
+
/** Whether its creators hid it, which counts only where the rule is `optional`. */
|
|
776
|
+
hidden: boolean;
|
|
777
|
+
/** Whether the pages show it. */
|
|
778
|
+
shown: boolean;
|
|
779
|
+
};
|
|
780
|
+
}
|
|
781
|
+
/**
|
|
782
|
+
* What `PUT {APPS_PATH}/:appId/site` takes: any of these, the rest staying
|
|
783
|
+
* as they are. An empty title or description is null; an icon is its type
|
|
784
|
+
* (`SITE_ICON_TYPES`) and its bytes in base64.
|
|
785
|
+
*/
|
|
786
|
+
export interface SiteInput {
|
|
787
|
+
title?: string | null;
|
|
788
|
+
description?: string | null;
|
|
789
|
+
icon?: {
|
|
790
|
+
type: string;
|
|
791
|
+
content: string;
|
|
792
|
+
} | null;
|
|
793
|
+
hideBadge?: boolean;
|
|
794
|
+
}
|
|
795
|
+
/** How long a site's title and description may be, in characters, and its icon, in bytes. */
|
|
796
|
+
export declare const SITE_LIMITS: {
|
|
797
|
+
readonly title: 120;
|
|
798
|
+
readonly description: 500;
|
|
799
|
+
readonly iconBytes: number;
|
|
800
|
+
};
|
|
801
|
+
/** The types an app's icon may be. */
|
|
802
|
+
export declare const SITE_ICON_TYPES: readonly ["image/png", "image/jpeg", "image/webp", "image/svg+xml", "image/x-icon", "image/vnd.microsoft.icon"];
|
|
803
|
+
/**
|
|
804
|
+
* An app's usage (ADR 0006), as `GET {APPS_PATH}/:appId/usage` says it to
|
|
805
|
+
* its creators: per UTC day and kind, the calls its methods ran (`call`),
|
|
806
|
+
* its task runs (`task`) and the requests it sent out (`http`), with how
|
|
807
|
+
* long they took, from `from` to `to` (YYYY-MM-DD, both counted). Days
|
|
808
|
+
* without use are left out.
|
|
809
|
+
*/
|
|
810
|
+
export interface AppUsage {
|
|
811
|
+
from: string;
|
|
812
|
+
to: string;
|
|
813
|
+
days: {
|
|
814
|
+
day: string;
|
|
815
|
+
kind: "call" | "task" | "http";
|
|
816
|
+
quantity: number;
|
|
817
|
+
durationMs: number;
|
|
818
|
+
}[];
|
|
819
|
+
}
|
|
753
820
|
/**
|
|
754
821
|
* A secret of an app (ADR 0015), as `GET {APPS_PATH}/:appId/secrets` lists
|
|
755
822
|
* them for its creators: by name, never by value. The app's code writes
|
package/dist/protocol.js
CHANGED
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
APPS_PATH,
|
|
3
3
|
APP_COMPATIBILITY_DATE,
|
|
4
4
|
ASSETS_HEADER,
|
|
5
|
+
BADGE_RULES,
|
|
5
6
|
BRIDGE_PATH,
|
|
6
7
|
CAPABILITIES,
|
|
7
8
|
DEFAULT_CURRENCY,
|
|
@@ -18,6 +19,8 @@ import {
|
|
|
18
19
|
SECRET_PLACEHOLDER,
|
|
19
20
|
SESSION_PATH,
|
|
20
21
|
SIGN_IN_ACCOUNTS,
|
|
22
|
+
SITE_ICON_TYPES,
|
|
23
|
+
SITE_LIMITS,
|
|
21
24
|
SPACE_ROLES,
|
|
22
25
|
admit,
|
|
23
26
|
callableMethods,
|
|
@@ -33,11 +36,12 @@ import {
|
|
|
33
36
|
secretPlaceholder,
|
|
34
37
|
signedInAsAsked,
|
|
35
38
|
spaceRoleOf
|
|
36
|
-
} from "./chunks/
|
|
39
|
+
} from "./chunks/UAHL536U.js";
|
|
37
40
|
export {
|
|
38
41
|
APPS_PATH,
|
|
39
42
|
APP_COMPATIBILITY_DATE,
|
|
40
43
|
ASSETS_HEADER,
|
|
44
|
+
BADGE_RULES,
|
|
41
45
|
BRIDGE_PATH,
|
|
42
46
|
CAPABILITIES,
|
|
43
47
|
DEFAULT_CURRENCY,
|
|
@@ -54,6 +58,8 @@ export {
|
|
|
54
58
|
SECRET_PLACEHOLDER,
|
|
55
59
|
SESSION_PATH,
|
|
56
60
|
SIGN_IN_ACCOUNTS,
|
|
61
|
+
SITE_ICON_TYPES,
|
|
62
|
+
SITE_LIMITS,
|
|
57
63
|
SPACE_ROLES,
|
|
58
64
|
admit,
|
|
59
65
|
callableMethods,
|
package/dist/schema.js
CHANGED
package/dist/testing.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
methodName
|
|
3
|
-
} from "./chunks/
|
|
4
|
-
import "./chunks/
|
|
3
|
+
} from "./chunks/WVY4PINE.js";
|
|
4
|
+
import "./chunks/VUAUTXE2.js";
|
|
5
5
|
import {
|
|
6
6
|
MethodError
|
|
7
|
-
} from "./chunks/
|
|
7
|
+
} from "./chunks/C74GVJIJ.js";
|
|
8
8
|
import {
|
|
9
9
|
ERROR_STATUS
|
|
10
|
-
} from "./chunks/
|
|
10
|
+
} from "./chunks/UAHL536U.js";
|
|
11
11
|
|
|
12
12
|
// src/testing.ts
|
|
13
13
|
var OWNER = { kind: "user", userId: "test-owner", role: "owner", via: "api" };
|
package/dist/worker.js
CHANGED