@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.mjs CHANGED
@@ -21239,6 +21239,14 @@ class Strapi {
21239
21239
  } : {}),
21240
21240
  }, params));
21241
21241
  }
21242
+ async getLocales(params) {
21243
+ return await this.baseFetch('i18n/locales', _.merge({
21244
+ headers: {
21245
+ 'Content-Type': 'application/json',
21246
+ },
21247
+ method: 'GET',
21248
+ }, params));
21249
+ }
21242
21250
  async getDocuments(endpoint, data, params = {}) {
21243
21251
  return await this.fetch(endpoint, data, {
21244
21252
  method: 'GET',
@@ -21826,6 +21834,16 @@ async function generateStrapiTypes(strapi) {
21826
21834
  updatedAt: {
21827
21835
  type: 'datetime',
21828
21836
  },
21837
+ ...(contentType.schema.draftAndPublish ? {
21838
+ publishedAt: {
21839
+ type: 'datetime',
21840
+ },
21841
+ } : {}),
21842
+ ...(contentType.schema.pluginOptions?.i18n?.localized ? {
21843
+ locale: {
21844
+ type: 'string',
21845
+ },
21846
+ } : {}),
21829
21847
  ...contentType.schema.attributes,
21830
21848
  };
21831
21849
  allInterfaces.push(generateResponseTypeCode(modelName, attributes));