@datocms/cma-client 5.4.16 → 5.4.18

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.
@@ -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.16",
3
+ "version": "5.4.18",
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": "454acff0c6db2d3dda7f98c831e787e2e0413364"
48
+ "gitHead": "4f7d64737c1abd7cb2568604a99f2dd0eda6020b"
49
49
  }