@zoom/cobrowsesdk 2.7.1 → 2.8.1

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@zoom/cobrowsesdk",
3
- "version": "2.7.1",
3
+ "version": "2.8.1",
4
4
  "description": "ZOOM Cobrowse sdk",
5
5
  "files": [
6
6
  "esm",
@@ -732,6 +732,70 @@ declare function customer_transferred(payload: {
732
732
  */
733
733
  version: string;
734
734
  }): void;
735
+ declare function remote_assist_accepted(payload: {
736
+ /**
737
+ * Assistance type array. Only supports ['scroll_page'].
738
+ */
739
+ assistType: [
740
+ "scroll_page"
741
+ ];
742
+ /**
743
+ * Session ID.
744
+ */
745
+ sessionId: string;
746
+ /**
747
+ * SDK version.
748
+ */
749
+ version: string;
750
+ }): void;
751
+ declare function remote_assist_rejected(payload: {
752
+ /**
753
+ * Assistance type array. Only supports ['scroll_page'].
754
+ */
755
+ assistType: [
756
+ "scroll_page"
757
+ ];
758
+ /**
759
+ * Session ID.
760
+ */
761
+ sessionId: string;
762
+ /**
763
+ * SDK version.
764
+ */
765
+ version: string;
766
+ }): void;
767
+ declare function remote_assist_started(payload: {
768
+ /**
769
+ * Assistance type array. Only supports ['scroll_page'].
770
+ */
771
+ assistType: [
772
+ "scroll_page"
773
+ ];
774
+ /**
775
+ * Session ID.
776
+ */
777
+ sessionId: string;
778
+ /**
779
+ * SDK version.
780
+ */
781
+ version: string;
782
+ }): void;
783
+ declare function remote_assist_stopped(payload: {
784
+ /**
785
+ * Assistance type array. Only supports ['scroll_page'].
786
+ */
787
+ assistType: [
788
+ "scroll_page"
789
+ ];
790
+ /**
791
+ * Session ID.
792
+ */
793
+ sessionId: string;
794
+ /**
795
+ * SDK version.
796
+ */
797
+ version: string;
798
+ }): void;
735
799
  declare function session_ended(payload: {
736
800
  /**
737
801
  * reason
@@ -835,6 +899,22 @@ declare namespace Session {
835
899
  * ```
836
900
  */
837
901
  function getSessionInfo(): SessionInfo | null;
902
+ /**
903
+ * @description Start remote assistance.
904
+ * @example
905
+ * ```
906
+ * session.startRemoteAssist();
907
+ * ```
908
+ */
909
+ function startRemoteAssist(): void;
910
+ /**
911
+ * @description Stop remote assistance
912
+ * @example
913
+ * ```
914
+ * session.stopRemoteAssist();
915
+ * ```
916
+ */
917
+ function stopRemoteAssist(): void;
838
918
  /**
839
919
  * @param event Session ended.
840
920
  * @param listener Details in {@link session_ended}.
@@ -865,6 +945,26 @@ declare namespace Session {
865
945
  * @param listener Details in {@link customer_transferred}.
866
946
  */
867
947
  function on(event: "customer_transferred", listener: typeof customer_transferred): void;
948
+ /**
949
+ * @param event Remote assist accepted.
950
+ * @param listener Details in {@link remote_assist_accepted}.
951
+ */
952
+ function on(event: "remote_assist_accepted", listener: typeof remote_assist_accepted): void;
953
+ /**
954
+ * @param event Remote assist rejected.
955
+ * @param listener Details in {@link remote_assist_rejected}.
956
+ */
957
+ function on(event: "remote_assist_rejected", listener: typeof remote_assist_rejected): void;
958
+ /**
959
+ * @param event Remote assist started.
960
+ * @param listener Details in {@link remote_assist_started}.
961
+ */
962
+ function on(event: "remote_assist_started", listener: typeof remote_assist_started): void;
963
+ /**
964
+ * @param event Remote assist stopped.
965
+ * @param listener Details in {@link remote_assist_stopped}.
966
+ */
967
+ function on(event: "remote_assist_stopped", listener: typeof remote_assist_stopped): void;
868
968
  }
869
969
  /**
870
970
  * @description ZoomAgentCobrowseSDK createAgentViewerEndpoint Callback.
package/types/agent.d.ts CHANGED
@@ -732,6 +732,70 @@ declare function customer_transferred(payload: {
732
732
  */
733
733
  version: string;
734
734
  }): void;
