griddo-sdk 2.0.2 → 2.0.3
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/index.js +38 -38
- package/package.json +1 -1
- package/dist/SDKBuilder.d.ts +0 -14
- package/dist/SDKBuilder.d.ts.map +0 -1
- package/dist/adapters/PLimitConcurrencyLimiter.d.ts +0 -27
- package/dist/adapters/PLimitConcurrencyLimiter.d.ts.map +0 -1
- package/dist/clients/FetchHttpClient.d.ts +0 -11
- package/dist/clients/FetchHttpClient.d.ts.map +0 -1
- package/dist/clients/NodeFetchHttpClient.d.ts +0 -11
- package/dist/clients/NodeFetchHttpClient.d.ts.map +0 -1
- package/dist/clients/UndiciHttpClient.d.ts +0 -13
- package/dist/clients/UndiciHttpClient.d.ts.map +0 -1
- package/dist/clients/decorators/HttpClientErrorHandler.d.ts +0 -12
- package/dist/clients/decorators/HttpClientErrorHandler.d.ts.map +0 -1
- package/dist/clients/decorators/HttpClientLogger.d.ts +0 -13
- package/dist/clients/decorators/HttpClientLogger.d.ts.map +0 -1
- package/dist/clients/decorators/HttpClientRetry.d.ts +0 -17
- package/dist/clients/decorators/HttpClientRetry.d.ts.map +0 -1
- package/dist/clients/decorators/HttpClientWithTimeout.d.ts +0 -13
- package/dist/clients/decorators/HttpClientWithTimeout.d.ts.map +0 -1
- package/dist/config/Environment.d.ts +0 -9
- package/dist/config/Environment.d.ts.map +0 -1
- package/dist/exception/AlertException.d.ts +0 -49
- package/dist/exception/AlertException.d.ts.map +0 -1
- package/dist/exception/ApiException.d.ts +0 -75
- package/dist/exception/ApiException.d.ts.map +0 -1
- package/dist/exception/AuthException.d.ts +0 -39
- package/dist/exception/AuthException.d.ts.map +0 -1
- package/dist/exception/BaseException.d.ts +0 -8
- package/dist/exception/BaseException.d.ts.map +0 -1
- package/dist/exception/ConfigException.d.ts +0 -37
- package/dist/exception/ConfigException.d.ts.map +0 -1
- package/dist/exception/CustomException.d.ts +0 -22
- package/dist/exception/CustomException.d.ts.map +0 -1
- package/dist/exception/ErrorHandlingExceptions.d.ts +0 -21
- package/dist/exception/ErrorHandlingExceptions.d.ts.map +0 -1
- package/dist/exception/ImageException.d.ts +0 -111
- package/dist/exception/ImageException.d.ts.map +0 -1
- package/dist/exception/LanguageException.d.ts +0 -51
- package/dist/exception/LanguageException.d.ts.map +0 -1
- package/dist/exception/LiveStatusException.d.ts +0 -51
- package/dist/exception/LiveStatusException.d.ts.map +0 -1
- package/dist/exception/LoggingException.d.ts +0 -39
- package/dist/exception/LoggingException.d.ts.map +0 -1
- package/dist/exception/PageException.d.ts +0 -111
- package/dist/exception/PageException.d.ts.map +0 -1
- package/dist/exception/StructuredDataException.d.ts +0 -99
- package/dist/exception/StructuredDataException.d.ts.map +0 -1
- package/dist/exception/ValidationException.d.ts +0 -51
- package/dist/exception/ValidationException.d.ts.map +0 -1
- package/dist/exception/index.d.ts +0 -13
- package/dist/exception/index.d.ts.map +0 -1
- package/dist/facades/AlertFacade.d.ts +0 -24
- package/dist/facades/AlertFacade.d.ts.map +0 -1
- package/dist/facades/AuthFacade.d.ts +0 -36
- package/dist/facades/AuthFacade.d.ts.map +0 -1
- package/dist/facades/ImageFacade.d.ts +0 -107
- package/dist/facades/ImageFacade.d.ts.map +0 -1
- package/dist/facades/LanguageFacade.d.ts +0 -44
- package/dist/facades/LanguageFacade.d.ts.map +0 -1
- package/dist/facades/LiveStatusFacade.d.ts +0 -59
- package/dist/facades/LiveStatusFacade.d.ts.map +0 -1
- package/dist/facades/PageFacade.d.ts +0 -82
- package/dist/facades/PageFacade.d.ts.map +0 -1
- package/dist/facades/StructuredDataFacade.d.ts +0 -47
- package/dist/facades/StructuredDataFacade.d.ts.map +0 -1
- package/dist/factories/HttpClientFactory.d.ts +0 -13
- package/dist/factories/HttpClientFactory.d.ts.map +0 -1
- package/dist/factories/LoggerFactory.d.ts +0 -13
- package/dist/factories/LoggerFactory.d.ts.map +0 -1
- package/dist/factories/ServiceFactory.d.ts +0 -105
- package/dist/factories/ServiceFactory.d.ts.map +0 -1
- package/dist/index.d.ts +0 -41
- package/dist/index.d.ts.map +0 -1
- package/dist/interfaces/Alert.d.ts +0 -25
- package/dist/interfaces/Alert.d.ts.map +0 -1
- package/dist/interfaces/Api.d.ts +0 -36
- package/dist/interfaces/Api.d.ts.map +0 -1
- package/dist/interfaces/Auth.d.ts +0 -17
- package/dist/interfaces/Auth.d.ts.map +0 -1
- package/dist/interfaces/ConcurrencyLimiter.d.ts +0 -18
- package/dist/interfaces/ConcurrencyLimiter.d.ts.map +0 -1
- package/dist/interfaces/Config.d.ts +0 -24
- package/dist/interfaces/Config.d.ts.map +0 -1
- package/dist/interfaces/EnvironmentManager.d.ts +0 -12
- package/dist/interfaces/EnvironmentManager.d.ts.map +0 -1
- package/dist/interfaces/ErrorHandling.d.ts +0 -22
- package/dist/interfaces/ErrorHandling.d.ts.map +0 -1
- package/dist/interfaces/GriddoSDK.d.ts +0 -47
- package/dist/interfaces/GriddoSDK.d.ts.map +0 -1
- package/dist/interfaces/HttpClient.d.ts +0 -49
- package/dist/interfaces/HttpClient.d.ts.map +0 -1
- package/dist/interfaces/ImageManager.d.ts +0 -74
- package/dist/interfaces/ImageManager.d.ts.map +0 -1
- package/dist/interfaces/LanguageManager.d.ts +0 -17
- package/dist/interfaces/LanguageManager.d.ts.map +0 -1
- package/dist/interfaces/LiveStatusManager.d.ts +0 -17
- package/dist/interfaces/LiveStatusManager.d.ts.map +0 -1
- package/dist/interfaces/Logger.d.ts +0 -31
- package/dist/interfaces/Logger.d.ts.map +0 -1
- package/dist/interfaces/PageUpdateHelpers.d.ts +0 -17
- package/dist/interfaces/PageUpdateHelpers.d.ts.map +0 -1
- package/dist/interfaces/Pageable.d.ts +0 -64
- package/dist/interfaces/Pageable.d.ts.map +0 -1
- package/dist/interfaces/StructuredData.d.ts +0 -48
- package/dist/interfaces/StructuredData.d.ts.map +0 -1
- package/dist/sdk.d.ts +0 -497
- package/dist/sdk.d.ts.map +0 -1
- package/dist/services/AlertService.d.ts +0 -10
- package/dist/services/AlertService.d.ts.map +0 -1
- package/dist/services/ApiService.d.ts +0 -15
- package/dist/services/ApiService.d.ts.map +0 -1
- package/dist/services/AuthService.d.ts +0 -10
- package/dist/services/AuthService.d.ts.map +0 -1
- package/dist/services/ConfigService.d.ts +0 -9
- package/dist/services/ConfigService.d.ts.map +0 -1
- package/dist/services/ImageService.d.ts +0 -33
- package/dist/services/ImageService.d.ts.map +0 -1
- package/dist/services/LanguageService.d.ts +0 -9
- package/dist/services/LanguageService.d.ts.map +0 -1
- package/dist/services/LiveStatusService.d.ts +0 -9
- package/dist/services/LiveStatusService.d.ts.map +0 -1
- package/dist/services/LoggingService.d.ts +0 -10
- package/dist/services/LoggingService.d.ts.map +0 -1
- package/dist/services/PageService.d.ts +0 -22
- package/dist/services/PageService.d.ts.map +0 -1
- package/dist/services/StructuredDataService.d.ts +0 -14
- package/dist/services/StructuredDataService.d.ts.map +0 -1
- package/dist/services/logging/FileLogger.d.ts +0 -18
- package/dist/services/logging/FileLogger.d.ts.map +0 -1
- package/dist/services/logging/StdoutLogger.d.ts +0 -15
- package/dist/services/logging/StdoutLogger.d.ts.map +0 -1
- package/dist/utils/validator.d.ts +0 -10
- package/dist/utils/validator.d.ts.map +0 -1
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import type { ApiFunctionParams } from "../sdk";
|
|
2
|
-
import type { AlertFacade } from "../facades/AlertFacade";
|
|
3
|
-
import type { ImageFacade } from "../facades/ImageFacade";
|
|
4
|
-
import type { LanguageFacade } from "../facades/LanguageFacade";
|
|
5
|
-
import type { LiveStatusFacade } from "../facades/LiveStatusFacade";
|
|
6
|
-
import type { PageFacade } from "../facades/PageFacade";
|
|
7
|
-
import type { StructuredDataFacade } from "../facades/StructuredDataFacade";
|
|
8
|
-
export interface GriddoSDK {
|
|
9
|
-
/**
|
|
10
|
-
* Makes a direct API call with the given parameters.
|
|
11
|
-
*
|
|
12
|
-
* @param params - The parameters for the API call.
|
|
13
|
-
* @throws Will throw an error if the API call fails.
|
|
14
|
-
*/
|
|
15
|
-
api<TResult>(params: ApiFunctionParams): Promise<TResult>;
|
|
16
|
-
/**
|
|
17
|
-
* Obtiene el facade de Alertas.
|
|
18
|
-
* @returns Una promesa que resuelve en una instancia de `AlertFacade`.
|
|
19
|
-
*/
|
|
20
|
-
alerts(): Promise<AlertFacade>;
|
|
21
|
-
/**
|
|
22
|
-
* Obtiene el facade de Idiomas.
|
|
23
|
-
* @returns Una promesa que resuelve en una instancia de `LanguageFacade`.
|
|
24
|
-
*/
|
|
25
|
-
languages(): Promise<LanguageFacade>;
|
|
26
|
-
/**
|
|
27
|
-
* Obtiene el facade de Estado en Vivo.
|
|
28
|
-
* @returns Una promesa que resuelve en una instancia de `LiveStatusFacade`.
|
|
29
|
-
*/
|
|
30
|
-
liveStatus(): Promise<LiveStatusFacade>;
|
|
31
|
-
/**
|
|
32
|
-
* Obtiene el facade de Páginas.
|
|
33
|
-
* @returns Una promesa que resuelve en una instancia de `PageFacade`.
|
|
34
|
-
*/
|
|
35
|
-
pages(): Promise<PageFacade>;
|
|
36
|
-
/**
|
|
37
|
-
* Obtiene el facade de Datos Estructurados.
|
|
38
|
-
* @returns Una promesa que resuelve en una instancia de `StructuredDataFacade`.
|
|
39
|
-
*/
|
|
40
|
-
structuredData(): Promise<StructuredDataFacade>;
|
|
41
|
-
/**
|
|
42
|
-
* Obtiene el facade de Imágenes.
|
|
43
|
-
* @returns Una promesa que resuelve en una instancia de `ImageFacade`.
|
|
44
|
-
*/
|
|
45
|
-
images(): Promise<ImageFacade>;
|
|
46
|
-
}
|
|
47
|
-
//# sourceMappingURL=GriddoSDK.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GriddoSDK.d.ts","sourceRoot":"","sources":["../../src/interfaces/GriddoSDK.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAE1E,MAAM,WAAW,SAAS;IACzB;;;;;OAKG;IACH,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAE1D;;;OAGG;IACH,MAAM,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC;IAE/B;;;OAGG;IACH,SAAS,IAAI,OAAO,CAAC,cAAc,CAAC,CAAC;IAErC;;;OAGG;IACH,UAAU,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAExC;;;OAGG;IACH,KAAK,IAAI,OAAO,CAAC,UAAU,CAAC,CAAC;IAE7B;;;OAGG;IACH,cAAc,IAAI,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAEhD;;;OAGG;IACH,MAAM,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC;CAC/B"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { HttpMethod } from "../sdk";
|
|
2
|
-
export interface HttpClientOptions {
|
|
3
|
-
method: HttpMethod;
|
|
4
|
-
headers?: Record<string, string>;
|
|
5
|
-
body?: any;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Interface representing an HTTP client.
|
|
9
|
-
*/
|
|
10
|
-
export interface HttpClient {
|
|
11
|
-
/**
|
|
12
|
-
* Performs a GET request.
|
|
13
|
-
* @param url - The URL to request.
|
|
14
|
-
* @param options - Additional options for the request.
|
|
15
|
-
* @returns A promise resolving to the response data.
|
|
16
|
-
*/
|
|
17
|
-
get<T>(url: string, options?: HttpClientOptions): Promise<T>;
|
|
18
|
-
/**
|
|
19
|
-
* Performs a POST request.
|
|
20
|
-
* @param url - The URL to request.
|
|
21
|
-
* @param body - The body of the request.
|
|
22
|
-
* @param options - Additional options for the request.
|
|
23
|
-
* @returns A promise resolving to the response data.
|
|
24
|
-
*/
|
|
25
|
-
post<T>(url: string, body: any, options?: HttpClientOptions): Promise<T>;
|
|
26
|
-
/**
|
|
27
|
-
* Performs a PUT request.
|
|
28
|
-
* @param url - The URL to request.
|
|
29
|
-
* @param body - The body of the request.
|
|
30
|
-
* @param options - Additional options for the request.
|
|
31
|
-
* @returns A promise resolving to the response data.
|
|
32
|
-
*/
|
|
33
|
-
put<T>(url: string, body: any, options?: HttpClientOptions): Promise<T>;
|
|
34
|
-
/**
|
|
35
|
-
* Performs a DELETE request.
|
|
36
|
-
* @param url - The URL to request.
|
|
37
|
-
* @param options - Additional options for the request.
|
|
38
|
-
* @returns A promise resolving to the response data.
|
|
39
|
-
*/
|
|
40
|
-
delete<T>(url: string, options?: HttpClientOptions): Promise<T>;
|
|
41
|
-
/**
|
|
42
|
-
* Performs a generic HTTP request.
|
|
43
|
-
* @param url - The URL to request.
|
|
44
|
-
* @param options - Additional options for the request.
|
|
45
|
-
* @returns A promise resolving to the response data.
|
|
46
|
-
*/
|
|
47
|
-
request<T>(url: string, options: HttpClientOptions): Promise<T>;
|
|
48
|
-
}
|
|
49
|
-
//# sourceMappingURL=HttpClient.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HttpClient.d.ts","sourceRoot":"","sources":["../../src/interfaces/HttpClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,MAAM,WAAW,iBAAiB;IACjC,MAAM,EAAE,UAAU,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,IAAI,CAAC,EAAE,GAAG,CAAC;CACX;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IAC1B;;;;;OAKG;IACH,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IAE7D;;;;;;OAMG;IACH,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IAEzE;;;;;;OAMG;IACH,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IAExE;;;;;OAKG;IACH,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IAEhE;;;;;OAKG;IACH,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;CAChE"}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import type { ApiResponse, ImageDetail, ImageDetailParams, ImageList, ImagePagePaginateParams, ImageUpdateData } from "../sdk";
|
|
2
|
-
import type { Readable } from "stream";
|
|
3
|
-
/**
|
|
4
|
-
* Interface representing the Image Management functionalities.
|
|
5
|
-
* Provides methods to interact with image data such as pagination, retrieval, addition, update, deletion, and replacement of images.
|
|
6
|
-
*/
|
|
7
|
-
export interface ImageManager {
|
|
8
|
-
/**
|
|
9
|
-
* Paginate through the list of images based on provided query parameters.
|
|
10
|
-
*
|
|
11
|
-
* @param queryParams - Parameters for pagination and filtering.
|
|
12
|
-
* @param site - Site identifier to filter images.
|
|
13
|
-
* @param language - Language code to filter images.
|
|
14
|
-
* @returns A Promise resolving to a list of images.
|
|
15
|
-
*/
|
|
16
|
-
paginate({ queryParams, site, language, }: ImagePagePaginateParams): Promise<ImageList>;
|
|
17
|
-
/**
|
|
18
|
-
* Retrieve detailed information about an image by its ID.
|
|
19
|
-
*
|
|
20
|
-
* @param id - The unique identifier of the image.
|
|
21
|
-
* @param params - Optional parameters for retrieving the image details, such as thumbnail dimensions.
|
|
22
|
-
* @returns A Promise resolving to the detailed image information.
|
|
23
|
-
*/
|
|
24
|
-
byID(id: number, params?: ImageDetailParams): Promise<ImageDetail>;
|
|
25
|
-
/**
|
|
26
|
-
* Add a new image to the system.
|
|
27
|
-
*
|
|
28
|
-
* @param image - The image data in a readable stream format.
|
|
29
|
-
* @param imageName - The name for the image.
|
|
30
|
-
* @param site - The site identifier where the image belongs.
|
|
31
|
-
* @param mimetype
|
|
32
|
-
* @param tags
|
|
33
|
-
* @returns A Promise resolving to the detailed information of the newly added image.
|
|
34
|
-
*/
|
|
35
|
-
add({ image, imageName, site, mimetype, }: {
|
|
36
|
-
image: Readable;
|
|
37
|
-
imageName: string;
|
|
38
|
-
site?: number | "global";
|
|
39
|
-
mimetype?: string;
|
|
40
|
-
}): Promise<ImageDetail>;
|
|
41
|
-
/**
|
|
42
|
-
* Update metadata or details of an existing image.
|
|
43
|
-
*
|
|
44
|
-
* @param id - The unique identifier of the image.
|
|
45
|
-
* @param params - The updated data for the image.
|
|
46
|
-
* @returns A Promise resolving to the updated image details.
|
|
47
|
-
*/
|
|
48
|
-
updateData({ id, params, }: {
|
|
49
|
-
id: number;
|
|
50
|
-
params: ImageUpdateData;
|
|
51
|
-
}): Promise<ImageDetail>;
|
|
52
|
-
/**
|
|
53
|
-
* Delete an image by its ID.
|
|
54
|
-
*
|
|
55
|
-
* @param id - The unique identifier of the image to be deleted.
|
|
56
|
-
* @returns A Promise resolving to the API response after the image deletion.
|
|
57
|
-
*/
|
|
58
|
-
delete(id: number): Promise<ApiResponse>;
|
|
59
|
-
/**
|
|
60
|
-
* Replace an existing image with a new one.
|
|
61
|
-
*
|
|
62
|
-
* @param id - The unique identifier of the image to be replaced.
|
|
63
|
-
* @param image - The new image data in a readable stream format.
|
|
64
|
-
* @param mimetype
|
|
65
|
-
* @param site
|
|
66
|
-
* @returns A Promise resolving to the updated image details after replacement.
|
|
67
|
-
*/
|
|
68
|
-
replace({ id, image, site, }: {
|
|
69
|
-
id: number;
|
|
70
|
-
image: Readable;
|
|
71
|
-
site?: number | "global";
|
|
72
|
-
}): Promise<ImageDetail>;
|
|
73
|
-
}
|
|
74
|
-
//# sourceMappingURL=ImageManager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ImageManager.d.ts","sourceRoot":"","sources":["../../src/interfaces/ImageManager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,WAAW,EACX,WAAW,EACX,iBAAiB,EACjB,SAAS,EACT,uBAAuB,EACvB,eAAe,EACf,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAEvC;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC5B;;;;;;;OAOG;IACH,QAAQ,CAAC,EACR,WAAW,EACX,IAAI,EACJ,QAAQ,GACR,EAAE,uBAAuB,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;IAEhD;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAEnE;;;;;;;;;OASG;IACH,GAAG,CAAC,EACH,KAAK,EACL,SAAS,EACT,IAAI,EACJ,QAAQ,GACR,EAAE;QACF,KAAK,EAAE,QAAQ,CAAC;QAChB,SAAS,EAAE,MAAM,CAAC;QAClB,IAAI,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;QACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;KAClB,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAEzB;;;;;;OAMG;IACH,UAAU,CAAC,EACV,EAAE,EACF,MAAM,GACN,EAAE;QACF,EAAE,EAAE,MAAM,CAAC;QACX,MAAM,EAAE,eAAe,CAAC;KACxB,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAEzB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAEzC;;;;;;;;OAQG;IACH,OAAO,CAAC,EACP,EAAE,EACF,KAAK,EACL,IAAI,GACJ,EAAE;QACF,EAAE,EAAE,MAAM,CAAC;QACX,KAAK,EAAE,QAAQ,CAAC;QAChB,IAAI,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;KACzB,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;CACzB"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { LanguagesResponse } from "../sdk";
|
|
2
|
-
/**
|
|
3
|
-
* Interface for the LanguageService.
|
|
4
|
-
*
|
|
5
|
-
* This interface defines the methods required for managing languages within the SDK,
|
|
6
|
-
* including fetching languages from the API and retrieving specific languages by key.
|
|
7
|
-
*/
|
|
8
|
-
export interface LanguageManager {
|
|
9
|
-
/**
|
|
10
|
-
* Fetches the list of languages from the API.
|
|
11
|
-
*
|
|
12
|
-
* @returns A promise that resolves to the complete LanguagesResponse, including totalItems and items.
|
|
13
|
-
* @throws Will throw an error if the API request fails or if the response format is incorrect.
|
|
14
|
-
*/
|
|
15
|
-
fetchLanguages(): Promise<LanguagesResponse>;
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=LanguageManager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LanguageManager.d.ts","sourceRoot":"","sources":["../../src/interfaces/LanguageManager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC/B;;;;;OAKG;IACH,cAAc,IAAI,OAAO,CAAC,iBAAiB,CAAC,CAAC;CAC7C"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { LiveStatusResponse } from "../sdk";
|
|
2
|
-
/**
|
|
3
|
-
* Interface for the LiveStatusService.
|
|
4
|
-
*
|
|
5
|
-
* This interface defines the methods required for managing live statuses within the SDK,
|
|
6
|
-
* including fetching live statuses from the API and retrieving them.
|
|
7
|
-
*/
|
|
8
|
-
export interface LiveStatusManager {
|
|
9
|
-
/**
|
|
10
|
-
* Fetches the live statuses from the API and updates the internal state.
|
|
11
|
-
*
|
|
12
|
-
* @returns A promise that resolves to the array of live statuses fetched from the API.
|
|
13
|
-
* @throws Will throw an error if the API request fails or if the response format is incorrect.
|
|
14
|
-
*/
|
|
15
|
-
fetchLiveStatus(): Promise<LiveStatusResponse>;
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=LiveStatusManager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LiveStatusManager.d.ts","sourceRoot":"","sources":["../../src/interfaces/LiveStatusManager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IACjC;;;;;OAKG;IACH,eAAe,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAAC;CAC/C"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Interface for logging strategies.
|
|
3
|
-
*
|
|
4
|
-
* This interface defines the contract for different logging strategies,
|
|
5
|
-
* such as logging to the console or to a file.
|
|
6
|
-
*/
|
|
7
|
-
export interface Logger {
|
|
8
|
-
/**
|
|
9
|
-
* Logs a message.
|
|
10
|
-
*
|
|
11
|
-
* @param message - The message to log.
|
|
12
|
-
* @param optionalParams - Additional parameters to log.
|
|
13
|
-
*/
|
|
14
|
-
log(message?: any, ...optionalParams: any[]): void;
|
|
15
|
-
/**
|
|
16
|
-
* Logs error message.
|
|
17
|
-
*
|
|
18
|
-
* @param errorMessage - The error message to log error.
|
|
19
|
-
* @param optionalParams - Additional parameters to log.
|
|
20
|
-
*/
|
|
21
|
-
logError(errorMessage?: any, ...optionalParams: any[]): void;
|
|
22
|
-
/**
|
|
23
|
-
* Logs a message if verbose mode is enabled.
|
|
24
|
-
*
|
|
25
|
-
* @param message - The message to log.
|
|
26
|
-
* @param optionalParams - Additional parameters to log.
|
|
27
|
-
*/
|
|
28
|
-
verbose(message?: any, ...optionalParams: any[]): void;
|
|
29
|
-
isVerbose(): boolean;
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=Logger.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Logger.d.ts","sourceRoot":"","sources":["../../src/interfaces/Logger.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,MAAM;IACtB;;;;;OAKG;IACH,GAAG,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,GAAG,cAAc,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;IAEnD;;;;;OAKG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,GAAG,EAAE,GAAG,cAAc,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;IAC7D;;;;;OAKG;IACH,OAAO,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,GAAG,cAAc,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;IAEvD,SAAS,IAAI,OAAO,CAAC;CACrB"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { PageResponse } from "../sdk";
|
|
2
|
-
export interface PageUpdateHelpers {
|
|
3
|
-
/**
|
|
4
|
-
* Maps over modules within a page and applies a callback function to each module.
|
|
5
|
-
*
|
|
6
|
-
* This method iterates over all modules within a given page and applies
|
|
7
|
-
* the provided callback function to each module.
|
|
8
|
-
*
|
|
9
|
-
* @param page - The page containing the modules to map.
|
|
10
|
-
* @param moduleName - The name of the module to map over.
|
|
11
|
-
* @param callback - The callback function to apply to each module.
|
|
12
|
-
* @returns A promise that resolves to the modified page data.
|
|
13
|
-
* @throws Will throw an error if mapping the modules fails.
|
|
14
|
-
*/
|
|
15
|
-
updateModulesFromPage<TModule>(callback: (module: TModule) => Promise<TModule | void>, page: PageResponse<any>, moduleName: string): Promise<typeof page>;
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=PageUpdateHelpers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PageUpdateHelpers.d.ts","sourceRoot":"","sources":["../../src/interfaces/PageUpdateHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,WAAW,iBAAiB;IACjC;;;;;;;;;;;OAWG;IACH,qBAAqB,CAAC,OAAO,EAC5B,QAAQ,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,EACtD,IAAI,EAAE,YAAY,CAAC,GAAG,CAAC,EACvB,UAAU,EAAE,MAAM,GAChB,OAAO,CAAC,OAAO,IAAI,CAAC,CAAC;CACxB"}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import type { ApiResponse, PagePaginateParams, PagePaginationResponse, PageResponse } from "../sdk";
|
|
2
|
-
/**
|
|
3
|
-
* Interface for the PageService.
|
|
4
|
-
*
|
|
5
|
-
* This interface defines the contract for managing page-related operations,
|
|
6
|
-
* including retrieval, creation, updating, deletion, restoration of pages,
|
|
7
|
-
* and mapping over modules within a specific page.
|
|
8
|
-
*/
|
|
9
|
-
export interface Pageable {
|
|
10
|
-
/**
|
|
11
|
-
* Fetches a single page by its ID.
|
|
12
|
-
*
|
|
13
|
-
* @returns A promise that resolves to the page data.
|
|
14
|
-
* @throws Will throw an error if the API request fails or if the response format is incorrect.
|
|
15
|
-
* @param id
|
|
16
|
-
*/
|
|
17
|
-
byID<TPage>(id: number): Promise<PageResponse<TPage>>;
|
|
18
|
-
/**
|
|
19
|
-
* Deletes a page by its ID.
|
|
20
|
-
*
|
|
21
|
-
* @param pageId - The ID of the page to delete.
|
|
22
|
-
* @returns A promise that resolves when the page is deleted.
|
|
23
|
-
* @throws Will throw an error if the API request fails or if the response format is incorrect.
|
|
24
|
-
*/
|
|
25
|
-
delete(pageId: number): Promise<ApiResponse>;
|
|
26
|
-
/**
|
|
27
|
-
* Fetches a list of pages, optionally filtered by a template.
|
|
28
|
-
*
|
|
29
|
-
* @param template - The template to filter pages by (optional).
|
|
30
|
-
* @returns A promise that resolves to an array of page IDs.
|
|
31
|
-
* @throws Will throw an error if the API request fails or if the response format is incorrect.
|
|
32
|
-
*/
|
|
33
|
-
listIDs(template: string | null): Promise<number[]>;
|
|
34
|
-
/**
|
|
35
|
-
* Paginates through a list of pages based on the provided query parameters, site, and language.
|
|
36
|
-
*
|
|
37
|
-
* @template TPage - The type of the pages being paginated.
|
|
38
|
-
*
|
|
39
|
-
* @param params - An object containing the query parameters, site, and language for paginating the list of pages.
|
|
40
|
-
* @param params.queryParams - An object containing parameters for paginating the list of pages.
|
|
41
|
-
* @param params.site - The ID of the site from which to retrieve pages. If not provided, pages from all sites are retrieved.
|
|
42
|
-
* @param params.language - The language code to filter pages by. If not provided, defaults to the language specified in the headers or a default.
|
|
43
|
-
*
|
|
44
|
-
* @returns A promise that resolves to a paginated response containing the total number of items, the current page, and the list of pages.
|
|
45
|
-
*/
|
|
46
|
-
paginate<TPage>({ queryParams, site, language, }: PagePaginateParams): Promise<PagePaginationResponse<TPage>>;
|
|
47
|
-
/**
|
|
48
|
-
* Restores a deleted page by its ID.
|
|
49
|
-
*
|
|
50
|
-
* @param pageId - The ID of the page to restore.
|
|
51
|
-
* @returns A promise that resolves to the restored page data.
|
|
52
|
-
* @throws Will throw an error if the API request fails or if the response format is incorrect.
|
|
53
|
-
*/
|
|
54
|
-
restore(pageId: number): Promise<ApiResponse>;
|
|
55
|
-
/**
|
|
56
|
-
* Saves a page, either creating a new one or updating an existing one.
|
|
57
|
-
*
|
|
58
|
-
* @param page - The page data to save.
|
|
59
|
-
* @returns A promise that resolves to the saved page data.
|
|
60
|
-
* @throws Will throw an error if the API request fails or if the response format is incorrect.
|
|
61
|
-
*/
|
|
62
|
-
save<TPage>(page: PageResponse<TPage>): Promise<PageResponse<TPage>>;
|
|
63
|
-
}
|
|
64
|
-
//# sourceMappingURL=Pageable.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Pageable.d.ts","sourceRoot":"","sources":["../../src/interfaces/Pageable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,WAAW,EACX,kBAAkB,EAClB,sBAAsB,EACtB,YAAY,EACZ,MAAM,aAAa,CAAC;AAErB;;;;;;GAMG;AACH,MAAM,WAAW,QAAQ;IACxB;;;;;;OAMG;IACH,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;IAEtD;;;;;;OAMG;IACH,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAE7C;;;;;;OAMG;IACH,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAEpD;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,KAAK,EAAE,EACf,WAAW,EACX,IAAI,EACJ,QAAQ,GACR,EAAE,kBAAkB,GAAG,OAAO,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAC,CAAC;IAE/D;;;;;;OAMG;IACH,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAE9C;;;;;;OAMG;IACH,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,YAAY,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;CACrE"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { ApiResponse, PaginationQueryParams, StructuredDataContent, StructuredDataResponse } from "../sdk";
|
|
2
|
-
/**
|
|
3
|
-
* Interface for the StructuredDataService.
|
|
4
|
-
*
|
|
5
|
-
* This interface defines the contract for managing structured data operations,
|
|
6
|
-
* including retrieval, saving, and deletion of structured data from the API.
|
|
7
|
-
*/
|
|
8
|
-
export interface StructuredData {
|
|
9
|
-
/**
|
|
10
|
-
* Fetches structured data based on content type and other parameters.
|
|
11
|
-
*
|
|
12
|
-
* @template TStructuredData - The type representing the specific structured data.
|
|
13
|
-
* @param contentType - The content type to filter data by.
|
|
14
|
-
* @param site - The site identifier, if applicable.
|
|
15
|
-
* @param language - The language code, if applicable.
|
|
16
|
-
* @param queryParams - Additional query parameters.
|
|
17
|
-
* @returns A promise that resolves to an array of structured data.
|
|
18
|
-
* @throws Will throw an error if the API request fails or if the response format is incorrect.
|
|
19
|
-
*/
|
|
20
|
-
structuredData?<TStructuredData>(contentType: string, site: string | null, language: string | null, queryParams: PaginationQueryParams): Promise<StructuredDataContent<TStructuredData>[] | StructuredDataResponse<TStructuredData>>;
|
|
21
|
-
/**
|
|
22
|
-
* Fetches structured data by its ID.
|
|
23
|
-
*
|
|
24
|
-
* @template TStructuredData - The type representing the specific structured data.
|
|
25
|
-
* @param id - The ID of the structured data to fetch.
|
|
26
|
-
* @param relatedFields - Indicates related structured data values are displayed as objects with id and label instead of just the ids.
|
|
27
|
-
* @returns A promise that resolves to the structured data.
|
|
28
|
-
* @throws Will throw an error if the API request fails or if the response format is incorrect.
|
|
29
|
-
*/
|
|
30
|
-
byID<TStructuredData>(id: number, relatedFields?: boolean): Promise<StructuredDataContent<TStructuredData>>;
|
|
31
|
-
/**
|
|
32
|
-
* Saves structured data, either creating a new one or updating an existing one.
|
|
33
|
-
*
|
|
34
|
-
* @template TStructuredData - The type representing the specific structured data.
|
|
35
|
-
* @param structuredData - The structured data to save.
|
|
36
|
-
* @returns A promise that resolves to the saved structured data.
|
|
37
|
-
* @throws Will throw an error if the API request fails or if the response format is incorrect.
|
|
38
|
-
*/
|
|
39
|
-
save<TStructuredData>(structuredData: StructuredDataContent<TStructuredData>): Promise<StructuredDataContent<TStructuredData>>;
|
|
40
|
-
/**
|
|
41
|
-
* Deletes structured data by its ID.
|
|
42
|
-
*
|
|
43
|
-
* @param id - The ID of the structured data to delete.
|
|
44
|
-
* @returns A promise that resolves when the structured data is deleted.
|
|
45
|
-
*/
|
|
46
|
-
delete(id: number): Promise<ApiResponse>;
|
|
47
|
-
}
|
|
48
|
-
//# sourceMappingURL=StructuredData.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StructuredData.d.ts","sourceRoot":"","sources":["../../src/interfaces/StructuredData.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,WAAW,EACX,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EACtB,MAAM,aAAa,CAAC;AAErB;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC9B;;;;;;;;;;OAUG;IACH,cAAc,CAAC,CAAC,eAAe,EAC9B,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,MAAM,GAAG,IAAI,EACnB,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,WAAW,EAAE,qBAAqB,GAChC,OAAO,CACP,qBAAqB,CAAC,eAAe,CAAC,EAAE,GACxC,sBAAsB,CAAC,eAAe,CAAC,CACzC,CAAC;IAEF;;;;;;;;OAQG;IACH,IAAI,CAAC,eAAe,EACnB,EAAE,EAAE,MAAM,EACV,aAAa,CAAC,EAAE,OAAO,GACrB,OAAO,CAAC,qBAAqB,CAAC,eAAe,CAAC,CAAC,CAAC;IAEnD;;;;;;;OAOG;IACH,IAAI,CAAC,eAAe,EACnB,cAAc,EAAE,qBAAqB,CAAC,eAAe,CAAC,GACpD,OAAO,CAAC,qBAAqB,CAAC,eAAe,CAAC,CAAC,CAAC;IAEnD;;;;;OAKG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;CACzC"}
|