@datocms/cma-client 5.2.1-alpha.0 → 5.2.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.
@@ -106,16 +106,6 @@ export type WorkflowIdentity = string;
106
106
  * via the `definition` "id".
107
107
  */
108
108
  export type EnvironmentIdentity = string;
109
- /**
110
- * RFC 4122 UUID of upload collection expressed in URL-safe base64 format
111
- *
112
- * This interface was referenced by `UploadCollection`'s JSON-Schema
113
- * via the `definition` "identity".
114
- *
115
- * This interface was referenced by `UploadCollection`'s JSON-Schema
116
- * via the `definition` "id".
117
- */
118
- export type UploadCollectionIdentity = string;
119
109
  /**
120
110
  * ID of build_trigger
121
111
  *
@@ -495,6 +485,16 @@ export type SchemaMenuItemReorderSchema = {
495
485
  * via the `reorder.jobSchema` link.
496
486
  */
497
487
  export type SchemaMenuItemReorderJobSchema = SchemaMenuItem[];
488
+ /**
489
+ * RFC 4122 UUID of upload collection expressed in URL-safe base64 format
490
+ *
491
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
492
+ * via the `definition` "identity".
493
+ *
494
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
495
+ * via the `definition` "id".
496
+ */
497
+ export type UploadCollectionIdentity = string;
498
498
  /**
499
499
  * JSON API type field
500
500
  *
@@ -2220,8 +2220,7 @@ export type Role = {
2220
2220
  | 'create'
2221
2221
  | 'delete'
2222
2222
  | 'edit_creator'
2223
- | 'replace_asset'
2224
- | 'move';
2223
+ | 'replace_asset';
2225
2224
  /**
2226
2225
  * Permitted creator
2227
2226
  */
@@ -2234,8 +2233,6 @@ export type Role = {
2234
2233
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2235
2234
  */
2236
2235
  locale?: string | null;
2237
- upload_collection?: UploadCollectionIdentity | null;
2238
- move_to_upload_collection?: UploadCollectionIdentity | null;
2239
2236
  }[];
2240
2237
  /**
2241
2238
  * Prohibited actions on a model (or all) for a role
@@ -2252,8 +2249,7 @@ export type Role = {
2252
2249
  | 'create'
2253
2250
  | 'delete'
2254
2251
  | 'edit_creator'
2255
- | 'replace_asset'
2256
- | 'move';
2252
+ | 'replace_asset';
2257
2253
  /**
2258
2254
  * Permitted creator
2259
2255
  */
@@ -2266,8 +2262,6 @@ export type Role = {
2266
2262
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2267
2263
  */
2268
2264
  locale?: string | null;
2269
- upload_collection?: UploadCollectionIdentity | null;
2270
- move_to_upload_collection?: UploadCollectionIdentity | null;
2271
2265
  }[];
2272
2266
  /**
2273
2267
  * Allowed build triggers for a role
@@ -2493,8 +2487,7 @@ export type RoleMeta = {
2493
2487
  | 'create'
2494
2488
  | 'delete'
2495
2489
  | 'edit_creator'
2496
- | 'replace_asset'
2497
- | 'move';
2490
+ | 'replace_asset';
2498
2491
  /**
2499
2492
  * Permitted creator
2500
2493
  */
@@ -2507,8 +2500,6 @@ export type RoleMeta = {
2507
2500
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2508
2501
  */
2509
2502
  locale?: string | null;
2510
- upload_collection?: UploadCollectionIdentity | null;
2511
- move_to_upload_collection?: UploadCollectionIdentity | null;
2512
2503
  }[];
2513
2504
  /**
2514
2505
  * Prohibited actions on a model (or all) for a role
@@ -2525,8 +2516,7 @@ export type RoleMeta = {
2525
2516
  | 'create'
2526
2517
  | 'delete'
2527
2518
  | 'edit_creator'
2528
- | 'replace_asset'
2529
- | 'move';
2519
+ | 'replace_asset';
2530
2520
  /**
2531
2521
  * Permitted creator
2532
2522
  */
@@ -2539,8 +2529,6 @@ export type RoleMeta = {
2539
2529
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2540
2530
  */
2541
2531
  locale?: string | null;
2542
- upload_collection?: UploadCollectionIdentity | null;
2543
- move_to_upload_collection?: UploadCollectionIdentity | null;
2544
2532
  }[];
