@datocms/cma-client 5.2.1 → 5.2.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.
@@ -90,7 +90,7 @@ class Client {
90
90
  return this.config.baseUrl || Client.defaultBaseUrl;
91
91
  }
92
92
  request(options) {
93
- return (0, rest_client_utils_1.request)(Object.assign(Object.assign(Object.assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client v5.2.1', baseUrl: this.baseUrl, preCallStack: new Error().stack, extraHeaders: Object.assign(Object.assign(Object.assign({}, (this.config.extraHeaders || {})), (this.config.environment
93
+ return (0, rest_client_utils_1.request)(Object.assign(Object.assign(Object.assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client v5.2.2', baseUrl: this.baseUrl, preCallStack: new Error().stack, extraHeaders: Object.assign(Object.assign(Object.assign({}, (this.config.extraHeaders || {})), (this.config.environment
94
94
  ? { 'X-Environment': this.config.environment }
95
95
  : {})), { 'X-API-Version': '3' }), fetchJobResult: (jobId) => {
96
96
  return this.jobResultsFetcher
@@ -41,7 +41,7 @@ class UploadRequest extends BaseResource_1.default {
41
41
  return this.rawCreate(Utils.serializeRequestBody(body, {
42
42
  type: 'upload_request',
43
43
  attributes: ['filename'],
44
- relationships: [],
44
+ relationships: ['upload_collection'],
45
45
  })).then((body) => Utils.deserializeResponseBody(body));
46
46
  }
47
47
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"UploadRequest.js","sourceRoot":"","sources":["../../../../src/generated/resources/UploadRequest.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kEAAoD;AACpD,sEAA8C;AAI9C,MAAqB,aAAc,SAAQ,sBAAY;IAGrD;;;;;;;OAOG;IACH,MAAM,CAAC,IAAwC;QAC7C,OAAO,IAAI,CAAC,SAAS,CACnB,KAAK,CAAC,oBAAoB,CAAwC,IAAI,EAAE;YACtE,IAAI,EAAE,gBAAgB;YACtB,UAAU,EAAE,CAAC,UAAU,CAAC;YACxB,aAAa,EAAE,EAAE;SAClB,CAAC,CACH,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CACd,KAAK,CAAC,uBAAuB,CAC3B,IAAI,CACL,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACH,SAAS,CACP,IAA2C;QAE3C,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAA8C;YACtE,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,kBAAkB;YACvB,IAAI;SACL,CAAC,CAAC;IACL,CAAC;;AAzCH,gCA0CC;AAzCiB,kBAAI,GAAG,gBAAyB,CAAC"}
1
+ {"version":3,"file":"UploadRequest.js","sourceRoot":"","sources":["../../../../src/generated/resources/UploadRequest.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kEAAoD;AACpD,sEAA8C;AAI9C,MAAqB,aAAc,SAAQ,sBAAY;IAGrD;;;;;;;OAOG;IACH,MAAM,CAAC,IAAwC;QAC7C,OAAO,IAAI,CAAC,SAAS,CACnB,KAAK,CAAC,oBAAoB,CAAwC,IAAI,EAAE;YACtE,IAAI,EAAE,gBAAgB;YACtB,UAAU,EAAE,CAAC,UAAU,CAAC;YACxB,aAAa,EAAE,CAAC,mBAAmB,CAAC;SACrC,CAAC,CACH,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CACd,KAAK,CAAC,uBAAuB,CAC3B,IAAI,CACL,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACH,SAAS,CACP,IAA2C;QAE3C,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAA8C;YACtE,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,kBAAkB;YACvB,IAAI;SACL,CAAC,CAAC;IACL,CAAC;;AAzCH,gCA0CC;AAzCiB,kBAAI,GAAG,gBAAyB,CAAC"}
@@ -72,6 +72,16 @@ export type WorkflowIdentity = string;
72
72
  * via the `definition` "id".
73
73
  */
74
74
  export type EnvironmentIdentity = string;
75
+ /**
76
+ * RFC 4122 UUID of upload collection expressed in URL-safe base64 format
77
+ *
78
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
79
+ * via the `definition` "identity".
80
+ *
81
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
82
+ * via the `definition` "id".
83
+ */
84
+ export type UploadCollectionIdentity = string;
75
85
  /**
76
86
  * ID of build_trigger
77
87
  *
@@ -451,16 +461,6 @@ export type SchemaMenuItemReorderSchema = {
451
461
  * via the `reorder.jobSchema` link.
452
462
  */
453
463
  export type SchemaMenuItemReorderJobSchema = SchemaMenuItem[];
454
- /**
455
- * RFC 4122 UUID of upload collection expressed in URL-safe base64 format
456
- *
457
- * This interface was referenced by `UploadCollection`'s JSON-Schema
458
- * via the `definition` "identity".
459
- *
460
- * This interface was referenced by `UploadCollection`'s JSON-Schema
461
- * via the `definition` "id".
462
- */
463
- export type UploadCollectionIdentity = string;
464
464
  /**
465
465
  * JSON API type field
466
466
  *
@@ -2066,7 +2066,7 @@ export type Role = {
2066
2066
  /**
2067
2067
  * Permitted action
2068
2068
  */
2069
- action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset';
2069
+ action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset' | 'move';
2070
2070
  /**
2071
2071
  * Permitted creator
2072
2072
  */
@@ -2079,6 +2079,8 @@ export type Role = {
2079
2079
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2080
2080
  */
2081
2081
  locale?: string | null;
2082
+ upload_collection?: UploadCollectionIdentity | null;
2083
+ move_to_upload_collection?: UploadCollectionIdentity | null;
2082
2084
  }[];
2083
2085
  /**
2084
2086
  * Prohibited actions on a model (or all) for a role
@@ -2088,7 +2090,7 @@ export type Role = {
2088
2090
  /**
2089
2091
  * Permitted action
2090
2092
  */
2091
- action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset';
2093
+ action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset' | 'move';
2092
2094
  /**
2093
2095
  * Permitted creator
2094
2096
  */
@@ -2101,6 +2103,8 @@ export type Role = {
2101
2103
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2102
2104
  */
2103
2105
  locale?: string | null;
2106
+ upload_collection?: UploadCollectionIdentity | null;
2107
+ move_to_upload_collection?: UploadCollectionIdentity | null;
2104
2108
  }[];
2105
2109
  /**
2106
2110
  * Allowed build triggers for a role
@@ -2299,7 +2303,7 @@ export type RoleMeta = {
2299
2303
  /**
2300
2304
  * Permitted action
2301
2305
  */
2302
- action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset';
2306
+ action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset' | 'move';
2303
2307
  /**
2304
2308
  * Permitted creator
2305
2309
  */
@@ -2312,6 +2316,8 @@ export type RoleMeta = {
2312
2316
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2313
2317
  */
2314
2318
  locale?: string | null;
2319
+ upload_collection?: UploadCollectionIdentity | null;
2320
+ move_to_upload_collection?: UploadCollectionIdentity | null;
2315
2321
  }[];
2316
2322
  /**
2317
2323
  * Prohibited actions on a model (or all) for a role
@@ -2321,7 +2327,7 @@ export type RoleMeta = {
2321
2327
  /**
2322
2328
  * Permitted action
2323
2329
  */
2324
- action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset';
2330
+ action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset' | 'move';
2325
2331
  /**
2326
2332
  * Permitted creator
2327
2333
  */
@@ -2334,6 +2340,8 @@ export type RoleMeta = {
2334
2340
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2335
2341
  */
2336
2342
  locale?: string | null;
2343
+ upload_collection?: UploadCollectionIdentity | null;
2344
+ move_to_upload_collection?: UploadCollectionIdentity | null;
2337
2345
  }[];
2338
2346
  /**
2339
2347
  * Allowed build triggers for a role
@@ -2516,7 +2524,7 @@ export type RoleAttributes = {
2516
2524
  /**
2517
2525
  * Permitted action
2518
2526
  */
2519
- action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset';
2527
+ action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset' | 'move';
2520
2528
  /**
2521
2529
  * Permitted creator
2522
2530
  */
@@ -2529,6 +2537,8 @@ export type RoleAttributes = {
2529
2537
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2530
2538
  */
2531
2539
  locale?: string | null;
2540
+ upload_collection?: UploadCollectionIdentity | null;
2541
+ move_to_upload_collection?: UploadCollectionIdentity | null;
2532
2542
  }[];
2533
2543
  /**
2534
2544
  * Prohibited actions on a model (or all) for a role
@@ -2538,7 +2548,7 @@ export type RoleAttributes = {
2538
2548
  /**
2539
2549
  * Permitted action
2540
2550
  */
2541
- action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset';
2551
+ action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset' | 'move';
2542
2552
  /**
2543
2553
  * Permitted creator
2544
2554
  */
@@ -2551,6 +2561,8 @@ export type RoleAttributes = {
2551
2561
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2552
2562
  */
2553
2563
  locale?: string | null;
2564
+ upload_collection?: UploadCollectionIdentity | null;
2565
+ move_to_upload_collection?: UploadCollectionIdentity | null;
2554
2566
  }[];
2555
2567
  /**
2556
2568
  * Allowed build triggers for a role
@@ -2740,7 +2752,7 @@ export type RoleCreateSchema = {
2740
2752
  /**
2741
2753
  * Permitted action
2742
2754
  */
2743
- action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset';
2755
+ action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset' | 'move';
2744
2756
  /**
2745
2757
  * Permitted creator
2746
2758
  */
@@ -2753,6 +2765,8 @@ export type RoleCreateSchema = {
2753
2765
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2754
2766
  */
2755
2767
  locale?: string | null;
2768
+ upload_collection?: UploadCollectionIdentity | null;
2769
+ move_to_upload_collection?: UploadCollectionIdentity | null;
2756
2770
  }[];
2757
2771
  /**
2758
2772
  * Prohibited actions on a model (or all) for a role
@@ -2762,7 +2776,7 @@ export type RoleCreateSchema = {
2762
2776
  /**
2763
2777
  * Permitted action
2764
2778
  */
2765
- action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset';
2779
+ action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset' | 'move';
2766
2780
  /**
2767
2781
  * Permitted creator
2768
2782
  */
@@ -2775,6 +2789,8 @@ export type RoleCreateSchema = {
2775
2789
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2776
2790
  */
2777
2791
  locale?: string | null;
2792
+ upload_collection?: UploadCollectionIdentity | null;
2793
+ move_to_upload_collection?: UploadCollectionIdentity | null;
2778
2794
  }[];
2779
2795
  /**
2780
2796
  * Allowed build triggers for a role
@@ -2958,7 +2974,7 @@ export type RoleUpdateSchema = {
2958
2974
  /**
2959
2975
  * Permitted action
2960
2976
  */
2961
- action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset';
2977
+ action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset' | 'move';
2962
2978
  /**
2963
2979
  * Permitted creator
2964
2980
  */
@@ -2971,6 +2987,8 @@ export type RoleUpdateSchema = {
2971
2987
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2972
2988
  */
2973
2989
  locale?: string | null;
2990
+ upload_collection?: UploadCollectionIdentity | null;
2991
+ move_to_upload_collection?: UploadCollectionIdentity | null;
2974
2992
  }[];
2975
2993
  /**
2976
2994
  * Prohibited actions on a model (or all) for a role
@@ -2980,7 +2998,7 @@ export type RoleUpdateSchema = {
2980
2998
  /**
2981
2999
  * Permitted action
2982
3000
  */
2983
- action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset';
3001
+ action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset' | 'move';
2984
3002
  /**
2985
3003
  * Permitted creator
2986
3004
  */
@@ -2993,6 +3011,8 @@ export type RoleUpdateSchema = {
2993
3011
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2994
3012
  */
2995
3013
  locale?: string | null;
3014
+ upload_collection?: UploadCollectionIdentity | null;
3015
+ move_to_upload_collection?: UploadCollectionIdentity | null;
2996
3016
  }[];
2997
3017
  /**
2998
3018
  * Allowed build triggers for a role
@@ -8126,6 +8146,7 @@ export type UploadRequestCreateSchema = {
8126
8146
  * The original file name
8127
8147
  */
8128
8148
  filename?: string;
8149
+ upload_collection?: UploadCollectionData | null;
8129
8150
  };
8130
8151
  /**
8131
8152
  * 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.
@@ -64,7 +64,7 @@ export class Client {
64
64
  return this.config.baseUrl || Client.defaultBaseUrl;
65
65
  }
66
66
  request(options) {
67
- return request(Object.assign(Object.assign(Object.assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client v5.2.1', baseUrl: this.baseUrl, preCallStack: new Error().stack, extraHeaders: Object.assign(Object.assign(Object.assign({}, (this.config.extraHeaders || {})), (this.config.environment
67
+ return request(Object.assign(Object.assign(Object.assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client v5.2.2', baseUrl: this.baseUrl, preCallStack: new Error().stack, extraHeaders: Object.assign(Object.assign(Object.assign({}, (this.config.extraHeaders || {})), (this.config.environment
68
68
  ? { 'X-Environment': this.config.environment }
69
69
  : {})), { 'X-API-Version': '3' }), fetchJobResult: (jobId) => {
70
70
  return this.jobResultsFetcher
@@ -80,6 +80,16 @@ export type WorkflowIdentity = string;
80
80
  * via the `definition` "id".
81
81
  */
82
82
  export type EnvironmentIdentity = string;
83
+ /**
84
+ * RFC 4122 UUID of upload collection expressed in URL-safe base64 format
85
+ *
86
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
87
+ * via the `definition` "identity".
88
+ *
89
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
90
+ * via the `definition` "id".
91
+ */
92
+ export type UploadCollectionIdentity = string;
83
93
  /**
84
94
  * ID of build_trigger
85
95
  *
@@ -385,16 +395,6 @@ export type SchemaMenuItemInstancesHrefSchema = {
385
395
  * via the `definition` "type".
386
396
  */
387
397
  export type UploadCollectionType = 'upload_collection';
388
- /**
389
- * RFC 4122 UUID of upload collection expressed in URL-safe base64 format
390
- *
391
- * This interface was referenced by `UploadCollection`'s JSON-Schema
392
- * via the `definition` "identity".
393
- *
394
- * This interface was referenced by `UploadCollection`'s JSON-Schema
395
- * via the `definition` "id".
396
- */
397
- export type UploadCollectionIdentity = string;
398
398
  /**
399
399
  * This interface was referenced by `UploadCollection`'s JSON-Schema
400
400
  * via the `instances.hrefSchema` link.
@@ -1716,7 +1716,7 @@ export type RoleAttributes = {
1716
1716
  /**
1717
1717
  * Permitted action
1718
1718
  */
1719
- action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset';
1719
+ action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset' | 'move';
1720
1720
  /**
1721
1721
  * Permitted creator
1722
1722
  */
@@ -1729,6 +1729,8 @@ export type RoleAttributes = {
1729
1729
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
1730
1730
  */
1731
1731
  locale?: string | null;
1732
+ upload_collection?: UploadCollectionIdentity | null;
1733
+ move_to_upload_collection?: UploadCollectionIdentity | null;
1732
1734
  }[];
1733
1735
  /**
1734
1736
  * Prohibited actions on a model (or all) for a role
@@ -1738,7 +1740,7 @@ export type RoleAttributes = {
1738
1740
  /**
1739
1741
  * Permitted action
1740
1742
  */
1741
- action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset';
1743
+ action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset' | 'move';
1742
1744
  /**
1743
1745
  * Permitted creator
1744
1746
  */
@@ -1751,6 +1753,8 @@ export type RoleAttributes = {
1751
1753
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
1752
1754
  */
1753
1755
  locale?: string | null;
1756
+ upload_collection?: UploadCollectionIdentity | null;
1757
+ move_to_upload_collection?: UploadCollectionIdentity | null;
1754
1758
  }[];
1755
1759
  /**
1756
1760
  * Allowed build triggers for a role
@@ -1956,7 +1960,7 @@ export type RoleMeta = {
1956
1960
  /**
1957
1961
  * Permitted action
1958
1962
  */
1959
- action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset';
1963
+ action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset' | 'move';
1960
1964
  /**
1961
1965
  * Permitted creator
1962
1966
  */
@@ -1969,6 +1973,8 @@ export type RoleMeta = {
1969
1973
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
1970
1974
  */
1971
1975
  locale?: string | null;
1976
+ upload_collection?: UploadCollectionIdentity | null;
1977
+ move_to_upload_collection?: UploadCollectionIdentity | null;
1972
1978
  }[];
1973
1979
  /**
1974
1980
  * Prohibited actions on a model (or all) for a role
@@ -1978,7 +1984,7 @@ export type RoleMeta = {
1978
1984
  /**
1979
1985
  * Permitted action
1980
1986
  */
1981
- action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset';
1987
+ action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset' | 'move';
1982
1988
  /**
1983
1989
  * Permitted creator
1984
1990
  */
@@ -1991,6 +1997,8 @@ export type RoleMeta = {
1991
1997
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
1992
1998
  */
1993
1999
  locale?: string | null;
2000
+ upload_collection?: UploadCollectionIdentity | null;
2001
+ move_to_upload_collection?: UploadCollectionIdentity | null;
1994
2002
  }[];
1995
2003
  /**
1996
2004
  * Allowed build triggers for a role
@@ -2177,7 +2185,7 @@ export type RoleCreateSchema = {
2177
2185
  /**
2178
2186
  * Permitted action
2179
2187
  */
2180
- action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset';
2188
+ action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset' | 'move';
2181
2189
  /**
2182
2190
  * Permitted creator
2183
2191
  */
@@ -2190,6 +2198,8 @@ export type RoleCreateSchema = {
2190
2198
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2191
2199
  */
2192
2200
  locale?: string | null;
2201
+ upload_collection?: UploadCollectionIdentity | null;
2202
+ move_to_upload_collection?: UploadCollectionIdentity | null;
2193
2203
  }[];
2194
2204
  /**
2195
2205
  * Prohibited actions on a model (or all) for a role
@@ -2199,7 +2209,7 @@ export type RoleCreateSchema = {
2199
2209
  /**
2200
2210
  * Permitted action
2201
2211
  */
2202
- action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset';
2212
+ action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset' | 'move';
2203
2213
  /**
2204
2214
  * Permitted creator
2205
2215
  */
@@ -2212,6 +2222,8 @@ export type RoleCreateSchema = {
2212
2222
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2213
2223
  */
2214
2224
  locale?: string | null;
2225
+ upload_collection?: UploadCollectionIdentity | null;
2226
+ move_to_upload_collection?: UploadCollectionIdentity | null;
2215
2227
  }[];
2216
2228
  /**
2217
2229
  * Allowed build triggers for a role
@@ -2419,7 +2431,7 @@ export type RoleUpdateSchema = {
2419
2431
  /**
2420
2432
  * Permitted action
2421
2433
  */
2422
- action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset';
2434
+ action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset' | 'move';
2423
2435
  /**
2424
2436
  * Permitted creator
2425
2437
  */
@@ -2432,6 +2444,8 @@ export type RoleUpdateSchema = {
2432
2444
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2433
2445
  */
2434
2446
  locale?: string | null;
2447
+ upload_collection?: UploadCollectionIdentity | null;
2448
+ move_to_upload_collection?: UploadCollectionIdentity | null;
2435
2449
  }[];
2436
2450
  /**
2437
2451
  * Prohibited actions on a model (or all) for a role
@@ -2441,7 +2455,7 @@ export type RoleUpdateSchema = {
2441
2455
  /**
2442
2456
  * Permitted action
2443
2457
  */
2444
- action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset';
2458
+ action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset' | 'move';
2445
2459
  /**
2446
2460
  * Permitted creator
2447
2461
  */
@@ -2454,6 +2468,8 @@ export type RoleUpdateSchema = {
2454
2468
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2455
2469
  */
2456
2470
  locale?: string | null;
2471
+ upload_collection?: UploadCollectionIdentity | null;
2472
+ move_to_upload_collection?: UploadCollectionIdentity | null;
2457
2473
  }[];
2458
2474
  /**
2459
2475
  * Allowed build triggers for a role
@@ -8474,6 +8490,14 @@ export type UploadRequestCreateSchema = {
8474
8490
  filename?: string;
8475
8491
  [k: string]: unknown;
8476
8492
  };
8493
+ relationships?: {
8494
+ /**
8495
+ * Upload collection to which the asset belongs
8496
+ */
8497
+ upload_collection?: {
8498
+ data: UploadCollectionData | null;
8499
+ };
8500
+ };
8477
8501
  };
8478
8502
  };
8479
8503
  /**
@@ -13,7 +13,7 @@ export default class UploadRequest extends BaseResource {
13
13
  return this.rawCreate(Utils.serializeRequestBody(body, {
14
14
  type: 'upload_request',
15
15
  attributes: ['filename'],
16
- relationships: [],
16
+ relationships: ['upload_collection'],
17
17
  })).then((body) => Utils.deserializeResponseBody(body));
18
18
  }
19
19
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"UploadRequest.js","sourceRoot":"","sources":["../../../../src/generated/resources/UploadRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,4BAA4B,CAAC;AACpD,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAI9C,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,YAAY;IAGrD;;;;;;;OAOG;IACH,MAAM,CAAC,IAAwC;QAC7C,OAAO,IAAI,CAAC,SAAS,CACnB,KAAK,CAAC,oBAAoB,CAAwC,IAAI,EAAE;YACtE,IAAI,EAAE,gBAAgB;YACtB,UAAU,EAAE,CAAC,UAAU,CAAC;YACxB,aAAa,EAAE,EAAE;SAClB,CAAC,CACH,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CACd,KAAK,CAAC,uBAAuB,CAC3B,IAAI,CACL,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACH,SAAS,CACP,IAA2C;QAE3C,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAA8C;YACtE,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,kBAAkB;YACvB,IAAI;SACL,CAAC,CAAC;IACL,CAAC;;AAxCe,kBAAI,GAAG,gBAAyB,CAAC"}
1
+ {"version":3,"file":"UploadRequest.js","sourceRoot":"","sources":["../../../../src/generated/resources/UploadRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,4BAA4B,CAAC;AACpD,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAI9C,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,YAAY;IAGrD;;;;;;;OAOG;IACH,MAAM,CAAC,IAAwC;QAC7C,OAAO,IAAI,CAAC,SAAS,CACnB,KAAK,CAAC,oBAAoB,CAAwC,IAAI,EAAE;YACtE,IAAI,EAAE,gBAAgB;YACtB,UAAU,EAAE,CAAC,UAAU,CAAC;YACxB,aAAa,EAAE,CAAC,mBAAmB,CAAC;SACrC,CAAC,CACH,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CACd,KAAK,CAAC,uBAAuB,CAC3B,IAAI,CACL,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACH,SAAS,CACP,IAA2C;QAE3C,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAA8C;YACtE,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,kBAAkB;YACvB,IAAI;SACL,CAAC,CAAC;IACL,CAAC;;AAxCe,kBAAI,GAAG,gBAAyB,CAAC"}
@@ -72,6 +72,16 @@ export type WorkflowIdentity = string;
72
72
  * via the `definition` "id".
73
73
  */
74
74
  export type EnvironmentIdentity = string;
75
+ /**
76
+ * RFC 4122 UUID of upload collection expressed in URL-safe base64 format
77
+ *
78
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
79
+ * via the `definition` "identity".
80
+ *
81
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
82
+ * via the `definition` "id".
83
+ */
84
+ export type UploadCollectionIdentity = string;
75
85
  /**
76
86
  * ID of build_trigger
77
87
  *
@@ -451,16 +461,6 @@ export type SchemaMenuItemReorderSchema = {
451
461
  * via the `reorder.jobSchema` link.
452
462
  */
453
463
  export type SchemaMenuItemReorderJobSchema = SchemaMenuItem[];
454
- /**
455
- * RFC 4122 UUID of upload collection expressed in URL-safe base64 format
456
- *
457
- * This interface was referenced by `UploadCollection`'s JSON-Schema
458
- * via the `definition` "identity".
459
- *
460
- * This interface was referenced by `UploadCollection`'s JSON-Schema
461
- * via the `definition` "id".
462
- */
463
- export type UploadCollectionIdentity = string;
464
464
  /**
465
465
  * JSON API type field
466
466
  *
@@ -2066,7 +2066,7 @@ export type Role = {
2066
2066
  /**
2067
2067
  * Permitted action
2068
2068
  */
2069
- action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset';
2069
+ action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset' | 'move';
2070
2070
  /**
2071
2071
  * Permitted creator
2072
2072
  */
@@ -2079,6 +2079,8 @@ export type Role = {
2079
2079
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2080
2080
  */
2081
2081
  locale?: string | null;
2082
+ upload_collection?: UploadCollectionIdentity | null;
2083
+ move_to_upload_collection?: UploadCollectionIdentity | null;
2082
2084
  }[];
2083
2085
  /**
2084
2086
  * Prohibited actions on a model (or all) for a role
@@ -2088,7 +2090,7 @@ export type Role = {
2088
2090
  /**
2089
2091
  * Permitted action
2090
2092
  */
2091
- action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset';
2093
+ action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset' | 'move';
2092
2094
  /**
2093
2095
  * Permitted creator
2094
2096
  */
@@ -2101,6 +2103,8 @@ export type Role = {
2101
2103
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2102
2104
  */
2103
2105
  locale?: string | null;
2106
+ upload_collection?: UploadCollectionIdentity | null;
2107
+ move_to_upload_collection?: UploadCollectionIdentity | null;
2104
2108
  }[];
2105
2109
  /**
2106
2110
  * Allowed build triggers for a role
@@ -2299,7 +2303,7 @@ export type RoleMeta = {
2299
2303
  /**
2300
2304
  * Permitted action
2301
2305
  */
2302
- action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset';
2306
+ action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset' | 'move';
2303
2307
  /**
2304
2308
  * Permitted creator
2305
2309
  */
@@ -2312,6 +2316,8 @@ export type RoleMeta = {
2312
2316
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2313
2317
  */
2314
2318
  locale?: string | null;
2319
+ upload_collection?: UploadCollectionIdentity | null;
2320
+ move_to_upload_collection?: UploadCollectionIdentity | null;
2315
2321
  }[];
2316
2322
  /**
2317
2323
  * Prohibited actions on a model (or all) for a role
@@ -2321,7 +2327,7 @@ export type RoleMeta = {
2321
2327
  /**
2322
2328
  * Permitted action
2323
2329
  */
2324
- action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset';
2330
+ action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset' | 'move';
2325
2331
  /**
2326
2332
  * Permitted creator
2327
2333
  */
@@ -2334,6 +2340,8 @@ export type RoleMeta = {
2334
2340
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2335
2341
  */
2336
2342
  locale?: string | null;
2343
+ upload_collection?: UploadCollectionIdentity | null;
2344
+ move_to_upload_collection?: UploadCollectionIdentity | null;
2337
2345
  }[];
2338
2346
  /**
2339
2347
  * Allowed build triggers for a role
@@ -2516,7 +2524,7 @@ export type RoleAttributes = {
2516
2524
  /**
2517
2525
  * Permitted action
2518
2526
  */
2519
- action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset';
2527
+ action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset' | 'move';
2520
2528
  /**
2521
2529
  * Permitted creator
2522
2530
  */
@@ -2529,6 +2537,8 @@ export type RoleAttributes = {
2529
2537
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2530
2538
  */
2531
2539
  locale?: string | null;
2540
+ upload_collection?: UploadCollectionIdentity | null;
2541
+ move_to_upload_collection?: UploadCollectionIdentity | null;
2532
2542
  }[];
2533
2543
  /**
2534
2544
  * Prohibited actions on a model (or all) for a role
@@ -2538,7 +2548,7 @@ export type RoleAttributes = {
2538
2548
  /**
2539
2549
  * Permitted action
2540
2550
  */
2541
- action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset';
2551
+ action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset' | 'move';
2542
2552
  /**
2543
2553
  * Permitted creator
2544
2554
  */
@@ -2551,6 +2561,8 @@ export type RoleAttributes = {
2551
2561
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2552
2562
  */
2553
2563
  locale?: string | null;
2564
+ upload_collection?: UploadCollectionIdentity | null;
2565
+ move_to_upload_collection?: UploadCollectionIdentity | null;
2554
2566
  }[];
2555
2567
  /**
2556
2568
  * Allowed build triggers for a role
@@ -2740,7 +2752,7 @@ export type RoleCreateSchema = {
2740
2752
  /**
2741
2753
  * Permitted action
2742
2754
  */
2743
- action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset';
2755
+ action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset' | 'move';
2744
2756
  /**
2745
2757
  * Permitted creator
2746
2758
  */
@@ -2753,6 +2765,8 @@ export type RoleCreateSchema = {
2753
2765
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2754
2766
  */
2755
2767
  locale?: string | null;
2768
+ upload_collection?: UploadCollectionIdentity | null;
2769
+ move_to_upload_collection?: UploadCollectionIdentity | null;
2756
2770
  }[];
2757
2771
  /**
2758
2772
  * Prohibited actions on a model (or all) for a role
@@ -2762,7 +2776,7 @@ export type RoleCreateSchema = {
2762
2776
  /**
2763
2777
  * Permitted action
2764
2778
  */
2765
- action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset';
2779
+ action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset' | 'move';
2766
2780
  /**
2767
2781
  * Permitted creator
2768
2782
  */
@@ -2775,6 +2789,8 @@ export type RoleCreateSchema = {
2775
2789
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2776
2790
  */
2777
2791
  locale?: string | null;
2792
+ upload_collection?: UploadCollectionIdentity | null;
2793
+ move_to_upload_collection?: UploadCollectionIdentity | null;
2778
2794
  }[];
2779
2795
  /**
2780
2796
  * Allowed build triggers for a role
@@ -2958,7 +2974,7 @@ export type RoleUpdateSchema = {
2958
2974
  /**
2959
2975
  * Permitted action
2960
2976
  */
2961
- action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset';
2977
+ action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset' | 'move';
2962
2978
  /**
2963
2979
  * Permitted creator
2964
2980
  */
@@ -2971,6 +2987,8 @@ export type RoleUpdateSchema = {
2971
2987
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2972
2988
  */
2973
2989
  locale?: string | null;
2990
+ upload_collection?: UploadCollectionIdentity | null;
2991
+ move_to_upload_collection?: UploadCollectionIdentity | null;
2974
2992
  }[];
2975
2993
  /**
2976
2994
  * Prohibited actions on a model (or all) for a role
@@ -2980,7 +2998,7 @@ export type RoleUpdateSchema = {
2980
2998
  /**
2981
2999
  * Permitted action
2982
3000
  */
2983
- action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset';
3001
+ action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset' | 'move';
2984
3002
  /**
2985
3003
  * Permitted creator
2986
3004
  */
@@ -2993,6 +3011,8 @@ export type RoleUpdateSchema = {
2993
3011
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2994
3012
  */
2995
3013
  locale?: string | null;
3014
+ upload_collection?: UploadCollectionIdentity | null;
3015
+ move_to_upload_collection?: UploadCollectionIdentity | null;
2996
3016
  }[];
2997
3017
  /**
2998
3018
  * Allowed build triggers for a role
@@ -8126,6 +8146,7 @@ export type UploadRequestCreateSchema = {
8126
8146
  * The original file name
8127
8147
  */
8128
8148
  filename?: string;
8149
+ upload_collection?: UploadCollectionData | null;
8129
8150
  };
8130
8151
  /**
8131
8152
  * 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.
@@ -80,6 +80,16 @@ export type WorkflowIdentity = string;
80
80
  * via the `definition` "id".
81
81
  */
82
82
  export type EnvironmentIdentity = string;
83
+ /**
84
+ * RFC 4122 UUID of upload collection expressed in URL-safe base64 format
85
+ *
86
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
87
+ * via the `definition` "identity".
88
+ *
89
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
90
+ * via the `definition` "id".
91
+ */
92
+ export type UploadCollectionIdentity = string;
83
93
  /**
84
94
  * ID of build_trigger
85
95
  *
@@ -385,16 +395,6 @@ export type SchemaMenuItemInstancesHrefSchema = {
385
395
  * via the `definition` "type".
386
396
  */
387
397
  export type UploadCollectionType = 'upload_collection';
388
- /**
389
- * RFC 4122 UUID of upload collection expressed in URL-safe base64 format
390
- *
391
- * This interface was referenced by `UploadCollection`'s JSON-Schema
392
- * via the `definition` "identity".
393
- *
394
- * This interface was referenced by `UploadCollection`'s JSON-Schema
395
- * via the `definition` "id".
396
- */
397
- export type UploadCollectionIdentity = string;
398
398
  /**
399
399
  * This interface was referenced by `UploadCollection`'s JSON-Schema
400
400
  * via the `instances.hrefSchema` link.
@@ -1716,7 +1716,7 @@ export type RoleAttributes = {
1716
1716
  /**
1717
1717
  * Permitted action
1718
1718
  */
1719
- action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset';
1719
+ action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset' | 'move';
1720
1720
  /**
1721
1721
  * Permitted creator
1722
1722
  */
@@ -1729,6 +1729,8 @@ export type RoleAttributes = {
1729
1729
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
1730
1730
  */
1731
1731
  locale?: string | null;
1732
+ upload_collection?: UploadCollectionIdentity | null;
1733
+ move_to_upload_collection?: UploadCollectionIdentity | null;
1732
1734
  }[];
1733
1735
  /**
1734
1736
  * Prohibited actions on a model (or all) for a role
@@ -1738,7 +1740,7 @@ export type RoleAttributes = {
1738
1740
  /**
1739
1741
  * Permitted action
1740
1742
  */
1741
- action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset';
1743
+ action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset' | 'move';
1742
1744
  /**
1743
1745
  * Permitted creator
1744
1746
  */
@@ -1751,6 +1753,8 @@ export type RoleAttributes = {
1751
1753
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
1752
1754
  */
1753
1755
  locale?: string | null;
1756
+ upload_collection?: UploadCollectionIdentity | null;
1757
+ move_to_upload_collection?: UploadCollectionIdentity | null;
1754
1758
  }[];
1755
1759
  /**
1756
1760
  * Allowed build triggers for a role
@@ -1956,7 +1960,7 @@ export type RoleMeta = {
1956
1960
  /**
1957
1961
  * Permitted action
1958
1962
  */
1959
- action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset';
1963
+ action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset' | 'move';
1960
1964
  /**
1961
1965
  * Permitted creator
1962
1966
  */
@@ -1969,6 +1973,8 @@ export type RoleMeta = {
1969
1973
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
1970
1974
  */
1971
1975
  locale?: string | null;
1976
+ upload_collection?: UploadCollectionIdentity | null;
1977
+ move_to_upload_collection?: UploadCollectionIdentity | null;
1972
1978
  }[];
1973
1979
  /**
1974
1980
  * Prohibited actions on a model (or all) for a role
@@ -1978,7 +1984,7 @@ export type RoleMeta = {
1978
1984
  /**
1979
1985
  * Permitted action
1980
1986
  */
1981
- action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset';
1987
+ action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset' | 'move';
1982
1988
  /**
1983
1989
  * Permitted creator
1984
1990
  */
@@ -1991,6 +1997,8 @@ export type RoleMeta = {
1991
1997
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
1992
1998
  */
1993
1999
  locale?: string | null;
2000
+ upload_collection?: UploadCollectionIdentity | null;
2001
+ move_to_upload_collection?: UploadCollectionIdentity | null;
1994
2002
  }[];
1995
2003
  /**
1996
2004
  * Allowed build triggers for a role
@@ -2177,7 +2185,7 @@ export type RoleCreateSchema = {
2177
2185
  /**
2178
2186
  * Permitted action
2179
2187
  */
2180
- action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset';
2188
+ action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset' | 'move';
2181
2189
  /**
2182
2190
  * Permitted creator
2183
2191
  */
@@ -2190,6 +2198,8 @@ export type RoleCreateSchema = {
2190
2198
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2191
2199
  */
2192
2200
  locale?: string | null;
2201
+ upload_collection?: UploadCollectionIdentity | null;
2202
+ move_to_upload_collection?: UploadCollectionIdentity | null;
2193
2203
  }[];
2194
2204
  /**
2195
2205
  * Prohibited actions on a model (or all) for a role
@@ -2199,7 +2209,7 @@ export type RoleCreateSchema = {
2199
2209
  /**
2200
2210
  * Permitted action
2201
2211
  */
2202
- action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset';
2212
+ action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset' | 'move';
2203
2213
  /**
2204
2214
  * Permitted creator
2205
2215
  */
@@ -2212,6 +2222,8 @@ export type RoleCreateSchema = {
2212
2222
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2213
2223
  */
2214
2224
  locale?: string | null;
2225
+ upload_collection?: UploadCollectionIdentity | null;
2226
+ move_to_upload_collection?: UploadCollectionIdentity | null;
2215
2227
  }[];
2216
2228
  /**
2217
2229
  * Allowed build triggers for a role
@@ -2419,7 +2431,7 @@ export type RoleUpdateSchema = {
2419
2431
  /**
2420
2432
  * Permitted action
2421
2433
  */
2422
- action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset';
2434
+ action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset' | 'move';
2423
2435
  /**
2424
2436
  * Permitted creator
2425
2437
  */
@@ -2432,6 +2444,8 @@ export type RoleUpdateSchema = {
2432
2444
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2433
2445
  */
2434
2446
  locale?: string | null;
2447
+ upload_collection?: UploadCollectionIdentity | null;
2448
+ move_to_upload_collection?: UploadCollectionIdentity | null;
2435
2449
  }[];
2436
2450
  /**
2437
2451
  * Prohibited actions on a model (or all) for a role
@@ -2441,7 +2455,7 @@ export type RoleUpdateSchema = {
2441
2455
  /**
2442
2456
  * Permitted action
2443
2457
  */
2444
- action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset';
2458
+ action: 'all' | 'read' | 'update' | 'create' | 'delete' | 'edit_creator' | 'replace_asset' | 'move';
2445
2459
  /**
2446
2460
  * Permitted creator
2447
2461
  */
@@ -2454,6 +2468,8 @@ export type RoleUpdateSchema = {
2454
2468
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2455
2469
  */
2456
2470
  locale?: string | null;
2471
+ upload_collection?: UploadCollectionIdentity | null;
2472
+ move_to_upload_collection?: UploadCollectionIdentity | null;
2457
2473
  }[];
2458
2474
  /**
2459
2475
  * Allowed build triggers for a role
@@ -8474,6 +8490,14 @@ export type UploadRequestCreateSchema = {
8474
8490
  filename?: string;
8475
8491
  [k: string]: unknown;
8476
8492
  };
8493
+ relationships?: {
8494
+ /**
8495
+ * Upload collection to which the asset belongs
8496
+ */
8497
+ upload_collection?: {
8498
+ data: UploadCollectionData | null;
8499
+ };
8500
+ };
8477
8501
  };
