@worktango/ai-assistant 0.0.1 → 0.0.2-beta-gd2

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 (206) hide show
  1. package/README.md +107 -6
  2. package/backendTypes.ts +268 -0
  3. package/build/constants.js +80 -0
  4. package/build/dist/express.d.ts +2 -0
  5. package/build/dist/express.js +10457 -0
  6. package/build/express.d.ts +2 -0
  7. package/build/express.js +21 -0
  8. package/build/react.d.ts +4 -0
  9. package/build/react.js +44 -0
  10. package/build/src/backend/express.d.ts +63 -0
  11. package/build/src/backend/express.js +366 -0
  12. package/constants.js +80 -0
  13. package/dist/Absenteeism-DnYRfCGD.mjs +49 -0
  14. package/dist/ActivityFeed-CMR7d8a9.mjs +41 -0
  15. package/dist/AddUser-BxN71Gq-.mjs +128 -0
  16. package/dist/Admin-BNwEEcul.mjs +55 -0
  17. package/dist/Admin-CCOxh4NQ.mjs +70 -0
  18. package/dist/AiGeneral-6P2eop9s.mjs +43 -0
  19. package/dist/AiScoring-Be2EIJC_.mjs +67 -0
  20. package/dist/AiText-D4UwoEoT.mjs +67 -0
  21. package/dist/Anniversary-B3ZoAqa5.mjs +35 -0
  22. package/dist/Appreciation-B_rgIegc.mjs +55 -0
  23. package/dist/ArrowDown-CWFXlxhX.mjs +38 -0
  24. package/dist/ArrowLeft-D7rl_Ecd.mjs +12 -0
  25. package/dist/ArrowRight-BPLLV4yW.mjs +12 -0
  26. package/dist/ArrowUp-DYWuwxJM.mjs +31 -0
  27. package/dist/Attachment-CR6plcc5.mjs +20 -0
  28. package/dist/BeQuickDontHurry-BPnXAKBa.mjs +94 -0
  29. package/dist/Birthday-BihgKHOQ.mjs +66 -0
  30. package/dist/BrandPromise-fU0oR23R.mjs +57 -0
  31. package/dist/BrandVision-B37SFqTc.mjs +96 -0
  32. package/dist/Calendar-BdAku_za.mjs +24 -0
  33. package/dist/CaretDn-De_oYPN-.mjs +11 -0
  34. package/dist/CaretDown-DnGml5_x.mjs +5 -0
  35. package/dist/CaretLeft-D0BOxHEC.mjs +11 -0
  36. package/dist/CaretRight-dCjBT9bB.mjs +11 -0
  37. package/dist/CaretUp-BCw0fqJn.mjs +11 -0
  38. package/dist/ChallengeAccepted-CNaeHk1I.mjs +49 -0
  39. package/dist/CheckIn-CwG42QYQ.mjs +34 -0
  40. package/dist/CheckIns-A1Kkc_2W.mjs +33 -0
  41. package/dist/CheckSeal-Dqw_lc0S.mjs +31 -0
  42. package/dist/Checkmark-BHE91v8D.mjs +16 -0
  43. package/dist/Clock-CuAJQmxQ.mjs +33 -0
  44. package/dist/Close-D-f_iwQ8.mjs +12 -0
  45. package/dist/CloudDownload-CfQ7V21B.mjs +40 -0
  46. package/dist/Comment-GrrKaBsi.mjs +167 -0
  47. package/dist/Comments-YOn2eJUt.mjs +48 -0
  48. package/dist/Connections-CPlNaCbu.mjs +49 -0
  49. package/dist/Copy-NDpa2_F3.mjs +72 -0
  50. package/dist/CustomQuestion-OzfWoJV3.mjs +40 -0
  51. package/dist/CustomerSuccess-DAH7mRDK.mjs +50 -0
  52. package/dist/DatePicker-BxfSRn5x.mjs +303 -0
  53. package/dist/Dot-DCoU7aD3.mjs +12 -0
  54. package/dist/Download-DpF3elMl.mjs +38 -0
  55. package/dist/Drag-DWbGJvhn.mjs +41 -0
  56. package/dist/DragIndicator-CnDCSf3A.mjs +12 -0
  57. package/dist/Earn-7uXfIfZU.mjs +15 -0
  58. package/dist/Email-zAMtQLoS.mjs +24 -0
  59. package/dist/EmojiDisplay-DSZOjKek.mjs +38975 -0
  60. package/dist/EmojiPicker-DgtE9CiW.mjs +29560 -0
  61. package/dist/EnpsSurvey-Y9at0I5m.mjs +49 -0
  62. package/dist/Expired-BNR7WTVX.mjs +33 -0
  63. package/dist/Eye-DzoufmcZ.mjs +27 -0
  64. package/dist/Feedback-D7sxcXQ1.mjs +41 -0
  65. package/dist/Feedback-JZEpzb79.mjs +49 -0
  66. package/dist/Filter-C1JuLCfg.mjs +64 -0
  67. package/dist/Flag-C4l9OPVK.mjs +35 -0
  68. package/dist/Giphy-Bhmd8ypI.mjs +22 -0
  69. package/dist/GoalCount-CDtW2B-F.mjs +10 -0
  70. package/dist/GoalPercent-CEIqOHFH.mjs +21 -0
  71. package/dist/GoalTask-BRQInXIl.mjs +20 -0
  72. package/dist/GoalTask-Bhh_sX7J.mjs +42 -0
  73. package/dist/Goals-BMFrqSmc.mjs +79 -0
  74. package/dist/Goals-CPiQ13bO.mjs +70 -0
  75. package/dist/Growth-Ck1OiXeO.mjs +85 -0
  76. package/dist/Hamburger-BkqfmMmA.mjs +9 -0
  77. package/dist/Help-B2KqPPam.mjs +36 -0
  78. package/dist/HighFive-BYcQw328.mjs +33 -0
  79. package/dist/HighFive-Bi71jYQj.mjs +38 -0
  80. package/dist/Home-CHOKwBnN.mjs +21 -0
  81. package/dist/Home-DPyqkkoX.mjs +31 -0
  82. package/dist/HorizontalLine-DzBF5cf2.mjs +17 -0
  83. package/dist/Hourglass-sPcwiWfl.mjs +53 -0
  84. package/dist/Image-D-LHXhOl.mjs +41 -0
  85. package/dist/ImageFile-By-HPKcE.mjs +60 -0
  86. package/dist/InGoodCompany-CvfwTAMs.mjs +33 -0
  87. package/dist/Incentives-DnZQM_QS.mjs +155 -0
  88. package/dist/Info-CQnSKd8J.mjs +31 -0
  89. package/dist/Insights-BApP3QUO.mjs +20 -0
  90. package/dist/Insights-BivxsIhR.mjs +41 -0
  91. package/dist/Integrations-DUqcLKml.mjs +33 -0
  92. package/dist/KazooLogo-BVRhaQ-1.mjs +38 -0
  93. package/dist/KnowYourAudience-jvdpa8Co.mjs +91 -0
  94. package/dist/Launch-C5QbSdJn.mjs +83 -0
  95. package/dist/Link-CzMOWVHw.mjs +43 -0
  96. package/dist/LinkArrow-D7My064p.mjs +12 -0
  97. package/dist/Loading-C5wJAaZ-.mjs +6 -0
  98. package/dist/Lock-CrpqckDI.mjs +31 -0
  99. package/dist/Management-CfJCyzy8.mjs +87 -0
  100. package/dist/MeatballMenu-1RqUBn4Y.mjs +9 -0
  101. package/dist/MediaError-9_d5oB_T.mjs +40 -0
  102. package/dist/Messages-4waJxvel.mjs +221 -0
  103. package/dist/Microphone-8fk2NyjC.mjs +63 -0
  104. package/dist/Mobile-B7UDVCjR.mjs +31 -0
  105. package/dist/Nomination-DyVMjiwX.mjs +12 -0
  106. package/dist/NominationsAndAwards-DV8lxdIs.mjs +57 -0
  107. package/dist/Notification-DgAbq7ar.mjs +28 -0
  108. package/dist/Okrs-B5p8LEMY.mjs +55 -0
  109. package/dist/Pause-B7pDb0Ur.mjs +12 -0
  110. package/dist/PeerToPeer-EFRm2-Ns.mjs +64 -0
  111. package/dist/Pencil-6UZn-x0W.mjs +25 -0
  112. package/dist/People-DOYJOgS0.mjs +43 -0
  113. package/dist/PerformanceManagement-DavgifML.mjs +57 -0
  114. package/dist/Pin-C0KIHJ16.mjs +24 -0
  115. package/dist/PinnedIconAward-DUe5bm5u.mjs +20 -0
  116. package/dist/PinnedIconBrightIdea-BNdCStK9.mjs +20 -0
  117. package/dist/PinnedIconBullseye-DD7dZCoQ.mjs +36 -0
  118. package/dist/PinnedIconChampagne-HIJE7Yf3.mjs +20 -0
  119. package/dist/PinnedIconCheer-Pmd1imX0.mjs +20 -0
  120. package/dist/PinnedIconCrown-CPwPqzC4.mjs +20 -0
  121. package/dist/PinnedIconDiamond-D00JW81W.mjs +20 -0
  122. package/dist/PinnedIconHoleInOne-D6jh0Ane.mjs +20 -0
  123. package/dist/PinnedIconMedal-CEc_ezUs.mjs +20 -0
  124. package/dist/PinnedIconMetrics-CDU1uqhK.mjs +20 -0
  125. package/dist/PinnedIconPin-CSCDM0mw.mjs +20 -0
  126. package/dist/PinnedIconRockAndRoll-CQxSgO5d.mjs +23 -0
  127. package/dist/PinnedIconRocket-B1tXrzTg.mjs +20 -0
  128. package/dist/PinnedIconStrength-CVyMBzjV.mjs +20 -0
  129. package/dist/PinnedIconTeddyBear-C1YYmDoh.mjs +20 -0
  130. package/dist/PlatformLogo-0AOI2Cr9.mjs +57 -0
  131. package/dist/Plus-Dgh_a2E8.mjs +19 -0
  132. package/dist/Popper-DAaZXie8.mjs +1118 -0
  133. package/dist/PrivateEye-BUgV7GQk.mjs +127 -0
  134. package/dist/PrivatePushPin-C4ph6ZhF.mjs +33 -0
  135. package/dist/Processing-DOgV5nVT.mjs +80 -0
  136. package/dist/Productivity-BZuPAu6h.mjs +41 -0
  137. package/dist/ProgressCircle-C1bIKxWu.mjs +12 -0
  138. package/dist/PulseSurvey-YW8pgO3g.mjs +48 -0
  139. package/dist/PushPin-C0Vt7Qgz.mjs +18 -0
  140. package/dist/QuotesLeft-BrcaBZPo.mjs +18 -0
  141. package/dist/QuotesRight-VYMthud9.mjs +18 -0
  142. package/dist/Recognition-BLb29jsR.mjs +38 -0
  143. package/dist/Recognition-BlojPoTY.mjs +76 -0
  144. package/dist/Retention-D04eGyj2.mjs +47 -0
  145. package/dist/Rewards-BQ_4-Xnm.mjs +67 -0
  146. package/dist/Rewards-Cbm9UlJN.mjs +54 -0
  147. package/dist/RewardsCatalog-6bMpoD6s.mjs +49 -0
  148. package/dist/Roadmap-DK7G7m1M.mjs +122 -0
  149. package/dist/Search-BL5oOF1V.mjs +14 -0
  150. package/dist/Security-C7DgqkmM.mjs +33 -0
  151. package/dist/SendRecognition-CXWoOD5B.mjs +5 -0
  152. package/dist/ShareLink-DsdD7S2M.mjs +27 -0
  153. package/dist/SidebarCollapse-BycFfuBy.mjs +48 -0
  154. package/dist/Skill-C9DRN5_x.mjs +23 -0
  155. package/dist/Skills-Bf7uNero.mjs +68 -0
  156. package/dist/Smiley-C0W0nvQw.mjs +84 -0
  157. package/dist/Stop-B6-Rv84N.mjs +178 -0
  158. package/dist/Survey-B1ICwGfc.mjs +59 -0
  159. package/dist/Surveys-BygAscLB.mjs +54 -0
  160. package/dist/SyncUps-DNmrE_No.mjs +30 -0
  161. package/dist/Syncs-BCJtdDyW.mjs +29 -0
  162. package/dist/TalentReview-Bsf5rU5C.mjs +88 -0
  163. package/dist/TalentReview-Du4M8y3m.mjs +33 -0
  164. package/dist/TalentReviewInsights-p0rYC_2I.mjs +100 -0
  165. package/dist/TaskCompleted-DhURRWUZ.mjs +97 -0
  166. package/dist/Team-Rs8iU_vt.mjs +63 -0
  167. package/dist/Teams-BrkkrHW9.mjs +80 -0
  168. package/dist/TextBold-CgZBuifH.mjs +71 -0
  169. package/dist/TextBulletList-B6e_IEP-.mjs +128 -0
  170. package/dist/TextInput-B8AOwiHn.mjs +121 -0
  171. package/dist/TextItalic-C9jJChss.mjs +71 -0
  172. package/dist/TextNumberList-BfahObnv.mjs +147 -0
  173. package/dist/TextUnderline-n9b1v8UJ.mjs +90 -0
  174. package/dist/ThumbsDown-ZkPlc2MC.mjs +46 -0
  175. package/dist/ThumbsUp-C5EEURtj.mjs +46 -0
  176. package/dist/Toggle-CZuD0uCq.mjs +76 -0
  177. package/dist/Translate-DcOpGRTB.mjs +98 -0
  178. package/dist/Trash-CRdG3IYb.mjs +44 -0
  179. package/dist/TrendDown-CB3cl_u7.mjs +5 -0
  180. package/dist/TrendUp-D_f6etsq.mjs +5 -0
  181. package/dist/Undo-BfRfs2YI.mjs +41 -0
  182. package/dist/Unplugged-qrnvAmIJ.mjs +201 -0
  183. package/dist/UpDownCaret-CdoiwMWU.mjs +12 -0
  184. package/dist/VerifiedCheckmark-2saHRxh6.mjs +20 -0
  185. package/dist/VerticalLine-XjlxBP9Z.mjs +50 -0
  186. package/dist/Warning-B8864P6W.mjs +37 -0
  187. package/dist/WarningNoOutline-llm3ebvI.mjs +41 -0
  188. package/dist/YesAnd-DLEvdXw9.mjs +31 -0
  189. package/dist/ai-assistant.css +1 -0
  190. package/dist/emoji-CJuSGYZk.mjs +2310 -0
  191. package/dist/express.js +10936 -0
  192. package/dist/html2canvas.esm-DgdJBc_o.mjs +4871 -0
  193. package/dist/index-BEKNcH9V.mjs +721 -0
  194. package/dist/react-apexcharts.min-DLm6NZyI.mjs +11326 -0
  195. package/dist/react.es.js +15 -0
  196. package/dist/react.umd.js +1691 -0
  197. package/dist/reactComponent-CGfCiP84.mjs +44091 -0
  198. package/express.d.ts +88 -1
  199. package/express.js +4 -1
  200. package/generated/apiHooks.tsx +5644 -0
  201. package/generated/sdk.ts +5119 -0
  202. package/generated/stitchedSdk.ts +1174 -0
  203. package/package.json +46 -21
  204. package/react.d.ts +215 -0
  205. package/react.js +4 -1
  206. package/sharedTypes.ts +386 -0
