diff --git a/lerna.json b/lerna.json index 85a06ec..e1499e0 100644 --- a/lerna.json +++ b/lerna.json @@ -2,5 +2,5 @@ "packages": [ "packages/*" ], - "version": "5.2.0" + "version": "5.2.1-alpha.0" } diff --git a/packages/cma-client-browser/package.json b/packages/cma-client-browser/package.json index 2a6d6a8..e1d147d 100644 --- a/packages/cma-client-browser/package.json +++ b/packages/cma-client-browser/package.json @@ -1,6 +1,6 @@ { "name": "@datocms/cma-client-browser", - "version": "5.2.0", + "version": "5.2.1-alpha.0", "description": "Browser client for DatoCMS REST Content Management API", "keywords": [ "datocms", @@ -28,7 +28,7 @@ "url": "git+https://github.com/datocms/js-rest-api-clients.git" }, "dependencies": { - "@datocms/cma-client": "^5.2.0", + "@datocms/cma-client": "^5.2.1-alpha.0", "@datocms/rest-client-utils": "^5.1.13" }, "scripts": { diff --git a/packages/cma-client-node/package-lock.json b/packages/cma-client-node/package-lock.json index fbc8c2d..6faebf1 100644 --- a/packages/cma-client-node/package-lock.json +++ b/packages/cma-client-node/package-lock.json @@ -1,6 +1,6 @@ { "name": "@datocms/cma-client-node", - "version": "5.2.0", + "version": "5.2.1-alpha.0", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/cma-client-node/package.json b/packages/cma-client-node/package.json index f536c08..2751930 100644 --- a/packages/cma-client-node/package.json +++ b/packages/cma-client-node/package.json @@ -1,6 +1,6 @@ { "name": "@datocms/cma-client-node", - "version": "5.2.0", + "version": "5.2.1-alpha.0", "description": "NodeJS client for DatoCMS REST Content Management API", "keywords": [ "datocms", @@ -28,7 +28,7 @@ "url": "git+https://github.com/datocms/js-rest-api-clients.git" }, "dependencies": { - "@datocms/cma-client": "^5.2.0", + "@datocms/cma-client": "^5.2.1-alpha.0", "@datocms/rest-client-utils": "^5.1.13", "mime-types": "^2.1.35", "tmp-promise": "^3.0.3" diff --git a/packages/cma-client/package-lock.json b/packages/cma-client/package-lock.json index a0ba7e4..57e5617 100644 --- a/packages/cma-client/package-lock.json +++ b/packages/cma-client/package-lock.json @@ -1,6 +1,6 @@ { "name": "@datocms/cma-client", - "version": "5.2.0", + "version": "5.2.1-alpha.0", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/cma-client/package.json b/packages/cma-client/package.json index 99e51bc..9074f94 100644 --- a/packages/cma-client/package.json +++ b/packages/cma-client/package.json @@ -1,6 +1,6 @@ { "name": "@datocms/cma-client", - "version": "5.2.0", + "version": "5.2.1-alpha.0", "description": "JS client for DatoCMS REST Content Management API", "keywords": [ "datocms", diff --git a/packages/cma-client/resources.json b/packages/cma-client/resources.json index 1df2607..b437023 100644 --- a/packages/cma-client/resources.json +++ b/packages/cma-client/resources.json @@ -3001,7 +3001,7 @@ "requestStructure": { "type": "upload_request", "attributes": ["filename"], - "relationships": [] + "relationships": ["upload_collection"] }, "queryParamsRequired": false, "responseType": "UploadRequestCreateTargetSchema", diff --git a/packages/cma-client/src/generated/ApiTypes.ts b/packages/cma-client/src/generated/ApiTypes.ts index b2ab035..1a07a7f 100644 --- a/packages/cma-client/src/generated/ApiTypes.ts +++ b/packages/cma-client/src/generated/ApiTypes.ts @@ -106,6 +106,16 @@ export type WorkflowIdentity = string; * via the `definition` "id". */ export type EnvironmentIdentity = string; +/** + * RFC 4122 UUID of upload collection expressed in URL-safe base64 format + * + * This interface was referenced by `UploadCollection`'s JSON-Schema + * via the `definition` "identity". + * + * This interface was referenced by `UploadCollection`'s JSON-Schema + * via the `definition` "id". + */ +export type UploadCollectionIdentity = string; /** * ID of build_trigger * @@ -485,16 +495,6 @@ export type SchemaMenuItemReorderSchema = { * via the `reorder.jobSchema` link. */ export type SchemaMenuItemReorderJobSchema = SchemaMenuItem[]; -/** - * RFC 4122 UUID of upload collection expressed in URL-safe base64 format - * - * This interface was referenced by `UploadCollection`'s JSON-Schema - * via the `definition` "identity". - * - * This interface was referenced by `UploadCollection`'s JSON-Schema - * via the `definition` "id". - */ -export type UploadCollectionIdentity = string; /** * JSON API type field * @@ -2220,7 +2220,8 @@ export type Role = { | 'create' | 'delete' | 'edit_creator' - | 'replace_asset'; + | 'replace_asset' + | 'move'; /** * Permitted creator */ @@ -2233,6 +2234,8 @@ export type Role = { * Permitted localized content in this locale. Required when `localization_scope` is `localized` */ locale?: string | null; + upload_collection?: UploadCollectionIdentity | null; + move_to_upload_collection?: UploadCollectionIdentity | null; }[]; /** * Prohibited actions on a model (or all) for a role @@ -2249,7 +2252,8 @@ export type Role = { | 'create' | 'delete' | 'edit_creator' - | 'replace_asset'; + | 'replace_asset' + | 'move'; /** * Permitted creator */ @@ -2262,6 +2266,8 @@ export type Role = { * Permitted localized content in this locale. Required when `localization_scope` is `localized` */ locale?: string | null; + upload_collection?: UploadCollectionIdentity | null; + move_to_upload_collection?: UploadCollectionIdentity | null; }[]; /** * Allowed build triggers for a role @@ -2487,7 +2493,8 @@ export type RoleMeta = { | 'create' | 'delete' | 'edit_creator' - | 'replace_asset'; + | 'replace_asset' + | 'move'; /** * Permitted creator */ @@ -2500,6 +2507,8 @@ export type RoleMeta = { * Permitted localized content in this locale. Required when `localization_scope` is `localized` */ locale?: string | null; + upload_collection?: UploadCollectionIdentity | null; + move_to_upload_collection?: UploadCollectionIdentity | null; }[]; /** * Prohibited actions on a model (or all) for a role @@ -2516,7 +2525,8 @@ export type RoleMeta = { | 'create' | 'delete' | 'edit_creator' - | 'replace_asset'; + | 'replace_asset' + | 'move'; /** * Permitted creator */ @@ -2529,6 +2539,8 @@ export type RoleMeta = { * Permitted localized content in this locale. Required when `localization_scope` is `localized` */ locale?: string | null; + upload_collection?: UploadCollectionIdentity | null; + move_to_upload_collection?: UploadCollectionIdentity | null; }[]; /** * Allowed build triggers for a role @@ -2738,7 +2750,8 @@ export type RoleAttributes = { | 'create' | 'delete' | 'edit_creator' - | 'replace_asset'; + | 'replace_asset' + | 'move'; /** * Permitted creator */ @@ -2751,6 +2764,8 @@ export type RoleAttributes = { * Permitted localized content in this locale. Required when `localization_scope` is `localized` */ locale?: string | null; + upload_collection?: UploadCollectionIdentity | null; + move_to_upload_collection?: UploadCollectionIdentity | null; }[]; /** * Prohibited actions on a model (or all) for a role @@ -2767,7 +2782,8 @@ export type RoleAttributes = { | 'create' | 'delete' | 'edit_creator' - | 'replace_asset'; + | 'replace_asset' + | 'move'; /** * Permitted creator */ @@ -2780,6 +2796,8 @@ export type RoleAttributes = { * Permitted localized content in this locale. Required when `localization_scope` is `localized` */ locale?: string | null; + upload_collection?: UploadCollectionIdentity | null; + move_to_upload_collection?: UploadCollectionIdentity | null; }[]; /** * Allowed build triggers for a role @@ -2996,7 +3014,8 @@ export type RoleCreateSchema = { | 'create' | 'delete' | 'edit_creator' - | 'replace_asset'; + | 'replace_asset' + | 'move'; /** * Permitted creator */ @@ -3009,6 +3028,8 @@ export type RoleCreateSchema = { * Permitted localized content in this locale. Required when `localization_scope` is `localized` */ locale?: string | null; + upload_collection?: UploadCollectionIdentity | null; + move_to_upload_collection?: UploadCollectionIdentity | null; }[]; /** * Prohibited actions on a model (or all) for a role @@ -3025,7 +3046,8 @@ export type RoleCreateSchema = { | 'create' | 'delete' | 'edit_creator' - | 'replace_asset'; + | 'replace_asset' + | 'move'; /** * Permitted creator */ @@ -3038,6 +3060,8 @@ export type RoleCreateSchema = { * Permitted localized content in this locale. Required when `localization_scope` is `localized` */ locale?: string | null; + upload_collection?: UploadCollectionIdentity | null; + move_to_upload_collection?: UploadCollectionIdentity | null; }[]; /** * Allowed build triggers for a role @@ -3248,7 +3272,8 @@ export type RoleUpdateSchema = { | 'create' | 'delete' | 'edit_creator' - | 'replace_asset'; + | 'replace_asset' + | 'move'; /** * Permitted creator */ @@ -3261,6 +3286,8 @@ export type RoleUpdateSchema = { * Permitted localized content in this locale. Required when `localization_scope` is `localized` */ locale?: string | null; + upload_collection?: UploadCollectionIdentity | null; + move_to_upload_collection?: UploadCollectionIdentity | null; }[]; /** * Prohibited actions on a model (or all) for a role @@ -3277,7 +3304,8 @@ export type RoleUpdateSchema = { | 'create' | 'delete' | 'edit_creator' - | 'replace_asset'; + | 'replace_asset' + | 'move'; /** * Permitted creator */ @@ -3290,6 +3318,8 @@ export type RoleUpdateSchema = { * Permitted localized content in this locale. Required when `localization_scope` is `localized` */ locale?: string | null; + upload_collection?: UploadCollectionIdentity | null; + move_to_upload_collection?: UploadCollectionIdentity | null; }[]; /** * Allowed build triggers for a role @@ -7044,7 +7074,7 @@ export type Plugin = { */ url: string; /** - * Global plugin configuration. Plugins can persist whatever information they want in this object to reuse it later. + * Global plugin configuration. Plugins can persist whatever information they want in this object to reuse it later. Refer to the CMA for details about technical limits. */ parameters: { [k: string]: unknown; @@ -7145,7 +7175,7 @@ export type PluginAttributes = { */ url: string; /** - * Global plugin configuration. Plugins can persist whatever information they want in this object to reuse it later. + * Global plugin configuration. Plugins can persist whatever information they want in this object to reuse it later. Refer to the CMA for details about technical limits. */ parameters: { [k: string]: unknown; @@ -7277,7 +7307,7 @@ export type PluginUpdateSchema = { */ url?: string; /** - * Global plugin configuration. Plugins can persist whatever information they want in this object to reuse it later. + * Global plugin configuration. Plugins can persist whatever information they want in this object to reuse it later. Refer to the CMA for details about technical limits. */ parameters?: { [k: string]: unknown; @@ -8706,6 +8736,7 @@ export type UploadRequestCreateSchema = { * The original file name */ filename?: string; + upload_collection?: UploadCollectionData | null; }; /** * 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. @@ -9768,7 +9799,7 @@ export type BuildTrigger = { /** * The type of build trigger */ - adapter: 'custom' | 'netlify' | 'vercel' | 'circle_ci' | 'gitlab' | 'travis'; + adapter: 'custom' | 'netlify' | 'vercel' | 'gitlab'; /** * Additional settings for the build trigger. The value depends on the `adapter`. */ @@ -9830,7 +9861,7 @@ export type BuildTriggerAttributes = { /** * The type of build trigger */ - adapter: 'custom' | 'netlify' | 'vercel' | 'circle_ci' | 'gitlab' | 'travis'; + adapter: 'custom' | 'netlify' | 'vercel' | 'gitlab'; /** * Additional settings for the build trigger. The value depends on the `adapter`. */ @@ -9887,7 +9918,7 @@ export type BuildTriggerCreateSchema = { /** * The type of build trigger */ - adapter: 'custom' | 'netlify' | 'vercel' | 'circle_ci' | 'gitlab' | 'travis'; + adapter: 'custom' | 'netlify' | 'vercel' | 'gitlab'; /** * Wether Site Search is enabled or not. With Site Search, everytime the website is built, DatoCMS will respider it to get updated content */ @@ -9925,7 +9956,7 @@ export type BuildTriggerUpdateSchema = { /** * The type of build trigger */ - adapter?: 'custom' | 'netlify' | 'vercel' | 'circle_ci' | 'gitlab' | 'travis'; + adapter?: 'custom' | 'netlify' | 'vercel' | 'gitlab'; /** * Wether Site Search is enabled or not. With Site Search, everytime the website is built, DatoCMS will respider it to get updated content */ diff --git a/packages/cma-client/src/generated/RawApiTypes.ts b/packages/cma-client/src/generated/RawApiTypes.ts index 6544bca..5dfda33 100644 --- a/packages/cma-client/src/generated/RawApiTypes.ts +++ b/packages/cma-client/src/generated/RawApiTypes.ts @@ -108,6 +108,16 @@ export type WorkflowIdentity = string; * via the `definition` "id". */ export type EnvironmentIdentity = string; +/** + * RFC 4122 UUID of upload collection expressed in URL-safe base64 format + * + * This interface was referenced by `UploadCollection`'s JSON-Schema + * via the `definition` "identity". + * + * This interface was referenced by `UploadCollection`'s JSON-Schema + * via the `definition` "id". + */ +export type UploadCollectionIdentity = string; /** * ID of build_trigger * @@ -413,16 +423,6 @@ export type SchemaMenuItemInstancesHrefSchema = { * via the `definition` "type". */ export type UploadCollectionType = 'upload_collection'; -/** - * RFC 4122 UUID of upload collection expressed in URL-safe base64 format - * - * This interface was referenced by `UploadCollection`'s JSON-Schema - * via the `definition` "identity". - * - * This interface was referenced by `UploadCollection`'s JSON-Schema - * via the `definition` "id". - */ -export type UploadCollectionIdentity = string; /** * This interface was referenced by `UploadCollection`'s JSON-Schema * via the `instances.hrefSchema` link. @@ -1841,7 +1841,8 @@ export type RoleAttributes = { | 'create' | 'delete' | 'edit_creator' - | 'replace_asset'; + | 'replace_asset' + | 'move'; /** * Permitted creator */ @@ -1854,6 +1855,8 @@ export type RoleAttributes = { * Permitted localized content in this locale. Required when `localization_scope` is `localized` */ locale?: string | null; + upload_collection?: UploadCollectionIdentity | null; + move_to_upload_collection?: UploadCollectionIdentity | null; }[]; /** * Prohibited actions on a model (or all) for a role @@ -1870,7 +1873,8 @@ export type RoleAttributes = { | 'create' | 'delete' | 'edit_creator' - | 'replace_asset'; + | 'replace_asset' + | 'move'; /** * Permitted creator */ @@ -1883,6 +1887,8 @@ export type RoleAttributes = { * Permitted localized content in this locale. Required when `localization_scope` is `localized` */ locale?: string | null; + upload_collection?: UploadCollectionIdentity | null; + move_to_upload_collection?: UploadCollectionIdentity | null; }[]; /** * Allowed build triggers for a role @@ -2115,7 +2121,8 @@ export type RoleMeta = { | 'create' | 'delete' | 'edit_creator' - | 'replace_asset'; + | 'replace_asset' + | 'move'; /** * Permitted creator */ @@ -2128,6 +2135,8 @@ export type RoleMeta = { * Permitted localized content in this locale. Required when `localization_scope` is `localized` */ locale?: string | null; + upload_collection?: UploadCollectionIdentity | null; + move_to_upload_collection?: UploadCollectionIdentity | null; }[]; /** * Prohibited actions on a model (or all) for a role @@ -2144,7 +2153,8 @@ export type RoleMeta = { | 'create' | 'delete' | 'edit_creator' - | 'replace_asset'; + | 'replace_asset' + | 'move'; /** * Permitted creator */ @@ -2157,6 +2167,8 @@ export type RoleMeta = { * Permitted localized content in this locale. Required when `localization_scope` is `localized` */ locale?: string | null; + upload_collection?: UploadCollectionIdentity | null; + move_to_upload_collection?: UploadCollectionIdentity | null; }[]; /** * Allowed build triggers for a role @@ -2370,7 +2382,8 @@ export type RoleCreateSchema = { | 'create' | 'delete' | 'edit_creator' - | 'replace_asset'; + | 'replace_asset' + | 'move'; /** * Permitted creator */ @@ -2383,6 +2396,8 @@ export type RoleCreateSchema = { * Permitted localized content in this locale. Required when `localization_scope` is `localized` */ locale?: string | null; + upload_collection?: UploadCollectionIdentity | null; + move_to_upload_collection?: UploadCollectionIdentity | null; }[]; /** * Prohibited actions on a model (or all) for a role @@ -2399,7 +2414,8 @@ export type RoleCreateSchema = { | 'create' | 'delete' | 'edit_creator' - | 'replace_asset'; + | 'replace_asset' + | 'move'; /** * Permitted creator */ @@ -2412,6 +2428,8 @@ export type RoleCreateSchema = { * Permitted localized content in this locale. Required when `localization_scope` is `localized` */ locale?: string | null; + upload_collection?: UploadCollectionIdentity | null; + move_to_upload_collection?: UploadCollectionIdentity | null; }[]; /** * Allowed build triggers for a role @@ -2646,7 +2664,8 @@ export type RoleUpdateSchema = { | 'create' | 'delete' | 'edit_creator' - | 'replace_asset'; + | 'replace_asset' + | 'move'; /** * Permitted creator */ @@ -2659,6 +2678,8 @@ export type RoleUpdateSchema = { * Permitted localized content in this locale. Required when `localization_scope` is `localized` */ locale?: string | null; + upload_collection?: UploadCollectionIdentity | null; + move_to_upload_collection?: UploadCollectionIdentity | null; }[]; /** * Prohibited actions on a model (or all) for a role @@ -2675,7 +2696,8 @@ export type RoleUpdateSchema = { | 'create' | 'delete' | 'edit_creator' - | 'replace_asset'; + | 'replace_asset' + | 'move'; /** * Permitted creator */ @@ -2688,6 +2710,8 @@ export type RoleUpdateSchema = { * Permitted localized content in this locale. Required when `localization_scope` is `localized` */ locale?: string | null; + upload_collection?: UploadCollectionIdentity | null; + move_to_upload_collection?: UploadCollectionIdentity | null; }[]; /** * Allowed build triggers for a role @@ -6750,7 +6774,7 @@ export type PluginAttributes = { */ url: string; /** - * Global plugin configuration. Plugins can persist whatever information they want in this object to reuse it later. + * Global plugin configuration. Plugins can persist whatever information they want in this object to reuse it later. Refer to the CMA for details about technical limits. */ parameters: { [k: string]: unknown; @@ -6917,7 +6941,7 @@ export type PluginUpdateSchema = { */ url?: string; /** - * Global plugin configuration. Plugins can persist whatever information they want in this object to reuse it later. + * Global plugin configuration. Plugins can persist whatever information they want in this object to reuse it later. Refer to the CMA for details about technical limits. */ parameters?: { [k: string]: unknown; @@ -8963,6 +8987,14 @@ export type UploadRequestCreateSchema = { filename?: string; [k: string]: unknown; }; + relationships?: { + /** + * Upload collection to which the asset belongs + */ + upload_collection?: { + data: UploadCollectionData | null; + }; + }; }; }; /** @@ -9900,7 +9932,7 @@ export type BuildTriggerAttributes = { /** * The type of build trigger */ - adapter: 'custom' | 'netlify' | 'vercel' | 'circle_ci' | 'gitlab' | 'travis'; + adapter: 'custom' | 'netlify' | 'vercel' | 'gitlab'; /** * Additional settings for the build trigger. The value depends on the `adapter`. */ @@ -9973,13 +10005,7 @@ export type BuildTriggerCreateSchema = { /** * The type of build trigger */ - adapter: - | 'custom' - | 'netlify' - | 'vercel' - | 'circle_ci' - | 'gitlab' - | 'travis'; + adapter: 'custom' | 'netlify' | 'vercel' | 'gitlab'; /** * Wether Site Search is enabled or not. With Site Search, everytime the website is built, DatoCMS will respider it to get updated content */ @@ -10028,13 +10054,7 @@ export type BuildTriggerUpdateSchema = { /** * The type of build trigger */ - adapter?: - | 'custom' - | 'netlify' - | 'vercel' - | 'circle_ci' - | 'gitlab' - | 'travis'; + adapter?: 'custom' | 'netlify' | 'vercel' | 'gitlab'; /** * Wether Site Search is enabled or not. With Site Search, everytime the website is built, DatoCMS will respider it to get updated content */ diff --git a/packages/cma-client/src/generated/resources/UploadRequest.ts b/packages/cma-client/src/generated/resources/UploadRequest.ts index 21dc0ee..24370f7 100644 --- a/packages/cma-client/src/generated/resources/UploadRequest.ts +++ b/packages/cma-client/src/generated/resources/UploadRequest.ts @@ -19,7 +19,7 @@ export default class UploadRequest extends BaseResource { Utils.serializeRequestBody(body, { type: 'upload_request', attributes: ['filename'], - relationships: [], + relationships: ['upload_collection'], }), ).then((body) => Utils.deserializeResponseBody( diff --git a/packages/rest-api-events/package-lock.json b/packages/rest-api-events/package-lock.json index 11b9600..84a3b56 100644 --- a/packages/rest-api-events/package-lock.json +++ b/packages/rest-api-events/package-lock.json @@ -1,6 +1,6 @@ { "name": "@datocms/rest-api-events", - "version": "5.2.0", + "version": "5.2.1-alpha.0", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/rest-api-events/package.json b/packages/rest-api-events/package.json index 5e48a69..7df42bc 100644 --- a/packages/rest-api-events/package.json +++ b/packages/rest-api-events/package.json @@ -1,6 +1,6 @@ { "name": "@datocms/rest-api-events", - "version": "5.2.0", + "version": "5.2.1-alpha.0", "description": "Utilities to receive real-time events from DatoCMS REST APIs", "keywords": [ "datocms", @@ -39,7 +39,7 @@ "pusher-js": "^7.0.6" }, "devDependencies": { - "@datocms/cma-client": "^5.2.0", + "@datocms/cma-client": "^5.2.1-alpha.0", "@datocms/dashboard-client": "^5.2.0" }, "gitHead": "ac4164968026ba62a2841d31d2b60c31eadb2cc8"