@sprucelabs/spruce-core-schemas 23.0.135 → 23.2.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.
@@ -243,7 +243,7 @@ export declare namespace SpruceSchemas.Spruce.v2020_07_22 {
243
243
  /** Name. */
244
244
  'name': string;
245
245
  /** 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. */
246
- 'base'?: ("owner" | "groupManager" | "manager" | "teammate" | "guest" | "anonymous" | "loggedIn") | undefined | null;
246
+ 'base'?: ("owner" | "groupManager" | "manager" | "teammate" | "anonymous" | "loggedIn" | "guest") | undefined | null;
247
247
  /** Description. */
248
248
  'description'?: string | undefined | null;
249
249
  'dateCreated': number;
@@ -292,15 +292,15 @@ export declare namespace SpruceSchemas.Spruce.v2020_07_22 {
292
292
  }, {
293
293
  "label": "Teammate";
294
294
  "value": "teammate";
295
- }, {
296
- "label": "Guest";
297
- "value": "guest";
298
295
  }, {
299
296
  "label": "Anonymous";
300
297
  "value": "anonymous";
301
298
  }, {
302
299
  "label": "Logged in";
303
300
  "value": "loggedIn";
301
+ }, {
302
+ "label": "Guest";
303
+ "value": "guest";
304
304
  }];
305
305
  };
306
306
  };
@@ -28,7 +28,7 @@ const roleSchema = {
28
28
  label: 'Base',
29
29
  type: 'select',
30
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.',
31
- options: { choices: [{ "label": "Owner", "value": "owner" }, { "label": "Group manager", "value": "groupManager" }, { "label": "Manager", "value": "manager" }, { "label": "Teammate", "value": "teammate" }, { "label": "Guest", "value": "guest" }, { "label": "Anonymous", "value": "anonymous" }, { "label": "Logged in", "value": "loggedIn" }], }
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. */
34
34
  'description': {
@@ -0,0 +1,32 @@
1
+ export declare const EMPLOYED_BASE_ROLES: {
2
+ name: string;
3
+ slug: string;
4
+ }[];
5
+ export declare const GUEST_BASE_ROLES: {
6
+ name: string;
7
+ slug: string;
8
+ }[];
9
+ export declare const META_BASE_ROLES: {
10
+ name: string;
11
+ slug: string;
12
+ }[];
13
+ export declare const BASE_ROLES: {
14
+ name: string;
15
+ slug: string;
16
+ }[];
17
+ export declare const EMPLOYED_BASE_ROLE_CHOICES: {
18
+ label: string;
19
+ value: string;
20
+ }[];
21
+ export declare const GUEST_ROLE_CHOICES: {
22
+ label: string;
23
+ value: string;
24
+ }[];
25
+ export declare const META_BASE_ROLE_CHOICES: {
26
+ label: string;
27
+ value: string;
28
+ }[];
29
+ export declare const ROLE_CHOICES: {
30
+ label: string;
31
+ value: string;
32
+ }[];
@@ -0,0 +1,30 @@
1
+ "use strict";
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;
4
+ exports.EMPLOYED_BASE_ROLES = [
5
+ { name: 'Owner', slug: 'owner' },
6
+ { name: 'Group manager', slug: 'groupManager' },
7
+ { name: 'Manager', slug: 'manager' },
8
+ { name: 'Teammate', slug: 'teammate' },
9
+ ];
10
+ exports.GUEST_BASE_ROLES = [{ name: 'Guest', slug: 'guest' }];
11
+ exports.META_BASE_ROLES = [
12
+ { name: 'Anonymous', slug: 'anonymous' },
13
+ { name: 'Logged in', slug: 'loggedIn' },
14
+ ];
15
+ exports.BASE_ROLES = [
16
+ ...exports.EMPLOYED_BASE_ROLES,
17
+ ...exports.GUEST_BASE_ROLES,
18
+ ...exports.META_BASE_ROLES,
19
+ ];
20
+ const mapBaseToChoice = (br) => ({ label: br.name, value: br.slug });
21
+ exports.EMPLOYED_BASE_ROLE_CHOICES = [
22
+ ...exports.EMPLOYED_BASE_ROLES.map(mapBaseToChoice),
23
+ ];
24
+ exports.GUEST_ROLE_CHOICES = exports.GUEST_BASE_ROLES.map(mapBaseToChoice);
25
+ exports.META_BASE_ROLE_CHOICES = exports.META_BASE_ROLES.map(mapBaseToChoice);
26
+ exports.ROLE_CHOICES = [
27
+ ...exports.EMPLOYED_BASE_ROLE_CHOICES,
28
+ ...exports.META_BASE_ROLE_CHOICES,
29
+ ...exports.GUEST_ROLE_CHOICES,
30
+ ];
@@ -243,7 +243,7 @@ export declare namespace SpruceSchemas.Spruce.v2020_07_22 {
243
243
  /** Name. */
244
244
  'name': string;
245
245
  /** 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. */
246
- 'base'?: ("owner" | "groupManager" | "manager" | "teammate" | "guest" | "anonymous" | "loggedIn") | undefined | null;
246
+ 'base'?: ("owner" | "groupManager" | "manager" | "teammate" | "anonymous" | "loggedIn" | "guest") | undefined | null;
247
247
  /** Description. */
248
248
  'description'?: string | undefined | null;
249
249
  'dateCreated': number;
@@ -292,15 +292,15 @@ export declare namespace SpruceSchemas.Spruce.v2020_07_22 {
292
292
  }, {
293
293
  "label": "Teammate";
294
294
  "value": "teammate";
295
- }, {
296
- "label": "Guest";
297
- "value": "guest";
298
295
  }, {
299
296
  "label": "Anonymous";
300
297
  "value": "anonymous";
301
298
  }, {
302
299
  "label": "Logged in";
303
300
  "value": "loggedIn";
301
+ }, {
302
+ "label": "Guest";
303
+ "value": "guest";
304
304
  }];
305
305
  };
306
306
  };