2545
2533
  /**
2546
2534
  * Allowed build triggers for a role
@@ -2750,8 +2738,7 @@ export type RoleAttributes = {
2750
2738
  | 'create'
2751
2739
  | 'delete'
2752
2740
  | 'edit_creator'
2753
- | 'replace_asset'
2754
- | 'move';
2741
+ | 'replace_asset';
2755
2742
  /**
2756
2743
  * Permitted creator
2757
2744
  */
@@ -2764,8 +2751,6 @@ export type RoleAttributes = {
2764
2751
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2765
2752
  */
2766
2753
  locale?: string | null;
2767
- upload_collection?: UploadCollectionIdentity | null;
2768
- move_to_upload_collection?: UploadCollectionIdentity | null;
2769
2754
  }[];
2770
2755
  /**
2771
2756
  * Prohibited actions on a model (or all) for a role
@@ -2782,8 +2767,7 @@ export type RoleAttributes = {
2782
2767
  | 'create'
2783
2768
  | 'delete'
2784
2769
  | 'edit_creator'
2785
- | 'replace_asset'
2786
- | 'move';
2770
+ | 'replace_asset';
2787
2771
  /**
2788
2772
  * Permitted creator
2789
2773
  */
@@ -2796,8 +2780,6 @@ export type RoleAttributes = {
2796
2780
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2797
2781
  */
2798
2782
  locale?: string | null;
2799
- upload_collection?: UploadCollectionIdentity | null;
2800
- move_to_upload_collection?: UploadCollectionIdentity | null;
2801
2783
  }[];
2802
2784
  /**
2803
2785
  * Allowed build triggers for a role
@@ -3014,8 +2996,7 @@ export type RoleCreateSchema = {
3014
2996
  | 'create'
3015
2997
  | 'delete'
3016
2998
  | 'edit_creator'
3017
- | 'replace_asset'
3018
- | 'move';
2999
+ | 'replace_asset';
3019
3000
  /**
3020
3001
  * Permitted creator
3021
3002
  */
@@ -3028,8 +3009,6 @@ export type RoleCreateSchema = {
3028
3009
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
3029
3010
  */
3030
3011
  locale?: string | null;
3031
- upload_collection?: UploadCollectionIdentity | null;
3032
- move_to_upload_collection?: UploadCollectionIdentity | null;
3033
3012
  }[];
3034
3013
  /**
3035
3014
  * Prohibited actions on a model (or all) for a role
@@ -3046,8 +3025,7 @@ export type RoleCreateSchema = {
3046
3025
  | 'create'
3047
3026
  | 'delete'
3048
3027
  | 'edit_creator'
3049
- | 'replace_asset'
3050
- | 'move';
3028
+ | 'replace_asset';
3051
3029
  /**
3052
3030
  * Permitted creator
3053
3031
  */
@@ -3060,8 +3038,6 @@ export type RoleCreateSchema = {
3060
3038
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
3061
3039
  */
3062
3040
  locale?: string | null;
3063
- upload_collection?: UploadCollectionIdentity | null;
3064
- move_to_upload_collection?: UploadCollectionIdentity | null;
3065
3041
  }[];
3066
3042
  /**
3067
3043
  * Allowed build triggers for a role
@@ -3272,8 +3248,7 @@ export type RoleUpdateSchema = {
3272
3248
  | 'create'
3273
3249
  | 'delete'
3274
3250
  | 'edit_creator'
3275
- | 'replace_asset'
3276
- | 'move';
3251
+ | 'replace_asset';
3277
3252
  /**
3278
3253
  * Permitted creator
3279
3254
  */
@@ -3286,8 +3261,6 @@ export type RoleUpdateSchema = {
3286
3261
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
3287
3262
  */
3288
3263
  locale?: string | null;
3289
- upload_collection?: UploadCollectionIdentity | null;
3290
- move_to_upload_collection?: UploadCollectionIdentity | null;
3291
3264
  }[];
3292
3265
  /**
3293
3266
  * Prohibited actions on a model (or all) for a role
@@ -3304,8 +3277,7 @@ export type RoleUpdateSchema = {
3304
3277
  | 'create'
3305
3278
  | 'delete'
3306
3279
  | 'edit_creator'
3307
- | 'replace_asset'
3308
- | 'move';
3280
+ | 'replace_asset';
3309
3281
  /**
3310
3282
  * Permitted creator
3311
3283
  */