8478
8502
  };
8479
8503
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datocms/cma-client",
3
- "version": "5.2.1",
3
+ "version": "5.2.2",
4
4
  "description": "JS client for DatoCMS REST Content Management API",
5
5
  "keywords": [
6
6
  "datocms",
@@ -45,5 +45,5 @@
45
45
  "@datocms/dashboard-client": "^5.2.0",
46
46
  "@types/uuid": "^9.0.7"
47
47
  },
48
- "gitHead": "725729ea99c56e9908fa758a5b9d1a8ad5293d40"
48
+ "gitHead": "0baaa965f46f73b20ed8ab2d9f63f6e9d5b0f4fd"
49
49
  }
package/resources.json CHANGED
@@ -3001,7 +3001,7 @@
3001
3001
  "requestStructure": {
3002
3002
  "type": "upload_request",
3003
3003
  "attributes": ["filename"],
3004
- "relationships": []
3004
+ "relationships": ["upload_collection"]
3005
3005
  },
3006
3006
  "queryParamsRequired": false,
3007
3007
  "responseType": "UploadRequestCreateTargetSchema",
@@ -106,6 +106,16 @@ 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;
109
119
  /**
110
120
  * ID of build_trigger
111
121
  *
@@ -485,16 +495,6 @@ export type SchemaMenuItemReorderSchema = {
485
495
  * via the `reorder.jobSchema` link.
486
496
  */
