@pakento/cms-sdk 4.0.5 → 4.0.7
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.d.mts +3 -18
- package/dist/index.d.ts +3 -18
- package/dist/index.js +458 -559
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +458 -559
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
package/dist/index.d.mts
CHANGED
|
@@ -223,30 +223,15 @@ interface CustomGraphQLResponse<T> {
|
|
|
223
223
|
|
|
224
224
|
declare class PakentoCMSAPI {
|
|
225
225
|
private client;
|
|
226
|
-
private
|
|
226
|
+
private cache;
|
|
227
227
|
private defaultTTL;
|
|
228
228
|
private baseURL;
|
|
229
229
|
private apiKey;
|
|
230
230
|
constructor(config?: {
|
|
231
231
|
cacheTTL?: number;
|
|
232
232
|
});
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
*/
|
|
236
|
-
private generateParamsHash;
|
|
237
|
-
/**
|
|
238
|
-
* Genera una key única y calculable para el cache basada en:
|
|
239
|
-
* - API Token (para namespacing entre proyectos)
|
|
240
|
-
* - Nombre de la función
|
|
241
|
-
* - Hash de los parámetros de búsqueda
|
|
242
|
-
*/
|
|
243
|
-
private buildCacheKey;
|
|
244
|
-
/**
|
|
245
|
-
* Obtiene datos desde cache si existen; de lo contrario llama a fetcher() y guarda.
|
|
246
|
-
*/
|
|
247
|
-
private safeJsonParse;
|
|
248
|
-
private serializeForCache;
|
|
249
|
-
private getCachedOrFetch;
|
|
233
|
+
private handleApiError;
|
|
234
|
+
private fetchGraphQL;
|
|
250
235
|
getItems(params?: GetItemsParams): Promise<ItemsApiResponse>;
|
|
251
236
|
private fetchItemsFromAPI;
|
|
252
237
|
getCategories(params?: GetCategoriesParams): Promise<CategoriesApiResponse>;
|
package/dist/index.d.ts
CHANGED
|
@@ -223,30 +223,15 @@ interface CustomGraphQLResponse<T> {
|
|
|
223
223
|
|
|
224
224
|
declare class PakentoCMSAPI {
|
|
225
225
|
private client;
|
|
226
|
-
private
|
|
226
|
+
private cache;
|
|
227
227
|
private defaultTTL;
|
|
228
228
|
private baseURL;
|
|
229
229
|
private apiKey;
|
|
230
230
|
constructor(config?: {
|
|
231
231
|
cacheTTL?: number;
|
|
232
232
|
});
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
*/
|
|
236
|
-
private generateParamsHash;
|
|
237
|
-
/**
|
|
238
|
-
* Genera una key única y calculable para el cache basada en:
|
|
239
|
-
* - API Token (para namespacing entre proyectos)
|
|
240
|
-
* - Nombre de la función
|
|
241
|
-
* - Hash de los parámetros de búsqueda
|
|
242
|
-
*/
|
|
243
|
-
private buildCacheKey;
|
|
244
|
-
/**
|
|
245
|
-
* Obtiene datos desde cache si existen; de lo contrario llama a fetcher() y guarda.
|
|
246
|
-
*/
|
|
247
|
-
private safeJsonParse;
|
|
248
|
-
private serializeForCache;
|
|
249
|
-
private getCachedOrFetch;
|
|
233
|
+
private handleApiError;
|
|
234
|
+
private fetchGraphQL;
|
|
250
235
|
getItems(params?: GetItemsParams): Promise<ItemsApiResponse>;
|
|
251
236
|
private fetchItemsFromAPI;
|
|
252
237
|
getCategories(params?: GetCategoriesParams): Promise<CategoriesApiResponse>;
|