@microsoft/teams-js 2.46.0 → 2.47.0-beta.0
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/esm/packages/teams-js/dts/private/copilot/sidePanel.d.ts +2 -2
- package/dist/esm/packages/teams-js/dts/private/copilot/sidePanelInterfaces.d.ts +16 -1
- package/dist/esm/packages/teams-js/src/private/copilot/sidePanel.js +1 -1
- package/dist/esm/packages/teams-js/src/public/version.js +1 -1
- package/dist/umd/MicrosoftTeams.js +12 -3
- package/dist/umd/MicrosoftTeams.js.map +1 -1
- package/dist/umd/MicrosoftTeams.min.js +1 -1
- package/dist/umd/MicrosoftTeams.min.js.map +1 -1
- package/package.json +1 -53
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @module
|
|
8
8
|
*/
|
|
9
9
|
import { SdkError } from '../../public/interfaces';
|
|
10
|
-
import { Content, ContentRequest, PreCheckContextResponse, SidePanelError, SidePanelErrorImpl } from './sidePanelInterfaces';
|
|
10
|
+
import { Content, ContentRequest, PreCheckContextResponse, SidePanelError, SidePanelErrorImpl, UserConsentRequest } from './sidePanelInterfaces';
|
|
11
11
|
/**
|
|
12
12
|
* @hidden
|
|
13
13
|
* @internal
|
|
@@ -50,7 +50,7 @@ export declare function getContent(request?: ContentRequest): Promise<Content>;
|
|
|
50
50
|
* @internal
|
|
51
51
|
* Limited to Microsoft-internal use
|
|
52
52
|
*/
|
|
53
|
-
export declare function preCheckUserConsent(): Promise<PreCheckContextResponse>;
|
|
53
|
+
export declare function preCheckUserConsent(request?: UserConsentRequest): Promise<PreCheckContextResponse>;
|
|
54
54
|
/** Register user action content select handler function type */
|
|
55
55
|
export type userActionHandlerType = (selectedContent: Content) => void;
|
|
56
56
|
/**
|
|
@@ -431,7 +431,22 @@ export interface Content {
|
|
|
431
431
|
* Limited to Microsoft-internal use
|
|
432
432
|
*/
|
|
433
433
|
export interface ContentRequest {
|
|
434
|
-
|
|
434
|
+
/**
|
|
435
|
+
* @deprecated Use the index signature `[key: string]: unknown` instead to pass custom properties.
|
|
436
|
+
*/
|
|
437
|
+
localEndpointInfo?: string;
|
|
438
|
+
[key: string]: unknown;
|
|
439
|
+
}
|
|
440
|
+
/**
|
|
441
|
+
* @hidden
|
|
442
|
+
*
|
|
443
|
+
* The UserConsentRequest interface represents the request params sent to the hub to get user consent.
|
|
444
|
+
*
|
|
445
|
+
* @internal
|
|
446
|
+
* Limited to Microsoft-internal use
|
|
447
|
+
*/
|
|
448
|
+
export interface UserConsentRequest {
|
|
449
|
+
[key: string]: unknown;
|
|
435
450
|
}
|
|
436
451
|
/**
|
|
437
452
|
* @hidden
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as e}from"../../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{callFunctionInHostAndHandleResponse as t}from"../../internal/communication.js";import{registerHandlerHelper as n}from"../../internal/handlers.js";import{ensureInitialized as o}from"../../internal/internalAPIs.js";import{ResponseHandler as r}from"../../internal/responseHandler.js";import{getApiVersionTag as
|
|
1
|
+
import{__awaiter as e}from"../../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{callFunctionInHostAndHandleResponse as t}from"../../internal/communication.js";import{registerHandlerHelper as n}from"../../internal/handlers.js";import{ensureInitialized as o}from"../../internal/internalAPIs.js";import{ResponseHandler as r}from"../../internal/responseHandler.js";import{getApiVersionTag as s}from"../../internal/telemetry.js";import{FrameContexts as i}from"../../public/constants.js";import{isSdkError as l}from"../../public/interfaces.js";import{runtime as c}from"../../public/runtime.js";import{SidePanelErrorCode as u,SidePanelErrorImpl as p}from"./sidePanelInterfaces.js";const a="v2";function d(){var e;return o(c)&&!!(null===(e=c.supports.copilot)||void 0===e?void 0:e.sidePanel)}function m(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(u).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)||l(e)}function f(n){return e(this,void 0,void 0,(function*(){o(c);const e=n?[new b(n)]:[];return t("copilot.sidePanel.getContent",e,new C,s(a,"copilot.sidePanel.getContent"),m)}))}function j(n){return e(this,void 0,void 0,(function*(){o(c);const e=n?[new g(n)]:[];return t("copilot.sidePanel.preCheckUserConsent",e,new P,s(a,"copilot.sidePanel.preCheckUserConsent"),m)}))}function h(e){n(s(a,"copilot.sidePanel.registerUserActionContentSelect"),"copilot.sidePanel.userActionContentSelect",e,[i.content],(()=>{if(!d())throw v}))}const v=new p(u.NotSupportedOnPlatform,"This API is not supported on the current platform.");class C extends r{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class P extends r{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class b{constructor(e){this.contentRequest=e}serialize(){return this.contentRequest}}class g{constructor(e){this.userConsentRequest=e}serialize(){return this.userConsentRequest}}export{v as copilotSidePanelNotSupportedOnPlatformError,f as getContent,m as isResponseAReportableError,d as isSupported,j as preCheckUserConsent,h as registerUserActionContentSelect};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const t="2.47.0-beta.0";export{t as version};
|
|
@@ -4650,7 +4650,7 @@ function isSerializable(arg) {
|
|
|
4650
4650
|
* @hidden
|
|
4651
4651
|
* Package version.
|
|
4652
4652
|
*/
|
|
4653
|
-
const version = "2.
|
|
4653
|
+
const version = "2.47.0-beta.0";
|
|
4654
4654
|
|
|
4655
4655
|
;// ./src/public/featureFlags.ts
|
|
4656
4656
|
// All build feature flags are defined inside this object. Any build feature flag must have its own unique getter and setter function. This pattern allows for client apps to treeshake unused code and avoid including code guarded by this feature flags in the final bundle. If this property isn't desired, use the below runtime feature flags object.
|
|
@@ -9773,10 +9773,11 @@ function getContent(request) {
|
|
|
9773
9773
|
* @internal
|
|
9774
9774
|
* Limited to Microsoft-internal use
|
|
9775
9775
|
*/
|
|
9776
|
-
function preCheckUserConsent() {
|
|
9776
|
+
function preCheckUserConsent(request) {
|
|
9777
9777
|
return sidePanel_awaiter(this, void 0, void 0, function* () {
|
|
9778
9778
|
ensureInitialized(runtime);
|
|
9779
|
-
|
|
9779
|
+
const input = request ? [new SerializableUserConsentRequest(request)] : [];
|
|
9780
|
+
return callFunctionInHostAndHandleResponse("copilot.sidePanel.preCheckUserConsent" /* ApiName.Copilot_SidePanel_PreCheckUserConsent */, input, new PreCheckContextResponseHandler(), getApiVersionTag(sidePanel_copilotTelemetryVersionNumber, "copilot.sidePanel.preCheckUserConsent" /* ApiName.Copilot_SidePanel_PreCheckUserConsent */), isResponseAReportableError);
|
|
9780
9781
|
});
|
|
9781
9782
|
}
|
|
9782
9783
|
/**
|
|
@@ -9829,6 +9830,14 @@ class SerializableContentRequest {
|
|
|
9829
9830
|
return this.contentRequest;
|
|
9830
9831
|
}
|
|
9831
9832
|
}
|
|
9833
|
+
class SerializableUserConsentRequest {
|
|
9834
|
+
constructor(userConsentRequest) {
|
|
9835
|
+
this.userConsentRequest = userConsentRequest;
|
|
9836
|
+
}
|
|
9837
|
+
serialize() {
|
|
9838
|
+
return this.userConsentRequest;
|
|
9839
|
+
}
|
|
9840
|
+
}
|
|
9832
9841
|
|
|
9833
9842
|
;// ./src/private/copilot/view.ts
|
|
9834
9843
|
var view_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|