@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'];
@@ -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';
@@ -98,6 +99,7 @@ export default [
98
99
  mercuryGetSkillEventContract_v2020_12_25,
99
100
  mercuryHealthEventContract_v2020_12_25,
100
101
  mercuryInstallSkillEventContract_v2020_12_25,
102
+ mercuryInvokeChatCallbackEventContract_v2020_12_25,
101
103
  mercuryIsSkillInstalledEventContract_v2020_12_25,
102
104
  mercuryListInstalledSkillsEventContract_v2020_12_25,
103
105
  mercuryListLocationsEventContract_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,3 @@
1
+ import { SpruceSchemas } from '../../schemas.types';
2
+ declare const invokeChatCallbackEmitTargetAndPayloadSchema: SpruceSchemas.Mercury.v2020_12_25.InvokeChatCallbackEmitTargetAndPayloadSchema;
3
+ export default invokeChatCallbackEmitTargetAndPayloadSchema;
@@ -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,3 @@
1
+ import { SpruceSchemas } from '../../schemas.types';
2
+ declare const invokeChatCallbackPayloadSchema: SpruceSchemas.Mercury.v2020_12_25.InvokeChatCallbackPayloadSchema;
3
+ export default invokeChatCallbackPayloadSchema;
@@ -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;
@@ -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,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,3 @@
1
+ import { SpruceSchemas } from '../../schemas.types';
2
+ declare const invokeChatCallbackTargetSchema: SpruceSchemas.Mercury.v2020_12_25.InvokeChatCallbackTargetSchema;
3
+ export default invokeChatCallbackTargetSchema;
@@ -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;