@@ -3318,8 +3290,6 @@ export type RoleUpdateSchema = {
3318
3290
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
3319
3291
  */
3320
3292
  locale?: string | null;
3321
- upload_collection?: UploadCollectionIdentity | null;
3322
- move_to_upload_collection?: UploadCollectionIdentity | null;
3323
3293
  }[];
3324
3294
  /**
3325
3295
  * Allowed build triggers for a role
@@ -3582,6 +3552,28 @@ export type AccessToken = {
3582
3552
  */
3583
3553
  can_access_cma: boolean;
3584
3554
  hardcoded_type: null | string;
3555
+ /**
3556
+ * When this API token was last used to access the Content Management API
3557
+ */
3558
+ last_cma_access:
3559
+ | 'today'
3560
+ | 'yesterday'
3561
+ | 'this_week'
3562
+ | 'last_week'
3563
+ | 'this_month'
3564
+ | 'last_month'
3565
+ | 'never';
3566
+ /**
3567
+ * When this API token was last used to access the Content Delivery API
3568
+ */
3569
+ last_cda_access:
3570
+ | 'today'
3571
+ | 'yesterday'
3572
+ | 'this_week'
3573
+ | 'last_week'
3574
+ | 'this_month'
3575
+ | 'last_month'
3576
+ | 'never';
3585
3577
  role: RoleData | null;
3586
3578
  };
3587
3579
  export type AccessTokenCreateTargetSchema = AccessToken;
@@ -3627,6 +3619,28 @@ export type AccessTokenAttributes = {
3627
3619
  */
3628
3620
  can_access_cma: boolean;
3629
3621
  hardcoded_type: null | string;
3622
+ /**
3623
+ * When this API token was last used to access the Content Management API
3624
+ */
3625
+ last_cma_access:
3626
+ | 'today'
3627
+ | 'yesterday'
3628
+ | 'this_week'
3629
+ | 'last_week'
3630
+ | 'this_month'
3631
+ | 'last_month'
3632
+ | 'never';
3633
+ /**
3634
+ * When this API token was last used to access the Content Delivery API
3635
+ */
3636
+ last_cda_access:
3637
+ | 'today'
3638
+ | 'yesterday'
3639
+ | 'this_week'
3640
+ | 'last_week'
3641
+ | 'this_month'
3642
+ | 'last_month'
3643
+ | 'never';
3630
3644
  };
3631
3645
  /**
3632
3646
  * JSON API links
@@ -8736,7 +8750,6 @@ export type UploadRequestCreateSchema = {
8736
8750
  * The original file name
8737
8751
  */
8738
8752
  filename?: string;
8739
- upload_collection?: UploadCollectionData | null;
8740
8753
  };
8741
8754
  /**
8742
8755
  * If the asset linked to an Upload entity is a video file, you have the option to include additional audio tracks and subtitle tracks to it.
@@ -151,7 +151,7 @@ export class Client {
151
151
  ...this.config,
152
152
  ...options,
153
153
  logFn: this.config.logFn || console.log,
154
- userAgent: '@datocms/cma-client v5.2.1-alpha.0',
154
+ userAgent: '@datocms/cma-client v5.2.1',
155
155
  baseUrl: this.baseUrl,
156
156
  preCallStack: new Error().stack,
157
157
  extraHeaders: {
@@ -108,16 +108,6 @@ export type WorkflowIdentity = string;
108
108
  * via the `definition` "id".
109
109
  */
110
110
  export type EnvironmentIdentity = string;
111
- /**
112
- * RFC 4122 UUID of upload collection expressed in URL-safe base64 format
113
- *
114
- * This interface was referenced by `UploadCollection`'s JSON-Schema
115
- * via the `definition` "identity".
116
- *
117
- * This interface was referenced by `UploadCollection`'s JSON-Schema
118
- * via the `definition` "id".
119
- */
120
- export type UploadCollectionIdentity = string;
121
111
  /**
122
112
  * ID of build_trigger
123
113
  *
@@ -423,6 +413,16 @@ export type SchemaMenuItemInstancesHrefSchema = {
423
413
  * via the `definition` "type".
424
414
  */
425
415
  export type UploadCollectionType = 'upload_collection';
