@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.
Files changed (126) hide show
  1. package/dist/ai/answers.d.ts +20 -0
  2. package/dist/ai/answers.js +8 -0
  3. package/dist/ai/index.d.ts +4 -0
  4. package/dist/ai/index.js +20 -0
  5. package/dist/ai/pages.d.ts +19 -0
  6. package/dist/ai/pages.js +2 -0
  7. package/dist/ai/search.d.ts +54 -0
  8. package/dist/ai/search.js +13 -0
  9. package/dist/ai/summary.d.ts +12 -0
  10. package/dist/ai/summary.js +7 -0
  11. package/dist/analytics/dimensions.d.ts +13 -0
  12. package/dist/analytics/dimensions.js +5 -0
  13. package/dist/analytics/groups.d.ts +20 -0
  14. package/dist/analytics/groups.js +5 -0
  15. package/dist/analytics/index.d.ts +3 -0
  16. package/dist/analytics/index.js +19 -0
  17. package/dist/analytics/script.d.ts +34 -0
  18. package/dist/analytics/script.js +5 -0
  19. package/dist/apiTokens/api_token.d.ts +33 -0
  20. package/dist/apiTokens/api_token.js +12 -0
  21. package/dist/apiTokens/index.d.ts +2 -0
  22. package/dist/apiTokens/index.js +18 -0
  23. package/dist/apiTokens/service_account.d.ts +32 -0
  24. package/dist/apiTokens/service_account.js +12 -0
  25. package/dist/common/index.d.ts +2 -0
  26. package/dist/common/index.js +2 -0
  27. package/dist/common/success.d.ts +10 -0
  28. package/dist/common/success.js +2 -0
  29. package/dist/common/uuid.d.ts +1 -0
  30. package/dist/common/uuid.js +2 -0
  31. package/dist/dataPack/config.d.ts +1 -1
  32. package/dist/dataPack/index.d.ts +1 -0
  33. package/dist/dataPack/index.js +1 -0
  34. package/dist/dataPack/types.d.ts +15 -0
  35. package/dist/dataPack/types.js +2 -0
  36. package/dist/domains/domains.d.ts +33 -0
  37. package/dist/domains/domains.js +2 -0
  38. package/dist/domains/index.d.ts +42 -0
  39. package/dist/domains/index.js +33 -0
  40. package/dist/domains/robots.d.ts +24 -0
  41. package/dist/domains/robots.js +2 -0
  42. package/dist/feeds/index.d.ts +40 -0
  43. package/dist/feeds/index.js +9 -0
  44. package/dist/files/index.d.ts +60 -0
  45. package/dist/files/index.js +2 -0
  46. package/dist/form-categories/index.d.ts +46 -0
  47. package/dist/form-categories/index.js +9 -0
  48. package/dist/forms/index.d.ts +71 -0
  49. package/dist/forms/index.js +10 -0
  50. package/dist/images/index.d.ts +235 -0
  51. package/dist/images/index.js +6 -0
  52. package/dist/index.d.ts +25 -0
  53. package/dist/index.js +25 -0
  54. package/dist/instances/index.d.ts +10 -0
  55. package/dist/instances/index.js +10 -0
  56. package/dist/integrations/index.d.ts +92 -0
  57. package/dist/integrations/index.js +17 -0
  58. package/dist/languages/index.d.ts +23 -0
  59. package/dist/languages/index.js +2 -0
  60. package/dist/liveStatus/index.d.ts +14 -0
  61. package/dist/liveStatus/index.js +10 -0
  62. package/dist/logs/LogActivityEvents.d.ts +35 -0
  63. package/dist/logs/LogActivityEvents.js +35 -0
  64. package/dist/logs/activity.d.ts +2 -2
  65. package/dist/menus/index.d.ts +52 -0
  66. package/dist/menus/index.js +8 -0
  67. package/dist/navigation/index.d.ts +44 -0
  68. package/dist/navigation/index.js +8 -0
  69. package/dist/pages/add-ons.d.ts +1 -1
  70. package/dist/pages/index.d.ts +3 -0
  71. package/dist/pages/index.js +3 -0
  72. package/dist/pages/llms.d.ts +13 -0
  73. package/dist/pages/llms.js +8 -0
  74. package/dist/pages/page_access_grants.d.ts +46 -0
  75. package/dist/pages/page_access_grants.js +2 -0
  76. package/dist/pages/preview_share.d.ts +13 -0
  77. package/dist/pages/preview_share.js +8 -0
  78. package/dist/payables/index.d.ts +19 -0
  79. package/dist/payables/index.js +10 -0
  80. package/dist/queue/status.d.ts +1 -1
  81. package/dist/redirects/index.d.ts +33 -0
  82. package/dist/render/index.d.ts +1 -0
  83. package/dist/render/index.js +17 -0
  84. package/dist/render/status.d.ts +59 -0
  85. package/dist/render/status.js +2 -0
  86. package/dist/roles/index.d.ts +61 -0
  87. package/dist/roles/index.js +3 -0
  88. package/dist/schemas/index.d.ts +1 -0
  89. package/dist/schemas/index.js +1 -0
  90. package/dist/schemas/schemas.d.ts +2 -0
  91. package/dist/schemas/version.d.ts +9 -0
  92. package/dist/schemas/version.js +2 -0
  93. package/dist/search/index.d.ts +33 -0
  94. package/dist/search/index.js +9 -0
  95. package/dist/settings/index.d.ts +16 -0
  96. package/dist/settings/index.js +10 -0
  97. package/dist/site/index.d.ts +1 -0
  98. package/dist/site/index.js +1 -0
  99. package/dist/site/site.d.ts +3 -1
  100. package/dist/site/site_languages.d.ts +43 -0
  101. package/dist/site/site_languages.js +14 -0
  102. package/dist/storage/index.d.ts +4 -0
  103. package/dist/storage/index.js +8 -0
  104. package/dist/structuredData/access_grants.d.ts +36 -0
  105. package/dist/structuredData/access_grants.js +2 -0
  106. package/dist/structuredData/categories.d.ts +69 -0
  107. package/dist/structuredData/categories.js +2 -0
  108. package/dist/structuredData/content.d.ts +164 -0
  109. package/dist/structuredData/content.js +2 -0
  110. package/dist/structuredData/distributor.d.ts +80 -0
  111. package/dist/structuredData/distributor.js +2 -0
  112. package/dist/structuredData/index.d.ts +5 -0
  113. package/dist/structuredData/index.js +21 -0
  114. package/dist/structuredData/types.d.ts +38 -0
  115. package/dist/structuredData/types.js +9 -0
  116. package/dist/translations/index.d.ts +108 -0
  117. package/dist/translations/index.js +5 -0
  118. package/dist/user/index.d.ts +74 -0
  119. package/dist/user/index.js +19 -0
  120. package/dist/user/page_permissions.d.ts +22 -0
  121. package/dist/user/page_permissions.js +2 -0
  122. package/dist/user/single_login.d.ts +17 -0
  123. package/dist/user/single_login.js +2 -0
  124. package/dist/user/sso_login.d.ts +12 -0
  125. package/dist/user/sso_login.js +2 -0
  126. 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,5 @@
1
+ "use strict";
2
+ /**
3
+ * Public types for the `/translations` endpoint family.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,17 @@
1
+ import type { UUID } from "../common";
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,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ import type { UUID } from "../common";
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
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@griddo/api-types",
3
- "version": "1.1.3",
3
+ "version": "1.3.1",
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
  }