@orthacms/content-server 0.4.3 → 0.5.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/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/lib/content.module.d.ts.map +1 -1
- package/dist/lib/content.module.js +8 -0
- package/dist/lib/copilot/entry-proposal.applier.d.ts.map +1 -1
- package/dist/lib/copilot/entry-proposal.applier.js +5 -4
- package/dist/lib/docs/describe-content-api.d.ts +7 -0
- package/dist/lib/docs/describe-content-api.d.ts.map +1 -1
- package/dist/lib/docs/describe-content-api.js +177 -53
- package/dist/lib/docs/describe-views-api.d.ts +19 -0
- package/dist/lib/docs/describe-views-api.d.ts.map +1 -0
- package/dist/lib/docs/describe-views-api.js +76 -0
- package/dist/lib/docs/field-schema.d.ts.map +1 -1
- package/dist/lib/docs/field-schema.js +36 -2
- package/dist/lib/docs/openapi-writer.d.ts +49 -0
- package/dist/lib/docs/openapi-writer.d.ts.map +1 -0
- package/dist/lib/docs/openapi-writer.js +76 -0
- package/dist/lib/docs/public-api-schemas.d.ts +45 -0
- package/dist/lib/docs/public-api-schemas.d.ts.map +1 -0
- package/dist/lib/docs/public-api-schemas.js +377 -0
- package/dist/lib/docs/views-schemas.d.ts +22 -0
- package/dist/lib/docs/views-schemas.d.ts.map +1 -0
- package/dist/lib/docs/views-schemas.js +156 -0
- package/dist/lib/entries/application/use-cases/bulk-publish-entries.use-case.d.ts +8 -2
- package/dist/lib/entries/application/use-cases/bulk-publish-entries.use-case.d.ts.map +1 -1
- package/dist/lib/entries/application/use-cases/bulk-publish-entries.use-case.js +19 -4
- package/dist/lib/entries/application/use-cases/bulk-unpublish-entries.use-case.d.ts +2 -2
- package/dist/lib/entries/application/use-cases/bulk-unpublish-entries.use-case.d.ts.map +1 -1
- package/dist/lib/entries/application/use-cases/bulk-unpublish-entries.use-case.js +14 -4
- package/dist/lib/entries/application/use-cases/publish-entry.use-case.d.ts +6 -8
- package/dist/lib/entries/application/use-cases/publish-entry.use-case.d.ts.map +1 -1
- package/dist/lib/entries/application/use-cases/publish-entry.use-case.js +10 -4
- package/dist/lib/entries/application/use-cases/unpublish-entry.use-case.d.ts +2 -5
- package/dist/lib/entries/application/use-cases/unpublish-entry.use-case.d.ts.map +1 -1
- package/dist/lib/entries/application/use-cases/unpublish-entry.use-case.js +6 -1
- package/dist/lib/entries/domain/entry.d.ts +8 -1
- package/dist/lib/entries/domain/entry.d.ts.map +1 -1
- package/dist/lib/entries/domain/entry.js +12 -12
- package/dist/lib/entries/domain/events/entry-events.d.ts +47 -5
- package/dist/lib/entries/domain/events/entry-events.d.ts.map +1 -1
- package/dist/lib/entries/domain/events/entry-events.js +26 -10
- package/dist/lib/entries/entries.constants.d.ts +10 -2
- package/dist/lib/entries/entries.constants.d.ts.map +1 -1
- package/dist/lib/entries/entries.constants.js +11 -2
- package/dist/lib/entries/http/controllers/bulk-entries.controller.d.ts +2 -2
- package/dist/lib/entries/http/controllers/bulk-entries.controller.d.ts.map +1 -1
- package/dist/lib/entries/http/controllers/bulk-entries.controller.js +8 -6
- package/dist/lib/entries/infrastructure/persistence/entry-writer.service.d.ts +22 -6
- package/dist/lib/entries/infrastructure/persistence/entry-writer.service.d.ts.map +1 -1
- package/dist/lib/entries/infrastructure/persistence/entry-writer.service.js +71 -17
- package/dist/lib/insights/docs/describe-content-insights-api.d.ts +23 -0
- package/dist/lib/insights/docs/describe-content-insights-api.d.ts.map +1 -0
- package/dist/lib/insights/docs/describe-content-insights-api.js +329 -0
- package/dist/lib/mcp/content-tools.provider.d.ts.map +1 -1
- package/dist/lib/mcp/content-tools.provider.js +10 -9
- package/dist/lib/public-api/http/controllers/public-entry-writes.controller.d.ts +14 -13
- package/dist/lib/public-api/http/controllers/public-entry-writes.controller.d.ts.map +1 -1
- package/dist/lib/public-api/http/controllers/public-entry-writes.controller.js +62 -46
- package/dist/lib/public-api/http/guards/api-token-workspace.guard.d.ts.map +1 -1
- package/dist/lib/public-api/http/guards/api-token-workspace.guard.js +8 -0
- package/dist/lib/public-api/infrastructure/public-entry-writes.service.d.ts +10 -9
- package/dist/lib/public-api/infrastructure/public-entry-writes.service.d.ts.map +1 -1
- package/dist/lib/public-api/infrastructure/public-entry-writes.service.js +23 -24
- package/dist/lib/public-api/infrastructure/token-actor.d.ts +37 -0
- package/dist/lib/public-api/infrastructure/token-actor.d.ts.map +1 -0
- package/dist/lib/public-api/infrastructure/token-actor.js +58 -0
- package/dist/lib/revisions/application/use-cases/restore-revision.use-case.d.ts.map +1 -1
- package/dist/lib/revisions/application/use-cases/restore-revision.use-case.js +12 -1
- package/dist/lib/revisions/infrastructure/purge/revisions-workspace.purger.d.ts +28 -0
- package/dist/lib/revisions/infrastructure/purge/revisions-workspace.purger.d.ts.map +1 -0
- package/dist/lib/revisions/infrastructure/purge/revisions-workspace.purger.js +52 -0
- package/dist/lib/utils/content-plugin.d.ts.map +1 -1
- package/dist/lib/utils/content-plugin.js +10 -1
- package/dist/lib/utils/content-views-plugin.d.ts.map +1 -1
- package/dist/lib/utils/content-views-plugin.js +8 -0
- package/dist/lib/views/application/use-cases/create-saved-view.use-case.d.ts +4 -1
- package/dist/lib/views/application/use-cases/create-saved-view.use-case.d.ts.map +1 -1
- package/dist/lib/views/application/use-cases/create-saved-view.use-case.js +33 -9
- package/dist/lib/views/application/use-cases/delete-saved-view.use-case.d.ts +4 -1
- package/dist/lib/views/application/use-cases/delete-saved-view.use-case.d.ts.map +1 -1
- package/dist/lib/views/application/use-cases/delete-saved-view.use-case.js +24 -3
- package/dist/lib/views/application/use-cases/update-saved-view.use-case.d.ts +4 -1
- package/dist/lib/views/application/use-cases/update-saved-view.use-case.d.ts.map +1 -1
- package/dist/lib/views/application/use-cases/update-saved-view.use-case.js +32 -3
- package/dist/lib/views/domain/events/saved-view-events.d.ts +28 -0
- package/dist/lib/views/domain/events/saved-view-events.d.ts.map +1 -0
- package/dist/lib/views/domain/events/saved-view-events.js +38 -0
- package/dist/lib/views/infrastructure/persistence/drizzle-saved-view.repository.d.ts +12 -3
- package/dist/lib/views/infrastructure/persistence/drizzle-saved-view.repository.d.ts.map +1 -1
- package/dist/lib/views/infrastructure/persistence/drizzle-saved-view.repository.js +15 -5
- package/package.json +11 -11
- package/dist/lib/entries/controllers/bulk-entries.controller.d.ts +0 -26
- package/dist/lib/entries/controllers/bulk-entries.controller.d.ts.map +0 -1
- package/dist/lib/entries/controllers/create-entry.controller.d.ts +0 -20
- package/dist/lib/entries/controllers/create-entry.controller.d.ts.map +0 -1
- package/dist/lib/entries/controllers/delete-entry.controller.d.ts +0 -24
- package/dist/lib/entries/controllers/delete-entry.controller.d.ts.map +0 -1
- package/dist/lib/entries/controllers/get-entry.controller.d.ts +0 -34
- package/dist/lib/entries/controllers/get-entry.controller.d.ts.map +0 -1
- package/dist/lib/entries/controllers/list-entries.controller.d.ts +0 -20
- package/dist/lib/entries/controllers/list-entries.controller.d.ts.map +0 -1
- package/dist/lib/entries/controllers/publish-entry.controller.d.ts +0 -19
- package/dist/lib/entries/controllers/publish-entry.controller.d.ts.map +0 -1
- package/dist/lib/entries/controllers/resolve-type.d.ts +0 -9
- package/dist/lib/entries/controllers/resolve-type.d.ts.map +0 -1
- package/dist/lib/entries/controllers/update-entry.controller.d.ts +0 -18
- package/dist/lib/entries/controllers/update-entry.controller.d.ts.map +0 -1
- package/dist/lib/entries/dto/bulk-ids.dto.d.ts +0 -11
- package/dist/lib/entries/dto/bulk-ids.dto.d.ts.map +0 -1
- package/dist/lib/entries/dto/list-entries-query.dto.d.ts +0 -46
- package/dist/lib/entries/dto/list-entries-query.dto.d.ts.map +0 -1
- package/dist/lib/entries/dto/relation-delta-map.validator.d.ts +0 -19
- package/dist/lib/entries/dto/relation-delta-map.validator.d.ts.map +0 -1
- package/dist/lib/entries/dto/save-entry.dto.d.ts +0 -46
- package/dist/lib/entries/dto/save-entry.dto.d.ts.map +0 -1
- package/dist/lib/entries/infrastructure/persistence/field-selection.d.ts +0 -24
- package/dist/lib/entries/infrastructure/persistence/field-selection.d.ts.map +0 -1
- package/dist/lib/entries/infrastructure/queries/entry-filter-schema.d.ts +0 -40
- package/dist/lib/entries/infrastructure/queries/entry-filter-schema.d.ts.map +0 -1
- package/dist/lib/entries/services/entries.service.d.ts +0 -59
- package/dist/lib/entries/services/entries.service.d.ts.map +0 -1
- package/dist/lib/entries/services/entry-counter.service.d.ts +0 -31
- package/dist/lib/entries/services/entry-counter.service.d.ts.map +0 -1
- package/dist/lib/entries/services/entry-filter-schema.d.ts +0 -32
- package/dist/lib/entries/services/entry-filter-schema.d.ts.map +0 -1
- package/dist/lib/entries/services/entry-row.d.ts +0 -56
- package/dist/lib/entries/services/entry-row.d.ts.map +0 -1
- package/dist/lib/entries/services/entry-writer.service.d.ts +0 -193
- package/dist/lib/entries/services/entry-writer.service.d.ts.map +0 -1
- package/dist/lib/entries/services/relation-link.service.d.ts +0 -115
- package/dist/lib/entries/services/relation-link.service.d.ts.map +0 -1
- package/dist/lib/extension/entry-access-source.d.ts +0 -112
- package/dist/lib/extension/entry-access-source.d.ts.map +0 -1
- package/dist/lib/extension/entry-write-hook.d.ts +0 -98
- package/dist/lib/extension/entry-write-hook.d.ts.map +0 -1
- package/dist/lib/extension/per-locale-relation.d.ts +0 -18
- package/dist/lib/extension/per-locale-relation.d.ts.map +0 -1
- package/dist/lib/public/controllers/get-public-entry.controller.d.ts +0 -26
- package/dist/lib/public/controllers/get-public-entry.controller.d.ts.map +0 -1
- package/dist/lib/public/controllers/list-public-entries.controller.d.ts +0 -24
- package/dist/lib/public/controllers/list-public-entries.controller.d.ts.map +0 -1
- package/dist/lib/public/controllers/public-schema.controller.d.ts +0 -18
- package/dist/lib/public/controllers/public-schema.controller.d.ts.map +0 -1
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The two writes every `decorate` pass in this package makes on the generated
|
|
3
|
+
* document, and the one rule they both follow: **never invent a status code.**
|
|
4
|
+
*
|
|
5
|
+
* The scanner has already emitted whichever 2xx key the handler actually
|
|
6
|
+
* answers with — 201 for a bare `@Post`, 200 elsewhere, and whatever a
|
|
7
|
+
* `@HttpCode` moved it to — so a schema is written *onto that key* rather than
|
|
8
|
+
* onto a guessed one. A document that describes a `200` for a route answering
|
|
9
|
+
* `201` is worse than a document that describes nothing, because a consumer
|
|
10
|
+
* cannot tell it is wrong without curling the API, which is the whole thing
|
|
11
|
+
* these passes exist to make unnecessary.
|
|
12
|
+
*/
|
|
13
|
+
import type { OpenApiSchema } from './field-schema';
|
|
14
|
+
/** An operation object, as far as these passes need to see one. */
|
|
15
|
+
export interface Operation {
|
|
16
|
+
parameters?: {
|
|
17
|
+
name: string;
|
|
18
|
+
in: string;
|
|
19
|
+
schema?: OpenApiSchema;
|
|
20
|
+
description?: string;
|
|
21
|
+
}[];
|
|
22
|
+
responses?: Record<string, {
|
|
23
|
+
description?: string;
|
|
24
|
+
content?: unknown;
|
|
25
|
+
}>;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Writes a success response's schema onto whichever 2xx key the scanner already
|
|
29
|
+
* emitted.
|
|
30
|
+
*
|
|
31
|
+
* `204` is left alone deliberately: a no-content response has no body, and
|
|
32
|
+
* attaching one would describe a payload the server never sends.
|
|
33
|
+
*/
|
|
34
|
+
export declare function setSuccessResponse(operation: Operation, schema: OpenApiSchema, description: string,
|
|
35
|
+
/**
|
|
36
|
+
* Media type. `application/json` for all but the two transfer downloads,
|
|
37
|
+
* which stream a file.
|
|
38
|
+
*/
|
|
39
|
+
mediaType?: string,
|
|
40
|
+
/** Response headers worth documenting, keyed by header name. */
|
|
41
|
+
headers?: Record<string, unknown>): void;
|
|
42
|
+
/**
|
|
43
|
+
* Writes a success response carrying several media types — one download route
|
|
44
|
+
* whose content type depends on what the caller asked for.
|
|
45
|
+
*/
|
|
46
|
+
export declare function setSuccessResponseVariants(operation: Operation, byMediaType: Record<string, OpenApiSchema>, description: string, headers?: Record<string, unknown>): void;
|
|
47
|
+
/** Adds a documented failure response, leaving any existing one alone. */
|
|
48
|
+
export declare function addErrorResponse(operation: Operation, code: string, description: string, schema?: OpenApiSchema): void;
|
|
49
|
+
//# sourceMappingURL=openapi-writer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openapi-writer.d.ts","sourceRoot":"","sources":["../../../src/lib/docs/openapi-writer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD,mEAAmE;AACnE,MAAM,WAAW,SAAS;IACtB,UAAU,CAAC,EAAE;QACT,IAAI,EAAE,MAAM,CAAC;QACb,EAAE,EAAE,MAAM,CAAC;QACX,MAAM,CAAC,EAAE,aAAa,CAAC;QACvB,WAAW,CAAC,EAAE,MAAM,CAAC;KACxB,EAAE,CAAC;IACJ,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;CAC3E;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAC9B,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,aAAa,EACrB,WAAW,EAAE,MAAM;AACnB;;;GAGG;AACH,SAAS,SAAqB;AAC9B,gEAAgE;AAChE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAClC,IAAI,CAYN;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CACtC,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,EAC1C,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAClC,IAAI,CAiBN;AAED,0EAA0E;AAC1E,wBAAgB,gBAAgB,CAC5B,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EACnB,MAAM,CAAC,EAAE,aAAa,GACvB,IAAI,CAUN"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* The two writes every `decorate` pass in this package makes on the generated
|
|
4
|
+
* document, and the one rule they both follow: **never invent a status code.**
|
|
5
|
+
*
|
|
6
|
+
* The scanner has already emitted whichever 2xx key the handler actually
|
|
7
|
+
* answers with — 201 for a bare `@Post`, 200 elsewhere, and whatever a
|
|
8
|
+
* `@HttpCode` moved it to — so a schema is written *onto that key* rather than
|
|
9
|
+
* onto a guessed one. A document that describes a `200` for a route answering
|
|
10
|
+
* `201` is worse than a document that describes nothing, because a consumer
|
|
11
|
+
* cannot tell it is wrong without curling the API, which is the whole thing
|
|
12
|
+
* these passes exist to make unnecessary.
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.setSuccessResponse = setSuccessResponse;
|
|
16
|
+
exports.setSuccessResponseVariants = setSuccessResponseVariants;
|
|
17
|
+
exports.addErrorResponse = addErrorResponse;
|
|
18
|
+
/**
|
|
19
|
+
* Writes a success response's schema onto whichever 2xx key the scanner already
|
|
20
|
+
* emitted.
|
|
21
|
+
*
|
|
22
|
+
* `204` is left alone deliberately: a no-content response has no body, and
|
|
23
|
+
* attaching one would describe a payload the server never sends.
|
|
24
|
+
*/
|
|
25
|
+
function setSuccessResponse(operation, schema, description,
|
|
26
|
+
/**
|
|
27
|
+
* Media type. `application/json` for all but the two transfer downloads,
|
|
28
|
+
* which stream a file.
|
|
29
|
+
*/
|
|
30
|
+
mediaType = 'application/json',
|
|
31
|
+
/** Response headers worth documenting, keyed by header name. */
|
|
32
|
+
headers) {
|
|
33
|
+
const responses = operation.responses ?? {};
|
|
34
|
+
const key = Object.keys(responses).find((code) => /^2\d\d$/.test(code));
|
|
35
|
+
if (!key || key === '204') {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
responses[key] = {
|
|
39
|
+
description,
|
|
40
|
+
...(headers ? { headers } : {}),
|
|
41
|
+
content: { [mediaType]: { schema } }
|
|
42
|
+
};
|
|
43
|
+
operation.responses = responses;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Writes a success response carrying several media types — one download route
|
|
47
|
+
* whose content type depends on what the caller asked for.
|
|
48
|
+
*/
|
|
49
|
+
function setSuccessResponseVariants(operation, byMediaType, description, headers) {
|
|
50
|
+
const responses = operation.responses ?? {};
|
|
51
|
+
const key = Object.keys(responses).find((code) => /^2\d\d$/.test(code));
|
|
52
|
+
if (!key || key === '204') {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
responses[key] = {
|
|
56
|
+
description,
|
|
57
|
+
...(headers ? { headers } : {}),
|
|
58
|
+
content: Object.fromEntries(Object.entries(byMediaType).map(([type, schema]) => [
|
|
59
|
+
type,
|
|
60
|
+
{ schema }
|
|
61
|
+
]))
|
|
62
|
+
};
|
|
63
|
+
operation.responses = responses;
|
|
64
|
+
}
|
|
65
|
+
/** Adds a documented failure response, leaving any existing one alone. */
|
|
66
|
+
function addErrorResponse(operation, code, description, schema) {
|
|
67
|
+
const responses = operation.responses ?? {};
|
|
68
|
+
if (responses[code]) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
responses[code] = {
|
|
72
|
+
description,
|
|
73
|
+
...(schema ? { content: { 'application/json': { schema } } } : {})
|
|
74
|
+
};
|
|
75
|
+
operation.responses = responses;
|
|
76
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The OpenAPI schemas of the **public** content API (`/api/v1/...`), kept apart
|
|
3
|
+
* from the admin's for the same reason `types/public-entry.ts` is kept apart
|
|
4
|
+
* from `EntryRecord`: this is a published contract an external site builds
|
|
5
|
+
* against, and it must be free to stay still while the admin's shape moves.
|
|
6
|
+
*
|
|
7
|
+
* Splitting them is not tidiness. Until this module existed the document
|
|
8
|
+
* described `/api/v1/content/{typeName}/{id}` with the **admin** entry schema,
|
|
9
|
+
* because the route pattern in `describe-content-api.ts` matched both spellings
|
|
10
|
+
* — so a consumer reading the reference was told a relation preview carries
|
|
11
|
+
* `RelationRef`s (id + title) when the public API returns whole entries, and
|
|
12
|
+
* that a media read is `Record<string, MediaRef[]>` when it is
|
|
13
|
+
* `Record<string, { items, total }>`. A wrong schema is worse than an absent
|
|
14
|
+
* one: the absent one sends you to curl, the wrong one does not.
|
|
15
|
+
*/
|
|
16
|
+
import type { SerializedContentType } from '../registry/content-type-registry';
|
|
17
|
+
import { type OpenApiSchema } from './field-schema';
|
|
18
|
+
/** Schema names of one content type's public trio. */
|
|
19
|
+
export interface PublicTypeSchemaNames {
|
|
20
|
+
/** The `values` bag — the entry's own data, references omitted. */
|
|
21
|
+
values: string;
|
|
22
|
+
/** One entry as the public API serves it. */
|
|
23
|
+
entry: string;
|
|
24
|
+
/** One page of them. */
|
|
25
|
+
listPage: string;
|
|
26
|
+
}
|
|
27
|
+
/** The three schema names a content type contributes to the public document. */
|
|
28
|
+
export declare function publicSchemaNamesOf(type: SerializedContentType): PublicTypeSchemaNames;
|
|
29
|
+
/**
|
|
30
|
+
* The public per-type entry schemas as alternatives — the response shape
|
|
31
|
+
* depends on `typeName`, which OpenAPI cannot express as a dependency. One
|
|
32
|
+
* registered type needs no union; none at all leaves an open object, since
|
|
33
|
+
* every one of these routes 404s anyway.
|
|
34
|
+
*
|
|
35
|
+
* `anyOf` rather than `oneOf`, for the reason `unionOf` in
|
|
36
|
+
* `describe-content-api.ts` spells out: the alternatives overlap, and *exactly
|
|
37
|
+
* one* is a promise the API does not keep.
|
|
38
|
+
*/
|
|
39
|
+
export declare function publicUnionOf(names: string[]): OpenApiSchema;
|
|
40
|
+
/**
|
|
41
|
+
* Every schema the public API contributes: its fixed shapes plus, per
|
|
42
|
+
* registered content type, the `Values` / `Entry` / `ListPage` trio.
|
|
43
|
+
*/
|
|
44
|
+
export declare function buildPublicApiSchemas(types: readonly SerializedContentType[]): Record<string, OpenApiSchema>;
|
|
45
|
+
//# sourceMappingURL=public-api-schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public-api-schemas.d.ts","sourceRoot":"","sources":["../../../src/lib/docs/public-api-schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAG/E,OAAO,EAAe,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAMjE,sDAAsD;AACtD,MAAM,WAAW,qBAAqB;IAClC,mEAAmE;IACnE,MAAM,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,wBAAwB;IACxB,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,gFAAgF;AAChF,wBAAgB,mBAAmB,CAC/B,IAAI,EAAE,qBAAqB,GAC5B,qBAAqB,CAOvB;AA+JD;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,aAAa,CAK5D;AAuMD;;;GAGG;AACH,wBAAgB,qBAAqB,CACjC,KAAK,EAAE,SAAS,qBAAqB,EAAE,GACxC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAY/B"}
|
|
@@ -0,0 +1,377 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* The OpenAPI schemas of the **public** content API (`/api/v1/...`), kept apart
|
|
4
|
+
* from the admin's for the same reason `types/public-entry.ts` is kept apart
|
|
5
|
+
* from `EntryRecord`: this is a published contract an external site builds
|
|
6
|
+
* against, and it must be free to stay still while the admin's shape moves.
|
|
7
|
+
*
|
|
8
|
+
* Splitting them is not tidiness. Until this module existed the document
|
|
9
|
+
* described `/api/v1/content/{typeName}/{id}` with the **admin** entry schema,
|
|
10
|
+
* because the route pattern in `describe-content-api.ts` matched both spellings
|
|
11
|
+
* — so a consumer reading the reference was told a relation preview carries
|
|
12
|
+
* `RelationRef`s (id + title) when the public API returns whole entries, and
|
|
13
|
+
* that a media read is `Record<string, MediaRef[]>` when it is
|
|
14
|
+
* `Record<string, { items, total }>`. A wrong schema is worse than an absent
|
|
15
|
+
* one: the absent one sends you to curl, the wrong one does not.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.publicSchemaNamesOf = publicSchemaNamesOf;
|
|
19
|
+
exports.publicUnionOf = publicUnionOf;
|
|
20
|
+
exports.buildPublicApiSchemas = buildPublicApiSchemas;
|
|
21
|
+
const fields_1 = require("../types/fields");
|
|
22
|
+
const content_type_1 = require("../types/content-type");
|
|
23
|
+
const field_schema_1 = require("./field-schema");
|
|
24
|
+
const content_schemas_1 = require("./content-schemas");
|
|
25
|
+
const UUID = { type: 'string', format: 'uuid' };
|
|
26
|
+
const DATE_TIME = { type: 'string', format: 'date-time' };
|
|
27
|
+
/** The three schema names a content type contributes to the public document. */
|
|
28
|
+
function publicSchemaNamesOf(type) {
|
|
29
|
+
const base = `Public${(0, content_schemas_1.pascalCase)(type.name)}`;
|
|
30
|
+
return {
|
|
31
|
+
values: `${base}Values`,
|
|
32
|
+
entry: `${base}Entry`,
|
|
33
|
+
listPage: `${base}ListPage`
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Whether a field's value appears in a public entry's `values` bag.
|
|
38
|
+
*
|
|
39
|
+
* Mirrors `public-api/infrastructure/public-entry-row.ts`'s
|
|
40
|
+
* `isPureValueField` — **every** reference kind is dropped, `relation` in all
|
|
41
|
+
* four cardinalities and `media` alike, because the public read resolves
|
|
42
|
+
* neither in `values` and a bare uuid is an identifier with nothing to follow.
|
|
43
|
+
* Deliberately stricter than the admin's `isValueField`, which keeps an owning
|
|
44
|
+
* single relation's FK.
|
|
45
|
+
*/
|
|
46
|
+
function isPublicValueField(field) {
|
|
47
|
+
return (field.type !== fields_1.CONTENT_FIELD_TYPE.Relation &&
|
|
48
|
+
field.type !== fields_1.CONTENT_FIELD_TYPE.Media);
|
|
49
|
+
}
|
|
50
|
+
/** The `values` bag of one content type, as the public API serves it. */
|
|
51
|
+
function publicValuesSchema(type) {
|
|
52
|
+
const fields = type.fields.filter(isPublicValueField);
|
|
53
|
+
const omitted = type.fields
|
|
54
|
+
.filter((field) => !isPublicValueField(field))
|
|
55
|
+
.map((field) => field.name);
|
|
56
|
+
const properties = {};
|
|
57
|
+
for (const field of fields) {
|
|
58
|
+
properties[field.name] = (0, field_schema_1.fieldSchema)(field);
|
|
59
|
+
}
|
|
60
|
+
const notes = [
|
|
61
|
+
`Field values keyed by field name, for one \`${type.name}\` entry.`,
|
|
62
|
+
'An unset field reads back as `null`, never as a missing key — except under a `?fields=` sparse fieldset, where only the requested keys are present at all.',
|
|
63
|
+
omitted.length
|
|
64
|
+
? `Reference fields (${omitted
|
|
65
|
+
.map((name) => `\`${name}\``)
|
|
66
|
+
.join(', ')}) are **not** in this bag: read relations through \`?relations=preview\` or the \`/relations/{field}\` route, and media through \`?media=preview\` or \`/media\`. The schema endpoint still describes them, because they are part of the real model.`
|
|
67
|
+
: ''
|
|
68
|
+
].filter(Boolean);
|
|
69
|
+
return {
|
|
70
|
+
type: 'object',
|
|
71
|
+
title: `${type.label} values (public)`,
|
|
72
|
+
description: notes.join(' '),
|
|
73
|
+
properties,
|
|
74
|
+
// No `required`: a sparse fieldset may narrow the bag to one key, and a
|
|
75
|
+
// publishable type's "required" fields are required to publish rather
|
|
76
|
+
// than to exist.
|
|
77
|
+
additionalProperties: false
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
/** One entry of a content type, as the public API serves it. */
|
|
81
|
+
function publicEntrySchema(type, names) {
|
|
82
|
+
const properties = {
|
|
83
|
+
id: { ...UUID, description: 'Entry id.' },
|
|
84
|
+
...(type.publishable
|
|
85
|
+
? {
|
|
86
|
+
status: {
|
|
87
|
+
type: 'string',
|
|
88
|
+
enum: Object.values(content_type_1.ENTRY_STATUS),
|
|
89
|
+
description: 'Publish state. A read-only token only ever sees `published`; a write-scoped one can create a draft and read it back with `?status=`.'
|
|
90
|
+
},
|
|
91
|
+
publishedAt: {
|
|
92
|
+
...DATE_TIME,
|
|
93
|
+
nullable: true,
|
|
94
|
+
description: 'When this entry last went live. `draft` together with a non-null `publishedAt` is live content carrying unpublished edits — neither field alone tells those apart.'
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
: {}),
|
|
98
|
+
createdAt: DATE_TIME,
|
|
99
|
+
updatedAt: DATE_TIME,
|
|
100
|
+
...(type.i18n
|
|
101
|
+
? {
|
|
102
|
+
locale: {
|
|
103
|
+
type: 'string',
|
|
104
|
+
description: 'Locale slug of this row.'
|
|
105
|
+
},
|
|
106
|
+
localeGroupId: {
|
|
107
|
+
...UUID,
|
|
108
|
+
description: 'Translation group — this row’s siblings in other locales share it, and it is the id the `/group/{localeGroupId}` routes take.'
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
: {}),
|
|
112
|
+
values: (0, content_schemas_1.ref)(names.values),
|
|
113
|
+
relations: {
|
|
114
|
+
type: 'object',
|
|
115
|
+
additionalProperties: (0, content_schemas_1.ref)('PublicRelationFieldPage'),
|
|
116
|
+
description: 'Relation links keyed by field name — present only with `?relations=preview`. Each linked record is a whole entry, not a ref.'
|
|
117
|
+
},
|
|
118
|
+
media: {
|
|
119
|
+
type: 'object',
|
|
120
|
+
additionalProperties: (0, content_schemas_1.ref)('PublicMediaFieldPage'),
|
|
121
|
+
description: 'Media assets keyed by field name — present only with `?media=preview`.'
|
|
122
|
+
},
|
|
123
|
+
...(type.i18n
|
|
124
|
+
? {
|
|
125
|
+
translations: {
|
|
126
|
+
type: 'array',
|
|
127
|
+
items: (0, content_schemas_1.ref)(names.entry),
|
|
128
|
+
description: 'The entry’s **other** published locale rows — present only with `?translations=preview`. The entry itself is not repeated, and the siblings are not themselves expanded.'
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
: {})
|
|
132
|
+
};
|
|
133
|
+
return {
|
|
134
|
+
type: 'object',
|
|
135
|
+
title: `${type.label} (public)`,
|
|
136
|
+
description: `One \`${type.name}\` entry on the public API.`,
|
|
137
|
+
properties,
|
|
138
|
+
required: [
|
|
139
|
+
'id',
|
|
140
|
+
'createdAt',
|
|
141
|
+
'updatedAt',
|
|
142
|
+
'values',
|
|
143
|
+
...(type.publishable ? ['status', 'publishedAt'] : []),
|
|
144
|
+
...(type.i18n ? ['locale', 'localeGroupId'] : [])
|
|
145
|
+
]
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
/** One page of public entries of a content type. */
|
|
149
|
+
function publicListPageSchema(type, names) {
|
|
150
|
+
return {
|
|
151
|
+
type: 'object',
|
|
152
|
+
title: `${type.label} page (public)`,
|
|
153
|
+
description: `One page of \`${type.name}\` entries. \`total\` counts every match, ignoring pagination.`,
|
|
154
|
+
properties: {
|
|
155
|
+
items: { type: 'array', items: (0, content_schemas_1.ref)(names.entry) },
|
|
156
|
+
total: { type: 'integer' },
|
|
157
|
+
page: {
|
|
158
|
+
type: 'integer',
|
|
159
|
+
description: '1-based page number this page represents.'
|
|
160
|
+
},
|
|
161
|
+
pageSize: {
|
|
162
|
+
type: 'integer',
|
|
163
|
+
description: 'Rows per page actually applied.'
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
required: ['items', 'total', 'page', 'pageSize']
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* The public per-type entry schemas as alternatives — the response shape
|
|
171
|
+
* depends on `typeName`, which OpenAPI cannot express as a dependency. One
|
|
172
|
+
* registered type needs no union; none at all leaves an open object, since
|
|
173
|
+
* every one of these routes 404s anyway.
|
|
174
|
+
*
|
|
175
|
+
* `anyOf` rather than `oneOf`, for the reason `unionOf` in
|
|
176
|
+
* `describe-content-api.ts` spells out: the alternatives overlap, and *exactly
|
|
177
|
+
* one* is a promise the API does not keep.
|
|
178
|
+
*/
|
|
179
|
+
function publicUnionOf(names) {
|
|
180
|
+
if (!names.length)
|
|
181
|
+
return { type: 'object', additionalProperties: true };
|
|
182
|
+
return names.length === 1
|
|
183
|
+
? (0, content_schemas_1.ref)(names[0])
|
|
184
|
+
: { anyOf: names.map((name) => (0, content_schemas_1.ref)(name)) };
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* The public API's fixed shapes — the ones that do not vary by content type,
|
|
188
|
+
* except where an entry appears inside them.
|
|
189
|
+
*
|
|
190
|
+
* `entryUnion` is threaded in rather than referenced by name because a relation
|
|
191
|
+
* page and a translation list carry whole entries, and which entries those are
|
|
192
|
+
* is the registry's answer, not this module's.
|
|
193
|
+
*/
|
|
194
|
+
function publicSharedSchemas(entryUnion) {
|
|
195
|
+
return {
|
|
196
|
+
PublicMediaTrack: {
|
|
197
|
+
type: 'object',
|
|
198
|
+
description: 'One timed-text track on a published video or audio asset — everything a `<track>` element needs.',
|
|
199
|
+
properties: {
|
|
200
|
+
kind: {
|
|
201
|
+
type: 'string',
|
|
202
|
+
description: '`captions` / `subtitles` / `descriptions` / `chapters`.'
|
|
203
|
+
},
|
|
204
|
+
srclang: {
|
|
205
|
+
type: 'string',
|
|
206
|
+
description: 'BCP-47 tag of the track’s language.'
|
|
207
|
+
},
|
|
208
|
+
label: {
|
|
209
|
+
type: 'string',
|
|
210
|
+
description: 'What a player shows in its track menu.'
|
|
211
|
+
},
|
|
212
|
+
src: {
|
|
213
|
+
type: 'string',
|
|
214
|
+
description: 'Route the WebVTT bytes stream from — same bearer token as the read.'
|
|
215
|
+
},
|
|
216
|
+
default: {
|
|
217
|
+
type: 'boolean',
|
|
218
|
+
description: 'Whether a player should enable this track by default.'
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
required: ['kind', 'srclang', 'label', 'src']
|
|
222
|
+
},
|
|
223
|
+
PublicMediaRef: {
|
|
224
|
+
type: 'object',
|
|
225
|
+
description: 'One attached asset. The URLs take the **same bearer token** as the read that produced them, so a server-side consumer can fetch the bytes with the credential it already holds — but a browser `<img src>` sends no `Authorization` header and will not load one. Proxy them from whatever holds the token.',
|
|
226
|
+
properties: {
|
|
227
|
+
id: UUID,
|
|
228
|
+
name: {
|
|
229
|
+
type: 'string',
|
|
230
|
+
description: 'Display name — the original file name.'
|
|
231
|
+
},
|
|
232
|
+
url: {
|
|
233
|
+
type: 'string',
|
|
234
|
+
description: 'Route the original bytes stream from.'
|
|
235
|
+
},
|
|
236
|
+
thumbUrl: {
|
|
237
|
+
type: 'string',
|
|
238
|
+
description: '~320px derivative, when one was generated (absent for non-images, SVGs, and images too small to derive).'
|
|
239
|
+
},
|
|
240
|
+
previewUrl: {
|
|
241
|
+
type: 'string',
|
|
242
|
+
description: '~1280px derivative, same caveats.'
|
|
243
|
+
},
|
|
244
|
+
kind: {
|
|
245
|
+
type: 'string',
|
|
246
|
+
description: 'Coarse kind — image / video / audio / document / archive.'
|
|
247
|
+
},
|
|
248
|
+
mimeType: { type: 'string' },
|
|
249
|
+
alt: {
|
|
250
|
+
type: 'string',
|
|
251
|
+
nullable: true,
|
|
252
|
+
description: 'The text alternative for **this usage**. `""` and `null` mean different things: `""` is “render `alt=""`, this image says nothing”, `null` is “nobody supplied one” — a gap to report, not an instruction to hide the image from assistive tech.'
|
|
253
|
+
},
|
|
254
|
+
decorative: {
|
|
255
|
+
type: 'boolean',
|
|
256
|
+
enum: [true],
|
|
257
|
+
description: 'Present, and always `true`, when the author marked this usage purely presentational.'
|
|
258
|
+
},
|
|
259
|
+
tracks: {
|
|
260
|
+
type: 'array',
|
|
261
|
+
items: (0, content_schemas_1.ref)('PublicMediaTrack'),
|
|
262
|
+
description: 'Empty for an image, and for a video nobody has captioned.'
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
required: ['id', 'name', 'url', 'kind', 'mimeType', 'alt', 'tracks']
|
|
266
|
+
},
|
|
267
|
+
PublicMediaFieldPage: {
|
|
268
|
+
type: 'object',
|
|
269
|
+
description: 'One media field’s assets, in their stored order.',
|
|
270
|
+
properties: {
|
|
271
|
+
items: { type: 'array', items: (0, content_schemas_1.ref)('PublicMediaRef') },
|
|
272
|
+
total: {
|
|
273
|
+
type: 'integer',
|
|
274
|
+
description: 'Assets attached to this field.'
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
required: ['items', 'total']
|
|
278
|
+
},
|
|
279
|
+
PublicEntryMedia: {
|
|
280
|
+
type: 'object',
|
|
281
|
+
description: 'Every media field of the entry, keyed by field name.',
|
|
282
|
+
properties: {
|
|
283
|
+
media: {
|
|
284
|
+
type: 'object',
|
|
285
|
+
additionalProperties: (0, content_schemas_1.ref)('PublicMediaFieldPage')
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
required: ['media']
|
|
289
|
+
},
|
|
290
|
+
PublicRelationFieldPage: {
|
|
291
|
+
type: 'object',
|
|
292
|
+
description: 'One relation field’s links: a capped page plus the true total. Each item is a **whole entry**, envelope and `values` alike — not a ref — so a consumer renders a linked record with the code it already has. Linked entries are not themselves expanded. A target the caller may not see is omitted **and not counted**, so `total` is the number of links actually reachable.',
|
|
293
|
+
properties: {
|
|
294
|
+
items: { type: 'array', items: entryUnion },
|
|
295
|
+
total: {
|
|
296
|
+
type: 'integer',
|
|
297
|
+
description: 'Visible links for this field, ignoring the page cap.'
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
required: ['items', 'total']
|
|
301
|
+
},
|
|
302
|
+
PublicEntryTranslations: {
|
|
303
|
+
type: 'object',
|
|
304
|
+
description: 'The entry’s other published locale rows, ordered by locale slug. The entry itself is not repeated, and a locale that exists only as a draft is absent.',
|
|
305
|
+
properties: {
|
|
306
|
+
translations: { type: 'array', items: entryUnion }
|
|
307
|
+
},
|
|
308
|
+
required: ['translations']
|
|
309
|
+
},
|
|
310
|
+
PublicContentTypeList: {
|
|
311
|
+
type: 'object',
|
|
312
|
+
description: 'Every content type granted to the requested workspace — exactly the set of `typeName`s that will not 404.',
|
|
313
|
+
properties: {
|
|
314
|
+
items: { type: 'array', items: (0, content_schemas_1.ref)('ContentTypeSummary') }
|
|
315
|
+
},
|
|
316
|
+
required: ['items']
|
|
317
|
+
},
|
|
318
|
+
PublicBulkError: {
|
|
319
|
+
type: 'object',
|
|
320
|
+
description: 'Why one item of a batch did not go through, carrying **the status the same write would have failed with on its own** (404, 422, 400) rather than a bulk-specific vocabulary.',
|
|
321
|
+
properties: {
|
|
322
|
+
status: { type: 'integer' },
|
|
323
|
+
message: { type: 'string' },
|
|
324
|
+
issues: {
|
|
325
|
+
type: 'array',
|
|
326
|
+
items: (0, content_schemas_1.ref)('ValidationIssue'),
|
|
327
|
+
description: 'The per-field issues of a 422.'
|
|
328
|
+
}
|
|
329
|
+
},
|
|
330
|
+
required: ['status', 'message']
|
|
331
|
+
},
|
|
332
|
+
PublicBulkSaveItemResult: {
|
|
333
|
+
type: 'object',
|
|
334
|
+
description: 'What became of one submitted item, positionally matched to the request.',
|
|
335
|
+
properties: {
|
|
336
|
+
index: {
|
|
337
|
+
type: 'integer',
|
|
338
|
+
description: '0-based position in the submitted `items`.'
|
|
339
|
+
},
|
|
340
|
+
op: { type: 'string', enum: ['create', 'update'] },
|
|
341
|
+
ok: { type: 'boolean' },
|
|
342
|
+
entry: entryUnion,
|
|
343
|
+
error: (0, content_schemas_1.ref)('PublicBulkError')
|
|
344
|
+
},
|
|
345
|
+
required: ['index', 'op', 'ok']
|
|
346
|
+
},
|
|
347
|
+
PublicBulkSaveResult: {
|
|
348
|
+
type: 'object',
|
|
349
|
+
description: '**Partial success is the contract**, not a degraded mode: items are written one transaction at a time, so the call is a 200 with per-item verdicts whether or not every item saved, and a caller retries the failures it can fix.',
|
|
350
|
+
properties: {
|
|
351
|
+
items: {
|
|
352
|
+
type: 'array',
|
|
353
|
+
items: (0, content_schemas_1.ref)('PublicBulkSaveItemResult')
|
|
354
|
+
},
|
|
355
|
+
created: { type: 'integer' },
|
|
356
|
+
updated: { type: 'integer' },
|
|
357
|
+
failed: { type: 'integer' }
|
|
358
|
+
},
|
|
359
|
+
required: ['items', 'created', 'updated', 'failed']
|
|
360
|
+
}
|
|
361
|
+
};
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* Every schema the public API contributes: its fixed shapes plus, per
|
|
365
|
+
* registered content type, the `Values` / `Entry` / `ListPage` trio.
|
|
366
|
+
*/
|
|
367
|
+
function buildPublicApiSchemas(types) {
|
|
368
|
+
const entryUnion = publicUnionOf(types.map((type) => publicSchemaNamesOf(type).entry));
|
|
369
|
+
const schemas = publicSharedSchemas(entryUnion);
|
|
370
|
+
for (const type of types) {
|
|
371
|
+
const names = publicSchemaNamesOf(type);
|
|
372
|
+
schemas[names.values] = publicValuesSchema(type);
|
|
373
|
+
schemas[names.entry] = publicEntrySchema(type, names);
|
|
374
|
+
schemas[names.listPage] = publicListPageSchema(type, names);
|
|
375
|
+
}
|
|
376
|
+
return schemas;
|
|
377
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The OpenAPI schemas the **saved views** plugin contributes.
|
|
3
|
+
*
|
|
4
|
+
* `SavedView` is a plain TypeScript `interface` in `views/domain/`, which the
|
|
5
|
+
* swagger scanner cannot see and ADR-0003 forbids decorating — so the shape is
|
|
6
|
+
* written out here instead, the same way the content types are.
|
|
7
|
+
*
|
|
8
|
+
* One thing about it is runtime data rather than a fixed contract: `scope` is
|
|
9
|
+
* `content:<typeName>`, and which type names exist is what the host registered.
|
|
10
|
+
* {@link buildViewsSchemas} therefore takes the serialized registry and turns
|
|
11
|
+
* the scope into an enum of the real lists, so a reader of the reference sees
|
|
12
|
+
* `content:article`, not "some string".
|
|
13
|
+
*/
|
|
14
|
+
import type { SerializedContentType } from '../registry/content-type-registry';
|
|
15
|
+
import type { OpenApiSchema } from './field-schema';
|
|
16
|
+
/** Schema name of one saved view. */
|
|
17
|
+
export declare const SAVED_VIEW_SCHEMA = "SavedView";
|
|
18
|
+
/** Schema name of the slice a view restores. */
|
|
19
|
+
export declare const SAVED_VIEW_PAYLOAD_SCHEMA = "SavedViewPayload";
|
|
20
|
+
/** The saved-view schemas, keyed by schema name. */
|
|
21
|
+
export declare function buildViewsSchemas(types: readonly SerializedContentType[]): Record<string, OpenApiSchema>;
|
|
22
|
+
//# sourceMappingURL=views-schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"views-schemas.d.ts","sourceRoot":"","sources":["../../../src/lib/docs/views-schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC/E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAepD,qCAAqC;AACrC,eAAO,MAAM,iBAAiB,cAAc,CAAC;AAC7C,gDAAgD;AAChD,eAAO,MAAM,yBAAyB,qBAAqB,CAAC;AA8I5D,oDAAoD;AACpD,wBAAgB,iBAAiB,CAC7B,KAAK,EAAE,SAAS,qBAAqB,EAAE,GACxC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAK/B"}
|