@griddo/api-types 1.3.2 → 1.4.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/add-ons/index.d.ts +1 -1
- package/dist/ai/index.d.ts +1 -1
- package/dist/ai/index.js +1 -1
- package/dist/ai/search.d.ts +17 -0
- package/dist/analytics/index.d.ts +2 -2
- package/dist/analytics/index.js +2 -2
- package/dist/common/clientName.d.ts +16 -0
- package/dist/common/clientName.js +20 -0
- package/dist/common/export.d.ts +1 -1
- package/dist/common/index.d.ts +3 -2
- package/dist/common/index.js +3 -2
- package/dist/common/pagination.d.ts +1 -1
- package/dist/index.d.ts +25 -24
- package/dist/index.js +25 -24
- package/dist/pages/index.d.ts +2 -2
- package/dist/pages/index.js +2 -2
- package/dist/publicApi/ai.d.ts +9 -0
- package/dist/publicApi/ai.js +2 -0
- package/dist/publicApi/alert.d.ts +24 -0
- package/dist/publicApi/alert.js +2 -0
- package/dist/publicApi/calendar.d.ts +29 -0
- package/dist/publicApi/calendar.js +2 -0
- package/dist/publicApi/crm.d.ts +74 -0
- package/dist/publicApi/crm.js +2 -0
- package/dist/publicApi/feed.d.ts +9 -0
- package/dist/publicApi/feed.js +2 -0
- package/dist/publicApi/files.d.ts +16 -0
- package/dist/publicApi/files.js +8 -0
- package/dist/publicApi/filters.d.ts +7 -0
- package/dist/publicApi/filters.js +2 -0
- package/dist/publicApi/form.d.ts +28 -0
- package/dist/publicApi/form.js +2 -0
- package/dist/publicApi/geoip.d.ts +12 -0
- package/dist/publicApi/geoip.js +2 -0
- package/dist/publicApi/gpx.d.ts +60 -0
- package/dist/publicApi/gpx.js +2 -0
- package/dist/publicApi/index.d.ts +14 -0
- package/dist/publicApi/index.js +30 -0
- package/dist/publicApi/list.d.ts +50 -0
- package/dist/publicApi/list.js +2 -0
- package/dist/publicApi/page.d.ts +34 -0
- package/dist/publicApi/page.js +2 -0
- package/dist/publicApi/search.d.ts +7 -0
- package/dist/publicApi/search.js +2 -0
- package/dist/publicApi/socials.d.ts +44 -0
- package/dist/publicApi/socials.js +8 -0
- package/dist/redirects/index.d.ts +14 -3
- package/dist/schemas/index.d.ts +1 -1
- package/dist/schemas/index.js +1 -1
- package/dist/schemas/template.d.ts +1 -1
- package/dist/schemas/template.js +1 -1
- package/dist/settings/index.d.ts +1 -1
- package/dist/structuredData/categories.d.ts +1 -1
- package/dist/structuredData/content.d.ts +1 -1
- package/dist/structuredData/distributor.d.ts +2 -2
- package/dist/structuredData/index.d.ts +2 -2
- package/dist/structuredData/index.js +2 -2
- package/package.json +1 -1
package/dist/add-ons/index.d.ts
CHANGED
package/dist/ai/index.d.ts
CHANGED
package/dist/ai/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./search"), exports);
|
|
18
17
|
__exportStar(require("./answers"), exports);
|
|
19
18
|
__exportStar(require("./pages"), exports);
|
|
19
|
+
__exportStar(require("./search"), exports);
|
|
20
20
|
__exportStar(require("./summary"), exports);
|
package/dist/ai/search.d.ts
CHANGED
|
@@ -20,6 +20,13 @@ export interface PostAiSearchBody {
|
|
|
20
20
|
itemsPerPage?: number;
|
|
21
21
|
useStructuredData?: boolean;
|
|
22
22
|
fields?: string[];
|
|
23
|
+
/**
|
|
24
|
+
* Structured-data filters applied before scoring: `{ field: value | values }`.
|
|
25
|
+
* AND across fields, OR across the values of one field. Matching ignores case
|
|
26
|
+
* and accents and accepts partial matches; results missing the field are
|
|
27
|
+
* excluded.
|
|
28
|
+
*/
|
|
29
|
+
filters?: Record<string, string | string[]>;
|
|
23
30
|
}
|
|
24
31
|
/**
|
|
25
32
|
* A single AI search result, built from an indexed embedding and scored
|
|
@@ -37,6 +44,16 @@ export interface AiSearchResultItem {
|
|
|
37
44
|
image: string | null;
|
|
38
45
|
description: string | null;
|
|
39
46
|
template: string;
|
|
47
|
+
/**
|
|
48
|
+
* Relevance of the result to the query, always in [0, 1]:
|
|
49
|
+
* `0.8 * cosine + 0.2 * lexical coverage` (share of the query's words found
|
|
50
|
+
* as whole words in `title` + `description`).
|
|
51
|
+
*
|
|
52
|
+
* The cut-off (`minSimilarity`, or the automatic one when omitted) is applied
|
|
53
|
+
* to this value. `priorities` never changes it: they only reorder the results
|
|
54
|
+
* that pass the cut-off (by `similarity + priorities[template]`), so a result
|
|
55
|
+
* may appear ahead of another with a higher `similarity`.
|
|
56
|
+
*/
|
|
40
57
|
similarity: number;
|
|
41
58
|
content?: string;
|
|
42
59
|
structuredData?: Record<string, any> | string;
|
package/dist/analytics/index.js
CHANGED
|
@@ -14,6 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./script"), exports);
|
|
18
|
-
__exportStar(require("./groups"), exports);
|
|
19
17
|
__exportStar(require("./dimensions"), exports);
|
|
18
|
+
__exportStar(require("./groups"), exports);
|
|
19
|
+
__exportStar(require("./script"), exports);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public values for the `x-client-name` request header, which identifies the
|
|
3
|
+
* calling client. Read by the auth middlewares (`isAuth`, `apiTokenAuth`); a
|
|
4
|
+
* missing header is treated as `UNDEFINED`. Governs, among others, the QA render
|
|
5
|
+
* scope (`QA` clients only see/render QA content).
|
|
6
|
+
*/
|
|
7
|
+
export declare enum CLIENT_NAME {
|
|
8
|
+
SDK = "SDK",
|
|
9
|
+
AX = "AX",
|
|
10
|
+
QA = "QA",
|
|
11
|
+
CX = "CX",
|
|
12
|
+
APP = "APP",
|
|
13
|
+
LAMBDA = "LAMBDA",
|
|
14
|
+
PUBLIC_API = "PUBLIC_API",
|
|
15
|
+
UNDEFINED = "UNDEFINED"
|
|
16
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CLIENT_NAME = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Public values for the `x-client-name` request header, which identifies the
|
|
6
|
+
* calling client. Read by the auth middlewares (`isAuth`, `apiTokenAuth`); a
|
|
7
|
+
* missing header is treated as `UNDEFINED`. Governs, among others, the QA render
|
|
8
|
+
* scope (`QA` clients only see/render QA content).
|
|
9
|
+
*/
|
|
10
|
+
var CLIENT_NAME;
|
|
11
|
+
(function (CLIENT_NAME) {
|
|
12
|
+
CLIENT_NAME["SDK"] = "SDK";
|
|
13
|
+
CLIENT_NAME["AX"] = "AX";
|
|
14
|
+
CLIENT_NAME["QA"] = "QA";
|
|
15
|
+
CLIENT_NAME["CX"] = "CX";
|
|
16
|
+
CLIENT_NAME["APP"] = "APP";
|
|
17
|
+
CLIENT_NAME["LAMBDA"] = "LAMBDA";
|
|
18
|
+
CLIENT_NAME["PUBLIC_API"] = "PUBLIC_API";
|
|
19
|
+
CLIENT_NAME["UNDEFINED"] = "UNDEFINED";
|
|
20
|
+
})(CLIENT_NAME || (exports.CLIENT_NAME = CLIENT_NAME = {}));
|
package/dist/common/export.d.ts
CHANGED
package/dist/common/index.d.ts
CHANGED
package/dist/common/index.js
CHANGED
|
@@ -14,7 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./
|
|
17
|
+
__exportStar(require("./clientName"), exports);
|
|
18
18
|
__exportStar(require("./export"), exports);
|
|
19
|
-
__exportStar(require("./
|
|
19
|
+
__exportStar(require("./pagination"), exports);
|
|
20
20
|
__exportStar(require("./success"), exports);
|
|
21
|
+
__exportStar(require("./uuid"), exports);
|
|
@@ -2,7 +2,7 @@ export declare enum PaginationOrder {
|
|
|
2
2
|
ASC = "ASC",
|
|
3
3
|
DESC = "DESC"
|
|
4
4
|
}
|
|
5
|
-
export type PaginationRequest<TFilter
|
|
5
|
+
export type PaginationRequest<TFilter = {}> = {
|
|
6
6
|
page: number;
|
|
7
7
|
itemsPerPage: number;
|
|
8
8
|
order?: PaginationOrder | `${PaginationOrder}`;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,34 +1,35 @@
|
|
|
1
|
+
export * from "./add-ons";
|
|
2
|
+
export * from "./ai";
|
|
3
|
+
export * from "./analytics";
|
|
4
|
+
export * from "./apiTokens";
|
|
1
5
|
export * from "./common";
|
|
2
|
-
export * from "./logs";
|
|
3
|
-
export * from "./schemas";
|
|
4
6
|
export * from "./dataPack";
|
|
5
|
-
export * from "./site";
|
|
6
|
-
export * from "./redirects";
|
|
7
|
-
export * from "./add-ons";
|
|
8
|
-
export * from "./pages";
|
|
9
|
-
export * from "./structuredData";
|
|
10
|
-
export * from "./user";
|
|
11
|
-
export * from "./queue";
|
|
12
7
|
export * from "./domains";
|
|
13
|
-
export * from "./
|
|
14
|
-
export * from "./
|
|
15
|
-
export * from "./
|
|
8
|
+
export * from "./domains";
|
|
9
|
+
export * from "./feeds";
|
|
10
|
+
export * from "./files";
|
|
16
11
|
export * from "./form-categories";
|
|
17
12
|
export * from "./forms";
|
|
13
|
+
export * from "./images";
|
|
18
14
|
export * from "./instances";
|
|
15
|
+
export * from "./integrations";
|
|
16
|
+
export * from "./languages";
|
|
19
17
|
export * from "./liveStatus";
|
|
18
|
+
export * from "./logs";
|
|
19
|
+
export * from "./menus";
|
|
20
|
+
export * from "./navigation";
|
|
21
|
+
export * from "./pages";
|
|
20
22
|
export * from "./payables";
|
|
21
|
-
export * from "./
|
|
23
|
+
export * from "./publicApi";
|
|
24
|
+
export * from "./queue";
|
|
25
|
+
export * from "./redirects";
|
|
26
|
+
export * from "./render";
|
|
22
27
|
export * from "./roles";
|
|
23
|
-
export * from "./
|
|
24
|
-
export * from "./languages";
|
|
28
|
+
export * from "./schemas";
|
|
25
29
|
export * from "./search";
|
|
26
|
-
export * from "./
|
|
27
|
-
export * from "./
|
|
28
|
-
export * from "./
|
|
29
|
-
export * from "./
|
|
30
|
-
export * from "./
|
|
31
|
-
export * from "./
|
|
32
|
-
export * from "./images";
|
|
33
|
-
export * from "./integrations";
|
|
34
|
-
export * from "./analytics";
|
|
30
|
+
export * from "./settings";
|
|
31
|
+
export * from "./site";
|
|
32
|
+
export * from "./storage";
|
|
33
|
+
export * from "./structuredData";
|
|
34
|
+
export * from "./translations";
|
|
35
|
+
export * from "./user";
|
package/dist/index.js
CHANGED
|
@@ -14,37 +14,38 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./add-ons"), exports);
|
|
18
|
+
__exportStar(require("./ai"), exports);
|
|
19
|
+
__exportStar(require("./analytics"), exports);
|
|
20
|
+
__exportStar(require("./apiTokens"), exports);
|
|
17
21
|
__exportStar(require("./common"), exports);
|
|
18
|
-
__exportStar(require("./logs"), exports);
|
|
19
|
-
__exportStar(require("./schemas"), exports);
|
|
20
22
|
__exportStar(require("./dataPack"), exports);
|
|
21
|
-
__exportStar(require("./site"), exports);
|
|
22
|
-
__exportStar(require("./redirects"), exports);
|
|
23
|
-
__exportStar(require("./add-ons"), exports);
|
|
24
|
-
__exportStar(require("./pages"), exports);
|
|
25
|
-
__exportStar(require("./structuredData"), exports);
|
|
26
|
-
__exportStar(require("./user"), exports);
|
|
27
|
-
__exportStar(require("./queue"), exports);
|
|
28
23
|
__exportStar(require("./domains"), exports);
|
|
29
|
-
__exportStar(require("./
|
|
30
|
-
__exportStar(require("./
|
|
31
|
-
__exportStar(require("./
|
|
24
|
+
__exportStar(require("./domains"), exports);
|
|
25
|
+
__exportStar(require("./feeds"), exports);
|
|
26
|
+
__exportStar(require("./files"), exports);
|
|
32
27
|
__exportStar(require("./form-categories"), exports);
|
|
33
28
|
__exportStar(require("./forms"), exports);
|
|
29
|
+
__exportStar(require("./images"), exports);
|
|
34
30
|
__exportStar(require("./instances"), exports);
|
|
31
|
+
__exportStar(require("./integrations"), exports);
|
|
32
|
+
__exportStar(require("./languages"), exports);
|
|
35
33
|
__exportStar(require("./liveStatus"), exports);
|
|
34
|
+
__exportStar(require("./logs"), exports);
|
|
35
|
+
__exportStar(require("./menus"), exports);
|
|
36
|
+
__exportStar(require("./navigation"), exports);
|
|
37
|
+
__exportStar(require("./pages"), exports);
|
|
36
38
|
__exportStar(require("./payables"), exports);
|
|
37
|
-
__exportStar(require("./
|
|
39
|
+
__exportStar(require("./publicApi"), exports);
|
|
40
|
+
__exportStar(require("./queue"), exports);
|
|
41
|
+
__exportStar(require("./redirects"), exports);
|
|
42
|
+
__exportStar(require("./render"), exports);
|
|
38
43
|
__exportStar(require("./roles"), exports);
|
|
39
|
-
__exportStar(require("./
|
|
40
|
-
__exportStar(require("./languages"), exports);
|
|
44
|
+
__exportStar(require("./schemas"), exports);
|
|
41
45
|
__exportStar(require("./search"), exports);
|
|
42
|
-
__exportStar(require("./
|
|
43
|
-
__exportStar(require("./
|
|
44
|
-
__exportStar(require("./
|
|
45
|
-
__exportStar(require("./
|
|
46
|
-
__exportStar(require("./
|
|
47
|
-
__exportStar(require("./
|
|
48
|
-
__exportStar(require("./images"), exports);
|
|
49
|
-
__exportStar(require("./integrations"), exports);
|
|
50
|
-
__exportStar(require("./analytics"), exports);
|
|
46
|
+
__exportStar(require("./settings"), exports);
|
|
47
|
+
__exportStar(require("./site"), exports);
|
|
48
|
+
__exportStar(require("./storage"), exports);
|
|
49
|
+
__exportStar(require("./structuredData"), exports);
|
|
50
|
+
__exportStar(require("./translations"), exports);
|
|
51
|
+
__exportStar(require("./user"), exports);
|
package/dist/pages/index.d.ts
CHANGED
package/dist/pages/index.js
CHANGED
|
@@ -14,8 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./clear_corrupted_pages"), exports);
|
|
18
17
|
__exportStar(require("./add-ons"), exports);
|
|
19
|
-
__exportStar(require("./
|
|
18
|
+
__exportStar(require("./clear_corrupted_pages"), exports);
|
|
20
19
|
__exportStar(require("./llms"), exports);
|
|
20
|
+
__exportStar(require("./page_access_grants"), exports);
|
|
21
21
|
__exportStar(require("./preview_share"), exports);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public types for `POST /public/ai/search`, `POST /public/ai/answers` and `GET /public/ai/pages/related/*`.
|
|
3
|
+
*
|
|
4
|
+
* Same wire contract as `POST /ai/search`, `POST /ai/answers` and `POST /ai/pages/related` (`../ai`): aliased, not duplicated.
|
|
5
|
+
* The related-pages request has no body (its parameters travel as `key/value` path segments), so only the response is aliased.
|
|
6
|
+
*/
|
|
7
|
+
export type { PostAiAnswersBody as PostPublicAiAnswersBody, PostAiAnswersResponse as PostPublicAiAnswersResponse, } from "../ai/answers";
|
|
8
|
+
export type { PostAiPagesRelatedResponse as GetPublicAiPagesRelatedResponse } from "../ai/pages";
|
|
9
|
+
export type { PostAiSearchBody as PostPublicAiSearchBody, PostAiSearchResponse as PostPublicAiSearchResponse, } from "../ai/search";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { SuccessResponse } from "../common/success";
|
|
2
|
+
/**
|
|
3
|
+
* Public types for `POST /public/alert`.
|
|
4
|
+
*
|
|
5
|
+
* Same wire contract as `POST /alert` of the Public API: it stores an alert log and, for level `E` (or a truthy
|
|
6
|
+
* `instantNotification`), publishes it to SNS. Errors are a 400 `{ code, message }`.
|
|
7
|
+
*/
|
|
8
|
+
/** Body of `POST /public/alert`. */
|
|
9
|
+
export interface PostPublicAlertBody {
|
|
10
|
+
/** `I`, `W` or `E` (case-insensitive). Required. */
|
|
11
|
+
level: string;
|
|
12
|
+
/** Required. At most 45 characters in the database. */
|
|
13
|
+
area: string;
|
|
14
|
+
/** Required unless `fullData` is present. */
|
|
15
|
+
description?: string;
|
|
16
|
+
/** Required unless `description` is present. Only an object is stored in the log (a string travels to SNS only). */
|
|
17
|
+
fullData?: string | Record<string, unknown>;
|
|
18
|
+
/**
|
|
19
|
+
* Publish to SNS even when the level is not `E`. Defaults to `level === "E"` only when absent: any truthy value
|
|
20
|
+
* (even the string `"false"`) publishes. It is not stored in the log.
|
|
21
|
+
*/
|
|
22
|
+
instantNotification?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export type PostPublicAlertResponse = SuccessResponse;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { SuccessResponse } from "../common/success";
|
|
2
|
+
/**
|
|
3
|
+
* Public types for the `/public/calendar/*` endpoints.
|
|
4
|
+
*
|
|
5
|
+
* Same wire contract as `/calendar/*` of the Public API. A failure is a 400 `{ code, message }`; a Google response
|
|
6
|
+
* without the queried calendar is a 504 `{ code: 504, message }` (the Public API left the request hanging).
|
|
7
|
+
*/
|
|
8
|
+
/** Body of `POST /public/calendar/reservation`. All fields are validated in this order: mail, date, hour, name. */
|
|
9
|
+
export interface PostCalendarReservationBody {
|
|
10
|
+
/** `YYYY-MM-DD` (format only: `2026-13-45` passes the check and then fails creating the event). */
|
|
11
|
+
date: string;
|
|
12
|
+
/** `HH:MM:SS`. */
|
|
13
|
+
hour: string;
|
|
14
|
+
/** Event title and subject of the confirmation mail (optional). */
|
|
15
|
+
summary?: string;
|
|
16
|
+
/** Event description (`"undefined"` if missing). */
|
|
17
|
+
description?: string;
|
|
18
|
+
/** Letters, digits and `_-/`, spaces allowed, fewer than 50 characters. */
|
|
19
|
+
requestorName: string;
|
|
20
|
+
requestorMail: string;
|
|
21
|
+
}
|
|
22
|
+
/** Response of `POST /public/calendar/reservation`: `{ code: 200, message: "ok" }`. */
|
|
23
|
+
export type PostCalendarReservationResponse = SuccessResponse;
|
|
24
|
+
/**
|
|
25
|
+
* Response of `GET /public/calendar/freeslots/*`: the free hour slots (`"09:00 - 10:00"` … `"17:00 - 18:00"`) of every
|
|
26
|
+
* day that has at least one busy event, keyed by `YYYY-MM-DD`. When the Google query fails the Public API answers
|
|
27
|
+
* `{ code: 200, message: "ok" }` instead (the error is swallowed).
|
|
28
|
+
*/
|
|
29
|
+
export type GetCalendarFreeSlotsResponse = Record<string, string[]>;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { SuccessResponse } from "../common/success";
|
|
2
|
+
/**
|
|
3
|
+
* Public types for the `/public/crm/*` endpoints.
|
|
4
|
+
*
|
|
5
|
+
* Same wire contract as `/crm/*` of the Public API. A failure is a 400 `{ code, message }`.
|
|
6
|
+
*/
|
|
7
|
+
/** Response of `GET /public/crm/cognito/token`. */
|
|
8
|
+
export interface GetCognitoTokenResponse {
|
|
9
|
+
/** Value of the first `CognitoIdentityServiceProvider*.accessToken` cookie. */
|
|
10
|
+
cognitoToken: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Response of `GET /public/crm/melissa/:phone`: `{ code: 200, message: "ok" }` when the phone is accepted. A phone
|
|
14
|
+
* Melissa flags as bad (`PE__`) is a 400 `{ code: 400, message: "MELISSA_FAIL" }`.
|
|
15
|
+
*/
|
|
16
|
+
export type GetCrmMelissaResponse = SuccessResponse;
|
|
17
|
+
/** Body of `POST /public/crm/nbk`: the form fields, forwarded to Nubika as they come. Query: `?melissa=<phone>` validates the phone first. */
|
|
18
|
+
export type PostCrmNbkBody = Record<string, unknown>;
|
|
19
|
+
/**
|
|
20
|
+
* Response of `POST /public/crm/nbk` when the CRM accepts the form: whatever Nubika answered (`success` truthy) plus
|
|
21
|
+
* `disclaimer` (the CRM's, or `Response generated by the external CRM.`).
|
|
22
|
+
*/
|
|
23
|
+
export interface PostCrmNbkResponse {
|
|
24
|
+
success: unknown;
|
|
25
|
+
message?: string;
|
|
26
|
+
logs?: unknown;
|
|
27
|
+
requestParams?: unknown;
|
|
28
|
+
disclaimer: string;
|
|
29
|
+
[key: string]: unknown;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* `message` of the 400 `{ code, message }` of `POST /public/crm/nbk` when it is an object: the CRM rejected the form
|
|
33
|
+
* (`response` is its `message`) or Melissa flagged the phone (`{ response: "MELISSA_FAIL" }`, no other field). Other
|
|
34
|
+
* failures (incomplete configuration, connection failed) have a plain-text `message`.
|
|
35
|
+
*/
|
|
36
|
+
export interface PostCrmNbkRejection {
|
|
37
|
+
response?: string;
|
|
38
|
+
logs?: unknown;
|
|
39
|
+
requestParams?: unknown;
|
|
40
|
+
disclaimer?: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Response of `GET|POST /public/crm/dynamics/:path` and `PATCH /public/crm/dynamics/:path/:id`.
|
|
44
|
+
* `data` is the CRM's JSON for a GET; for a POST/PATCH it is the CRM's `statusText` (`"Created"`, `"No Content"`…) or,
|
|
45
|
+
* with a 200, `{ size: 0, timeout: 0 }` (what the Public API serialised from the node-fetch `Response`).
|
|
46
|
+
*/
|
|
47
|
+
export interface DynamicsPetitionResponse {
|
|
48
|
+
success: true;
|
|
49
|
+
data: unknown;
|
|
50
|
+
disclaimer: string;
|
|
51
|
+
}
|
|
52
|
+
/** Response of `POST /public/crm/dynamics/relation/:dataName/:dataId/:relationName/:relatedName/:relatedId`. */
|
|
53
|
+
export interface DynamicsRelationResponse {
|
|
54
|
+
success: true;
|
|
55
|
+
/** The CRM's `statusText`. */
|
|
56
|
+
message: string;
|
|
57
|
+
disclaimer: string;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* `message` of the 400 `{ code, message }` of every `/public/crm/dynamics/*` route: `{ success: false, message }`
|
|
61
|
+
* with a literal such as `Path <p> is not allowed for method <M>.`, `XML required for get.`, `Body required for post.`,
|
|
62
|
+
* `CRM Authentication failed.`, `CRM auth failed (code <c>): <m>` or `CRM connection failed (code <status>): <statusText>`.
|
|
63
|
+
*/
|
|
64
|
+
export interface DynamicsRejection {
|
|
65
|
+
success: false;
|
|
66
|
+
message?: string;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Body of `POST /public/crm/gsheets/:sheetIndex`: one row, as a flat object. Each key is a header of the sheet (the
|
|
70
|
+
* missing ones are appended to the header row, in order); an empty body is a 400 `Missing data`.
|
|
71
|
+
*/
|
|
72
|
+
export type PostCrmGsheetsBody = Record<string, unknown>;
|
|
73
|
+
/** Response of `POST /public/crm/gsheets/:sheetIndex`: `{ code: 200, message: "ok" }` once the row is appended. */
|
|
74
|
+
export type PostCrmGsheetsResponse = SuccessResponse;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { FeedDataCleanedContent } from "../feeds";
|
|
2
|
+
/**
|
|
3
|
+
* Public types for `GET /public/feed/:feed{/:format}`.
|
|
4
|
+
*
|
|
5
|
+
* With `format !== "rss"` (the default `json` and any other value) the body is only the `data` array of
|
|
6
|
+
* `GET /feeds/:slug/data/:format` (`GetFeedDataResponse` in `../feeds`), without `name`, `expirationMinutes` or
|
|
7
|
+
* `staleMinutes`. With `format === "rss"` the response is an `application/xml` document (a string), not JSON.
|
|
8
|
+
*/
|
|
9
|
+
export type GetPublicFeedResponse = FeedDataCleanedContent[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public types for `POST /public/files`.
|
|
3
|
+
*
|
|
4
|
+
* Same wire contract as `POST /files` of the Public API: it uploads a file received as a base64 dataURL to the
|
|
5
|
+
* configured bucket (not the DAM) under a uuid name and returns its public URL. A failure is a 400 `{ code, message }`.
|
|
6
|
+
*/
|
|
7
|
+
/** Body of `POST /public/files`. */
|
|
8
|
+
export interface PostPublicFilesBody {
|
|
9
|
+
/** `data:<type>;base64,<content>`. The object key is `[folder/]<uuid>.<subtype>`. */
|
|
10
|
+
content: string;
|
|
11
|
+
}
|
|
12
|
+
/** Response of `POST /public/files`. */
|
|
13
|
+
export interface PostPublicFilesResponse {
|
|
14
|
+
/** `<filesS3URL without a trailing slash>/<key>`. */
|
|
15
|
+
url: string;
|
|
16
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Public types for `POST /public/files`.
|
|
4
|
+
*
|
|
5
|
+
* Same wire contract as `POST /files` of the Public API: it uploads a file received as a base64 dataURL to the
|
|
6
|
+
* configured bucket (not the DAM) under a uuid name and returns its public URL. A failure is a 400 `{ code, message }`.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public types for `GET /public/filters/:structuredData/site/:site/lang/:lang/...`.
|
|
3
|
+
*
|
|
4
|
+
* Same wire contract as `GET /site/:site/structured_data/filters/:structuredData`
|
|
5
|
+
* (`../structuredData/distributor`): one group of filter values per filter field. Aliased, not duplicated.
|
|
6
|
+
*/
|
|
7
|
+
export type { GetStructuredDataFiltersResponse as GetPublicFiltersResponse } from "../structuredData/distributor";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { SuccessResponse } from "../common/success";
|
|
2
|
+
/**
|
|
3
|
+
* Public types for `POST /public/form`.
|
|
4
|
+
*
|
|
5
|
+
* Same wire contract as `POST /form` of the Public API: it saves the form log, validates the recipient and sends the
|
|
6
|
+
* form by mail (`key: value` body, Griddo logo inline, dataURL attachments). A failure is a 400 `{ code, message }`
|
|
7
|
+
* and also raises an `E`/`FORM` alert.
|
|
8
|
+
*/
|
|
9
|
+
/** One attachment of the form: `content` may be a `data:<type>;base64,<content>` URL or plain base64. */
|
|
10
|
+
export interface PublicFormAttachment {
|
|
11
|
+
filename?: string;
|
|
12
|
+
contentType?: string;
|
|
13
|
+
content: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Body of `POST /public/form`. Besides `to`, `subject` and `attachments`, any other key is a form field and
|
|
17
|
+
* ends up in the mail body as `key: value` (values are stringified and inserted unescaped).
|
|
18
|
+
*/
|
|
19
|
+
export interface PostPublicFormBody {
|
|
20
|
+
/** Single recipient; required and valid, or the request is a 400. */
|
|
21
|
+
to: string;
|
|
22
|
+
/** Defaults to `No subject` only when absent. */
|
|
23
|
+
subject?: string;
|
|
24
|
+
/** Ignored if it is not an array. */
|
|
25
|
+
attachments?: PublicFormAttachment[];
|
|
26
|
+
[field: string]: unknown;
|
|
27
|
+
}
|
|
28
|
+
export type PostPublicFormResponse = SuccessResponse;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public types for `GET /public/geoip/country`.
|
|
3
|
+
*
|
|
4
|
+
* Country and IP of the visitor, resolved from the CDN headers (CloudFront, CloudFlare, Akamai) and
|
|
5
|
+
* `x-forwarded-for`. Same contract as `GET /geoip/country` of the Public API.
|
|
6
|
+
*/
|
|
7
|
+
export interface GetPublicGeoipCountryResponse {
|
|
8
|
+
/** Country as sent by the CDN (not validated or normalized), or `"XX"` when no header carries one. */
|
|
9
|
+
country: string;
|
|
10
|
+
/** First `x-forwarded-for` entry, or the socket address. Omitted from the JSON if neither exists. */
|
|
11
|
+
ip?: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { PostAiSearchResponse } from "../ai/search";
|
|
2
|
+
import type { SuccessResponse } from "../common/success";
|
|
3
|
+
/**
|
|
4
|
+
* Public types for `POST /public/gpx/collect`, `GET /public/gpx/profile/areas/:areas/id/:id` and
|
|
5
|
+
* `POST /public/gpx/pages`.
|
|
6
|
+
*
|
|
7
|
+
* Same wire contract as `POST /gpx/collect`, `GET /gpx/profile/:areas/:id` and `POST /gpx/pages` of the private API,
|
|
8
|
+
* except that every error is a 400 `{ code, message }` (the Public API ignored the private status in this family) and
|
|
9
|
+
* the visitor's country is derived only from the headers the Public API forwarded.
|
|
10
|
+
*/
|
|
11
|
+
/** One interest of the visitor, as sent by `POST /public/gpx/collect`. */
|
|
12
|
+
export interface PublicGpxInterest {
|
|
13
|
+
area: string;
|
|
14
|
+
interest: {
|
|
15
|
+
id?: string;
|
|
16
|
+
label: string;
|
|
17
|
+
};
|
|
18
|
+
/** Positive. */
|
|
19
|
+
weight: number;
|
|
20
|
+
}
|
|
21
|
+
/** Body of `POST /public/gpx/collect`. `countryISO`, if sent, is discarded: the country comes from the headers. */
|
|
22
|
+
export interface PostPublicGpxCollectBody {
|
|
23
|
+
/** Visitor UUID. */
|
|
24
|
+
id: string;
|
|
25
|
+
navigator: {
|
|
26
|
+
language: string;
|
|
27
|
+
userAgent: string;
|
|
28
|
+
};
|
|
29
|
+
interests: PublicGpxInterest[];
|
|
30
|
+
}
|
|
31
|
+
export type PostPublicGpxCollectResponse = SuccessResponse;
|
|
32
|
+
/** Interests of the profile, grouped by the requested areas (areas without interests are omitted). */
|
|
33
|
+
export type GetPublicGpxProfileResponse = Record<string, {
|
|
34
|
+
interest: {
|
|
35
|
+
id?: string;
|
|
36
|
+
label: string;
|
|
37
|
+
};
|
|
38
|
+
weight: number;
|
|
39
|
+
updated_at?: string;
|
|
40
|
+
}[]>;
|
|
41
|
+
/** Body of `POST /public/gpx/pages`. */
|
|
42
|
+
export interface PostPublicGpxPagesBody {
|
|
43
|
+
/** Visitor UUID; without it (or without a profile) only `prompt` / `pageId` drive the search. */
|
|
44
|
+
id?: string;
|
|
45
|
+
/** At least one template. */
|
|
46
|
+
templates: string[];
|
|
47
|
+
/** Positive integer language id. */
|
|
48
|
+
language: number;
|
|
49
|
+
useStructuredData: boolean;
|
|
50
|
+
/** Positive integer: number of items to return. */
|
|
51
|
+
limit: number;
|
|
52
|
+
/** Non-empty area (trimmed) whose profile interests feed the query. */
|
|
53
|
+
area: string;
|
|
54
|
+
pageId?: number;
|
|
55
|
+
sites?: number[];
|
|
56
|
+
prompt?: string;
|
|
57
|
+
fields?: string[];
|
|
58
|
+
}
|
|
59
|
+
/** Same page of results as `POST /ai/search` (always the first page, `limit` items). */
|
|
60
|
+
export type PostPublicGpxPagesResponse = PostAiSearchResponse;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from "./ai";
|
|
2
|
+
export * from "./alert";
|
|
3
|
+
export * from "./calendar";
|
|
4
|
+
export * from "./crm";
|
|
5
|
+
export * from "./feed";
|
|
6
|
+
export * from "./files";
|
|
7
|
+
export * from "./filters";
|
|
8
|
+
export * from "./form";
|
|
9
|
+
export * from "./geoip";
|
|
10
|
+
export * from "./gpx";
|
|
11
|
+
export * from "./list";
|
|
12
|
+
export * from "./page";
|
|
13
|
+
export * from "./search";
|
|
14
|
+
export * from "./socials";
|
|
@@ -0,0 +1,30 @@
|
|
|
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("./ai"), exports);
|
|
18
|
+
__exportStar(require("./alert"), exports);
|
|
19
|
+
__exportStar(require("./calendar"), exports);
|
|
20
|
+
__exportStar(require("./crm"), exports);
|
|
21
|
+
__exportStar(require("./feed"), exports);
|
|
22
|
+
__exportStar(require("./files"), exports);
|
|
23
|
+
__exportStar(require("./filters"), exports);
|
|
24
|
+
__exportStar(require("./form"), exports);
|
|
25
|
+
__exportStar(require("./geoip"), exports);
|
|
26
|
+
__exportStar(require("./gpx"), exports);
|
|
27
|
+
__exportStar(require("./list"), exports);
|
|
28
|
+
__exportStar(require("./page"), exports);
|
|
29
|
+
__exportStar(require("./search"), exports);
|
|
30
|
+
__exportStar(require("./socials"), exports);
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { DataLanguage, GetStructuredDataContentBulkResponse } from "../structuredData/content";
|
|
2
|
+
import type { PostDistributorContentResponse } from "../structuredData/distributor";
|
|
3
|
+
/**
|
|
4
|
+
* Public types for `GET /public/list/fixed/:fixed/site/:site/lang/:lang/...`.
|
|
5
|
+
*
|
|
6
|
+
* Same envelope as `GET /site/:site/structured_data_content/bulk/:ids` (`{ page, totalItems, items }`) but each item is
|
|
7
|
+
* the flattened public shape `{ id, url, urlCanonical, ...content, relatedPage? }` (optionally projected with `get`),
|
|
8
|
+
* so `items` is a list of free-form records. `totalItems` is the private total, not discounted by hidden drafts.
|
|
9
|
+
*/
|
|
10
|
+
export type GetPublicListFixedResponse = Omit<GetStructuredDataContentBulkResponse, "items"> & {
|
|
11
|
+
items: Record<string, unknown>[];
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Public types for `GET /public/list/navigations/reference/:id/site/:site/lang/:lang/...`.
|
|
15
|
+
*
|
|
16
|
+
* Returns the body of `POST /site/:site/distributor` in `navigation` mode without reshaping it.
|
|
17
|
+
*/
|
|
18
|
+
export type GetPublicListNavigationsResponse = PostDistributorContentResponse;
|
|
19
|
+
/**
|
|
20
|
+
* Public types for `GET /public/list/:type/site/:site/lang/:lang/...` (v1).
|
|
21
|
+
*
|
|
22
|
+
* `{ page, totalItems, items }` where each item is the flattened shape `{ id, ...content, url }` (no `urlCanonical`,
|
|
23
|
+
* optionally projected with `get`). Inherited behaviour: the distributor ignores the legacy `source` key the public API
|
|
24
|
+
* sends, so in practice this endpoint answers `400` (or `200 { totalItems: null, items: [] }` with a valid `maxItems`).
|
|
25
|
+
*/
|
|
26
|
+
export type GetPublicListResponse = {
|
|
27
|
+
page: number;
|
|
28
|
+
totalItems: number;
|
|
29
|
+
items: Record<string, unknown>[];
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Public types for `GET /public/list/v2/:type/site/:site/lang/:lang/...` (v2).
|
|
33
|
+
*
|
|
34
|
+
* `{ page, totalItems, items }` where `page` is `Number(page)` of the URL (`null` if it was not numeric) and each item is
|
|
35
|
+
* `{ id, ...content, dataLanguages, url, urlCanonical }` (optionally projected with `get`). `dataLanguages` only lists the
|
|
36
|
+
* publishable language versions. With `groupingCategories=on` each item also carries `type` and `children`.
|
|
37
|
+
*/
|
|
38
|
+
export type GetPublicListV2Response = {
|
|
39
|
+
page: number | null;
|
|
40
|
+
totalItems: number;
|
|
41
|
+
items: PublicListV2Item[];
|
|
42
|
+
};
|
|
43
|
+
export type PublicListV2Item = Record<string, unknown> & {
|
|
44
|
+
id?: number;
|
|
45
|
+
dataLanguages?: DataLanguage[];
|
|
46
|
+
url?: string;
|
|
47
|
+
urlCanonical?: string;
|
|
48
|
+
type?: string;
|
|
49
|
+
children?: PublicListV2Item[];
|
|
50
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public types for `GET /public/page/:id/preview/:entity`.
|
|
3
|
+
*
|
|
4
|
+
* The body is the shared page as returned by `GET /page/:id/preview` (the draft if there is one), plus the fields the
|
|
5
|
+
* endpoint composes, which win over any field of the same name in the page. Only the fields the composition reads
|
|
6
|
+
* are typed; the rest of the page passes through untouched.
|
|
7
|
+
*/
|
|
8
|
+
export interface GetPublicPagePreviewResponse {
|
|
9
|
+
id: number;
|
|
10
|
+
entity: string;
|
|
11
|
+
site?: number | null;
|
|
12
|
+
canonicalSite?: number | null;
|
|
13
|
+
language: number;
|
|
14
|
+
header?: number | null;
|
|
15
|
+
footer?: number | null;
|
|
16
|
+
/** `cloudinaryName` of `GET /settings` (absent when the instance has none). */
|
|
17
|
+
cloudinaryName?: string | null;
|
|
18
|
+
/** Always the fixed development domain `https://images.dev.griddo.io` (inherited behaviour, not configurable). */
|
|
19
|
+
damDomain: string;
|
|
20
|
+
siteInfo: {
|
|
21
|
+
siteId: number;
|
|
22
|
+
name: string;
|
|
23
|
+
theme: string | null;
|
|
24
|
+
/** `items` of `GET /site/:site/languages`. */
|
|
25
|
+
siteLanguages: unknown[];
|
|
26
|
+
socials?: unknown;
|
|
27
|
+
};
|
|
28
|
+
/** Header navigation of the page (its own, or the site default); `null` when it does not exist. */
|
|
29
|
+
headerContent: Record<string, unknown> | null;
|
|
30
|
+
/** Footer navigation of the page (its own, or the site default); `null` when it does not exist. */
|
|
31
|
+
footerContent: Record<string, unknown> | null;
|
|
32
|
+
/** The rest of the page passes through intact. */
|
|
33
|
+
[key: string]: unknown;
|
|
34
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public types for `GET /public/search`.
|
|
3
|
+
*
|
|
4
|
+
* Same wire contract as `GET /search` (`../search`): `[]` when `searchquery` is missing or blank, otherwise a
|
|
5
|
+
* paginated `{ items, page, totalItems }`. Aliased, not duplicated.
|
|
6
|
+
*/
|
|
7
|
+
export type { GetSearchResponse as GetPublicSearchResponse } from "../search";
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public types for the `/public/youtube/*` and `/public/rrss/*` endpoints.
|
|
3
|
+
*
|
|
4
|
+
* Same wire contract as the Public API. A network failure, a timeout or a body that is not JSON is a 400
|
|
5
|
+
* `{ code, message }` with `Cache-Control: no-store`.
|
|
6
|
+
*/
|
|
7
|
+
import type { SuccessResponse } from "../common/success";
|
|
8
|
+
/**
|
|
9
|
+
* Response of `GET /public/youtube/playlist/:playlist/:quantity`: the JSON of YouTube's `playlistItems` as it comes.
|
|
10
|
+
* The HTTP status of Google is **not** checked: an error JSON (`{ error: { code: 403, … } }`) is returned as a 200.
|
|
11
|
+
*/
|
|
12
|
+
export type GetYoutubePlaylistResponse = Record<string, unknown> | unknown[] | null;
|
|
13
|
+
/**
|
|
14
|
+
* Body of `POST /public/rrss/socials/:socials` (`:socials` is `twitter`, `instagram` or `youtube`). `numPosts` must be a
|
|
15
|
+
* JSON number (a string or `0` is a 400); Twitter accepts 5 to 100. Query: `?order=<field>-<ASC|DESC>` (`date` is the
|
|
16
|
+
* date field; only the exact `ASC` sorts ascending).
|
|
17
|
+
*/
|
|
18
|
+
export interface PostSocialsFeedBody {
|
|
19
|
+
numPosts: number;
|
|
20
|
+
/** A key of the account map of the network (`iebusiness`, `ieuniversity`…); ignored by Instagram. */
|
|
21
|
+
accountName: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Response of `POST /public/rrss/socials/:socials`: the feed items of the network, each with `from` (a date) and a
|
|
25
|
+
* `label` (`tw`, `yt` or `ig`). A Twitter tweet carries the fields of the first user of the response (its `id` replaces
|
|
26
|
+
* the tweet's, which stays in `tweetID`) and never a `media` field. Instagram always ends in a 400 through this
|
|
27
|
+
* endpoint (inherited bug B4: the account looked up is `numPosts`).
|
|
28
|
+
*/
|
|
29
|
+
export type PostSocialsFeedResponse = Array<Record<string, unknown> & {
|
|
30
|
+
from: string | null;
|
|
31
|
+
label: "tw" | "yt" | "ig";
|
|
32
|
+
}>;
|
|
33
|
+
/**
|
|
34
|
+
* Response of `GET /public/rrss/socials/instagram/auth/redirect?code=<code>`: the long-lived token is exchanged and
|
|
35
|
+
* stored encrypted, and the body is the default success envelope (`{ code: 200, message: "ok" }`) with the success
|
|
36
|
+
* cache. Any failure (Instagram, network, timeout, the token store, missing configuration) is a 400 `{ code, message }`
|
|
37
|
+
* with `Cache-Control: no-store`.
|
|
38
|
+
*
|
|
39
|
+
* `GET /public/rrss/socials/instagram/auth/join` has no payload: it is a 302 to Instagram's authorization page, with
|
|
40
|
+
* `redirect_uri=https://<Host>/rrss/socials/instagram/auth/redirect` (no `/public` prefix, not encoded). The four stubs
|
|
41
|
+
* `privacy`, `delete_user_data`, `cancel` and `delete` answer 200 with `Content-Type: application/json` and the literal
|
|
42
|
+
* body `ok` (not valid JSON). Every route is `GET` only; any other method is a 404.
|
|
43
|
+
*/
|
|
44
|
+
export type GetInstagramAuthRedirectResponse = SuccessResponse;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Public types for the `/public/youtube/*` and `/public/rrss/*` endpoints.
|
|
4
|
+
*
|
|
5
|
+
* Same wire contract as the Public API. A network failure, a timeout or a body that is not JSON is a 400
|
|
6
|
+
* `{ code, message }` with `Cache-Control: no-store`.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Código de estado con el que se responde a una redirección: `"301"`
|
|
3
|
+
* (permanente) o `"302"` (temporal).
|
|
4
|
+
*
|
|
5
|
+
* Es un string y no un number a propósito: el consumidor final es una
|
|
6
|
+
* cabecera HTTP, y es la forma en la que el admin lo envía y lo pinta. En las
|
|
7
|
+
* respuestas del listado el campo viene siempre informado.
|
|
8
|
+
*/
|
|
9
|
+
export type RedirectType = "301" | "302";
|
|
1
10
|
export interface RedirectDTO {
|
|
2
11
|
pageId: number;
|
|
3
12
|
siteId: number;
|
|
@@ -21,6 +30,7 @@ export interface RedirectListItem {
|
|
|
21
30
|
site: RedirectSiteInfo;
|
|
22
31
|
from: string;
|
|
23
32
|
to: RedirectDestinationInfo;
|
|
33
|
+
type: RedirectType;
|
|
24
34
|
}
|
|
25
35
|
export interface RedirectListResponse {
|
|
26
36
|
totalItems: number;
|
|
@@ -30,11 +40,12 @@ export interface RedirectListResponse {
|
|
|
30
40
|
export interface RedirectBulkInput {
|
|
31
41
|
from?: string;
|
|
32
42
|
to?: string | number;
|
|
43
|
+
type?: RedirectType;
|
|
33
44
|
id?: number | string | null;
|
|
34
45
|
}
|
|
35
46
|
export interface RedirectBulkResult {
|
|
36
47
|
total: number;
|
|
37
|
-
error:
|
|
38
|
-
existing:
|
|
39
|
-
ok:
|
|
48
|
+
error: Record<string, unknown>[];
|
|
49
|
+
existing: Record<string, unknown>[];
|
|
50
|
+
ok: Record<string, unknown>[];
|
|
40
51
|
}
|
package/dist/schemas/index.d.ts
CHANGED
package/dist/schemas/index.js
CHANGED
|
@@ -14,6 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./select"), exports);
|
|
18
17
|
__exportStar(require("./schemas"), exports);
|
|
18
|
+
__exportStar(require("./select"), exports);
|
|
19
19
|
__exportStar(require("./version"), exports);
|
|
@@ -20,4 +20,4 @@ declare enum TemplateSpecialTypeEnum {
|
|
|
20
20
|
NOT_FOUND = "404",
|
|
21
21
|
SITEMAP = "sitemap"
|
|
22
22
|
}
|
|
23
|
-
export {
|
|
23
|
+
export { TemplateBasicTypeEnum, TemplateModeTypeEnum, TemplateSpecialTypeEnum, TemplateTypeKeyEnum, };
|
package/dist/schemas/template.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.TemplateTypeKeyEnum = exports.TemplateSpecialTypeEnum = exports.TemplateModeTypeEnum = exports.TemplateBasicTypeEnum = void 0;
|
|
4
4
|
var TemplateTypeKeyEnum;
|
|
5
5
|
(function (TemplateTypeKeyEnum) {
|
|
6
6
|
TemplateTypeKeyEnum["LABEL"] = "label";
|
package/dist/settings/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* for things like `allowedUsersToCRUD`). The exact list of keys is
|
|
7
7
|
* data-driven so the type is kept loose on purpose.
|
|
8
8
|
*/
|
|
9
|
-
export type SettingValue = string | number | boolean | Record<string, unknown> |
|
|
9
|
+
export type SettingValue = string | number | boolean | Record<string, unknown> | unknown[] | null;
|
|
10
10
|
export type GetGlobalSettingsResponse = Record<string, SettingValue> & {
|
|
11
11
|
cloudinaryName?: string | null;
|
|
12
12
|
apiVersion?: string;
|
|
@@ -98,7 +98,7 @@ export interface UpsertStructuredDataContentBody {
|
|
|
98
98
|
entity?: string | null;
|
|
99
99
|
content?: Record<string, unknown>;
|
|
100
100
|
draft?: boolean | number | string;
|
|
101
|
-
language?: number | string;
|
|
101
|
+
language?: number | string | null;
|
|
102
102
|
originalLanguage?: unknown;
|
|
103
103
|
canBeTranslated?: boolean | number | string;
|
|
104
104
|
publicationScheduled?: unknown;
|
|
@@ -23,8 +23,8 @@ export interface DistributorItem {
|
|
|
23
23
|
* typed explicitly, the rest passes through untouched.
|
|
24
24
|
*/
|
|
25
25
|
export interface PostDistributorContentBody {
|
|
26
|
-
site?: string | number;
|
|
27
|
-
language?: string | number;
|
|
26
|
+
site?: string | number | null;
|
|
27
|
+
language?: string | number | null;
|
|
28
28
|
mode?: "auto" | "manual" | "navigation" | string;
|
|
29
29
|
sources?: unknown[];
|
|
30
30
|
order?: unknown;
|
|
@@ -15,7 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./access_grants"), exports);
|
|
18
|
-
__exportStar(require("./content"), exports);
|
|
19
|
-
__exportStar(require("./types"), exports);
|
|
20
18
|
__exportStar(require("./categories"), exports);
|
|
19
|
+
__exportStar(require("./content"), exports);
|
|
21
20
|
__exportStar(require("./distributor"), exports);
|
|
21
|
+
__exportStar(require("./types"), exports);
|