@sprucelabs/mercury-core-events 20.1.1 → 20.1.2

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 (33) hide show
  1. package/build/.spruce/events/events.contract.d.ts +13 -0
  2. package/build/.spruce/events/events.contract.js +2 -0
  3. package/build/.spruce/events/mercury/registerChatBot.v2020_12_25.contract.d.ts +15 -0
  4. package/build/.spruce/events/mercury/registerChatBot.v2020_12_25.contract.js +22 -0
  5. package/build/.spruce/permissions/permissions.types.d.ts +3 -0
  6. package/build/.spruce/schemas/mercury/v2020_12_25/chatBotCallbacks.schema.d.ts +3 -0
  7. package/build/.spruce/schemas/mercury/v2020_12_25/chatBotCallbacks.schema.js +19 -0
  8. package/build/.spruce/schemas/mercury/v2020_12_25/chatbot.schema.d.ts +3 -0
  9. package/build/.spruce/schemas/mercury/v2020_12_25/chatbot.schema.js +47 -0
  10. package/build/.spruce/schemas/mercury/v2020_12_25/registerChatBotEmitTargetAndPayload.schema.d.ts +3 -0
  11. package/build/.spruce/schemas/mercury/v2020_12_25/registerChatBotEmitTargetAndPayload.schema.js +30 -0
  12. package/build/.spruce/schemas/mercury/v2020_12_25/registerChatBotsPayload.schema.d.ts +3 -0
  13. package/build/.spruce/schemas/mercury/v2020_12_25/registerChatBotsPayload.schema.js +25 -0
  14. package/build/.spruce/schemas/mercury/v2020_12_25/registerChatBotsResponsePayload.schema.d.ts +3 -0
  15. package/build/.spruce/schemas/mercury/v2020_12_25/registerChatBotsResponsePayload.schema.js +19 -0
  16. package/build/.spruce/schemas/schemas.types.d.ts +299 -146
  17. package/build/esm/.spruce/events/events.contract.d.ts +13 -0
  18. package/build/esm/.spruce/events/events.contract.js +2 -0
  19. package/build/esm/.spruce/events/mercury/registerChatBot.v2020_12_25.contract.d.ts +15 -0
  20. package/build/esm/.spruce/events/mercury/registerChatBot.v2020_12_25.contract.js +17 -0
  21. package/build/esm/.spruce/permissions/permissions.types.d.ts +3 -0
  22. package/build/esm/.spruce/schemas/mercury/v2020_12_25/chatBotCallbacks.schema.d.ts +3 -0
  23. package/build/esm/.spruce/schemas/mercury/v2020_12_25/chatBotCallbacks.schema.js +17 -0
  24. package/build/esm/.spruce/schemas/mercury/v2020_12_25/chatbot.schema.d.ts +3 -0
  25. package/build/esm/.spruce/schemas/mercury/v2020_12_25/chatbot.schema.js +42 -0
  26. package/build/esm/.spruce/schemas/mercury/v2020_12_25/registerChatBotEmitTargetAndPayload.schema.d.ts +3 -0
  27. package/build/esm/.spruce/schemas/mercury/v2020_12_25/registerChatBotEmitTargetAndPayload.schema.js +25 -0
  28. package/build/esm/.spruce/schemas/mercury/v2020_12_25/registerChatBotsPayload.schema.d.ts +3 -0
  29. package/build/esm/.spruce/schemas/mercury/v2020_12_25/registerChatBotsPayload.schema.js +20 -0
  30. package/build/esm/.spruce/schemas/mercury/v2020_12_25/registerChatBotsResponsePayload.schema.d.ts +3 -0
  31. package/build/esm/.spruce/schemas/mercury/v2020_12_25/registerChatBotsResponsePayload.schema.js +17 -0
  32. package/build/esm/.spruce/schemas/schemas.types.d.ts +299 -146
  33. package/package.json +1 -1