735
+ declare function remote_assist_accepted(payload: {
736
+ /**
737
+ * Assistance type array. Only supports ['scroll_page'].
738
+ */
739
+ assistType: [
740
+ "scroll_page"
741
+ ];
742
+ /**
743
+ * Session ID.
744
+ */
745
+ sessionId: string;
746
+ /**
747
+ * SDK version.
748
+ */
749
+ version: string;
750
+ }): void;
751
+ declare function remote_assist_rejected(payload: {
752
+ /**
753
+ * Assistance type array. Only supports ['scroll_page'].
754
+ */
755
+ assistType: [
756
+ "scroll_page"
757
+ ];
758
+ /**
759
+ * Session ID.
760
+ */
761
+ sessionId: string;
762
+ /**
763
+ * SDK version.
764
+ */
765
+ version: string;
766
+ }): void;
767
+ declare function remote_assist_started(payload: {
768
+ /**
769
+ * Assistance type array. Only supports ['scroll_page'].
770
+ */
771
+ assistType: [
772
+ "scroll_page"
773
+ ];
774
+ /**
775
+ * Session ID.
776
+ */
777
+ sessionId: string;
778
+ /**
779
+ * SDK version.
780
+ */
781
+ version: string;
782
+ }): void;
783
+ declare function remote_assist_stopped(payload: {
784
+ /**
785
+ * Assistance type array. Only supports ['scroll_page'].
786
+ */
787
+ assistType: [
788
+ "scroll_page"
789
+ ];
790
+ /**
791
+ * Session ID.
792
+ */
793
+ sessionId: string;
794
+ /**
795
+ * SDK version.
796
+ */
797
+ version: string;
798
+ }): void;
735
799
  declare function session_ended(payload: {
736
800
  /**
737
801
  * reason
@@ -829,6 +893,22 @@ declare namespace Session {
829
893
  * ```
830
894
  */
831
895
  function getSessionInfo(): SessionInfo | null;
896
+ /**
897
+ * @description Start remote assistance.
898
+ * @example
899
+ * ```
900
+ * session.startRemoteAssist();
901
+ * ```
902
+ */
903
+ function startRemoteAssist(): void;
904
+ /**
905
+ * @description Stop remote assistance
906
+ * @example
907
+ * ```
908
+ * session.stopRemoteAssist();
909
+ * ```
910
+ */
911
+ function stopRemoteAssist(): void;
832
912
  /**
833
913
  * @param event Session ended.
834
914
  * @param listener Details in {@link session_ended}.
@@ -859,6 +939,26 @@ declare namespace Session {
859
939
  * @param listener Details in {@link customer_transferred}.
860
940
  */
861
941
  function on(event: "customer_transferred", listener: typeof customer_transferred): void;
942
+ /**
943
+ * @param event Remote assist accepted.
944
+ * @param listener Details in {@link remote_assist_accepted}.
945
+ */
946
+ function on(event: "remote_assist_accepted", listener: typeof remote_assist_accepted): void;
947
+ /**
948
+ * @param event Remote assist rejected.
949
+ * @param listener Details in {@link remote_assist_rejected}.
950
+ */
951
+ function on(event: "remote_assist_rejected", listener: typeof remote_assist_rejected): void;
952
+ /**
953
+ * @param event Remote assist started.
954
+ * @param listener Details in {@link remote_assist_started}.
955
+ */
956
+ function on(event: "remote_assist_started", listener: typeof remote_assist_started): void;
957
+ /**
958
+ * @param event Remote assist stopped.
959
+ * @param listener Details in {@link remote_assist_stopped}.
960
+ */
961
+ function on(event: "remote_assist_stopped", listener: typeof remote_assist_stopped): void;
862
962
  }
863
963
  /**
864
964
  * @description ZoomAgentCobrowseSDK createAgentViewerEndpoint Callback.
@@ -493,13 +493,23 @@ declare enum EndReason {
493
493
  declare enum InitError {
494
494
  UNKNOWN = "unknown"
495
495
  }
496
+ declare enum RemoteAssistUserRole {
497
+ /**
498
+ * Customer role
499
+ */
500
+ CUSTOMER = "1",
501
+ /**
502
+ * Agent role
503
+ */
504
+ AGENT = "2"
505
+ }
496
506
  declare enum SessionErrorCode {
497
507
  /**
498
508
  * @description Start session failed.
499
509
  */
500
510
  SESSION_START_FAILED = 1001,
501
511
  /**
502
- * @description There is already a session in progress.
512
+ * @description Session is connecting.
503
513
  */
504
514
  SESSION_CONNECTING_IN_PROGRESS = 1002,
505
515
  /**
@@ -527,7 +537,7 @@ declare enum SessionErrorCode {
527
537
  */
528
538
  NETWORK_ERROR = 1016,
529
539
  /**
530
- * @description There is already a session in progress.
540
+ * @description Session is canceling.
531
541
  */
532
542
  SESSION_CANCELING_IN_PROGRESS = 1017,
533
543
  /**
@@ -659,6 +669,78 @@ declare function pincode_updated(payload: {
659
669
  */
660
670
  version: string;
661
671
  }): void;
