@malevich-studio/strapi-sdk-typescript 1.1.1 → 1.1.2
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/cli.cjs +18 -0
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.mjs +18 -0
- package/dist/cli.mjs.map +1 -1
- package/dist/index.cjs +8 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +12 -1
- package/dist/index.mjs +8 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -21259,6 +21259,14 @@ class Strapi {
|
|
|
21259
21259
|
} : {}),
|
|
21260
21260
|
}, params));
|
|
21261
21261
|
}
|
|
21262
|
+
async getLocales(params) {
|
|
21263
|
+
return await this.baseFetch('i18n/locales', _.merge({
|
|
21264
|
+
headers: {
|
|
21265
|
+
'Content-Type': 'application/json',
|
|
21266
|
+
},
|
|
21267
|
+
method: 'GET',
|
|
21268
|
+
}, params));
|
|
21269
|
+
}
|
|
21262
21270
|
async getDocuments(endpoint, data, params = {}) {
|
|
21263
21271
|
return await this.fetch(endpoint, data, {
|
|
21264
21272
|
method: 'GET',
|
|
@@ -21846,6 +21854,16 @@ async function generateStrapiTypes(strapi) {
|
|
|
21846
21854
|
updatedAt: {
|
|
21847
21855
|
type: 'datetime',
|
|
21848
21856
|
},
|
|
21857
|
+
...(contentType.schema.draftAndPublish ? {
|
|
21858
|
+
publishedAt: {
|
|
21859
|
+
type: 'datetime',
|
|
21860
|
+
},
|
|
21861
|
+
} : {}),
|
|
21862
|
+
...(contentType.schema.pluginOptions?.i18n?.localized ? {
|
|
21863
|
+
locale: {
|
|
21864
|
+
type: 'string',
|
|
21865
|
+
},
|
|
21866
|
+
} : {}),
|
|
21849
21867
|
...contentType.schema.attributes,
|
|
21850
21868
|
};
|
|
21851
21869
|
allInterfaces.push(generateResponseTypeCode(modelName, attributes));
|