@sprucelabs/mercury-core-events 20.1.2 → 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.
Files changed (27) 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/invokeChatCallback.v2020_12_25.contract.d.ts +15 -0
  4. package/build/.spruce/events/mercury/invokeChatCallback.v2020_12_25.contract.js +22 -0
  5. package/build/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackEmitTargetAndPayload.schema.d.ts +3 -0
  6. package/build/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackEmitTargetAndPayload.schema.js +37 -0
  7. package/build/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackPayload.schema.d.ts +3 -0
  8. package/build/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackPayload.schema.js +24 -0
  9. package/build/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackResponsePayload.schema.d.ts +3 -0
  10. package/build/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackResponsePayload.schema.js +19 -0
  11. package/build/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackTarget.schema.d.ts +3 -0
  12. package/build/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackTarget.schema.js +25 -0
  13. package/build/.spruce/schemas/schemas.types.d.ts +289 -169
  14. package/build/esm/.spruce/events/events.contract.d.ts +13 -0
  15. package/build/esm/.spruce/events/events.contract.js +2 -0
  16. package/build/esm/.spruce/events/mercury/invokeChatCallback.v2020_12_25.contract.d.ts +15 -0
  17. package/build/esm/.spruce/events/mercury/invokeChatCallback.v2020_12_25.contract.js +17 -0
  18. package/build/esm/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackEmitTargetAndPayload.schema.d.ts +3 -0
  19. package/build/esm/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackEmitTargetAndPayload.schema.js +32 -0
  20. package/build/esm/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackPayload.schema.d.ts +3 -0
  21. package/build/esm/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackPayload.schema.js +22 -0
  22. package/build/esm/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackResponsePayload.schema.d.ts +3 -0
  23. package/build/esm/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackResponsePayload.schema.js +17 -0
  24. package/build/esm/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackTarget.schema.d.ts +3 -0
  25. package/build/esm/.spruce/schemas/mercury/v2020_12_25/invokeChatCallbackTarget.schema.js +23 -0
  26. package/build/esm/.spruce/schemas/schemas.types.d.ts +289 -169
  27. 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";
