@greensecurity/javascript-sdk 0.46.0-beta.9 → 0.47.0-beta.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/commonjs/__tests__/apps/contract.test.js +288 -4
- package/dist/commonjs/__tests__/apps/contract.test.js.map +1 -1
- package/dist/commonjs/__tests__/apps/devpreview-routes.test.d.ts +2 -0
- package/dist/commonjs/__tests__/apps/devpreview-routes.test.d.ts.map +1 -0
- package/dist/commonjs/__tests__/apps/devpreview-routes.test.js +86 -0
- package/dist/commonjs/__tests__/apps/devpreview-routes.test.js.map +1 -0
- package/dist/commonjs/__tests__/apps/kit/example.test.js +84 -4
- package/dist/commonjs/__tests__/apps/kit/example.test.js.map +1 -1
- package/dist/commonjs/__tests__/apps/kit/pages.test.d.ts +2 -0
- package/dist/commonjs/__tests__/apps/kit/pages.test.d.ts.map +1 -0
- package/dist/commonjs/__tests__/apps/kit/pages.test.js +119 -0
- package/dist/commonjs/__tests__/apps/kit/pages.test.js.map +1 -0
- package/dist/commonjs/__tests__/apps/kit/render.test.js +24 -0
- package/dist/commonjs/__tests__/apps/kit/render.test.js.map +1 -1
- package/dist/commonjs/__tests__/apps/kit/store.test.d.ts +2 -0
- package/dist/commonjs/__tests__/apps/kit/store.test.d.ts.map +1 -0
- package/dist/commonjs/__tests__/apps/kit/store.test.js +123 -0
- package/dist/commonjs/__tests__/apps/kit/store.test.js.map +1 -0
- package/dist/commonjs/__tests__/apps/post-install-page.test.d.ts +2 -0
- package/dist/commonjs/__tests__/apps/post-install-page.test.d.ts.map +1 -0
- package/dist/commonjs/__tests__/apps/post-install-page.test.js +110 -0
- package/dist/commonjs/__tests__/apps/post-install-page.test.js.map +1 -0
- package/dist/commonjs/__tests__/apps/routes.test.d.ts +2 -0
- package/dist/commonjs/__tests__/apps/routes.test.d.ts.map +1 -0
- package/dist/commonjs/__tests__/apps/routes.test.js +238 -0
- package/dist/commonjs/__tests__/apps/routes.test.js.map +1 -0
- package/dist/commonjs/__tests__/vendors.test.js +1 -1
- package/dist/commonjs/__tests__/zoneDevicesCreate.test.d.ts +2 -0
- package/dist/commonjs/__tests__/zoneDevicesCreate.test.d.ts.map +1 -0
- package/dist/commonjs/__tests__/zoneDevicesCreate.test.js +47 -0
- package/dist/commonjs/__tests__/zoneDevicesCreate.test.js.map +1 -0
- package/dist/commonjs/__tests__/zones.test.js +4 -28
- package/dist/commonjs/__tests__/zones.test.js.map +1 -1
- package/dist/commonjs/admin-funcs/zoneDevicesCreate.d.ts +11 -0
- package/dist/commonjs/admin-funcs/zoneDevicesCreate.d.ts.map +1 -0
- package/dist/commonjs/admin-funcs/zoneDevicesCreate.js +14 -0
- package/dist/commonjs/admin-funcs/zoneDevicesCreate.js.map +1 -0
- package/dist/commonjs/admin-funcs/zoneDevicesMacAvailability.d.ts +3 -0
- package/dist/commonjs/admin-funcs/zoneDevicesMacAvailability.d.ts.map +1 -0
- package/dist/commonjs/admin-funcs/zoneDevicesMacAvailability.js +11 -0
- package/dist/commonjs/admin-funcs/zoneDevicesMacAvailability.js.map +1 -0
- package/dist/commonjs/apps/components.d.ts +321 -0
- package/dist/commonjs/apps/components.d.ts.map +1 -1
- package/dist/commonjs/apps/components.js +168 -2
- package/dist/commonjs/apps/components.js.map +1 -1
- package/dist/commonjs/apps/context.d.ts +24 -0
- package/dist/commonjs/apps/context.d.ts.map +1 -1
- package/dist/commonjs/apps/context.js.map +1 -1
- package/dist/commonjs/apps/devpreview.d.ts +20 -3
- package/dist/commonjs/apps/devpreview.d.ts.map +1 -1
- package/dist/commonjs/apps/devpreview.js +18 -7
- package/dist/commonjs/apps/devpreview.js.map +1 -1
- package/dist/commonjs/apps/hooks/index.d.ts +33 -2
- package/dist/commonjs/apps/hooks/index.d.ts.map +1 -1
- package/dist/commonjs/apps/hooks/index.js +41 -1
- package/dist/commonjs/apps/hooks/index.js.map +1 -1
- package/dist/commonjs/apps/hooks/store.d.ts +48 -0
- package/dist/commonjs/apps/hooks/store.d.ts.map +1 -0
- package/dist/commonjs/apps/hooks/store.js +87 -0
- package/dist/commonjs/apps/hooks/store.js.map +1 -0
- package/dist/commonjs/apps/manifest.d.ts +64 -3
- package/dist/commonjs/apps/manifest.d.ts.map +1 -1
- package/dist/commonjs/apps/manifest.js +128 -27
- package/dist/commonjs/apps/manifest.js.map +1 -1
- package/dist/commonjs/apps/protocol.d.ts +1 -1
- package/dist/commonjs/apps/protocol.d.ts.map +1 -1
- package/dist/commonjs/apps/route.d.ts +11 -1
- package/dist/commonjs/apps/route.d.ts.map +1 -1
- package/dist/commonjs/apps/route.js +13 -7
- package/dist/commonjs/apps/route.js.map +1 -1
- package/dist/commonjs/apps/routes.d.ts +65 -0
- package/dist/commonjs/apps/routes.d.ts.map +1 -0
- package/dist/commonjs/apps/routes.js +202 -0
- package/dist/commonjs/apps/routes.js.map +1 -0
- package/dist/commonjs/apps/surfaces.d.ts +20 -2
- package/dist/commonjs/apps/surfaces.d.ts.map +1 -1
- package/dist/commonjs/apps/surfaces.js +45 -7
- package/dist/commonjs/apps/surfaces.js.map +1 -1
- package/dist/commonjs/apps/testing/index.d.ts +17 -1
- package/dist/commonjs/apps/testing/index.d.ts.map +1 -1
- package/dist/commonjs/apps/testing/index.js +50 -1
- package/dist/commonjs/apps/testing/index.js.map +1 -1
- package/dist/commonjs/apps/ui/index.d.ts +13 -0
- package/dist/commonjs/apps/ui/index.d.ts.map +1 -1
- package/dist/commonjs/apps/ui/index.js +19 -2
- package/dist/commonjs/apps/ui/index.js.map +1 -1
- package/dist/commonjs/index.extras.d.ts +4 -0
- package/dist/commonjs/index.extras.d.ts.map +1 -1
- package/dist/commonjs/index.extras.js +5 -1
- package/dist/commonjs/index.extras.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/models/components/vendorcredentialsummary.d.ts +7 -0
- package/dist/commonjs/models/components/vendorcredentialsummary.d.ts.map +1 -1
- package/dist/commonjs/models/components/vendorcredentialsummary.js +2 -0
- package/dist/commonjs/models/components/vendorcredentialsummary.js.map +1 -1
- package/dist/esm/__tests__/apps/contract.test.js +289 -5
- package/dist/esm/__tests__/apps/contract.test.js.map +1 -1
- package/dist/esm/__tests__/apps/devpreview-routes.test.d.ts +2 -0
- package/dist/esm/__tests__/apps/devpreview-routes.test.d.ts.map +1 -0
- package/dist/esm/__tests__/apps/devpreview-routes.test.js +84 -0
- package/dist/esm/__tests__/apps/devpreview-routes.test.js.map +1 -0
- package/dist/esm/__tests__/apps/kit/example.test.js +85 -5
- package/dist/esm/__tests__/apps/kit/example.test.js.map +1 -1
- package/dist/esm/__tests__/apps/kit/pages.test.d.ts +2 -0
- package/dist/esm/__tests__/apps/kit/pages.test.d.ts.map +1 -0
- package/dist/esm/__tests__/apps/kit/pages.test.js +117 -0
- package/dist/esm/__tests__/apps/kit/pages.test.js.map +1 -0
- package/dist/esm/__tests__/apps/kit/render.test.js +25 -1
- package/dist/esm/__tests__/apps/kit/render.test.js.map +1 -1
- package/dist/esm/__tests__/apps/kit/store.test.d.ts +2 -0
- package/dist/esm/__tests__/apps/kit/store.test.d.ts.map +1 -0
- package/dist/esm/__tests__/apps/kit/store.test.js +121 -0
- package/dist/esm/__tests__/apps/kit/store.test.js.map +1 -0
- package/dist/esm/__tests__/apps/post-install-page.test.d.ts +2 -0
- package/dist/esm/__tests__/apps/post-install-page.test.d.ts.map +1 -0
- package/dist/esm/__tests__/apps/post-install-page.test.js +108 -0
- package/dist/esm/__tests__/apps/post-install-page.test.js.map +1 -0
- package/dist/esm/__tests__/apps/routes.test.d.ts +2 -0
- package/dist/esm/__tests__/apps/routes.test.d.ts.map +1 -0
- package/dist/esm/__tests__/apps/routes.test.js +236 -0
- package/dist/esm/__tests__/apps/routes.test.js.map +1 -0
- package/dist/esm/__tests__/vendors.test.js +1 -1
- package/dist/esm/__tests__/zoneDevicesCreate.test.d.ts +2 -0
- package/dist/esm/__tests__/zoneDevicesCreate.test.d.ts.map +1 -0
- package/dist/esm/__tests__/zoneDevicesCreate.test.js +45 -0
- package/dist/esm/__tests__/zoneDevicesCreate.test.js.map +1 -0
- package/dist/esm/__tests__/zones.test.js +4 -28
- package/dist/esm/__tests__/zones.test.js.map +1 -1
- package/dist/esm/admin-funcs/zoneDevicesCreate.d.ts +11 -0
- package/dist/esm/admin-funcs/zoneDevicesCreate.d.ts.map +1 -0
- package/dist/esm/admin-funcs/zoneDevicesCreate.js +11 -0
- package/dist/esm/admin-funcs/zoneDevicesCreate.js.map +1 -0
- package/dist/esm/admin-funcs/zoneDevicesMacAvailability.d.ts +3 -0
- package/dist/esm/admin-funcs/zoneDevicesMacAvailability.d.ts.map +1 -0
- package/dist/esm/admin-funcs/zoneDevicesMacAvailability.js +8 -0
- package/dist/esm/admin-funcs/zoneDevicesMacAvailability.js.map +1 -0
- package/dist/esm/apps/components.d.ts +321 -0
- package/dist/esm/apps/components.d.ts.map +1 -1
- package/dist/esm/apps/components.js +163 -1
- package/dist/esm/apps/components.js.map +1 -1
- package/dist/esm/apps/context.d.ts +24 -0
- package/dist/esm/apps/context.d.ts.map +1 -1
- package/dist/esm/apps/context.js.map +1 -1
- package/dist/esm/apps/devpreview.d.ts +20 -3
- package/dist/esm/apps/devpreview.d.ts.map +1 -1
- package/dist/esm/apps/devpreview.js +19 -8
- package/dist/esm/apps/devpreview.js.map +1 -1
- package/dist/esm/apps/hooks/index.d.ts +33 -2
- package/dist/esm/apps/hooks/index.d.ts.map +1 -1
- package/dist/esm/apps/hooks/index.js +37 -1
- package/dist/esm/apps/hooks/index.js.map +1 -1
- package/dist/esm/apps/hooks/store.d.ts +48 -0
- package/dist/esm/apps/hooks/store.d.ts.map +1 -0
- package/dist/esm/apps/hooks/store.js +84 -0
- package/dist/esm/apps/hooks/store.js.map +1 -0
- package/dist/esm/apps/manifest.d.ts +64 -3
- package/dist/esm/apps/manifest.d.ts.map +1 -1
- package/dist/esm/apps/manifest.js +116 -26
- package/dist/esm/apps/manifest.js.map +1 -1
- package/dist/esm/apps/protocol.d.ts +1 -1
- package/dist/esm/apps/protocol.d.ts.map +1 -1
- package/dist/esm/apps/route.d.ts +11 -1
- package/dist/esm/apps/route.d.ts.map +1 -1
- package/dist/esm/apps/route.js +14 -8
- package/dist/esm/apps/route.js.map +1 -1
- package/dist/esm/apps/routes.d.ts +65 -0
- package/dist/esm/apps/routes.d.ts.map +1 -0
- package/dist/esm/apps/routes.js +194 -0
- package/dist/esm/apps/routes.js.map +1 -0
- package/dist/esm/apps/surfaces.d.ts +20 -2
- package/dist/esm/apps/surfaces.d.ts.map +1 -1
- package/dist/esm/apps/surfaces.js +39 -2
- package/dist/esm/apps/surfaces.js.map +1 -1
- package/dist/esm/apps/testing/index.d.ts +17 -1
- package/dist/esm/apps/testing/index.d.ts.map +1 -1
- package/dist/esm/apps/testing/index.js +49 -1
- package/dist/esm/apps/testing/index.js.map +1 -1
- package/dist/esm/apps/ui/index.d.ts +13 -0
- package/dist/esm/apps/ui/index.d.ts.map +1 -1
- package/dist/esm/apps/ui/index.js +17 -1
- package/dist/esm/apps/ui/index.js.map +1 -1
- package/dist/esm/index.extras.d.ts +4 -0
- package/dist/esm/index.extras.d.ts.map +1 -1
- package/dist/esm/index.extras.js +5 -1
- package/dist/esm/index.extras.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/models/components/vendorcredentialsummary.d.ts +7 -0
- package/dist/esm/models/components/vendorcredentialsummary.d.ts.map +1 -1
- package/dist/esm/models/components/vendorcredentialsummary.js +2 -0
- package/dist/esm/models/components/vendorcredentialsummary.js.map +1 -1
- package/examples/apps/hello-green/src/store.ts +15 -0
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/apps/contract.test.ts +305 -4
- package/src/__tests__/apps/devpreview-routes.test.ts +103 -0
- package/src/__tests__/apps/kit/example.test.ts +94 -5
- package/src/__tests__/apps/kit/pages.test.ts +137 -0
- package/src/__tests__/apps/kit/render.test.ts +35 -1
- package/src/__tests__/apps/kit/store.test.ts +149 -0
- package/src/__tests__/apps/post-install-page.test.ts +126 -0
- package/src/__tests__/apps/routes.test.ts +318 -0
- package/src/__tests__/vendors.test.ts +1 -1
- package/src/__tests__/zoneDevicesCreate.test.ts +56 -0
- package/src/__tests__/zones.test.ts +4 -28
- package/src/admin-funcs/zoneDevicesCreate.ts +22 -0
- package/src/admin-funcs/zoneDevicesMacAvailability.ts +8 -0
- package/src/apps/components.ts +183 -1
- package/src/apps/context.ts +25 -0
- package/src/apps/devpreview.ts +20 -7
- package/src/apps/hooks/index.ts +42 -2
- package/src/apps/hooks/store.ts +115 -0
- package/src/apps/manifest.ts +151 -27
- package/src/apps/protocol.ts +1 -1
- package/src/apps/route.ts +22 -10
- package/src/apps/routes.ts +230 -0
- package/src/apps/surfaces.ts +45 -12
- package/src/apps/testing/index.ts +48 -2
- package/src/apps/ui/index.ts +18 -1
- package/src/index.extras.ts +5 -1
- package/src/lib/config.ts +3 -3
- package/src/models/components/vendorcredentialsummary.ts +9 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../../src/apps/protocol.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,OAAO,EAAE,SAAS,oBAAoB,EAAE,GAAG,IAAI,CAAC;IACvD,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,SAAS,OAAO,EAAE,GAAG,OAAO,CAAC;CACx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E,IAAI,EAAE,WAAW,CAAA;CAAE,CAAC;AAE1B,MAAM,MAAM,eAAe,GACvB;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,GACjB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE;AACnC,+EAA+E;GAC7E;IAAE,IAAI,EAAE,kBAAkB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAC5C;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE;AACrC,+FAA+F;GAC7F;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GACjC;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE;AAC9E,yDAAyD;GACvD;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,WAAW,EAAE,KAAK,CAAC;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC;AAcnG;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,eAAe,CAoB1E"}
|
package/dist/esm/apps/route.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type SurfaceId } from "./surfaces.js";
|
|
2
|
-
/** Values the destination view receives as `environment.queryParams`. Strings only. */
|
|
2
|
+
/** Values the destination view receives as `environment.navParams`, never as `queryParams`. Strings only. */
|
|
3
3
|
export type EnvParams = Record<string, string>;
|
|
4
4
|
export type RouteDescriptor =
|
|
5
5
|
/** The screen a surface lives on, optionally for one record (detail surfaces). */
|
|
@@ -13,6 +13,16 @@ export type RouteDescriptor =
|
|
|
13
13
|
| {
|
|
14
14
|
type: "appSettings";
|
|
15
15
|
envParams?: EnvParams;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* One of the calling app's own pages, by concrete path in the app's space (`/reports/7`, not
|
|
19
|
+
* `/reports/:id`). The host checks that it matches one of the app's routes offered in the
|
|
20
|
+
* current portal. There is no `appId`: an app can only open its own pages.
|
|
21
|
+
*/
|
|
22
|
+
| {
|
|
23
|
+
type: "appPage";
|
|
24
|
+
path: string;
|
|
25
|
+
envParams?: EnvParams;
|
|
16
26
|
};
|
|
17
27
|
export declare function isRouteDescriptor(value: unknown): value is RouteDescriptor;
|
|
18
28
|
//# sourceMappingURL=route.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../src/apps/route.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../src/apps/route.ts"],"names":[],"mappings":"AAUA,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAE3D,6GAA6G;AAC7G,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE/C,MAAM,MAAM,eAAe;AACzB,kFAAkF;AAChF;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,SAAS,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,SAAS,CAAA;CAAE;AACrF,oEAAoE;GAClE;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,SAAS,CAAC,EAAE,SAAS,CAAA;CAAE;AAChD;;;;GAIG;GACD;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,SAAS,CAAA;CAAE,CAAC;AAE7D,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,eAAe,CAuB1E"}
|
package/dist/esm/apps/route.js
CHANGED
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
* Hand-written (not generated by Speakeasy). Part of the third-party app platform contract;
|
|
3
3
|
* see docs/third-party-apps/plan.md.
|
|
4
4
|
*
|
|
5
|
-
* Apps never navigate by path. They name a destination and the host maps it to its own
|
|
6
|
-
* which keeps host URLs free to change and stops an app from steering users to arbitrary
|
|
5
|
+
* Apps never navigate by host path. They name a destination and the host maps it to its own
|
|
6
|
+
* routes, which keeps host URLs free to change and stops an app from steering users to arbitrary
|
|
7
|
+
* pages. The one path an app writes, `appPage`, is a path inside its own pages space.
|
|
7
8
|
*/
|
|
8
|
-
import {
|
|
9
|
+
import { isConcreteRoutePath } from "./routes.js";
|
|
10
|
+
import { getSurface } from "./surfaces.js";
|
|
9
11
|
export function isRouteDescriptor(value) {
|
|
10
12
|
if (typeof value !== "object" || value === null || !("type" in value))
|
|
11
13
|
return false;
|
|
@@ -14,14 +16,18 @@ export function isRouteDescriptor(value) {
|
|
|
14
16
|
return false;
|
|
15
17
|
switch (v["type"]) {
|
|
16
18
|
case "surface":
|
|
17
|
-
// Only catalog surfaces: the host has no route for anything else. Safe integers
|
|
18
|
-
// record id is never silently rounded on its way through JSON.
|
|
19
|
-
//
|
|
20
|
-
// would name another
|
|
21
|
-
|
|
19
|
+
// Only catalog surfaces of a portal: the host has no route for anything else. Safe integers
|
|
20
|
+
// only, so a record id is never silently rounded on its way through JSON. The portal-less
|
|
21
|
+
// surfaces belong to an app and are reachable only through descriptors that always mean the
|
|
22
|
+
// calling app (`appSettings`, `appPage`): as a plain surface, `objectId` would name another
|
|
23
|
+
// app's settings page or pages.
|
|
24
|
+
return typeof v["surfaceId"] === "string" && (getSurface(v["surfaceId"])?.portal ?? null) !== null &&
|
|
22
25
|
(v["objectId"] === undefined || (Number.isSafeInteger(v["objectId"]) && v["objectId"] > 0));
|
|
23
26
|
case "appSettings":
|
|
24
27
|
return true;
|
|
28
|
+
case "appPage":
|
|
29
|
+
// Concrete paths only, in the route grammar: no params, dots, escapes or empty segments.
|
|
30
|
+
return isConcreteRoutePath(v["path"]);
|
|
25
31
|
default:
|
|
26
32
|
return false;
|
|
27
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route.js","sourceRoot":"","sources":["../../../src/apps/route.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"route.js","sourceRoot":"","sources":["../../../src/apps/route.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,UAAU,EAAkB,MAAM,eAAe,CAAC;AAiB3D,MAAM,UAAU,iBAAiB,CAAC,KAAc;IAC9C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,CAAC,MAAM,IAAI,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAEpF,MAAM,CAAC,GAAG,KAAgC,CAAC;IAC3C,IAAI,CAAC,CAAC,WAAW,CAAC,KAAK,SAAS,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;QAAE,OAAO,KAAK,CAAC;IAE/E,QAAQ,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;QAClB,KAAK,SAAS;YACZ,4FAA4F;YAC5F,0FAA0F;YAC1F,4FAA4F;YAC5F,4FAA4F;YAC5F,gCAAgC;YAChC,OAAO,OAAO,CAAC,CAAC,WAAW,CAAC,KAAK,QAAQ,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,EAAE,MAAM,IAAI,IAAI,CAAC,KAAK,IAAI;gBAChG,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,SAAS,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,IAAK,CAAC,CAAC,UAAU,CAAY,GAAG,CAAC,CAAC,CAAC,CAAC;QAC5G,KAAK,aAAa;YAChB,OAAO,IAAI,CAAC;QACd,KAAK,SAAS;YACZ,yFAAyF;YACzF,OAAO,mBAAmB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;QACxC;YACE,OAAO,KAAK,CAAC;IACjB,CAAC;AACH,CAAC;AAED,SAAS,WAAW,CAAC,KAAc;IACjC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QACzE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC;AAC7D,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A declared route path: `/`, or `/seg(/seg)*` where each segment is static or a `:param`. No dots,
|
|
3
|
+
* percent-escapes, upper case, empty segments or trailing slash, so no path can climb out of the
|
|
4
|
+
* app's own space. `pages` is not reserved inside that space: `/pages/foo` is an ordinary path.
|
|
5
|
+
*/
|
|
6
|
+
export declare const ROUTE_PATH_PATTERN = "^/(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|:[a-z][a-z0-9_]*)(?:/(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|:[a-z][a-z0-9_]*))*)?$";
|
|
7
|
+
/** A concrete path an app navigates to (`{ type: "appPage" }`): the same grammar without params. */
|
|
8
|
+
export declare const CONCRETE_ROUTE_PATH_PATTERN = "^/(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:/[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)*)?$";
|
|
9
|
+
export declare const ROUTE_PATH_MAX_CHARS = 200;
|
|
10
|
+
/** Segments in one path; `/` has none. */
|
|
11
|
+
export declare const ROUTE_PATH_MAX_SEGMENTS = 8;
|
|
12
|
+
/** Routes in one manifest. */
|
|
13
|
+
export declare const APP_ROUTES_MAX = 50;
|
|
14
|
+
/** A declared route path: the {@link ROUTE_PATH_PATTERN} grammar, ≤ 200 characters and ≤ 8 segments. */
|
|
15
|
+
export declare function isRoutePath(value: unknown): value is string;
|
|
16
|
+
/** A concrete route path (no `:param` segments) within the same limits as a declared one. */
|
|
17
|
+
export declare function isConcreteRoutePath(value: unknown): value is string;
|
|
18
|
+
/**
|
|
19
|
+
* Renames every param segment to `:_`. Two paths that normalize to the same string claim the same
|
|
20
|
+
* URLs (`/vendors/:id` and `/vendors/:vendor_id`), so a manifest may declare only one of them.
|
|
21
|
+
*/
|
|
22
|
+
export declare function normalizeRoutePath(path: string): string;
|
|
23
|
+
export interface RouteSetIssue {
|
|
24
|
+
/** Index of the offending entry in `routes`. */
|
|
25
|
+
index: number;
|
|
26
|
+
field: "path" | "portals" | "navigation";
|
|
27
|
+
message: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* The rules over a set of routes that a pattern alone cannot express: the segment cap, a param
|
|
31
|
+
* name used twice in one path, two paths claiming the same URLs, and a repeated portal. Grammar,
|
|
32
|
+
* length and the per-field limits are the schema's job; a path that fails the grammar is skipped
|
|
33
|
+
* here. The zod schema and `apps-cli validate` both report these, and the server repeats them.
|
|
34
|
+
*/
|
|
35
|
+
export declare function routeSetIssues(routes: ReadonlyArray<{
|
|
36
|
+
path: string;
|
|
37
|
+
portals?: readonly string[] | undefined;
|
|
38
|
+
navigation?: unknown;
|
|
39
|
+
}>): RouteSetIssue[];
|
|
40
|
+
export interface AppRouteMatch<R> {
|
|
41
|
+
route: R;
|
|
42
|
+
/** Param values by name, percent-decoded. Always strings: the app parses ids itself. */
|
|
43
|
+
params: Record<string, string>;
|
|
44
|
+
/** Index of `route` in the list passed to {@link matchAppRoute}. */
|
|
45
|
+
index: number;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Finds the route a pathname in the app's own space renders (`/reports/7` for
|
|
49
|
+
* `/{portal}/apps/{appId}/pages/reports/7`), or `null` when none does.
|
|
50
|
+
*
|
|
51
|
+
* `pathname` is URL-encoded, as it appears in a URL: `/` or `/seg(/seg)*` with no empty segment,
|
|
52
|
+
* trailing slash, query or fragment (anything else matches nothing). A host that receives decoded
|
|
53
|
+
* segments encodes each with `encodeURIComponent` before joining them.
|
|
54
|
+
*
|
|
55
|
+
* A static route segment matches only the identical pathname segment. A param segment matches any
|
|
56
|
+
* other segment that decodes to a plain value (see `paramValue`); a segment containing `:` never
|
|
57
|
+
* matches a param. When several routes match, the one with a static segment at the first position
|
|
58
|
+
* where they differ wins (static before param, left to right); among equals, the first declared.
|
|
59
|
+
* Routes whose path is not in the grammar are ignored, so a stale or hand-edited feed entry can
|
|
60
|
+
* never match.
|
|
61
|
+
*/
|
|
62
|
+
export declare function matchAppRoute<R extends {
|
|
63
|
+
path: string;
|
|
64
|
+
}>(routes: readonly R[], pathname: string): AppRouteMatch<R> | null;
|
|
65
|
+
//# sourceMappingURL=routes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../src/apps/routes.ts"],"names":[],"mappings":"AAkBA;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,2HAC2F,CAAC;AAE3H,oGAAoG;AACpG,eAAO,MAAM,2BAA2B,iFAAqD,CAAC;AAE9F,eAAO,MAAM,oBAAoB,MAAM,CAAC;AACxC,0CAA0C;AAC1C,eAAO,MAAM,uBAAuB,IAAI,CAAC;AACzC,8BAA8B;AAC9B,eAAO,MAAM,cAAc,KAAK,CAAC;AAkBjC,wGAAwG;AACxG,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAE3D;AAED,6FAA6F;AAC7F,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAEnE;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKvD;AAED,MAAM,WAAW,aAAa;IAC5B,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,YAAY,CAAC;IACzC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,aAAa,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;IAAC,UAAU,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,GACrG,aAAa,EAAE,CAgDjB;AAED,MAAM,WAAW,aAAa,CAAC,CAAC;IAC9B,KAAK,EAAE,CAAC,CAAC;IACT,wFAAwF;IACxF,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,oEAAoE;IACpE,KAAK,EAAE,MAAM,CAAC;CACf;AAmBD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,EACtD,MAAM,EAAE,SAAS,CAAC,EAAE,EACpB,QAAQ,EAAE,MAAM,GACf,aAAa,CAAC,CAAC,CAAC,GAAG,IAAI,CAazB"}
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Hand-written (not generated by Speakeasy). Part of the third-party app platform contract;
|
|
3
|
+
* see docs/third-party-apps/fullpageview-plan.md.
|
|
4
|
+
*
|
|
5
|
+
* App page routes (`ui_extensions.routes[]`): the path grammar, the uniqueness rule and the one
|
|
6
|
+
* matcher every consumer shares (the host, `apps-cli validate`, the contract tests). Deliberately
|
|
7
|
+
* dependency-free (no zod) so the host renderer can import it without bundling zod; `manifest.ts`
|
|
8
|
+
* re-exports it because it is part of the manifest contract.
|
|
9
|
+
*
|
|
10
|
+
* The server mirrors the grammar and `normalizeRoutePath` in Ruby and reads the same fixtures
|
|
11
|
+
* (`src/__tests__/apps/fixtures/routes.json`).
|
|
12
|
+
*/
|
|
13
|
+
/** A static segment: lower-case letters, digits and inner hyphens. */
|
|
14
|
+
const STATIC_SEGMENT = "[a-z0-9](?:[a-z0-9-]*[a-z0-9])?";
|
|
15
|
+
/** A param segment: `:` and a lower-case name. */
|
|
16
|
+
const PARAM_SEGMENT = ":[a-z][a-z0-9_]*";
|
|
17
|
+
/**
|
|
18
|
+
* A declared route path: `/`, or `/seg(/seg)*` where each segment is static or a `:param`. No dots,
|
|
19
|
+
* percent-escapes, upper case, empty segments or trailing slash, so no path can climb out of the
|
|
20
|
+
* app's own space. `pages` is not reserved inside that space: `/pages/foo` is an ordinary path.
|
|
21
|
+
*/
|
|
22
|
+
export const ROUTE_PATH_PATTERN = "^/(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|:[a-z][a-z0-9_]*)(?:/(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|:[a-z][a-z0-9_]*))*)?$";
|
|
23
|
+
/** A concrete path an app navigates to (`{ type: "appPage" }`): the same grammar without params. */
|
|
24
|
+
export const CONCRETE_ROUTE_PATH_PATTERN = `^/(?:${STATIC_SEGMENT}(?:/${STATIC_SEGMENT})*)?$`;
|
|
25
|
+
export const ROUTE_PATH_MAX_CHARS = 200;
|
|
26
|
+
/** Segments in one path; `/` has none. */
|
|
27
|
+
export const ROUTE_PATH_MAX_SEGMENTS = 8;
|
|
28
|
+
/** Routes in one manifest. */
|
|
29
|
+
export const APP_ROUTES_MAX = 50;
|
|
30
|
+
/** What every param segment becomes in {@link normalizeRoutePath}. */
|
|
31
|
+
const PARAM_PLACEHOLDER = ":_";
|
|
32
|
+
const ROUTE_PATH_RE = new RegExp(ROUTE_PATH_PATTERN);
|
|
33
|
+
const CONCRETE_ROUTE_PATH_RE = new RegExp(CONCRETE_ROUTE_PATH_PATTERN);
|
|
34
|
+
const PARAM_SEGMENT_RE = new RegExp(`^${PARAM_SEGMENT}$`);
|
|
35
|
+
/** The segments of a path in the grammar; `/` has none. */
|
|
36
|
+
function segmentsOf(path) {
|
|
37
|
+
return path === "/" ? [] : path.slice(1).split("/");
|
|
38
|
+
}
|
|
39
|
+
function withinLimits(path) {
|
|
40
|
+
return path.length <= ROUTE_PATH_MAX_CHARS && segmentsOf(path).length <= ROUTE_PATH_MAX_SEGMENTS;
|
|
41
|
+
}
|
|
42
|
+
/** A declared route path: the {@link ROUTE_PATH_PATTERN} grammar, ≤ 200 characters and ≤ 8 segments. */
|
|
43
|
+
export function isRoutePath(value) {
|
|
44
|
+
return typeof value === "string" && ROUTE_PATH_RE.test(value) && withinLimits(value);
|
|
45
|
+
}
|
|
46
|
+
/** A concrete route path (no `:param` segments) within the same limits as a declared one. */
|
|
47
|
+
export function isConcreteRoutePath(value) {
|
|
48
|
+
return typeof value === "string" && CONCRETE_ROUTE_PATH_RE.test(value) && withinLimits(value);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Renames every param segment to `:_`. Two paths that normalize to the same string claim the same
|
|
52
|
+
* URLs (`/vendors/:id` and `/vendors/:vendor_id`), so a manifest may declare only one of them.
|
|
53
|
+
*/
|
|
54
|
+
export function normalizeRoutePath(path) {
|
|
55
|
+
return path
|
|
56
|
+
.split("/")
|
|
57
|
+
.map((segment) => (segment.startsWith(":") ? PARAM_PLACEHOLDER : segment))
|
|
58
|
+
.join("/");
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* The rules over a set of routes that a pattern alone cannot express: the segment cap, a param
|
|
62
|
+
* name used twice in one path, two paths claiming the same URLs, and a repeated portal. Grammar,
|
|
63
|
+
* length and the per-field limits are the schema's job; a path that fails the grammar is skipped
|
|
64
|
+
* here. The zod schema and `apps-cli validate` both report these, and the server repeats them.
|
|
65
|
+
*/
|
|
66
|
+
export function routeSetIssues(routes) {
|
|
67
|
+
const issues = [];
|
|
68
|
+
const claimed = new Map();
|
|
69
|
+
routes.forEach((route, index) => {
|
|
70
|
+
const portals = route.portals ?? [];
|
|
71
|
+
if (new Set(portals).size !== portals.length) {
|
|
72
|
+
issues.push({ index, field: "portals", message: "portals must not repeat" });
|
|
73
|
+
}
|
|
74
|
+
if (!ROUTE_PATH_RE.test(route.path))
|
|
75
|
+
return;
|
|
76
|
+
const segments = segmentsOf(route.path);
|
|
77
|
+
if (segments.length > ROUTE_PATH_MAX_SEGMENTS) {
|
|
78
|
+
issues.push({
|
|
79
|
+
index,
|
|
80
|
+
field: "path",
|
|
81
|
+
message: `${route.path} has ${segments.length} segments; the limit is ${ROUTE_PATH_MAX_SEGMENTS}`,
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
const params = segments.filter((s) => s.startsWith(":"));
|
|
85
|
+
if (new Set(params).size !== params.length) {
|
|
86
|
+
issues.push({ index, field: "path", message: `${route.path} uses a param name twice` });
|
|
87
|
+
}
|
|
88
|
+
// A sidebar entry links to one fixed address, and a path with params has none.
|
|
89
|
+
if (params.length > 0 && route.navigation !== undefined) {
|
|
90
|
+
issues.push({
|
|
91
|
+
index,
|
|
92
|
+
field: "navigation",
|
|
93
|
+
message: `${route.path} has params, so it cannot have a navigation entry; add one to a path without params`,
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
const normalized = normalizeRoutePath(route.path);
|
|
97
|
+
const earlier = claimed.get(normalized);
|
|
98
|
+
if (earlier === undefined) {
|
|
99
|
+
claimed.set(normalized, route.path);
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
issues.push({
|
|
103
|
+
index,
|
|
104
|
+
field: "path",
|
|
105
|
+
message: `${route.path} is declared twice (as ${earlier}); each path takes one page`,
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
return issues;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Decodes one pathname segment into a param value, or returns `null` when it cannot be one: a
|
|
113
|
+
* malformed escape, an empty value, `.` or `..`, or a value containing `/` or `:` (raw or
|
|
114
|
+
* encoded). A param therefore never carries a path or a host-looking value into the app.
|
|
115
|
+
*/
|
|
116
|
+
function paramValue(segment) {
|
|
117
|
+
if (segment.includes(":"))
|
|
118
|
+
return null;
|
|
119
|
+
let value;
|
|
120
|
+
try {
|
|
121
|
+
value = decodeURIComponent(segment);
|
|
122
|
+
}
|
|
123
|
+
catch {
|
|
124
|
+
return null;
|
|
125
|
+
}
|
|
126
|
+
if (value === "" || value === "." || value === ".." || value.includes("/") || value.includes(":"))
|
|
127
|
+
return null;
|
|
128
|
+
return value;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Finds the route a pathname in the app's own space renders (`/reports/7` for
|
|
132
|
+
* `/{portal}/apps/{appId}/pages/reports/7`), or `null` when none does.
|
|
133
|
+
*
|
|
134
|
+
* `pathname` is URL-encoded, as it appears in a URL: `/` or `/seg(/seg)*` with no empty segment,
|
|
135
|
+
* trailing slash, query or fragment (anything else matches nothing). A host that receives decoded
|
|
136
|
+
* segments encodes each with `encodeURIComponent` before joining them.
|
|
137
|
+
*
|
|
138
|
+
* A static route segment matches only the identical pathname segment. A param segment matches any
|
|
139
|
+
* other segment that decodes to a plain value (see `paramValue`); a segment containing `:` never
|
|
140
|
+
* matches a param. When several routes match, the one with a static segment at the first position
|
|
141
|
+
* where they differ wins (static before param, left to right); among equals, the first declared.
|
|
142
|
+
* Routes whose path is not in the grammar are ignored, so a stale or hand-edited feed entry can
|
|
143
|
+
* never match.
|
|
144
|
+
*/
|
|
145
|
+
export function matchAppRoute(routes, pathname) {
|
|
146
|
+
if (!pathname.startsWith("/") || /[?#]/.test(pathname))
|
|
147
|
+
return null;
|
|
148
|
+
const segments = segmentsOf(pathname);
|
|
149
|
+
if (segments.some((s) => s === ""))
|
|
150
|
+
return null;
|
|
151
|
+
let best = null;
|
|
152
|
+
for (const [index, route] of routes.entries()) {
|
|
153
|
+
const candidate = matchOne(route, index, segments);
|
|
154
|
+
if (candidate !== null && (best === null || outranks(candidate.rank, best.rank)))
|
|
155
|
+
best = candidate;
|
|
156
|
+
}
|
|
157
|
+
return best === null ? null : best.match;
|
|
158
|
+
}
|
|
159
|
+
/** Matches one route against the pathname's segments, with its static/param rank. */
|
|
160
|
+
function matchOne(route, index, segments) {
|
|
161
|
+
if (!isRoutePath(route.path))
|
|
162
|
+
return null;
|
|
163
|
+
const pattern = segmentsOf(route.path);
|
|
164
|
+
if (pattern.length !== segments.length)
|
|
165
|
+
return null;
|
|
166
|
+
const params = {};
|
|
167
|
+
const rank = [];
|
|
168
|
+
for (let i = 0; i < pattern.length; i++) {
|
|
169
|
+
const expected = pattern[i] ?? "";
|
|
170
|
+
const actual = segments[i] ?? "";
|
|
171
|
+
if (PARAM_SEGMENT_RE.test(expected)) {
|
|
172
|
+
const value = paramValue(actual);
|
|
173
|
+
if (value === null)
|
|
174
|
+
return null;
|
|
175
|
+
params[expected.slice(1)] = value;
|
|
176
|
+
rank.push(false);
|
|
177
|
+
}
|
|
178
|
+
else {
|
|
179
|
+
if (expected !== actual)
|
|
180
|
+
return null;
|
|
181
|
+
rank.push(true);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
return { match: { route, params, index }, rank };
|
|
185
|
+
}
|
|
186
|
+
/** Whether `a` has a static segment at the first position where it and `b` differ. */
|
|
187
|
+
function outranks(a, b) {
|
|
188
|
+
for (let i = 0; i < a.length; i++) {
|
|
189
|
+
if (a[i] !== b[i])
|
|
190
|
+
return a[i] === true;
|
|
191
|
+
}
|
|
192
|
+
return false;
|
|
193
|
+
}
|
|
194
|
+
//# sourceMappingURL=routes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../../../src/apps/routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,sEAAsE;AACtE,MAAM,cAAc,GAAG,iCAAiC,CAAC;AACzD,kDAAkD;AAClD,MAAM,aAAa,GAAG,kBAAkB,CAAC;AAEzC;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAC7B,wHAAw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EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAClC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAAE,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAC1C,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export type Portal = "vendor" | "company" | "facility" | "system";
|
|
2
|
-
export type SurfaceKind = "navigation" | "drawer.default" | "overview" | "list" | "list.row_action" | "detail" | "detail.tabs" | "settings"
|
|
2
|
+
export type SurfaceKind = "navigation" | "drawer.default" | "overview" | "list" | "list.row_action" | "detail" | "detail.tabs" | "settings"
|
|
3
|
+
/** An app page: one of the app's own `ui_extensions.routes`, rendered full screen. */
|
|
4
|
+
| "page";
|
|
3
5
|
/**
|
|
4
6
|
* The kind of record a surface is showing. These match the public API resource each one is
|
|
5
7
|
* read through (`/vendors`, `/vendors/credentials`, `/facilities`, `/companies`,
|
|
@@ -27,6 +29,19 @@ export interface SurfaceDef {
|
|
|
27
29
|
/** Wave 1 surfaces are rendered by the host; Wave 2 ids are reserved and accepted in manifests. */
|
|
28
30
|
readonly wave: 1 | 2;
|
|
29
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* Host URL segment reserved for app pages: `/{portal}/apps/{appId}/pages{path}`. No host route may
|
|
34
|
+
* be defined under it except the screens that render app pages, so an app path can never shadow a
|
|
35
|
+
* host page. It is not reserved inside an app's own space: `/pages/foo` is an ordinary app path.
|
|
36
|
+
*/
|
|
37
|
+
export declare const APP_PAGES_SEGMENT = "pages";
|
|
38
|
+
/**
|
|
39
|
+
* The host pathname of an app page: `/{portal}/apps/{appId}/pages{path}`, with the root path `/`
|
|
40
|
+
* at `/{portal}/apps/{appId}/pages`. Throws unless `appId` is a positive integer and `path` is a
|
|
41
|
+
* concrete route path (`isConcreteRoutePath`), so no input can resolve outside the app's own pages
|
|
42
|
+
* (`/../settings`, `//evil.example`).
|
|
43
|
+
*/
|
|
44
|
+
export declare function appPagePathname(portal: Portal, appId: number, path: string): string;
|
|
30
45
|
export declare const SURFACES: readonly SurfaceDef[];
|
|
31
46
|
/**
|
|
32
47
|
* A surface identifier. This is deliberately a plain `string`: the catalog is data-driven, so the
|
|
@@ -38,6 +53,9 @@ export declare function isSurfaceId(value: unknown): value is SurfaceId;
|
|
|
38
53
|
export declare function getSurface(id: string): SurfaceDef | undefined;
|
|
39
54
|
/** The fallback surface a portal resolves to when an app has no view for the exact surface. */
|
|
40
55
|
export declare function drawerDefaultFor(portal: Portal): SurfaceId;
|
|
41
|
-
/**
|
|
56
|
+
/**
|
|
57
|
+
* Surfaces the host renders for a portal in the given wave (and earlier waves). Portal-less
|
|
58
|
+
* surfaces (`settings`, `page`) are never included: they belong to an app, not to a portal screen.
|
|
59
|
+
*/
|
|
42
60
|
export declare function surfacesForPortal(portal: Portal, wave?: 1 | 2): SurfaceDef[];
|
|
43
61
|
//# sourceMappingURL=surfaces.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"surfaces.d.ts","sourceRoot":"","sources":["../../../src/apps/surfaces.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"surfaces.d.ts","sourceRoot":"","sources":["../../../src/apps/surfaces.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,GAAG,QAAQ,CAAC;AAElE,MAAM,MAAM,WAAW,GACnB,YAAY,GACZ,gBAAgB,GAChB,UAAU,GACV,MAAM,GACN,iBAAiB,GACjB,QAAQ,GACR,aAAa,GACb,UAAU;AACZ,sFAAsF;GACpF,MAAM,CAAC;AAEX;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GACpB,QAAQ,GAAG,mBAAmB,GAAG,UAAU,GAAG,SAAS,GAAG,aAAa,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;AAExH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI,CAAC;IACvC;;;;OAIG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,mGAAmG;IACnG,QAAQ,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC;CACtB;AAED;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,UAAU,CAAC;AAEzC;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAQnF;AA8ED,eAAO,MAAM,QAAQ,EAAE,SAAS,UAAU,EAWxC,CAAC;AAEH;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAI/B,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,SAAS,CAE9D;AAED,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAE7D;AAED,+FAA+F;AAC/F,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAE1D;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,GAAE,CAAC,GAAG,CAAK,GAAG,UAAU,EAAE,CAE/E"}
|
|
@@ -2,6 +2,28 @@
|
|
|
2
2
|
* Hand-written (not generated by Speakeasy). Part of the third-party app platform contract;
|
|
3
3
|
* see docs/third-party-apps/plan.md. Host (web-mobile-client) and SDK both import from here.
|
|
4
4
|
*/
|
|
5
|
+
import { isConcreteRoutePath } from "./routes.js";
|
|
6
|
+
/**
|
|
7
|
+
* Host URL segment reserved for app pages: `/{portal}/apps/{appId}/pages{path}`. No host route may
|
|
8
|
+
* be defined under it except the screens that render app pages, so an app path can never shadow a
|
|
9
|
+
* host page. It is not reserved inside an app's own space: `/pages/foo` is an ordinary app path.
|
|
10
|
+
*/
|
|
11
|
+
export const APP_PAGES_SEGMENT = "pages";
|
|
12
|
+
/**
|
|
13
|
+
* The host pathname of an app page: `/{portal}/apps/{appId}/pages{path}`, with the root path `/`
|
|
14
|
+
* at `/{portal}/apps/{appId}/pages`. Throws unless `appId` is a positive integer and `path` is a
|
|
15
|
+
* concrete route path (`isConcreteRoutePath`), so no input can resolve outside the app's own pages
|
|
16
|
+
* (`/../settings`, `//evil.example`).
|
|
17
|
+
*/
|
|
18
|
+
export function appPagePathname(portal, appId, path) {
|
|
19
|
+
if (!Number.isSafeInteger(appId) || appId <= 0) {
|
|
20
|
+
throw new RangeError(`appPagePathname: app id must be a positive integer, got ${String(appId)}`);
|
|
21
|
+
}
|
|
22
|
+
if (!isConcreteRoutePath(path)) {
|
|
23
|
+
throw new RangeError(`appPagePathname: not a concrete route path: ${JSON.stringify(path)}`);
|
|
24
|
+
}
|
|
25
|
+
return `/${portal}/apps/${appId}/${APP_PAGES_SEGMENT}${path === "/" ? "" : path}`;
|
|
26
|
+
}
|
|
5
27
|
/** Expands a list surface into the surface itself and its row-action surface. */
|
|
6
28
|
function list(portal, entity, objectType, route) {
|
|
7
29
|
return [
|
|
@@ -60,7 +82,15 @@ function staffPortal(portal) {
|
|
|
60
82
|
];
|
|
61
83
|
}
|
|
62
84
|
function define(portal, wave, entries) {
|
|
63
|
-
return entries.map(([id, kind, objectType, route, idParam]) => ({
|
|
85
|
+
return entries.map(([id, kind, objectType, route, idParam]) => ({
|
|
86
|
+
id,
|
|
87
|
+
portal,
|
|
88
|
+
kind,
|
|
89
|
+
objectType,
|
|
90
|
+
route,
|
|
91
|
+
idParam,
|
|
92
|
+
wave,
|
|
93
|
+
}));
|
|
64
94
|
}
|
|
65
95
|
export const SURFACES = Object.freeze([
|
|
66
96
|
...define("company", 1, COMPANY),
|
|
@@ -69,6 +99,10 @@ export const SURFACES = Object.freeze([
|
|
|
69
99
|
...define("system", 2, staffPortal("system")),
|
|
70
100
|
// The app's own settings page. Every portal has one, so the route names the portal as a segment.
|
|
71
101
|
...define(null, 1, [["settings", "settings", null, "/[portal]/apps/[appId]/settings", "appId"]]),
|
|
102
|
+
// Every app page (`ui_extensions.routes`), under the one prefix reserved for apps. Like
|
|
103
|
+
// `settings` it has no portal of its own, and it is not a view viewport or a `surface` target:
|
|
104
|
+
// apps declare pages as routes and reach them with `{ type: "appPage" }`.
|
|
105
|
+
...define(null, 1, [["page", "page", null, `/[portal]/apps/[appId]/${APP_PAGES_SEGMENT}/[...path]`, "appId"]]),
|
|
72
106
|
]);
|
|
73
107
|
const SURFACES_BY_ID = new Map(SURFACES.map((s) => [s.id, s]));
|
|
74
108
|
export function isSurfaceId(value) {
|
|
@@ -81,7 +115,10 @@ export function getSurface(id) {
|
|
|
81
115
|
export function drawerDefaultFor(portal) {
|
|
82
116
|
return `gs.${portal}.drawer.default`;
|
|
83
117
|
}
|
|
84
|
-
/**
|
|
118
|
+
/**
|
|
119
|
+
* Surfaces the host renders for a portal in the given wave (and earlier waves). Portal-less
|
|
120
|
+
* surfaces (`settings`, `page`) are never included: they belong to an app, not to a portal screen.
|
|
121
|
+
*/
|
|
85
122
|
export function surfacesForPortal(portal, wave = 1) {
|
|
86
123
|
return SURFACES.filter((s) => s.portal === portal && s.wave <= wave);
|
|
87
124
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"surfaces.js","sourceRoot":"","sources":["../../../src/apps/surfaces.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"surfaces.js","sourceRoot":"","sources":["../../../src/apps/surfaces.ts"],"names":[],"mappings":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AAC,CAAC,CAAC;IAChG,wFAAwF;IACxF,+FAA+F;IAC/F,0EAA0E;IAC1E,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,0BAA0B,iBAAiB,YAAY,EAAE,OAAO,CAAC,CAAC,CAAC;CAC/G,CAAC,CAAC;AASH,MAAM,cAAc,GAAoC,IAAI,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAEhG,MAAM,UAAU,WAAW,CAAC,KAAc;IACxC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAChE,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,EAAU;IACnC,OAAO,cAAc,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAChC,CAAC;AAED,+FAA+F;AAC/F,MAAM,UAAU,gBAAgB,CAAC,MAAc;IAC7C,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACvC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAc,EAAE,OAAc,CAAC;IAC/D,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,MAAM,IAAI,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC;AACvE,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RemoteReceiver, type RemoteReceiverElement, type RemoteReceiverNode } from "@remote-dom/core/receivers";
|
|
2
2
|
import type { ReactElement } from "react";
|
|
3
3
|
import { type ComponentName } from "../components.js";
|
|
4
|
-
import { type AppTokens, type ExtensionContext } from "../context.js";
|
|
4
|
+
import { type AppTokens, type ExtensionContext, type PageRoute } from "../context.js";
|
|
5
5
|
import type { HostApi } from "../protocol.js";
|
|
6
6
|
import { REMOTE_FRAGMENT_TAG } from "../runtime/elements.js";
|
|
7
7
|
import { type SandboxRuntime } from "../runtime/sandbox.js";
|
|
@@ -17,8 +17,24 @@ export declare function mockTokens(now?: number): AppTokens;
|
|
|
17
17
|
* platform permissions such as `app_secrets.write` out of `auth.user.scope`: the server grants
|
|
18
18
|
* them to the app's role only, so a real user token never carries them. The mock performs no
|
|
19
19
|
* permission checks; stub the Secret Store's 403 yourself to test a missing grant.
|
|
20
|
+
*
|
|
21
|
+
* `environment.navParams` (what this app's own `navigate` passed as `envParams`) and
|
|
22
|
+
* `environment.queryParams` (an app page's URL query) both default to `{}`; set either to test a
|
|
23
|
+
* view opened by a navigation or from a link. Setting `environment.route` puts the view on an app
|
|
24
|
+
* page (see {@link mockPageRoute}).
|
|
20
25
|
*/
|
|
21
26
|
export declare function getMockContext(overrides?: DeepPartial<ExtensionContext>): ExtensionContext;
|
|
27
|
+
/**
|
|
28
|
+
* The `environment.route` the host sends for `pathname` on the declared route `path`, with its
|
|
29
|
+
* params decoded the way the host does it (`matchAppRoute`). `pathname` defaults to `path`, so a
|
|
30
|
+
* route without params needs only one argument. Throws when `pathname` does not match `path`:
|
|
31
|
+
* the host would never render that page.
|
|
32
|
+
*
|
|
33
|
+
* ```ts
|
|
34
|
+
* mockPageRoute("/reports/:id", "/reports/7"); // { path: "/reports/:id", pathname: "/reports/7", params: { id: "7" } }
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export declare function mockPageRoute(path: string, pathname?: string): PageRoute;
|
|
22
38
|
export interface HostCall {
|
|
23
39
|
method: keyof HostApi;
|
|
24
40
|
args: unknown[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/apps/testing/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/apps/testing/index.ts"],"names":[],"mappings":"AA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