@azure/communication-react 1.17.0-alpha-202405250013 → 1.17.0-alpha-202405260014
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/dist/communication-react.d.ts +15 -17
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-D6ea1yzU.js → ChatMessageComponentAsRichTextEditBox-JJcSXeg5.js} +2 -2
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-D6ea1yzU.js.map → ChatMessageComponentAsRichTextEditBox-JJcSXeg5.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-TueLs8OS.js → RichTextSendBoxWrapper-X-3v6QTM.js} +2 -2
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-TueLs8OS.js.map → RichTextSendBoxWrapper-X-3v6QTM.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{index-Bj8WXYGE.js → index-DpbIPxer.js} +18 -17
- package/dist/dist-cjs/communication-react/index-DpbIPxer.js.map +1 -0
- package/dist/dist-cjs/communication-react/index.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.d.ts +5 -5
- package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js +18 -7
- package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/providers/CallAgentProvider.d.ts +1 -1
- package/dist/dist-esm/calling-component-bindings/src/providers/CallAgentProvider.js +1 -1
- package/dist/dist-esm/calling-component-bindings/src/providers/CallAgentProvider.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.d.ts +1 -1
- package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.js +1 -1
- package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js +1 -0
- package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +5 -5
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +5 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +4 -6
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
- package/package.json +1 -1
- package/dist/dist-cjs/communication-react/index-Bj8WXYGE.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"telemetryVersion.js","sourceRoot":"","sources":["../../../../../acs-ui-common/src/telemetryVersion.js"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAElC,wCAAwC;AAExC,MAAM,CAAC,OAAO,GAAG,2BAA2B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// GENERATED FILE. DO NOT EDIT MANUALLY.\n\nmodule.exports = '1.17.0-alpha-
|
1
|
+
{"version":3,"file":"telemetryVersion.js","sourceRoot":"","sources":["../../../../../acs-ui-common/src/telemetryVersion.js"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAElC,wCAAwC;AAExC,MAAM,CAAC,OAAO,GAAG,2BAA2B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// GENERATED FILE. DO NOT EDIT MANUALLY.\n\nmodule.exports = '1.17.0-alpha-202405260014';\n"]}
|
@@ -11,7 +11,7 @@ import { CommonCallingHandlers, VideoBackgroundEffectsDependency } from './creat
|
|
11
11
|
* Calling related components from this package are able to pick out relevant handlers from this object.
|
12
12
|
* See {@link useHandlers} and {@link usePropsFor}.
|
13
13
|
*
|
14
|
-
* @
|
14
|
+
* @public
|
15
15
|
*/
|
16
16
|
export interface TeamsCallingHandlers extends CommonCallingHandlers {
|
17
17
|
onStartCall: (participants: CommunicationIdentifier[], options?: StartCallOptions) => undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCall;
|
@@ -22,11 +22,11 @@ export interface TeamsCallingHandlers extends CommonCallingHandlers {
|
|
22
22
|
* Useful when implementing a custom component that utilizes the providers
|
23
23
|
* exported from this library.
|
24
24
|
*
|
25
|
-
* @
|
25
|
+
* @public
|
26
26
|
*/
|
27
|
-
export declare const createDefaultTeamsCallingHandlers: (callClient: StatefulCallClient, callAgent
|
27
|
+
export declare const createDefaultTeamsCallingHandlers: (callClient: StatefulCallClient, callAgent?: TeamsCallAgent, deviceManager?: StatefulDeviceManager, call?: TeamsCall, options?: {
|
28
28
|
onResolveVideoBackgroundEffectsDependency?: () => Promise<VideoBackgroundEffectsDependency>;
|
29
|
-
}) =>
|
29
|
+
}) => TeamsCallingHandlers;
|
30
30
|
/**
|
31
31
|
* Create a set of default handlers for given component. Memoization is applied to the result. Multiple invocations with
|
32
32
|
* the same arguments will return the same handler instances. DeclarativeCallAgent, DeclarativeDeviceManager, and
|
@@ -39,7 +39,7 @@ export declare const createDefaultTeamsCallingHandlers: (callClient: StatefulCal
|
|
39
39
|
* @param call - Instance of {@link @azure/communication-calling#TeamsCall}.
|
40
40
|
* @param _ - React component that you want to generate handlers for.
|
41
41
|
*
|
42
|
-
* @
|
42
|
+
* @public
|
43
43
|
*/
|
44
44
|
export declare const createTeamsCallingHandlersForComponent: <Props>(callClient: StatefulCallClient, callAgent: undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCallAgent, deviceManager: StatefulDeviceManager | undefined, call: undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCall, _Component: (props: Props) => ReactElement | null) => Common<TeamsCallingHandlers, Props>;
|
45
45
|
//# sourceMappingURL=createTeamsCallHandlers.d.ts.map
|
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
10
10
|
});
|
11
11
|
};
|
12
12
|
import { isCommunicationUserIdentifier, isMicrosoftTeamsAppIdentifier } from '@azure/communication-common';
|
13
|
-
/* @conditional-compile-remove(
|
13
|
+
/* @conditional-compile-remove(PSTN-calls) */
|
14
14
|
import { isPhoneNumberIdentifier } from '@azure/communication-common';
|
15
15
|
import { _toCommunicationIdentifier } from "../../../acs-ui-common/src";
|
16
16
|
import memoizeOne from 'memoize-one';
|
@@ -22,22 +22,24 @@ import { createDefaultCommonCallingHandlers } from './createCommonHandlers';
|
|
22
22
|
* Useful when implementing a custom component that utilizes the providers
|
23
23
|
* exported from this library.
|
24
24
|
*
|
25
|
-
* @
|
25
|
+
* @public
|
26
26
|
*/
|
27
27
|
export const createDefaultTeamsCallingHandlers = memoizeOne((callClient, callAgent, deviceManager, call, options) => {
|
28
28
|
return Object.assign(Object.assign({}, createDefaultCommonCallingHandlers(callClient, deviceManager, call, options)), { onStartCall: (participants, options) => {
|
29
|
-
/* @conditional-compile-remove(teams-identity-support) */
|
29
|
+
/* @conditional-compile-remove(teams-identity-support-beta) */
|
30
30
|
const threadId = options === null || options === void 0 ? void 0 : options.threadId;
|
31
31
|
if (!isTeamsCallParticipants(participants)) {
|
32
32
|
throw new Error('CommunicationIdentifier in Teams call is not supported!');
|
33
33
|
}
|
34
|
-
/* @conditional-compile-remove(teams-identity-support) */
|
35
34
|
if (callAgent) {
|
36
|
-
|
35
|
+
/* @conditional-compile-remove(teams-identity-support-beta) */
|
36
|
+
return callAgent.startCall(participants, threadId ? Object.assign({ threadId }, options) : undefined);
|
37
|
+
/* @conditional-compile-remove(teams-identity-support) */
|
38
|
+
// Remove when teams identity in stable support multiple participants
|
39
|
+
return teamsSingleParticipantTrampoline(callAgent, participants, options);
|
37
40
|
}
|
38
41
|
return undefined;
|
39
42
|
},
|
40
|
-
/* @conditional-compile-remove(teams-identity-support) */
|
41
43
|
/* @conditional-compile-remove(PSTN-calls) */
|
42
44
|
onAddParticipant: (userId, options) => __awaiter(void 0, void 0, void 0, function* () {
|
43
45
|
const participant = _toCommunicationIdentifier(userId);
|
@@ -79,9 +81,18 @@ export const createDefaultTeamsCallingHandlers = memoizeOne((callClient, callAge
|
|
79
81
|
* @param call - Instance of {@link @azure/communication-calling#TeamsCall}.
|
80
82
|
* @param _ - React component that you want to generate handlers for.
|
81
83
|
*
|
82
|
-
* @
|
84
|
+
* @public
|
83
85
|
*/
|
84
86
|
export const createTeamsCallingHandlersForComponent = (callClient, callAgent, deviceManager, call, _Component) => {
|
85
87
|
return createDefaultTeamsCallingHandlers(callClient, callAgent, deviceManager, call);
|
86
88
|
};
|
89
|
+
/* @conditional-compile-remove(teams-identity-support) */
|
90
|
+
const teamsSingleParticipantTrampoline = (callAgent, participants, options) => {
|
91
|
+
if (participants.length !== 1) {
|
92
|
+
throw new Error('Only one participant is supported in Teams call!');
|
93
|
+
}
|
94
|
+
else {
|
95
|
+
return callAgent.startCall(participants[0], options);
|
96
|
+
}
|
97
|
+
};
|
87
98
|
//# sourceMappingURL=createTeamsCallHandlers.js.map
|
package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"createTeamsCallHandlers.js","sourceRoot":"","sources":["../../../../../../calling-component-bindings/src/handlers/createTeamsCallHandlers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;
|
1
|
+
{"version":3,"file":"createTeamsCallHandlers.js","sourceRoot":"","sources":["../../../../../../calling-component-bindings/src/handlers/createTeamsCallHandlers.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { StartCallOptions } from '@azure/communication-calling';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { AddPhoneNumberOptions } from '@azure/communication-calling';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { TeamsCall, TeamsCallAgent, TeamsCallAgentOptions } from '@azure/communication-calling';\nimport {\n CommunicationIdentifier,\n isCommunicationUserIdentifier,\n isMicrosoftTeamsAppIdentifier\n} from '@azure/communication-common';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { isPhoneNumberIdentifier } from '@azure/communication-common';\nimport { Common, _toCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { StatefulCallClient, StatefulDeviceManager } from '@internal/calling-stateful-client';\nimport memoizeOne from 'memoize-one';\nimport { ReactElement } from 'react';\nimport { isTeamsCallParticipants } from '../utils/callUtils';\nimport {\n createDefaultCommonCallingHandlers,\n CommonCallingHandlers,\n VideoBackgroundEffectsDependency\n} from './createCommonHandlers';\n/**\n * Object containing all the teams call handlers required for calling components.\n *\n * Calling related components from this package are able to pick out relevant handlers from this object.\n * See {@link useHandlers} and {@link usePropsFor}.\n *\n * @public\n */\nexport interface TeamsCallingHandlers extends CommonCallingHandlers {\n onStartCall: (\n participants: CommunicationIdentifier[],\n options?: StartCallOptions\n ) => undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCall;\n}\n\n/**\n * Create the default implementation of {@link TeamsCallingHandlers} for teams call.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * @public\n */\nexport const createDefaultTeamsCallingHandlers = memoizeOne(\n (\n callClient: StatefulCallClient,\n callAgent?: TeamsCallAgent,\n deviceManager?: StatefulDeviceManager,\n call?: TeamsCall,\n options?: {\n onResolveVideoBackgroundEffectsDependency?: () => Promise<VideoBackgroundEffectsDependency>;\n }\n ): TeamsCallingHandlers => {\n return {\n ...createDefaultCommonCallingHandlers(callClient, deviceManager, call, options),\n onStartCall: (participants, options) => {\n /* @conditional-compile-remove(teams-identity-support-beta) */\n const threadId = options?.threadId;\n if (!isTeamsCallParticipants(participants)) {\n throw new Error('CommunicationIdentifier in Teams call is not supported!');\n }\n if (callAgent) {\n /* @conditional-compile-remove(teams-identity-support-beta) */\n return callAgent.startCall(participants, threadId ? { threadId, ...options } : undefined);\n /* @conditional-compile-remove(teams-identity-support) */\n // Remove when teams identity in stable support multiple participants\n return teamsSingleParticipantTrampoline(callAgent as TeamsCallAgent, participants, options);\n }\n\n return undefined;\n },\n /* @conditional-compile-remove(PSTN-calls) */\n onAddParticipant: async (\n userId: string | CommunicationIdentifier,\n options?: AddPhoneNumberOptions\n ): Promise<void> => {\n const participant = _toCommunicationIdentifier(userId);\n /* @conditional-compile-remove(teams-identity-support) */\n const threadId = options?.threadId;\n if (isCommunicationUserIdentifier(participant)) {\n throw new Error('CommunicationIdentifier in Teams call is not supported!');\n }\n\n if (isMicrosoftTeamsAppIdentifier(participant)) {\n throw new Error('Adding Microsoft Teams app identifier is not supported!');\n }\n /* @conditional-compile-remove(teams-identity-support) */\n if (isPhoneNumberIdentifier(participant)) {\n call?.addParticipant(participant, threadId ? { threadId } : undefined);\n }\n /* @conditional-compile-remove(teams-identity-support) */\n call?.addParticipant(participant);\n },\n onRemoveParticipant: async (\n userId: string | /* @conditional-compile-remove(PSTN-calls) */ CommunicationIdentifier\n ): Promise<void> => {\n const participant = _toCommunicationIdentifier(userId);\n if (isCommunicationUserIdentifier(participant)) {\n throw new Error('CommunicationIdentifier in Teams call is not supported!');\n }\n\n if (isMicrosoftTeamsAppIdentifier(participant)) {\n throw new Error('Removing Microsoft Teams app identifier is not supported!');\n }\n /* @conditional-compile-remove(teams-identity-support) */\n await call?.removeParticipant(participant);\n }\n };\n }\n);\n\n/**\n * Create a set of default handlers for given component. Memoization is applied to the result. Multiple invocations with\n * the same arguments will return the same handler instances. DeclarativeCallAgent, DeclarativeDeviceManager, and\n * DeclarativeCall may be undefined. If undefined, their associated handlers will not be created and returned.\n *\n * @param callClient - StatefulCallClient returned from\n * {@link @azure/communication-react#createStatefulCallClient}.\n * @param callAgent - Instance of {@link @azure/communication-calling#TeamsCallClient}.\n * @param deviceManager - Instance of {@link @azure/communication-calling#DeviceManager}.\n * @param call - Instance of {@link @azure/communication-calling#TeamsCall}.\n * @param _ - React component that you want to generate handlers for.\n *\n * @public\n */\nexport const createTeamsCallingHandlersForComponent = <Props>(\n callClient: StatefulCallClient,\n callAgent: undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCallAgent,\n deviceManager: StatefulDeviceManager | undefined,\n call: undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCall,\n _Component: (props: Props) => ReactElement | null\n): Common<TeamsCallingHandlers, Props> => {\n return createDefaultTeamsCallingHandlers(callClient, callAgent, deviceManager, call);\n};\n\n/* @conditional-compile-remove(teams-identity-support) */\nconst teamsSingleParticipantTrampoline = (\n callAgent: TeamsCallAgent,\n participants: CommunicationIdentifier[],\n options?: TeamsCallAgentOptions\n): TeamsCall => {\n if (participants.length !== 1) {\n throw new Error('Only one participant is supported in Teams call!');\n } else {\n return callAgent.startCall(participants[0] as any, options);\n }\n};\n"]}
|
@@ -43,7 +43,7 @@ export declare const useCallAgent: () => CallAgent | undefined;
|
|
43
43
|
* Useful when implementing a custom component that utilizes the providers
|
44
44
|
* exported from this library.
|
45
45
|
*
|
46
|
-
* @
|
46
|
+
* @public
|
47
47
|
*/
|
48
48
|
export declare const useTeamsCallAgent: () => undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCallAgent;
|
49
49
|
//# sourceMappingURL=CallAgentProvider.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CallAgentProvider.js","sourceRoot":"","sources":["../../../../../../calling-component-bindings/src/providers/CallAgentProvider.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC,OAAO,EAAE,eAAe,EAAE,6CAA0C;AACpE,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AASzD;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAAmC,SAAS,CAAC,CAAC;AAY3F,MAAM,qBAAqB,GAAG,CAAC,KAA6B,EAAe,EAAE;IAC3E,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IAE5B,MAAM,YAAY,GAAyB;QACzC,SAAS;KACV,CAAC;IAEF,OAAO,oBAAC,gBAAgB,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,IAAG,KAAK,CAAC,QAAQ,CAA6B,CAAC;AACtG,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAA6B,EAAe,EAAE,CAAC,oBAAC,qBAAqB,oBAAK,KAAK,EAAI,CAAC;AAEtH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,GAA0B,EAAE;;IACtD,MAAM,SAAS,GAAG,MAAA,UAAU,CAAC,gBAAgB,CAAC,0CAAE,SAAS,CAAC;IAC1D,IAAI,SAAS,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,EAAE,CAAC;QAC7C,MAAM,IAAI,KAAK,CAAC,gEAAgE,CAAC,CAAC;IACpF,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAE4C,EAAE;;IAC7E,MAAM,SAAS,GAAG,MAAA,UAAU,CAAC,gBAAgB,CAAC,0CAAE,SAAS,CAAC;IAC1D,IAAI,SAAS,IAAI,eAAe,CAAC,SAAS,CAAC,EAAE,CAAC;QAC5C,MAAM,IAAI,KAAK,CAAC,8DAA8D,CAAC,CAAC;IAClF,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CallAgent } from '@azure/communication-calling';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { TeamsCallAgent } from '@azure/communication-calling';\nimport { _isACSCallAgent } from '@internal/calling-stateful-client';\nimport React, { createContext, useContext } from 'react';\n\n/**\n * @private\n */\nexport type CallAgentContextType = {\n callAgent: CallAgent | /* @conditional-compile-remove(teams-identity-support) */ TeamsCallAgent | undefined;\n};\n\n/**\n * @private\n */\nexport const CallAgentContext = createContext<CallAgentContextType | undefined>(undefined);\n\n/**\n * Arguments to initialize a {@link CallAgentProvider}.\n *\n * @public\n */\nexport interface CallAgentProviderProps {\n children: React.ReactNode;\n callAgent?: CallAgent | /* @conditional-compile-remove(teams-identity-support) */ TeamsCallAgent;\n}\n\nconst CallAgentProviderBase = (props: CallAgentProviderProps): JSX.Element => {\n const { callAgent } = props;\n\n const initialState: CallAgentContextType = {\n callAgent\n };\n\n return <CallAgentContext.Provider value={initialState}>{props.children}</CallAgentContext.Provider>;\n};\n\n/**\n * A {@link React.Context} that stores a {@link @azure/communication-calling#CallAgent}.\n *\n * Calling components from this package must be wrapped with a {@link CallAgentProvider}.\n *\n * @public\n */\nexport const CallAgentProvider = (props: CallAgentProviderProps): JSX.Element => <CallAgentProviderBase {...props} />;\n\n/**\n * Hook to obtain {@link @azure/communication-calling#CallAgent} from the provider.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * @public\n */\nexport const useCallAgent = (): CallAgent | undefined => {\n const callAgent = useContext(CallAgentContext)?.callAgent;\n if (callAgent && !_isACSCallAgent(callAgent)) {\n throw new Error('TeamsCallAgent object was provided, try useTeamsCall() instead');\n }\n return callAgent;\n};\n\n/**\n * Hook to obtain {@link @azure/communication-calling#TeamsCallAgent} from the provider.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * @
|
1
|
+
{"version":3,"file":"CallAgentProvider.js","sourceRoot":"","sources":["../../../../../../calling-component-bindings/src/providers/CallAgentProvider.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC,OAAO,EAAE,eAAe,EAAE,6CAA0C;AACpE,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AASzD;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAAmC,SAAS,CAAC,CAAC;AAY3F,MAAM,qBAAqB,GAAG,CAAC,KAA6B,EAAe,EAAE;IAC3E,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IAE5B,MAAM,YAAY,GAAyB;QACzC,SAAS;KACV,CAAC;IAEF,OAAO,oBAAC,gBAAgB,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,IAAG,KAAK,CAAC,QAAQ,CAA6B,CAAC;AACtG,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAA6B,EAAe,EAAE,CAAC,oBAAC,qBAAqB,oBAAK,KAAK,EAAI,CAAC;AAEtH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,GAA0B,EAAE;;IACtD,MAAM,SAAS,GAAG,MAAA,UAAU,CAAC,gBAAgB,CAAC,0CAAE,SAAS,CAAC;IAC1D,IAAI,SAAS,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,EAAE,CAAC;QAC7C,MAAM,IAAI,KAAK,CAAC,gEAAgE,CAAC,CAAC;IACpF,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAE4C,EAAE;;IAC7E,MAAM,SAAS,GAAG,MAAA,UAAU,CAAC,gBAAgB,CAAC,0CAAE,SAAS,CAAC;IAC1D,IAAI,SAAS,IAAI,eAAe,CAAC,SAAS,CAAC,EAAE,CAAC;QAC5C,MAAM,IAAI,KAAK,CAAC,8DAA8D,CAAC,CAAC;IAClF,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CallAgent } from '@azure/communication-calling';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { TeamsCallAgent } from '@azure/communication-calling';\nimport { _isACSCallAgent } from '@internal/calling-stateful-client';\nimport React, { createContext, useContext } from 'react';\n\n/**\n * @private\n */\nexport type CallAgentContextType = {\n callAgent: CallAgent | /* @conditional-compile-remove(teams-identity-support) */ TeamsCallAgent | undefined;\n};\n\n/**\n * @private\n */\nexport const CallAgentContext = createContext<CallAgentContextType | undefined>(undefined);\n\n/**\n * Arguments to initialize a {@link CallAgentProvider}.\n *\n * @public\n */\nexport interface CallAgentProviderProps {\n children: React.ReactNode;\n callAgent?: CallAgent | /* @conditional-compile-remove(teams-identity-support) */ TeamsCallAgent;\n}\n\nconst CallAgentProviderBase = (props: CallAgentProviderProps): JSX.Element => {\n const { callAgent } = props;\n\n const initialState: CallAgentContextType = {\n callAgent\n };\n\n return <CallAgentContext.Provider value={initialState}>{props.children}</CallAgentContext.Provider>;\n};\n\n/**\n * A {@link React.Context} that stores a {@link @azure/communication-calling#CallAgent}.\n *\n * Calling components from this package must be wrapped with a {@link CallAgentProvider}.\n *\n * @public\n */\nexport const CallAgentProvider = (props: CallAgentProviderProps): JSX.Element => <CallAgentProviderBase {...props} />;\n\n/**\n * Hook to obtain {@link @azure/communication-calling#CallAgent} from the provider.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * @public\n */\nexport const useCallAgent = (): CallAgent | undefined => {\n const callAgent = useContext(CallAgentContext)?.callAgent;\n if (callAgent && !_isACSCallAgent(callAgent)) {\n throw new Error('TeamsCallAgent object was provided, try useTeamsCall() instead');\n }\n return callAgent;\n};\n\n/**\n * Hook to obtain {@link @azure/communication-calling#TeamsCallAgent} from the provider.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * @public\n */\nexport const useTeamsCallAgent = ():\n | undefined\n | /* @conditional-compile-remove(teams-identity-support) */ TeamsCallAgent => {\n const callAgent = useContext(CallAgentContext)?.callAgent;\n if (callAgent && _isACSCallAgent(callAgent)) {\n throw new Error('Regular CallAgent object was provided, try useCall() instead');\n }\n return callAgent;\n};\n"]}
|
@@ -47,7 +47,7 @@ export declare const useCall: () => Call | undefined;
|
|
47
47
|
*
|
48
48
|
* you must have previously used the CallProvider with a TeamsCall object to use this hook
|
49
49
|
*
|
50
|
-
* @
|
50
|
+
* @public
|
51
51
|
*/
|
52
52
|
export declare const useTeamsCall: () => undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCall;
|
53
53
|
//# sourceMappingURL=CallProvider.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CallProvider.js","sourceRoot":"","sources":["../../../../../../calling-component-bindings/src/providers/CallProvider.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAIzD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,6CAA0C;AAmB7E;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAA8B,SAAS,CAAC,CAAC;AAEjF;;GAEG;AACH,MAAM,gBAAgB,GAAG,CAAC,KAAwB,EAAe,EAAE;IACjE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IAEjC,MAAM,YAAY,GAAoB;QACpC,IAAI;KACL,CAAC;IAEF,OAAO,oBAAC,WAAW,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,IAAG,QAAQ,CAAwB,CAAC;AACtF,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAAwB,EAAe,EAAE,CAAC,oBAAC,gBAAgB,oBAAK,KAAK,EAAI,CAAC;AAEvG;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,GAAqB,EAAE;;IAC5C,MAAM,IAAI,GAAG,MAAA,UAAU,CAAC,WAAW,CAAC,0CAAE,IAAI,CAAC;IAC3C,IAAI,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QAC9B,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;IAC9E,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,yDAAyD;AACzD;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,GAAoF,EAAE;;IAChH,MAAM,IAAI,GAAG,MAAA,UAAU,CAAC,WAAW,CAAC,0CAAE,IAAI,CAAC;IAC3C,IAAI,IAAI,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;IAC3E,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useContext, createContext } from 'react';\nimport { Call } from '@azure/communication-calling';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { TeamsCall } from '@azure/communication-calling';\nimport { _isACSCall, _isTeamsCall } from '@internal/calling-stateful-client';\n\n/**\n * @private\n */\nexport type CallContextType = {\n call: Call | /* @conditional-compile-remove(teams-identity-support) */ TeamsCall | undefined;\n};\n\n/**\n * Arguments to initialize a {@link CallProvider}.\n *\n * @public\n */\nexport interface CallProviderProps {\n children: React.ReactNode;\n call?: Call | /* @conditional-compile-remove(teams-identity-support) */ TeamsCall;\n}\n\n/**\n * @private\n */\nexport const CallContext = createContext<CallContextType | undefined>(undefined);\n\n/**\n * @private\n */\nconst CallProviderBase = (props: CallProviderProps): JSX.Element => {\n const { children, call } = props;\n\n const initialState: CallContextType = {\n call\n };\n\n return <CallContext.Provider value={initialState}>{children}</CallContext.Provider>;\n};\n\n/**\n * A {@link React.Context} that stores a {@link @azure/communication-calling#Call}.\n *\n * Calling components from this package must be wrapped with a {@link CallProvider}.\n *\n * @public\n */\nexport const CallProvider = (props: CallProviderProps): JSX.Element => <CallProviderBase {...props} />;\n\n/**\n * Hook to obtain {@link @azure/communication-calling#Call} from the provider.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * you must have previously used the CallProvider with a Call object to use this hook\n *\n * @public\n */\nexport const useCall = (): Call | undefined => {\n const call = useContext(CallContext)?.call;\n if (call && !_isACSCall(call)) {\n throw new Error('Incorrect call type: Must provide a Regular Call object.');\n }\n return call;\n};\n\n/* @conditional-compile-remove(teams-identity-support) */\n/**\n * Hook to obtain {@link @azure/communication-calling#TeamsCall} from the provider.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * you must have previously used the CallProvider with a TeamsCall object to use this hook\n *\n * @
|
1
|
+
{"version":3,"file":"CallProvider.js","sourceRoot":"","sources":["../../../../../../calling-component-bindings/src/providers/CallProvider.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAIzD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,6CAA0C;AAmB7E;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAA8B,SAAS,CAAC,CAAC;AAEjF;;GAEG;AACH,MAAM,gBAAgB,GAAG,CAAC,KAAwB,EAAe,EAAE;IACjE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IAEjC,MAAM,YAAY,GAAoB;QACpC,IAAI;KACL,CAAC;IAEF,OAAO,oBAAC,WAAW,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,IAAG,QAAQ,CAAwB,CAAC;AACtF,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAAwB,EAAe,EAAE,CAAC,oBAAC,gBAAgB,oBAAK,KAAK,EAAI,CAAC;AAEvG;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,GAAqB,EAAE;;IAC5C,MAAM,IAAI,GAAG,MAAA,UAAU,CAAC,WAAW,CAAC,0CAAE,IAAI,CAAC;IAC3C,IAAI,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QAC9B,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;IAC9E,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,yDAAyD;AACzD;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,GAAoF,EAAE;;IAChH,MAAM,IAAI,GAAG,MAAA,UAAU,CAAC,WAAW,CAAC,0CAAE,IAAI,CAAC;IAC3C,IAAI,IAAI,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;IAC3E,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useContext, createContext } from 'react';\nimport { Call } from '@azure/communication-calling';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { TeamsCall } from '@azure/communication-calling';\nimport { _isACSCall, _isTeamsCall } from '@internal/calling-stateful-client';\n\n/**\n * @private\n */\nexport type CallContextType = {\n call: Call | /* @conditional-compile-remove(teams-identity-support) */ TeamsCall | undefined;\n};\n\n/**\n * Arguments to initialize a {@link CallProvider}.\n *\n * @public\n */\nexport interface CallProviderProps {\n children: React.ReactNode;\n call?: Call | /* @conditional-compile-remove(teams-identity-support) */ TeamsCall;\n}\n\n/**\n * @private\n */\nexport const CallContext = createContext<CallContextType | undefined>(undefined);\n\n/**\n * @private\n */\nconst CallProviderBase = (props: CallProviderProps): JSX.Element => {\n const { children, call } = props;\n\n const initialState: CallContextType = {\n call\n };\n\n return <CallContext.Provider value={initialState}>{children}</CallContext.Provider>;\n};\n\n/**\n * A {@link React.Context} that stores a {@link @azure/communication-calling#Call}.\n *\n * Calling components from this package must be wrapped with a {@link CallProvider}.\n *\n * @public\n */\nexport const CallProvider = (props: CallProviderProps): JSX.Element => <CallProviderBase {...props} />;\n\n/**\n * Hook to obtain {@link @azure/communication-calling#Call} from the provider.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * you must have previously used the CallProvider with a Call object to use this hook\n *\n * @public\n */\nexport const useCall = (): Call | undefined => {\n const call = useContext(CallContext)?.call;\n if (call && !_isACSCall(call)) {\n throw new Error('Incorrect call type: Must provide a Regular Call object.');\n }\n return call;\n};\n\n/* @conditional-compile-remove(teams-identity-support) */\n/**\n * Hook to obtain {@link @azure/communication-calling#TeamsCall} from the provider.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * you must have previously used the CallProvider with a TeamsCall object to use this hook\n *\n * @public\n */\nexport const useTeamsCall = (): undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCall => {\n const call = useContext(CallContext)?.call;\n if (call && !_isTeamsCall(call)) {\n throw new Error('Incorrect call type: Must provide a TeamsCall object.');\n }\n return call;\n};\n"]}
|
@@ -14,6 +14,7 @@ class ProxyTeamsCall extends ProxyCallCommon {
|
|
14
14
|
get(target, prop) {
|
15
15
|
/* @conditional-compile-remove(teams-identity-support) */
|
16
16
|
switch (prop) {
|
17
|
+
/* @conditional-compile-remove(PSTN-calls) */
|
17
18
|
case 'addParticipant': {
|
18
19
|
return this.getContext().withAsyncErrorTeedToState(function (...args) {
|
19
20
|
return __awaiter(this, void 0, void 0, function* () {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"TeamsCallDeclarative.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/TeamsCallDeclarative.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAe1D,MAAM,cAAe,SAAQ,eAAe;IACnC,GAAG,CAA4B,MAAiB,EAAE,IAAO;QAC9D,yDAAyD;QACzD,QAAQ,IAAI,EAAE,CAAC;YACb,KAAK,gBAAgB,CAAC,CAAC,CAAC;gBACtB,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,yBAAyB,CAAC,UACjD,GAAG,IAA6C;;wBAEhD,OAAO,MAAM,MAAM,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC,CAAC;oBAC9C,CAAC;iBAAA,EACD,0BAA0B,CAAC,CAAC;YAC9B,CAAC;YACD;gBACE,OAAO,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,IAAW,CAAC,CAAC;QAC1C,CAAC;QACD,OAAO,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,IAAW,CAAC,CAAC;IACxC,CAAC;CACF;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,IAAe,EAAE,OAAoB,EAAwB,EAAE;IAClG,MAAM,SAAS,GAAG,IAAI,cAAc,CAAC,OAAO,CAAC,CAAC;IAC9C,SAAS,CAAC,WAAW,EAAE,CAAC;IACxB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,aAAa,EAAE;QACzC,YAAY,EAAE,KAAK;QACnB,KAAK,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,WAAW,EAAE;KACrC,CAAC,CAAC;IAEH,OAAO,IAAI,KAAK,CAAC,IAAI,EAAE,SAAS,CAAyB,CAAC;AAC5D,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { ProxyCallCommon } from './CallDeclarativeCommon';\nimport { CallContext } from './CallContext';\nimport { TeamsCall } from './BetaToStableTypes';\n\n/**\n *\n * @private\n */\nexport type DeclarativeTeamsCall = TeamsCall & {\n /**\n * Stop any declarative specific subscriptions and remove declarative subscribers.\n */\n unsubscribe(): void;\n};\n\nclass ProxyTeamsCall extends ProxyCallCommon implements ProxyHandler<TeamsCall> {\n public get<P extends keyof TeamsCall>(target: TeamsCall, prop: P): any {\n /* @conditional-compile-remove(teams-identity-support) */\n switch (prop) {\n case 'addParticipant': {\n return this.getContext().withAsyncErrorTeedToState(async function (\n ...args: Parameters<TeamsCall['addParticipant']>\n ) {\n return await target.addParticipant(...args);\n },\n 'TeamsCall.addParticipant');\n }\n default:\n return super.get(target, prop as any);\n }\n return super.get(target, prop as any);\n }\n}\n\n/**\n * Creates a declarative Call by proxying Call with ProxyCall.\n * This should only be used with CallAgentDeclarative as CallAgentDeclarative will add that\n * call to the context properly (need to have the Call in context to update it - CallAgentDeclarative will add Call to\n * context)\n *\n * @param call - TeamsCall from SDK\n * @param context - CallContext from StatefulCallClient\n */\nexport const teamsCallDeclaratify = (call: TeamsCall, context: CallContext): DeclarativeTeamsCall => {\n const proxyCall = new ProxyTeamsCall(context);\n proxyCall.unsubscribe();\n Object.defineProperty(call, 'unsubscribe', {\n configurable: false,\n value: () => proxyCall.unsubscribe()\n });\n\n return new Proxy(call, proxyCall) as DeclarativeTeamsCall;\n};\n"]}
|
1
|
+
{"version":3,"file":"TeamsCallDeclarative.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/TeamsCallDeclarative.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAe1D,MAAM,cAAe,SAAQ,eAAe;IACnC,GAAG,CAA4B,MAAiB,EAAE,IAAO;QAC9D,yDAAyD;QACzD,QAAQ,IAAI,EAAE,CAAC;YACb,6CAA6C;YAC7C,KAAK,gBAAgB,CAAC,CAAC,CAAC;gBACtB,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,yBAAyB,CAAC,UACjD,GAAG,IAA6C;;wBAEhD,OAAO,MAAM,MAAM,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC,CAAC;oBAC9C,CAAC;iBAAA,EACD,0BAA0B,CAAC,CAAC;YAC9B,CAAC;YACD;gBACE,OAAO,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,IAAW,CAAC,CAAC;QAC1C,CAAC;QACD,OAAO,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,IAAW,CAAC,CAAC;IACxC,CAAC;CACF;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,IAAe,EAAE,OAAoB,EAAwB,EAAE;IAClG,MAAM,SAAS,GAAG,IAAI,cAAc,CAAC,OAAO,CAAC,CAAC;IAC9C,SAAS,CAAC,WAAW,EAAE,CAAC;IACxB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,aAAa,EAAE;QACzC,YAAY,EAAE,KAAK;QACnB,KAAK,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,WAAW,EAAE;KACrC,CAAC,CAAC;IAEH,OAAO,IAAI,KAAK,CAAC,IAAI,EAAE,SAAS,CAAyB,CAAC;AAC5D,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { ProxyCallCommon } from './CallDeclarativeCommon';\nimport { CallContext } from './CallContext';\nimport { TeamsCall } from './BetaToStableTypes';\n\n/**\n *\n * @private\n */\nexport type DeclarativeTeamsCall = TeamsCall & {\n /**\n * Stop any declarative specific subscriptions and remove declarative subscribers.\n */\n unsubscribe(): void;\n};\n\nclass ProxyTeamsCall extends ProxyCallCommon implements ProxyHandler<TeamsCall> {\n public get<P extends keyof TeamsCall>(target: TeamsCall, prop: P): any {\n /* @conditional-compile-remove(teams-identity-support) */\n switch (prop) {\n /* @conditional-compile-remove(PSTN-calls) */\n case 'addParticipant': {\n return this.getContext().withAsyncErrorTeedToState(async function (\n ...args: Parameters<TeamsCall['addParticipant']>\n ) {\n return await target.addParticipant(...args);\n },\n 'TeamsCall.addParticipant');\n }\n default:\n return super.get(target, prop as any);\n }\n return super.get(target, prop as any);\n }\n}\n\n/**\n * Creates a declarative Call by proxying Call with ProxyCall.\n * This should only be used with CallAgentDeclarative as CallAgentDeclarative will add that\n * call to the context properly (need to have the Call in context to update it - CallAgentDeclarative will add Call to\n * context)\n *\n * @param call - TeamsCall from SDK\n * @param context - CallContext from StatefulCallClient\n */\nexport const teamsCallDeclaratify = (call: TeamsCall, context: CallContext): DeclarativeTeamsCall => {\n const proxyCall = new ProxyTeamsCall(context);\n proxyCall.unsubscribe();\n Object.defineProperty(call, 'unsubscribe', {\n configurable: false,\n value: () => proxyCall.unsubscribe()\n });\n\n return new Proxy(call, proxyCall) as DeclarativeTeamsCall;\n};\n"]}
|
@@ -277,7 +277,7 @@ export type TeamsAdapterOptions = CommonCallAdapterOptions;
|
|
277
277
|
/**
|
278
278
|
* Arguments for creating the Azure Communication Services implementation of {@link TeamsCallAdapter}.
|
279
279
|
*
|
280
|
-
* @
|
280
|
+
* @public
|
281
281
|
*/
|
282
282
|
export type TeamsCallAdapterArgs = {
|
283
283
|
userId: MicrosoftTeamsUserIdentifier;
|
@@ -324,9 +324,9 @@ export declare const _createAzureCommunicationCallAdapterInner: ({ userId, displ
|
|
324
324
|
telemetryImplementationHint?: _TelemetryImplementationHint;
|
325
325
|
}) => Promise<CallAdapter>;
|
326
326
|
/**
|
327
|
-
* @
|
327
|
+
* @public
|
328
328
|
*/
|
329
|
-
export declare const createTeamsCallAdapter: (
|
329
|
+
export declare const createTeamsCallAdapter: (args: TeamsCallAdapterArgs) => Promise<TeamsCallAdapter>;
|
330
330
|
/**
|
331
331
|
* A custom React hook to simplify the creation of {@link CallAdapter}.
|
332
332
|
*
|
@@ -354,7 +354,7 @@ export declare const useAzureCommunicationCallAdapter: (args: Partial<AzureCommu
|
|
354
354
|
* Note that you must memoize the arguments to avoid recreating adapter on each render.
|
355
355
|
* See storybook for typical usage examples.
|
356
356
|
*
|
357
|
-
* @
|
357
|
+
* @public
|
358
358
|
*/
|
359
359
|
export declare const useTeamsCallAdapter: (args: Partial<TeamsCallAdapterArgs>, afterCreate?: (adapter: TeamsCallAdapter) => Promise<TeamsCallAdapter>, beforeDispose?: (adapter: TeamsCallAdapter) => Promise<void>) => TeamsCallAdapter | undefined;
|
360
360
|
/**
|
@@ -381,7 +381,7 @@ export declare function createAzureCommunicationCallAdapterFromClient(callClient
|
|
381
381
|
* Useful if you want to keep a reference to {@link StatefulCallClient}.
|
382
382
|
* Consider using {@link createAzureCommunicationCallAdapter} for a simpler API.
|
383
383
|
*
|
384
|
-
* @
|
384
|
+
* @public
|
385
385
|
*/
|
386
386
|
export declare const createTeamsCallAdapterFromClient: (callClient: StatefulCallClient, callAgent: TeamsCallAgent, locator: CallAdapterLocator, options?: TeamsAdapterOptions) => Promise<TeamsCallAdapter>;
|
387
387
|
export {};
|
@@ -1118,9 +1118,10 @@ export const _createAzureCommunicationCallAdapterInner = (_a) => __awaiter(void
|
|
1118
1118
|
});
|
1119
1119
|
/* @conditional-compile-remove(teams-identity-support) */
|
1120
1120
|
/**
|
1121
|
-
* @
|
1121
|
+
* @public
|
1122
1122
|
*/
|
1123
|
-
export const createTeamsCallAdapter = (
|
1123
|
+
export const createTeamsCallAdapter = (args) => __awaiter(void 0, void 0, void 0, function* () {
|
1124
|
+
const { userId, credential, locator, options } = args;
|
1124
1125
|
if (isCommunicationUserIdentifier(userId)) {
|
1125
1126
|
throw new Error('Communication User identifier is not supported by TeamsCallAdapter, please use our AzureCommunicationCallAdapter.');
|
1126
1127
|
}
|
@@ -1317,7 +1318,7 @@ beforeDispose) => {
|
|
1317
1318
|
* Note that you must memoize the arguments to avoid recreating adapter on each render.
|
1318
1319
|
* See storybook for typical usage examples.
|
1319
1320
|
*
|
1320
|
-
* @
|
1321
|
+
* @public
|
1321
1322
|
*/
|
1322
1323
|
export const useTeamsCallAdapter = (
|
1323
1324
|
/**
|
@@ -1373,7 +1374,7 @@ export function createAzureCommunicationCallAdapterFromClient(callClient, callAg
|
|
1373
1374
|
* Useful if you want to keep a reference to {@link StatefulCallClient}.
|
1374
1375
|
* Consider using {@link createAzureCommunicationCallAdapter} for a simpler API.
|
1375
1376
|
*
|
1376
|
-
* @
|
1377
|
+
* @public
|
1377
1378
|
*/
|
1378
1379
|
export const createTeamsCallAdapterFromClient = (callClient, callAgent, locator, options) => __awaiter(void 0, void 0, void 0, function* () {
|
1379
1380
|
const deviceManager = (yield callClient.getDeviceManager());
|