@sprucelabs/mercury-core-events 15.1.21 → 15.3.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.
@@ -77,6 +77,7 @@ declare const _default: ({
77
77
  permissions: ({
78
78
  id: string;
79
79
  name: string;
80
+ description: string;
80
81
  defaults: {
81
82
  owner: {
82
83
  default: true;
@@ -92,6 +93,7 @@ declare const _default: ({
92
93
  } | {
93
94
  id: string;
94
95
  name: string;
96
+ description: string;
95
97
  defaults: {
96
98
  skill: false;
97
99
  owner?: undefined;
@@ -448,6 +450,7 @@ declare const _default: ({
448
450
  permissions: ({
449
451
  id: string;
450
452
  name: string;
453
+ description: string;
451
454
  defaults: {
452
455
  owner: {
453
456
  default: true;
@@ -463,6 +466,7 @@ declare const _default: ({
463
466
  } | {
464
467
  id: string;
465
468
  name: string;
469
+ description: string;
466
470
  defaults: {
467
471
  skill: false;
468
472
  owner?: undefined;
@@ -12,6 +12,7 @@ declare const addRoleEventContract: {
12
12
  permissions: ({
13
13
  id: string;
14
14
  name: string;
15
+ description: string;
15
16
  defaults: {
16
17
  owner: {
17
18
  default: true;
@@ -27,6 +28,7 @@ declare const addRoleEventContract: {
27
28
  } | {
28
29
  id: string;
29
30
  name: string;
31
+ description: string;
30
32
  defaults: {
31
33
  skill: false;
32
34
  owner?: undefined;
@@ -21,7 +21,8 @@ const addRoleEventContract = (0, mercury_types_1.buildEventContract)({
21
21
  permissions: [
22
22
  {
23
23
  id: 'can-hire-person',
24
- name: 'Hire a person',
24
+ name: 'Hire a person.',
25
+ description: 'by default, a manager and above can hire someone. This means the ability to invite someone with a specific role.',
25
26
  defaults: {
26
27
  owner: {
27
28
  default: true,
@@ -37,7 +38,8 @@ const addRoleEventContract = (0, mercury_types_1.buildEventContract)({
37
38
  },
38
39
  {
39
40
  id: 'can-fire-person',
40
- name: 'Fire a person',
41
+ name: 'Fire a person.',
42
+ description: 'By default, managers and above can fire someone.',
41
43
  defaults: {
42
44
  owner: {
43
45
  default: true,
@@ -54,6 +56,7 @@ const addRoleEventContract = (0, mercury_types_1.buildEventContract)({
54
56
  {
55
57
  id: 'hire-and-promote-when-not-installed',
56
58
  name: 'Can hire even when not installed.',
59
+ description: 'This only applies to skills. It gives them the ability to add people to your organization without being installed.',
57
60
  defaults: {
58
61
  skill: false,
59
62
  },
@@ -12,6 +12,7 @@ declare const removeRoleEventContract: {
12
12
  permissions: ({
13
13
  id: string;
14
14
  name: string;
15
+ description: string;
15
16
  defaults: {
16
17
  owner: {
17
18
  default: true;
@@ -27,6 +28,7 @@ declare const removeRoleEventContract: {
27
28
  } | {
28
29
  id: string;
29
30
  name: string;
31
+ description: string;
30
32
  defaults: {
31
33
  skill: false;
32
34
  owner?: undefined;
@@ -21,7 +21,8 @@ const removeRoleEventContract = (0, mercury_types_1.buildEventContract)({
21
21
  permissions: [
22
22
  {
23
23
  id: 'can-hire-person',
24
- name: 'Hire a person',
24
+ name: 'Hire a person.',
25
+ description: 'by default, a manager and above can hire someone. This means the ability to invite someone with a specific role.',
25
26
  defaults: {
26
27
  owner: {
27
28
  default: true,
@@ -37,7 +38,8 @@ const removeRoleEventContract = (0, mercury_types_1.buildEventContract)({
37
38
  },
38
39
  {
39
40
  id: 'can-fire-person',
40
- name: 'Fire a person',
41
+ name: 'Fire a person.',
42
+ description: 'By default, managers and above can fire someone.',
41
43
  defaults: {
42
44
  owner: {
43
45
  default: true,
@@ -54,6 +56,7 @@ const removeRoleEventContract = (0, mercury_types_1.buildEventContract)({
54
56
  {
55
57
  id: 'hire-and-promote-when-not-installed',
56
58
  name: 'Can hire even when not installed.',
59
+ description: 'This only applies to skills. It gives them the ability to add people to your organization without being installed.',
57
60
  defaults: {
58
61
  skill: false,
59
62
  },
@@ -47,7 +47,8 @@ declare module '@sprucelabs/mercury-types/build/types/mercury.types' {
47
47
  'can-list-permission-contracts-for-org',
48
48
  'can-upsert-permission-contract-for-org',
49
49
  'can-list-permission-contracts-globally',
50
- 'can-save-permissions-globally'
50
+ 'can-save-permissions-globally',
51
+ 'can-load-others-permissions'
51
52
  ];
52
53
  'roles-contract': [
53
54
  'can-create-role',
@@ -17,6 +17,16 @@ const getResolvedPermissionsContractEmitTargetSchema = {
17
17
  type: 'id',
18
18
  options: undefined
19
19
  },
20
+ /** . */
21
+ 'contractPersonId': {
22
+ type: 'id',
23
+ options: undefined
24
+ },
25
+ /** . */
26
+ 'contractSkillId': {
27
+ type: 'id',
28
+ options: undefined
29
+ },
20
30
  }
21
31
  };
22
32
  schema_1.SchemaRegistry.getInstance().trackSchema(getResolvedPermissionsContractEmitTargetSchema);
@@ -4892,6 +4892,8 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
4892
4892
  interface GetResolvedPermissionsContractEmitTarget {
4893
4893
  'locationId'?: string | undefined | null;
4894
4894
  'organizationId'?: string | undefined | null;
4895
+ 'contractPersonId'?: string | undefined | null;
4896
+ 'contractSkillId'?: string | undefined | null;
4895
4897
  }
4896
4898
  interface GetResolvedPermissionsContractEmitTargetSchema extends SpruceSchema.Schema {
4897
4899
  id: 'getResolvedPermissionsContractEmitTarget';
@@ -4909,6 +4911,16 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
4909
4911
  type: 'id';
4910
4912
  options: undefined;
4911
4913
  };
4914
+ /** . */
4915
+ 'contractPersonId': {
4916
+ type: 'id';
4917
+ options: undefined;
4918
+ };
4919
+ /** . */
4920
+ 'contractSkillId': {
4921
+ type: 'id';
4922
+ options: undefined;
4923
+ };
4912
4924
  };
4913
4925
  }
4914
4926
  interface GetResolvedPermissionsContractEmitTargetEntity extends SchemaEntity<SpruceSchemas.Mercury.v2020_12_25.GetResolvedPermissionsContractEmitTargetSchema> {
@@ -77,6 +77,7 @@ declare const _default: ({
77
77
  permissions: ({
78
78
  id: string;
79
79
  name: string;
80
+ description: string;
80
81
  defaults: {
81
82
  owner: {
82
83
  default: true;
@@ -92,6 +93,7 @@ declare const _default: ({
92
93
  } | {
93
94
  id: string;
94
95
  name: string;
96
+ description: string;
95
97
  defaults: {
96
98
  skill: false;
97
99
  owner?: undefined;
@@ -448,6 +450,7 @@ declare const _default: ({
448
450
  permissions: ({
449
451
  id: string;
450
452
  name: string;
453
+ description: string;
451
454
  defaults: {
452
455
  owner: {
453
456
  default: true;
@@ -463,6 +466,7 @@ declare const _default: ({
463
466
  } | {
464
467
  id: string;
465
468
  name: string;
469
+ description: string;
466
470
  defaults: {
467
471
  skill: false;
468
472
  owner?: undefined;
@@ -12,6 +12,7 @@ declare const addRoleEventContract: {
12
12
  permissions: ({
13
13
  id: string;
14
14
  name: string;
15
+ description: string;
15
16
  defaults: {
16
17
  owner: {
17
18
  default: true;
@@ -27,6 +28,7 @@ declare const addRoleEventContract: {
27
28
  } | {
28
29
  id: string;
29
30
  name: string;
31
+ description: string;
30
32
  defaults: {
31
33
  skill: false;
32
34
  owner?: undefined;
@@ -16,7 +16,8 @@ const addRoleEventContract = buildEventContract({
16
16
  permissions: [
17
17
  {
18
18
  id: 'can-hire-person',
19
- name: 'Hire a person',
19
+ name: 'Hire a person.',
20
+ description: 'by default, a manager and above can hire someone. This means the ability to invite someone with a specific role.',
20
21
  defaults: {
21
22
  owner: {
22
23
  default: true,
@@ -32,7 +33,8 @@ const addRoleEventContract = buildEventContract({
32
33
  },
33
34
  {
34
35
  id: 'can-fire-person',
35
- name: 'Fire a person',
36
+ name: 'Fire a person.',
37
+ description: 'By default, managers and above can fire someone.',
36
38
  defaults: {
37
39
  owner: {
38
40
  default: true,
@@ -49,6 +51,7 @@ const addRoleEventContract = buildEventContract({
49
51
  {
50
52
  id: 'hire-and-promote-when-not-installed',
51
53
  name: 'Can hire even when not installed.',
54
+ description: 'This only applies to skills. It gives them the ability to add people to your organization without being installed.',
52
55
  defaults: {
53
56
  skill: false,
54
57
  },
@@ -12,6 +12,7 @@ declare const removeRoleEventContract: {
12
12
  permissions: ({
13
13
  id: string;
14
14
  name: string;
15
+ description: string;
15
16
  defaults: {
16
17
  owner: {
17
18
  default: true;
@@ -27,6 +28,7 @@ declare const removeRoleEventContract: {
27
28
  } | {
28
29
  id: string;
29
30
  name: string;
31
+ description: string;
30
32
  defaults: {
31
33
  skill: false;
32
34
  owner?: undefined;
@@ -16,7 +16,8 @@ const removeRoleEventContract = buildEventContract({
16
16
  permissions: [
17
17
  {
18
18
  id: 'can-hire-person',
19
- name: 'Hire a person',
19
+ name: 'Hire a person.',
20
+ description: 'by default, a manager and above can hire someone. This means the ability to invite someone with a specific role.',
20
21
  defaults: {
21
22
  owner: {
22
23
  default: true,
@@ -32,7 +33,8 @@ const removeRoleEventContract = buildEventContract({
32
33
  },
33
34
  {
34
35
  id: 'can-fire-person',
35
- name: 'Fire a person',
36
+ name: 'Fire a person.',
37
+ description: 'By default, managers and above can fire someone.',
36
38
  defaults: {
37
39
  owner: {
38
40
  default: true,
@@ -49,6 +51,7 @@ const removeRoleEventContract = buildEventContract({
49
51
  {
50
52
  id: 'hire-and-promote-when-not-installed',
51
53
  name: 'Can hire even when not installed.',
54
+ description: 'This only applies to skills. It gives them the ability to add people to your organization without being installed.',
52
55
  defaults: {
53
56
  skill: false,
54
57
  },
@@ -47,7 +47,8 @@ declare module '@sprucelabs/mercury-types/build/types/mercury.types' {
47
47
  'can-list-permission-contracts-for-org',
48
48
  'can-upsert-permission-contract-for-org',
49
49
  'can-list-permission-contracts-globally',
50
- 'can-save-permissions-globally'
50
+ 'can-save-permissions-globally',
51
+ 'can-load-others-permissions'
51
52
  ];
52
53
  'roles-contract': [
53
54
  'can-create-role',
@@ -15,6 +15,16 @@ const getResolvedPermissionsContractEmitTargetSchema = {
15
15
  type: 'id',
16
16
  options: undefined
17
17
  },
18
+ /** . */
19
+ 'contractPersonId': {
20
+ type: 'id',
21
+ options: undefined
22
+ },
23
+ /** . */
24
+ 'contractSkillId': {
25
+ type: 'id',
26
+ options: undefined
27
+ },
18
28
  }
19
29
  };
20
30
  SchemaRegistry.getInstance().trackSchema(getResolvedPermissionsContractEmitTargetSchema);
@@ -4892,6 +4892,8 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
4892
4892
  interface GetResolvedPermissionsContractEmitTarget {
4893
4893
  'locationId'?: string | undefined | null;
4894
4894
  'organizationId'?: string | undefined | null;
4895
+ 'contractPersonId'?: string | undefined | null;
4896
+ 'contractSkillId'?: string | undefined | null;
4895
4897
  }
4896
4898
  interface GetResolvedPermissionsContractEmitTargetSchema extends SpruceSchema.Schema {
4897
4899
  id: 'getResolvedPermissionsContractEmitTarget';
@@ -4909,6 +4911,16 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
4909
4911
  type: 'id';
4910
4912
  options: undefined;
4911
4913
  };
4914
+ /** . */
4915
+ 'contractPersonId': {
4916
+ type: 'id';
4917
+ options: undefined;
4918
+ };
4919
+ /** . */
4920
+ 'contractSkillId': {
4921
+ type: 'id';
4922
+ options: undefined;
4923
+ };
4912
4924
  };
4913
4925
  }
4914
4926
  interface GetResolvedPermissionsContractEmitTargetEntity extends SchemaEntity<SpruceSchemas.Mercury.v2020_12_25.GetResolvedPermissionsContractEmitTargetSchema> {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sprucelabs/mercury-core-events",
3
- "version": "15.1.21",
3
+ "version": "15.3.0",
4
4
  "description": "Events Mercury provides out of the box.",
5
5
  "skill": {
6
6
  "namespace": "mercury-core-events",
@@ -70,7 +70,7 @@
70
70
  "@types/node": "^18.13.0",
71
71
  "chokidar-cli": "^3.0.0",
72
72
  "concurrently": "^7.6.0",
73
- "eslint": "^8.33.0",
73
+ "eslint": "^8.34.0",
74
74
  "eslint-config-spruce": "^10.12.0",
75
75
  "jest": "^29.4.2",
76
76
  "jest-circus": "^29.4.2",