@webex/plugin-meetings 3.13.0-next.16 → 3.13.0-next.17

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 (89) hide show
  1. package/dist/aiEnableRequest/index.js +1 -1
  2. package/dist/breakouts/breakout.js +1 -1
  3. package/dist/breakouts/index.js +1 -1
  4. package/dist/common/events/typed-events-scope.js +135 -0
  5. package/dist/common/events/typed-events-scope.js.map +1 -0
  6. package/dist/common/types.js +7 -0
  7. package/dist/common/types.js.map +1 -0
  8. package/dist/config.js +1 -1
  9. package/dist/constants.js +5 -0
  10. package/dist/constants.js.map +1 -1
  11. package/dist/e2ee/E2eeController.js +581 -0
  12. package/dist/e2ee/E2eeController.js.map +1 -0
  13. package/dist/e2ee/E2eeManager.js +50 -31
  14. package/dist/e2ee/E2eeManager.js.map +1 -1
  15. package/dist/e2ee/E2eeSignaling.js +18 -21
  16. package/dist/e2ee/E2eeSignaling.js.map +1 -1
  17. package/dist/e2ee/MediaEncryptionService.js +2 -5
  18. package/dist/e2ee/MediaEncryptionService.js.map +1 -1
  19. package/dist/e2ee/constants.js +28 -0
  20. package/dist/e2ee/constants.js.map +1 -0
  21. package/dist/e2ee/mls.js +85 -67
  22. package/dist/e2ee/mls.js.map +1 -1
  23. package/dist/e2ee/types.js +52 -13
  24. package/dist/e2ee/types.js.map +1 -1
  25. package/dist/e2ee/wasm.d.js.map +1 -1
  26. package/dist/hashTree/hashTreeParser.js.map +1 -1
  27. package/dist/index.js.map +1 -1
  28. package/dist/interpretation/index.js +1 -1
  29. package/dist/interpretation/siLanguage.js +1 -1
  30. package/dist/meeting/index.js +394 -249
  31. package/dist/meeting/index.js.map +1 -1
  32. package/dist/meeting/request.js +69 -58
  33. package/dist/meeting/request.js.map +1 -1
  34. package/dist/meeting/util.js +4 -2
  35. package/dist/meeting/util.js.map +1 -1
  36. package/dist/meetings/index.js +87 -61
  37. package/dist/meetings/index.js.map +1 -1
  38. package/dist/meetings/util.js +10 -0
  39. package/dist/meetings/util.js.map +1 -1
  40. package/dist/metrics/constants.js +2 -1
  41. package/dist/metrics/constants.js.map +1 -1
  42. package/dist/types/common/events/typed-events-scope.d.ts +73 -0
  43. package/dist/types/common/types.d.ts +9 -0
  44. package/dist/types/constants.d.ts +5 -0
  45. package/dist/types/e2ee/E2eeController.d.ts +130 -0
  46. package/dist/types/e2ee/E2eeManager.d.ts +26 -6
  47. package/dist/types/e2ee/E2eeSignaling.d.ts +1 -7
  48. package/dist/types/e2ee/MediaEncryptionService.d.ts +1 -3
  49. package/dist/types/e2ee/constants.d.ts +12 -0
  50. package/dist/types/e2ee/mls.d.ts +16 -10
  51. package/dist/types/e2ee/types.d.ts +92 -35
  52. package/dist/types/hashTree/hashTreeParser.d.ts +1 -1
  53. package/dist/types/index.d.ts +1 -0
  54. package/dist/types/meeting/index.d.ts +34 -0
  55. package/dist/types/meeting/util.d.ts +1 -1
  56. package/dist/types/metrics/constants.d.ts +1 -0
  57. package/dist/webinar/index.js +1 -1
  58. package/package.json +21 -21
  59. package/src/common/events/typed-events-scope.ts +110 -0
  60. package/src/common/types.ts +10 -0
  61. package/src/constants.ts +6 -0
  62. package/src/e2ee/DESIGN.md +363 -0
  63. package/src/e2ee/E2eeController.ts +487 -0
  64. package/src/e2ee/E2eeManager.ts +48 -27
  65. package/src/e2ee/E2eeSignaling.ts +13 -28
  66. package/src/e2ee/MediaEncryptionService.ts +2 -4
  67. package/src/e2ee/constants.ts +34 -0
  68. package/src/e2ee/mls.ts +62 -32
  69. package/src/e2ee/types.ts +99 -34
  70. package/src/e2ee/wasm.d.ts +18 -14
  71. package/src/hashTree/hashTreeParser.ts +1 -1
  72. package/src/index.ts +1 -0
  73. package/src/meeting/index.ts +155 -0
  74. package/src/meeting/request.ts +16 -0
  75. package/src/meeting/util.ts +2 -1
  76. package/src/meetings/index.ts +30 -5
  77. package/src/meetings/util.ts +8 -0
  78. package/src/metrics/constants.ts +1 -0
  79. package/test/unit/spec/common/events/typed-events-scope.ts +88 -0
  80. package/test/unit/spec/e2ee/E2eeController.ts +662 -0
  81. package/test/unit/spec/e2ee/E2eeManager.ts +53 -29
  82. package/test/unit/spec/e2ee/E2eeSignaling.ts +19 -10
  83. package/test/unit/spec/e2ee/mls.ts +84 -32
  84. package/test/unit/spec/meeting/index.js +662 -0
  85. package/test/unit/spec/meeting/request.js +35 -0
  86. package/test/unit/spec/meeting/utils.js +4 -0
  87. package/test/unit/spec/meetings/index.js +36 -1
  88. package/test/unit/spec/meetings/utils.js +15 -0
  89. package/test/utils/webex-config.js +1 -0
