@sprucelabs/spruce-core-schemas 40.0.10 → 40.0.12

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.
Files changed (38) hide show
  1. package/build/.spruce/schemas/core.schemas.types.d.ts +2350 -3060
  2. package/build/.spruce/schemas/fields/fields.types.d.ts +1 -1
  3. package/build/.spruce/schemas/spruce/v2020_07_22/choice.schema.js +5 -5
  4. package/build/.spruce/schemas/spruce/v2020_07_22/feed.schema.js +3 -3
  5. package/build/.spruce/schemas/spruce/v2020_07_22/feedItem.schema.js +20 -20
  6. package/build/.spruce/schemas/spruce/v2020_07_22/feedItemTarget.schema.js +13 -13
  7. package/build/.spruce/schemas/spruce/v2020_07_22/link.schema.js +5 -5
  8. package/build/.spruce/schemas/spruce/v2020_07_22/location.schema.js +23 -1073
  9. package/build/.spruce/schemas/spruce/v2020_07_22/message.schema.js +33 -48
  10. package/build/.spruce/schemas/spruce/v2020_07_22/messageSource.schema.js +13 -13
  11. package/build/.spruce/schemas/spruce/v2020_07_22/messageTarget.schema.js +13 -13
  12. package/build/.spruce/schemas/spruce/v2020_07_22/organization.schema.js +15 -15
  13. package/build/.spruce/schemas/spruce/v2020_07_22/person.schema.js +21 -1071
  14. package/build/.spruce/schemas/spruce/v2020_07_22/personLocation.schema.js +11 -11
  15. package/build/.spruce/schemas/spruce/v2020_07_22/personOrganization.schema.js +11 -11
  16. package/build/.spruce/schemas/spruce/v2020_07_22/role.schema.js +17 -27
  17. package/build/.spruce/schemas/spruce/v2020_07_22/sendMessage.schema.js +26 -41
  18. package/build/.spruce/schemas/spruce/v2020_07_22/skill.schema.js +21 -21
  19. package/build/.spruce/schemas/spruce/v2020_07_22/skillCreator.schema.js +5 -5
  20. package/build/esm/.spruce/schemas/core.schemas.types.d.ts +2350 -3060
  21. package/build/esm/.spruce/schemas/spruce/v2020_07_22/choice.schema.js +5 -5
  22. package/build/esm/.spruce/schemas/spruce/v2020_07_22/feed.schema.js +3 -3
  23. package/build/esm/.spruce/schemas/spruce/v2020_07_22/feedItem.schema.js +20 -20
  24. package/build/esm/.spruce/schemas/spruce/v2020_07_22/feedItemTarget.schema.js +13 -13
  25. package/build/esm/.spruce/schemas/spruce/v2020_07_22/link.schema.js +5 -5
  26. package/build/esm/.spruce/schemas/spruce/v2020_07_22/location.schema.js +23 -1073
  27. package/build/esm/.spruce/schemas/spruce/v2020_07_22/message.schema.js +33 -48
  28. package/build/esm/.spruce/schemas/spruce/v2020_07_22/messageSource.schema.js +13 -13
  29. package/build/esm/.spruce/schemas/spruce/v2020_07_22/messageTarget.schema.js +13 -13
  30. package/build/esm/.spruce/schemas/spruce/v2020_07_22/organization.schema.js +15 -15
  31. package/build/esm/.spruce/schemas/spruce/v2020_07_22/person.schema.js +21 -1071
  32. package/build/esm/.spruce/schemas/spruce/v2020_07_22/personLocation.schema.js +11 -11
  33. package/build/esm/.spruce/schemas/spruce/v2020_07_22/personOrganization.schema.js +11 -11
  34. package/build/esm/.spruce/schemas/spruce/v2020_07_22/role.schema.js +17 -27
  35. package/build/esm/.spruce/schemas/spruce/v2020_07_22/sendMessage.schema.js +26 -41
  36. package/build/esm/.spruce/schemas/spruce/v2020_07_22/skill.schema.js +21 -21
  37. package/build/esm/.spruce/schemas/spruce/v2020_07_22/skillCreator.schema.js +5 -5
  38. package/package.json +9 -10
