@knapsack/types 4.107.2 → 4.108.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/app-api-routes.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import type { ApiRoute } from './api-routes';
|
|
2
|
+
import type { KsAppClientDataNoMeta } from './app-client-data';
|
|
3
|
+
import type { GeneralDiscovery } from './discovery';
|
|
4
|
+
import type { KsTemplateSpec } from './app-client-data/patterns';
|
|
5
|
+
import type { RendererDiscovery, RendererId, TemplateInfo } from './renderers';
|
|
2
6
|
import type { Role } from './user-roles';
|
|
3
7
|
/**
|
|
4
8
|
* Route on our App API that checks if the user is authenticated and returns their role
|
|
@@ -13,4 +17,56 @@ export type AppApiAuthCheck = ApiRoute<{
|
|
|
13
17
|
isSitePrivate: boolean;
|
|
14
18
|
};
|
|
15
19
|
}>;
|
|
20
|
+
/**
|
|
21
|
+
* Body of `GET /internal/orgs/:productsOrganizationId/sites/:siteId/overview`
|
|
22
|
+
* on the App API: the site's latest content plus what its deployed App Client
|
|
23
|
+
* discovered about itself. Called by the products platform
|
|
24
|
+
* (knapsack-labs/products), which depends on this package for the type.
|
|
25
|
+
*
|
|
26
|
+
* `rendererDiscoveryById` has one entry per renderer in
|
|
27
|
+
* `discovery.renderersById`; native mobile renderers come from the App API's
|
|
28
|
+
* own discovery, every other renderer from the App Client's
|
|
29
|
+
* `/api/v2/renderer-discovery`.
|
|
30
|
+
*/
|
|
31
|
+
export type ProductsSiteOverviewResponse = {
|
|
32
|
+
content: KsAppClientDataNoMeta;
|
|
33
|
+
discovery: GeneralDiscovery;
|
|
34
|
+
rendererDiscoveryById: {
|
|
35
|
+
[TheRendererId in RendererId]?: RendererDiscovery<TheRendererId>;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
export type AppApiProductsSiteOverview = ApiRoute<{
|
|
39
|
+
path: '/internal/orgs/:productsOrganizationId/sites/:siteId/overview';
|
|
40
|
+
method: 'GET';
|
|
41
|
+
output: ProductsSiteOverviewResponse;
|
|
42
|
+
}>;
|
|
43
|
+
/**
|
|
44
|
+
* Body of `GET /internal/orgs/:productsOrganizationId/sites/:siteId/inspect`
|
|
45
|
+
* on the App API: the App Client's answer to `/api/v2/inspect` for the
|
|
46
|
+
* template the query string names, passed through unchanged. Native mobile
|
|
47
|
+
* renderers are inspected by the App API itself and always answer `success`.
|
|
48
|
+
*/
|
|
49
|
+
export type ProductsSiteInspectResponse = {
|
|
50
|
+
type: 'success';
|
|
51
|
+
spec: KsTemplateSpec;
|
|
52
|
+
} | {
|
|
53
|
+
type: 'noSpecInferred';
|
|
54
|
+
} | {
|
|
55
|
+
type: 'error.unknown';
|
|
56
|
+
message: string;
|
|
57
|
+
} | {
|
|
58
|
+
type: 'renderer.notFound';
|
|
59
|
+
} | {
|
|
60
|
+
type: 'renderer.noInspectSupported';
|
|
61
|
+
};
|
|
62
|
+
export type AppApiProductsSiteInspect = ApiRoute<{
|
|
63
|
+
path: '/internal/orgs/:productsOrganizationId/sites/:siteId/inspect';
|
|
64
|
+
method: 'GET';
|
|
65
|
+
/** The App Client's `/api/v2/inspect` input: a `TemplateInfo` plus filters. */
|
|
66
|
+
input: TemplateInfo & {
|
|
67
|
+
inferSpecExtras?: string;
|
|
68
|
+
inferSpec?: string;
|
|
69
|
+
};
|
|
70
|
+
output: ProductsSiteInspectResponse;
|
|
71
|
+
}>;
|
|
16
72
|
//# sourceMappingURL=app-api-routes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-api-routes.d.ts","sourceRoot":"","sources":["../src/app-api-routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC;IACrC,IAAI,EAAE,2BAA2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E,4BAA4B,CAAC;CACtC,CAAC,CAAC;AAEH;;;;;GAKG;AACH,MAAM,MAAM,2BAA2B,GACnC;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,cAAc,CAAA;CAAE,GACzC;IAAE,IAAI,EAAE,gBAAgB,CAAA;CAAE,GAC1B;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAC1C;IAAE,IAAI,EAAE,mBAAmB,CAAA;CAAE,GAC7B;IAAE,IAAI,EAAE,6BAA6B,CAAA;CAAE,CAAC;AAE5C,MAAM,MAAM,yBAAyB,GAAG,QAAQ,CAAC;IAC/C,IAAI,EAAE,8DAA8D,CAAC;IACrE,MAAM,EAAE,KAAK,CAAC;IACd,+EAA+E;IAC/E,KAAK,EAAE,YAAY,GAAG;QAAE,eAAe,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACvE,MAAM,EAAE,2BAA2B,CAAC;CACrC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knapsack/types",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.108.0",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
},
|
|
33
33
|
"sideEffects": false,
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@knapsack/file-utils": "4.
|
|
36
|
-
"@knapsack/utils": "4.
|
|
35
|
+
"@knapsack/file-utils": "4.108.0",
|
|
36
|
+
"@knapsack/utils": "4.108.0",
|
|
37
37
|
"color-string": "^1.9.1",
|
|
38
38
|
"immer": "^10.2.0",
|
|
39
39
|
"superstruct": "^0.16.7",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@apidevtools/json-schema-ref-parser": "^11.9.3",
|
|
44
|
-
"@knapsack/file-utils": "4.
|
|
45
|
-
"@knapsack/typescript-config-starter": "4.
|
|
44
|
+
"@knapsack/file-utils": "4.108.0",
|
|
45
|
+
"@knapsack/typescript-config-starter": "4.108.0",
|
|
46
46
|
"@tiptap/core": "^3.24.0",
|
|
47
47
|
"@types/color-string": "^1.5.5",
|
|
48
48
|
"@types/fs-extra": "^11.0.4",
|