@bcrumbs.net/inbox 0.0.44 → 0.0.49

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 (31) hide show
  1. package/assets/ar/inbox.json +2 -1
  2. package/assets/en/inbox.json +2 -1
  3. package/index.cjs.js +7345 -1015
  4. package/index.esm.js +7346 -1016
  5. package/package.json +3 -3
  6. package/src/app/ai/components/CrumbySettings/CrumbySettingsLoader.d.ts +5 -0
  7. package/src/app/ai/pages/CrumbySettings.d.ts +2 -0
  8. package/src/app/ai/types/index.d.ts +1 -1
  9. package/src/app/billing/hooks/useTurnstile.d.ts +1 -1
  10. package/src/app/broadcast/components/BroadcastDetailsSection.d.ts +1 -2
  11. package/src/app/contact/components/ContactFilterOptions.d.ts +5 -3
  12. package/src/app/contact/components/ImportProgressDialog.d.ts +4 -1
  13. package/src/app/contact/hooks/useExportClients.d.ts +12 -0
  14. package/src/app/contact/pages/contact/ContactHeader.d.ts +2 -1
  15. package/src/app/generic/components/BCTurnstile.d.ts +47 -0
  16. package/src/app/{broadcast → generic}/components/MessagePreview.d.ts +4 -1
  17. package/src/app/generic/components/PreviewHeaderImage.d.ts +4 -0
  18. package/src/app/generic/components/TemplateParameterInputs.d.ts +1 -2
  19. package/src/app/generic/components/ToggleSetting.d.ts +9 -0
  20. package/src/app/inbox/components/NewDetails/TagsSelector.d.ts +4 -1
  21. package/src/app/inbox/hooks/useConversationsPerodicFetch.d.ts +1 -0
  22. package/src/app/layout/constants/subMenu.d.ts +12 -2
  23. package/src/app/resources/components/Integrations/Telegram/index.d.ts +4 -0
  24. package/src/app/resources/hooks/useFBPagesHook.d.ts +1 -0
  25. package/src/app/resources/hooks/useInstagramHook.d.ts +1 -0
  26. package/src/app/resources/hooks/useWabaHook.d.ts +1 -0
  27. package/src/assets/locales/translations.d.ts +44 -0
  28. package/src/config/constants.d.ts +1 -1
  29. package/src/graphql.autogenerated.d.ts +1923 -1500
  30. package/src/lib/inbox.d.ts +1 -0
  31. package/src/app/broadcast/components/BroadcastSectionCard.d.ts +0 -14
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bcrumbs.net/inbox",
3
3
  "description": "Inbox widget for Bread Crumbs portals",
4
- "version": "0.0.44",
4
+ "version": "0.0.49",
5
5
  "keyword": [
6
6
  "bcrumbs",
7
7
  "bc-ui",
@@ -25,8 +25,8 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "@bcrumbs.net/bc-shared": "^0.0.8",
28
- "@bcrumbs.net/bc-ui": "^0.0.11",
29
- "@bcrumbs.net/bc-api": "^0.0.45",
28
+ "@bcrumbs.net/bc-ui": "^0.0.12",
29
+ "@bcrumbs.net/bc-api": "^0.0.46",
30
30
  "@azure/storage-blob": "^12.25.0"
31
31
  },
32
32
  "module": "./index.esm.js",
@@ -0,0 +1,5 @@
1
+ interface CrumbySettingsLoaderProps {
2
+ rowCount?: number;
3
+ }
4
+ declare const CrumbySettingsLoader: ({ rowCount }: CrumbySettingsLoaderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
5
+ export default CrumbySettingsLoader;
@@ -0,0 +1,2 @@
1
+ declare const CrumbySettings: () => import("@emotion/react/jsx-runtime").JSX.Element;
2
+ export default CrumbySettings;
@@ -43,7 +43,7 @@ export interface SourcesSummary {
43
43
  size: number;
44
44
  };
45
45
  }