@@ -7,40 +7,40 @@ const personLocationSchema = {
7
7
  moduleToImportFromWhenRemote: '@sprucelabs/spruce-core-schemas',
8
8
  fields: {
9
9
  /** Id. */
10
- id: {
10
+ 'id': {
11
11
  label: 'Id',
12
12
  type: 'id',
13
13
  isRequired: true,
14
- options: undefined,
14
+ options: undefined
15
15
  },
16
16
  /** Location id. */
17
- locationId: {
17
+ 'locationId': {
18
18
  label: 'Location id',
19
19
  type: 'id',
20
20
  isRequired: true,
21
- options: undefined,
21
+ options: undefined
22
22
  },
23
23
  /** Person id. */
24
- personId: {
24
+ 'personId': {
25
25
  label: 'Person id',
26
26
  type: 'id',
27
27
  isRequired: true,
28
- options: undefined,
28
+ options: undefined
29
29
  },
30
30
  /** Date created. */
31
- dateCreated: {
31
+ 'dateCreated': {
32
32
  label: 'Date created',
33
33
  type: 'dateTime',
34
34
  isRequired: true,
35
- options: undefined,
35
+ options: undefined
36
36
  },
37
37
  /** Date deleted. */
38
- dateDeleted: {
38
+ 'dateDeleted': {
39
39
  label: 'Date deleted',
40
40
  type: 'dateTime',
41
- options: undefined,
41
+ options: undefined
42
42
  },
43
- },
43
+ }
44
44
  };
45
45
  SchemaRegistry.getInstance().trackSchema(personLocationSchema);
46
46
  export default personLocationSchema;
@@ -7,40 +7,40 @@ const personOrganizationSchema = {
7
7
  moduleToImportFromWhenRemote: '@sprucelabs/spruce-core-schemas',
8
8
  fields: {
9
9
  /** Id. */
10
- id: {
10
+ 'id': {
11
11
  label: 'Id',
12
12
  type: 'id',
13
13
  isRequired: true,
14
- options: undefined,
14
+ options: undefined
15
15
  },
16
16
  /** Organization id. */
17
- organizationId: {
17
+ 'organizationId': {
18
18
  label: 'Organization id',
19
19
  type: 'id',
20
20
  isRequired: true,
21
- options: undefined,
21
+ options: undefined
22
22
  },
23
23
  /** Person id. */
24
- personId: {
24
+ 'personId': {
25
25
  label: 'Person id',
26
26
  type: 'id',
27
27
  isRequired: true,
28
- options: undefined,
28
+ options: undefined
29
29
  },
30
30
  /** Date created. */
31
- dateCreated: {
31
+ 'dateCreated': {
32
32
  label: 'Date created',
33
33
  type: 'dateTime',
34
34
  isRequired: true,
35
- options: undefined,
35
+ options: undefined
36
36
  },
37
37
  /** Date deleted. */
38
- dateDeleted: {
38
+ 'dateDeleted': {
39
39
  label: 'Date deleted',
40
40
  type: 'dateTime',
41
- options: undefined,
41
+ options: undefined
42
42
  },
43
- },
43
+ }
44
44
  };
45
45
  SchemaRegistry.getInstance().trackSchema(personOrganizationSchema);
46
46
  export default personOrganizationSchema;
@@ -8,66 +8,56 @@ const roleSchema = {
8
8
  description: 'Every role in Spruce inherits from 5 bases. Anon, Logged in (person not associated with any org), Org Owner, Group Manager, Manager, Teammate, and Guest.',
9
9
  fields: {
10
10
  /** Id. */
11
- id: {
11
+ 'id': {
12
12
  label: 'Id',
13
13
  type: 'id',
14
14
  isRequired: true,
15
- options: undefined,
15
+ options: undefined
16
16
  },
17
17
  /** Name. */
18
- name: {
18
+ 'name': {
19
19
  label: 'Name',
20
20
  type: 'text',
21
21
  isRequired: true,
22
- options: undefined,
22
+ options: undefined
23
23
  },
24
24
  /** Base. A best practices starting point for a role based on the generalized roles at a company. */
25
- base: {
25
+ 'base': {
26
26
  label: 'Base',
27
27
  type: 'select',
28
28
  hint: 'A best practices starting point for a role based on the generalized roles at a company.',
29
- options: {
30
- choices: [
31
- { label: 'Owner', value: 'owner' },
32
- { label: 'Group manager', value: 'groupManager' },
33
- { label: 'Manager', value: 'manager' },
34
- { label: 'Teammate', value: 'teammate' },
35
- { label: 'Anonymous', value: 'anonymous' },
36
- { label: 'Logged in', value: 'loggedIn' },
37
- { label: 'Guest', value: 'guest' },
38
- ],
39
- },
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" }], }
40
30
  },
41
31
  /** Description. */
42
- description: {
32
+ 'description': {
43
33
  label: 'Description',
44
34
  type: 'text',
45
- options: undefined,
35
+ options: undefined
46
36
  },
47
37
  /** . */
48
- dateCreated: {
38
+ 'dateCreated': {
49
39
  type: 'number',
50
40
  isRequired: true,
51
- options: undefined,
41
+ options: undefined
52
42
  },
53
43
  /** . */
54
- dateDeleted: {
44
+ 'dateDeleted': {
55
45
  type: 'number',
56
- options: undefined,
46
+ options: undefined
57
47
  },
58
48
  /** . */
59
- organizationId: {
49
+ 'organizationId': {
60
50
  type: 'id',
61
- options: undefined,
51
+ options: undefined
62
52
  },
63
53
  /** Public. Should I let people that are not part of this organization this role? */
64
- isPublic: {
54
+ 'isPublic': {
65
55
  label: 'Public',
66
56
  type: 'boolean',
67
57
  hint: 'Should I let people that are not part of this organization this role?',
68
- options: undefined,
58
+ options: undefined
69
59
  },
70
- },
60
+ }
71
61
  };
72
62
  SchemaRegistry.getInstance().trackSchema(roleSchema);
73
63
  export default roleSchema;
@@ -1,7 +1,7 @@
1
1
  import { SchemaRegistry } from '@sprucelabs/schema';
2
- import choiceSchema_v2020_07_22 from './choice.schema.js';
3
- import linkSchema_v2020_07_22 from './link.schema.js';
4
2
  import messageTargetSchema_v2020_07_22 from './messageTarget.schema.js';
3
+ import linkSchema_v2020_07_22 from './link.schema.js';
4
+ import choiceSchema_v2020_07_22 from './choice.schema.js';
5
5
  const sendMessageSchema = {
6
6
  id: 'sendMessage',
7
7
  version: 'v2020_07_22',
@@ -10,88 +10,73 @@ const sendMessageSchema = {
10
10
  moduleToImportFromWhenRemote: '@sprucelabs/spruce-core-schemas',
11
11
  fields: {
12
12
  /** . An arbitrary id that can be used to track this message when being sent and not yet assigned an Id. */
13
- trackingId: {
13
+ 'trackingId': {
14
14
  type: 'id',
15
15
  hint: 'An arbitrary id that can be used to track this message when being sent and not yet assigned an Id.',
16
- options: undefined,
16
+ options: undefined
17
17
  },
18
18
  /** . */
19
- dateSent: {
19
+ 'dateSent': {
20
20
  type: 'number',
21
- options: undefined,
21
+ options: undefined
22
22
  },
23
23
  /** . */
24
- target: {
24
+ 'target': {
25
25
  type: 'schema',
26
26
  isRequired: true,
27
- options: { schema: messageTargetSchema_v2020_07_22 },
27
+ options: { schema: messageTargetSchema_v2020_07_22, }
28
28
  },
29
29
  /** . */
30
- errors: {
30
+ 'errors': {
31
31
  type: 'text',
32
32
  isPrivate: true,
33
33
  isArray: true,
34
- options: undefined,
34
+ options: undefined
35
35
  },
36
36
  /** . */
37
- classification: {
37
+ 'classification': {
38
38
  type: 'select',
39
39
  isRequired: true,
40
- options: {
41
- choices: [
42
- { value: 'auth', label: 'Auth' },
43
- { value: 'transactional', label: 'transactional' },
44
- { value: 'promotional', label: 'Promotional' },
45
- { value: 'incoming', label: 'incoming' },
46
- ],
47
- },
40
+ options: { choices: [{ "value": "auth", "label": "Auth" }, { "value": "transactional", "label": "transactional" }, { "value": "promotional", "label": "Promotional" }, { "value": "incoming", "label": "incoming" }], }
48
41
  },
49
42
  /** . */
50
- status: {
43
+ 'status': {
51
44
  type: 'select',
52
45
  isPrivate: true,
53
- defaultValue: 'pending',
54
- options: {
55
- choices: [
56
- { value: 'pending', label: 'Pending' },
57
- { value: 'processing', label: 'Processing' },
58
- { value: 'sent', label: 'Sent' },
59
- { value: 'failed', label: 'Failed' },
60
- { value: 'ignored', label: 'Ignored' },
61
- ],
62
- },
46
+ defaultValue: "pending",
47
+ options: { choices: [{ "value": "pending", "label": "Pending" }, { "value": "processing", "label": "Processing" }, { "value": "sent", "label": "Sent" }, { "value": "failed", "label": "Failed" }, { "value": "ignored", "label": "Ignored" }], }
63
48
  },
64
49
  /** . */
65
- body: {
50
+ 'body': {
66
51
  type: 'text',
67
52
  isRequired: true,
68
- options: undefined,
53
+ options: undefined
69
54
  },
70
55
  /** . */
71
- context: {
56
+ 'context': {
72
57
  type: 'raw',
73
58
  isPrivate: true,
74
- options: { valueType: `Record<string, any>` },
59
+ options: { valueType: `Record<string, any>`, }
75
60
  },
76
61
  /** . */
77
- topicId: {
62
+ 'topicId': {
78
63
  type: 'id',
79
- options: undefined,
64
+ options: undefined
80
65
  },
81
66
  /** . */
82
- links: {
67
+ 'links': {
83
68
  type: 'schema',
84
69
  isArray: true,
85
70
  minArrayLength: 0,
86
- options: { schema: linkSchema_v2020_07_22 },
71
+ options: { schema: linkSchema_v2020_07_22, }
87
72
  },
88
73
  /** . */
89
- choices: {
74
+ 'choices': {
90
75
  type: 'schema',
91
76
  isArray: true,
92
- options: { schema: choiceSchema_v2020_07_22 },
77
+ options: { schema: choiceSchema_v2020_07_22, }
93
78
  },
94
- },
79
+ }
95
80
  };
96
81
  SchemaRegistry.getInstance().trackSchema(sendMessageSchema);
97
82
  export default sendMessageSchema;
@@ -9,77 +9,77 @@ const skillSchema = {
9
9
  description: 'An ability Sprucebot has learned.',
10
10
  fields: {
11
11
  /** Id. */
12
- id: {
12
+ 'id': {
13
13
  label: 'Id',
14
14
  type: 'id',
15
15
  isRequired: true,
16
- options: undefined,
16
+ options: undefined
17
17
  },
18
18
  /** Id. */
19
- apiKey: {
19
+ 'apiKey': {
20
20
  label: 'Id',
21
21
  type: 'id',
22
22
  isPrivate: true,
23
23
  isRequired: true,
24
- options: undefined,
24
+ options: undefined
25
25
  },
26
26
  /** Name. */
27
- name: {
27
+ 'name': {
28
28
  label: 'Name',
29
29
  type: 'text',
30
30
  isRequired: true,
31
- options: undefined,
31
+ options: undefined
32
32
  },
33
33
  /** Description. */
34
- description: {
34
+ 'description': {
35
35
  label: 'Description',
36
36
  type: 'text',
37
- options: undefined,
37
+ options: undefined
38
38
  },
39
39
  /** Namespace. */
40
- slug: {
40
+ 'slug': {
41
41
  label: 'Namespace',
42
42
  type: 'text',
43
43
  isRequired: true,
44
- options: undefined,
44
+ options: undefined
45
45
  },
46
46
  /** Published. Does this skill show up in the marketplace and can other devs use it as a dependency? */
47
- isPublished: {
47
+ 'isPublished': {
48
48
  label: 'Published',
49
49
  type: 'boolean',
50
50
  hint: 'Does this skill show up in the marketplace and can other devs use it as a dependency?',
51
- options: undefined,
51
+ options: undefined
52
52
  },
53
53
  /** Global. Does this skill require needing to be installed anywhere. */
54
- canBeInstalled: {
54
+ 'canBeInstalled': {
55
55
  label: 'Global',
56
56
  type: 'boolean',
57
57
  hint: 'Does this skill require needing to be installed anywhere.',
58
58
  defaultValue: true,
59
- options: undefined,
59
+ options: undefined
60
60
  },
61
61
  /** Creators. The people or skills who created and own this skill. */
62
- creators: {
62
+ 'creators': {
63
63
  label: 'Creators',
64
64
  type: 'schema',
65
65
  isPrivate: true,
66
66
  isRequired: true,
67
67
  hint: 'The people or skills who created and own this skill.',
68
68
  isArray: true,
69
- options: { schema: skillCreatorSchema_v2020_07_22 },
69
+ options: { schema: skillCreatorSchema_v2020_07_22, }
70
70
  },
71
71
  /** . */
72
- dateCreated: {
72
+ 'dateCreated': {
73
73
  type: 'dateTime',
74
74
  isRequired: true,
75
- options: undefined,
75
+ options: undefined
76
76
  },
77
77
  /** . */
78
- dateDeleted: {
78
+ 'dateDeleted': {
79
79
  type: 'dateTime',
80
- options: undefined,
80
+ options: undefined
81
81
  },
82
- },
82
+ }
83
83
  };
84
84
  SchemaRegistry.getInstance().trackSchema(skillSchema);
85
85
  export default skillSchema;
@@ -7,16 +7,16 @@ const skillCreatorSchema = {
7
7
  moduleToImportFromWhenRemote: '@sprucelabs/spruce-core-schemas',
8
8
  fields: {
9
9
  /** . */
10
- skillId: {
10
+ 'skillId': {
11
11
  type: 'text',
12
- options: undefined,
12
+ options: undefined
13
13
  },
14
14
  /** . */
15
- personId: {
15
+ 'personId': {
16
16
  type: 'text',
17
- options: undefined,
17
+ options: undefined
18
18
  },
19
- },
19
+ }
20
20
  };
21
21
  SchemaRegistry.getInstance().trackSchema(skillCreatorSchema);
22
22
  export default skillCreatorSchema;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "40.0.10",
6
+ "version": "40.0.12",
7
7
  "files": [
8
8
  "build/**/*",
9
9
  "tsconfig.json"
@@ -55,7 +55,6 @@
55
55
  "upgrade.packages.all": "yarn install && yarn upgrade.packages",
56
56
  "upgrade.packages.test": "yarn upgrade.packages.all && yarn lint && yarn build.dev && yarn test",
57
57
  "watch.build.dev": "tsc-watch --sourceMap --onCompilationComplete 'yarn run post.watch.build'",
58
- "watch.lint": "concurrently 'yarn run lint' \"chokidar 'src/**/*' -c 'yarn run lint.tsc'\"",
59
58
  "lint.tsc": "tsc -p . --noEmit",
60
59
  "post.watch.build": "yarn run build.copy-files && yarn run build.resolve-paths",
61
60
  "resolve-paths.lint": "yarn run build.resolve-paths ; yarn run lint",
@@ -64,21 +63,21 @@
64
63
  "watch.rebuild": "yarn run clean.all && yarn install && yarn run watch.build.dev"
65
64
  },
66
65
  "dependencies": {
67
- "@sprucelabs/schema": "^30.0.12"
66
+ "@sprucelabs/schema": "^30.0.16"
68
67
  },
69
68
  "devDependencies": {
70
- "@sprucelabs/esm-postbuild": "^6.0.8",
71
- "@sprucelabs/jest-json-reporter": "^8.0.7",
72
- "@sprucelabs/resolve-path-aliases": "^2.0.10",
69
+ "@sprucelabs/esm-postbuild": "^6.0.12",
70
+ "@sprucelabs/jest-json-reporter": "^8.0.13",
71
+ "@sprucelabs/resolve-path-aliases": "^2.0.14",
73
72
  "@sprucelabs/semantic-release": "^5.0.1",
74
- "@sprucelabs/test": "^9.0.7",
75
- "@sprucelabs/test-utils": "^5.0.10",
73
+ "@sprucelabs/test": "^9.0.10",
74
+ "@sprucelabs/test-utils": "^5.0.11",
76
75
  "@types/node": "^20.12.7",
77
76
  "chokidar-cli": "^3.0.0",
78
- "concurrently": "^8.2.2",
77
+ "date-fns": "^3.6.0",
79
78
  "date-fns-tz": "^3.1.3",
80
79
  "eslint": "^9.1.1",
81
- "eslint-config-spruce": "^11.2.12",
80
+ "eslint-config-spruce": "^11.2.14",
82
81
  "jest": "^29.7.0",
83
82
  "jest-circus": "^29.7.0",
84
83
  "prettier": "^3.2.5",