@bcrumbs.net/inbox 0.0.48 → 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.
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.48",
4
+ "version": "0.0.49",
5
5
  "keyword": [
6
6
  "bcrumbs",
7
7
  "bc-ui",
@@ -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;
@@ -2,7 +2,8 @@ interface ToggleSettingProps {
2
2
  label: string;
3
3
  checked: boolean;
4
4
  onCheckedChange: (checked: boolean) => void;
5
+ description?: string;
5
6
  disabled?: boolean;
6
7
  }
7
- declare const ToggleSetting: ({ label, checked, onCheckedChange, disabled, }: ToggleSettingProps) => import("@emotion/react/jsx-runtime").JSX.Element;
8
+ declare const ToggleSetting: ({ label, checked, onCheckedChange, description, disabled }: ToggleSettingProps) => import("@emotion/react/jsx-runtime").JSX.Element;
8
9
  export default ToggleSetting;
@@ -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;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { TFunction } from "i18next";
3
2
  import { Row, Action } from "@bcrumbs.net/bc-ui";
4
3
  import { ResourceDefinition } from "../../config";
@@ -449,6 +449,7 @@ export declare const convertLanguageJsonToObject: (json: any, objToConvertTo?: C
449
449
  webhook: string;
450
450
  url: string;
451
451
  event: string;
452
+ anyEvent: string;
452
453
  incomingMessage: string;
453
454
  outgoingMessage: string;
454
455
  endingConv: string;
@@ -818,11 +819,20 @@ export declare const convertLanguageJsonToObject: (json: any, objToConvertTo?: C
818
819
  settings: {
819
820
  title: string;
820
821
  description: string;
822
+ cardTitle: string;
823
+ operationalRulesTitle: string;
821
824
  askForName: string;
822
825
  askForSurname: string;
823
826
  askForEmail: string;
824
827
  askForAddress: string;
825
828
  askForCity: string;
829
+ askForNameDescription: string;
830
+ askForSurnameDescription: string;
831
+ askForEmailDescription: string;
832
+ askForAddressDescription: string;
833
+ askForCityDescription: string;
834
+ handoverEnabled: string;
835
+ handoverEnabledDescription: string;
826
836
  saved: string;
827
837
  };
828
838
  };
@@ -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";
@@ -115,6 +115,7 @@ export type AiPatchInput = {
115
115
  export declare const AiType: {
116
116
  readonly BC_AI: "bc_ai";
117
117
  readonly BC_FLOW: "bc_flow";
118
+ readonly CUSTOM: "custom";
118
119
  readonly OPENAI: "openai";
119
120
  readonly PINECONE: "pinecone";
120
121
  };
@@ -849,6 +850,9 @@ export type Configurations = {
849
850
  askForEmail?: Maybe<Scalars['Boolean']['output']>;
850
851
  askForName?: Maybe<Scalars['Boolean']['output']>;
851
852
  askForSurname?: Maybe<Scalars['Boolean']['output']>;
853
+ clientTagRules?: Maybe<Array<TagRule>>;
854
+ convTagRules?: Maybe<Array<TagRule>>;
855
+ handoverEnabled?: Maybe<Scalars['Boolean']['output']>;
852
856
  };
853
857
  export type ConfigurationsInput = {
854
858
  askForAddress?: InputMaybe<Scalars['Boolean']['input']>;
@@ -856,6 +860,9 @@ export type ConfigurationsInput = {
856
860
  askForEmail?: InputMaybe<Scalars['Boolean']['input']>;
857
861
  askForName?: InputMaybe<Scalars['Boolean']['input']>;
858
862
  askForSurname?: InputMaybe<Scalars['Boolean']['input']>;
863
+ clientTagRules?: InputMaybe<Array<TagRuleInput>>;
864
+ convTagRules?: InputMaybe<Array<TagRuleInput>>;
865
+ handoverEnabled?: InputMaybe<Scalars['Boolean']['input']>;
859
866
  };
860
867
  /** Contact Message payload type represent the schema of content in case of contact message. */
861
868
  export type ContactMessagePayload = {
@@ -935,6 +942,12 @@ export type ConvEndInput = {
935
942
  integrationId: Scalars['ID']['input'];
936
943
  workspaceId: Scalars['Int']['input'];
937
944
  };
945
+ /** ConvHandoverInput is an input of the conversation handover mutation. */
946
+ export type ConvHandoverInput = {
947
+ /** The id of the conversation. */
948
+ convId: Scalars['ID']['input'];
949
+ workspaceId: Scalars['Int']['input'];
950
+ };
938
951
  /** ConvLastMessageInput is an input for getting the last message of an open conversation. */
939
952
  export type ConvLastMessageInput = {
940
953
  /** The id of the conversation. */
@@ -1271,6 +1284,7 @@ export type IntegrationPatchInput = {
1271
1284
  };
1272
1285
  export type IntegrationProperties = {
1273
1286
  __typename?: 'IntegrationProperties';
1287
+ endpoint?: Maybe<Scalars['String']['output']>;
1274
1288
  model?: Maybe<Scalars['String']['output']>;
1275
1289
  version?: Maybe<Scalars['String']['output']>;
1276
1290
  };
@@ -1294,9 +1308,11 @@ export type IntegrationState = typeof IntegrationState[keyof typeof IntegrationS
1294
1308
  * - FACEBOOK: Facebook integration.
1295
1309
  * - INSTAGRAM: Instagram integration.
1296
1310
  * - TELEGRAM: Telegram integration.
1311
+ * - CUSTOM: Custom integration.
1297
1312
  */
1298
1313
  export declare const IntegrationType: {
1299
1314
  readonly BCWEBCHAT: "BCWEBCHAT";
1315
+ readonly CUSTOM: "CUSTOM";
1300
1316
  readonly FACEBOOK: "FACEBOOK";
1301
1317
  readonly INSTAGRAM: "INSTAGRAM";
1302
1318
  readonly TELEGRAM: "TELEGRAM";
@@ -1670,6 +1686,8 @@ export type Mutation = {
1670
1686
  endConv: Conversation;
1671
1687
  /** Generate an API key. You should have the MANAGE_WORKSPACE permission to generate an API key. */
1672
1688
  genApiKey: ApiKey;
1689
+ /** Handover a conversation to an agent using AUTO assignment strategy. */
1690
+ handoverConv: Conversation;
1673
1691
  /** Required after the creation of a workspace to take ownership on it */
1674
1692
  initWorkspace: UserRole;
1675
1693
  /** Launch a broadcast. You should have the MANAGE_CONVS permission to launch a broadcast. */
@@ -1813,6 +1831,9 @@ export type MutationEndConvArgs = {
1813
1831
  export type MutationGenApiKeyArgs = {
1814
1832
  input: ApiKeyGenInput;
1815
1833
  };
1834
+ export type MutationHandoverConvArgs = {
1835
+ input: ConvHandoverInput;
1836
+ };
1816
1837
  export type MutationInitWorkspaceArgs = {
1817
1838
  input: InputInitWorkspace;
1818
1839
  };
@@ -2298,6 +2319,15 @@ export type TagDeleteInput = {
2298
2319
  id: Scalars['ID']['input'];
2299
2320
  workspaceId: Scalars['Int']['input'];
2300
2321
  };
2322
+ export type TagRule = {
2323
+ __typename?: 'TagRule';
2324
+ rule: Scalars['String']['output'];
2325
+ tag: Scalars['String']['output'];
2326
+ };
2327
+ export type TagRuleInput = {
2328
+ rule: Scalars['String']['input'];
2329
+ tag: Scalars['String']['input'];
2330
+ };
2301
2331
  export declare const TagType: {
2302
2332
  readonly CLIENT: "client";
2303
2333
  readonly CLIENTSTAGE: "clientStage";
@@ -2440,11 +2470,16 @@ export type WabaMessageTemplatesInput = {
2440
2470
  };
2441
2471
  export type Webhook = {
2442
2472
  __typename?: 'Webhook';
2473
+ /** The created at date of the webhook. */
2443
2474
  createdAt: Scalars['DateTime']['output'];
2475
+ /** The event that will trigger the webhook. */
2444
2476
  event: WebhookEvent;
2477
+ /** The headers of the webhook, the headers will be sent to the webhook. */
2445
2478
  headers?: Maybe<Scalars['JSON']['output']>;
2446
2479
  id: Scalars['ID']['output'];
2480
+ /** The label of the webhook, a special field that is used to identify the webhook. */
2447
2481
  label: Scalars['String']['output'];
2482
+ /** The URL of the webhook, the webhook will be called when the event is triggered. */
2448
2483
  url: Scalars['String']['output'];
2449
2484
  workspaceId: Scalars['Int']['output'];
2450
2485
  };
@@ -2460,11 +2495,19 @@ export type WebhookDeleteInput = {
2460
2495
  workspaceId: Scalars['Int']['input'];
2461
2496
  };
2462
2497
  export declare const WebhookEvent: {
2498
+ /** ANY_EVENT is a special option that will trigger the webhook for all events. */
2499
+ readonly ANY_EVENT: "ANY_EVENT";
2500
+ /** CLIENT_UPDATED is a special event that will trigger the webhook for client updates. */
2463
2501
  readonly CLIENT_UPDATED: "CLIENT_UPDATED";
2502
+ /** ENDING_CONV is a special event that will trigger the webhook for ending conversations. */
2464
2503
  readonly ENDING_CONV: "ENDING_CONV";
2504
+ /** INCOMING_MESSAGE is a special event that will trigger the webhook for incoming messages. */
2465
2505
  readonly INCOMING_MESSAGE: "INCOMING_MESSAGE";
2506
+ /** NEW_CLIENT is a special event that will trigger the webhook for new clients. */
2466
2507
  readonly NEW_CLIENT: "NEW_CLIENT";
2508
+ /** NEW_CONV is a special event that will trigger the webhook for new conversations. */
2467
2509
  readonly NEW_CONV: "NEW_CONV";
2510
+ /** OUTGOING_MESSAGE is a special event that will trigger the webhook for outgoing messages. */
2468
2511
  readonly OUTGOING_MESSAGE: "OUTGOING_MESSAGE";
2469
2512
  };
2470
2513
  export type WebhookEvent = typeof WebhookEvent[keyof typeof WebhookEvent];
@@ -3514,6 +3557,67 @@ export type EndConvMutation = {
3514
3557
  } | null> | null;
3515
3558
  };
3516
3559
  };
3560
+ export type HandoverConvMutationVariables = Exact<{
3561
+ input: ConvHandoverInput;
3562
+ }>;
3563
+ export type HandoverConvMutation = {
3564
+ __typename?: 'Mutation';
3565
+ handoverConv: {
3566
+ __typename?: 'Conversation';
3567
+ workspaceId: number;
3568
+ id: string;
3569
+ integrationId: string;
3570
+ integrationType: IntegrationType;
3571
+ clientId: string;
3572
+ ended: boolean;
3573
+ endedBy?: string | null;
3574
+ externalConversationId?: string | null;
3575
+ tags?: Array<string> | null;
3576
+ createdAt: any;
3577
+ endedAt?: any | null;
3578
+ stageId?: string | null;
3579
+ orderNo?: string | null;
3580
+ assigneeId?: string | null;
3581
+ aiId?: string | null;
3582
+ aiAssigneed?: boolean | null;
3583
+ broadcastId?: string | null;
3584
+ broadcastName?: string | null;
3585
+ messages?: Array<{
3586
+ __typename?: 'Message';
3587
+ messageId: string;
3588
+ content: string;
3589
+ type: MessageType;
3590
+ noteType?: NoteType | null;
3591
+ isAgent: boolean;
3592
+ agentId?: string | null;
3593
+ status?: MessageStatus | null;
3594
+ failedReason?: string | null;
3595
+ externalMessageId?: string | null;
3596
+ tags?: Array<string> | null;
3597
+ createdAt: any;
3598
+ context?: {
3599
+ __typename?: 'MessageContext';
3600
+ replyToId?: string | null;
3601
+ replyToContent: string;
3602
+ replyToType: MessageType;
3603
+ } | null;
3604
+ }> | null;
3605
+ client?: {
3606
+ __typename?: 'ConversationClient';
3607
+ name?: string | null;
3608
+ surname?: string | null;
3609
+ code?: string | null;
3610
+ phone?: string | null;
3611
+ isDeleted: boolean;
3612
+ } | null;
3613
+ assignees?: Array<{
3614
+ __typename?: 'ConvAssignment';
3615
+ assigneeId: string;
3616
+ assignDate?: any | null;
3617
+ isAi?: boolean | null;
3618
+ } | null> | null;
3619
+ };
3620
+ };
3517
3621
  export type LaunchBroadcastMutationVariables = Exact<{
3518
3622
  input: BroadcastLaunchInput;
3519
3623
  }>;
@@ -4346,6 +4450,17 @@ export type AiFragment = {
4346
4450
  askForEmail?: boolean | null;
4347
4451
  askForCity?: boolean | null;
4348
4452
  askForAddress?: boolean | null;
4453
+ handoverEnabled?: boolean | null;
4454
+ clientTagRules?: Array<{
4455
+ __typename?: 'TagRule';
4456
+ tag: string;
4457
+ rule: string;
4458
+ }> | null;
4459
+ convTagRules?: Array<{
4460
+ __typename?: 'TagRule';
4461
+ tag: string;
4462
+ rule: string;
4463
+ }> | null;
4349
4464
  } | null;
4350
4465
  };
4351
4466
  export type ApiKeyFragment = {
@@ -4403,6 +4518,17 @@ export type AiQuery = {
4403
4518
  askForEmail?: boolean | null;
4404
4519
  askForCity?: boolean | null;
4405
4520
  askForAddress?: boolean | null;
4521
+ handoverEnabled?: boolean | null;
4522
+ clientTagRules?: Array<{
4523
+ __typename?: 'TagRule';
4524
+ tag: string;
4525
+ rule: string;
4526
+ }> | null;
4527
+ convTagRules?: Array<{
4528
+ __typename?: 'TagRule';
4529
+ tag: string;
4530
+ rule: string;
4531
+ }> | null;
4406
4532
  } | null;
4407
4533
  };
4408
4534
  };
@@ -4433,6 +4559,17 @@ export type AisQuery = {
4433
4559
  askForEmail?: boolean | null;
4434
4560
  askForCity?: boolean | null;
4435
4561
  askForAddress?: boolean | null;
4562
+ handoverEnabled?: boolean | null;
4563
+ clientTagRules?: Array<{
4564
+ __typename?: 'TagRule';
4565
+ tag: string;
4566
+ rule: string;
4567
+ }> | null;
4568
+ convTagRules?: Array<{
4569
+ __typename?: 'TagRule';
4570
+ tag: string;
4571
+ rule: string;
4572
+ }> | null;
4436
4573
  } | null;
4437
4574
  }> | null;
4438
4575
  };
@@ -4486,6 +4623,17 @@ export type CreateAiMutation = {
4486
4623
  askForEmail?: boolean | null;
4487
4624
  askForCity?: boolean | null;
4488
4625
  askForAddress?: boolean | null;
4626
+ handoverEnabled?: boolean | null;
4627
+ clientTagRules?: Array<{
4628
+ __typename?: 'TagRule';
4629
+ tag: string;
4630
+ rule: string;
4631
+ }> | null;
4632
+ convTagRules?: Array<{
4633
+ __typename?: 'TagRule';
4634
+ tag: string;
4635
+ rule: string;
4636
+ }> | null;
4489
4637
  } | null;
4490
4638
  };
4491
4639
  };
@@ -4561,6 +4709,17 @@ export type DeleteAiMutation = {
4561
4709
  askForEmail?: boolean | null;
4562
4710
  askForCity?: boolean | null;
4563
4711
  askForAddress?: boolean | null;
4712
+ handoverEnabled?: boolean | null;
4713
+ clientTagRules?: Array<{
4714
+ __typename?: 'TagRule';
4715
+ tag: string;
4716
+ rule: string;
4717
+ }> | null;
4718
+ convTagRules?: Array<{
4719
+ __typename?: 'TagRule';
4720
+ tag: string;
4721
+ rule: string;
4722
+ }> | null;
4564
4723
  } | null;
4565
4724
  };
4566
4725
  };
@@ -4705,6 +4864,17 @@ export type PatchAiMutation = {
4705
4864
  askForEmail?: boolean | null;
4706
4865
  askForCity?: boolean | null;
4707
4866
  askForAddress?: boolean | null;
4867
+ handoverEnabled?: boolean | null;
4868
+ clientTagRules?: Array<{
4869
+ __typename?: 'TagRule';
4870
+ tag: string;
4871
+ rule: string;
4872
+ }> | null;
4873
+ convTagRules?: Array<{
4874
+ __typename?: 'TagRule';
4875
+ tag: string;
4876
+ rule: string;
4877
+ }> | null;
4708
4878
  } | null;
4709
4879
  };
