@griddo/api-types 1.1.3 → 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 +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,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public types for `POST /ai/answers`.
|
|
3
|
+
*
|
|
4
|
+
* Generates a natural-language, AI-powered answer to a query, grounded on
|
|
5
|
+
* the most relevant indexed content found for it.
|
|
6
|
+
*/
|
|
7
|
+
export interface PostAiAnswersBody {
|
|
8
|
+
query: string;
|
|
9
|
+
lang: number;
|
|
10
|
+
site?: number | "global";
|
|
11
|
+
templates?: string[];
|
|
12
|
+
priorities?: Record<string, number>;
|
|
13
|
+
minSimilarity?: number;
|
|
14
|
+
format?: string | null;
|
|
15
|
+
}
|
|
16
|
+
export interface PostAiAnswersResponse {
|
|
17
|
+
status: "ok" | "noResponse";
|
|
18
|
+
response: string;
|
|
19
|
+
error: string;
|
|
20
|
+
}
|
package/dist/ai/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
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("./search"), exports);
|
|
18
|
+
__exportStar(require("./answers"), exports);
|
|
19
|
+
__exportStar(require("./pages"), exports);
|
|
20
|
+
__exportStar(require("./summary"), exports);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { AiSearchResultItem } from "./search";
|
|
2
|
+
/**
|
|
3
|
+
* Public types for `POST /ai/pages/related`.
|
|
4
|
+
*
|
|
5
|
+
* Returns the pages most related to a given page (by its embedding),
|
|
6
|
+
* ranked by AI similarity. Reuses the same result shape as `/ai/search`.
|
|
7
|
+
*/
|
|
8
|
+
export interface PostAiPagesRelatedBody {
|
|
9
|
+
pageId?: number | null;
|
|
10
|
+
languageId: number;
|
|
11
|
+
site?: number | "global";
|
|
12
|
+
template?: string | string[] | null;
|
|
13
|
+
priorities?: Record<string, number>;
|
|
14
|
+
minSimilarity?: number;
|
|
15
|
+
quantity?: number;
|
|
16
|
+
useStructuredData?: boolean;
|
|
17
|
+
fields?: string[];
|
|
18
|
+
}
|
|
19
|
+
export type PostAiPagesRelatedResponse = AiSearchResultItem[];
|
package/dist/ai/pages.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public types for the `/ai/search` endpoint family.
|
|
3
|
+
*
|
|
4
|
+
* `POST /ai/search` runs an AI-powered semantic search over indexed
|
|
5
|
+
* embeddings (pages and structured data) and returns a paginated,
|
|
6
|
+
* similarity-ranked list of results.
|
|
7
|
+
*
|
|
8
|
+
* `GET /ai/search/content-types` returns the distinct list of
|
|
9
|
+
* templates/structured-data schemas indexed for AI search, used to
|
|
10
|
+
* populate content-type filters in search UIs.
|
|
11
|
+
*/
|
|
12
|
+
export interface PostAiSearchBody {
|
|
13
|
+
query: string;
|
|
14
|
+
lang: number;
|
|
15
|
+
site?: number | "global";
|
|
16
|
+
templates?: string[];
|
|
17
|
+
priorities?: Record<string, number>;
|
|
18
|
+
minSimilarity?: number;
|
|
19
|
+
page?: number;
|
|
20
|
+
itemsPerPage?: number;
|
|
21
|
+
useStructuredData?: boolean;
|
|
22
|
+
fields?: string[];
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* A single AI search result, built from an indexed embedding and scored
|
|
26
|
+
* against the query.
|
|
27
|
+
*
|
|
28
|
+
* `content` is only present when the search requested it (`useContent`);
|
|
29
|
+
* `structuredData` is only present when it requested structured data
|
|
30
|
+
* (`useStructuredData`).
|
|
31
|
+
*/
|
|
32
|
+
export interface AiSearchResultItem {
|
|
33
|
+
searchId: number;
|
|
34
|
+
pageId: number;
|
|
35
|
+
title: string;
|
|
36
|
+
url: string | null;
|
|
37
|
+
image: string | null;
|
|
38
|
+
description: string | null;
|
|
39
|
+
template: string;
|
|
40
|
+
similarity: number;
|
|
41
|
+
content?: string;
|
|
42
|
+
structuredData?: Record<string, any> | string;
|
|
43
|
+
}
|
|
44
|
+
export interface PostAiSearchResponse {
|
|
45
|
+
page: number;
|
|
46
|
+
itemsPerPage: number;
|
|
47
|
+
totalItems: number;
|
|
48
|
+
items: AiSearchResultItem[];
|
|
49
|
+
}
|
|
50
|
+
export interface AiContentType {
|
|
51
|
+
id: string;
|
|
52
|
+
name: string;
|
|
53
|
+
}
|
|
54
|
+
export type GetAiSearchContentTypesResponse = AiContentType[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Public types for the `/ai/search` endpoint family.
|
|
4
|
+
*
|
|
5
|
+
* `POST /ai/search` runs an AI-powered semantic search over indexed
|
|
6
|
+
* embeddings (pages and structured data) and returns a paginated,
|
|
7
|
+
* similarity-ranked list of results.
|
|
8
|
+
*
|
|
9
|
+
* `GET /ai/search/content-types` returns the distinct list of
|
|
10
|
+
* templates/structured-data schemas indexed for AI search, used to
|
|
11
|
+
* populate content-type filters in search UIs.
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public types for `POST /ai/summary/page`.
|
|
3
|
+
*
|
|
4
|
+
* Generates an AI-powered summary (and keywords) for a page's content.
|
|
5
|
+
*/
|
|
6
|
+
export interface PostAiSummaryPageBody {
|
|
7
|
+
id: number;
|
|
8
|
+
}
|
|
9
|
+
export interface PostAiSummaryPageResponse {
|
|
10
|
+
summary: string;
|
|
11
|
+
keywords: string[];
|
|
12
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public types for analytics dimensions (`/metrics/dimensions`).
|
|
3
|
+
*/
|
|
4
|
+
export interface AnalyticsDimensionBody {
|
|
5
|
+
id?: number | null;
|
|
6
|
+
name: string;
|
|
7
|
+
values: string | null;
|
|
8
|
+
}
|
|
9
|
+
export type PostAnalyticsDimensionBody = AnalyticsDimensionBody;
|
|
10
|
+
export type PutAnalyticsDimensionBody = Required<Pick<AnalyticsDimensionBody, "id" | "name">> & Pick<AnalyticsDimensionBody, "values">;
|
|
11
|
+
export interface PostAnalyticsDimensionsBulkBody {
|
|
12
|
+
dimensions: AnalyticsDimensionBody[];
|
|
13
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public types for analytics groups (`/metrics/groups`).
|
|
3
|
+
*/
|
|
4
|
+
export interface AnalyticsGroupBody {
|
|
5
|
+
id?: number | null;
|
|
6
|
+
name: string;
|
|
7
|
+
dimensions: string | null;
|
|
8
|
+
templates: string | null;
|
|
9
|
+
}
|
|
10
|
+
export type PostAnalyticsGroupBody = Pick<AnalyticsGroupBody, "name"> & Pick<Partial<AnalyticsGroupBody>, "dimensions" | "templates">;
|
|
11
|
+
export type PutAnalyticsGroupBody = PostAnalyticsGroupBody;
|
|
12
|
+
export interface PostAnalyticsGroupsBulkBody {
|
|
13
|
+
groups: AnalyticsGroupBody[];
|
|
14
|
+
}
|
|
15
|
+
export interface AnalyticsGroupBulkError {
|
|
16
|
+
group: AnalyticsGroupBody;
|
|
17
|
+
error: string;
|
|
18
|
+
}
|
|
19
|
+
/** Empty array means every group in the request was saved successfully. */
|
|
20
|
+
export type PostAnalyticsGroupsBulkResponse = AnalyticsGroupBulkError[];
|
|
@@ -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("./script"), exports);
|
|
18
|
+
__exportStar(require("./groups"), exports);
|
|
19
|
+
__exportStar(require("./dimensions"), exports);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public types for the site analytics script (`/site/:site/metrics/code`, `/site/:site/metrics`).
|
|
3
|
+
*/
|
|
4
|
+
export interface AnalyticsScriptResponse {
|
|
5
|
+
siteId?: number;
|
|
6
|
+
script_code: string | null;
|
|
7
|
+
}
|
|
8
|
+
/** Fallback shape returned by `GET /site/:site/metrics/code` when no script exists yet. */
|
|
9
|
+
export interface EmptyAnalyticsScriptResponse {
|
|
10
|
+
script: "";
|
|
11
|
+
}
|
|
12
|
+
export type GetSiteAnalyticsScriptResponse = AnalyticsScriptResponse | EmptyAnalyticsScriptResponse;
|
|
13
|
+
export interface PostSiteAnalyticsScriptBody {
|
|
14
|
+
scriptCode: string;
|
|
15
|
+
}
|
|
16
|
+
/** `POST`/`PUT /site/:site/metrics/code` echo back the submitted script code. */
|
|
17
|
+
export type PostSiteAnalyticsScriptResponse = string;
|
|
18
|
+
export interface AnalyticsDimensionSummary {
|
|
19
|
+
id: number;
|
|
20
|
+
name: string;
|
|
21
|
+
values: string;
|
|
22
|
+
}
|
|
23
|
+
export interface AnalyticsGroupSummary {
|
|
24
|
+
id: number;
|
|
25
|
+
name: string;
|
|
26
|
+
dimensions: string;
|
|
27
|
+
templates: string;
|
|
28
|
+
}
|
|
29
|
+
export interface GetSiteAnalyticsResponse {
|
|
30
|
+
scriptCode: string;
|
|
31
|
+
siteScriptCodeExists: boolean;
|
|
32
|
+
dimensions: AnalyticsDimensionSummary[];
|
|
33
|
+
groups: AnalyticsGroupSummary[];
|
|
34
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public types for the API token endpoints:
|
|
3
|
+
* - `POST /api-tokens`, `POST /users/:id/api-tokens`,
|
|
4
|
+
* `POST /service-accounts/:id/api-tokens` (creation, all three share the
|
|
5
|
+
* same request and response shape)
|
|
6
|
+
* - `GET /api-tokens`, `GET /users/:id/api-tokens` (listing)
|
|
7
|
+
* - `DELETE /api-tokens/:id`, `DELETE /users/:id/api-tokens/:tokenId`
|
|
8
|
+
* (revocation; the controllers respond with an inline literal, not a
|
|
9
|
+
* named DTO)
|
|
10
|
+
*/
|
|
11
|
+
export interface CreateApiTokenRequest {
|
|
12
|
+
name: string;
|
|
13
|
+
expiresAt?: string | null;
|
|
14
|
+
}
|
|
15
|
+
export interface ApiTokenResponseDTO {
|
|
16
|
+
id: number;
|
|
17
|
+
tokenPrefix: string;
|
|
18
|
+
name: string;
|
|
19
|
+
ownerId: number;
|
|
20
|
+
createdBy: number;
|
|
21
|
+
createdAt: string;
|
|
22
|
+
expiresAt: string | null;
|
|
23
|
+
lastUsedAt: string | null;
|
|
24
|
+
revokedAt: string | null;
|
|
25
|
+
revokeReason: string | null;
|
|
26
|
+
auditEnabled: boolean;
|
|
27
|
+
}
|
|
28
|
+
export interface ApiTokenWithPlainTokenResponseDTO extends ApiTokenResponseDTO {
|
|
29
|
+
token: string;
|
|
30
|
+
}
|
|
31
|
+
export interface RevokeApiTokenResponse {
|
|
32
|
+
revoked: true;
|
|
33
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Public types for the API token endpoints:
|
|
4
|
+
* - `POST /api-tokens`, `POST /users/:id/api-tokens`,
|
|
5
|
+
* `POST /service-accounts/:id/api-tokens` (creation, all three share the
|
|
6
|
+
* same request and response shape)
|
|
7
|
+
* - `GET /api-tokens`, `GET /users/:id/api-tokens` (listing)
|
|
8
|
+
* - `DELETE /api-tokens/:id`, `DELETE /users/:id/api-tokens/:tokenId`
|
|
9
|
+
* (revocation; the controllers respond with an inline literal, not a
|
|
10
|
+
* named DTO)
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,18 @@
|
|
|
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("./api_token"), exports);
|
|
18
|
+
__exportStar(require("./service_account"), exports);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public types for the service account endpoints:
|
|
3
|
+
* - `POST /service-accounts` (creation)
|
|
4
|
+
* - `GET /service-accounts` (listing)
|
|
5
|
+
* - `DELETE /service-accounts/:id` (deletion; the controller responds with
|
|
6
|
+
* an inline literal, not a named DTO)
|
|
7
|
+
*
|
|
8
|
+
* Note: `GET /service-accounts/:id/api-tokens` does not exist as a route —
|
|
9
|
+
* only `POST /service-accounts/:id/api-tokens` (see `api_token.ts`).
|
|
10
|
+
*/
|
|
11
|
+
export type ServiceAccountSiteScope = number | "all" | "global";
|
|
12
|
+
export interface ServiceAccountRoleAssignment {
|
|
13
|
+
siteId: ServiceAccountSiteScope;
|
|
14
|
+
roleIds: number[];
|
|
15
|
+
}
|
|
16
|
+
export interface CreateServiceAccountRequest {
|
|
17
|
+
name: string;
|
|
18
|
+
description?: string | null;
|
|
19
|
+
roleAssignments: ServiceAccountRoleAssignment[];
|
|
20
|
+
}
|
|
21
|
+
export interface ServiceAccountResponseDTO {
|
|
22
|
+
id: number;
|
|
23
|
+
name: string;
|
|
24
|
+
username: string;
|
|
25
|
+
description: string | null;
|
|
26
|
+
dateCreated: string | null;
|
|
27
|
+
enabled: number;
|
|
28
|
+
memberType: string;
|
|
29
|
+
}
|
|
30
|
+
export interface DeleteServiceAccountResponse {
|
|
31
|
+
deleted: true;
|
|
32
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Public types for the service account endpoints:
|
|
4
|
+
* - `POST /service-accounts` (creation)
|
|
5
|
+
* - `GET /service-accounts` (listing)
|
|
6
|
+
* - `DELETE /service-accounts/:id` (deletion; the controller responds with
|
|
7
|
+
* an inline literal, not a named DTO)
|
|
8
|
+
*
|
|
9
|
+
* Note: `GET /service-accounts/:id/api-tokens` does not exist as a route —
|
|
10
|
+
* only `POST /service-accounts/:id/api-tokens` (see `api_token.ts`).
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
package/dist/common/index.d.ts
CHANGED
package/dist/common/index.js
CHANGED
|
@@ -16,3 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./pagination"), exports);
|
|
18
18
|
__exportStar(require("./export"), exports);
|
|
19
|
+
__exportStar(require("./uuid"), exports);
|
|
20
|
+
__exportStar(require("./success"), exports);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generic "no payload" success envelope. Several write endpoints across the
|
|
3
|
+
* API respond with just this literal when the operation succeeds and there
|
|
4
|
+
* is no natural resource to echo back (`HttpResponseHandler.ok` defaults to
|
|
5
|
+
* this shape when called without a `data` argument).
|
|
6
|
+
*/
|
|
7
|
+
export interface SuccessResponse {
|
|
8
|
+
code: 200;
|
|
9
|
+
message: "ok";
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type UUID = string;
|
package/dist/dataPack/index.d.ts
CHANGED
package/dist/dataPack/index.js
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type DataPackStatus = "activated" | "deactivated" | "all";
|
|
2
|
+
export interface DataPackCategory {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
}
|
|
6
|
+
export interface DataPackSiteActivation {
|
|
7
|
+
dataPackId: string;
|
|
8
|
+
config: string | null;
|
|
9
|
+
}
|
|
10
|
+
export interface DataPackDateRecord {
|
|
11
|
+
id: string;
|
|
12
|
+
created: string | null;
|
|
13
|
+
modified: string | null;
|
|
14
|
+
content: string | null;
|
|
15
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export type DomainStatus = "pending" | "ready" | "error";
|
|
2
|
+
interface BaseDomainDTO {
|
|
3
|
+
id?: number | null;
|
|
4
|
+
name?: string | null;
|
|
5
|
+
slug?: string | null;
|
|
6
|
+
url?: string | null;
|
|
7
|
+
assetsDomain?: string | null;
|
|
8
|
+
status?: DomainStatus | null;
|
|
9
|
+
errorMessage?: string | null;
|
|
10
|
+
enabled?: boolean | null;
|
|
11
|
+
createdAt?: Date | null;
|
|
12
|
+
updatedAt?: Date | null;
|
|
13
|
+
deletedAt?: Date | null;
|
|
14
|
+
}
|
|
15
|
+
export type DomainDTO = BaseDomainDTO;
|
|
16
|
+
export type DomainPostParamsDTO = {
|
|
17
|
+
url: string;
|
|
18
|
+
slug?: string | null;
|
|
19
|
+
};
|
|
20
|
+
export type DomainPutParamsDTO = Pick<BaseDomainDTO, "slug" | "assetsDomain" | "url">;
|
|
21
|
+
export interface DomainListItemDTO extends DomainDTO {
|
|
22
|
+
dryRun: boolean;
|
|
23
|
+
}
|
|
24
|
+
export type DomainPostResponseDTO = DomainDTO;
|
|
25
|
+
export type DomainGetResponseDTO = DomainDTO;
|
|
26
|
+
export type DomainListResponseDTO = DomainListItemDTO[];
|
|
27
|
+
export type DomainDeleteResponseDTO = DomainDTO;
|
|
28
|
+
export interface DomainSelectOptionDTO {
|
|
29
|
+
value: number;
|
|
30
|
+
label: string;
|
|
31
|
+
}
|
|
32
|
+
export type DomainSelectResponseDTO = DomainSelectOptionDTO[];
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public types for the `/domains` endpoint family.
|
|
3
|
+
*
|
|
4
|
+
* `DomainDTO`, `DomainListItemDTO` and the rest of the K8s-aware contract
|
|
5
|
+
* (status/enabled lifecycle, robots.txt DTOs) live in `./domains` and
|
|
6
|
+
* `./robots`. That is the shape produced by the `Domain` (singular)
|
|
7
|
+
* hexagonal slice, which is the functionally-dominant implementation
|
|
8
|
+
* (CRD reconciliation, soft-delete, `spec.enabled`).
|
|
9
|
+
*
|
|
10
|
+
* The types below are additive and specific to the `Domains` (plural)
|
|
11
|
+
* hexagonal slice, which does not (yet) consume `packages/api-types` for
|
|
12
|
+
* its own request/response shapes. They are kept here so nothing from
|
|
13
|
+
* that slice is lost; see the merge report for the Domain/Domains
|
|
14
|
+
* duplication follow-up.
|
|
15
|
+
*/
|
|
16
|
+
export * from "./domains";
|
|
17
|
+
export * from "./robots";
|
|
18
|
+
export interface DomainSelectOption {
|
|
19
|
+
value: number;
|
|
20
|
+
label: string | null;
|
|
21
|
+
}
|
|
22
|
+
export interface DomainRobotsPayload {
|
|
23
|
+
id: number;
|
|
24
|
+
path: string | null;
|
|
25
|
+
fullUrl: string | null;
|
|
26
|
+
content: string | null;
|
|
27
|
+
computedContent: string;
|
|
28
|
+
}
|
|
29
|
+
export interface PostDomainPayload {
|
|
30
|
+
url: string;
|
|
31
|
+
slug?: string | null;
|
|
32
|
+
assetsDomain?: string | null;
|
|
33
|
+
}
|
|
34
|
+
export interface PostRobotsPayload {
|
|
35
|
+
content: string;
|
|
36
|
+
}
|
|
37
|
+
export interface PostRobotsBulkPayload {
|
|
38
|
+
robots: Array<{
|
|
39
|
+
id: number;
|
|
40
|
+
content: string;
|
|
41
|
+
}>;
|
|
42
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
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
|
+
/**
|
|
18
|
+
* Public types for the `/domains` endpoint family.
|
|
19
|
+
*
|
|
20
|
+
* `DomainDTO`, `DomainListItemDTO` and the rest of the K8s-aware contract
|
|
21
|
+
* (status/enabled lifecycle, robots.txt DTOs) live in `./domains` and
|
|
22
|
+
* `./robots`. That is the shape produced by the `Domain` (singular)
|
|
23
|
+
* hexagonal slice, which is the functionally-dominant implementation
|
|
24
|
+
* (CRD reconciliation, soft-delete, `spec.enabled`).
|
|
25
|
+
*
|
|
26
|
+
* The types below are additive and specific to the `Domains` (plural)
|
|
27
|
+
* hexagonal slice, which does not (yet) consume `packages/api-types` for
|
|
28
|
+
* its own request/response shapes. They are kept here so nothing from
|
|
29
|
+
* that slice is lost; see the merge report for the Domain/Domains
|
|
30
|
+
* duplication follow-up.
|
|
31
|
+
*/
|
|
32
|
+
__exportStar(require("./domains"), exports);
|
|
33
|
+
__exportStar(require("./robots"), exports);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface RobotsDTO {
|
|
2
|
+
id: number;
|
|
3
|
+
path: string | null;
|
|
4
|
+
fullUrl: string | null;
|
|
5
|
+
/** Raw `robots` field stored in the `domains` row. */
|
|
6
|
+
content: string | null;
|
|
7
|
+
/**
|
|
8
|
+
* Dynamic robots.txt computed by composing `content` with per-site rules
|
|
9
|
+
* (Disallow for `hidden=1` sites, Sitemap for `showSitemapInRobots=1`).
|
|
10
|
+
* Built in `GetRobotsUsesCase` via `buildDynamicRobotsContent`.
|
|
11
|
+
*/
|
|
12
|
+
computedContent: string;
|
|
13
|
+
}
|
|
14
|
+
export type RobotsListResponseDTO = RobotsDTO[];
|
|
15
|
+
export type RobotsPutParamsDTO = {
|
|
16
|
+
content: string | null;
|
|
17
|
+
};
|
|
18
|
+
export interface RobotsBulkItemDTO {
|
|
19
|
+
id: number;
|
|
20
|
+
content: string | null;
|
|
21
|
+
}
|
|
22
|
+
export type RobotsBulkPutParamsDTO = {
|
|
23
|
+
robots: RobotsBulkItemDTO[];
|
|
24
|
+
};
|