@sprucelabs/mercury-core-events 20.1.1 → 20.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.
- package/build/.spruce/events/events.contract.d.ts +26 -0
- package/build/.spruce/events/events.contract.js +4 -0
- package/build/.spruce/events/mercury/invokeChatCallback.v2020_12_25.contract.d.ts +15 -0
- package/build/.spruce/events/mercury/invokeChatCallback.v2020_12_25.contract.js +22 -0
- package/build/.spruce/events/mercury/registerChatBot.v2020_12_25.contract.d.ts +15 -0
- package/build/.spruce/events/mercury/registerChatBot.v2020_12_25.contract.js +22 -0
- package/build/.spruce/permissions/permissions.types.d.ts +3 -0
- package/build/.spruce/schemas/mercury/v2020_12_25/chatBotCallbacks.schema.d.ts +3 -0
- package/build/.spruce/schemas/mercury/v2020_12_25/chatBotCallbacks.schema.js +19 -0
- package/build/.spruce/schemas/mercury/v2020_12_25/chatbot.schema.d.ts +3 -0
- package/build/.spruce/schemas/mercury/v2020_12_25/chatbot.schema.js +47 -0
- package/build/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackEmitTargetAndPayload.schema.d.ts +3 -0
- package/build/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackEmitTargetAndPayload.schema.js +37 -0
- package/build/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackPayload.schema.d.ts +3 -0
- package/build/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackPayload.schema.js +24 -0
- package/build/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackResponsePayload.schema.d.ts +3 -0
- package/build/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackResponsePayload.schema.js +19 -0
- package/build/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackTarget.schema.d.ts +3 -0
- package/build/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackTarget.schema.js +25 -0
- package/build/.spruce/schemas/mercury/v2020_12_25/registerChatBotEmitTargetAndPayload.schema.d.ts +3 -0
- package/build/.spruce/schemas/mercury/v2020_12_25/registerChatBotEmitTargetAndPayload.schema.js +30 -0
- package/build/.spruce/schemas/mercury/v2020_12_25/registerChatBotsPayload.schema.d.ts +3 -0
- package/build/.spruce/schemas/mercury/v2020_12_25/registerChatBotsPayload.schema.js +25 -0
- package/build/.spruce/schemas/mercury/v2020_12_25/registerChatBotsResponsePayload.schema.d.ts +3 -0
- package/build/.spruce/schemas/mercury/v2020_12_25/registerChatBotsResponsePayload.schema.js +19 -0
- package/build/.spruce/schemas/schemas.types.d.ts +528 -255
- package/build/esm/.spruce/events/events.contract.d.ts +26 -0
- package/build/esm/.spruce/events/events.contract.js +4 -0
- package/build/esm/.spruce/events/mercury/invokeChatCallback.v2020_12_25.contract.d.ts +15 -0
- package/build/esm/.spruce/events/mercury/invokeChatCallback.v2020_12_25.contract.js +17 -0
- package/build/esm/.spruce/events/mercury/registerChatBot.v2020_12_25.contract.d.ts +15 -0
- package/build/esm/.spruce/events/mercury/registerChatBot.v2020_12_25.contract.js +17 -0
- package/build/esm/.spruce/permissions/permissions.types.d.ts +3 -0
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/chatBotCallbacks.schema.d.ts +3 -0
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/chatBotCallbacks.schema.js +17 -0
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/chatbot.schema.d.ts +3 -0
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/chatbot.schema.js +42 -0
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackEmitTargetAndPayload.schema.d.ts +3 -0
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackEmitTargetAndPayload.schema.js +32 -0
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackPayload.schema.d.ts +3 -0
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackPayload.schema.js +22 -0
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackResponsePayload.schema.d.ts +3 -0
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackResponsePayload.schema.js +17 -0
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackTarget.schema.d.ts +3 -0
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackTarget.schema.js +23 -0
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/registerChatBotEmitTargetAndPayload.schema.d.ts +3 -0
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/registerChatBotEmitTargetAndPayload.schema.js +25 -0
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/registerChatBotsPayload.schema.d.ts +3 -0
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/registerChatBotsPayload.schema.js +20 -0
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/registerChatBotsResponsePayload.schema.d.ts +3 -0
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/registerChatBotsResponsePayload.schema.js +17 -0
- package/build/esm/.spruce/schemas/schemas.types.d.ts +528 -255
- package/package.json +1 -1
|
@@ -30,6 +30,7 @@ import { GetRoleEventContract as MercuryGetRoleEventContract_v2020_12_25 } from
|
|
|
30
30
|
import { GetSkillEventContract as MercuryGetSkillEventContract_v2020_12_25 } from "./mercury/getSkill.v2020_12_25.contract";
|
|
31
31
|
import { HealthEventContract as MercuryHealthEventContract_v2020_12_25 } from "./mercury/health.v2020_12_25.contract";
|
|
32
32
|
import { InstallSkillEventContract as MercuryInstallSkillEventContract_v2020_12_25 } from "./mercury/installSkill.v2020_12_25.contract";
|
|
33
|
+
import { InvokeChatCallbackEventContract as MercuryInvokeChatCallbackEventContract_v2020_12_25 } from "./mercury/invokeChatCallback.v2020_12_25.contract";
|
|
33
34
|
import { IsSkillInstalledEventContract as MercuryIsSkillInstalledEventContract_v2020_12_25 } from "./mercury/isSkillInstalled.v2020_12_25.contract";
|
|
34
35
|
import { ListInstalledSkillsEventContract as MercuryListInstalledSkillsEventContract_v2020_12_25 } from "./mercury/listInstalledSkills.v2020_12_25.contract";
|
|
35
36
|
import { ListLocationsEventContract as MercuryListLocationsEventContract_v2020_12_25 } from "./mercury/listLocations.v2020_12_25.contract";
|
|
@@ -39,6 +40,7 @@ import { ListPermissionContractsEventContract as MercuryListPermissionContractsE
|
|
|
39
40
|
import { ListRolesEventContract as MercuryListRolesEventContract_v2020_12_25 } from "./mercury/listRoles.v2020_12_25.contract";
|
|
40
41
|
import { ListSkillsEventContract as MercuryListSkillsEventContract_v2020_12_25 } from "./mercury/listSkills.v2020_12_25.contract";
|
|
41
42
|
import { LogoutEventContract as MercuryLogoutEventContract_v2020_12_25 } from "./mercury/logout.v2020_12_25.contract";
|
|
43
|
+
import { RegisterChatBotEventContract as MercuryRegisterChatBotEventContract_v2020_12_25 } from "./mercury/registerChatBot.v2020_12_25.contract";
|
|
42
44
|
import { RegisterConversationTopicsEventContract as MercuryRegisterConversationTopicsEventContract_v2020_12_25 } from "./mercury/registerConversationTopics.v2020_12_25.contract";
|
|
43
45
|
import { RegisterEventsEventContract as MercuryRegisterEventsEventContract_v2020_12_25 } from "./mercury/registerEvents.v2020_12_25.contract";
|
|
44
46
|
import { RegisterListenersEventContract as MercuryRegisterListenersEventContract_v2020_12_25 } from "./mercury/registerListeners.v2020_12_25.contract";
|
|
@@ -340,6 +342,17 @@ declare const _default: ({
|
|
|
340
342
|
responsePayloadSchema: import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.InstallSkillResponsePayloadSchema;
|
|
341
343
|
};
|
|
342
344
|
};
|
|
345
|
+
} | {
|
|
346
|
+
eventSignatures: {
|
|
347
|
+
'invoke-chat-callback::v2020_12_25': {
|
|
348
|
+
listenPermissions: {
|
|
349
|
+
contractId: "chat-bot-contract";
|
|
350
|
+
permissionIdsAny: "can-register-chat-bot"[];
|
|
351
|
+
};
|
|
352
|
+
emitPayloadSchema: import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.InvokeChatCallbackEmitTargetAndPayloadSchema;
|
|
353
|
+
responsePayloadSchema: import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.InvokeChatCallbackResponsePayloadSchema;
|
|
354
|
+
};
|
|
355
|
+
};
|
|
343
356
|
} | {
|
|
344
357
|
eventSignatures: {
|
|
345
358
|
'is-skill-installed::v2020_12_25': {
|
|
@@ -403,6 +416,17 @@ declare const _default: ({
|
|
|
403
416
|
responsePayloadSchema: import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.LogoutResponsePayloadSchema;
|
|
404
417
|
};
|
|
405
418
|
};
|
|
419
|
+
} | {
|
|
420
|
+
eventSignatures: {
|
|
421
|
+
'register-chat-bot::v2020_12_25': {
|
|
422
|
+
listenPermissions: {
|
|
423
|
+
contractId: "chat-bot-contract";
|
|
424
|
+
permissionIdsAny: "can-register-chat-bot"[];
|
|
425
|
+
};
|
|
426
|
+
emitPayloadSchema: import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.RegisterChatBotEmitTargetAndPayloadSchema;
|
|
427
|
+
responsePayloadSchema: import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.RegisterChatBotsResponsePayloadSchema;
|
|
428
|
+
};
|
|
429
|
+
};
|
|
406
430
|
} | {
|
|
407
431
|
eventSignatures: {
|
|
408
432
|
'register-conversation-topics::v2020_12_25': {
|
|
@@ -645,6 +669,7 @@ declare module '@sprucelabs/mercury-types/build/types/mercury.types' {
|
|
|
645
669
|
'get-skill::v2020_12_25': MercuryGetSkillEventContract_v2020_12_25['eventSignatures']['get-skill::v2020_12_25'];
|
|
646
670
|
'health::v2020_12_25': MercuryHealthEventContract_v2020_12_25['eventSignatures']['health::v2020_12_25'];
|
|
647
671
|
'install-skill::v2020_12_25': MercuryInstallSkillEventContract_v2020_12_25['eventSignatures']['install-skill::v2020_12_25'];
|
|
672
|
+
'invoke-chat-callback::v2020_12_25': MercuryInvokeChatCallbackEventContract_v2020_12_25['eventSignatures']['invoke-chat-callback::v2020_12_25'];
|
|
648
673
|
'is-skill-installed::v2020_12_25': MercuryIsSkillInstalledEventContract_v2020_12_25['eventSignatures']['is-skill-installed::v2020_12_25'];
|
|
649
674
|
'list-installed-skills::v2020_12_25': MercuryListInstalledSkillsEventContract_v2020_12_25['eventSignatures']['list-installed-skills::v2020_12_25'];
|
|
650
675
|
'list-locations::v2020_12_25': MercuryListLocationsEventContract_v2020_12_25['eventSignatures']['list-locations::v2020_12_25'];
|
|
@@ -654,6 +679,7 @@ declare module '@sprucelabs/mercury-types/build/types/mercury.types' {
|
|
|
654
679
|
'list-roles::v2020_12_25': MercuryListRolesEventContract_v2020_12_25['eventSignatures']['list-roles::v2020_12_25'];
|
|
655
680
|
'list-skills::v2020_12_25': MercuryListSkillsEventContract_v2020_12_25['eventSignatures']['list-skills::v2020_12_25'];
|
|
656
681
|
'logout::v2020_12_25': MercuryLogoutEventContract_v2020_12_25['eventSignatures']['logout::v2020_12_25'];
|
|
682
|
+
'register-chat-bot::v2020_12_25': MercuryRegisterChatBotEventContract_v2020_12_25['eventSignatures']['register-chat-bot::v2020_12_25'];
|
|
657
683
|
'register-conversation-topics::v2020_12_25': MercuryRegisterConversationTopicsEventContract_v2020_12_25['eventSignatures']['register-conversation-topics::v2020_12_25'];
|
|
658
684
|
'register-events::v2020_12_25': MercuryRegisterEventsEventContract_v2020_12_25['eventSignatures']['register-events::v2020_12_25'];
|
|
659
685
|
'register-listeners::v2020_12_25': MercuryRegisterListenersEventContract_v2020_12_25['eventSignatures']['register-listeners::v2020_12_25'];
|
|
@@ -30,6 +30,7 @@ import mercuryGetRoleEventContract_v2020_12_25 from './mercury/getRole.v2020_12_
|
|
|
30
30
|
import mercuryGetSkillEventContract_v2020_12_25 from './mercury/getSkill.v2020_12_25.contract.js';
|
|
31
31
|
import mercuryHealthEventContract_v2020_12_25 from './mercury/health.v2020_12_25.contract.js';
|
|
32
32
|
import mercuryInstallSkillEventContract_v2020_12_25 from './mercury/installSkill.v2020_12_25.contract.js';
|
|
33
|
+
import mercuryInvokeChatCallbackEventContract_v2020_12_25 from './mercury/invokeChatCallback.v2020_12_25.contract.js';
|
|
33
34
|
import mercuryIsSkillInstalledEventContract_v2020_12_25 from './mercury/isSkillInstalled.v2020_12_25.contract.js';
|
|
34
35
|
import mercuryListInstalledSkillsEventContract_v2020_12_25 from './mercury/listInstalledSkills.v2020_12_25.contract.js';
|
|
35
36
|
import mercuryListLocationsEventContract_v2020_12_25 from './mercury/listLocations.v2020_12_25.contract.js';
|
|
@@ -39,6 +40,7 @@ import mercuryListPermissionContractsEventContract_v2020_12_25 from './mercury/l
|
|
|
39
40
|
import mercuryListRolesEventContract_v2020_12_25 from './mercury/listRoles.v2020_12_25.contract.js';
|
|
40
41
|
import mercuryListSkillsEventContract_v2020_12_25 from './mercury/listSkills.v2020_12_25.contract.js';
|
|
41
42
|
import mercuryLogoutEventContract_v2020_12_25 from './mercury/logout.v2020_12_25.contract.js';
|
|
43
|
+
import mercuryRegisterChatBotEventContract_v2020_12_25 from './mercury/registerChatBot.v2020_12_25.contract.js';
|
|
42
44
|
import mercuryRegisterConversationTopicsEventContract_v2020_12_25 from './mercury/registerConversationTopics.v2020_12_25.contract.js';
|
|
43
45
|
import mercuryRegisterEventsEventContract_v2020_12_25 from './mercury/registerEvents.v2020_12_25.contract.js';
|
|
44
46
|
import mercuryRegisterListenersEventContract_v2020_12_25 from './mercury/registerListeners.v2020_12_25.contract.js';
|
|
@@ -97,6 +99,7 @@ export default [
|
|
|
97
99
|
mercuryGetSkillEventContract_v2020_12_25,
|
|
98
100
|
mercuryHealthEventContract_v2020_12_25,
|
|
99
101
|
mercuryInstallSkillEventContract_v2020_12_25,
|
|
102
|
+
mercuryInvokeChatCallbackEventContract_v2020_12_25,
|
|
100
103
|
mercuryIsSkillInstalledEventContract_v2020_12_25,
|
|
101
104
|
mercuryListInstalledSkillsEventContract_v2020_12_25,
|
|
102
105
|
mercuryListLocationsEventContract_v2020_12_25,
|
|
@@ -106,6 +109,7 @@ export default [
|
|
|
106
109
|
mercuryListRolesEventContract_v2020_12_25,
|
|
107
110
|
mercuryListSkillsEventContract_v2020_12_25,
|
|
108
111
|
mercuryLogoutEventContract_v2020_12_25,
|
|
112
|
+
mercuryRegisterChatBotEventContract_v2020_12_25,
|
|
109
113
|
mercuryRegisterConversationTopicsEventContract_v2020_12_25,
|
|
110
114
|
mercuryRegisterEventsEventContract_v2020_12_25,
|
|
111
115
|
mercuryRegisterListenersEventContract_v2020_12_25,
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import "./../../permissions/permissions.types";
|
|
2
|
+
declare const invokeChatCallbackEventContract: {
|
|
3
|
+
eventSignatures: {
|
|
4
|
+
'invoke-chat-callback::v2020_12_25': {
|
|
5
|
+
listenPermissions: {
|
|
6
|
+
contractId: "chat-bot-contract";
|
|
7
|
+
permissionIdsAny: "can-register-chat-bot"[];
|
|
8
|
+
};
|
|
9
|
+
emitPayloadSchema: import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.InvokeChatCallbackEmitTargetAndPayloadSchema;
|
|
10
|
+
responsePayloadSchema: import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.InvokeChatCallbackResponsePayloadSchema;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export default invokeChatCallbackEventContract;
|
|
15
|
+
export type InvokeChatCallbackEventContract = typeof invokeChatCallbackEventContract;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import "./../../permissions/permissions.types";
|
|
2
|
+
import { buildEventContract } from '@sprucelabs/mercury-types';
|
|
3
|
+
import invokeChatCallbackEmitTargetAndPayloadSchema from './../../schemas/mercury/v2020_12_25/invokeChatCallbackEmitTargetAndPayload.schema.js';
|
|
4
|
+
import invokeChatCallbackResponsePayloadSchema from './../../schemas/mercury/v2020_12_25/invokeChatCallbackResponsePayload.schema.js';
|
|
5
|
+
const invokeChatCallbackEventContract = buildEventContract({
|
|
6
|
+
eventSignatures: {
|
|
7
|
+
'invoke-chat-callback::v2020_12_25': {
|
|
8
|
+
listenPermissions: {
|
|
9
|
+
contractId: 'chat-bot-contract',
|
|
10
|
+
permissionIdsAny: ['can-register-chat-bot'],
|
|
11
|
+
},
|
|
12
|
+
emitPayloadSchema: invokeChatCallbackEmitTargetAndPayloadSchema,
|
|
13
|
+
responsePayloadSchema: invokeChatCallbackResponsePayloadSchema,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
export default invokeChatCallbackEventContract;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import "./../../permissions/permissions.types";
|
|
2
|
+
declare const registerChatBotEventContract: {
|
|
3
|
+
eventSignatures: {
|
|
4
|
+
'register-chat-bot::v2020_12_25': {
|
|
5
|
+
listenPermissions: {
|
|
6
|
+
contractId: "chat-bot-contract";
|
|
7
|
+
permissionIdsAny: "can-register-chat-bot"[];
|
|
8
|
+
};
|
|
9
|
+
emitPayloadSchema: import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.RegisterChatBotEmitTargetAndPayloadSchema;
|
|
10
|
+
responsePayloadSchema: import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.RegisterChatBotsResponsePayloadSchema;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export default registerChatBotEventContract;
|
|
15
|
+
export type RegisterChatBotEventContract = typeof registerChatBotEventContract;
|
|
@@ -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;
|
|
@@ -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,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,32 @@
|
|
|
1
|
+
import { SchemaRegistry } from '@sprucelabs/schema';
|
|
2
|
+
import eventSourceSchema_v2021_09_13 from './../../spruceEventUtils/v2021_09_13/eventSource.schema.js';
|
|
3
|
+
import invokeChatCallbackTargetSchema_v2020_12_25 from './invokeChatCallbackTarget.schema.js';
|
|
4
|
+
import invokeChatCallbackPayloadSchema_v2020_12_25 from './invokeChatCallbackPayload.schema.js';
|
|
5
|
+
const invokeChatCallbackEmitTargetAndPayloadSchema = {
|
|
6
|
+
id: 'invokeChatCallbackEmitTargetAndPayload',
|
|
7
|
+
version: 'v2020_12_25',
|
|
8
|
+
namespace: 'Mercury',
|
|
9
|
+
name: '',
|
|
10
|
+
fields: {
|
|
11
|
+
/** Source. */
|
|
12
|
+
'source': {
|
|
13
|
+
label: 'Source',
|
|
14
|
+
type: 'schema',
|
|
15
|
+
options: { schema: eventSourceSchema_v2021_09_13, }
|
|
16
|
+
},
|
|
17
|
+
/** . */
|
|
18
|
+
'target': {
|
|
19
|
+
type: 'schema',
|
|
20
|
+
isRequired: true,
|
|
21
|
+
options: { schema: invokeChatCallbackTargetSchema_v2020_12_25, }
|
|
22
|
+
},
|
|
23
|
+
/** . */
|
|
24
|
+
'payload': {
|
|
25
|
+
type: 'schema',
|
|
26
|
+
isRequired: true,
|
|
27
|
+
options: { schema: invokeChatCallbackPayloadSchema_v2020_12_25, }
|
|
28
|
+
},
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
SchemaRegistry.getInstance().trackSchema(invokeChatCallbackEmitTargetAndPayloadSchema);
|
|
32
|
+
export default invokeChatCallbackEmitTargetAndPayloadSchema;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SchemaRegistry } from '@sprucelabs/schema';
|
|
2
|
+
const invokeChatCallbackPayloadSchema = {
|
|
3
|
+
id: 'invokeChatCallbackPayload',
|
|
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
|
+
'state': {
|
|
16
|
+
type: 'raw',
|
|
17
|
+
options: { valueType: `Record<string, any>`, }
|
|
18
|
+
},
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
SchemaRegistry.getInstance().trackSchema(invokeChatCallbackPayloadSchema);
|
|
22
|
+
export default invokeChatCallbackPayloadSchema;
|
package/build/esm/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackResponsePayload.schema.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SchemaRegistry } from '@sprucelabs/schema';
|
|
2
|
+
const invokeChatCallbackResponsePayloadSchema = {
|
|
3
|
+
id: 'invokeChatCallbackResponsePayload',
|
|
4
|
+
version: 'v2020_12_25',
|
|
5
|
+
namespace: 'Mercury',
|
|
6
|
+
name: '',
|
|
7
|
+
fields: {
|
|
8
|
+
/** . */
|
|
9
|
+
'message': {
|
|
10
|
+
type: 'text',
|
|
11
|
+
isRequired: true,
|
|
12
|
+
options: undefined
|
|
13
|
+
},
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
SchemaRegistry.getInstance().trackSchema(invokeChatCallbackResponsePayloadSchema);
|
|
17
|
+
export default invokeChatCallbackResponsePayloadSchema;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { SchemaRegistry } from '@sprucelabs/schema';
|
|
2
|
+
const invokeChatCallbackTargetSchema = {
|
|
3
|
+
id: 'invokeChatCallbackTarget',
|
|
4
|
+
version: 'v2020_12_25',
|
|
5
|
+
namespace: 'Mercury',
|
|
6
|
+
name: '',
|
|
7
|
+
fields: {
|
|
8
|
+
/** . */
|
|
9
|
+
'skillId': {
|
|
10
|
+
type: 'id',
|
|
11
|
+
isRequired: true,
|
|
12
|
+
options: undefined
|
|
13
|
+
},
|
|
14
|
+
/** . */
|
|
15
|
+
'chatPersonId': {
|
|
16
|
+
type: 'id',
|
|
17
|
+
isRequired: true,
|
|
18
|
+
options: undefined
|
|
19
|
+
},
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
SchemaRegistry.getInstance().trackSchema(invokeChatCallbackTargetSchema);
|
|
23
|
+
export default invokeChatCallbackTargetSchema;
|
package/build/esm/.spruce/schemas/mercury/v2020_12_25/registerChatBotEmitTargetAndPayload.schema.js
ADDED
|
@@ -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,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;
|
package/build/esm/.spruce/schemas/mercury/v2020_12_25/registerChatBotsResponsePayload.schema.js
ADDED
|
@@ -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;
|