@sprucelabs/mercury-core-events 20.0.26 → 20.1.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 +13 -0
- package/build/.spruce/events/events.contract.js +2 -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/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 +299 -146
- package/build/esm/.spruce/events/events.contract.d.ts +13 -0
- package/build/esm/.spruce/events/events.contract.js +2 -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/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 +299 -146
- package/package.json +4 -4
|
@@ -39,6 +39,7 @@ import { ListPermissionContractsEventContract as MercuryListPermissionContractsE
|
|
|
39
39
|
import { ListRolesEventContract as MercuryListRolesEventContract_v2020_12_25 } from "./mercury/listRoles.v2020_12_25.contract";
|
|
40
40
|
import { ListSkillsEventContract as MercuryListSkillsEventContract_v2020_12_25 } from "./mercury/listSkills.v2020_12_25.contract";
|
|
41
41
|
import { LogoutEventContract as MercuryLogoutEventContract_v2020_12_25 } from "./mercury/logout.v2020_12_25.contract";
|
|
42
|
+
import { RegisterChatBotEventContract as MercuryRegisterChatBotEventContract_v2020_12_25 } from "./mercury/registerChatBot.v2020_12_25.contract";
|
|
42
43
|
import { RegisterConversationTopicsEventContract as MercuryRegisterConversationTopicsEventContract_v2020_12_25 } from "./mercury/registerConversationTopics.v2020_12_25.contract";
|
|
43
44
|
import { RegisterEventsEventContract as MercuryRegisterEventsEventContract_v2020_12_25 } from "./mercury/registerEvents.v2020_12_25.contract";
|
|
44
45
|
import { RegisterListenersEventContract as MercuryRegisterListenersEventContract_v2020_12_25 } from "./mercury/registerListeners.v2020_12_25.contract";
|
|
@@ -403,6 +404,17 @@ declare const _default: ({
|
|
|
403
404
|
responsePayloadSchema: import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.LogoutResponsePayloadSchema;
|
|
404
405
|
};
|
|
405
406
|
};
|
|
407
|
+
} | {
|
|
408
|
+
eventSignatures: {
|
|
409
|
+
'register-chat-bot::v2020_12_25': {
|
|
410
|
+
listenPermissions: {
|
|
411
|
+
contractId: "chat-bot-contract";
|
|
412
|
+
permissionIdsAny: "can-register-chat-bot"[];
|
|
413
|
+
};
|
|
414
|
+
emitPayloadSchema: import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.RegisterChatBotEmitTargetAndPayloadSchema;
|
|
415
|
+
responsePayloadSchema: import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.RegisterChatBotsResponsePayloadSchema;
|
|
416
|
+
};
|
|
417
|
+
};
|
|
406
418
|
} | {
|
|
407
419
|
eventSignatures: {
|
|
408
420
|
'register-conversation-topics::v2020_12_25': {
|
|
@@ -654,6 +666,7 @@ declare module '@sprucelabs/mercury-types/build/types/mercury.types' {
|
|
|
654
666
|
'list-roles::v2020_12_25': MercuryListRolesEventContract_v2020_12_25['eventSignatures']['list-roles::v2020_12_25'];
|
|
655
667
|
'list-skills::v2020_12_25': MercuryListSkillsEventContract_v2020_12_25['eventSignatures']['list-skills::v2020_12_25'];
|
|
656
668
|
'logout::v2020_12_25': MercuryLogoutEventContract_v2020_12_25['eventSignatures']['logout::v2020_12_25'];
|
|
669
|
+
'register-chat-bot::v2020_12_25': MercuryRegisterChatBotEventContract_v2020_12_25['eventSignatures']['register-chat-bot::v2020_12_25'];
|
|
657
670
|
'register-conversation-topics::v2020_12_25': MercuryRegisterConversationTopicsEventContract_v2020_12_25['eventSignatures']['register-conversation-topics::v2020_12_25'];
|
|
658
671
|
'register-events::v2020_12_25': MercuryRegisterEventsEventContract_v2020_12_25['eventSignatures']['register-events::v2020_12_25'];
|
|
659
672
|
'register-listeners::v2020_12_25': MercuryRegisterListenersEventContract_v2020_12_25['eventSignatures']['register-listeners::v2020_12_25'];
|
|
@@ -44,6 +44,7 @@ const listPermissionContracts_v2020_12_25_contract_1 = __importDefault(require("
|
|
|
44
44
|
const listRoles_v2020_12_25_contract_1 = __importDefault(require("./mercury/listRoles.v2020_12_25.contract"));
|
|
45
45
|
const listSkills_v2020_12_25_contract_1 = __importDefault(require("./mercury/listSkills.v2020_12_25.contract"));
|
|
46
46
|
const logout_v2020_12_25_contract_1 = __importDefault(require("./mercury/logout.v2020_12_25.contract"));
|
|
47
|
+
const registerChatBot_v2020_12_25_contract_1 = __importDefault(require("./mercury/registerChatBot.v2020_12_25.contract"));
|
|
47
48
|
const registerConversationTopics_v2020_12_25_contract_1 = __importDefault(require("./mercury/registerConversationTopics.v2020_12_25.contract"));
|
|
48
49
|
const registerEvents_v2020_12_25_contract_1 = __importDefault(require("./mercury/registerEvents.v2020_12_25.contract"));
|
|
49
50
|
const registerListeners_v2020_12_25_contract_1 = __importDefault(require("./mercury/registerListeners.v2020_12_25.contract"));
|
|
@@ -111,6 +112,7 @@ exports.default = [
|
|
|
111
112
|
listRoles_v2020_12_25_contract_1.default,
|
|
112
113
|
listSkills_v2020_12_25_contract_1.default,
|
|
113
114
|
logout_v2020_12_25_contract_1.default,
|
|
115
|
+
registerChatBot_v2020_12_25_contract_1.default,
|
|
114
116
|
registerConversationTopics_v2020_12_25_contract_1.default,
|
|
115
117
|
registerEvents_v2020_12_25_contract_1.default,
|
|
116
118
|
registerListeners_v2020_12_25_contract_1.default,
|
|
@@ -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,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
require("./../../permissions/permissions.types");
|
|
7
|
+
const mercury_types_1 = require("@sprucelabs/mercury-types");
|
|
8
|
+
const registerChatBotEmitTargetAndPayload_schema_1 = __importDefault(require("./../../schemas/mercury/v2020_12_25/registerChatBotEmitTargetAndPayload.schema"));
|
|
9
|
+
const registerChatBotsResponsePayload_schema_1 = __importDefault(require("./../../schemas/mercury/v2020_12_25/registerChatBotsResponsePayload.schema"));
|
|
10
|
+
const registerChatBotEventContract = (0, mercury_types_1.buildEventContract)({
|
|
11
|
+
eventSignatures: {
|
|
12
|
+
'register-chat-bot::v2020_12_25': {
|
|
13
|
+
listenPermissions: {
|
|
14
|
+
contractId: 'chat-bot-contract',
|
|
15
|
+
permissionIdsAny: ['can-register-chat-bot'],
|
|
16
|
+
},
|
|
17
|
+
emitPayloadSchema: registerChatBotEmitTargetAndPayload_schema_1.default,
|
|
18
|
+
responsePayloadSchema: registerChatBotsResponsePayload_schema_1.default,
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
exports.default = registerChatBotEventContract;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schema_1 = require("@sprucelabs/schema");
|
|
4
|
+
const chatBotCallbacksSchema = {
|
|
5
|
+
id: 'chatBotCallbacks',
|
|
6
|
+
version: 'v2020_12_25',
|
|
7
|
+
namespace: 'Mercury',
|
|
8
|
+
name: '',
|
|
9
|
+
fields: {
|
|
10
|
+
/** . */
|
|
11
|
+
'placeholder': {
|
|
12
|
+
type: 'id',
|
|
13
|
+
isRequired: true,
|
|
14
|
+
options: undefined
|
|
15
|
+
},
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
schema_1.SchemaRegistry.getInstance().trackSchema(chatBotCallbacksSchema);
|
|
19
|
+
exports.default = chatBotCallbacksSchema;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const schema_1 = require("@sprucelabs/schema");
|
|
7
|
+
const chatBotCallbacks_schema_1 = __importDefault(require("./chatBotCallbacks.schema"));
|
|
8
|
+
const chatbotSchema = {
|
|
9
|
+
id: 'chatbot',
|
|
10
|
+
version: 'v2020_12_25',
|
|
11
|
+
namespace: 'Mercury',
|
|
12
|
+
name: '',
|
|
13
|
+
fields: {
|
|
14
|
+
/** . */
|
|
15
|
+
'yourJobIfYouChooseToAcceptItIs': {
|
|
16
|
+
type: 'text',
|
|
17
|
+
isRequired: true,
|
|
18
|
+
options: undefined
|
|
19
|
+
},
|
|
20
|
+
/** . */
|
|
21
|
+
'weAreDoneWhen': {
|
|
22
|
+
type: 'text',
|
|
23
|
+
isRequired: true,
|
|
24
|
+
options: undefined
|
|
25
|
+
},
|
|
26
|
+
/** . */
|
|
27
|
+
'pleaseKeepInMindThat': {
|
|
28
|
+
type: 'text',
|
|
29
|
+
isArray: true,
|
|
30
|
+
options: undefined
|
|
31
|
+
},
|
|
32
|
+
/** . */
|
|
33
|
+
'stateSchema': {
|
|
34
|
+
type: 'raw',
|
|
35
|
+
options: { valueType: `SpruceSchema.Schema`, }
|
|
36
|
+
},
|
|
37
|
+
/** . */
|
|
38
|
+
'callbacks': {
|
|
39
|
+
type: 'schema',
|
|
40
|
+
isArray: true,
|
|
41
|
+
minArrayLength: 0,
|
|
42
|
+
options: { schema: chatBotCallbacks_schema_1.default, }
|
|
43
|
+
},
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
schema_1.SchemaRegistry.getInstance().trackSchema(chatbotSchema);
|
|
47
|
+
exports.default = chatbotSchema;
|
package/build/.spruce/schemas/mercury/v2020_12_25/registerChatBotEmitTargetAndPayload.schema.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const schema_1 = require("@sprucelabs/schema");
|
|
7
|
+
const eventSource_schema_1 = __importDefault(require("./../../spruceEventUtils/v2021_09_13/eventSource.schema"));
|
|
8
|
+
const registerChatBotsPayload_schema_1 = __importDefault(require("./registerChatBotsPayload.schema"));
|
|
9
|
+
const registerChatBotEmitTargetAndPayloadSchema = {
|
|
10
|
+
id: 'registerChatBotEmitTargetAndPayload',
|
|
11
|
+
version: 'v2020_12_25',
|
|
12
|
+
namespace: 'Mercury',
|
|
13
|
+
name: '',
|
|
14
|
+
fields: {
|
|
15
|
+
/** Source. */
|
|
16
|
+
'source': {
|
|
17
|
+
label: 'Source',
|
|
18
|
+
type: 'schema',
|
|
19
|
+
options: { schema: eventSource_schema_1.default, }
|
|
20
|
+
},
|
|
21
|
+
/** . */
|
|
22
|
+
'payload': {
|
|
23
|
+
type: 'schema',
|
|
24
|
+
isRequired: true,
|
|
25
|
+
options: { schema: registerChatBotsPayload_schema_1.default, }
|
|
26
|
+
},
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
schema_1.SchemaRegistry.getInstance().trackSchema(registerChatBotEmitTargetAndPayloadSchema);
|
|
30
|
+
exports.default = registerChatBotEmitTargetAndPayloadSchema;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const schema_1 = require("@sprucelabs/schema");
|
|
7
|
+
const chatbot_schema_1 = __importDefault(require("./chatbot.schema"));
|
|
8
|
+
const registerChatBotsPayloadSchema = {
|
|
9
|
+
id: 'registerChatBotsPayload',
|
|
10
|
+
version: 'v2020_12_25',
|
|
11
|
+
namespace: 'Mercury',
|
|
12
|
+
name: '',
|
|
13
|
+
fields: {
|
|
14
|
+
/** . */
|
|
15
|
+
'bots': {
|
|
16
|
+
type: 'schema',
|
|
17
|
+
isRequired: true,
|
|
18
|
+
isArray: true,
|
|
19
|
+
minArrayLength: 0,
|
|
20
|
+
options: { schema: chatbot_schema_1.default, }
|
|
21
|
+
},
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
schema_1.SchemaRegistry.getInstance().trackSchema(registerChatBotsPayloadSchema);
|
|
25
|
+
exports.default = registerChatBotsPayloadSchema;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schema_1 = require("@sprucelabs/schema");
|
|
4
|
+
const registerChatBotsResponsePayloadSchema = {
|
|
5
|
+
id: 'registerChatBotsResponsePayload',
|
|
6
|
+
version: 'v2020_12_25',
|
|
7
|
+
namespace: 'Mercury',
|
|
8
|
+
name: '',
|
|
9
|
+
fields: {
|
|
10
|
+
/** . */
|
|
11
|
+
'totalRegisteredBots': {
|
|
12
|
+
type: 'number',
|
|
13
|
+
isRequired: true,
|
|
14
|
+
options: undefined
|
|
15
|
+
},
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
schema_1.SchemaRegistry.getInstance().trackSchema(registerChatBotsResponsePayloadSchema);
|
|
19
|
+
exports.default = registerChatBotsResponsePayloadSchema;
|