@@ -341,6 +342,17 @@ declare const _default: ({
341
342
  responsePayloadSchema: import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.InstallSkillResponsePayloadSchema;
342
343
  };
343
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
+ };
344
356
  } | {
345
357
  eventSignatures: {
346
358
  'is-skill-installed::v2020_12_25': {
@@ -657,6 +669,7 @@ declare module '@sprucelabs/mercury-types/build/types/mercury.types' {
657
669
  'get-skill::v2020_12_25': MercuryGetSkillEventContract_v2020_12_25['eventSignatures']['get-skill::v2020_12_25'];
658
670
  'health::v2020_12_25': MercuryHealthEventContract_v2020_12_25['eventSignatures']['health::v2020_12_25'];
659
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'];
660
673
  'is-skill-installed::v2020_12_25': MercuryIsSkillInstalledEventContract_v2020_12_25['eventSignatures']['is-skill-installed::v2020_12_25'];
661
674
  'list-installed-skills::v2020_12_25': MercuryListInstalledSkillsEventContract_v2020_12_25['eventSignatures']['list-installed-skills::v2020_12_25'];
662
675
  'list-locations::v2020_12_25': MercuryListLocationsEventContract_v2020_12_25['eventSignatures']['list-locations::v2020_12_25'];
@@ -35,6 +35,7 @@ const getRole_v2020_12_25_contract_1 = __importDefault(require("./mercury/getRol
35
35
  const getSkill_v2020_12_25_contract_1 = __importDefault(require("./mercury/getSkill.v2020_12_25.contract"));
36
36
  const health_v2020_12_25_contract_1 = __importDefault(require("./mercury/health.v2020_12_25.contract"));
37
37
  const installSkill_v2020_12_25_contract_1 = __importDefault(require("./mercury/installSkill.v2020_12_25.contract"));
38
+ const invokeChatCallback_v2020_12_25_contract_1 = __importDefault(require("./mercury/invokeChatCallback.v2020_12_25.contract"));
38
39
  const isSkillInstalled_v2020_12_25_contract_1 = __importDefault(require("./mercury/isSkillInstalled.v2020_12_25.contract"));
39
40
  const listInstalledSkills_v2020_12_25_contract_1 = __importDefault(require("./mercury/listInstalledSkills.v2020_12_25.contract"));
40
41
  const listLocations_v2020_12_25_contract_1 = __importDefault(require("./mercury/listLocations.v2020_12_25.contract"));
@@ -103,6 +104,7 @@ exports.default = [
103
104
  getSkill_v2020_12_25_contract_1.default,
104
105
  health_v2020_12_25_contract_1.default,
105
106
  installSkill_v2020_12_25_contract_1.default,
107
+ invokeChatCallback_v2020_12_25_contract_1.default,
106
108
  isSkillInstalled_v2020_12_25_contract_1.default,
107
109
  listInstalledSkills_v2020_12_25_contract_1.default,
108
110
  listLocations_v2020_12_25_contract_1.default,
@@ -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,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 invokeChatCallbackEmitTargetAndPayload_schema_1 = __importDefault(require("./../../schemas/mercury/v2020_12_25/invokeChatCallbackEmitTargetAndPayload.schema"));
9
+ const invokeChatCallbackResponsePayload_schema_1 = __importDefault(require("./../../schemas/mercury/v2020_12_25/invokeChatCallbackResponsePayload.schema"));
10
+ const invokeChatCallbackEventContract = (0, mercury_types_1.buildEventContract)({
11
+ eventSignatures: {
12
+ 'invoke-chat-callback::v2020_12_25': {
13
+ listenPermissions: {
14
+ contractId: 'chat-bot-contract',
15
+ permissionIdsAny: ['can-register-chat-bot'],
16
+ },
17
+ emitPayloadSchema: invokeChatCallbackEmitTargetAndPayload_schema_1.default,
18
+ responsePayloadSchema: invokeChatCallbackResponsePayload_schema_1.default,
19
+ },
20
+ },
21
+ });
22
+ exports.default = invokeChatCallbackEventContract;
@@ -0,0 +1,3 @@
1
+ import { SpruceSchemas } from '../../schemas.types';
2
+ declare const invokeChatCallbackEmitTargetAndPayloadSchema: SpruceSchemas.Mercury.v2020_12_25.InvokeChatCallbackEmitTargetAndPayloadSchema;
3
+ export default invokeChatCallbackEmitTargetAndPayloadSchema;
@@ -0,0 +1,37 @@
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;
@@ -0,0 +1,3 @@
1
+ import { SpruceSchemas } from '../../schemas.types';
2
+ declare const invokeChatCallbackPayloadSchema: SpruceSchemas.Mercury.v2020_12_25.InvokeChatCallbackPayloadSchema;
3
+ export default invokeChatCallbackPayloadSchema;
@@ -0,0 +1,24 @@
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;
@@ -0,0 +1,3 @@
1
+ import { SpruceSchemas } from '../../schemas.types';
2
+ declare const invokeChatCallbackResponsePayloadSchema: SpruceSchemas.Mercury.v2020_12_25.InvokeChatCallbackResponsePayloadSchema;
3
+ export default invokeChatCallbackResponsePayloadSchema;
@@ -0,0 +1,19 @@
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;
@@ -0,0 +1,3 @@
1
+ import { SpruceSchemas } from '../../schemas.types';
2
+ declare const invokeChatCallbackTargetSchema: SpruceSchemas.Mercury.v2020_12_25.InvokeChatCallbackTargetSchema;
3
+ export default invokeChatCallbackTargetSchema;
@@ -0,0 +1,25 @@
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;