416
+ /**
417
+ * RFC 4122 UUID of upload collection expressed in URL-safe base64 format
418
+ *
419
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
420
+ * via the `definition` "identity".
421
+ *
422
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
423
+ * via the `definition` "id".
424
+ */
425
+ export type UploadCollectionIdentity = string;
426
426
  /**
427
427
  * This interface was referenced by `UploadCollection`'s JSON-Schema
428
428
  * via the `instances.hrefSchema` link.
@@ -1841,8 +1841,7 @@ export type RoleAttributes = {
1841
1841
  | 'create'
1842
1842
  | 'delete'
1843
1843
  | 'edit_creator'
1844
- | 'replace_asset'
1845
- | 'move';
1844
+ | 'replace_asset';
1846
1845
  /**
1847
1846
  * Permitted creator
1848
1847
  */
@@ -1855,8 +1854,6 @@ export type RoleAttributes = {
1855
1854
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
1856
1855
  */
1857
1856
  locale?: string | null;
1858
- upload_collection?: UploadCollectionIdentity | null;
1859
- move_to_upload_collection?: UploadCollectionIdentity | null;
1860
1857
  }[];
1861
1858
  /**
1862
1859
  * Prohibited actions on a model (or all) for a role
@@ -1873,8 +1870,7 @@ export type RoleAttributes = {
1873
1870
  | 'create'
1874
1871
  | 'delete'
1875
1872
  | 'edit_creator'
1876
- | 'replace_asset'
1877
- | 'move';
1873
+ | 'replace_asset';
1878
1874
  /**
1879
1875
  * Permitted creator
1880
1876
  */
@@ -1887,8 +1883,6 @@ export type RoleAttributes = {
1887
1883
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
1888
1884
  */
1889
1885
  locale?: string | null;
1890
- upload_collection?: UploadCollectionIdentity | null;
1891
- move_to_upload_collection?: UploadCollectionIdentity | null;
1892
1886
  }[];
1893
1887
  /**
1894
1888
  * Allowed build triggers for a role
@@ -2121,8 +2115,7 @@ export type RoleMeta = {
2121
2115
  | 'create'
2122
2116
  | 'delete'
2123
2117
  | 'edit_creator'
2124
- | 'replace_asset'
2125
- | 'move';
2118
+ | 'replace_asset';
2126
2119
  /**
2127
2120
  * Permitted creator
2128
2121
  */
@@ -2135,8 +2128,6 @@ export type RoleMeta = {
2135
2128
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2136
2129
  */
2137
2130
  locale?: string | null;
2138
- upload_collection?: UploadCollectionIdentity | null;
2139
- move_to_upload_collection?: UploadCollectionIdentity | null;
2140
2131
  }[];
2141
2132
  /**
2142
2133
  * Prohibited actions on a model (or all) for a role
@@ -2153,8 +2144,7 @@ export type RoleMeta = {
2153
2144
  | 'create'
2154
2145
  | 'delete'
2155
2146
  | 'edit_creator'
2156
- | 'replace_asset'
2157
- | 'move';
2147
+ | 'replace_asset';
2158
2148
  /**
2159
2149
  * Permitted creator
2160
2150
  */
@@ -2167,8 +2157,6 @@ export type RoleMeta = {
2167
2157
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2168
2158
  */
2169
2159
  locale?: string | null;
2170
- upload_collection?: UploadCollectionIdentity | null;
2171
- move_to_upload_collection?: UploadCollectionIdentity | null;
2172
2160
  }[];
2173
2161
  /**
2174
2162
  * Allowed build triggers for a role
@@ -2382,8 +2370,7 @@ export type RoleCreateSchema = {
2382
2370
  | 'create'
2383
2371
  | 'delete'
2384
2372
  | 'edit_creator'
2385
- | 'replace_asset'
2386
- | 'move';
2373
+ | 'replace_asset';
2387
2374
  /**
2388
2375
  * Permitted creator
2389
2376
  */
@@ -2396,8 +2383,6 @@ export type RoleCreateSchema = {
2396
2383
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2397
2384
  */
2398
2385
  locale?: string | null;
2399
- upload_collection?: UploadCollectionIdentity | null;
2400
- move_to_upload_collection?: UploadCollectionIdentity | null;
2401
2386
  }[];