package/express.d.ts CHANGED
@@ -1 +1,88 @@
1
- export { setupAiAssistantRoutes } from "./src/backend/express";
1
+ import type { RequestHandler, Request, Application } from "express";
2
+
3
+ export * from "./backendTypes";
4
+
5
+ export function setupAiAssistantRoutes(args: {
6
+ app: Application;
7
+ /**
8
+ * A function that returns the bearer token for the AI assistant to use for
9
+ * back-channel request proxying. This should be a JWT token that can be
10
+ * decoded on the `kazoo-web` application to authenticate the request.
11
+ */
12
+ getBearerToken: (
13
+ headers: Record<string, undefined | string | string[]>
14
+ ) => Promise<string>;
15
+ /**
16
+ * The host of the application to proxy requests to.
17
+ */
18
+ targetHost: string;
19
+ /**
20
+ * The port of the application to proxy requests to. Defaults to 80.
21
+ */
22
+ targetPort?: number;
23
+ /**
24
+ * The protocol of the application to proxy requests to. Defaults to "http".
25
+ */
26
+ targetProtocol?: string;
27
+ /**
28
+ * Whether to follow redirects. Defaults to true.
29
+ */
30
+ followRedirects?: boolean;
31
+ /**
32
+ * The route path to the local service's AI assistant. Defaults to
33
+ * "/ai-assistant".
34
+ */
35
+ route?: string;
36
+ /**
37
+ * The logger to use for logging.
38
+ */
39
+ logger?: Pick<typeof console, "log" | "error" | "debug">;
40
+ /**
41
+ * Middleware functions to run before the proxy request.
42
+ */
43
+ preflightMiddlewares?: RequestHandler[];
44
+ /**
45
+ * A function that should return the target path for the proxy request, based
46
+ * on the incoming full path. The path returned will be appended to the
47
+ * target host and port to form the final URL.
48
+ *
49
+ * @example
50
+ * ```ts
51
+ * getTargetPath: (fullPath) => {
52
+ * return fullPath;
53
+ * }
54
+ * ```
55
+ */
56
+ getTargetPath: (fullPath: string) => string;
57
+ /**
58
+ * Optional callbacks to invoke after successful REST endpoint responses.
59
+ * Only invoked when the response status is 200.
60
+ *
61
+ * @example
62
+ * ```ts
63
+ * onRestEndpointSuccess: {
64
+ * '/api/api-ai-assistant/v1/chat': async ({ request, response }) => {
65
+ * console.log('Chat complete:', response);
66
+ * },
67
+ * }
68
+ * ```
69
+ */
70
+ onRestEndpointSuccess?: import("./backendTypes").RestEndpointCallbacks;
71
+ /**
72
+ * Optional callbacks to invoke after successful GraphQL operation responses.
73
+ * Only invoked when the response status is 200 and the operation name matches.
74
+ * Keys should match the GraphQL operation names (e.g., "AppendMessageToConversation").
75
+ *
76
+ * @example
77
+ * ```ts
78
+ * onGraphQLOperationSuccess: {
79
+ * AppendMessageToConversation: async ({ request, response }) => {
80
+ * const conversationId = response.data?.appendMessage?.conversation?.id;
81
+ * console.log('Message appended to conversation:', conversationId);
82
+ * // Store conversation ID, update UI, etc.
83
+ * },
84
+ * }
85
+ * ```
86
+ */
87
+ onGraphQLOperationSuccess?: import("./backendTypes").GraphQLOperationCallbacks;
88
+ }): void;
package/express.js CHANGED
@@ -1 +1,4 @@
1
- require("./dist/express.js");
1
+ // istanbul ignore file - for public bundles only
2
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
3
+ // @ts-ignore
4
+ module.exports = require("./dist/express.js");