@holocronlab/botruntime-chat 0.5.5

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 (59) hide show
  1. package/LICENSE +8 -0
  2. package/README.md +64 -0
  3. package/dist/client.d.ts +363 -0
  4. package/dist/consts.d.ts +1 -0
  5. package/dist/errors.d.ts +20 -0
  6. package/dist/event-emitter.d.ts +10 -0
  7. package/dist/eventsource.d.ts +32 -0
  8. package/dist/gen/client/errors.d.ts +229 -0
  9. package/dist/gen/client/index.d.ts +77 -0
  10. package/dist/gen/client/models.d.ts +212 -0
  11. package/dist/gen/client/operations/addParticipant.d.ts +55 -0
  12. package/dist/gen/client/operations/createConversation.d.ts +39 -0
  13. package/dist/gen/client/operations/createEvent.d.ts +55 -0
  14. package/dist/gen/client/operations/createMessage.d.ts +294 -0
  15. package/dist/gen/client/operations/createUser.d.ts +66 -0
  16. package/dist/gen/client/operations/deleteConversation.d.ts +22 -0
  17. package/dist/gen/client/operations/deleteMessage.d.ts +22 -0
  18. package/dist/gen/client/operations/deleteUser.d.ts +21 -0
  19. package/dist/gen/client/operations/getConversation.d.ts +36 -0
  20. package/dist/gen/client/operations/getEvent.d.ts +46 -0
  21. package/dist/gen/client/operations/getMessage.d.ts +167 -0
  22. package/dist/gen/client/operations/getOrCreateConversation.d.ts +39 -0
  23. package/dist/gen/client/operations/getOrCreateUser.d.ts +62 -0
  24. package/dist/gen/client/operations/getParticipant.d.ts +52 -0
  25. package/dist/gen/client/operations/getUser.d.ts +50 -0
  26. package/dist/gen/client/operations/listConversations.d.ts +42 -0
  27. package/dist/gen/client/operations/listMessages.d.ts +171 -0
  28. package/dist/gen/client/operations/listParticipants.d.ts +55 -0
  29. package/dist/gen/client/operations/listenConversation.d.ts +22 -0
  30. package/dist/gen/client/operations/removeParticipant.d.ts +23 -0
  31. package/dist/gen/client/operations/updateUser.d.ts +62 -0
  32. package/dist/gen/client/to-axios.d.ts +16 -0
  33. package/dist/gen/signals/eventCreated.j.d.ts +3 -0
  34. package/dist/gen/signals/eventCreated.t.d.ts +28 -0
  35. package/dist/gen/signals/eventCreated.z.d.ts +47 -0
  36. package/dist/gen/signals/index.d.ts +924 -0
  37. package/dist/gen/signals/messageCreated.j.d.ts +3 -0
  38. package/dist/gen/signals/messageCreated.t.d.ts +149 -0
  39. package/dist/gen/signals/messageCreated.z.d.ts +780 -0
  40. package/dist/gen/signals/messageDeleted.j.d.ts +3 -0
  41. package/dist/gen/signals/messageDeleted.t.d.ts +8 -0
  42. package/dist/gen/signals/messageDeleted.z.d.ts +32 -0
  43. package/dist/gen/signals/participantAdded.j.d.ts +3 -0
  44. package/dist/gen/signals/participantAdded.t.d.ts +7 -0
  45. package/dist/gen/signals/participantAdded.z.d.ts +27 -0
  46. package/dist/gen/signals/participantRemoved.j.d.ts +3 -0
  47. package/dist/gen/signals/participantRemoved.t.d.ts +7 -0
  48. package/dist/gen/signals/participantRemoved.z.d.ts +27 -0
  49. package/dist/index.cjs +1660 -0
  50. package/dist/index.cjs.map +7 -0
  51. package/dist/index.d.ts +5 -0
  52. package/dist/index.mjs +138836 -0
  53. package/dist/index.mjs.map +7 -0
  54. package/dist/jsonwebtoken.d.ts +3 -0
  55. package/dist/listing.d.ts +16 -0
  56. package/dist/signal-listener.d.ts +51 -0
  57. package/dist/types.d.ts +41 -0
  58. package/dist/watchdog.d.ts +11 -0
  59. package/package.json +35 -0