@@ -0,0 +1,17 @@
1
+ import "./../../permissions/permissions.types";
2
+ import { buildEventContract } from '@sprucelabs/mercury-types';
3
+ import registerChatBotEmitTargetAndPayloadSchema from './../../schemas/mercury/v2020_12_25/registerChatBotEmitTargetAndPayload.schema.js';
4
+ import registerChatBotsResponsePayloadSchema from './../../schemas/mercury/v2020_12_25/registerChatBotsResponsePayload.schema.js';
5
+ const registerChatBotEventContract = buildEventContract({
6
+ eventSignatures: {
7
+ 'register-chat-bot::v2020_12_25': {
8
+ listenPermissions: {
9
+ contractId: 'chat-bot-contract',
10
+ permissionIdsAny: ['can-register-chat-bot'],
11
+ },
12
+ emitPayloadSchema: registerChatBotEmitTargetAndPayloadSchema,
13
+ responsePayloadSchema: registerChatBotsResponsePayloadSchema,
14
+ },
15
+ },
16
+ });
17
+ export default registerChatBotEventContract;
@@ -65,6 +65,9 @@ declare module '@sprucelabs/mercury-types/build/types/mercury.types' {
65
65
  'can-view-marketplace',
66
66
  'can-check-if-skill-is-installed'
67
67
  ];
68
+ 'chat-bot-contract': [
69
+ 'can-register-chat-bot'
70
+ ];
68
71
  }
69
72
  }