672
+ declare function remote_assist_cancelled(payload: {
673
+ /**
674
+ * Assistance type array. Only supports ['scroll_page'].
675
+ */
676
+ assistType: [
677
+ "scroll_page"
678
+ ];
679
+ /**
680
+ * Session ID.
681
+ */
682
+ sessionId: string;
683
+ /**
684
+ * SDK version.
685
+ */
686
+ version: string;
687
+ }): void;
688
+ declare function remote_assist_requested(payload: {
689
+ /**
690
+ * Assistance type array. Only supports ['scroll_page'].
691
+ */
692
+ assistType: [
693
+ "scroll_page"
694
+ ];
695
+ /**
696
+ * Session ID.
697
+ */
698
+ sessionId: string;
699
+ /**
700
+ * User info.
701
+ */
702
+ user: {
703
+ id: string;
704
+ name: string;
705
+ role: RemoteAssistUserRole; // '1':CUSTOMER '2':AGENT
706
+ };
707
+ /**
708
+ * SDK version.
709
+ */
710
+ version: string;
711
+ }): void;
712
+ declare function remote_assist_started(payload: {
713
+ /**
714
+ * Assistance type array. Only supports ['scroll_page'].
715
+ */
716
+ assistType: [
717
+ "scroll_page"
718
+ ];
719
+ /**
720
+ * Session ID.
721
+ */
722
+ sessionId: string;
723
+ /**
724
+ * SDK version.
725
+ */
726
+ version: string;
727
+ }): void;
728
+ declare function remote_assist_stopped(payload: {
729
+ /**
730
+ * Assistance type array. Only supports ['scroll_page'].
731
+ */
732
+ assistType: [
733
+ "scroll_page"
734
+ ];
735
+ /**
736
+ * Session ID.
737
+ */
738
+ sessionId: string;
739
+ /**
740
+ * SDK version.
741
+ */
742
+ version: string;
743
+ }): void;
662
744
  declare function session_ended(payload: {
663
745
  /**
664
746
  * Reason.
@@ -746,6 +828,14 @@ declare namespace Session {
746
828
  * ```
747
829
  */
748
830
  function getSessionInfo(): SessionInfo | null;
831
+ /**
832
+ * @description Stop remote assistance.
833
+ * @example
834
+ * ```
835
+ * session.stopRemoteAssist();
836
+ * ```
837
+ */
838
+ function stopRemoteAssist(): void;
749
839
  /**
750
840
  * @param event Session started
751
841
  * @param listener Details in {@link session_started}.
@@ -791,6 +881,26 @@ declare namespace Session {
791
881
  * @param listener Details in {@link current_user_transfer}.
792
882
  */
793
883
  function on(event: "current_user_transfer", listener: typeof current_user_transfer): void;
884
+ /**
885
+ * @param event Remote assist requested
886
+ * @param listener Details in {@link remote_assist_requested}.
887
+ */
888
+ function on(event: "remote_assist_requested", listener: typeof remote_assist_requested): void;
889
+ /**
890
+ * @param event Remote assist cancelled
891
+ * @param listener Details in {@link remote_assist_cancelled}.
892
+ */
893
+ function on(event: "remote_assist_cancelled", listener: typeof remote_assist_cancelled): void;
894
+ /**
895
+ * @param event Remote assist started
896
+ * @param listener Details in {@link remote_assist_started}.
897
+ */
898
+ function on(event: "remote_assist_started", listener: typeof remote_assist_started): void;
899
+ /**
900
+ * @param event Remote assist stopped
901
+ * @param listener Details in {@link remote_assist_stopped}.
902
+ */
903
+ function on(event: "remote_assist_stopped", listener: typeof remote_assist_stopped): void;
794
904
  }
795
905
  /**
796
906
  * @description
@@ -955,6 +1065,10 @@ export type Settings = {
955
1065
  * @description Whether to enable customer consent, the default is true.
956
1066
  */
957
1067
  enableCustomerConsent?: boolean;
1068
+ /**
1069
+ * @description Whether to enable secondary confirmation, the default is false.
1070
+ */
1071
+ requireStopConfirmation?: boolean;
958
1072
  /**
959
1073
  * @description Remote assist type, currently only support 'scroll_page', the default is 'scroll_page'.
960
1074
  */
@@ -963,7 +1077,7 @@ export type Settings = {
963
1077
  /**
964
1078
  * @description Session continuation config.
965
1079
  */
966
- allowSessionContinuation?: {
1080
+ multiTabSessionPersistence?: {
967
1081
  /**
968
1082
  * @description Whether to enable session continuation, the default is false.
969
1083
  */
@@ -493,13 +493,23 @@ declare enum EndReason {
493
493
  declare enum InitError {
494
494
  UNKNOWN = "unknown"
495
495
  }
496
+ declare enum RemoteAssistUserRole {
497
+ /**
498
+ * Customer role
499
+ */
500
+ CUSTOMER = "1",
501
+ /**
502
+ * Agent role
503
+ */
504
+ AGENT = "2"
505
+ }
496
506
  declare enum SessionErrorCode {
497
507
  /**
498
508
  * @description Start session failed.
499
509
  */
500
510
  SESSION_START_FAILED = 1001,
501
511
  /**
502
- * @description There is already a session in progress.
512
+ * @description Session is connecting.
503
513
  */
504
514
  SESSION_CONNECTING_IN_PROGRESS = 1002,
505
515
  /**
@@ -527,7 +537,7 @@ declare enum SessionErrorCode {
527
537
  */
528
538
  NETWORK_ERROR = 1016,
529
539
  /**
530
- * @description There is already a session in progress.
540
+ * @description Session is canceling.
531
541
  */
532
542
  SESSION_CANCELING_IN_PROGRESS = 1017,
533
543
  /**
@@ -659,6 +669,78 @@ declare function pincode_updated(payload: {
659
669
  */
660
670
  version: string;
661
671
  }): void;
672
+ declare function remote_assist_cancelled(payload: {
673
+ /**
674
+ * Assistance type array. Only supports ['scroll_page'].
675
+ */
676
+ assistType: [
677
+ "scroll_page"
678
+ ];
679
+ /**
680
+ * Session ID.
681
+ */
682
+ sessionId: string;
683
+ /**
684
+ * SDK version.
685
+ */
686
+ version: string;
687
+ }): void;
688
+ declare function remote_assist_requested(payload: {
689
+ /**
690
+ * Assistance type array. Only supports ['scroll_page'].
691
+ */
692
+ assistType: [
693
+ "scroll_page"
694
+ ];
695
+ /**
696
+ * Session ID.
697
+ */
698
+ sessionId: string;
699
+ /**
700
+ * User info.
701
+ */
702
+ user: {
703
+ id: string;
704
+ name: string;
705
+ role: RemoteAssistUserRole; // '1':CUSTOMER '2':AGENT
706
+ };
707
+ /**
708
+ * SDK version.
709
+ */
710
+ version: string;
711
+ }): void;
712
+ declare function remote_assist_started(payload: {
713
+ /**
714
+ * Assistance type array. Only supports ['scroll_page'].
715
+ */
716
+ assistType: [
717
+ "scroll_page"
718
+ ];
719
+ /**
720
+ * Session ID.
721
+ */
722
+ sessionId: string;
723
+ /**
724
+ * SDK version.
725
+ */
726
+ version: string;
727
+ }): void;
728
+ declare function remote_assist_stopped(payload: {
729
+ /**
730
+ * Assistance type array. Only supports ['scroll_page'].
731
+ */
732
+ assistType: [
733
+ "scroll_page"
734
+ ];
735
+ /**
736
+ * Session ID.
737
+ */
738
+ sessionId: string;
739
+ /**
740
+ * SDK version.
741
+ */
742
+ version: string;
743
+ }): void;
662
744
  declare function session_ended(payload: {
663
745
  /**
664
746
  * Reason.
@@ -740,6 +822,14 @@ declare namespace Session {
740
822
  * ```
741
823
  */
742
824
  function getSessionInfo(): SessionInfo | null;
825
+ /**
826
+ * @description Stop remote assistance.
827
+ * @example
828
+ * ```
829
+ * session.stopRemoteAssist();
830
+ * ```
831
+ */
832
+ function stopRemoteAssist(): void;
743
833
  /**
744
834
  * @param event Session started
745
835
  * @param listener Details in {@link session_started}.
@@ -785,6 +875,26 @@ declare namespace Session {
785
875
  * @param listener Details in {@link current_user_transfer}.
786
876
  */
787
877
  function on(event: "current_user_transfer", listener: typeof current_user_transfer): void;
878
+ /**
879
+ * @param event Remote assist requested
880
+ * @param listener Details in {@link remote_assist_requested}.
881
+ */
882
+ function on(event: "remote_assist_requested", listener: typeof remote_assist_requested): void;
883
+ /**
884
+ * @param event Remote assist cancelled
885
+ * @param listener Details in {@link remote_assist_cancelled}.
886
+ */
887
+ function on(event: "remote_assist_cancelled", listener: typeof remote_assist_cancelled): void;
888
+ /**
889
+ * @param event Remote assist started
890
+ * @param listener Details in {@link remote_assist_started}.
891
+ */
892
+ function on(event: "remote_assist_started", listener: typeof remote_assist_started): void;
893
+ /**
894
+ * @param event Remote assist stopped
895
+ * @param listener Details in {@link remote_assist_stopped}.
896
+ */
897
+ function on(event: "remote_assist_stopped", listener: typeof remote_assist_stopped): void;
788
898
  }
789
899
  /**
790
900
  * @description
@@ -949,6 +1059,10 @@ export type Settings = {
949
1059
  * @description Whether to enable customer consent, the default is true.
950
1060
  */
951
1061
  enableCustomerConsent?: boolean;
1062
+ /**
1063
+ * @description Whether to enable secondary confirmation, the default is false.
1064
+ */
1065
+ requireStopConfirmation?: boolean;
952
1066
  /**
953
1067
  * @description Remote assist type, currently only support 'scroll_page', the default is 'scroll_page'.
954
1068
  */
@@ -957,7 +1071,7 @@ export type Settings = {
957
1071
  /**
958
1072
  * @description Session continuation config.
959
1073
  */
960
- allowSessionContinuation?: {
1074
+ multiTabSessionPersistence?: {
961
1075
  /**
962
1076
  * @description Whether to enable session continuation, the default is false.
963
1077
  */