@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
|
@@ -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;
|
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;
|