@griddo/api-types 1.1.2 → 1.3.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/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/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/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/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/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 +4 -2
- 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,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public types for the `/translations` endpoint family.
|
|
3
|
+
*/
|
|
4
|
+
export interface GlossaryRecord {
|
|
5
|
+
sourceLanguage: string;
|
|
6
|
+
targetLanguage: string;
|
|
7
|
+
content: string;
|
|
8
|
+
deepLGlossaryId: string;
|
|
9
|
+
}
|
|
10
|
+
export type ListGlossariesResponse = GlossaryRecord[];
|
|
11
|
+
export interface AddGlossaryRequest {
|
|
12
|
+
sourceLanguage: string;
|
|
13
|
+
targetLanguage: string;
|
|
14
|
+
content: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Minimal content-metadata fields the translation logic reads/writes on
|
|
18
|
+
* pages and forms. `metaKeywords` is the only one of these stored as an
|
|
19
|
+
* array in practice; the rest are plain strings (or absent).
|
|
20
|
+
*/
|
|
21
|
+
export interface TranslatableContentMetadata {
|
|
22
|
+
title?: string | null;
|
|
23
|
+
metaTitle?: string | null;
|
|
24
|
+
metaDescription?: string | null;
|
|
25
|
+
metaKeywords?: string | string[] | null;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* A page/form's `template` tree (its module structure). The concrete shape
|
|
29
|
+
* is entirely schema/component-driven (see `componentsTextFields` /
|
|
30
|
+
* `templatesTextFields` in `ScanSchemasService`), so beyond `templateType`
|
|
31
|
+
* it is intentionally left as `unknown` — the translation logic walks it
|
|
32
|
+
* generically without assuming a fixed structure.
|
|
33
|
+
*/
|
|
34
|
+
export interface TranslatableTemplate {
|
|
35
|
+
templateType: string;
|
|
36
|
+
[key: string]: unknown;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* `POST /translations/page/:targetLanguage` — translates a page's text
|
|
40
|
+
* fields (title/meta/slug/module content) from `originalLanguage` (read off
|
|
41
|
+
* the body) to the `targetLanguage` route param. The endpoint accepts a full
|
|
42
|
+
* page object; only the fields the translation logic actually touches are
|
|
43
|
+
* typed here (see `TranslatePageUseCase.execute`).
|
|
44
|
+
*/
|
|
45
|
+
export interface PostTranslatePageBody extends TranslatableContentMetadata {
|
|
46
|
+
slug?: string;
|
|
47
|
+
template: TranslatableTemplate;
|
|
48
|
+
originalLanguage?: string | number;
|
|
49
|
+
[key: string]: unknown;
|
|
50
|
+
}
|
|
51
|
+
export interface PostTranslatePageResponse extends TranslatableContentMetadata {
|
|
52
|
+
slug?: string;
|
|
53
|
+
template: TranslatableTemplate;
|
|
54
|
+
/** Set by the use case to the resolved target language. */
|
|
55
|
+
language: {
|
|
56
|
+
id: string | number;
|
|
57
|
+
locale?: string;
|
|
58
|
+
};
|
|
59
|
+
[key: string]: unknown;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* `POST /translations/structured_data_content/:targetLanguage` — translates
|
|
63
|
+
* a structured-data entry's text fields. `content`'s concrete shape is
|
|
64
|
+
* schema-driven per `structuredDataType` (see
|
|
65
|
+
* `scanStructuredDataForText`/`scanStructuredContentForText` in
|
|
66
|
+
* `ScanSchemasService.ts`, which walk it generically without a fixed
|
|
67
|
+
* structure), so it is kept as `Record<string, unknown>` — see
|
|
68
|
+
* `TranslateStructuredDataUseCase.execute`.
|
|
69
|
+
*/
|
|
70
|
+
export interface PostTranslateStructuredDataBody {
|
|
71
|
+
structuredData: string;
|
|
72
|
+
content: Record<string, unknown>;
|
|
73
|
+
originalLanguage?: string | number;
|
|
74
|
+
[key: string]: unknown;
|
|
75
|
+
}
|
|
76
|
+
export interface PostTranslateStructuredDataResponse {
|
|
77
|
+
structuredData: string;
|
|
78
|
+
content: Record<string, unknown>;
|
|
79
|
+
/** Set by the use case to the resolved target language. */
|
|
80
|
+
language: string | number;
|
|
81
|
+
[key: string]: unknown;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* `POST /translations/form/:targetLanguage` — translates a form's text
|
|
85
|
+
* fields (title/meta/field labels), same field-level criteria as
|
|
86
|
+
* `PostTranslatePageBody` (see `TranslateFormUseCase.execute`).
|
|
87
|
+
*/
|
|
88
|
+
export interface PostTranslateFormBody extends TranslatableContentMetadata {
|
|
89
|
+
template: TranslatableTemplate;
|
|
90
|
+
originalLanguage?: string | number;
|
|
91
|
+
[key: string]: unknown;
|
|
92
|
+
}
|
|
93
|
+
export interface PostTranslateFormResponse extends TranslatableContentMetadata {
|
|
94
|
+
template: TranslatableTemplate;
|
|
95
|
+
/** Set by the use case to the resolved target language. */
|
|
96
|
+
language: string | number;
|
|
97
|
+
[key: string]: unknown;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* `POST /translations/page/:pageId/retranslate` — no request body (params
|
|
101
|
+
* only). PLACEHOLDER, requires revision: the use case persists through the
|
|
102
|
+
* legacy `postPage` bridge (`models/pages/index.ts`), which ultimately
|
|
103
|
+
* returns the full formatted page (`getPage`, the same shape as
|
|
104
|
+
* `GET /pages/:id`) — a response not yet typed anywhere in this package.
|
|
105
|
+
* Tracing that shape precisely was out of scope for the translations
|
|
106
|
+
* domain; revisit once the Pages domain's read response gets a public type.
|
|
107
|
+
*/
|
|
108
|
+
export type PostRetranslatePageResponse = Record<string, unknown>;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
export * from "./page_permissions";
|
|
2
|
+
export * from "./single_login";
|
|
3
|
+
export * from "./sso_login";
|
|
4
|
+
export interface UserSiteRoleEntryInput {
|
|
5
|
+
siteId: number | "global" | "all" | string;
|
|
6
|
+
roles: number[];
|
|
7
|
+
}
|
|
8
|
+
export interface UsersApiFormattedUser {
|
|
9
|
+
id: number;
|
|
10
|
+
username: string;
|
|
11
|
+
name: string;
|
|
12
|
+
email: string;
|
|
13
|
+
isSuperAdmin: boolean;
|
|
14
|
+
image: unknown | null;
|
|
15
|
+
company: string | null;
|
|
16
|
+
description: string | null;
|
|
17
|
+
dateCreated: string | null;
|
|
18
|
+
failed: number | null;
|
|
19
|
+
timezone: string | null;
|
|
20
|
+
enabled: boolean;
|
|
21
|
+
status: "active" | "invited";
|
|
22
|
+
roles: Array<{
|
|
23
|
+
siteId: number | "all" | "global";
|
|
24
|
+
roles: number[];
|
|
25
|
+
}>;
|
|
26
|
+
sites: "all" | Array<string | number>;
|
|
27
|
+
position: string | null;
|
|
28
|
+
profileCreated: boolean;
|
|
29
|
+
}
|
|
30
|
+
export interface UsersApiCreateUserInput {
|
|
31
|
+
name: string;
|
|
32
|
+
email: string;
|
|
33
|
+
password?: string;
|
|
34
|
+
fullCreate?: boolean;
|
|
35
|
+
bot?: boolean;
|
|
36
|
+
roles?: UserSiteRoleEntryInput[];
|
|
37
|
+
isSuperAdmin?: boolean;
|
|
38
|
+
}
|
|
39
|
+
export interface UsersApiUpdateUserInput {
|
|
40
|
+
name: string;
|
|
41
|
+
username: string;
|
|
42
|
+
image?: number | string | null;
|
|
43
|
+
email?: string | null;
|
|
44
|
+
company?: string;
|
|
45
|
+
description?: string;
|
|
46
|
+
timezone?: string;
|
|
47
|
+
roles?: UserSiteRoleEntryInput[];
|
|
48
|
+
isSuperAdmin?: boolean;
|
|
49
|
+
position?: string | null;
|
|
50
|
+
profileCreated?: boolean;
|
|
51
|
+
bot?: boolean;
|
|
52
|
+
}
|
|
53
|
+
export interface UsersApiPasswordChangeInput {
|
|
54
|
+
currentPassword: string;
|
|
55
|
+
password: string;
|
|
56
|
+
retypedPassword: string;
|
|
57
|
+
}
|
|
58
|
+
export interface UsersApiInitialPasswordInput {
|
|
59
|
+
token: string;
|
|
60
|
+
password: string;
|
|
61
|
+
retypedPassword: string;
|
|
62
|
+
}
|
|
63
|
+
export interface UsersApiNewPasswordInput {
|
|
64
|
+
token: string;
|
|
65
|
+
password: string;
|
|
66
|
+
retypedPassword: string;
|
|
67
|
+
}
|
|
68
|
+
export interface UsersApiSiteRestrictInput {
|
|
69
|
+
users: Array<number | string>;
|
|
70
|
+
}
|
|
71
|
+
export interface UsersApiHardDeleteBulkInput {
|
|
72
|
+
developerKey: string;
|
|
73
|
+
users: Array<number | string>;
|
|
74
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
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("./page_permissions"), exports);
|
|
18
|
+
__exportStar(require("./single_login"), exports);
|
|
19
|
+
__exportStar(require("./sso_login"), exports);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Entrada del array `pagePermissions` que viaja tanto:
|
|
3
|
+
* - En el body de POST /user y PUT /user/:id (asignación de páginas restringidas).
|
|
4
|
+
* - En la response de GET /user/:id y GET /users (qué páginas tiene asignadas).
|
|
5
|
+
*
|
|
6
|
+
* Cada entrada agrupa pages por site. siteId puede ser "global" o número.
|
|
7
|
+
*/
|
|
8
|
+
export interface UserPagePermissionEntry {
|
|
9
|
+
siteId: "global" | number;
|
|
10
|
+
pageIds: number[];
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Entrada del array `roles` en el body de POST /user y PUT /user/:id.
|
|
14
|
+
* El user puede tener varios roles por site; todos aplican a las pages
|
|
15
|
+
* indicadas en `pagePermissions` para ese site (producto cartesiano).
|
|
16
|
+
*
|
|
17
|
+
* `"all"` representa permisos cross-site.
|
|
18
|
+
*/
|
|
19
|
+
export interface UserRoleAssignment {
|
|
20
|
+
siteId: "global" | "all" | number;
|
|
21
|
+
roles: number[];
|
|
22
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { UUID } from "src";
|
|
2
|
+
export type LoginRequest = Readonly<{
|
|
3
|
+
email: string;
|
|
4
|
+
password: string;
|
|
5
|
+
username?: string;
|
|
6
|
+
petitionId?: UUID | null;
|
|
7
|
+
}>;
|
|
8
|
+
export type LoginParams = Readonly<{
|
|
9
|
+
email: string;
|
|
10
|
+
password: string;
|
|
11
|
+
jwtKey: string;
|
|
12
|
+
}>;
|
|
13
|
+
export type LoginResponse = Readonly<{
|
|
14
|
+
message: string;
|
|
15
|
+
token: string;
|
|
16
|
+
id: number;
|
|
17
|
+
}>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { UUID } from "src";
|
|
2
|
+
export interface SSOClientParamsDTO {
|
|
3
|
+
clientId: string;
|
|
4
|
+
clientSecret: string;
|
|
5
|
+
issuerUrl: string;
|
|
6
|
+
redirectUris: string[];
|
|
7
|
+
}
|
|
8
|
+
export interface SSOLoginParams {
|
|
9
|
+
ssoClientParamsDTO: SSOClientParamsDTO;
|
|
10
|
+
jwtKey: string;
|
|
11
|
+
petitionId?: UUID | null;
|
|
12
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@griddo/api-types",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Tipos públicos de la API de Griddo",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
},
|
|
18
18
|
"license": "MIT",
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@types/minimatch": "^6.0.0"
|
|
20
|
+
"@types/minimatch": "^6.0.0",
|
|
21
|
+
"@types/node": "^22.13.13",
|
|
22
|
+
"typescript": "^5.7.2"
|
|
21
23
|
}
|
|
22
24
|
}
|