@datocms/cma-client 4.0.0 → 4.0.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.
Files changed (32) hide show
  1. package/dist/cjs/generated/Client.js +1 -1
  2. package/dist/cjs/generated/resources/Item.js +0 -96
  3. package/dist/cjs/generated/resources/Item.js.map +1 -1
  4. package/dist/cjs/generated/resources/Site.js +31 -0
  5. package/dist/cjs/generated/resources/Site.js.map +1 -1
  6. package/dist/cjs/generated/resources/Upload.js +0 -69
  7. package/dist/cjs/generated/resources/Upload.js.map +1 -1
  8. package/dist/esm/generated/Client.js +1 -1
  9. package/dist/esm/generated/SchemaTypes.d.ts +47 -176
  10. package/dist/esm/generated/SimpleSchemaTypes.d.ts +43 -127
  11. package/dist/esm/generated/resources/Item.d.ts +0 -66
  12. package/dist/esm/generated/resources/Item.js +0 -96
  13. package/dist/esm/generated/resources/Item.js.map +1 -1
  14. package/dist/esm/generated/resources/Site.d.ts +22 -0
  15. package/dist/esm/generated/resources/Site.js +31 -0
  16. package/dist/esm/generated/resources/Site.js.map +1 -1
  17. package/dist/esm/generated/resources/Upload.d.ts +0 -44
  18. package/dist/esm/generated/resources/Upload.js +0 -69
  19. package/dist/esm/generated/resources/Upload.js.map +1 -1
  20. package/dist/types/generated/SchemaTypes.d.ts +47 -176
  21. package/dist/types/generated/SimpleSchemaTypes.d.ts +43 -127
  22. package/dist/types/generated/resources/Item.d.ts +0 -66
  23. package/dist/types/generated/resources/Site.d.ts +22 -0
  24. package/dist/types/generated/resources/Upload.d.ts +0 -44
  25. package/package.json +4 -4
  26. package/resources.json +15 -86
  27. package/src/generated/Client.ts +1 -1
  28. package/src/generated/SchemaTypes.ts +48 -187
  29. package/src/generated/SimpleSchemaTypes.ts +43 -128
  30. package/src/generated/resources/Item.ts +0 -114
  31. package/src/generated/resources/Site.ts +37 -0
  32. package/src/generated/resources/Upload.ts +0 -88
@@ -442,120 +442,6 @@ export default class Item extends BaseResource {
442
442
  });
443
443
  }
444
444
 