@@ -1,11 +1,81 @@
1
1
  /*!
2
2
  * Copyright (c) 2015-2026 Cisco Systems, Inc. See LICENSE file.
3
3
  */
4
+ import type { IdentityCredentials, IdentityTrustAnchors } from '@webex/internal-plugin-identity';
5
+ import type LLMChannel from '@webex/internal-plugin-llm';
6
+ import { EVENT_TRIGGERS, type Enum } from '../constants';
7
+ import type { LocusDTO } from '../locus-info/types';
8
+ import type Members from '../members';
9
+ /** The Locus DTO fields consumed by E2EE, matching the shape exposed by `Meeting.locusInfo`. */
10
+ export type E2eeLocusInfo = Pick<LocusDTO, 'url' | 'info'>;
11
+ /** Per-meeting context supplied by Meetings without exposing its Meeting class to E2EE. */
12
+ export interface E2eeMeetingContext {
13
+ getCorrelationId(): string;
14
+ getLocusInfo(): E2eeLocusInfo | undefined;
15
+ getLlmChannel(): LLMChannel | undefined;
16
+ members: Members;
17
+ }
18
+ /**
19
+ * SDK-facing E2EE types (camelCase), mapped from the raw WASM boundary shapes in wasm.d.ts.
20
+ */
21
+ /** Lifecycle state of a per-meeting MLS session. */
22
+ export declare const E2eeState: {
23
+ readonly Disabled: "disabled";
24
+ readonly Initializing: "initializing";
25
+ readonly Joining: "joining";
26
+ readonly Joined: "joined";
27
+ readonly Failed: "failed";
28
+ readonly Evicted: "evicted";
29
+ readonly Left: "left";
30
+ };
31
+ export type E2eeState = Enum<typeof E2eeState>;
32
+ /** Event payloads emitted by E2eeController and forwarded through Meeting. */
33
+ export interface E2eeControllerEventMap {
34
+ [EVENT_TRIGGERS.MEETING_E2EE_SECURITY_CODE_UPDATED]: {
35
+ securityCode: string | undefined;
36
+ };
37
+ [EVENT_TRIGGERS.MEETING_E2EE_STATE_CHANGED]: {
38
+ state: E2eeState;
39
+ };
40
+ [EVENT_TRIGGERS.MEETING_E2EE_MEDIA_SERVICES_CHANGED]: {
41
+ hasMediaServices: boolean;
42
+ };
43
+ [EVENT_TRIGGERS.MEETING_E2EE_FAILURE]: {
44
+ reason: string;
45
+ errorCode?: number;
46
+ errorMessage?: string;
47
+ };
48
+ }
49
+ export type E2eeControllerEvent = keyof E2eeControllerEventMap;
50
+ /** The meeting's overall E2EE trust state, surfaced to the app for its UI indicator. */
51
+ export declare const TrustState: {
52
+ readonly Calculating: "calculating";
53
+ readonly Failed: "failed";
54
+ readonly Strong: "strong";
55
+ readonly ZeroTrust: "zeroTrust";
56
+ readonly AdaptiveStrong: "adaptiveStrong";
57
+ readonly AdaptiveZeroTrust: "adaptiveZeroTrust";
58
+ };
59
+ export type TrustState = Enum<typeof TrustState>;
60
+ /** A media-encryption (SFrame) key for a given MLS epoch. */
61
+ export interface E2eeKey {
62
+ epoch: number;
63
+ baseKey: Uint8Array;
64
+ index: number;
65
+ indexBits: number;
66
+ canEncrypt: boolean;
67
+ }
68
+ /** SFrame parameters negotiated for the group, reported on a successful join. */
69
+ export interface SframeParams {
70
+ cipherSuite: number;
71
+ epochBits: number;
72
+ }
4
73
  /**
5
- * SDK-facing shapes used by the isolated MLS protocol engine. Integration-specific meeting,
6
- * identity-plugin and signaling types are added by the later adapter phases.
74
+ * Credential-validation outcome for an MLS roster member. Mirrors (by ordinal) the C++
75
+ * `RosterStatus::ValidationResult` enum in libe2ee (`common/include/e2ee_common/types.h`) — keep
76
+ * the two in sync. For MultiCredential, `PartialSuccess` means at least one credential passed and
77
+ * at least one failed; X.509 identity verification is derived from the individual X.509 results.
7
78
  */