2402
2387
  /**
2403
2388
  * Prohibited actions on a model (or all) for a role
@@ -2414,8 +2399,7 @@ export type RoleCreateSchema = {
2414
2399
  | 'create'
2415
2400
  | 'delete'
2416
2401
  | 'edit_creator'
2417
- | 'replace_asset'
2418
- | 'move';
2402
+ | 'replace_asset';
2419
2403
  /**
2420
2404
  * Permitted creator
2421
2405
  */
@@ -2428,8 +2412,6 @@ export type RoleCreateSchema = {
2428
2412
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2429
2413
  */
2430
2414
  locale?: string | null;
2431
- upload_collection?: UploadCollectionIdentity | null;
2432
- move_to_upload_collection?: UploadCollectionIdentity | null;
2433
2415
  }[];
2434
2416
  /**
2435
2417
  * Allowed build triggers for a role
@@ -2664,8 +2646,7 @@ export type RoleUpdateSchema = {
2664
2646
  | 'create'
2665
2647
  | 'delete'
2666
2648
  | 'edit_creator'
2667
- | 'replace_asset'
2668
- | 'move';
2649
+ | 'replace_asset';
2669
2650
  /**
2670
2651
  * Permitted creator
2671
2652
  */
@@ -2678,8 +2659,6 @@ export type RoleUpdateSchema = {
2678
2659
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2679
2660
  */
2680
2661
  locale?: string | null;
2681
- upload_collection?: UploadCollectionIdentity | null;
2682
- move_to_upload_collection?: UploadCollectionIdentity | null;
2683
2662
  }[];
2684
2663
  /**
2685
2664
  * Prohibited actions on a model (or all) for a role
@@ -2696,8 +2675,7 @@ export type RoleUpdateSchema = {
2696
2675
  | 'create'
2697
2676
  | 'delete'
2698
2677
  | 'edit_creator'
2699
- | 'replace_asset'
2700
- | 'move';
2678
+ | 'replace_asset';
2701
2679
  /**
2702
2680
  * Permitted creator
2703
2681
  */
@@ -2710,8 +2688,6 @@ export type RoleUpdateSchema = {
2710
2688
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2711
2689
  */
2712
2690
  locale?: string | null;
2713
- upload_collection?: UploadCollectionIdentity | null;
2714
- move_to_upload_collection?: UploadCollectionIdentity | null;
2715
2691
  }[];
2716
2692
  /**
2717
2693
  * Allowed build triggers for a role
@@ -3075,6 +3051,28 @@ export type AccessTokenAttributes = {
3075
3051
  */
3076
3052
  can_access_cma: boolean;
3077
3053
  hardcoded_type: null | string;
3054
+ /**
3055
+ * When this API token was last used to access the Content Management API
3056
+ */
3057
+ last_cma_access:
3058
+ | 'today'
3059
+ | 'yesterday'
3060
+ | 'this_week'
3061
+ | 'last_week'
3062
+ | 'this_month'
3063
+ | 'last_month'
3064
+ | 'never';
3065
+ /**
3066
+ * When this API token was last used to access the Content Delivery API
3067
+ */
3068
+ last_cda_access:
3069
+ | 'today'
3070
+ | 'yesterday'
3071
+ | 'this_week'
3072
+ | 'last_week'
3073
+ | 'this_month'
3074
+ | 'last_month'
3075
+ | 'never';
3078
3076
  };
3079
3077
  /**
3080
3078
  * JSON API links
@@ -8987,14 +8985,6 @@ export type UploadRequestCreateSchema = {
8987
8985
  filename?: string;
8988
8986
  [k: string]: unknown;
8989
8987
  };
8990
- relationships?: {
8991
- /**
8992
- * Upload collection to which the asset belongs
8993
- */
8994
- upload_collection?: {
8995
- data: UploadCollectionData | null;
8996
- };
8997
- };
8998
8988
  };
8999
8989
  };
9000
8990
  /**
@@ -19,7 +19,7 @@ export default class UploadRequest extends BaseResource {
19
19
  Utils.serializeRequestBody<RawApiTypes.UploadRequestCreateSchema>(body, {
20
20
  type: 'upload_request',
21
21
  attributes: ['filename'],
22
- relationships: ['upload_collection'],
22
+ relationships: [],
23
23
  }),
24
24
  ).then((body) =>
25
25
  Utils.deserializeResponseBody<ApiTypes.UploadRequestCreateTargetSchema>(