4710
4880
  };
@@ -5917,6 +6087,31 @@ export declare function useEndConvMutation(baseOptions?: Apollo.MutationHookOpti
5917
6087
  export type EndConvMutationHookResult = ReturnType<typeof useEndConvMutation>;
5918
6088
  export type EndConvMutationResult = Apollo.MutationResult<EndConvMutation>;
5919
6089
  export type EndConvMutationOptions = Apollo.BaseMutationOptions<EndConvMutation, EndConvMutationVariables>;
6090
+ export declare const HandoverConvDocument: Apollo.DocumentNode;
6091
+ export type HandoverConvMutationFn = Apollo.MutationFunction<HandoverConvMutation, HandoverConvMutationVariables>;
6092
+ /**
6093
+ * __useHandoverConvMutation__
6094
+ *
6095
+ * To run a mutation, you first call `useHandoverConvMutation` within a React component and pass it any options that fit your needs.
6096
+ * When your component renders, `useHandoverConvMutation` returns a tuple that includes:
6097
+ * - A mutate function that you can call at any time to execute the mutation
6098
+ * - An object with fields that represent the current status of the mutation's execution
6099
+ *
6100
+ * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
6101
+ *
6102
+ * @example
6103
+ * const [handoverConvMutation, { data, loading, error }] = useHandoverConvMutation({
6104
+ * variables: {
6105
+ * input: // value for 'input'
6106
+ * },
6107
+ * });
6108
+ */
6109
+ export declare function useHandoverConvMutation(baseOptions?: Apollo.MutationHookOptions<HandoverConvMutation, HandoverConvMutationVariables>): Apollo.MutationTuple<HandoverConvMutation, Exact<{
6110
+ input: ConvHandoverInput;
6111
+ }>, Apollo.DefaultContext, Apollo.ApolloCache<any>>;
6112
+ export type HandoverConvMutationHookResult = ReturnType<typeof useHandoverConvMutation>;
6113
+ export type HandoverConvMutationResult = Apollo.MutationResult<HandoverConvMutation>;
6114
+ export type HandoverConvMutationOptions = Apollo.BaseMutationOptions<HandoverConvMutation, HandoverConvMutationVariables>;
5920
6115
  export declare const LaunchBroadcastDocument: Apollo.DocumentNode;
5921
6116
  export type LaunchBroadcastMutationFn = Apollo.MutationFunction<LaunchBroadcastMutation, LaunchBroadcastMutationVariables>;
5922
6117
  /**
@@ -9,5 +9,6 @@ export type InboxProps = {
9
9
  initialFilters?: ConvsFilters;
10
10
  showDetails?: boolean;
11
11
  clientSectionPlaceholder?: React.ReactNode;
12
+ mobileBreakpoint?: number;
12
13
  };
13
14
  export declare const Inbox: React.FC<InboxProps>;
@@ -1,14 +0,0 @@
1
- import { SerializedStyles } from '@emotion/react';
2
- import React from 'react';
3
- interface BroadcastSectionCardProps {
4
- title?: string;
5
- subtitle?: string;
6
- columns?: number;
7
- containerCss?: SerializedStyles;
8
- titleCss?: SerializedStyles;
9
- subTitleCss?: SerializedStyles;
10
- noContentContainer?: boolean;
11
- children: React.ReactNode;
12
- }
13
- declare const _default: React.MemoExoticComponent<({ title, subtitle, columns, containerCss, titleCss, subTitleCss, noContentContainer, children, }: BroadcastSectionCardProps) => import("@emotion/react/jsx-runtime").JSX.Element>;
14
- export default _default;