@localess/js-client 0.5.1 → 0.5.6-next.20250331-164941.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/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -135,11 +135,11 @@ interface ContentMetadata {
|
|
|
135
135
|
/**
|
|
136
136
|
* Content define shared object for all possible Content Types.
|
|
137
137
|
*/
|
|
138
|
-
interface Content extends ContentMetadata {
|
|
138
|
+
interface Content<T extends ContentData = ContentData> extends ContentMetadata {
|
|
139
139
|
/**
|
|
140
140
|
* Content Data
|
|
141
141
|
*/
|
|
142
|
-
data?:
|
|
142
|
+
data?: T;
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
/**
|
|
@@ -227,14 +227,14 @@ declare function localessClient(options: LocalessClientOptions): {
|
|
|
227
227
|
* @param params{ContentFetchParams} - Fetch parameters
|
|
228
228
|
* @returns {Promise<Content>}
|
|
229
229
|
*/
|
|
230
|
-
getContentBySlug(slug: string, params?: ContentFetchParams): Promise<Content
|
|
230
|
+
getContentBySlug<T extends ContentData = ContentData>(slug: string, params?: ContentFetchParams): Promise<Content<T>>;
|
|
231
231
|
/**
|
|
232
232
|
* Get content by ID
|
|
233
233
|
* @param id{string} - Content ID
|
|
234
234
|
* @param params{ContentFetchParams} - Fetch parameters
|
|
235
235
|
* @returns {Promise<Content>}
|
|
236
236
|
*/
|
|
237
|
-
getContentById(id: string, params?: ContentFetchParams): Promise<Content
|
|
237
|
+
getContentById<T_1 extends ContentData = ContentData>(id: string, params?: ContentFetchParams): Promise<Content<T_1>>;
|
|
238
238
|
/**
|
|
239
239
|
* Get translations for the given locale
|
|
240
240
|
* @param locale{string} - Locale identifier (ISO 639-1)
|
package/dist/index.d.ts
CHANGED
|
@@ -135,11 +135,11 @@ interface ContentMetadata {
|
|
|
135
135
|
/**
|
|
136
136
|
* Content define shared object for all possible Content Types.
|
|
137
137
|
*/
|
|
138
|
-
interface Content extends ContentMetadata {
|
|
138
|
+
interface Content<T extends ContentData = ContentData> extends ContentMetadata {
|
|
139
139
|
/**
|
|
140
140
|
* Content Data
|
|
141
141
|
*/
|
|
142
|
-
data?:
|
|
142
|
+
data?: T;
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
/**
|
|
@@ -227,14 +227,14 @@ declare function localessClient(options: LocalessClientOptions): {
|
|
|
227
227
|
* @param params{ContentFetchParams} - Fetch parameters
|
|
228
228
|
* @returns {Promise<Content>}
|
|
229
229
|
*/
|
|
230
|
-
getContentBySlug(slug: string, params?: ContentFetchParams): Promise<Content
|
|
230
|
+
getContentBySlug<T extends ContentData = ContentData>(slug: string, params?: ContentFetchParams): Promise<Content<T>>;
|
|
231
231
|
/**
|
|
232
232
|
* Get content by ID
|
|
233
233
|
* @param id{string} - Content ID
|
|
234
234
|
* @param params{ContentFetchParams} - Fetch parameters
|
|
235
235
|
* @returns {Promise<Content>}
|
|
236
236
|
*/
|
|
237
|
-
getContentById(id: string, params?: ContentFetchParams): Promise<Content
|
|
237
|
+
getContentById<T_1 extends ContentData = ContentData>(id: string, params?: ContentFetchParams): Promise<Content<T_1>>;
|
|
238
238
|
/**
|
|
239
239
|
* Get translations for the given locale
|
|
240
240
|
* @param locale{string} - Locale identifier (ISO 639-1)
|