445
- /**
446
- * Delete multiple records
447
- *
448
- * Read more: https://www.datocms.com/docs/content-management-api/resources/item/batch_destroy
449
- *
450
- * @throws {ApiError}
451
- * @throws {TimeoutError}
452
- *
453
- * @deprecated This API call is to be considered private and might change without notice
454
- */
455
- batchDestroy(queryParams: SimpleSchemaTypes.ItemBatchDestroyHrefSchema) {
456
- return this.rawBatchDestroy(queryParams).then((body) =>
457
- Utils.deserializeResponseBody<SimpleSchemaTypes.ItemBatchDestroyJobSchema>(
458
- body,
459
- ),
460
- );
461
- }
462
-
463
- /**
464
- * Delete multiple records
465
- *
466
- * Read more: https://www.datocms.com/docs/content-management-api/resources/item/batch_destroy
467
- *
468
- * @throws {ApiError}
469
- * @throws {TimeoutError}
470
- *
471
- * @deprecated This API call is to be considered private and might change without notice
472
- */
473
- rawBatchDestroy(
474
- queryParams: SchemaTypes.ItemBatchDestroyHrefSchema,
475
- ): Promise<SchemaTypes.ItemBatchDestroyJobSchema> {
476
- return this.client.request<SchemaTypes.ItemBatchDestroyJobSchema>({
477
- method: 'DELETE',
478
- url: '/items',
479
- queryParams,
480
- });
481
- }
482
-
483
- /**
484
- * Publish multiple records
485
- *
486
- * Read more: https://www.datocms.com/docs/content-management-api/resources/item/batch_publish
487
- *
488
- * @throws {ApiError}
489
- * @throws {TimeoutError}
490
- *
491
- * @deprecated This API call is to be considered private and might change without notice
492
- */
493
- batchPublish(queryParams: SimpleSchemaTypes.ItemBatchPublishHrefSchema) {
494
- return this.rawBatchPublish(queryParams).then((body) =>
495
- Utils.deserializeResponseBody<SimpleSchemaTypes.ItemBatchPublishJobSchema>(
496
- body,
497
- ),
498
- );
499
- }
500
-
501
- /**
502
- * Publish multiple records
503
- *
504
- * Read more: https://www.datocms.com/docs/content-management-api/resources/item/batch_publish
505
- *
506
- * @throws {ApiError}
507
- * @throws {TimeoutError}
508
- *
509
- * @deprecated This API call is to be considered private and might change without notice
510
- */
511
- rawBatchPublish(
512
- queryParams: SchemaTypes.ItemBatchPublishHrefSchema,
513
- ): Promise<SchemaTypes.ItemBatchPublishJobSchema> {
514
- return this.client.request<SchemaTypes.ItemBatchPublishJobSchema>({
515
- method: 'PUT',
516
- url: '/items/publish',
517
- queryParams,
518
- });
519
- }
520
-
521
- /**
522
- * Unpublish multiple records
523
- *
524
- * Read more: https://www.datocms.com/docs/content-management-api/resources/item/batch_unpublish
525
- *
526
- * @throws {ApiError}
527
- * @throws {TimeoutError}
528
- *
529
- * @deprecated This API call is to be considered private and might change without notice
530
- */
531
- batchUnpublish(queryParams: SimpleSchemaTypes.ItemBatchUnpublishHrefSchema) {
532
- return this.rawBatchUnpublish(queryParams).then((body) =>
533
- Utils.deserializeResponseBody<SimpleSchemaTypes.ItemBatchUnpublishJobSchema>(
534
- body,
535
- ),
536
- );
537
- }
538
-
539
- /**
540
- * Unpublish multiple records
541
- *
542
- * Read more: https://www.datocms.com/docs/content-management-api/resources/item/batch_unpublish
543
- *
544
- * @throws {ApiError}
545
- * @throws {TimeoutError}
546
- *
547
- * @deprecated This API call is to be considered private and might change without notice
548
- */
549
- rawBatchUnpublish(
550
- queryParams: SchemaTypes.ItemBatchUnpublishHrefSchema,
551
- ): Promise<SchemaTypes.ItemBatchUnpublishJobSchema> {
552
- return this.client.request<SchemaTypes.ItemBatchUnpublishJobSchema>({
553
- method: 'PUT',
554
- url: '/items/unpublish',
555
- queryParams,
556
- });
557
- }
558
-
559
445
  /**
560
446
  * Publish a record
561
447
  *
@@ -350,6 +350,43 @@ export default class Site extends BaseResource {
350
350
  );
351
351
  }
352
352
 
353
+ /**
354
+ * Activate having two different GraphQL fields for regular blocks and inline blocks
355
+ *
356
+ * Read more: https://www.datocms.com/docs/content-management-api/resources/site/activate_improved_exposure_of_inline_blocks_in_cda
357
+ *
358
+ * @throws {ApiError}
359
+ * @throws {TimeoutError}
360
+ *
361
+ * @deprecated This API call is to be considered private and might change without notice
362
+ */
363
+ activateImprovedExposureOfInlineBlocksInCda() {
364
+ return this.rawActivateImprovedExposureOfInlineBlocksInCda().then((body) =>
365
+ Utils.deserializeResponseBody<SimpleSchemaTypes.SiteActivateImprovedExposureOfInlineBlocksInCdaTargetSchema>(
366
+ body,
367
+ ),
368
+ );
369
+ }
370
+
371
+ /**
372
+ * Activate having two different GraphQL fields for regular blocks and inline blocks
373
+ *
374
+ * Read more: https://www.datocms.com/docs/content-management-api/resources/site/activate_improved_exposure_of_inline_blocks_in_cda
375
+ *
376
+ * @throws {ApiError}
377
+ * @throws {TimeoutError}
378
+ *
379
+ * @deprecated This API call is to be considered private and might change without notice
380
+ */
381
+ rawActivateImprovedExposureOfInlineBlocksInCda(): Promise<SchemaTypes.SiteActivateImprovedExposureOfInlineBlocksInCdaTargetSchema> {
382
+ return this.client.request<SchemaTypes.SiteActivateImprovedExposureOfInlineBlocksInCdaTargetSchema>(
383
+ {
384
+ method: 'PUT',
385
+ url: '/site/activate-improved-exposure-of-inline-blocks-in-cda',
386
+ },
387
+ );
388
+ }
389
+
353
390
  /**
354
391
  * Update CDN settings default assets
355
392
  *
@@ -258,94 +258,6 @@ export default class Upload extends BaseResource {
258
258
  });
259
259
  }
260
260
 
261
- /**
262
- * Batch add tags to uploads
263
- *
264
- * Read more: https://www.datocms.com/docs/content-management-api/resources/upload/batch_add_tags
265
- *
266
- * @throws {ApiError}
267
- * @throws {TimeoutError}
268
- *
269
- * @deprecated This API call is to be considered private and might change without notice
270
- */
271
- batchAddTags(
272
- body: SimpleSchemaTypes.UploadBatchAddTagsSchema,
273
- queryParams?: SimpleSchemaTypes.UploadBatchAddTagsHrefSchema,
274
- ) {
275
- return this.rawBatchAddTags(
276
- Utils.serializeRequestBody<SchemaTypes.UploadBatchAddTagsSchema>(body, {
277
- type: 'upload',
278
- attributes: ['tags'],
279
- relationships: [],
280
- }),
281
- queryParams,
282
- ).then((body) =>
283
- Utils.deserializeResponseBody<SimpleSchemaTypes.UploadBatchAddTagsJobSchema>(
284
- body,
285
- ),
286
- );
287
- }
288
-
289
- /**
290
- * Batch add tags to uploads
291
- *
292
- * Read more: https://www.datocms.com/docs/content-management-api/resources/upload/batch_add_tags
293
- *
294
- * @throws {ApiError}
295
- * @throws {TimeoutError}
296
- *
297
- * @deprecated This API call is to be considered private and might change without notice
298
- */
299
- rawBatchAddTags(
300
- body: SchemaTypes.UploadBatchAddTagsSchema,
301
- queryParams?: SchemaTypes.UploadBatchAddTagsHrefSchema,
302
- ): Promise<SchemaTypes.UploadBatchAddTagsJobSchema> {
303
- return this.client.request<SchemaTypes.UploadBatchAddTagsJobSchema>({
304
- method: 'PUT',
305
- url: '/uploads/batch-add-tags',
306
- body,
307
- queryParams,
308
- });
309
- }
310
-
311
- /**
312
- * Delete multiple uploads
313
- *
314
- * Read more: https://www.datocms.com/docs/content-management-api/resources/upload/batch_destroy
315
- *
316
- * @throws {ApiError}
317
- * @throws {TimeoutError}
318
- *
319
- * @deprecated This API call is to be considered private and might change without notice
320
- */
321
- batchDestroy(queryParams?: SimpleSchemaTypes.UploadBatchDestroyHrefSchema) {
322
- return this.rawBatchDestroy(queryParams).then((body) =>
323
- Utils.deserializeResponseBody<SimpleSchemaTypes.UploadBatchDestroyJobSchema>(
324
- body,
325
- ),
326
- );
327
- }
328
-
329
- /**
330
- * Delete multiple uploads
331
- *
332
- * Read more: https://www.datocms.com/docs/content-management-api/resources/upload/batch_destroy
333
- *
334
- * @throws {ApiError}
335
- * @throws {TimeoutError}
336
- *
337
- * @deprecated This API call is to be considered private and might change without notice
338
- */
339
- rawBatchDestroy(
340
- queryParams?: SchemaTypes.UploadBatchDestroyHrefSchema,
341
- ): Promise<SchemaTypes.UploadBatchDestroyJobSchema> {
342
- return this.client.request<SchemaTypes.UploadBatchDestroyJobSchema>({
343
- method: 'DELETE',
344
- url: '/uploads/batch-destroy',
345
- queryParams,
346
- });
347
- }
348
-
349
261
  /**
350
262
  * Referenced records
351
263
  *