70
73
  export interface PermissionContractMap {
@@ -0,0 +1,3 @@
1
+ import { SpruceSchemas } from '../../schemas.types';
2
+ declare const chatBotCallbacksSchema: SpruceSchemas.Mercury.v2020_12_25.ChatBotCallbacksSchema;
3
+ export default chatBotCallbacksSchema;
@@ -0,0 +1,17 @@
1
+ import { SchemaRegistry } from '@sprucelabs/schema';
2
+ const chatBotCallbacksSchema = {
3
+ id: 'chatBotCallbacks',
4
+ version: 'v2020_12_25',
5
+ namespace: 'Mercury',
6
+ name: '',
7
+ fields: {
8
+ /** . */
9
+ 'placeholder': {
10
+ type: 'id',
11
+ isRequired: true,
12
+ options: undefined
13
+ },
14
+ }
15
+ };
16
+ SchemaRegistry.getInstance().trackSchema(chatBotCallbacksSchema);
17
+ export default chatBotCallbacksSchema;
@@ -0,0 +1,3 @@
1
+ import { SpruceSchemas } from '../../schemas.types';
2
+ declare const chatbotSchema: SpruceSchemas.Mercury.v2020_12_25.ChatbotSchema;
3
+ export default chatbotSchema;
@@ -0,0 +1,42 @@
1
+ import { SchemaRegistry } from '@sprucelabs/schema';
2
+ import chatBotCallbacksSchema_v2020_12_25 from './chatBotCallbacks.schema.js';
3
+ const chatbotSchema = {
4
+ id: 'chatbot',
5
+ version: 'v2020_12_25',
6
+ namespace: 'Mercury',
7
+ name: '',
8
+ fields: {
9
+ /** . */
10
+ 'yourJobIfYouChooseToAcceptItIs': {
11
+ type: 'text',
12
+ isRequired: true,
13
+ options: undefined
14
+ },
15
+ /** . */
16
+ 'weAreDoneWhen': {
17
+ type: 'text',
18
+ isRequired: true,
19
+ options: undefined
20
+ },
21
+ /** . */
22
+ 'pleaseKeepInMindThat': {
23
+ type: 'text',
24
+ isArray: true,
25
+ options: undefined
26
+ },
27
+ /** . */
28
+ 'stateSchema': {
29
+ type: 'raw',
30
+ options: { valueType: `SpruceSchema.Schema`, }
31
+ },
32
+ /** . */
33
+ 'callbacks': {
34
+ type: 'schema',
35
+ isArray: true,
36
+ minArrayLength: 0,
37
+ options: { schema: chatBotCallbacksSchema_v2020_12_25, }
38
+ },
39
+ }
40
+ };
41
+ SchemaRegistry.getInstance().trackSchema(chatbotSchema);
42
+ export default chatbotSchema;
@@ -0,0 +1,3 @@
1
+ import { SpruceSchemas } from '../../schemas.types';
2
+ declare const registerChatBotEmitTargetAndPayloadSchema: SpruceSchemas.Mercury.v2020_12_25.RegisterChatBotEmitTargetAndPayloadSchema;
3
+ export default registerChatBotEmitTargetAndPayloadSchema;
@@ -0,0 +1,25 @@
1
+ import { SchemaRegistry } from '@sprucelabs/schema';
2
+ import eventSourceSchema_v2021_09_13 from './../../spruceEventUtils/v2021_09_13/eventSource.schema.js';
3
+ import registerChatBotsPayloadSchema_v2020_12_25 from './registerChatBotsPayload.schema.js';
4
+ const registerChatBotEmitTargetAndPayloadSchema = {
5
+ id: 'registerChatBotEmitTargetAndPayload',
6
+ version: 'v2020_12_25',
7
+ namespace: 'Mercury',
8
+ name: '',
9
+ fields: {
10
+ /** Source. */
11
+ 'source': {
12
+ label: 'Source',
13
+ type: 'schema',
14
+ options: { schema: eventSourceSchema_v2021_09_13, }
15
+ },
16
+ /** . */
17
+ 'payload': {
18
+ type: 'schema',
19
+ isRequired: true,
20
+ options: { schema: registerChatBotsPayloadSchema_v2020_12_25, }
21
+ },
22
+ }
23
+ };
24
+ SchemaRegistry.getInstance().trackSchema(registerChatBotEmitTargetAndPayloadSchema);
25
+ export default registerChatBotEmitTargetAndPayloadSchema;
@@ -0,0 +1,3 @@
1
+ import { SpruceSchemas } from '../../schemas.types';
2
+ declare const registerChatBotsPayloadSchema: SpruceSchemas.Mercury.v2020_12_25.RegisterChatBotsPayloadSchema;
3
+ export default registerChatBotsPayloadSchema;
@@ -0,0 +1,20 @@
1
+ import { SchemaRegistry } from '@sprucelabs/schema';
2
+ import chatbotSchema_v2020_12_25 from './chatbot.schema.js';
3
+ const registerChatBotsPayloadSchema = {
4
+ id: 'registerChatBotsPayload',
5
+ version: 'v2020_12_25',
6
+ namespace: 'Mercury',
7
+ name: '',
8
+ fields: {
9
+ /** . */
10
+ 'bots': {
11
+ type: 'schema',
12
+ isRequired: true,
13
+ isArray: true,
14
+ minArrayLength: 0,
15
+ options: { schema: chatbotSchema_v2020_12_25, }
16
+ },
17
+ }
18
+ };
19
+ SchemaRegistry.getInstance().trackSchema(registerChatBotsPayloadSchema);
20
+ export default registerChatBotsPayloadSchema;
@@ -0,0 +1,3 @@
1
+ import { SpruceSchemas } from '../../schemas.types';
2
+ declare const registerChatBotsResponsePayloadSchema: SpruceSchemas.Mercury.v2020_12_25.RegisterChatBotsResponsePayloadSchema;
3
+ export default registerChatBotsResponsePayloadSchema;
@@ -0,0 +1,17 @@
1
+ import { SchemaRegistry } from '@sprucelabs/schema';
2
+ const registerChatBotsResponsePayloadSchema = {
3
+ id: 'registerChatBotsResponsePayload',
4
+ version: 'v2020_12_25',
5
+ namespace: 'Mercury',
6
+ name: '',
7
+ fields: {
8
+ /** . */
9
+ 'totalRegisteredBots': {
10
+ type: 'number',
11
+ isRequired: true,
12
+ options: undefined
13
+ },
14
+ }
15
+ };
16
+ SchemaRegistry.getInstance().trackSchema(registerChatBotsResponsePayloadSchema);
17
+ export default registerChatBotsResponsePayloadSchema;