@datocms/cma-client 5.2.1 → 5.2.2-alpha.0

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.
@@ -108,6 +108,16 @@ 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;
111
121
  /**
112
122
  * ID of build_trigger
113
123
  *
@@ -413,16 +423,6 @@ export type SchemaMenuItemInstancesHrefSchema = {
413
423
  * via the `definition` "type".
414
424
  */
415
425
  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,7 +1841,8 @@ export type RoleAttributes = {
1841
1841
  | 'create'
1842
1842
  | 'delete'
1843
1843
  | 'edit_creator'
1844
- | 'replace_asset';
1844
+ | 'replace_asset'
1845
+ | 'move';
1845
1846
  /**
1846
1847
  * Permitted creator
1847
1848
  */
@@ -1854,6 +1855,8 @@ export type RoleAttributes = {
1854
1855
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
1855
1856
  */
1856
1857
  locale?: string | null;
1858
+ upload_collection?: UploadCollectionIdentity | null;
1859
+ move_to_upload_collection?: UploadCollectionIdentity | null;
1857
1860
  }[];
1858
1861
  /**
1859
1862
  * Prohibited actions on a model (or all) for a role
@@ -1870,7 +1873,8 @@ export type RoleAttributes = {
1870
1873
  | 'create'
1871
1874
  | 'delete'
1872
1875
  | 'edit_creator'
1873
- | 'replace_asset';
1876
+ | 'replace_asset'
1877
+ | 'move';
1874
1878
  /**
1875
1879
  * Permitted creator
1876
1880
  */
@@ -1883,6 +1887,8 @@ export type RoleAttributes = {
1883
1887
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
1884
1888
  */
1885
1889
  locale?: string | null;
1890
+ upload_collection?: UploadCollectionIdentity | null;
1891
+ move_to_upload_collection?: UploadCollectionIdentity | null;
1886
1892
  }[];
1887
1893
  /**
1888
1894
  * Allowed build triggers for a role
@@ -2115,7 +2121,8 @@ export type RoleMeta = {
2115
2121
  | 'create'
2116
2122
  | 'delete'
2117
2123
  | 'edit_creator'
2118
- | 'replace_asset';
2124
+ | 'replace_asset'
2125
+ | 'move';
2119
2126
  /**
2120
2127
  * Permitted creator
2121
2128
  */
@@ -2128,6 +2135,8 @@ export type RoleMeta = {
2128
2135
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2129
2136
  */
2130
2137
  locale?: string | null;
2138
+ upload_collection?: UploadCollectionIdentity | null;
2139
+ move_to_upload_collection?: UploadCollectionIdentity | null;
2131
2140
  }[];
2132
2141
  /**
2133
2142
  * Prohibited actions on a model (or all) for a role
@@ -2144,7 +2153,8 @@ export type RoleMeta = {
2144
2153
  | 'create'
2145
2154
  | 'delete'
2146
2155
  | 'edit_creator'
2147
- | 'replace_asset';
2156
+ | 'replace_asset'
2157
+ | 'move';
2148
2158
  /**
2149
2159
  * Permitted creator
2150
2160
  */
@@ -2157,6 +2167,8 @@ export type RoleMeta = {
2157
2167
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2158
2168
  */
2159
2169
  locale?: string | null;
2170
+ upload_collection?: UploadCollectionIdentity | null;
2171
+ move_to_upload_collection?: UploadCollectionIdentity | null;
2160
2172
  }[];
2161
2173
  /**
2162
2174
  * Allowed build triggers for a role
@@ -2370,7 +2382,8 @@ export type RoleCreateSchema = {
2370
2382
  | 'create'
2371
2383
  | 'delete'
2372
2384
  | 'edit_creator'
2373
- | 'replace_asset';
2385
+ | 'replace_asset'
2386
+ | 'move';
2374
2387
  /**
2375
2388
  * Permitted creator
2376
2389
  */
@@ -2383,6 +2396,8 @@ export type RoleCreateSchema = {
2383
2396
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2384
2397
  */
2385
2398
  locale?: string | null;
2399
+ upload_collection?: UploadCollectionIdentity | null;
2400
+ move_to_upload_collection?: UploadCollectionIdentity | null;
2386
2401
  }[];
2387
2402
  /**
2388
2403
  * Prohibited actions on a model (or all) for a role
@@ -2399,7 +2414,8 @@ export type RoleCreateSchema = {
2399
2414
  | 'create'
2400
2415
  | 'delete'
2401
2416
  | 'edit_creator'
2402
- | 'replace_asset';
2417
+ | 'replace_asset'
2418
+ | 'move';
2403
2419
  /**
2404
2420
  * Permitted creator
2405
2421
  */
@@ -2412,6 +2428,8 @@ export type RoleCreateSchema = {
2412
2428
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2413
2429
  */
2414
2430
  locale?: string | null;
2431
+ upload_collection?: UploadCollectionIdentity | null;
2432
+ move_to_upload_collection?: UploadCollectionIdentity | null;
2415
2433
  }[];
2416
2434
  /**
2417
2435
  * Allowed build triggers for a role
@@ -2646,7 +2664,8 @@ export type RoleUpdateSchema = {
2646
2664
  | 'create'
2647
2665
  | 'delete'
2648
2666
  | 'edit_creator'
2649
- | 'replace_asset';
2667
+ | 'replace_asset'
2668
+ | 'move';
2650
2669
  /**
2651
2670
  * Permitted creator
2652
2671
  */
@@ -2659,6 +2678,8 @@ export type RoleUpdateSchema = {
2659
2678
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2660
2679
  */
2661
2680
  locale?: string | null;
2681
+ upload_collection?: UploadCollectionIdentity | null;
2682
+ move_to_upload_collection?: UploadCollectionIdentity | null;
2662
2683
  }[];
2663
2684
  /**
2664
2685
  * Prohibited actions on a model (or all) for a role
@@ -2675,7 +2696,8 @@ export type RoleUpdateSchema = {
2675
2696
  | 'create'
2676
2697
  | 'delete'
2677
2698
  | 'edit_creator'
2678
- | 'replace_asset';
2699
+ | 'replace_asset'
2700
+ | 'move';
2679
2701
  /**
2680
2702
  * Permitted creator
2681
2703
  */
@@ -2688,6 +2710,8 @@ export type RoleUpdateSchema = {
2688
2710
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2689
2711
  */
2690
2712
  locale?: string | null;
2713
+ upload_collection?: UploadCollectionIdentity | null;
2714
+ move_to_upload_collection?: UploadCollectionIdentity | null;
2691
2715
  }[];
2692
2716
  /**
2693
2717
  * Allowed build triggers for a role
@@ -8985,6 +9009,14 @@ export type UploadRequestCreateSchema = {
8985
9009
  filename?: string;
8986
9010
  [k: string]: unknown;
8987
9011
  };
9012
+ relationships?: {
9013
+ /**
9014
+ * Upload collection to which the asset belongs
9015
+ */
9016
+ upload_collection?: {
9017
+ data: UploadCollectionData | null;
9018
+ };
9019
+ };
8988
9020
  };
8989
9021
  };
8990
9022
  /**
@@ -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: [],
22
+ relationships: ['upload_collection'],
23
23
  }),
24
24
  ).then((body) =>
25
25
  Utils.deserializeResponseBody<ApiTypes.UploadRequestCreateTargetSchema>(