@datocms/cma-client 5.4.15 → 5.4.17

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.
@@ -12,9 +12,16 @@ export default class ItemVersion extends BaseResource {
12
12
  * @throws {ApiError}
13
13
  * @throws {TimeoutError}
14
14
  */
15
- restore(itemVersionId: string | ApiTypes.ItemVersionData): Promise<[ApiTypes.Item<import("../../index.js").ItemTypeDefinition<{
16
- locales: string;
17
- }, string, {}>>, ApiTypes.ItemVersion]>;
15
+ restore(itemVersionId: string | ApiTypes.ItemVersionData): Promise<[{
16
+ __itemTypeId?: string | undefined;
17
+ id: string;
18
+ type: "item";
19
+ item_type: ApiTypes.ItemTypeData<import("../../index.js").ItemTypeDefinition<{
20
+ locales: string;
21
+ }, string, {}>>;
22
+ creator?: ApiTypes.UserData | ApiTypes.AccessTokenData | ApiTypes.AccountData | ApiTypes.SsoUserData | ApiTypes.OrganizationData | undefined;
23
+ meta: ApiTypes.ItemMeta;
24
+ } & Record<string, unknown>, ApiTypes.ItemVersion]>;
18
25
  /**
19
26
  * Restore an old record version
20
27
  *
@@ -1,8 +1,9 @@
1
1
  import type * as ApiTypes from '../generated/ApiTypes.js';
2
2
  import BaseRole from '../generated/resources/Role.js';
3
+ type DistributiveOmit<T, K extends PropertyKey> = T extends any ? Omit<T, K> : never;
3
4
  export type UpdateRoleDiff<T> = {
4
- add?: Omit<T, 'environment'>[];
5
- remove?: Omit<T, 'environment'>[];
5
+ add?: DistributiveOmit<T, 'environment'>[];
6
+ remove?: DistributiveOmit<T, 'environment'>[];
6
7
  };
7
8
  export type RoleItemTypePermission = ApiTypes.RoleAttributes['positive_item_type_permissions'][0];
8
9
  export type RoleUploadPermission = ApiTypes.RoleAttributes['positive_upload_permissions'][0];
@@ -15,6 +16,8 @@ type UpdateCurrentEnvironmentPermissionsChanges = {
15
16
  export default class RoleResource extends BaseRole {
16
17
  /**
17
18
  * Applies a set of changes to the permissions of the current environment
19
+ *
20
+ * Read more: https://www.datocms.com/docs/content-management-api/resources/role/update
18
21
  */
19
22
  updateCurrentEnvironmentPermissions(roleId: string | ApiTypes.RoleData, changes: UpdateCurrentEnvironmentPermissionsChanges): Promise<ApiTypes.Role>;
20
23
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datocms/cma-client",
3
- "version": "5.4.15",
3
+ "version": "5.4.17",
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.4.9",
46
46
  "@types/uuid": "^9.0.7"
47
47
  },
48
- "gitHead": "c368fd252a0ba33c3b22759b5619781c7a8aba7b"
48
+ "gitHead": "4117c106128cbe9e277806fd3481854c9b116f77"
49
49
  }
@@ -107,7 +107,7 @@ export type BlockInRequest<D extends ItemTypeDefinition = ItemTypeDefinition> =
107
107
 
108
108
  export type BlockInNestedResponse<
109
109
  D extends ItemTypeDefinition = ItemTypeDefinition,
110
- > = D extends unknown ? RawApiTypes.ItemInNestedResponse<D> : never;
110
+ > = RawApiTypes.ItemInNestedResponse<D>;
111
111
 
112
112
  /**
113
113
  * Single Block field value for API requests - allows flexible block representations: