@sprucelabs/mercury-core-events 25.0.123 → 25.0.125
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 +0 -27
- package/build/.spruce/events/events.contract.js +0 -4
- package/build/.spruce/schemas/schemas.types.d.ts +356 -625
- package/build/esm/.spruce/events/events.contract.d.ts +0 -27
- package/build/esm/.spruce/events/events.contract.js +0 -4
- package/build/esm/.spruce/schemas/schemas.types.d.ts +356 -625
- package/package.json +8 -8
- package/build/.spruce/events/mercury/invokeChatCallback.v2020_12_25.contract.d.ts +0 -15
- package/build/.spruce/events/mercury/invokeChatCallback.v2020_12_25.contract.js +0 -19
- package/build/.spruce/events/mercury/registerChatbots.v2020_12_25.contract.d.ts +0 -16
- package/build/.spruce/events/mercury/registerChatbots.v2020_12_25.contract.js +0 -20
- package/build/.spruce/schemas/mercury/v2020_12_25/chatbot.schema.d.ts +0 -3
- package/build/.spruce/schemas/mercury/v2020_12_25/chatbot.schema.js +0 -63
- package/build/.spruce/schemas/mercury/v2020_12_25/chatbotCallbacks.schema.d.ts +0 -3
- package/build/.spruce/schemas/mercury/v2020_12_25/chatbotCallbacks.schema.js +0 -25
- package/build/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackEmitTargetAndPayload.schema.d.ts +0 -3
- package/build/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackEmitTargetAndPayload.schema.js +0 -37
- package/build/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackPayload.schema.d.ts +0 -3
- package/build/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackPayload.schema.js +0 -24
- package/build/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackResponsePayload.schema.d.ts +0 -3
- package/build/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackResponsePayload.schema.js +0 -19
- package/build/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackTarget.schema.d.ts +0 -3
- package/build/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackTarget.schema.js +0 -25
- package/build/.spruce/schemas/mercury/v2020_12_25/registerChatbotsEmitTargetAndPayload.schema.d.ts +0 -3
- package/build/.spruce/schemas/mercury/v2020_12_25/registerChatbotsEmitTargetAndPayload.schema.js +0 -23
- package/build/.spruce/schemas/mercury/v2020_12_25/registerChatbotsResponsePayload.schema.d.ts +0 -3
- package/build/.spruce/schemas/mercury/v2020_12_25/registerChatbotsResponsePayload.schema.js +0 -25
- package/build/esm/.spruce/events/mercury/invokeChatCallback.v2020_12_25.contract.d.ts +0 -15
- package/build/esm/.spruce/events/mercury/invokeChatCallback.v2020_12_25.contract.js +0 -14
- package/build/esm/.spruce/events/mercury/registerChatbots.v2020_12_25.contract.d.ts +0 -16
- package/build/esm/.spruce/events/mercury/registerChatbots.v2020_12_25.contract.js +0 -15
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/chatbot.schema.d.ts +0 -3
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/chatbot.schema.js +0 -58
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/chatbotCallbacks.schema.d.ts +0 -3
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/chatbotCallbacks.schema.js +0 -23
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackEmitTargetAndPayload.schema.d.ts +0 -3
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackEmitTargetAndPayload.schema.js +0 -32
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackPayload.schema.d.ts +0 -3
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackPayload.schema.js +0 -22
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackResponsePayload.schema.d.ts +0 -3
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackResponsePayload.schema.js +0 -17
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackTarget.schema.d.ts +0 -3
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackTarget.schema.js +0 -23
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/registerChatbotsEmitTargetAndPayload.schema.d.ts +0 -3
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/registerChatbotsEmitTargetAndPayload.schema.js +0 -18
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/registerChatbotsResponsePayload.schema.d.ts +0 -3
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/registerChatbotsResponsePayload.schema.js +0 -20
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@sprucelabs/mercury-core-events",
|
3
|
-
"version": "25.0.
|
3
|
+
"version": "25.0.125",
|
4
4
|
"description": "Events Mercury provides out of the box.",
|
5
5
|
"skill": {
|
6
6
|
"namespace": "mercury-core-events",
|
@@ -58,12 +58,12 @@
|
|
58
58
|
"watch.tsc": "tsc -w"
|
59
59
|
},
|
60
60
|
"devDependencies": {
|
61
|
-
"@sprucelabs/esm-postbuild": "^6.0.
|
62
|
-
"@sprucelabs/jest-json-reporter": "^8.0.
|
61
|
+
"@sprucelabs/esm-postbuild": "^6.0.538",
|
62
|
+
"@sprucelabs/jest-json-reporter": "^8.0.566",
|
63
63
|
"@sprucelabs/resolve-path-aliases": "^2.0.526",
|
64
64
|
"@sprucelabs/semantic-release": "^5.0.2",
|
65
65
|
"@sprucelabs/test": "^9.0.67",
|
66
|
-
"@types/node": "^22.10.
|
66
|
+
"@types/node": "^22.10.6",
|
67
67
|
"chokidar-cli": "^3.0.0",
|
68
68
|
"eslint": "^9.18.0",
|
69
69
|
"eslint-config-spruce": "^11.2.26",
|
@@ -76,10 +76,10 @@
|
|
76
76
|
"typescript": "^5.7.3"
|
77
77
|
},
|
78
78
|
"dependencies": {
|
79
|
-
"@sprucelabs/mercury-types": "^47.0.
|
80
|
-
"@sprucelabs/schema": "^31.0.
|
81
|
-
"@sprucelabs/spruce-core-schemas": "^40.1.
|
82
|
-
"@sprucelabs/spruce-event-utils": "^40.1.
|
79
|
+
"@sprucelabs/mercury-types": "^47.0.657",
|
80
|
+
"@sprucelabs/schema": "^31.0.16",
|
81
|
+
"@sprucelabs/spruce-core-schemas": "^40.1.602",
|
82
|
+
"@sprucelabs/spruce-event-utils": "^40.1.387"
|
83
83
|
},
|
84
84
|
"jest": {
|
85
85
|
"testRunner": "jest-circus/runner",
|
@@ -1,15 +0,0 @@
|
|
1
|
-
import './../../permissions/permissions.types';
|
2
|
-
declare const invokeChatCallbackEventContract: {
|
3
|
-
eventSignatures: {
|
4
|
-
'invoke-chat-callback::v2020_12_25': {
|
5
|
-
listenPermissions: {
|
6
|
-
contractId: "chatbot-contract";
|
7
|
-
permissionIdsAny: "can-register-chatbots"[];
|
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;
|
@@ -1,19 +0,0 @@
|
|
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 invokeChatCallbackEmitTargetAndPayload_schema_1 = __importDefault(require("./../../schemas/mercury/v2020_12_25/invokeChatCallbackEmitTargetAndPayload.schema"));
|
8
|
-
const invokeChatCallbackResponsePayload_schema_1 = __importDefault(require("./../../schemas/mercury/v2020_12_25/invokeChatCallbackResponsePayload.schema"));
|
9
|
-
const mercury_types_1 = require("@sprucelabs/mercury-types");
|
10
|
-
const invokeChatCallbackEventContract = (0, mercury_types_1.buildEventContract)({
|
11
|
-
eventSignatures: {
|
12
|
-
'invoke-chat-callback::v2020_12_25': {
|
13
|
-
listenPermissions: { "contractId": "chatbot-contract", "permissionIdsAny": ["can-register-chatbots"] },
|
14
|
-
emitPayloadSchema: invokeChatCallbackEmitTargetAndPayload_schema_1.default,
|
15
|
-
responsePayloadSchema: invokeChatCallbackResponsePayload_schema_1.default,
|
16
|
-
}
|
17
|
-
}
|
18
|
-
});
|
19
|
-
exports.default = invokeChatCallbackEventContract;
|
@@ -1,16 +0,0 @@
|
|
1
|
-
import './../../permissions/permissions.types';
|
2
|
-
declare const registerChatbotsEventContract: {
|
3
|
-
eventSignatures: {
|
4
|
-
'register-chatbots::v2020_12_25': {
|
5
|
-
isGlobal: true;
|
6
|
-
listenPermissions: {
|
7
|
-
contractId: "chatbot-contract";
|
8
|
-
permissionIdsAny: "can-register-chatbots"[];
|
9
|
-
};
|
10
|
-
emitPayloadSchema: import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.RegisterChatbotsEmitTargetAndPayloadSchema;
|
11
|
-
responsePayloadSchema: import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.RegisterChatbotsResponsePayloadSchema;
|
12
|
-
};
|
13
|
-
};
|
14
|
-
};
|
15
|
-
export default registerChatbotsEventContract;
|
16
|
-
export type RegisterChatbotsEventContract = typeof registerChatbotsEventContract;
|
@@ -1,20 +0,0 @@
|
|
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 registerChatbotsEmitTargetAndPayload_schema_1 = __importDefault(require("./../../schemas/mercury/v2020_12_25/registerChatbotsEmitTargetAndPayload.schema"));
|
8
|
-
const registerChatbotsResponsePayload_schema_1 = __importDefault(require("./../../schemas/mercury/v2020_12_25/registerChatbotsResponsePayload.schema"));
|
9
|
-
const mercury_types_1 = require("@sprucelabs/mercury-types");
|
10
|
-
const registerChatbotsEventContract = (0, mercury_types_1.buildEventContract)({
|
11
|
-
eventSignatures: {
|
12
|
-
'register-chatbots::v2020_12_25': {
|
13
|
-
isGlobal: true,
|
14
|
-
listenPermissions: { "contractId": "chatbot-contract", "permissionIdsAny": ["can-register-chatbots"] },
|
15
|
-
emitPayloadSchema: registerChatbotsEmitTargetAndPayload_schema_1.default,
|
16
|
-
responsePayloadSchema: registerChatbotsResponsePayload_schema_1.default,
|
17
|
-
}
|
18
|
-
}
|
19
|
-
});
|
20
|
-
exports.default = registerChatbotsEventContract;
|
@@ -1,63 +0,0 @@
|
|
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
|
-
'title': {
|
16
|
-
type: 'text',
|
17
|
-
isRequired: true,
|
18
|
-
options: undefined
|
19
|
-
},
|
20
|
-
/** . */
|
21
|
-
'yourJobIfYouChooseToAcceptItIs': {
|
22
|
-
type: 'text',
|
23
|
-
isRequired: true,
|
24
|
-
options: undefined
|
25
|
-
},
|
26
|
-
/** . */
|
27
|
-
'weAreDoneWhen': {
|
28
|
-
type: 'text',
|
29
|
-
isRequired: true,
|
30
|
-
options: undefined
|
31
|
-
},
|
32
|
-
/** . */
|
33
|
-
'pleaseKeepInMindThat': {
|
34
|
-
type: 'text',
|
35
|
-
isArray: true,
|
36
|
-
options: undefined
|
37
|
-
},
|
38
|
-
/** . */
|
39
|
-
'stateSchema': {
|
40
|
-
type: 'raw',
|
41
|
-
options: { valueType: `SpruceSchema.Schema`, }
|
42
|
-
},
|
43
|
-
/** . */
|
44
|
-
'model': {
|
45
|
-
type: 'id',
|
46
|
-
options: undefined
|
47
|
-
},
|
48
|
-
/** . */
|
49
|
-
'promptTemplate': {
|
50
|
-
type: 'text',
|
51
|
-
options: undefined
|
52
|
-
},
|
53
|
-
/** . */
|
54
|
-
'callbacks': {
|
55
|
-
type: 'schema',
|
56
|
-
isArray: true,
|
57
|
-
minArrayLength: 0,
|
58
|
-
options: { schema: chatbotCallbacks_schema_1.default, }
|
59
|
-
},
|
60
|
-
}
|
61
|
-
};
|
62
|
-
schema_1.SchemaRegistry.getInstance().trackSchema(chatbotSchema);
|
63
|
-
exports.default = chatbotSchema;
|
@@ -1,25 +0,0 @@
|
|
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
|
-
'useThisWhenever': {
|
18
|
-
type: 'text',
|
19
|
-
isRequired: true,
|
20
|
-
options: undefined
|
21
|
-
},
|
22
|
-
}
|
23
|
-
};
|
24
|
-
schema_1.SchemaRegistry.getInstance().trackSchema(chatbotCallbacksSchema);
|
25
|
-
exports.default = chatbotCallbacksSchema;
|
package/build/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackEmitTargetAndPayload.schema.js
DELETED
@@ -1,37 +0,0 @@
|
|
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 invokeChatCallbackTarget_schema_1 = __importDefault(require("./invokeChatCallbackTarget.schema"));
|
9
|
-
const invokeChatCallbackPayload_schema_1 = __importDefault(require("./invokeChatCallbackPayload.schema"));
|
10
|
-
const invokeChatCallbackEmitTargetAndPayloadSchema = {
|
11
|
-
id: 'invokeChatCallbackEmitTargetAndPayload',
|
12
|
-
version: 'v2020_12_25',
|
13
|
-
namespace: 'Mercury',
|
14
|
-
name: '',
|
15
|
-
fields: {
|
16
|
-
/** Source. */
|
17
|
-
'source': {
|
18
|
-
label: 'Source',
|
19
|
-
type: 'schema',
|
20
|
-
options: { schema: eventSource_schema_1.default, }
|
21
|
-
},
|
22
|
-
/** . */
|
23
|
-
'target': {
|
24
|
-
type: 'schema',
|
25
|
-
isRequired: true,
|
26
|
-
options: { schema: invokeChatCallbackTarget_schema_1.default, }
|
27
|
-
},
|
28
|
-
/** . */
|
29
|
-
'payload': {
|
30
|
-
type: 'schema',
|
31
|
-
isRequired: true,
|
32
|
-
options: { schema: invokeChatCallbackPayload_schema_1.default, }
|
33
|
-
},
|
34
|
-
}
|
35
|
-
};
|
36
|
-
schema_1.SchemaRegistry.getInstance().trackSchema(invokeChatCallbackEmitTargetAndPayloadSchema);
|
37
|
-
exports.default = invokeChatCallbackEmitTargetAndPayloadSchema;
|
@@ -1,24 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const schema_1 = require("@sprucelabs/schema");
|
4
|
-
const invokeChatCallbackPayloadSchema = {
|
5
|
-
id: 'invokeChatCallbackPayload',
|
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
|
-
'state': {
|
18
|
-
type: 'raw',
|
19
|
-
options: { valueType: `Record<string, any>`, }
|
20
|
-
},
|
21
|
-
}
|
22
|
-
};
|
23
|
-
schema_1.SchemaRegistry.getInstance().trackSchema(invokeChatCallbackPayloadSchema);
|
24
|
-
exports.default = invokeChatCallbackPayloadSchema;
|
package/build/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackResponsePayload.schema.js
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const schema_1 = require("@sprucelabs/schema");
|
4
|
-
const invokeChatCallbackResponsePayloadSchema = {
|
5
|
-
id: 'invokeChatCallbackResponsePayload',
|
6
|
-
version: 'v2020_12_25',
|
7
|
-
namespace: 'Mercury',
|
8
|
-
name: '',
|
9
|
-
fields: {
|
10
|
-
/** . */
|
11
|
-
'message': {
|
12
|
-
type: 'text',
|
13
|
-
isRequired: true,
|
14
|
-
options: undefined
|
15
|
-
},
|
16
|
-
}
|
17
|
-
};
|
18
|
-
schema_1.SchemaRegistry.getInstance().trackSchema(invokeChatCallbackResponsePayloadSchema);
|
19
|
-
exports.default = invokeChatCallbackResponsePayloadSchema;
|
@@ -1,25 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const schema_1 = require("@sprucelabs/schema");
|
4
|
-
const invokeChatCallbackTargetSchema = {
|
5
|
-
id: 'invokeChatCallbackTarget',
|
6
|
-
version: 'v2020_12_25',
|
7
|
-
namespace: 'Mercury',
|
8
|
-
name: '',
|
9
|
-
fields: {
|
10
|
-
/** . */
|
11
|
-
'skillId': {
|
12
|
-
type: 'id',
|
13
|
-
isRequired: true,
|
14
|
-
options: undefined
|
15
|
-
},
|
16
|
-
/** . */
|
17
|
-
'chatPersonId': {
|
18
|
-
type: 'id',
|
19
|
-
isRequired: true,
|
20
|
-
options: undefined
|
21
|
-
},
|
22
|
-
}
|
23
|
-
};
|
24
|
-
schema_1.SchemaRegistry.getInstance().trackSchema(invokeChatCallbackTargetSchema);
|
25
|
-
exports.default = invokeChatCallbackTargetSchema;
|
package/build/.spruce/schemas/mercury/v2020_12_25/registerChatbotsEmitTargetAndPayload.schema.js
DELETED
@@ -1,23 +0,0 @@
|
|
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 registerChatbotsEmitTargetAndPayloadSchema = {
|
9
|
-
id: 'registerChatbotsEmitTargetAndPayload',
|
10
|
-
version: 'v2020_12_25',
|
11
|
-
namespace: 'Mercury',
|
12
|
-
name: '',
|
13
|
-
fields: {
|
14
|
-
/** Source. */
|
15
|
-
'source': {
|
16
|
-
label: 'Source',
|
17
|
-
type: 'schema',
|
18
|
-
options: { schema: eventSource_schema_1.default, }
|
19
|
-
},
|
20
|
-
}
|
21
|
-
};
|
22
|
-
schema_1.SchemaRegistry.getInstance().trackSchema(registerChatbotsEmitTargetAndPayloadSchema);
|
23
|
-
exports.default = registerChatbotsEmitTargetAndPayloadSchema;
|
@@ -1,25 +0,0 @@
|
|
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 registerChatbotsResponsePayloadSchema = {
|
9
|
-
id: 'registerChatbotsResponsePayload',
|
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(registerChatbotsResponsePayloadSchema);
|
25
|
-
exports.default = registerChatbotsResponsePayloadSchema;
|
@@ -1,15 +0,0 @@
|
|
1
|
-
import './../../permissions/permissions.types';
|
2
|
-
declare const invokeChatCallbackEventContract: {
|
3
|
-
eventSignatures: {
|
4
|
-
'invoke-chat-callback::v2020_12_25': {
|
5
|
-
listenPermissions: {
|
6
|
-
contractId: "chatbot-contract";
|
7
|
-
permissionIdsAny: "can-register-chatbots"[];
|
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;
|
@@ -1,14 +0,0 @@
|
|
1
|
-
import './../../permissions/permissions.types';
|
2
|
-
import invokeChatCallbackEmitTargetAndPayloadSchema from './../../schemas/mercury/v2020_12_25/invokeChatCallbackEmitTargetAndPayload.schema.js';
|
3
|
-
import invokeChatCallbackResponsePayloadSchema from './../../schemas/mercury/v2020_12_25/invokeChatCallbackResponsePayload.schema.js';
|
4
|
-
import { buildEventContract } from '@sprucelabs/mercury-types';
|
5
|
-
const invokeChatCallbackEventContract = buildEventContract({
|
6
|
-
eventSignatures: {
|
7
|
-
'invoke-chat-callback::v2020_12_25': {
|
8
|
-
listenPermissions: { "contractId": "chatbot-contract", "permissionIdsAny": ["can-register-chatbots"] },
|
9
|
-
emitPayloadSchema: invokeChatCallbackEmitTargetAndPayloadSchema,
|
10
|
-
responsePayloadSchema: invokeChatCallbackResponsePayloadSchema,
|
11
|
-
}
|
12
|
-
}
|
13
|
-
});
|
14
|
-
export default invokeChatCallbackEventContract;
|
@@ -1,16 +0,0 @@
|
|
1
|
-
import './../../permissions/permissions.types';
|
2
|
-
declare const registerChatbotsEventContract: {
|
3
|
-
eventSignatures: {
|
4
|
-
'register-chatbots::v2020_12_25': {
|
5
|
-
isGlobal: true;
|
6
|
-
listenPermissions: {
|
7
|
-
contractId: "chatbot-contract";
|
8
|
-
permissionIdsAny: "can-register-chatbots"[];
|
9
|
-
};
|
10
|
-
emitPayloadSchema: import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.RegisterChatbotsEmitTargetAndPayloadSchema;
|
11
|
-
responsePayloadSchema: import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.RegisterChatbotsResponsePayloadSchema;
|
12
|
-
};
|
13
|
-
};
|
14
|
-
};
|
15
|
-
export default registerChatbotsEventContract;
|
16
|
-
export type RegisterChatbotsEventContract = typeof registerChatbotsEventContract;
|
@@ -1,15 +0,0 @@
|
|
1
|
-
import './../../permissions/permissions.types';
|
2
|
-
import registerChatbotsEmitTargetAndPayloadSchema from './../../schemas/mercury/v2020_12_25/registerChatbotsEmitTargetAndPayload.schema.js';
|
3
|
-
import registerChatbotsResponsePayloadSchema from './../../schemas/mercury/v2020_12_25/registerChatbotsResponsePayload.schema.js';
|
4
|
-
import { buildEventContract } from '@sprucelabs/mercury-types';
|
5
|
-
const registerChatbotsEventContract = buildEventContract({
|
6
|
-
eventSignatures: {
|
7
|
-
'register-chatbots::v2020_12_25': {
|
8
|
-
isGlobal: true,
|
9
|
-
listenPermissions: { "contractId": "chatbot-contract", "permissionIdsAny": ["can-register-chatbots"] },
|
10
|
-
emitPayloadSchema: registerChatbotsEmitTargetAndPayloadSchema,
|
11
|
-
responsePayloadSchema: registerChatbotsResponsePayloadSchema,
|
12
|
-
}
|
13
|
-
}
|
14
|
-
});
|
15
|
-
export default registerChatbotsEventContract;
|
@@ -1,58 +0,0 @@
|
|
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
|
-
'title': {
|
11
|
-
type: 'text',
|
12
|
-
isRequired: true,
|
13
|
-
options: undefined
|
14
|
-
},
|
15
|
-
/** . */
|
16
|
-
'yourJobIfYouChooseToAcceptItIs': {
|
17
|
-
type: 'text',
|
18
|
-
isRequired: true,
|
19
|
-
options: undefined
|
20
|
-
},
|
21
|
-
/** . */
|
22
|
-
'weAreDoneWhen': {
|
23
|
-
type: 'text',
|
24
|
-
isRequired: true,
|
25
|
-
options: undefined
|
26
|
-
},
|
27
|
-
/** . */
|
28
|
-
'pleaseKeepInMindThat': {
|
29
|
-
type: 'text',
|
30
|
-
isArray: true,
|
31
|
-
options: undefined
|
32
|
-
},
|
33
|
-
/** . */
|
34
|
-
'stateSchema': {
|
35
|
-
type: 'raw',
|
36
|
-
options: { valueType: `SpruceSchema.Schema`, }
|
37
|
-
},
|
38
|
-
/** . */
|
39
|
-
'model': {
|
40
|
-
type: 'id',
|
41
|
-
options: undefined
|
42
|
-
},
|
43
|
-
/** . */
|
44
|
-
'promptTemplate': {
|
45
|
-
type: 'text',
|
46
|
-
options: undefined
|
47
|
-
},
|
48
|
-
/** . */
|
49
|
-
'callbacks': {
|
50
|
-
type: 'schema',
|
51
|
-
isArray: true,
|
52
|
-
minArrayLength: 0,
|
53
|
-
options: { schema: chatbotCallbacksSchema_v2020_12_25, }
|
54
|
-
},
|
55
|
-
}
|
56
|
-
};
|
57
|
-
SchemaRegistry.getInstance().trackSchema(chatbotSchema);
|
58
|
-
export default chatbotSchema;
|
@@ -1,23 +0,0 @@
|
|
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
|
-
'useThisWhenever': {
|
16
|
-
type: 'text',
|
17
|
-
isRequired: true,
|
18
|
-
options: undefined
|
19
|
-
},
|
20
|
-
}
|
21
|
-
};
|
22
|
-
SchemaRegistry.getInstance().trackSchema(chatbotCallbacksSchema);
|
23
|
-
export default chatbotCallbacksSchema;
|
@@ -1,32 +0,0 @@
|
|
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;
|
@@ -1,22 +0,0 @@
|
|
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;
|