8
- /** Credential-validation outcome from the MLS roster. Keep ordinals in sync with libe2ee. */
9
79
  export declare const E2eeValidationResult: {
10
80
  readonly Success: 0;
11
81
  readonly PartialSuccess: 1;
@@ -22,29 +92,19 @@ export declare const E2eeValidationResult: {
22
92
  readonly UnsupportedCredentialType: 12;
23
93
  readonly MissingDisplayNameExtension: 13;
24
94
  };
25
- export type E2eeValidationResult = (typeof E2eeValidationResult)[keyof typeof E2eeValidationResult];
26
- /** Identity type attached to the leaf certificate. Keep ordinals in sync with libe2ee. */
95
+ export type E2eeValidationResult = Enum<typeof E2eeValidationResult>;
96
+ /**
97
+ * Identity type attached to the leaf X.509 certificate. Mirrors the C++ `IdentityType` enum in
98
+ * libe2ee (`common/include/e2ee_common/types.h`) — keep the ordinals in sync.
99
+ */
27
100
  export declare const E2eeIdentityType: {
28
101
  readonly WebexAnonymousIdentity: 0;
29
102
  readonly WebexMachineIdentity: 1;
30
103
  readonly WebexUserIdentity: 2;
31
104
  readonly ExternalVerifiedIdentity: 3;
32
105
  };
33
- export type E2eeIdentityType = (typeof E2eeIdentityType)[keyof typeof E2eeIdentityType];
34
- /** A media-encryption (SFrame) key for an MLS epoch. */
35
- export interface E2eeKey {
36
- epoch: number;
37
- baseKey: Uint8Array;
38
- index: number;
39
- indexBits: number;
40
- canEncrypt: boolean;
41
- }
42
- /** SFrame parameters negotiated for an MLS group. */
43
- export interface SframeParams {
44
- cipherSuite: number;
45
- epochBits: number;
46
- }
47
- /** Parsed certificate information returned with a roster member. */
106
+ export type E2eeIdentityType = Enum<typeof E2eeIdentityType>;
107
+ /** Parsed X.509 certificate details from a member's certificate chain. */
48
108
  export interface E2eeCertificateInfo {
49
109
  primaryName: string;
50
110
  commonName: string;
@@ -59,11 +119,12 @@ export interface E2eeCertificateInfo {
59
119
  der: Uint8Array;
60
120
  }
61
121
  export interface E2eeIdentityResult {
122
+ /** Result for this X.509 credential, which may differ from the overall MultiCredential result. */
62
123
  result: E2eeValidationResult;
63
124
  certificateChain: E2eeCertificateInfo[];
64
125
  failedCertIndex?: number;
65
126
  }
66
- /** A member of the MLS roster and its credential-validation result. */
127
+ /** A member of the MLS roster and its overall libe2ee credential validation result. */
67
128
  export interface E2eeRosterMember {
68
129
  url: string;
69
130
  displayName: string;
@@ -71,24 +132,16 @@ export interface E2eeRosterMember {
71
132
  validationResult: E2eeValidationResult;
72
133
  identityResults?: E2eeIdentityResult[];
73
134
  }
74
- /** Credentials and trust anchors consumed by the WASM engine. */
135
+ /** Configuration for initializing an MLS group session. */
75
136
  export interface MLSConfig {
76
137
  participantId: string;
77
138
  deviceUrl: string;
78
- deviceType?: string;
139
+ deviceType: string;
79
140
  correlationId: string;
80
141
  displayName: string;
81
142
  serviceUrl: string;
82
- credentials?: {
83
- privateKey: Uint8Array;
84
- certChain: Uint8Array[];
85
- };
86
- trustAnchors?: {
87
- webexCaRoots?: string;
88
- domainNameRoots?: string;
89
- userIdentityRoots?: string;
90
- domainNameRootsP7b?: Uint8Array;
91
- };
143
+ credentials?: IdentityCredentials;
144
+ trustAnchors?: IdentityTrustAnchors;
92
145
  joinTimeout?: number;
93
146
  coalesceWindow?: number;
94
147
  }
@@ -100,5 +153,9 @@ export interface MLSConfig {
100
153
  export interface IMlsHttpClient {
101
154
  request(url: string, body: unknown): Promise<unknown>;
102
155
  }
103
- /** Signaling transport that delivered an MLS protocol message. */
104
- export type E2eeSignalingSource = 'llm' | 'mercury';
156
+ /** Which signaling channel an incoming MLS protocol event arrived on. */
157
+ export declare const E2eeSignalingSource: {
158
+ readonly Llm: "llm";
159
+ readonly Mercury: "mercury";
160
+ };
161
+ export type E2eeSignalingSource = Enum<typeof E2eeSignalingSource>;
@@ -3,6 +3,7 @@ import HashTree from './hashTree';
3
3
  import { Enum } from '../constants';
4
4
  import { HtMeta, HashTreeObject } from './types';
5
5
  import { LocusDTO } from '../locus-info/types';
6
+ import type { WebexRequestMethod } from '../common/types';
6
7
  export declare enum SyncAllBackoffType {
7
8
  NONE = "none",
8
9
  ONLY_LLM = "onlyLLM",
@@ -48,7 +49,6 @@ interface InternalDataSet extends DataSet {
48
49
  heartbeatWatchdogTimer?: ReturnType<typeof setTimeout>;
49
50
  syncAbortController?: AbortController;
50
51
  }
51
- type WebexRequestMethod = (options: Record<string, any>) => Promise<any>;
52
52
  type GenerateTrackingId = () => string | undefined;
53
53
  export declare const LocusInfoUpdateType: {
54
54
  readonly OBJECTS_UPDATED: "OBJECTS_UPDATED";
@@ -20,6 +20,7 @@ export { type Reaction } from './reactions/reactions.type';
20
20
  export { SitePreferenceSelectOption } from './meetings/meetings.types';
21
21
  export type { FetchSitePreferencesMeViaSiteOptions, SitePreferencesResponse, } from './meetings/meetings.types';
22
22
  export type { Interpreter, InterpreterUsingResource } from './interpretation/interpretation.types';
23
+ export type { E2eeControllerEvent, E2eeControllerEventMap } from './e2ee/types';
23
24
  export { CaptchaError, IntentToJoinError, JoinMeetingError, PasswordError, PermissionError, ReclaimHostIsHostAlreadyError, ReclaimHostNotAllowedError, ReclaimHostNotSupportedError, ReclaimHostEmptyWrongKeyError, Meeting, MeetingInfoUtil, JoinWebinarError, SdpResponseTimeoutError, };
24
25
  export { RemoteMedia } from './multistream/remoteMedia';
25
26
  export { default as TriggerProxy } from './common/events/trigger-proxy';
@@ -14,6 +14,8 @@ import MediaProperties from '../media/properties';
14
14
  import ReconnectionManager from '../reconnection-manager';
15
15
  import MeetingRequest from './request';
16
16
  import Members from '../members/index';
17
+ import type E2eeController from '../e2ee/E2eeController';
18
+ import { TrustState } from '../e2ee/types';
17
19
  import { DESTINATION_TYPE, NETWORK_STATUS } from '../constants';
18
20
  import { ReceiveSlotManager } from '../multistream/receiveSlotManager';
19
21
  import { MediaRequestManager } from '../multistream/mediaRequestManager';
@@ -390,6 +392,8 @@ export default class Meeting extends StatelessWebexPlugin {
390
392
  meetingInfo: any;
391
393
  meetingRequest: MeetingRequest;
392
394
  members: Members;
395
+ e2ee?: E2eeController;
396
+ private lastTrustState?;
393
397
  options: object;
394
398
  orgId: string;
395
399
  owner: string;
@@ -833,6 +837,15 @@ export default class Meeting extends StatelessWebexPlugin {
833
837
  * @memberof Meeting
834
838
  */
835
839
  private setUpLocusSelfListener;
840
+ /**
841
+ * Drives the E2EE MLS lifecycle from self-state changes for this WDM device:
842
+ * join once the device is JOINED, leave when it is moved back into the lobby.
843
+ * @param {Object} payload the LOCUS_INFO_UPDATE_SELF payload (oldSelf, newSelf)
844
+ * @returns {undefined}
845
+ * @private
846
+ * @memberof Meeting
847
+ */
848
+ private updateE2eeOnSelfChange;
836
849
  /**
837
850
  * Notify any changes on the pstn devices
838
851
  * @param {Object} payload
@@ -1061,6 +1074,27 @@ export default class Meeting extends StatelessWebexPlugin {
1061
1074
  * @memberof Meeting
1062
1075
  */
1063
1076
  getMembers(): Members;
1077
+ /**
1078
+ * The meeting's overall trust state, derived from the Locus E2EE flags, the MLS join state
1079
+ * and media-service presence. Undefined when the local device is not joined to the meeting.
1080
+ * @returns {TrustState | undefined}
1081
+ * @public
1082
+ * @memberof Meeting
1083
+ */
1084
+ get trustState(): TrustState | undefined;
1085
+ /**
1086
+ * Emits when a Locus or MLS update changes the meeting's overall E2EE trust state.
1087
+ * @returns {void}
1088
+ * @private
1089
+ */
1090
+ private updateTrustState;
1091
+ /**
1092
+ * Forwards E2EE controller events and updates the derived trust state when relevant E2EE state changes.
1093
+ * @param {E2eeController | undefined} e2ee
1094
+ * @returns {void}
1095
+ * @private
1096
+ */
1097
+ private setupE2eeEventForwarding;
1064
1098
  /**
1065
1099
  * Sets the meeting info on the class instance
1066
1100
  * @param {Object} meetingInfo
@@ -51,7 +51,7 @@ declare const MeetingUtil: {
51
51
  joinMeeting: (meeting: any, options: any) => Promise<any>;
52
52
  cleanUp: (meeting: any, { preserveVoiceaChannel }?: {
53
53
  preserveVoiceaChannel?: boolean;
54
- }) => any;
54
+ }) => Promise<any>;
55
55
  disconnectPhoneAudio: (meeting: any, phoneUrl: any) => any;
56
56
  /**
57
57
  * Returns options for leaving a meeting.
@@ -98,5 +98,6 @@ declare const BEHAVIORAL_METRICS: {
98
98
  HASH_TREE_EMPTY_LOCUS_STATE_ELEMENTS: string;
99
99
  DESTROY_MEETING_WHILE_SUSPENDED: string;
100
100
  WASM_RUNTIME_PERFORMANCE: string;
101
+ E2EE_FAILURE: string;
101
102
  };
102
103
  export { BEHAVIORAL_METRICS as default };
@@ -912,7 +912,7 @@ var Webinar = _webexCore.WebexPlugin.extend({
912
912
  }, _callee10);
913
913
  }))();
914
914
  },
915
- version: "3.13.0-next.16"
915
+ version: "3.13.0-next.17"
916
916
  });
917
917
  var _default = exports.default = Webinar;
918
918
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -44,12 +44,12 @@
44
44
  "@webex/eslint-config-legacy": "0.0.0",
45
45
  "@webex/jest-config-legacy": "0.0.0",
46
46
  "@webex/legacy-tools": "0.0.0",
47
- "@webex/plugin-rooms": "3.13.0-next.12",
48
- "@webex/test-helper-chai": "3.13.0-next.3",
49
- "@webex/test-helper-mocha": "3.13.0-next.3",
50
- "@webex/test-helper-mock-webex": "3.13.0-next.3",
51
- "@webex/test-helper-retry": "3.13.0-next.3",
52
- "@webex/test-helper-test-users": "3.13.0-next.3",
47
+ "@webex/plugin-rooms": "3.13.0-next.13",
48
+ "@webex/test-helper-chai": "3.13.0-next.4",
49
+ "@webex/test-helper-mocha": "3.13.0-next.4",
50
+ "@webex/test-helper-mock-webex": "3.13.0-next.4",
51
+ "@webex/test-helper-retry": "3.13.0-next.4",
52
+ "@webex/test-helper-test-users": "3.13.0-next.4",
53
53
  "chai": "^4.3.4",
54
54
  "chai-as-promised": "^7.1.1",
55
55
  "eslint": "^8.24.0",
@@ -61,24 +61,24 @@
61
61
  "typescript": "^4.7.4"
62
62
  },
63
63
  "dependencies": {
64
- "@webex/common": "3.13.0-next.3",
64
+ "@webex/common": "3.13.0-next.4",
65
65
  "@webex/event-dictionary-ts": "^1.0.2215",
66
66
  "@webex/internal-media-core": "2.32.4",
67
- "@webex/internal-plugin-conversation": "3.13.0-next.12",
68
- "@webex/internal-plugin-device": "3.13.0-next.8",
69
- "@webex/internal-plugin-identity": "3.13.0-next.8",
70
- "@webex/internal-plugin-llm": "3.13.0-next.8",
71
- "@webex/internal-plugin-mercury": "3.13.0-next.8",
72
- "@webex/internal-plugin-metrics": "3.13.0-next.8",
73
- "@webex/internal-plugin-support": "3.13.0-next.12",
74
- "@webex/internal-plugin-user": "3.13.0-next.8",
75
- "@webex/internal-plugin-voicea": "3.13.0-next.8",
76
- "@webex/media-helpers": "3.13.0-next.4",
77
- "@webex/plugin-people": "3.13.0-next.8",
78
- "@webex/plugin-rooms": "3.13.0-next.12",
67
+ "@webex/internal-plugin-conversation": "3.13.0-next.13",
68
+ "@webex/internal-plugin-device": "3.13.0-next.9",
69
+ "@webex/internal-plugin-identity": "3.13.0-next.9",
70
+ "@webex/internal-plugin-llm": "3.13.0-next.9",
71
+ "@webex/internal-plugin-mercury": "3.13.0-next.9",
72
+ "@webex/internal-plugin-metrics": "3.13.0-next.9",
73
+ "@webex/internal-plugin-support": "3.13.0-next.13",
74
+ "@webex/internal-plugin-user": "3.13.0-next.9",
75
+ "@webex/internal-plugin-voicea": "3.13.0-next.9",
76
+ "@webex/media-helpers": "3.13.0-next.5",
77
+ "@webex/plugin-people": "3.13.0-next.9",
78
+ "@webex/plugin-rooms": "3.13.0-next.13",
79
79
  "@webex/ts-sdp": "^1.8.1",
80
80
  "@webex/web-capabilities": "^1.13.1",
81
- "@webex/webex-core": "3.13.0-next.8",
81
+ "@webex/webex-core": "3.13.0-next.9",
82
82
  "ampersand-collection": "^2.0.2",
83
83
  "bowser": "^2.11.0",
84
84
  "btoa": "^1.2.1",
@@ -96,5 +96,5 @@
96
96
  "//": [
97
97
  "TODO: upgrade jwt-decode when moving to node 18"
98
98
  ],
99
- "version": "3.13.0-next.16"
99
+ "version": "3.13.0-next.17"
100
100
  }
@@ -0,0 +1,110 @@
1
+ import EventsScope from './events-scope';
2
+
3
+ /**
4
+ * A map of event name to the payload passed to its listeners.
5
+ */
6
+ export type EventPayloadMap<TEvents> = {[K in keyof TEvents]: unknown};
7
+
8
+ /**
9
+ * An EventsScope whose event names and payloads are checked at compile time against TEvents.
10
+ * Emitting logs the same way as EventsScope. Each event carries a single payload argument, matching
11
+ * EventsScope.emit().
12
+ *
13
+ * @usage
14
+ * ```ts
15
+ * interface MyEvents {
16
+ * 'my:event': {value: number};
17
+ * }
18
+ *
19
+ * class MyEmitter extends TypedEventsScope<MyEvents> {}
20
+ * ```
21
+ */
22
+ export default class TypedEventsScope<
23
+ TEvents extends EventPayloadMap<TEvents>
24
+ > extends EventsScope {
25
+ /**
26
+ * Emits and logs an event
27
+ * @param {Object} scope - Logging scope ({file, function}).
28
+ * @param {string} event
29
+ * @param {*} payload
30
+ * @returns {boolean}
31
+ */
32
+ emit<K extends keyof TEvents & string>(scope: any, event: K, payload: TEvents[K]): boolean {
33
+ return super.emit(scope, event, payload);
34
+ }
35
+
36
+ /**
37
+ * @param {string} event
38
+ * @param {Function} listener
39
+ * @returns {this}
40
+ */
41
+ on<K extends keyof TEvents & string>(event: K, listener: (payload: TEvents[K]) => void): this {
42
+ return super.on(event, listener);
43
+ }
44
+
45
+ /**
46
+ * @param {string} event
47
+ * @param {Function} listener
48
+ * @returns {this}
49
+ */
50
+ once<K extends keyof TEvents & string>(event: K, listener: (payload: TEvents[K]) => void): this {
51
+ return super.once(event, listener);
52
+ }
53
+
54
+ /**
55
+ * @param {string} event
56
+ * @param {Function} listener
57
+ * @returns {this}
58
+ */
59
+ off<K extends keyof TEvents & string>(event: K, listener: (payload: TEvents[K]) => void): this {
60
+ return super.off(event, listener);
61
+ }
62
+
63
+ /**
64
+ * @param {string} event
65
+ * @param {Function} listener
66
+ * @returns {this}
67
+ */
68
+ addListener<K extends keyof TEvents & string>(
69
+ event: K,
70
+ listener: (payload: TEvents[K]) => void
71
+ ): this {
72
+ return super.addListener(event, listener);
73
+ }
74
+
75
+ /**
76
+ * @param {string} event
77
+ * @param {Function} listener
78
+ * @returns {this}
79
+ */
80
+ removeListener<K extends keyof TEvents & string>(
81
+ event: K,
82
+ listener: (payload: TEvents[K]) => void
83
+ ): this {
84
+ return super.removeListener(event, listener);
85
+ }
86
+
87
+ /**
88
+ * @param {string} event
89
+ * @param {Function} listener
90
+ * @returns {this}
91
+ */
92
+ prependListener<K extends keyof TEvents & string>(
93
+ event: K,
94
+ listener: (payload: TEvents[K]) => void
95
+ ): this {
96
+ return super.prependListener(event, listener);
97
+ }
98
+
99
+ /**
100
+ * @param {string} event
101
+ * @param {Function} listener
102
+ * @returns {this}
103
+ */
104
+ prependOnceListener<K extends keyof TEvents & string>(
105
+ event: K,
106
+ listener: (payload: TEvents[K]) => void
107
+ ): this {
108
+ return super.prependOnceListener(event, listener);
109
+ }
110
+ }
@@ -0,0 +1,10 @@
1
+ /*!
2
+ * Copyright (c) 2015-2026 Cisco Systems, Inc. See LICENSE file.
3
+ */
4
+
5
+ /**
6
+ * The `webex.request` method, as consumed across the plugin. Injected already bound to the webex
7
+ * instance (`webex.request.bind(webex)`) so a collaborator can depend on this single function
8
+ * rather than the whole webex object.
9
+ */
10
+ export type WebexRequestMethod = (options: Record<string, any>) => Promise<any>;
package/src/constants.ts CHANGED
@@ -385,6 +385,12 @@ export const EVENT_TRIGGERS = {
385
385
  MEETING_LOCUS_URL_UPDATE: 'meeting:locus:locusUrl:update',
386
386
  MEETING_STREAM_PUBLISH_STATE_CHANGED: 'meeting:streamPublishStateChanged',
387
387
 
388
+ MEETING_E2EE_SECURITY_CODE_UPDATED: 'meeting:e2ee:securityCodeUpdated' as const,
389
+ MEETING_E2EE_STATE_CHANGED: 'meeting:e2ee:stateChanged' as const,
390
+ MEETING_E2EE_MEDIA_SERVICES_CHANGED: 'meeting:e2ee:mediaServicesChanged' as const,
391
+ MEETING_E2EE_FAILURE: 'meeting:e2ee:failure' as const,
392
+
393
+ MEETING_TRUST_STATE_CHANGED: 'meeting:trustStateChanged',
388
394
  MEETING_TRANSCRIPTION_CONNECTED: 'meeting:transcription:connected',
389
395
  MEETING_STARTED_RECEIVING_TRANSCRIPTION: 'meeting:receiveTranscription:started',
390
396
  MEETING_STOPPED_RECEIVING_TRANSCRIPTION: 'meeting:receiveTranscription:stopped',