contentful-management 11.66.0 → 11.67.1

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.
Files changed (30) hide show
  1. package/README.md +13 -10
  2. package/dist/contentful-management.browser.js +940 -449
  3. package/dist/contentful-management.browser.js.map +1 -1
  4. package/dist/contentful-management.browser.min.js +1 -1
  5. package/dist/contentful-management.node.js +923 -450
  6. package/dist/contentful-management.node.js.map +1 -1
  7. package/dist/contentful-management.node.min.js +1 -1
  8. package/dist/es-modules/adapters/REST/endpoints/agent-run.js +20 -0
  9. package/dist/es-modules/adapters/REST/endpoints/agent.js +24 -0
  10. package/dist/es-modules/adapters/REST/endpoints/index.js +4 -0
  11. package/dist/es-modules/create-environment-api.js +173 -0
  12. package/dist/es-modules/entities/agent-run.js +8 -0
  13. package/dist/es-modules/entities/agent.js +29 -0
  14. package/dist/es-modules/entities/index.js +4 -0
  15. package/dist/es-modules/plain/entities/agent-run.js +1 -0
  16. package/dist/es-modules/plain/entities/agent.js +1 -0
  17. package/dist/es-modules/plain/plain-client.js +9 -0
  18. package/dist/typings/adapters/REST/endpoints/agent-run.d.ts +3 -0
  19. package/dist/typings/adapters/REST/endpoints/agent.d.ts +4 -0
  20. package/dist/typings/adapters/REST/endpoints/index.d.ts +4 -0
  21. package/dist/typings/common-types.d.ts +45 -0
  22. package/dist/typings/create-environment-api.d.ts +112 -0
  23. package/dist/typings/entities/agent-run.d.ts +47 -0
  24. package/dist/typings/entities/agent.d.ts +49 -0
  25. package/dist/typings/entities/index.d.ts +4 -0
  26. package/dist/typings/export-types.d.ts +2 -0
  27. package/dist/typings/plain/common-types.d.ts +4 -0
  28. package/dist/typings/plain/entities/agent-run.d.ts +27 -0
  29. package/dist/typings/plain/entities/agent.d.ts +34 -0
  30. package/package.json +3 -3
package/README.md CHANGED
@@ -162,7 +162,7 @@ const client = contentful.createClient(
162
162
  // This is the access token for this space. Normally you get the token in the Contentful web app
163
163
  accessToken: 'YOUR_ACCESS_TOKEN',
164
164
  },
165
- { type: 'plain' }
165
+ { type: 'plain' },
166
166
  )
167
167
  //....
168
168
  ```
@@ -177,7 +177,7 @@ const plainClient = contentful.createClient(
177
177
  {
178
178
  accessToken: 'YOUR_ACCESS_TOKEN',
179
179
  },
180
- { type: 'plain' }
180
+ { type: 'plain' },
181
181
  )
182
182
 
183
183
  const environment = await plainClient.environment.get({
@@ -205,7 +205,7 @@ const scopedPlainClient = contentful.createClient(
205
205
  spaceId: '<space_id>',
206
206
  environmentId: '<environment_id>',
207
207
  },
208
- }
208
+ },
209
209
  )
210
210
 
211
211
  // entries from '<space_id>' & '<environment_id>'
@@ -232,18 +232,19 @@ The benefits of using the "plain" version of the client, over the legacy version
232
232
  Cursor-based pagination is supported on collection endpoints for content types, entries, and assets. To use cursor-based pagination, use the related entity methods `getAssetsWithCursor`, `getContentTypesWithCursor`, and `getEntriesWithCursor`
233
233
 
234
234
  ```js
235
- const response = await environment.getEntriesWithCursor({ limit: 10 });
236
- console.log(response.items); // Array of items
237
- console.log(response.pages?.next); // Cursor for next page
235
+ const response = await environment.getEntriesWithCursor({ limit: 10 })
236
+ console.log(response.items) // Array of items
237
+ console.log(response.pages?.next) // Cursor for next page
238
238
  ```
239
+
239
240
  Use the value from `response.pages.next` to fetch the next page.
240
241
 
241
242
  ```js
242
243
  const secondPage = await environment.getEntriesWithCursor({
243
244
  limit: 2,
244
245
  pageNext: response.pages?.next,
245
- });
246
- console.log(secondPage.items); // Array of items
246
+ })
247
+ console.log(secondPage.items) // Array of items
247
248
  ```
248
249
 
249
250
  ## Legacy Client Interface
@@ -298,7 +299,7 @@ contentfulApp.init((sdk) => {
298
299
  environmentId: sdk.ids.environmentAlias ?? sdk.ids.environment,
299
300
  spaceId: sdk.ids.space,
300
301
  },
301
- }
302
+ },
302
303
  )
303
304
 
304
305
  // ...rest of initialization code
@@ -444,9 +445,11 @@ To download a build that has features that are not yet released, you can use the
444
445
  npm install contentful-management@canary
445
446
  ```
446
447
 
448
+ In addition, there may be some experimental features in the main build of this SDK that are subject to breaking changes without notice, which are listed below:
449
+
447
450
  ### Current experimental features
448
451
 
449
- Currently there are no features in experimental status.
452
+ - **AI Agents**: The Agent and Agent Run APIs (`getAgent`, `getAgents`, `getAgentRun`, `getAgentRuns`, `generateWithAgent`) are experimental and subject to breaking changes without notice.
450
453
 
451
454
  ## Reach out to us
452
455