@@ -0,0 +1,3 @@
1
+ import type { JSONSchema7 } from 'json-schema';
2
+ declare const schema: JSONSchema7;
3
+ export default schema;
@@ -0,0 +1,149 @@
1
+ export interface MessageCreated {
2
+ type: "message_created";
3
+ data: {
4
+ /**
5
+ * Identifier of the [Message](#schema_message)
6
+ */
7
+ id: string;
8
+ /**
9
+ * Creation date of the [Message](#schema_message) in ISO 8601 format
10
+ */
11
+ createdAt: string;
12
+ /**
13
+ * Payload is the content type of the message.
14
+ */
15
+ payload: {
16
+ type: "audio";
17
+ audioUrl: string;
18
+ [k: string]: any;
19
+ } | {
20
+ type: "card";
21
+ title: string;
22
+ subtitle?: string;
23
+ imageUrl?: string;
24
+ actions: {
25
+ action: "postback" | "url" | "say";
26
+ label: string;
27
+ value: string;
28
+ [k: string]: any;
29
+ }[];
30
+ [k: string]: any;
31
+ } | {
32
+ type: "carousel";
33
+ items: {
34
+ type: "card";
35
+ title: string;
36
+ subtitle?: string;
37
+ imageUrl?: string;
38
+ actions: {
39
+ action: "postback" | "url" | "say";
40
+ label: string;
41
+ value: string;
42
+ [k: string]: any;
43
+ }[];
44
+ [k: string]: any;
45
+ }[];
46
+ [k: string]: any;
47
+ } | {
48
+ text: string;
49
+ options: {
50
+ label: string;
51
+ value: string;
52
+ [k: string]: any;
53
+ }[];
54
+ type: "choice";
55
+ [k: string]: any;
56
+ } | {
57
+ text: string;
58
+ options: {
59
+ label: string;
60
+ value: string;
61
+ [k: string]: any;
62
+ }[];
63
+ type: "dropdown";
64
+ [k: string]: any;
65
+ } | {
66
+ type: "file";
67
+ fileUrl: string;
68
+ title?: string;
69
+ [k: string]: any;
70
+ } | {
71
+ type: "image";
72
+ imageUrl: string;
73
+ [k: string]: any;
74
+ } | {
75
+ type: "location";
76
+ latitude: number;
77
+ longitude: number;
78
+ address?: string;
79
+ title?: string;
80
+ [k: string]: any;
81
+ } | {
82
+ type: "text";
83
+ text: string;
84
+ [k: string]: any;
85
+ } | {
86
+ type: "video";
87
+ videoUrl: string;
88
+ [k: string]: any;
89
+ } | {
90
+ type: "markdown";
91
+ markdown: string;
92
+ [k: string]: any;
93
+ } | {
94
+ type: "bloc";
95
+ items: ({
96
+ type: "text";
97
+ text: string;
98
+ [k: string]: any;
99
+ } | {
100
+ type: "markdown";
101
+ markdown: string;
102
+ [k: string]: any;
103
+ } | {
104
+ type: "image";
105
+ imageUrl: string;
106
+ [k: string]: any;
107
+ } | {
108
+ type: "audio";
109
+ audioUrl: string;
110
+ [k: string]: any;
111
+ } | {
112
+ type: "video";
113
+ videoUrl: string;
114
+ [k: string]: any;
115
+ } | {
116
+ type: "file";
117
+ fileUrl: string;
118
+ title?: string;
119
+ [k: string]: any;
120
+ } | {
121
+ type: "location";
122
+ latitude: number;
123
+ longitude: number;
124
+ address?: string;
125
+ title?: string;
126
+ [k: string]: any;
127
+ })[];
128
+ [k: string]: any;
129
+ };
130
+ /**
131
+ * ID of the [User](#schema_user)
132
+ */
133
+ userId: string;
134
+ /**
135
+ * ID of the [Conversation](#schema_conversation)
136
+ */
137
+ conversationId: string;
138
+ /**
139
+ * Metadata of the message
140
+ */
141
+ metadata?: {
142
+ [k: string]: any;
143
+ };
144
+ /**
145
+ * Whether the message was created by the bot or not
146
+ */
147
+ isBot: boolean;
148
+ };
149
+ }