@fayz-ai/plugin-conversations 0.9.0 → 0.9.2

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 (39) hide show
  1. package/README.md +4 -4
  2. package/dist/{ConversationsContext.d.ts → context.d.ts} +2 -2
  3. package/dist/context.d.ts.map +1 -0
  4. package/dist/index.d.ts +1 -1
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +2 -2
  7. package/dist/index.js.map +1 -1
  8. package/dist/{channel.d.ts → lib/channel.d.ts} +1 -1
  9. package/dist/lib/channel.d.ts.map +1 -0
  10. package/dist/{ConversationsPage.d.ts → views/ConversationsPage.d.ts} +2 -2
  11. package/dist/views/ConversationsPage.d.ts.map +1 -0
  12. package/package.json +5 -7
  13. package/dist/ConversationsContext.d.ts.map +0 -1
  14. package/dist/ConversationsPage.d.ts.map +0 -1
  15. package/dist/channel.d.ts.map +0 -1
  16. package/src/ConversationsContext.tsx +0 -51
  17. package/src/ConversationsPage.tsx +0 -21
  18. package/src/channel.ts +0 -34
  19. package/src/data/accents.ts +0 -12
  20. package/src/data/mock.test.ts +0 -90
  21. package/src/data/mock.ts +0 -261
  22. package/src/data/supabase.ts +0 -264
  23. package/src/data/tables.ts +0 -7
  24. package/src/data/types.ts +0 -17
  25. package/src/index.ts +0 -190
  26. package/src/locales/en.ts +0 -68
  27. package/src/locales/index.ts +0 -7
  28. package/src/locales/pt-BR.ts +0 -68
  29. package/src/migrations/001_conversations.sql +0 -74
  30. package/src/migrations/002_contact_person.sql +0 -22
  31. package/src/migrations/index.ts +0 -108
  32. package/src/store.ts +0 -136
  33. package/src/types.ts +0 -77
  34. package/src/views/ContactPanel.tsx +0 -97
  35. package/src/views/ConversationList.tsx +0 -135
  36. package/src/views/InboxView.tsx +0 -64
  37. package/src/views/MessageThread.tsx +0 -167
  38. package/src/views/NewConversationModal.tsx +0 -204
  39. package/src/views/shared.tsx +0 -97
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @fayz-ai/plugin-conversations
2
2
 
3
- > **Status: experimental (incubating).** Not capability-complete — missing some or all of the capability bar (data-provider contract w/ supabase+mock pair, entity registries, settings, migrations; see `docs/PLUGIN-PATTERNS.md`). Fine to explore in dogfoods; NOT ready for fresh installs or generated apps, and its API may change without notice.
3
+ > **Status: experimental (incubating).** Not capability-complete — missing some or all of the capability bar (data-provider contract w/ supabase+mock pair, entity registries, settings, migrations; see `docs/plugins/PLUGIN-PATTERNS.md`). Fine to explore in dogfoods; NOT ready for fresh installs or generated apps, and its API may change without notice.
4
4
 
5
5
  > One omni-channel inbox — SMS, WhatsApp, Instagram, email, and web chat in one thread.
6
6
 
@@ -23,11 +23,11 @@ This is foundational today. The plugin ships a complete inbox UI and a data-prov
23
23
  ```bash
24
24
  npm install @fayz-ai/plugin-conversations
25
25
  ```
26
- Peer deps: `@fayz-ai/core`, `@fayz-ai/ui`, `@fayz-ai/saas`, plus `react` / `react-dom`.
26
+ Peer deps: `@fayz-ai/core`, `@fayz-ai/ui`, `@fayz-ai/admin`, plus `react` / `react-dom`.
27
27
 
28
28
  ## Usage
