@sprucelabs/spruce-core-schemas 33.1.8 → 34.0.1

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.
@@ -129,7 +129,7 @@ export declare namespace SpruceSchemas.Spruce.v2020_07_22 {
129
129
  'id': string;
130
130
  /** Name. */
131
131
  'name': string;
132
- /** Base. Used to determine the default permissions when this role is created and the fallback for when a permission is not set on this role. */
132
+ /** Base. A best practices starting point for a role based on the generalized roles at a company. */
133
133
  'base'?: ("owner" | "groupManager" | "manager" | "teammate" | "anonymous" | "loggedIn" | "guest") | undefined | null;
134
134
  /** Description. */
135
135
  'description'?: string | undefined | null;
@@ -161,11 +161,11 @@ export declare namespace SpruceSchemas.Spruce.v2020_07_22 {
161
161
  isRequired: true;
162
162
  options: undefined;
163
163
  };
164
- /** Base. Used to determine the default permissions when this role is created and the fallback for when a permission is not set on this role. */
164
+ /** Base. A best practices starting point for a role based on the generalized roles at a company. */
165
165
  'base': {
166
166
  label: 'Base';
167
167
  type: 'select';
168
- hint: 'Used to determine the default permissions when this role is created and the fallback for when a permission is not set on this role.';
168
+ hint: 'A best practices starting point for a role based on the generalized roles at a company.';
169
169
  options: {
170
170
  choices: [{
171
171
  "label": "Owner";
@@ -23,11 +23,11 @@ const roleSchema = {
23
23
  isRequired: true,
24
24
  options: undefined
25
25
  },
26
- /** Base. Used to determine the default permissions when this role is created and the fallback for when a permission is not set on this role. */
26
+ /** Base. A best practices starting point for a role based on the generalized roles at a company. */
27
27
  'base': {
28
28
  label: 'Base',
29
29
  type: 'select',
30
- hint: 'Used to determine the default permissions when this role is created and the fallback for when a permission is not set on this role.',
30
+ hint: 'A best practices starting point for a role based on the generalized roles at a company.',
31
31
  options: { choices: [{ "label": "Owner", "value": "owner" }, { "label": "Group manager", "value": "groupManager" }, { "label": "Manager", "value": "manager" }, { "label": "Teammate", "value": "teammate" }, { "label": "Anonymous", "value": "anonymous" }, { "label": "Logged in", "value": "loggedIn" }, { "label": "Guest", "value": "guest" }], }
32
32
  },
33
33
  /** Description. */
@@ -37,13 +37,29 @@ export declare const BASE_ROLES: readonly [{
37
37
  }, {
38
38
  readonly name: "Guest";
39
39
  readonly slug: "guest";
40
- }, {
40
+ }];
41
+ export declare const BASE_ROLES_WITH_META: ({
42
+ readonly name: "Owner";
43
+ readonly slug: "owner";
44
+ } | {
45
+ readonly name: "Group manager";
46
+ readonly slug: "groupManager";
47
+ } | {
48
+ readonly name: "Manager";
49
+ readonly slug: "manager";
50
+ } | {
51
+ readonly name: "Teammate";
52
+ readonly slug: "teammate";
53
+ } | {
54
+ readonly name: "Guest";
55
+ readonly slug: "guest";
56
+ } | {
41
57
  readonly name: "Anonymous";
42
58
  readonly slug: "anonymous";
43
- }, {
59
+ } | {
44
60
  readonly name: "Logged in";
45
61
  readonly slug: "loggedIn";
46
- }];
62
+ })[];
47
63
  export declare const EMPLOYED_BASE_ROLE_CHOICES: readonly [{
48
64
  readonly label: "Owner";
49
65
  readonly value: "owner";
@@ -57,7 +73,7 @@ export declare const EMPLOYED_BASE_ROLE_CHOICES: readonly [{
57
73
  readonly label: "Teammate";
58
74
  readonly value: "teammate";
59
75
  }];
60
- export declare const GUEST_ROLE_CHOICES: readonly [{
76
+ export declare const GUEST_BASE_ROLE_CHOICES: readonly [{
61
77
  readonly label: "Guest";
62
78
  readonly value: "guest";
63
79
  }];
@@ -68,7 +84,23 @@ export declare const META_BASE_ROLE_CHOICES: readonly [{
68
84
  readonly label: "Logged in";
69
85
  readonly value: "loggedIn";
70
86
  }];
71
- export declare const ROLE_CHOICES: readonly [{
87
+ export declare const BASE_ROLE_CHOICES: readonly [{
88
+ readonly label: "Owner";
89
+ readonly value: "owner";
90
+ }, {
91
+ readonly label: "Group manager";
92
+ readonly value: "groupManager";
93
+ }, {
94
+ readonly label: "Manager";
95
+ readonly value: "manager";
96
+ }, {
97
+ readonly label: "Teammate";
98
+ readonly value: "teammate";
99
+ }, {
100
+ readonly label: "Guest";
101
+ readonly value: "guest";
102
+ }];
103
+ export declare const BASE_ROLE_CHOICES_WITH_META: readonly [{
72
104
  readonly label: "Owner";
73
105
  readonly value: "owner";
74
106
  }, {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ROLE_CHOICES = exports.META_BASE_ROLE_CHOICES = exports.GUEST_ROLE_CHOICES = exports.EMPLOYED_BASE_ROLE_CHOICES = exports.BASE_ROLES = exports.META_BASE_ROLES = exports.GUEST_BASE_ROLES = exports.EMPLOYED_BASE_ROLES = void 0;
3
+ exports.BASE_ROLE_CHOICES_WITH_META = exports.BASE_ROLE_CHOICES = exports.META_BASE_ROLE_CHOICES = exports.GUEST_BASE_ROLE_CHOICES = exports.EMPLOYED_BASE_ROLE_CHOICES = exports.BASE_ROLES_WITH_META = exports.BASE_ROLES = exports.META_BASE_ROLES = exports.GUEST_BASE_ROLES = exports.EMPLOYED_BASE_ROLES = void 0;
4
4
  exports.EMPLOYED_BASE_ROLES = [
5
5
  { name: 'Owner', slug: 'owner' },
6
6
  { name: 'Group manager', slug: 'groupManager' },
@@ -12,7 +12,8 @@ exports.META_BASE_ROLES = [
12
12
  { name: 'Anonymous', slug: 'anonymous' },
13
13
  { name: 'Logged in', slug: 'loggedIn' },
14
14
  ];
15
- exports.BASE_ROLES = [
15
+ exports.BASE_ROLES = [...exports.EMPLOYED_BASE_ROLES, ...exports.GUEST_BASE_ROLES];
16
+ exports.BASE_ROLES_WITH_META = [
16
17
  ...exports.EMPLOYED_BASE_ROLES,
17
18
  ...exports.GUEST_BASE_ROLES,
18
19
  ...exports.META_BASE_ROLES,
@@ -23,13 +24,19 @@ exports.EMPLOYED_BASE_ROLE_CHOICES = [
23
24
  { label: 'Manager', value: 'manager' },
24
25
  { label: 'Teammate', value: 'teammate' },
25
26
  ];
26
- exports.GUEST_ROLE_CHOICES = [{ label: 'Guest', value: 'guest' }];
27
+ exports.GUEST_BASE_ROLE_CHOICES = [
28
+ { label: 'Guest', value: 'guest' },
29
+ ];
27
30
  exports.META_BASE_ROLE_CHOICES = [
28
31
  { label: 'Anonymous', value: 'anonymous' },
29
32
  { label: 'Logged in', value: 'loggedIn' },
30
33
  ];
31
- exports.ROLE_CHOICES = [
34
+ exports.BASE_ROLE_CHOICES = [
35
+ ...exports.EMPLOYED_BASE_ROLE_CHOICES,
36
+ ...exports.GUEST_BASE_ROLE_CHOICES,
37
+ ];
38
+ exports.BASE_ROLE_CHOICES_WITH_META = [
32
39
  ...exports.EMPLOYED_BASE_ROLE_CHOICES,
33
40
  ...exports.META_BASE_ROLE_CHOICES,
34
- ...exports.GUEST_ROLE_CHOICES,
41
+ ...exports.GUEST_BASE_ROLE_CHOICES,
35
42
  ];
@@ -129,7 +129,7 @@ export declare namespace SpruceSchemas.Spruce.v2020_07_22 {
129
129
  'id': string;
130
130
  /** Name. */
131
131
  'name': string;
132
- /** Base. Used to determine the default permissions when this role is created and the fallback for when a permission is not set on this role. */
132
+ /** Base. A best practices starting point for a role based on the generalized roles at a company. */
133
133
  'base'?: ("owner" | "groupManager" | "manager" | "teammate" | "anonymous" | "loggedIn" | "guest") | undefined | null;
134
134
  /** Description. */
135
135
  'description'?: string | undefined | null;
@@ -161,11 +161,11 @@ export declare namespace SpruceSchemas.Spruce.v2020_07_22 {
161
161
  isRequired: true;
162
162
  options: undefined;
163
163
  };
164
- /** Base. Used to determine the default permissions when this role is created and the fallback for when a permission is not set on this role. */
164
+ /** Base. A best practices starting point for a role based on the generalized roles at a company. */
165
165
  'base': {
166
166
  label: 'Base';
167
167
  type: 'select';
168
- hint: 'Used to determine the default permissions when this role is created and the fallback for when a permission is not set on this role.';
168
+ hint: 'A best practices starting point for a role based on the generalized roles at a company.';
169
169
  options: {
170
170
  choices: [{
171
171
  "label": "Owner";
@@ -21,11 +21,11 @@ const roleSchema = {
21
21
  isRequired: true,
22
22
  options: undefined
23
23
  },
24
- /** Base. Used to determine the default permissions when this role is created and the fallback for when a permission is not set on this role. */
24
+ /** Base. A best practices starting point for a role based on the generalized roles at a company. */
25
25
  'base': {
26
26
  label: 'Base',
27
27
  type: 'select',
28
- hint: 'Used to determine the default permissions when this role is created and the fallback for when a permission is not set on this role.',
28
+ hint: 'A best practices starting point for a role based on the generalized roles at a company.',
29
29
  options: { choices: [{ "label": "Owner", "value": "owner" }, { "label": "Group manager", "value": "groupManager" }, { "label": "Manager", "value": "manager" }, { "label": "Teammate", "value": "teammate" }, { "label": "Anonymous", "value": "anonymous" }, { "label": "Logged in", "value": "loggedIn" }, { "label": "Guest", "value": "guest" }], }
30
30
  },
31
31
  /** Description. */
@@ -37,13 +37,29 @@ export declare const BASE_ROLES: readonly [{
37
37
  }, {
38
38
  readonly name: "Guest";
39
39
  readonly slug: "guest";
40
- }, {
40
+ }];
41
+ export declare const BASE_ROLES_WITH_META: ({
42
+ readonly name: "Owner";
43
+ readonly slug: "owner";
44
+ } | {
45
+ readonly name: "Group manager";
46
+ readonly slug: "groupManager";
47
+ } | {
48
+ readonly name: "Manager";
49
+ readonly slug: "manager";
50
+ } | {
51
+ readonly name: "Teammate";
52
+ readonly slug: "teammate";
53
+ } | {
54
+ readonly name: "Guest";
55
+ readonly slug: "guest";
56
+ } | {
41
57
  readonly name: "Anonymous";
42
58
  readonly slug: "anonymous";
43
- }, {
59
+ } | {
44
60
  readonly name: "Logged in";
45
61
  readonly slug: "loggedIn";
46
- }];
62
+ })[];
47
63
  export declare const EMPLOYED_BASE_ROLE_CHOICES: readonly [{
48
64
  readonly label: "Owner";
49
65
  readonly value: "owner";
@@ -57,7 +73,7 @@ export declare const EMPLOYED_BASE_ROLE_CHOICES: readonly [{
57
73
  readonly label: "Teammate";
58
74
  readonly value: "teammate";
59
75
  }];
60
- export declare const GUEST_ROLE_CHOICES: readonly [{
76
+ export declare const GUEST_BASE_ROLE_CHOICES: readonly [{
61
77
  readonly label: "Guest";
62
78
  readonly value: "guest";
63
79
  }];
@@ -68,7 +84,23 @@ export declare const META_BASE_ROLE_CHOICES: readonly [{
68
84
  readonly label: "Logged in";
69
85
  readonly value: "loggedIn";
70
86
  }];
71
- export declare const ROLE_CHOICES: readonly [{
87
+ export declare const BASE_ROLE_CHOICES: readonly [{
88
+ readonly label: "Owner";
89
+ readonly value: "owner";
90
+ }, {
91
+ readonly label: "Group manager";
92
+ readonly value: "groupManager";
93
+ }, {
94
+ readonly label: "Manager";
95
+ readonly value: "manager";
96
+ }, {
97
+ readonly label: "Teammate";
98
+ readonly value: "teammate";
99
+ }, {
100
+ readonly label: "Guest";
101
+ readonly value: "guest";
102
+ }];
103
+ export declare const BASE_ROLE_CHOICES_WITH_META: readonly [{
72
104
  readonly label: "Owner";
73
105
  readonly value: "owner";
74
106
  }, {
@@ -9,7 +9,8 @@ export const META_BASE_ROLES = [
9
9
  { name: 'Anonymous', slug: 'anonymous' },
10
10
  { name: 'Logged in', slug: 'loggedIn' },
11
11
  ];
12
- export const BASE_ROLES = [
12
+ export const BASE_ROLES = [...EMPLOYED_BASE_ROLES, ...GUEST_BASE_ROLES];
13
+ export const BASE_ROLES_WITH_META = [
13
14
  ...EMPLOYED_BASE_ROLES,
14
15
  ...GUEST_BASE_ROLES,
15
16
  ...META_BASE_ROLES,
@@ -20,13 +21,19 @@ export const EMPLOYED_BASE_ROLE_CHOICES = [
20
21
  { label: 'Manager', value: 'manager' },
21
22
  { label: 'Teammate', value: 'teammate' },
22
23
  ];
23
- export const GUEST_ROLE_CHOICES = [{ label: 'Guest', value: 'guest' }];
24
+ export const GUEST_BASE_ROLE_CHOICES = [
25
+ { label: 'Guest', value: 'guest' },
26
+ ];
24
27
  export const META_BASE_ROLE_CHOICES = [
25
28
  { label: 'Anonymous', value: 'anonymous' },
26
29
  { label: 'Logged in', value: 'loggedIn' },
27
30
  ];
28
- export const ROLE_CHOICES = [
31
+ export const BASE_ROLE_CHOICES = [
32
+ ...EMPLOYED_BASE_ROLE_CHOICES,
33
+ ...GUEST_BASE_ROLE_CHOICES,
34
+ ];
35
+ export const BASE_ROLE_CHOICES_WITH_META = [
29
36
  ...EMPLOYED_BASE_ROLE_CHOICES,
30
37
  ...META_BASE_ROLE_CHOICES,
31
- ...GUEST_ROLE_CHOICES,
38
+ ...GUEST_BASE_ROLE_CHOICES,
32
39
  ];
@@ -1,5 +1,5 @@
1
1
  import { buildSchema } from '@sprucelabs/schema';
2
- import { ROLE_CHOICES } from '../../constants.js';
2
+ import { BASE_ROLE_CHOICES_WITH_META } from '../../constants.js';
3
3
  export default buildSchema({
4
4
  id: 'role',
5
5
  name: 'Role',
@@ -18,9 +18,9 @@ export default buildSchema({
18
18
  base: {
19
19
  label: 'Base',
20
20
  type: 'select',
21
- hint: 'Used to determine the default permissions when this role is created and the fallback for when a permission is not set on this role.',
21
+ hint: 'A best practices starting point for a role based on the generalized roles at a company.',
22
22
  options: {
23
- choices: ROLE_CHOICES,
23
+ choices: BASE_ROLE_CHOICES_WITH_META,
24
24
  },
25
25
  },
26
26
  description: {
@@ -20,9 +20,9 @@ exports.default = (0, schema_1.buildSchema)({
20
20
  base: {
21
21
  label: 'Base',
22
22
  type: 'select',
23
- hint: 'Used to determine the default permissions when this role is created and the fallback for when a permission is not set on this role.',
23
+ hint: 'A best practices starting point for a role based on the generalized roles at a company.',
24
24
  options: {
25
- choices: constants_1.ROLE_CHOICES,
25
+ choices: constants_1.BASE_ROLE_CHOICES_WITH_META,
26
26
  },
27
27
  },
28
28
  description: {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "33.1.8",
6
+ "version": "34.0.1",
7
7
  "files": [
8
8
  "build/**/*",
9
9
  "tsconfig.json"
@@ -64,15 +64,15 @@
64
64
  "watch.rebuild": "yarn clean.all && yarn && yarn watch.build.dev"
65
65
  },
66
66
  "dependencies": {
67
- "@sprucelabs/schema": "^28.2.46"
67
+ "@sprucelabs/schema": "^28.2.48"
68
68
  },
69
69
  "devDependencies": {
70
70
  "@sprucelabs/esm-postbuild": "^1.0.498",
71
71
  "@sprucelabs/jest-json-reporter": "^6.0.405",
72
72
  "@sprucelabs/resolve-path-aliases": "^1.1.59",
73
73
  "@sprucelabs/semantic-release": "^4.0.8",
74
- "@sprucelabs/test": "^7.7.326",
75
- "@sprucelabs/test-utils": "^3.1.10",
74
+ "@sprucelabs/test": "^7.7.327",
75
+ "@sprucelabs/test-utils": "^3.1.11",
76
76
  "@types/node": "^18.0.0",
77
77
  "chokidar-cli": "^3.0.0",
78
78
  "concurrently": "^7.2.2",