@griddo/api-types 1.1.3 → 1.3.1
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/ai/answers.d.ts +20 -0
- package/dist/ai/answers.js +8 -0
- package/dist/ai/index.d.ts +4 -0
- package/dist/ai/index.js +20 -0
- package/dist/ai/pages.d.ts +19 -0
- package/dist/ai/pages.js +2 -0
- package/dist/ai/search.d.ts +54 -0
- package/dist/ai/search.js +13 -0
- package/dist/ai/summary.d.ts +12 -0
- package/dist/ai/summary.js +7 -0
- package/dist/analytics/dimensions.d.ts +13 -0
- package/dist/analytics/dimensions.js +5 -0
- package/dist/analytics/groups.d.ts +20 -0
- package/dist/analytics/groups.js +5 -0
- package/dist/analytics/index.d.ts +3 -0
- package/dist/analytics/index.js +19 -0
- package/dist/analytics/script.d.ts +34 -0
- package/dist/analytics/script.js +5 -0
- package/dist/apiTokens/api_token.d.ts +33 -0
- package/dist/apiTokens/api_token.js +12 -0
- package/dist/apiTokens/index.d.ts +2 -0
- package/dist/apiTokens/index.js +18 -0
- package/dist/apiTokens/service_account.d.ts +32 -0
- package/dist/apiTokens/service_account.js +12 -0
- package/dist/common/index.d.ts +2 -0
- package/dist/common/index.js +2 -0
- package/dist/common/success.d.ts +10 -0
- package/dist/common/success.js +2 -0
- package/dist/common/uuid.d.ts +1 -0
- package/dist/common/uuid.js +2 -0
- package/dist/dataPack/config.d.ts +1 -1
- package/dist/dataPack/index.d.ts +1 -0
- package/dist/dataPack/index.js +1 -0
- package/dist/dataPack/types.d.ts +15 -0
- package/dist/dataPack/types.js +2 -0
- package/dist/domains/domains.d.ts +33 -0
- package/dist/domains/domains.js +2 -0
- package/dist/domains/index.d.ts +42 -0
- package/dist/domains/index.js +33 -0
- package/dist/domains/robots.d.ts +24 -0
- package/dist/domains/robots.js +2 -0
- package/dist/feeds/index.d.ts +40 -0
- package/dist/feeds/index.js +9 -0
- package/dist/files/index.d.ts +60 -0
- package/dist/files/index.js +2 -0
- package/dist/form-categories/index.d.ts +46 -0
- package/dist/form-categories/index.js +9 -0
- package/dist/forms/index.d.ts +71 -0
- package/dist/forms/index.js +10 -0
- package/dist/images/index.d.ts +235 -0
- package/dist/images/index.js +6 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.js +25 -0
- package/dist/instances/index.d.ts +10 -0
- package/dist/instances/index.js +10 -0
- package/dist/integrations/index.d.ts +92 -0
- package/dist/integrations/index.js +17 -0
- package/dist/languages/index.d.ts +23 -0
- package/dist/languages/index.js +2 -0
- package/dist/liveStatus/index.d.ts +14 -0
- package/dist/liveStatus/index.js +10 -0
- package/dist/logs/LogActivityEvents.d.ts +35 -0
- package/dist/logs/LogActivityEvents.js +35 -0
- package/dist/logs/activity.d.ts +2 -2
- package/dist/menus/index.d.ts +52 -0
- package/dist/menus/index.js +8 -0
- package/dist/navigation/index.d.ts +44 -0
- package/dist/navigation/index.js +8 -0
- package/dist/pages/add-ons.d.ts +1 -1
- package/dist/pages/index.d.ts +3 -0
- package/dist/pages/index.js +3 -0
- package/dist/pages/llms.d.ts +13 -0
- package/dist/pages/llms.js +8 -0
- package/dist/pages/page_access_grants.d.ts +46 -0
- package/dist/pages/page_access_grants.js +2 -0
- package/dist/pages/preview_share.d.ts +13 -0
- package/dist/pages/preview_share.js +8 -0
- package/dist/payables/index.d.ts +19 -0
- package/dist/payables/index.js +10 -0
- package/dist/queue/status.d.ts +1 -1
- package/dist/redirects/index.d.ts +33 -0
- package/dist/render/index.d.ts +1 -0
- package/dist/render/index.js +17 -0
- package/dist/render/status.d.ts +59 -0
- package/dist/render/status.js +2 -0
- package/dist/roles/index.d.ts +61 -0
- package/dist/roles/index.js +3 -0
- package/dist/schemas/index.d.ts +1 -0
- package/dist/schemas/index.js +1 -0
- package/dist/schemas/schemas.d.ts +2 -0
- package/dist/schemas/version.d.ts +9 -0
- package/dist/schemas/version.js +2 -0
- package/dist/search/index.d.ts +33 -0
- package/dist/search/index.js +9 -0
- package/dist/settings/index.d.ts +16 -0
- package/dist/settings/index.js +10 -0
- package/dist/site/index.d.ts +1 -0
- package/dist/site/index.js +1 -0
- package/dist/site/site.d.ts +3 -1
- package/dist/site/site_languages.d.ts +43 -0
- package/dist/site/site_languages.js +14 -0
- package/dist/storage/index.d.ts +4 -0
- package/dist/storage/index.js +8 -0
- package/dist/structuredData/access_grants.d.ts +36 -0
- package/dist/structuredData/access_grants.js +2 -0
- package/dist/structuredData/categories.d.ts +69 -0
- package/dist/structuredData/categories.js +2 -0
- package/dist/structuredData/content.d.ts +164 -0
- package/dist/structuredData/content.js +2 -0
- package/dist/structuredData/distributor.d.ts +80 -0
- package/dist/structuredData/distributor.js +2 -0
- package/dist/structuredData/index.d.ts +5 -0
- package/dist/structuredData/index.js +21 -0
- package/dist/structuredData/types.d.ts +38 -0
- package/dist/structuredData/types.js +9 -0
- package/dist/translations/index.d.ts +108 -0
- package/dist/translations/index.js +5 -0
- package/dist/user/index.d.ts +74 -0
- package/dist/user/index.js +19 -0
- package/dist/user/page_permissions.d.ts +22 -0
- package/dist/user/page_permissions.js +2 -0
- package/dist/user/single_login.d.ts +17 -0
- package/dist/user/single_login.js +2 -0
- package/dist/user/sso_login.d.ts +12 -0
- package/dist/user/sso_login.js +2 -0
- package/package.json +4 -2
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public types for the `/search` endpoint family.
|
|
3
|
+
*
|
|
4
|
+
* `GET /search` returns either an empty array (when the search query is
|
|
5
|
+
* empty/whitespace) or a `SearchResultPage` payload with one entry per
|
|
6
|
+
* matched page.
|
|
7
|
+
*/
|
|
8
|
+
export interface SearchResultItem {
|
|
9
|
+
site: string | null;
|
|
10
|
+
title: string | null;
|
|
11
|
+
url: string | null;
|
|
12
|
+
template: string | null;
|
|
13
|
+
image: string | null;
|
|
14
|
+
description: string | null;
|
|
15
|
+
priority: number;
|
|
16
|
+
}
|
|
17
|
+
export interface SearchResultPage {
|
|
18
|
+
items: SearchResultItem[];
|
|
19
|
+
page: number;
|
|
20
|
+
totalItems: number;
|
|
21
|
+
}
|
|
22
|
+
export type GetSearchResponse = SearchResultPage | SearchResultItem[];
|
|
23
|
+
export interface PostSearchBody {
|
|
24
|
+
siteId: number | "global";
|
|
25
|
+
pageId: number;
|
|
26
|
+
languageId?: number | null;
|
|
27
|
+
url?: string | null;
|
|
28
|
+
image?: string | null;
|
|
29
|
+
title?: string | null;
|
|
30
|
+
description?: string | null;
|
|
31
|
+
content?: string | null;
|
|
32
|
+
template?: string | null;
|
|
33
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Public types for the `/search` endpoint family.
|
|
4
|
+
*
|
|
5
|
+
* `GET /search` returns either an empty array (when the search query is
|
|
6
|
+
* empty/whitespace) or a `SearchResultPage` payload with one entry per
|
|
7
|
+
* matched page.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public input/output types for the `/settings` endpoint.
|
|
3
|
+
*
|
|
4
|
+
* `GetGlobalSettingsResponse` is a key/value object whose value types vary
|
|
5
|
+
* per key (booleans for SEO flags, strings for welcome text, parsed JSON
|
|
6
|
+
* for things like `allowedUsersToCRUD`). The exact list of keys is
|
|
7
|
+
* data-driven so the type is kept loose on purpose.
|
|
8
|
+
*/
|
|
9
|
+
export type SettingValue = string | number | boolean | Record<string, unknown> | Array<unknown> | null;
|
|
10
|
+
export type GetGlobalSettingsResponse = Record<string, SettingValue> & {
|
|
11
|
+
cloudinaryName?: string | null;
|
|
12
|
+
apiVersion?: string;
|
|
13
|
+
schemasVersion: string;
|
|
14
|
+
schemasTimestamp: string;
|
|
15
|
+
};
|
|
16
|
+
export type SetGlobalSettingsRequest = Record<string, SettingValue>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Public input/output types for the `/settings` endpoint.
|
|
4
|
+
*
|
|
5
|
+
* `GetGlobalSettingsResponse` is a key/value object whose value types vary
|
|
6
|
+
* per key (booleans for SEO flags, strings for welcome text, parsed JSON
|
|
7
|
+
* for things like `allowedUsersToCRUD`). The exact list of keys is
|
|
8
|
+
* data-driven so the type is kept loose on purpose.
|
|
9
|
+
*/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
package/dist/site/index.d.ts
CHANGED
package/dist/site/index.js
CHANGED
|
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./languages"), exports);
|
|
18
18
|
__exportStar(require("./site"), exports);
|
|
19
|
+
__exportStar(require("./site_languages"), exports);
|
package/dist/site/site.d.ts
CHANGED
|
@@ -22,6 +22,8 @@ interface BaseSiteDTO {
|
|
|
22
22
|
hash?: string | null;
|
|
23
23
|
rendering?: Date | null;
|
|
24
24
|
isPublished?: number | null;
|
|
25
|
+
hidden?: number | null;
|
|
26
|
+
showSitemapInRobots?: number | null;
|
|
25
27
|
}
|
|
26
28
|
export type SiteDTO = BaseSiteDTO & {
|
|
27
29
|
authorRelation?: SiteRelation;
|
|
@@ -32,7 +34,7 @@ export type SitePostParamsDTO = Pick<BaseSiteDTO, "name"> & {
|
|
|
32
34
|
domain: number;
|
|
33
35
|
path: string | null;
|
|
34
36
|
};
|
|
35
|
-
export type SitePutParamsDTO = Pick<BaseSiteDTO, "authorId" | "bigAvatar" | "deleted" | "favicon" | "hash" | "id" | "isPublished" | "name" | "published" | "navigationModules" | "siteMetaDataId" | "slug" | "smallAvatar" | "socials" | "thumbnail" | "timezone">;
|
|
37
|
+
export type SitePutParamsDTO = Pick<BaseSiteDTO, "authorId" | "bigAvatar" | "deleted" | "favicon" | "hash" | "hidden" | "showSitemapInRobots" | "id" | "isPublished" | "name" | "published" | "navigationModules" | "siteMetaDataId" | "slug" | "smallAvatar" | "socials" | "thumbnail" | "timezone">;
|
|
36
38
|
export type SitePostResponseDTO = SiteDTO;
|
|
37
39
|
export type SitePutResponseDTO = SiteDTO;
|
|
38
40
|
export type SiteSyncActionsDTO = {
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public types for the `/site/:site/languages` endpoint family.
|
|
3
|
+
*
|
|
4
|
+
* `GET` returns the enriched list of languages configured for a site
|
|
5
|
+
* (including domain detail and a computed `home` URL). `POST`/`PUT` add or
|
|
6
|
+
* update a single site-language association.
|
|
7
|
+
*
|
|
8
|
+
* Not to be confused with `LanguageSiteDTO` (`site/languages.ts`), which is
|
|
9
|
+
* the raw `languages_site` row mapping used internally, or `LanguageListItem`
|
|
10
|
+
* / `LanguageListResponse` (`languages/index.ts`), which back the unrelated
|
|
11
|
+
* `/languages` endpoint.
|
|
12
|
+
*/
|
|
13
|
+
export interface SiteLanguageDomainDetail {
|
|
14
|
+
id: number;
|
|
15
|
+
url: string | null;
|
|
16
|
+
slug: string | null;
|
|
17
|
+
}
|
|
18
|
+
export interface SiteLanguageDetail {
|
|
19
|
+
id: number;
|
|
20
|
+
locale: string | null;
|
|
21
|
+
language: string | null;
|
|
22
|
+
label: string | null;
|
|
23
|
+
path: string | null;
|
|
24
|
+
isDefault: boolean;
|
|
25
|
+
domain: SiteLanguageDomainDetail | null;
|
|
26
|
+
}
|
|
27
|
+
export interface SiteLanguageDetailWithHome extends SiteLanguageDetail {
|
|
28
|
+
home: string | null;
|
|
29
|
+
}
|
|
30
|
+
export interface GetSiteLanguagesResult {
|
|
31
|
+
totalItems: number;
|
|
32
|
+
items: SiteLanguageDetailWithHome[];
|
|
33
|
+
}
|
|
34
|
+
export interface AddSiteLanguageRequest {
|
|
35
|
+
language: number | {
|
|
36
|
+
id: number;
|
|
37
|
+
};
|
|
38
|
+
domain: number | {
|
|
39
|
+
id: number;
|
|
40
|
+
};
|
|
41
|
+
path?: string;
|
|
42
|
+
isDefault?: boolean | number;
|
|
43
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Public types for the `/site/:site/languages` endpoint family.
|
|
4
|
+
*
|
|
5
|
+
* `GET` returns the enriched list of languages configured for a site
|
|
6
|
+
* (including domain detail and a computed `home` URL). `POST`/`PUT` add or
|
|
7
|
+
* update a single site-language association.
|
|
8
|
+
*
|
|
9
|
+
* Not to be confused with `LanguageSiteDTO` (`site/languages.ts`), which is
|
|
10
|
+
* the raw `languages_site` row mapping used internally, or `LanguageListItem`
|
|
11
|
+
* / `LanguageListResponse` (`languages/index.ts`), which back the unrelated
|
|
12
|
+
* `/languages` endpoint.
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StorageUrlType = void 0;
|
|
4
|
+
var StorageUrlType;
|
|
5
|
+
(function (StorageUrlType) {
|
|
6
|
+
StorageUrlType["IMAGES"] = "images";
|
|
7
|
+
StorageUrlType["FILES"] = "files";
|
|
8
|
+
})(StorageUrlType || (exports.StorageUrlType = StorageUrlType = {}));
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Forma mínima embebida en `GET /structured_data_content/:id` (campo `accessGrants`).
|
|
3
|
+
* Solo IDs; los detalles los obtiene el FE desde `/access-grants` o `/candidates`.
|
|
4
|
+
*/
|
|
5
|
+
export interface SimpleContentAccessGrantsSummary {
|
|
6
|
+
users: number[];
|
|
7
|
+
roles: number[];
|
|
8
|
+
}
|
|
9
|
+
export interface SimpleContentAccessGrantUserResponse {
|
|
10
|
+
id: number;
|
|
11
|
+
email: string;
|
|
12
|
+
username: string;
|
|
13
|
+
}
|
|
14
|
+
export interface SimpleContentAccessGrantRoleResponse {
|
|
15
|
+
id: number;
|
|
16
|
+
name: string;
|
|
17
|
+
}
|
|
18
|
+
export interface GetSimpleContentAccessGrantsResponse {
|
|
19
|
+
users: SimpleContentAccessGrantUserResponse[];
|
|
20
|
+
roles: SimpleContentAccessGrantRoleResponse[];
|
|
21
|
+
}
|
|
22
|
+
export interface SimpleContentAccessGrantCandidateUser {
|
|
23
|
+
id: number;
|
|
24
|
+
name: string;
|
|
25
|
+
email: string;
|
|
26
|
+
}
|
|
27
|
+
export interface SimpleContentAccessGrantCandidateRole {
|
|
28
|
+
id: number;
|
|
29
|
+
name: string;
|
|
30
|
+
}
|
|
31
|
+
export interface GetSimpleContentAccessGrantsCandidatesResponse {
|
|
32
|
+
availableUsers: SimpleContentAccessGrantCandidateUser[];
|
|
33
|
+
grantedUsers: SimpleContentAccessGrantCandidateUser[];
|
|
34
|
+
availableRoles: SimpleContentAccessGrantCandidateRole[];
|
|
35
|
+
grantedRoles: SimpleContentAccessGrantCandidateRole[];
|
|
36
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { DataLanguage } from "./content";
|
|
2
|
+
import type { SuccessResponse } from "../common/success";
|
|
3
|
+
/**
|
|
4
|
+
* Public types for category-group endpoints:
|
|
5
|
+
*
|
|
6
|
+
* - `POST /categories/group` (create) / `PUT /categories/group/:group` (update/move)
|
|
7
|
+
* - `GET /categories/group/:group`
|
|
8
|
+
* - `PUT /categories/order`
|
|
9
|
+
* - `DELETE /categories/:structuredData/site/:site/group/:group` (+ `/bulk`)
|
|
10
|
+
* - `DELETE /categories/delete/hard`
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* A category group, as returned by `formatGroup`. Shared by the group CRUD
|
|
14
|
+
* (`POST`/`PUT`/`GET /categories/group...`) endpoints.
|
|
15
|
+
*/
|
|
16
|
+
export interface StructuredDataCategoryGroup {
|
|
17
|
+
id: number | null;
|
|
18
|
+
type: string;
|
|
19
|
+
structuredData: string | null;
|
|
20
|
+
parentGroup: number | null;
|
|
21
|
+
entity: string | null;
|
|
22
|
+
position: number | null;
|
|
23
|
+
selectable: boolean;
|
|
24
|
+
content: {
|
|
25
|
+
title: string | null;
|
|
26
|
+
};
|
|
27
|
+
dataLanguages: DataLanguage[];
|
|
28
|
+
language: number | null;
|
|
29
|
+
relatedSite: number | null;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Body for `POST /categories/group` (create) and `PUT /categories/group/:group`
|
|
33
|
+
* (rename / move).
|
|
34
|
+
*/
|
|
35
|
+
export interface UpsertCategoriesGroupBody {
|
|
36
|
+
title: string;
|
|
37
|
+
structuredData: string;
|
|
38
|
+
selectable?: boolean;
|
|
39
|
+
entity?: string | null;
|
|
40
|
+
language?: number;
|
|
41
|
+
/** Normalised server-side: "global" / empty / non-numeric input becomes `null`. */
|
|
42
|
+
relatedSite: number | null;
|
|
43
|
+
}
|
|
44
|
+
/** Body for `PUT /categories/order`. */
|
|
45
|
+
export interface PutCategoriesOrderBody {
|
|
46
|
+
contentId: number;
|
|
47
|
+
type: string;
|
|
48
|
+
parentGroup: number;
|
|
49
|
+
position: number;
|
|
50
|
+
structuredData: string;
|
|
51
|
+
/** Normalised server-side: "global" / empty / non-numeric input becomes `null`. */
|
|
52
|
+
relatedSite: number | null;
|
|
53
|
+
language: number;
|
|
54
|
+
}
|
|
55
|
+
export type PutCategoriesOrderResponse = SuccessResponse;
|
|
56
|
+
/** Body for `DELETE /categories/:structuredData/site/:site/group/bulk`. */
|
|
57
|
+
export interface DeleteCategoriesGroupBulkBody {
|
|
58
|
+
groups: number[];
|
|
59
|
+
}
|
|
60
|
+
export type DeleteCategoriesGroupResponse = SuccessResponse;
|
|
61
|
+
/** Body for `DELETE /categories/delete/hard` (developer-key gated). */
|
|
62
|
+
export interface DeleteCategoriesHardBody {
|
|
63
|
+
developerKey?: string;
|
|
64
|
+
items: {
|
|
65
|
+
categories: Array<number | string>;
|
|
66
|
+
groups: Array<number | string>;
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
export type DeleteCategoriesHardResponse = SuccessResponse;
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import type { SimpleContentAccessGrantsSummary } from "./access_grants";
|
|
2
|
+
/**
|
|
3
|
+
* Public types for the `structured_data_content` CRUD family:
|
|
4
|
+
*
|
|
5
|
+
* - `POST /structured_data_content` (create) / `PUT /structured_data_content/:id` (update)
|
|
6
|
+
* - `GET /structured_data_content/:id` (+ `/site/:site/...` variant)
|
|
7
|
+
* - `GET /structured_data_content/bulk/:ids` (+ `/site/:site/...` variant)
|
|
8
|
+
* - `GET /structured_data_contents/:structuredData` and its 4 route
|
|
9
|
+
* variants (with/without `:site`, with/without `:structuredData`)
|
|
10
|
+
* - `GET /site/:site/structured_data_contents/:structuredData/checkgroup`
|
|
11
|
+
* - `DELETE /structured_data_content/:id` (+ `/bulk`)
|
|
12
|
+
* - `PUT /structured_data_content/:id/(draft|undraft)` (+ `/bulk`)
|
|
13
|
+
* - `PUT /structured_data_content/:id/restore` (+ `/bulk`)
|
|
14
|
+
* - `DELETE /structured_data_content/simple/hard/:structured_data_content` (+ `/bulk`)
|
|
15
|
+
* - `POST /structured_data_content/:structuredData/site/:site/export`
|
|
16
|
+
*/
|
|
17
|
+
/** One language version of a structured-data content row. */
|
|
18
|
+
export interface DataLanguage {
|
|
19
|
+
id: number;
|
|
20
|
+
site: number | null;
|
|
21
|
+
page: number | null;
|
|
22
|
+
language: number;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* A structured-data content item as returned by the single-item read path
|
|
26
|
+
* (`getStructuredDataContent` / `postStructuredDataContent` in the legacy
|
|
27
|
+
* orchestration, both funnel through the same `formatStructuredData`
|
|
28
|
+
* formatter). `relatedPage` starts out as a plain id and gets replaced with
|
|
29
|
+
* an enriched object (`{ pageId, url, urlCanonical, ... }`) once the URL
|
|
30
|
+
* remapping post-processing runs.
|
|
31
|
+
*/
|
|
32
|
+
export interface StructuredDataContentItem {
|
|
33
|
+
id: number;
|
|
34
|
+
structuredData: string | null;
|
|
35
|
+
type: "structuredData" | "category";
|
|
36
|
+
relatedSite: number | null;
|
|
37
|
+
relatedPage: number | Record<string, unknown> | null;
|
|
38
|
+
content: Record<string, unknown>;
|
|
39
|
+
entity: string | null;
|
|
40
|
+
draft: boolean;
|
|
41
|
+
published: Date | null;
|
|
42
|
+
modified: Date | null;
|
|
43
|
+
deleted: boolean;
|
|
44
|
+
pendingPublishing: boolean;
|
|
45
|
+
language: number | null;
|
|
46
|
+
originalLanguage: number | null;
|
|
47
|
+
canBeTranslated: boolean;
|
|
48
|
+
dataLanguages: DataLanguage[];
|
|
49
|
+
publicationScheduled: Date | null;
|
|
50
|
+
hasBeenPublished: boolean;
|
|
51
|
+
schemaVersion: string | null;
|
|
52
|
+
schemaVersionTimestamp: Date | null;
|
|
53
|
+
[key: string]: unknown;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* A structured-data content item as returned by the *listing* path
|
|
57
|
+
* (`listStructuredDataContentOptimized`). Field set overlaps heavily with
|
|
58
|
+
* `StructuredDataContentItem` but comes from a different formatter
|
|
59
|
+
* (`formatRawRow` + batch enrichment), so it's kept as its own type.
|
|
60
|
+
*/
|
|
61
|
+
export interface StructuredDataContentListItem {
|
|
62
|
+
id: number;
|
|
63
|
+
structuredData: string | null;
|
|
64
|
+
title: string | null;
|
|
65
|
+
abstract: string | null;
|
|
66
|
+
entity: string | null;
|
|
67
|
+
content: Record<string, unknown>;
|
|
68
|
+
image: number | null;
|
|
69
|
+
draft: number | null;
|
|
70
|
+
published: Date | null;
|
|
71
|
+
modified: Date | null;
|
|
72
|
+
deleted: number | null;
|
|
73
|
+
relatedSite: number | null;
|
|
74
|
+
relatedPage: number | null;
|
|
75
|
+
language: number | null;
|
|
76
|
+
expirationDate: Date | null;
|
|
77
|
+
hasBeenPublished: boolean | null;
|
|
78
|
+
pendingPublishing: number | null;
|
|
79
|
+
publicationScheduled: Date | null;
|
|
80
|
+
dataLanguages: DataLanguage[];
|
|
81
|
+
totalLanguageVersions: number;
|
|
82
|
+
[key: string]: unknown;
|
|
83
|
+
}
|
|
84
|
+
export interface UpsertStructuredDataContentAccessGrantsBody {
|
|
85
|
+
users: number[];
|
|
86
|
+
roles: number[];
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Body for `POST /structured_data_content` and `PUT /structured_data_content/:id`.
|
|
90
|
+
* The upsert payload accepts a large mode-specific surface (different content
|
|
91
|
+
* shapes per `structuredData` type) — only the keys the server reads are
|
|
92
|
+
* typed explicitly, the rest passes through untouched.
|
|
93
|
+
*/
|
|
94
|
+
export interface UpsertStructuredDataContentBody {
|
|
95
|
+
structuredData: string;
|
|
96
|
+
relatedSite?: number | string | null;
|
|
97
|
+
relatedPage?: number | string | null;
|
|
98
|
+
entity?: string | null;
|
|
99
|
+
content?: Record<string, unknown>;
|
|
100
|
+
draft?: boolean | number | string;
|
|
101
|
+
language?: number | string;
|
|
102
|
+
originalLanguage?: unknown;
|
|
103
|
+
canBeTranslated?: boolean | number | string;
|
|
104
|
+
publicationScheduled?: unknown;
|
|
105
|
+
accessGrants?: UpsertStructuredDataContentAccessGrantsBody;
|
|
106
|
+
[key: string]: unknown;
|
|
107
|
+
}
|
|
108
|
+
export type UpsertStructuredDataContentResponse = StructuredDataContentItem & {
|
|
109
|
+
accessGrants: SimpleContentAccessGrantsSummary;
|
|
110
|
+
};
|
|
111
|
+
export type GetStructuredDataContentResponse = StructuredDataContentItem & {
|
|
112
|
+
accessGrants: SimpleContentAccessGrantsSummary;
|
|
113
|
+
};
|
|
114
|
+
export interface GetStructuredDataContentBulkResponse {
|
|
115
|
+
page: number | string | undefined;
|
|
116
|
+
totalItems: number;
|
|
117
|
+
items: StructuredDataContentItem[];
|
|
118
|
+
}
|
|
119
|
+
export interface ListStructuredDataContentResponse {
|
|
120
|
+
totalItems: number;
|
|
121
|
+
schemasVersion: string | null;
|
|
122
|
+
schemasTimestamp: Date | null;
|
|
123
|
+
items: Array<StructuredDataContentListItem & {
|
|
124
|
+
accessGrants: SimpleContentAccessGrantsSummary;
|
|
125
|
+
}>;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* One node of `GET .../checkgroup`. Categories are leaves; groups nest
|
|
129
|
+
* `children` recursively (mirrors `formatCheckgroupCategories`). When
|
|
130
|
+
* `groupingCategories` isn't active, items come back flat with just
|
|
131
|
+
* `{ value, name, title, code?, dataLanguages }`.
|
|
132
|
+
*/
|
|
133
|
+
export interface StructuredDataCheckGroupItem {
|
|
134
|
+
value: number;
|
|
135
|
+
name: number;
|
|
136
|
+
title: string | null;
|
|
137
|
+
code?: string;
|
|
138
|
+
type?: "category" | "group";
|
|
139
|
+
selectable?: boolean;
|
|
140
|
+
lang?: number | null;
|
|
141
|
+
dataLanguages?: DataLanguage[];
|
|
142
|
+
children?: StructuredDataCheckGroupItem[];
|
|
143
|
+
}
|
|
144
|
+
export type GetStructuredDataCheckGroupResponse = StructuredDataCheckGroupItem[];
|
|
145
|
+
export interface SoftDeleteStructuredDataContentBulkBody {
|
|
146
|
+
ids: Array<number | string>;
|
|
147
|
+
}
|
|
148
|
+
export interface HardDeleteSimpleStructuredDataContentBody {
|
|
149
|
+
developerKey?: string;
|
|
150
|
+
}
|
|
151
|
+
export interface HardDeleteSimpleStructuredDataContentBulkBody {
|
|
152
|
+
developerKey?: string;
|
|
153
|
+
structuredDataIds: Array<number | string>;
|
|
154
|
+
}
|
|
155
|
+
export interface UpdateDraftStatusBulkBody {
|
|
156
|
+
ids: Array<number | string>;
|
|
157
|
+
}
|
|
158
|
+
export interface RestoreStructuredDataContentBulkBody {
|
|
159
|
+
ids: Array<number | string>;
|
|
160
|
+
}
|
|
161
|
+
export interface ExportStructuredDataContentBody {
|
|
162
|
+
ids: Array<number | string>;
|
|
163
|
+
format: string | string[];
|
|
164
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { DataLanguage } from "./content";
|
|
2
|
+
/**
|
|
3
|
+
* Public types for the content-distribution endpoints:
|
|
4
|
+
*
|
|
5
|
+
* - `POST /site/:site/distributor`
|
|
6
|
+
* - `GET /site/:site/structured_data/filters/:structuredData`
|
|
7
|
+
*/
|
|
8
|
+
/** One resolved content item returned by the distributor. */
|
|
9
|
+
export interface DistributorItem {
|
|
10
|
+
structuredData: string | null;
|
|
11
|
+
id: number;
|
|
12
|
+
language: number | null;
|
|
13
|
+
dataLanguages: DataLanguage[];
|
|
14
|
+
relatedSite: number | null;
|
|
15
|
+
relatedPage: number | Record<string, unknown> | null;
|
|
16
|
+
content: Record<string, unknown>;
|
|
17
|
+
modified: Date | null;
|
|
18
|
+
published: Date | null;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Body for `POST /site/:site/distributor`. Accepts a large mode-specific
|
|
22
|
+
* surface (auto/manual/navigation) — only the keys the server reads are
|
|
23
|
+
* typed explicitly, the rest passes through untouched.
|
|
24
|
+
*/
|
|
25
|
+
export interface PostDistributorContentBody {
|
|
26
|
+
site?: string | number;
|
|
27
|
+
language?: string | number;
|
|
28
|
+
mode?: "auto" | "manual" | "navigation" | string;
|
|
29
|
+
sources?: unknown[];
|
|
30
|
+
order?: unknown;
|
|
31
|
+
quantity?: unknown;
|
|
32
|
+
fixed?: unknown;
|
|
33
|
+
allLanguages?: unknown;
|
|
34
|
+
fullRelations?: unknown;
|
|
35
|
+
preferenceLanguage?: unknown;
|
|
36
|
+
referenceId?: unknown;
|
|
37
|
+
exclude?: unknown;
|
|
38
|
+
search?: unknown;
|
|
39
|
+
includePendingPublishing?: unknown;
|
|
40
|
+
page?: unknown;
|
|
41
|
+
responseObject?: unknown;
|
|
42
|
+
mapRelations?: unknown;
|
|
43
|
+
fields?: unknown;
|
|
44
|
+
groupingCategories?: unknown;
|
|
45
|
+
[key: string]: unknown;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* `mode: "manual"` groups results by source (keyed object); `"auto"` /
|
|
49
|
+
* `"navigation"` return a flat array. `body.mapRelations === false` returns
|
|
50
|
+
* the unmapped raw rows instead (legacy "Public API" escape hatch) — kept
|
|
51
|
+
* loose (`unknown[]`) for that branch since the shape isn't `DistributorItem`.
|
|
52
|
+
*/
|
|
53
|
+
export type PostDistributorContentResponse = DistributorItem[] | Record<string, DistributorItem[]> | unknown[];
|
|
54
|
+
export interface StructuredDataFilterItem {
|
|
55
|
+
id: number;
|
|
56
|
+
label: string;
|
|
57
|
+
language?: number;
|
|
58
|
+
published?: unknown;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* A category-tree node, used instead of `StructuredDataFilterItem` once the
|
|
62
|
+
* filter result gets grouped (`groupingCategories=on`). Groups nest
|
|
63
|
+
* `children` recursively.
|
|
64
|
+
*/
|
|
65
|
+
export interface StructuredDataFilterCategoryNode {
|
|
66
|
+
id: number;
|
|
67
|
+
type: string;
|
|
68
|
+
label?: string;
|
|
69
|
+
selectable?: boolean;
|
|
70
|
+
language?: number | null;
|
|
71
|
+
published?: unknown;
|
|
72
|
+
children?: StructuredDataFilterCategoryNode[];
|
|
73
|
+
[key: string]: unknown;
|
|
74
|
+
}
|
|
75
|
+
export interface StructuredDataFilterGroup {
|
|
76
|
+
label: string;
|
|
77
|
+
items: Array<StructuredDataFilterItem | StructuredDataFilterCategoryNode>;
|
|
78
|
+
}
|
|
79
|
+
/** Response of `GET /site/:site/structured_data/filters/:structuredData`, keyed by structuredData id. */
|
|
80
|
+
export type GetStructuredDataFiltersResponse = Record<string, StructuredDataFilterGroup>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./access_grants"), exports);
|
|
18
|
+
__exportStar(require("./content"), exports);
|
|
19
|
+
__exportStar(require("./types"), exports);
|
|
20
|
+
__exportStar(require("./categories"), exports);
|
|
21
|
+
__exportStar(require("./distributor"), exports);
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public types for structured-data **type** metadata endpoints:
|
|
3
|
+
*
|
|
4
|
+
* - `GET /structured_data` (+ `/site/:site/structured_data`)
|
|
5
|
+
* - `GET /structured_data/titles/:id`
|
|
6
|
+
* - `GET /select/categories/:structuredData`
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* A structured-data (or category) type definition, as declared in the
|
|
10
|
+
* instance's schema config. Intentionally loose — consumers in the editor
|
|
11
|
+
* read many ad-hoc fields from it.
|
|
12
|
+
*/
|
|
13
|
+
export interface StructuredDataTemplateSchema {
|
|
14
|
+
title?: string;
|
|
15
|
+
dataPacks?: string[];
|
|
16
|
+
type?: {
|
|
17
|
+
mode?: string;
|
|
18
|
+
[key: string]: unknown;
|
|
19
|
+
};
|
|
20
|
+
[key: string]: unknown;
|
|
21
|
+
}
|
|
22
|
+
export type StructuredDataTypeListItem = StructuredDataTemplateSchema & {
|
|
23
|
+
id: string;
|
|
24
|
+
};
|
|
25
|
+
export interface StructuredDataTypeListResponse {
|
|
26
|
+
totalItems: number;
|
|
27
|
+
schemasVersion: string | null;
|
|
28
|
+
schemasTimestamp: string | null;
|
|
29
|
+
items: StructuredDataTypeListItem[];
|
|
30
|
+
}
|
|
31
|
+
export interface StructuredDataTitleItem {
|
|
32
|
+
id: string;
|
|
33
|
+
title: string | undefined;
|
|
34
|
+
}
|
|
35
|
+
export interface StructuredDataCategorySelectItem {
|
|
36
|
+
value: string;
|
|
37
|
+
label: string;
|
|
38
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Public types for structured-data **type** metadata endpoints:
|
|
4
|
+
*
|
|
5
|
+
* - `GET /structured_data` (+ `/site/:site/structured_data`)
|
|
6
|
+
* - `GET /structured_data/titles/:id`
|
|
7
|
+
* - `GET /select/categories/:structuredData`
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|