46
- export type SupportedFileType = 'PDF' | 'DOCX' | 'TXT' | 'MD' | 'CSV' | 'JSON' | 'XML';
46
+ export type SupportedFileType = 'TXT' | 'MD' | 'JSON' | 'HTML';
47
47
  export interface FileValidationResult {
48
48
  isValid: boolean;
49
49
  error?: string;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { BCTurnstileRef } from '@bcrumbs.net/bc-ui';
2
+ import { BCTurnstileRef } from '../../generic/components/BCTurnstile';
3
3
  export interface UseTurnstileResult {
4
4
  /** The current turnstile token, or null if not verified */
5
5
  token: string | null;
@@ -10,7 +10,6 @@ interface BroadcastDetailsSectionProps {
10
10
  onParameterChange: (key: string, value: string) => void;
11
11
  loadingTemplateDetails?: boolean;
12
12
  requiredParameters?: string[];
13
- components?: any[];
14
13
  }
15
- declare const _default: React.MemoExoticComponent<({ renderField, renderDroplistField, templatesData, loadingTemplates, integrationsData, loadingIntegrations, parameterValues, onParameterChange, loadingTemplateDetails, requiredParameters, components, }: BroadcastDetailsSectionProps) => import("@emotion/react/jsx-runtime").JSX.Element>;
14
+ declare const _default: React.MemoExoticComponent<({ renderField, renderDroplistField, templatesData, loadingTemplates, integrationsData, loadingIntegrations, parameterValues, onParameterChange, loadingTemplateDetails, requiredParameters, }: BroadcastDetailsSectionProps) => import("@emotion/react/jsx-runtime").JSX.Element>;
16
15
  export default _default;
@@ -3,10 +3,12 @@ interface FilterOptionsProps {
3
3
  selectedTags: string[];
4
4
  setSelectedStageId: (stageId: string | undefined) => void;
5
5
  selectedStageId: string | undefined;
6
+ setSelectedAgentId: (agentId: string | undefined) => void;
7
+ selectedAgentId: string | undefined;
6
8
  setFilterIsOpen: (isOpen: boolean) => void;
7
9
  onApplyFilters?: () => void;
8
- selectedStatus: 'active' | 'archived';
9
- setSelectedStatus: (status: 'active' | 'archived') => void;
10
+ hasAppliedFilters?: boolean;
11
+ onClearFilters?: () => void;
10
12
  }
11
- declare const FilterOptions: ({ setSelectedTags, selectedTags, setSelectedStageId, selectedStageId, setFilterIsOpen, onApplyFilters, selectedStatus, setSelectedStatus, }: FilterOptionsProps) => import("@emotion/react/jsx-runtime").JSX.Element;
13
+ declare const FilterOptions: ({ setSelectedTags, selectedTags, setSelectedStageId, selectedStageId, setSelectedAgentId, selectedAgentId, setFilterIsOpen, onApplyFilters, hasAppliedFilters, onClearFilters, }: FilterOptionsProps) => import("@emotion/react/jsx-runtime").JSX.Element;
12
14
  export default FilterOptions;
@@ -5,6 +5,9 @@ type ImportProgressDialogProps = {
5
5
  status: JobStatus;
6
6
  onClose: () => void;
7
7
  rtl: boolean;
8
+ title?: string;
9
+ completedTitle?: string;
10
+ failedTitle?: string;
8
11
  };
9
- declare const ImportProgressDialog: ({ isOpen, progress, status, onClose, rtl }: ImportProgressDialogProps) => import("@emotion/react/jsx-runtime").JSX.Element;
12
+ declare const ImportProgressDialog: ({ isOpen, progress, status, onClose, rtl, title, completedTitle, failedTitle, }: ImportProgressDialogProps) => import("@emotion/react/jsx-runtime").JSX.Element;
10
13
  export default ImportProgressDialog;
@@ -0,0 +1,12 @@
1
+ type ExportStatus = 'idle' | 'exporting' | 'completed' | 'failed';
2
+ export interface UseExportClientsResult {
3
+ startExport: () => void;
4
+ cancelExport: () => void;
5
+ exportProgress: number;
6
+ exportStatus: ExportStatus;
7
+ isExporting: boolean;
8
+ progressDialogOpen: boolean;
9
+ closeProgressDialog: () => void;
10
+ }
11
+ export declare const useExportClients: () => UseExportClientsResult;
12
+ export {};
@@ -1,6 +1,7 @@
1
1
  type ContactHeaderProps = {
2
2
  onAddContact: () => void;
3
3
  onImportSuccess?: () => void;
4
+ totalCount?: number;
4
5
  };
5
- declare const ContactHeader: ({ onAddContact, onImportSuccess }: ContactHeaderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
6
+ declare const ContactHeader: ({ onAddContact, onImportSuccess, totalCount }: ContactHeaderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
6
7
  export default ContactHeader;
@@ -0,0 +1,47 @@
1
+ /// <reference types="react" />
2
+ export type TurnstileTheme = 'light' | 'dark' | 'auto';
3
+ export type TurnstileSize = 'normal' | 'compact';
4
+ export interface BCTurnstileProps {
5
+ /** Cloudflare Turnstile site key */
6
+ siteKey: string;
7
+ /** Callback when verification succeeds */
8
+ onSuccess?: (token: string) => void;
9
+ /** Callback when verification fails */
10
+ onError?: (error?: string) => void;
11
+ /** Callback when token expires */
12
+ onExpire?: () => void;
13
+ /** Widget theme */
14
+ theme?: TurnstileTheme;
15
+ /** Widget size */
16
+ size?: TurnstileSize;
17
+ /** Additional class name */
18
+ className?: string;
19
+ /** Action identifier for analytics */
20
+ action?: string;
21
+ }
22
+ export interface BCTurnstileRef {
23
+ /** Reset the widget */
24
+ reset: () => void;
25
+ /** Get the current response token */
26
+ getResponse: () => string | undefined;
27
+ /** Execute the challenge (for invisible mode) */
28
+ execute: () => void;
29
+ }
30
+ /**
31
+ * BCTurnstile - Cloudflare Turnstile CAPTCHA component
32
+ *
33
+ * Usage:
34
+ * ```tsx
35
+ * const turnstileRef = useRef<BCTurnstileRef>(null);
36
+ * const [token, setToken] = useState<string | null>(null);
37
+ *
38
+ * <BCTurnstile
39
+ * ref={turnstileRef}
40
+ * siteKey="your-site-key"
41
+ * onSuccess={(token) => setToken(token)}
42
+ * onError={() => setToken(null)}
43
+ * />
44
+ * ```
45
+ */
46
+ export declare const BCTurnstile: import("react").ForwardRefExoticComponent<BCTurnstileProps & import("react").RefAttributes<BCTurnstileRef>>;
47
+ export default BCTurnstile;
@@ -1,8 +1,11 @@
1
1
  import React from 'react';
2
2
  interface MessageComponent {
3
3
  type: 'HEADER' | 'BODY' | 'BUTTONS' | 'FOOTER';
4
- format?: 'TEXT';
4
+ format?: 'TEXT' | 'IMAGE' | string;
5
5
  text?: string;
6
+ example?: {
7
+ header_handle?: string[];
8
+ };
6
9
  buttons?: Array<{
7
10
  type: string;
8
11
  text: string;
@@ -0,0 +1,4 @@
1
+ declare const PreviewHeaderImage: ({ src }: {
2
+ src: string;
3
+ }) => import("@emotion/react/jsx-runtime").JSX.Element | null;
4
+ export default PreviewHeaderImage;
@@ -4,7 +4,6 @@ interface TemplateParameterInputsProps {
4
4
  parameterValues: Record<string, string>;
5
5
  onParameterChange: (key: string, value: string) => void;
6
6
  loading?: boolean;
7
- components?: any[];
8
7
  }
9
- declare const _default: React.MemoExoticComponent<({ parameters, parameterValues, onParameterChange, loading, components, }: TemplateParameterInputsProps) => import("@emotion/react/jsx-runtime").JSX.Element>;
8
+ declare const _default: React.MemoExoticComponent<({ parameters, parameterValues, onParameterChange, loading, }: TemplateParameterInputsProps) => import("@emotion/react/jsx-runtime").JSX.Element>;
10
9
  export default _default;
@@ -0,0 +1,9 @@
1
+ interface ToggleSettingProps {
2
+ label: string;
3
+ checked: boolean;
4
+ onCheckedChange: (checked: boolean) => void;
5
+ description?: string;
6
+ disabled?: boolean;
7
+ }
8
+ declare const ToggleSetting: ({ label, checked, onCheckedChange, description, disabled }: ToggleSettingProps) => import("@emotion/react/jsx-runtime").JSX.Element;
9
+ export default ToggleSetting;
@@ -10,6 +10,9 @@ interface TagsSelectorProps {
10
10
  type: TagType;
11
11
  refetchTags: () => void;
12
12
  convEnded?: boolean;
13
+ usePortal?: boolean;
14
+ keepOpenOnSelect?: boolean;
15
+ loading?: boolean;
13
16
  }
14
- declare const TagsSelector: ({ handleTagSelect, availableTags, rtl, contactsTagsLoading, addedTags, handleTagRemove, type, refetchTags, convEnded, }: TagsSelectorProps) => import("@emotion/react/jsx-runtime").JSX.Element;
17
+ declare const TagsSelector: ({ handleTagSelect, availableTags, rtl, contactsTagsLoading, addedTags, handleTagRemove, type, refetchTags, convEnded, usePortal, keepOpenOnSelect, loading, }: TagsSelectorProps) => import("@emotion/react/jsx-runtime").JSX.Element;
15
18
  export default TagsSelector;
@@ -30,6 +30,7 @@ declare function useConversationsPeriodicFetch(selectedConvId?: string, onSelect
30
30
  isAgent: boolean;
31
31
  agentId?: string | null | undefined;
32
32
  status?: import("../../../graphql.autogenerated").MessageStatus | null | undefined;
33
+ failedReason?: string | null | undefined;
33
34
  externalMessageId?: string | null | undefined;
34
35
  tags?: string[] | null | undefined;
35
36
  createdAt: any;
@@ -1,12 +1,22 @@
1
- export declare const ManagementSubmenu: {
1
+ export declare const ManagementSubmenu: ({
2
2
  title: string;
3
+ hide: boolean;
3
4
  items: {
4
5
  label: string;
5
6
  icon: import("@emotion/react/jsx-runtime").JSX.Element;
6
7
  link: string;
7
8
  action: string;
8
9
  }[];
9
- }[];
10
+ } | {
11
+ title: string;
12
+ items: {
13
+ label: string;
14
+ link: string;
15
+ icon: import("@emotion/react/jsx-runtime").JSX.Element;
16
+ action: string;
17
+ }[];
18
+ hide?: undefined;
19
+ })[];
10
20
  export declare const ContactSubmenu: {
11
21
  items: {
12
22
  label: string;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { IntegrationWithSecrets } from '../../../../../graphql.autogenerated';
3
+ import { IntegrationFlowComponentProps } from '../types';
4
+ export declare const Telegram: React.FC<IntegrationFlowComponentProps<IntegrationWithSecrets>>;
@@ -9,5 +9,6 @@ export interface FBPage {
9
9
  }
10
10
  declare function useFBPagesHook(scope: string): {
11
11
  login: (onResult: (fbUserAccessToken: string, pages: FBPage[]) => void) => void;
12
+ error: string | null;
12
13
  };
13
14
  export default useFBPagesHook;
@@ -1,5 +1,6 @@
1
1
  declare function useInstagramHook(): {
2
2
  login: (name: string) => void;
3
3
  code: string | undefined;
4
+ error: string | null;
4
5
  };
5
6
  export default useInstagramHook;
@@ -8,5 +8,6 @@ declare function useWabaHook(): {
8
8
  phoneId: undefined;
9
9
  wabaId: undefined;
10
10
  accessToken: undefined;
11
+ error: string | null;
11
12
  };
12
13
  export default useWabaHook;
@@ -326,6 +326,7 @@ export declare const convertLanguageJsonToObject: (json: any, objToConvertTo?: C
326
326
  emptyMessagePreviewTitle: string;
327
327
  emptyMessagePreviewSubtitle: string;
328
328
  templateSelection: string;
329
+ messageParameters: string;
329
330
  analysis: {
330
331
  deliveryRate: string;
331
332
  successfullyDelivered: string;
@@ -369,6 +370,7 @@ export declare const convertLanguageJsonToObject: (json: any, objToConvertTo?: C
369
370
  client: string;
370
371
  aiType: string;
371
372
  integrationName: string;
373
+ identifier: string;
372
374
  integrationStartWith: string;
373
375
  startWith_AI: string;
374
376
  startWith_AGENT: string;
@@ -401,6 +403,11 @@ export declare const convertLanguageJsonToObject: (json: any, objToConvertTo?: C
401
403
  FB_integration_cancelled: string;
402
404
  INSTA_integration_cancelled: string;
403
405
  WABA_integration_cancelled: string;
406
+ TELEGRAM_integration_cancelled: string;
407
+ telegramBotSetup: string;
408
+ telegramBotTokenDescription: string;
409
+ telegramBotTokenPlaceholder: string;
410
+ connect: string;
404
411
  creationSuccessfulMessage: string;
405
412
  loading: string;
406
413
  modify: string;
@@ -442,6 +449,7 @@ export declare const convertLanguageJsonToObject: (json: any, objToConvertTo?: C
442
449
  webhook: string;
443
450
  url: string;
444
451
  event: string;
452
+ anyEvent: string;
445
453
  incomingMessage: string;
446
454
  outgoingMessage: string;
447
455
  endingConv: string;
@@ -556,6 +564,9 @@ export declare const convertLanguageJsonToObject: (json: any, objToConvertTo?: C
556
564
  bodyParameter: string;
557
565
  messagePreviewContactSubtitle: string;
558
566
  messagePreviewDateLabel: string;
567
+ messageParameterPlaceholder: string;
568
+ unarchive: string;
569
+ headerImageURL: string;
559
570
  pwa: {
560
571
  installApp: string;
561
572
  addAppToHomeScreen: string;
@@ -593,6 +604,7 @@ export declare const convertLanguageJsonToObject: (json: any, objToConvertTo?: C
593
604
  from: string;
594
605
  to: string;
595
606
  apply: string;
607
+ clearFilters: string;
596
608
  namePlaceholder: string;
597
609
  surnamePlaceholder: string;
598
610
  emailPlaceholder: string;
@@ -626,6 +638,14 @@ export declare const convertLanguageJsonToObject: (json: any, objToConvertTo?: C
626
638
  of: string;
627
639
  moreErrors: string;
628
640
  contactDeleteTitle: string;
641
+ contactArchiveTitle: string;
642
+ contactUnarchiveTitle: string;
643
+ unarchive: string;
644
+ exportingClients: string;
645
+ exportCompleted: string;
646
+ exportFailed: string;
647
+ noContactsToExport: string;
648
+ selectedLifecycle: string;
629
649
  };
630
650
  management: {
631
651
  title: string;
@@ -650,6 +670,8 @@ export declare const convertLanguageJsonToObject: (json: any, objToConvertTo?: C
650
670
  endConvTimeNote: string;
651
671
  optOutKeyword: string;
652
672
  optOutKeywordNote: string;
673
+ autoUnarchiveOnMessage: string;
674
+ autoUnarchiveOnMessageNote: string;
653
675
  saved: string;
654
676
  durations: {
655
677
  "8_hours": string;
@@ -740,6 +762,7 @@ export declare const convertLanguageJsonToObject: (json: any, objToConvertTo?: C
740
762
  prompts: string;
741
763
  test_numbers: string;
742
764
  suggested_qs: string;
765
+ crumby_settings: string;
743
766
  playground: {
744
767
  welcomeMessage: string;
745
768
  askTheAIToAnalyzeYourData: string;
@@ -793,6 +816,25 @@ export declare const convertLanguageJsonToObject: (json: any, objToConvertTo?: C
793
816
  deleteConfirmTitle: string;
794
817
  deleteConfirmMessage: string;
795
818
  };
819
+ settings: {
820
+ title: string;
821
+ description: string;
822
+ cardTitle: string;
823
+ operationalRulesTitle: string;
824
+ askForName: string;
825
+ askForSurname: string;
826
+ askForEmail: string;
827
+ askForAddress: string;
828
+ askForCity: string;
829
+ askForNameDescription: string;
830
+ askForSurnameDescription: string;
831
+ askForEmailDescription: string;
832
+ askForAddressDescription: string;
833
+ askForCityDescription: string;
834
+ handoverEnabled: string;
835
+ handoverEnabledDescription: string;
836
+ saved: string;
837
+ };
796
838
  };
797
839
  files: {
798
840
  noData: string;
@@ -816,5 +858,7 @@ export declare const convertLanguageJsonToObject: (json: any, objToConvertTo?: C
816
858
  file_one: string;
817
859
  file_other: string;
818
860
  delete_confirmation: string;
861
+ archive_confirmation: string;
862
+ unarchive_confirmation: string;
819
863
  };
820
864
  }>, current?: string) => void;
@@ -4,7 +4,7 @@ export declare const BLUR_CONTAINER = "root";
4
4
  export declare const LOADING_COLOR = Color.PRIMARY;
5
5
  export declare const FavIcon16 = "/assets/icons/favicons/favicon-16x16.png";
6
6
  export declare const FavIcon32 = "/assets/icons/favicons/favicon-32x32.png";
7
- export declare const HELPDESK_URL = "https://bcrumbs.featurebase.app/help";
7
+ export declare const HELPDESK_URL = "https://docs.bcrumbs.net/";
8
8
  export declare const CHANGELOG_URL = "https://bcrumbs.featurebase.app/changelog";
9
9
  export declare const FEEDBACK_URL = "https://bcrumbs.featurebase.app/";
10
10
  export declare const ROADMAP_URL = "https://bcrumbs.featurebase.app/roadmap";