29
29
  ```tsx
30
- import { defineSaas } from '@fayz-ai/saas'
30
+ import { defineSaas } from '@fayz-ai/admin'
31
31
  import { createConversationsPlugin } from '@fayz-ai/plugin-conversations'
32
32
 
33
33
  export const app = defineSaas({
@@ -43,4 +43,4 @@ With no Supabase client registered it runs on the mock inbox; register one and i
43
43
  The conversation layer of the engine. Pairs with `plugin-crm` (who you're talking to), `plugin-marketing` (broadcasts that start the thread), and `plugin-reputation` (turning a happy reply into a review).
44
44
 
45
45
  ## Roadmap & contributing
46
- Early and foundational — built in the open. See the [Fayz SDK roadmap](../../docs/ROADMAP.md#plugin-conversations) for current gaps, missing features, and good first issues.
46
+ Early and foundational — built in the open. See the [Fayz SDK roadmap](../../docs/platform/ROADMAP.md#plugin-conversations) for current gaps, missing features, and good first issues.
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { type StoreApi } from 'zustand';
3
- import type { EntityLookup } from '@fayz-ai/saas';
3
+ import type { EntityLookup } from '@fayz-ai/admin';
4
4
  import type { ConversationsUIState } from './store';
5
5
  /**
6
6
  * App-tunable knobs the inbox UI reads. Kept tiny on purpose: everything here
@@ -23,4 +23,4 @@ export declare function ConversationsContextProvider({ store, config, children,
23
23
  }): React.JSX.Element;
24
24
  export declare function useConversationsStore<T>(selector: (state: ConversationsUIState) => T): T;
25
25
  export declare function useConversationsConfig(): ResolvedConversationsConfig;
26
- //# sourceMappingURL=ConversationsContext.d.ts.map
26
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAY,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAA;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAClD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAEnD;;;;GAIG;AACH,MAAM,WAAW,2BAA2B;IAC1C,mEAAmE;IACnE,WAAW,EAAE,MAAM,CAAA;IACnB,gFAAgF;IAChF,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,8EAA8E;IAC9E,aAAa,CAAC,EAAE,YAAY,CAAA;CAC7B;AAED,eAAO,MAAM,4BAA4B,EAAE,2BAE1C,CAAA;AAKD,wBAAgB,4BAA4B,CAAC,EAC3C,KAAK,EACL,MAAqC,EACrC,QAAQ,GACT,EAAE;IACD,KAAK,EAAE,QAAQ,CAAC,oBAAoB,CAAC,CAAA;IACrC,MAAM,CAAC,EAAE,2BAA2B,CAAA;IACpC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B,qBAMA;AAED,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,CAAC,GAAG,CAAC,CAIxF;AAED,wBAAgB,sBAAsB,IAAI,2BAA2B,CAEpE"}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { PluginManifest, PluginScope, VerticalId } from '@fayz-ai/core';
2
- import type { EntityLookup } from '@fayz-ai/saas';
2
+ import type { EntityLookup } from '@fayz-ai/admin';
3
3
  import type { ConversationsProvider } from './data/types';
4
4
  export interface ConversationsPluginOptions {
5
5
  navPosition?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAE5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAGjD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAkBzD,MAAM,WAAW,0BAA0B;IACzC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,UAAU,CAAA;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,WAAW,CAAA;IACnB,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,YAAY,CAAC,EAAE,qBAAqB,CAAA;IAEpC;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;OAGG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,oFAAoF;IACpF,aAAa,CAAC,EAAE,YAAY,CAAA;CAC7B;AA2BD,wBAAgB,yBAAyB,CAAC,OAAO,CAAC,EAAE,0BAA0B,GAAG,cAAc,CA6G9F;AAED,YAAY,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AACzD,YAAY,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAA;AACtF,OAAO,EAAE,+BAA+B,EAAE,KAAK,uBAAuB,EAAE,MAAM,aAAa,CAAA;AAC3F,OAAO,EACL,mCAAmC,EACnC,KAAK,2BAA2B,GACjC,MAAM,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAE5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAGlD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAkBzD,MAAM,WAAW,0BAA0B;IACzC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,UAAU,CAAA;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,WAAW,CAAA;IACnB,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,YAAY,CAAC,EAAE,qBAAqB,CAAA;IAEpC;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;OAGG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,oFAAoF;IACpF,aAAa,CAAC,EAAE,YAAY,CAAA;CAC7B;AA2BD,wBAAgB,yBAAyB,CAAC,OAAO,CAAC,EAAE,0BAA0B,GAAG,cAAc,CA6G9F;AAED,YAAY,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AACzD,YAAY,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAA;AACtF,OAAO,EAAE,+BAA+B,EAAE,KAAK,uBAAuB,EAAE,MAAM,aAAa,CAAA;AAC3F,OAAO,EACL,mCAAmC,EACnC,KAAK,2BAA2B,GACjC,MAAM,iBAAiB,CAAA"}
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import { useStore } from 'zustand';
4
4
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
5
5
  import { MessageSquare, Plus, Search, Inbox, ChevronLeft, Clock, Archive, PanelRight, Send, X, User, MapPin, Tag, StickyNote, Link2, Globe, Mail, Instagram, Phone } from 'lucide-react';
6
6
  import { cn, Button, Input, Skeleton, Modal, ModalContent, toast } from '@fayz-ai/ui';
7
- import { PermissionGate, useLimitGuard, ContactPicker, invalidateLimit } from '@fayz-ai/saas';
7
+ import { PermissionGate, useLimitGuard, ContactPicker, invalidateLimit } from '@fayz-ai/admin';
8
8
  import { createStore } from 'zustand/vanilla';
9
9
 
10
10
  // src/index.ts
@@ -38,7 +38,7 @@ var CHANNEL_LABELS = {
38
38
  webchat: "Web Chat"
39
39
  };
40
40
 
41
- // src/channel.ts
41
+ // src/lib/channel.ts
42
42
  var CHANNEL_ICON = {
43
43
  sms: Phone,
44
44
  whatsapp: MessageSquare,