@microsoft/teams-js 2.10.0-beta.2 → 2.10.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/README.md CHANGED
@@ -24,7 +24,7 @@ To install the stable [version](https://learn.microsoft.com/javascript/api/overv
24
24
 
25
25
  ### Production
26
26
 
27
- You can reference these files directly [from here](https://res.cdn.office.net/teams-js/2.9.1/js/MicrosoftTeams.min.js) or point your package manager at them.
27
+ You can reference these files directly [from here](https://res.cdn.office.net/teams-js/2.10.0/js/MicrosoftTeams.min.js) or point your package manager at them.
28
28
 
29
29
  ## Usage
30
30
 
@@ -45,13 +45,13 @@ Reference the library inside of your `.html` page using:
45
45
  ```html
46
46
  <!-- Microsoft Teams JavaScript API (via CDN) -->
47
47
  <script
48
- src="https://res.cdn.office.net/teams-js/2.9.1/js/MicrosoftTeams.min.js"
49
- integrity="sha384-xnsUQ1tUqsrutBJl0vuf4/hufzLFWW8ZhGnhItfpQ0/BtWgM2uw6YT6BQ5YaKBSM"
48
+ src="https://res.cdn.office.net/teams-js/2.10.0/js/MicrosoftTeams.min.js"
49
+ integrity="sha384-7ZMvcfeIUPV84BQMdPBAJDk+zIac00KLvdNWZGZ0nF8FIDH0YE80EKj4ilp/VwZ1"
50
50
  crossorigin="anonymous"
51
51
  ></script>
52
52
 
53
53
  <!-- Microsoft Teams JavaScript API (via npm) -->
54
- <script src="node_modules/@microsoft/teams-js@2.9.1/dist/MicrosoftTeams.min.js"></script>
54
+ <script src="node_modules/@microsoft/teams-js@2.10.0/dist/MicrosoftTeams.min.js"></script>
55
55
 
56
56
  <!-- Microsoft Teams JavaScript API (via local) -->
57
57
  <script src="MicrosoftTeams.min.js"></script>
@@ -2026,18 +2026,6 @@ export namespace teams {
2026
2026
  * Limited to Microsoft-internal use
2027
2027
  */
2028
2028
  export namespace videoEx {
2029
- /**
2030
- * @hidden
2031
- * Error level when notifying errors to the host, the host will decide what to do acording to the error level.
2032
- * @beta
2033
- *
2034
- * @internal
2035
- * Limited to Microsoft-internal use
2036
- */
2037
- enum ErrorLevel {
2038
- Fatal = "fatal",
2039
- Warn = "warn"
2040
- }
2041
2029
  /**
2042
2030
  * @hidden
2043
2031
  * Video frame configuration supplied to the host to customize the generated video frame parameters
@@ -2069,44 +2057,16 @@ export namespace videoEx {
2069
2057
  }
2070
2058
  /**
2071
2059
  * @hidden
2072
- * Represents a video frame
2060
+ * Error level when notifying errors to the host, the host will decide what to do acording to the error level.
2073
2061
  * @beta
2074
2062
  *
2075
2063
  * @internal
2076
2064
  * Limited to Microsoft-internal use
2077
2065
  */
2078
- interface VideoFrame extends video.VideoFrameData {
2079
- /**
2080
- * @hidden
2081
- * The model output if you passed in an {@linkcode VideoFrameConfig.audioInferenceModel}
2082
- * @beta
2083
- *
2084
- * @internal
2085
- * Limited to Microsoft-internal use
2086
- */
2087
- audioInferenceResult?: Uint8Array;
2066
+ enum ErrorLevel {
2067
+ Fatal = "fatal",
2068
+ Warn = "warn"
2088
2069
  }
2089
- /**
2090
- * @hidden
2091
- * Video frame call back function
2092
- * @beta
2093
- *
2094
- * @internal
2095
- * Limited to Microsoft-internal use
2096
- */
2097
- type VideoFrameCallback = (frame: VideoFrame, notifyVideoFrameProcessed: () => void, notifyError: (errorMessage: string) => void) => void;
2098
- /**
2099
- * @hidden
2100
- * Register to process video frames
2101
- * @beta
2102
- *
2103
- * @param frameCallback - The callback to invoke when registerForVideoFrame has completed
2104
- * @param config - VideoFrameConfig to customize generated video frame parameters
2105
- *
2106
- * @internal
2107
- * Limited to Microsoft-internal use
2108
- */
2109
- function registerForVideoFrame(frameCallback: VideoFrameCallback, config: VideoFrameConfig): void;
2110
2070
  /**
2111
2071
  * @hidden
2112
2072
  * Video extension should call this to notify host that the current selected effect parameter changed.
@@ -2200,6 +2160,69 @@ export namespace videoEx {
2200
2160
  * Limited to Microsoft-internal use
2201
2161
  */
2202
2162
  function notifyFatalError(errorMessage: string): void;
2163
+ /**
2164
+ * @hidden
2165
+ * @internal
2166
+ * @beta
2167
+ * Namespace to get shared video framed.
2168
+ * When the host supports this capability, developer should call {@link sharedFrame.registerForVideoFrame} to get the video frames.
2169
+ */
2170
+ namespace sharedFrame {
2171
+ /**
2172
+ * @hidden
2173
+ *
2174
+ * Checks if video.sharedFrame capability is supported by the host
2175
+ * @beta
2176
+ *
2177
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
2178
+ *
2179
+ * @returns boolean to represent whether the video.sharedFrame capability is supported
2180
+ *
2181
+ * @internal
2182
+ * Limited to Microsoft-internal use
2183
+ */
2184
+ function isSupported(): boolean;
2185
+ /**
2186
+ * @hidden
2187
+ * Represents a video frame
2188
+ * @beta
2189
+ *
2190
+ * @internal
2191
+ * Limited to Microsoft-internal use
2192
+ */
2193
+ interface VideoFrame extends video.sharedFrame.VideoFrameData {
2194
+ /**
2195
+ * @hidden
2196
+ * The model output if you passed in an {@linkcode VideoFrameConfig.audioInferenceModel}
2197
+ * @beta
2198
+ *
2199
+ * @internal
2200
+ * Limited to Microsoft-internal use
2201
+ */
2202
+ audioInferenceResult?: Uint8Array;
2203
+ }
2204
+ /**
2205
+ * @hidden
2206
+ * Video frame call back function
2207
+ * @beta
2208
+ *
2209
+ * @internal
2210
+ * Limited to Microsoft-internal use
2211
+ */
2212
+ type VideoFrameCallback = (frame: VideoFrame, notifyVideoFrameProcessed: () => void, notifyError: (errorMessage: string) => void) => void;
2213
+ /**
2214
+ * @hidden
2215
+ * Register to process video frames
2216
+ * @beta
2217
+ *
2218
+ * @param frameCallback - The callback to invoke when registerForVideoFrame has completed
2219
+ * @param config - VideoFrameConfig to customize generated video frame parameters
2220
+ *
2221
+ * @internal
2222
+ * Limited to Microsoft-internal use
2223
+ */
2224
+ function registerForVideoFrame(frameCallback: VideoFrameCallback, config: VideoFrameConfig): void;
2225
+ }
2203
2226
  }
2204
2227
 
2205
2228
  /**
@@ -3738,11 +3761,11 @@ export namespace app {
3738
3761
  */
3739
3762
  interface AppHostInfo {
3740
3763
  /**
3741
- * The name of the host client. Possible values are: Office, Orange, Outlook, Teams
3764
+ * Identifies which host is running your app
3742
3765
  */
3743
3766
  name: HostName;
3744
3767
  /**
3745
- * The type of the host client. Possible values are : android, ios, web, desktop, rigel
3768
+ * The client type on which the host is running
3746
3769
  */
3747
3770
  clientType: HostClientType;
3748
3771
  /**
@@ -3868,6 +3891,7 @@ export namespace app {
3868
3891
  templateId?: string;
3869
3892
  /**
3870
3893
  * The user's role in the team.
3894
+
3871
3895
  * Because a malicious party can run your content in a browser, this value should
3872
3896
  * be used only as a hint as to the user's role, and never as proof of her role.
3873
3897
  */
@@ -3879,8 +3903,13 @@ export namespace app {
3879
3903
  interface UserInfo {
3880
3904
  /**
3881
3905
  * The Azure AD object id of the current user.
3882
- * Because a malicious party run your content in a browser, this value should
3883
- * be used only as a hint as to who the user is and never as proof of identity.
3906
+ *
3907
+ * Because a malicious party can run your content in a browser, this value should
3908
+ * be used only as a optimization hint as to who the user is and never as proof of identity.
3909
+ * Specifically, this value should never be used to determine if a user is authorized to access
3910
+ * a resource; access tokens should be used for that.
3911
+ * See {@link authentication.getAuthToken} and {@link authentication.authenticate} for more information on access tokens.
3912
+ *
3884
3913
  * This field is available only when the identity permission is requested in the manifest.
3885
3914
  */
3886
3915
  id: string;
@@ -3898,21 +3927,29 @@ export namespace app {
3898
3927
  isPSTNCallingAllowed?: boolean;
3899
3928
  /**
3900
3929
  * The license type for the current user. Possible values are:
3901
- * "Unknown", "Teacher", "Student", "Free", "SmbBusinessVoice", "SmbNonVoice", "FrontlineWorker"
3930
+ * "Unknown", "Teacher", "Student", "Free", "SmbBusinessVoice", "SmbNonVoice", "FrontlineWorker", "Anonymous"
3902
3931
  */
3903
3932
  licenseType?: string;
3904
3933
  /**
3905
- * A value suitable for use as a login_hint when authenticating with Azure AD.
3934
+ * A value suitable for use when providing a login_hint to Azure Active Directory for authentication purposes.
3935
+ * See [Provide optional claims to your app](https://learn.microsoft.com/azure/active-directory/develop/active-directory-optional-claims#v10-and-v20-optional-claims-set)
3936
+ * for more information about the use of login_hint
3937
+ *
3906
3938
  * Because a malicious party can run your content in a browser, this value should
3907
- * be used only as a hint as to who the user is and never as proof of identity.
3908
- * This field is available only when the identity permission is requested in the manifest.
3939
+ * be used only as a optimization hint as to who the user is and never as proof of identity.
3940
+ * Specifically, this value should never be used to determine if a user is authorized to access
3941
+ * a resource; access tokens should be used for that.
3942
+ * See {@link authentication.getAuthToken} and {@link authentication.authenticate} for more information on access tokens.
3909
3943
  */
3910
3944
  loginHint?: string;
3911
3945
  /**
3912
3946
  * The UPN of the current user. This may be an externally-authenticated UPN (e.g., guest users).
3913
- * Because a malicious party run your content in a browser, this value should
3914
- * be used only as a hint as to who the user is and never as proof of identity.
3915
- * This field is available only when the identity permission is requested in the manifest.
3947
+
3948
+ * Because a malicious party can run your content in a browser, this value should
3949
+ * be used only as a optimization hint as to who the user is and never as proof of identity.
3950
+ * Specifically, this value should never be used to determine if a user is authorized to access
3951
+ * a resource; access tokens should be used for that.
3952
+ * See {@link authentication.getAuthToken} and {@link authentication.authenticate} for more information on access tokens.
3916
3953
  */
3917
3954
  userPrincipalName?: string;
3918
3955
  /**
@@ -3926,9 +3963,12 @@ export namespace app {
3926
3963
  interface TenantInfo {
3927
3964
  /**
3928
3965
  * The Azure AD tenant ID of the current user.
3966
+
3929
3967
  * Because a malicious party can run your content in a browser, this value should
3930
- * be used only as a hint as to who the user is and never as proof of identity.
3931
- * This field is available only when the identity permission is requested in the manifest.
3968
+ * be used only as a optimization hint as to who the user is and never as proof of identity.
3969
+ * Specifically, this value should never be used to determine if a user is authorized to access
3970
+ * a resource; access tokens should be used for that.
3971
+ * See {@link authentication.getAuthToken} and {@link authentication.authenticate} for more information on access tokens.
3932
3972
  */
3933
3973
  id: string;
3934
3974
  /**
@@ -6382,24 +6422,54 @@ export namespace mail {
6382
6422
  Forward = "forward"
6383
6423
  }
6384
6424
  /**
6385
- * Base of a discriminated union between compose scenarios.
6425
+ * Foundational interface for all other mail compose interfaces
6426
+ * Used for holding the type of mail item being composed
6427
+ *
6428
+ * @see {@link ComposeMailType}
6386
6429
  */
6387
6430
  interface ComposeMailBase<T extends ComposeMailType> {
6388
6431
  type: T;
6389
6432
  }
6390
6433
  /**
6391
- * Interfaces for each type.
6434
+ * Parameters supplied when composing a new mail item
6392
6435
  */
6393
6436
  export interface ComposeNewParams extends ComposeMailBase<ComposeMailType.New> {
6437
+ /**
6438
+ * The To: recipients for the message
6439
+ */
6394
6440
  toRecipients?: string[];
6441
+ /**
6442
+ * The Cc: recipients for the message
6443
+ */
6395
6444
  ccRecipients?: string[];
6445
+ /**
6446
+ * The Bcc: recipients for the message
6447
+ */
6396
6448
  bccRecipients?: string[];
6449
+ /**
6450
+ * The subject of the message
6451
+ */
6397
6452
  subject?: string;
6453
+ /**
6454
+ * The body of the message
6455
+ */
6398
6456
  message?: string;
6399
6457
  }
6458
+ /**
6459
+ * Parameters supplied when composing a reply to or forward of a message
6460
+ *
6461
+ * @see {@link ComposeMailType}
6462
+ */
6400
6463
  export interface ComposeReplyOrForwardParams<T extends ComposeMailType> extends ComposeMailBase<T> {
6401
6464
  itemid: string;
6402
6465
  }
6466
+ /**
6467
+ * Parameters supplied to {@link composeMail} when composing a new mail item
6468
+ *
6469
+ * @see {@link ComposeNewParams}
6470
+ * @see {@link ComposeReplyOrForwardParams}
6471
+ * @see {@link ComposeMailType}
6472
+ */
6403
6473
  export type ComposeMailParams = ComposeNewParams | ComposeReplyOrForwardParams<ComposeMailType.Reply> | ComposeReplyOrForwardParams<ComposeMailType.ReplyAll> | ComposeReplyOrForwardParams<ComposeMailType.Forward>;
6404
6474
  export {};
6405
6475
  }
@@ -6679,40 +6749,6 @@ export interface ShowProfileRequestInternal {
6679
6749
  * @beta
6680
6750
  */
6681
6751
  export namespace video {
6682
- /**
6683
- * Represents a video frame
6684
- * @beta
6685
- */
6686
- interface VideoFrameData {
6687
- /**
6688
- * Video frame width
6689
- */
6690
- width: number;
6691
- /**
6692
- * Video frame height
6693
- */
6694
- height: number;
6695
- /**
6696
- * Video frame buffer
6697
- */
6698
- videoFrameBuffer: Uint8ClampedArray;
6699
- /**
6700
- * NV12 luma stride, valid only when video frame format is NV12
6701
- */
6702
- lumaStride?: number;
6703
- /**
6704
- * NV12 chroma stride, valid only when video frame format is NV12
6705
- */
6706
- chromaStride?: number;
6707
- /**
6708
- * RGB stride, valid only when video frame format is RGB
6709
- */
6710
- stride?: number;
6711
- /**
6712
- * The time stamp of the current video frame
6713
- */
6714
- timestamp?: number;
6715
- }
6716
6752
  /**
6717
6753
  * Video frame format enum, currently only support NV12
6718
6754
  * @beta
@@ -6738,17 +6774,12 @@ export namespace video {
6738
6774
  /**
6739
6775
  * Current video effect changed
6740
6776
  */
6741
- EffectChanged = 0,
6777
+ EffectChanged = "EffectChanged",
6742
6778
  /**
6743
6779
  * Disable the video effect
6744
6780
  */
6745
- EffectDisabled = 1
6781
+ EffectDisabled = "EffectDisabled"
6746
6782
  }
6747
- /**
6748
- * Video frame call back function definition
6749
- * @beta
6750
- */
6751
- type VideoFrameCallback = (frame: VideoFrameData, notifyVideoFrameProcessed: () => void, notifyError: (errorMessage: string) => void) => void;
6752
6783
  /**
6753
6784
  * Predefined failure reasons for preparing the selected video effect
6754
6785
  * @beta
@@ -6770,13 +6801,6 @@ export namespace video {
6770
6801
  * @beta
6771
6802
  */
6772
6803
  type VideoEffectCallback = (effectId: string | undefined) => Promise<void>;
6773
- /**
6774
- * Register to read the video frames in Permissions section
6775
- * @beta
6776
- * @param frameCallback - The callback to invoke when registerForVideoFrame has completed
6777
- * @param config - VideoFrameConfig to customize generated video frame parameters
6778
- */
6779
- function registerForVideoFrame(frameCallback: VideoFrameCallback, config: VideoFrameConfig): void;
6780
6804
  /**
6781
6805
  * Video extension should call this to notify host that the current selected effect parameter changed.
6782
6806
  * If it's pre-meeting, host will call videoEffectCallback immediately then use the videoEffect.
@@ -6804,7 +6828,7 @@ export namespace video {
6804
6828
  /**
6805
6829
  * @beta
6806
6830
  * Namespace to get video frames from a media stream.
6807
- * When the host supports this capability, developer should call {@link mediaStream.registerForVideoFrame} to get the video frames instead of {@link registerForVideoFrame} to get the video frames, callback of {@link registerForVideoFrame} will be ignored when the host supports this capability.
6831
+ * When the host supports this capability, developer should call {@link mediaStream.registerForVideoFrame} to get the video frames.
6808
6832
  */
6809
6833
  namespace mediaStream {
6810
6834
  /**
@@ -6851,6 +6875,68 @@ export namespace video {
6851
6875
  */
6852
6876
  function registerForVideoFrame(frameCallback: VideoFrameCallback): void;
6853
6877
  }
6878
+ /**
6879
+ * @beta
6880
+ * Namespace to get shared video framed.
6881
+ * When the host supports this capability, developer should call {@link sharedFrame.registerForVideoFrame} to get the video frames.
6882
+ */
6883
+ namespace sharedFrame {
6884
+ /**
6885
+ * Checks if video.sharedFrame capability is supported by the host
6886
+ * @beta
6887
+ * @returns boolean to represent whether the video capability is supported
6888
+ *
6889
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
6890
+ *
6891
+ */
6892
+ function isSupported(): boolean;
6893
+ /**
6894
+ * Represents a video frame
6895
+ * @beta
6896
+ */
6897
+ interface VideoFrameData {
6898
+ /**
6899
+ * Video frame width
6900
+ */
6901
+ width: number;
6902
+ /**
6903
+ * Video frame height
6904
+ */
6905
+ height: number;
6906
+ /**
6907
+ * Video frame buffer
6908
+ */
6909
+ videoFrameBuffer: Uint8ClampedArray;
6910
+ /**
6911
+ * NV12 luma stride, valid only when video frame format is NV12
6912
+ */
6913
+ lumaStride?: number;
6914
+ /**
6915
+ * NV12 chroma stride, valid only when video frame format is NV12
6916
+ */
6917
+ chromaStride?: number;
6918
+ /**
6919
+ * RGB stride, valid only when video frame format is RGB
6920
+ */
6921
+ stride?: number;
6922
+ /**
6923
+ * The time stamp of the current video frame
6924
+ */
6925
+ timestamp?: number;
6926
+ }
6927
+ /**
6928
+ * Video frame call back function definition
6929
+ * @beta
6930
+ */
6931
+ type VideoFrameCallback = (frame: VideoFrameData, notifyVideoFrameProcessed: () => void, notifyError: (errorMessage: string) => void) => void;
6932
+ /**
6933
+ * Register to read the video frames in Permissions section
6934
+ * @beta
6935
+ * @param frameCallback - The callback to invoke when registerForVideoFrame has completed
6936
+ * @param config - VideoFrameConfig to customize generated video frame parameters
6937
+ */
6938
+ function registerForVideoFrame(frameCallback: VideoFrameCallback, config: VideoFrameConfig): void;
6939
+ }
6854
6940
  }
6855
6941
 
6856
6942
  /**
@@ -7097,7 +7183,7 @@ export namespace call {
7097
7183
  * @remarks
7098
7184
  * Currently the User ID field supports the Azure AD UserPrincipalName,
7099
7185
  * typically an email address, or in case of a PSTN call, it supports a pstn
7100
- * mri 4:<phonenumber>.
7186
+ * mri 4:\<phonenumber>.
7101
7187
  */
7102
7188
  targets: string[];
7103
7189
  /**
@@ -7566,7 +7652,7 @@ export namespace tasks {
7566
7652
  function submitTask(result?: string | object, appIds?: string | string[]): void;
7567
7653
  /**
7568
7654
  * Sets the height and width of the {@link TaskInfo} object to the original height and width, if initially specified,
7569
- * otherwise uses the height and width values corresponding to {@link TaskModuleDimension | TaskModuleDimension.Small}
7655
+ * otherwise uses the height and width values corresponding to {@link DialogDimension | TaskModuleDimension.Small}
7570
7656
  * @param taskInfo TaskInfo object from which to extract size info, if specified
7571
7657
  * @returns TaskInfo with height and width specified
7572
7658
  */