@@ -26,7 +26,7 @@ const roleSchema = {
26
26
  label: 'Base',
27
27
  type: 'select',
28
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.',
29
- options: { choices: [{ "label": "Owner", "value": "owner" }, { "label": "Group manager", "value": "groupManager" }, { "label": "Manager", "value": "manager" }, { "label": "Teammate", "value": "teammate" }, { "label": "Guest", "value": "guest" }, { "label": "Anonymous", "value": "anonymous" }, { "label": "Logged in", "value": "loggedIn" }], }
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. */
32
32
  'description': {
@@ -0,0 +1,32 @@
1
+ export declare const EMPLOYED_BASE_ROLES: {
2
+ name: string;
3
+ slug: string;
4
+ }[];
5
+ export declare const GUEST_BASE_ROLES: {
6
+ name: string;
7
+ slug: string;
8
+ }[];
9
+ export declare const META_BASE_ROLES: {
10
+ name: string;
11
+ slug: string;
12
+ }[];
13
+ export declare const BASE_ROLES: {
14
+ name: string;
15
+ slug: string;
16
+ }[];
17
+ export declare const EMPLOYED_BASE_ROLE_CHOICES: {
18
+ label: string;
19
+ value: string;
20
+ }[];
21
+ export declare const GUEST_ROLE_CHOICES: {
22
+ label: string;
23
+ value: string;
24
+ }[];
25
+ export declare const META_BASE_ROLE_CHOICES: {
26
+ label: string;
27
+ value: string;
28
+ }[];
29
+ export declare const ROLE_CHOICES: {
30
+ label: string;
31
+ value: string;
32
+ }[];
@@ -0,0 +1,27 @@
1
+ export const EMPLOYED_BASE_ROLES = [
2
+ { name: 'Owner', slug: 'owner' },
3
+ { name: 'Group manager', slug: 'groupManager' },
4
+ { name: 'Manager', slug: 'manager' },
5
+ { name: 'Teammate', slug: 'teammate' },
6
+ ];
7
+ export const GUEST_BASE_ROLES = [{ name: 'Guest', slug: 'guest' }];
8
+ export const META_BASE_ROLES = [
9
+ { name: 'Anonymous', slug: 'anonymous' },
10
+ { name: 'Logged in', slug: 'loggedIn' },
11
+ ];
12
+ export const BASE_ROLES = [
13
+ ...EMPLOYED_BASE_ROLES,
14
+ ...GUEST_BASE_ROLES,
15
+ ...META_BASE_ROLES,
16
+ ];
17
+ const mapBaseToChoice = (br) => ({ label: br.name, value: br.slug });
18
+ export const EMPLOYED_BASE_ROLE_CHOICES = [
19
+ ...EMPLOYED_BASE_ROLES.map(mapBaseToChoice),
20
+ ];
21
+ export const GUEST_ROLE_CHOICES = GUEST_BASE_ROLES.map(mapBaseToChoice);
22
+ export const META_BASE_ROLE_CHOICES = META_BASE_ROLES.map(mapBaseToChoice);
23
+ export const ROLE_CHOICES = [
24
+ ...EMPLOYED_BASE_ROLE_CHOICES,
25
+ ...META_BASE_ROLE_CHOICES,
26
+ ...GUEST_ROLE_CHOICES,
27
+ ];
@@ -13,3 +13,4 @@ export { default as messageSourceSchema } from "./.spruce/schemas/spruce/v2020_0
13
13
  export { default as messageTargetSchema } from "./.spruce/schemas/spruce/v2020_07_22/messageTarget.schema";
14
14
  export { default as sendMessageSchema } from "./.spruce/schemas/spruce/v2020_07_22/sendMessage.schema";
15
15
  export { default as fullMessageChoicesSchema } from "./.spruce/schemas/spruce/v2020_07_22/fullMessageChoices.schema";
16
+ export * from './constants';
@@ -13,4 +13,4 @@ export { default as messageSourceSchema } from './.spruce/schemas/spruce/v2020_0
13
13
  export { default as messageTargetSchema } from './.spruce/schemas/spruce/v2020_07_22/messageTarget.schema.js';
14
14
  export { default as sendMessageSchema } from './.spruce/schemas/spruce/v2020_07_22/sendMessage.schema.js';
15
15
  export { default as fullMessageChoicesSchema } from './.spruce/schemas/spruce/v2020_07_22/fullMessageChoices.schema.js';
16
- //comment added to bump push, remove when found
16
+ export * from './constants.js';
@@ -1,4 +1,5 @@
1
1
  import { buildSchema } from '@sprucelabs/schema';
2
+ import { ROLE_CHOICES } from '../../constants.js';
2
3
  export default buildSchema({
3
4
  id: 'role',
4
5
  name: 'Role',
@@ -19,15 +20,7 @@ export default buildSchema({
19
20
  type: 'select',
20
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
22
  options: {
22
- choices: [
23
- { label: 'Owner', value: 'owner' },
24
- { label: 'Group manager', value: 'groupManager' },
25
- { label: 'Manager', value: 'manager' },
26
- { label: 'Teammate', value: 'teammate' },
27
- { label: 'Guest', value: 'guest' },
28
- { label: 'Anonymous', value: 'anonymous' },
29
- { label: 'Logged in', value: 'loggedIn' },
30
- ],
23
+ choices: ROLE_CHOICES,
31
24
  },
32
25
  },
33
26
  description: {
package/build/index.d.ts CHANGED
@@ -13,3 +13,4 @@ export { default as messageSourceSchema } from "./.spruce/schemas/spruce/v2020_0
13
13
  export { default as messageTargetSchema } from "./.spruce/schemas/spruce/v2020_07_22/messageTarget.schema";
14
14
  export { default as sendMessageSchema } from "./.spruce/schemas/spruce/v2020_07_22/sendMessage.schema";
15
15
  export { default as fullMessageChoicesSchema } from "./.spruce/schemas/spruce/v2020_07_22/fullMessageChoices.schema";
16
+ export * from './constants';
package/build/index.js CHANGED
@@ -43,4 +43,4 @@ var sendMessage_schema_1 = require("./.spruce/schemas/spruce/v2020_07_22/sendMes
43
43
  Object.defineProperty(exports, "sendMessageSchema", { enumerable: true, get: function () { return __importDefault(sendMessage_schema_1).default; } });
44
44
  var fullMessageChoices_schema_1 = require("./.spruce/schemas/spruce/v2020_07_22/fullMessageChoices.schema");
45
45
  Object.defineProperty(exports, "fullMessageChoicesSchema", { enumerable: true, get: function () { return __importDefault(fullMessageChoices_schema_1).default; } });
46
- //comment added to bump push, remove when found
46
+ __exportStar(require("./constants"), exports);
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const schema_1 = require("@sprucelabs/schema");
4
+ const constants_1 = require("../../constants");
4
5
  exports.default = (0, schema_1.buildSchema)({
5
6
  id: 'role',
6
7
  name: 'Role',
@@ -21,15 +22,7 @@ exports.default = (0, schema_1.buildSchema)({
21
22
  type: 'select',
22
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
24
  options: {
24
- choices: [
25
- { label: 'Owner', value: 'owner' },
26
- { label: 'Group manager', value: 'groupManager' },
27
- { label: 'Manager', value: 'manager' },
28
- { label: 'Teammate', value: 'teammate' },
29
- { label: 'Guest', value: 'guest' },
30
- { label: 'Anonymous', value: 'anonymous' },
31
- { label: 'Logged in', value: 'loggedIn' },
32
- ],
25
+ choices: constants_1.ROLE_CHOICES,
33
26
  },
34
27
  },
35
28
  description: {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "23.0.135",
6
+ "version": "23.2.0",
7
7
  "files": [
8
8
  "build/**/*",
9
9
  "tsconfig.json"
@@ -62,14 +62,14 @@
62
62
  "watch.rebuild": "yarn clean.all && yarn && yarn watch.build.dev"
63
63
  },
64
64
  "dependencies": {
65
- "@sprucelabs/schema": "^26.0.131",
65
+ "@sprucelabs/schema": "^26.0.133",
66
66
  "@sprucelabs/spruce-skill-utils": "^24.1.81"
67
67
  },
68
68
  "devDependencies": {
69
- "@sprucelabs/esm-postbuild": "^1.0.401",
69
+ "@sprucelabs/esm-postbuild": "^1.0.402",
70
70
  "@sprucelabs/resolve-path-aliases": "^1.0.261",
71
71
  "@sprucelabs/semantic-release": "^4.0.8",
72
- "@types/node": "^17.0.20",
72
+ "@types/node": "^17.0.21",
73
73
  "chokidar-cli": "^3.0.0",
74
74
  "concurrently": "^7.0.0",
75
75
  "conventional-changelog-sprucelabs": "^1.1.2",