487
497
  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,7 +2220,8 @@ export type Role = {
2220
2220
  | 'create'
2221
2221
  | 'delete'
2222
2222
  | 'edit_creator'
2223
- | 'replace_asset';
2223
+ | 'replace_asset'
2224
+ | 'move';
2224
2225
  /**
2225
2226
  * Permitted creator
2226
2227
  */
@@ -2233,6 +2234,8 @@ export type Role = {
2233
2234
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2234
2235
  */
2235
2236
  locale?: string | null;
2237
+ upload_collection?: UploadCollectionIdentity | null;
2238
+ move_to_upload_collection?: UploadCollectionIdentity | null;
2236
2239
  }[];
2237
2240
  /**
2238
2241
  * Prohibited actions on a model (or all) for a role
@@ -2249,7 +2252,8 @@ export type Role = {
2249
2252
  | 'create'
2250
2253
  | 'delete'
2251
2254
  | 'edit_creator'
2252
- | 'replace_asset';
2255
+ | 'replace_asset'
2256
+ | 'move';
2253
2257
  /**
2254
2258
  * Permitted creator
2255
2259
  */
@@ -2262,6 +2266,8 @@ export type Role = {
2262
2266
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2263
2267
  */
2264
2268
  locale?: string | null;
2269
+ upload_collection?: UploadCollectionIdentity | null;
2270
+ move_to_upload_collection?: UploadCollectionIdentity | null;
2265
2271
  }[];
2266
2272
  /**
2267
2273
  * Allowed build triggers for a role
@@ -2487,7 +2493,8 @@ export type RoleMeta = {
2487
2493
  | 'create'
2488
2494
  | 'delete'
2489
2495
  | 'edit_creator'
2490
- | 'replace_asset';
2496
+ | 'replace_asset'
2497
+ | 'move';
2491
2498
  /**
2492
2499
  * Permitted creator
2493
2500
  */
@@ -2500,6 +2507,8 @@ export type RoleMeta = {
2500
2507
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2501
2508
  */
2502
2509
  locale?: string | null;
2510
+ upload_collection?: UploadCollectionIdentity | null;
2511
+ move_to_upload_collection?: UploadCollectionIdentity | null;
2503
2512
  }[];
2504
2513
  /**
2505
2514
  * Prohibited actions on a model (or all) for a role
@@ -2516,7 +2525,8 @@ export type RoleMeta = {
2516
2525
  | 'create'
2517
2526
  | 'delete'
2518
2527
  | 'edit_creator'
2519
- | 'replace_asset';
2528
+ | 'replace_asset'
2529
+ | 'move';
2520
2530
  /**
2521
2531
  * Permitted creator
2522
2532
  */
@@ -2529,6 +2539,8 @@ export type RoleMeta = {
2529
2539
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2530
2540
  */
2531
2541
  locale?: string | null;
2542
+ upload_collection?: UploadCollectionIdentity | null;
2543
+ move_to_upload_collection?: UploadCollectionIdentity | null;
2532
2544
  }[];
2533
2545
  /**
2534
2546
  * Allowed build triggers for a role
@@ -2738,7 +2750,8 @@ export type RoleAttributes = {
2738
2750
  | 'create'
2739
2751
  | 'delete'
2740
2752
  | 'edit_creator'
2741
- | 'replace_asset';
2753
+ | 'replace_asset'
2754
+ | 'move';
2742
2755
  /**
2743
2756
  * Permitted creator
2744
2757
  */
@@ -2751,6 +2764,8 @@ export type RoleAttributes = {
2751
2764
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2752
2765
  */
2753
2766
  locale?: string | null;
2767
+ upload_collection?: UploadCollectionIdentity | null;
2768
+ move_to_upload_collection?: UploadCollectionIdentity | null;
2754
2769
  }[];
2755
2770
  /**
2756
2771
  * Prohibited actions on a model (or all) for a role
@@ -2767,7 +2782,8 @@ export type RoleAttributes = {
2767
2782
  | 'create'
2768
2783
  | 'delete'
2769
2784
  | 'edit_creator'
2770
- | 'replace_asset';
2785
+ | 'replace_asset'
2786
+ | 'move';
2771
2787
  /**
2772
2788
  * Permitted creator
2773
2789
  */
@@ -2780,6 +2796,8 @@ export type RoleAttributes = {
2780
2796
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
2781
2797
  */
2782
2798
  locale?: string | null;
2799
+ upload_collection?: UploadCollectionIdentity | null;
2800
+ move_to_upload_collection?: UploadCollectionIdentity | null;
2783
2801
  }[];
2784
2802
  /**
2785
2803
  * Allowed build triggers for a role
@@ -2996,7 +3014,8 @@ export type RoleCreateSchema = {
2996
3014
  | 'create'
2997
3015
  | 'delete'
2998
3016
  | 'edit_creator'
2999
- | 'replace_asset';
3017
+ | 'replace_asset'
3018
+ | 'move';
3000
3019
  /**
3001
3020
  * Permitted creator
3002
3021
  */
@@ -3009,6 +3028,8 @@ export type RoleCreateSchema = {
3009
3028
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
3010
3029
  */
3011
3030
  locale?: string | null;
3031
+ upload_collection?: UploadCollectionIdentity | null;
3032
+ move_to_upload_collection?: UploadCollectionIdentity | null;
3012
3033
  }[];
3013
3034
  /**
3014
3035
  * Prohibited actions on a model (or all) for a role
@@ -3025,7 +3046,8 @@ export type RoleCreateSchema = {
3025
3046
  | 'create'
3026
3047
  | 'delete'
3027
3048
  | 'edit_creator'
3028
- | 'replace_asset';
3049
+ | 'replace_asset'
3050
+ | 'move';
3029
3051
  /**
3030
3052
  * Permitted creator
3031
3053
  */
@@ -3038,6 +3060,8 @@ export type RoleCreateSchema = {
3038
3060
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
3039
3061
  */
3040
3062
  locale?: string | null;
3063
+ upload_collection?: UploadCollectionIdentity | null;
3064
+ move_to_upload_collection?: UploadCollectionIdentity | null;
3041
3065
  }[];
3042
3066
  /**
3043
3067
  * Allowed build triggers for a role
@@ -3248,7 +3272,8 @@ export type RoleUpdateSchema = {
3248
3272
  | 'create'
3249
3273
  | 'delete'
3250
3274
  | 'edit_creator'
3251
- | 'replace_asset';
3275
+ | 'replace_asset'
3276
+ | 'move';
3252
3277
  /**
3253
3278
  * Permitted creator
3254
3279
  */
@@ -3261,6 +3286,8 @@ export type RoleUpdateSchema = {
3261
3286
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
3262
3287
  */
3263
3288
  locale?: string | null;
3289
+ upload_collection?: UploadCollectionIdentity | null;
3290
+ move_to_upload_collection?: UploadCollectionIdentity | null;
3264
3291
  }[];
3265
3292
  /**
3266
3293
  * Prohibited actions on a model (or all) for a role
@@ -3277,7 +3304,8 @@ export type RoleUpdateSchema = {
3277
3304
  | 'create'
3278
3305
  | 'delete'
3279
3306
  | 'edit_creator'
3280
- | 'replace_asset';
3307
+ | 'replace_asset'
3308
+ | 'move';
3281
3309
  /**
3282
3310
  * Permitted creator
3283
3311
  */
@@ -3290,6 +3318,8 @@ export type RoleUpdateSchema = {
3290
3318
  * Permitted localized content in this locale. Required when `localization_scope` is `localized`
3291
3319
  */
3292
3320
  locale?: string | null;
3321
+ upload_collection?: UploadCollectionIdentity | null;
3322
+ move_to_upload_collection?: UploadCollectionIdentity | null;
3293
3323
  }[];
3294
3324
  /**
3295
3325
  * Allowed build triggers for a role
@@ -8750,6 +8780,7 @@ export type UploadRequestCreateSchema = {
8750
8780
  * The original file name
8751
8781
  */
8752
8782
  filename?: string;
8783
+ upload_collection?: UploadCollectionData | null;
8753
8784
  };
8754
8785
  /**
8755
8786
  * 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',
154
+ userAgent: '@datocms/cma-client v5.2.2',
155
155
  baseUrl: this.baseUrl,
156
156
  preCallStack: new Error().stack,
157
157
  extraHeaders: {
@@ -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>(