Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@openfin/microsoft365

Package Overview
Dependencies
Maintainers
59
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@openfin/microsoft365 - npm Package Compare versions

Comparing version
1.0.1
to
1.1.0-beta.1
openfin.ms365.cjs

Sorry, the diff of this file is too big to display

+32
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
/*!
LZ-UTF8 v0.6.3
Copyright (c) 2021, Rotem Dan
Released under the MIT license.
Build date: 2022-07-06
Please report any issue at https://github.com/rotemdan/lzutf8.js/issues
*/
/*! For license information please see openfin.oauth.js.LICENSE.txt */
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
/**
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/

Sorry, the diff of this file is too big to display

/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
/*!
LZ-UTF8 v0.6.3
Copyright (c) 2021, Rotem Dan
Released under the MIT license.
Build date: 2022-07-06
Please report any issue at https://github.com/rotemdan/lzutf8.js/issues
*/
/*! For license information please see openfin.oauth.js.LICENSE.txt */
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
/**
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
+12
-5
{
"name": "@openfin/microsoft365",
"description": "Connect OpenFin Container with Microsoft 365",
"version": "1.0.1",
"type": "module",
"sideEffects": true,
"version": "1.1.0-beta.1",
"author": "OpenFin Inc.",

@@ -14,4 +12,13 @@ "homepage": "https://www.openfin.co/",

"license": "SEE LICENSE IN LICENSE.MD",
"main": "openfin.ms365.js",
"types": "types/index.d.ts",
"exports": {
".": {
"types": "./types/index.d.ts",
"import": "./openfin.ms365.mjs",
"require": "./openfin.ms365.cjs"
}
},
"types": "./types/index.d.ts",
"module": "./openfin.ms365.mjs",
"main": "./openfin.ms365.cjs",
"sideEffects": true,
"dependencies": {

@@ -18,0 +25,0 @@ "@finos/fdc3": "^1.2.0",

@@ -19,1 +19,18 @@ import { AuthFlowParams, AuthWindowOptions } from '@openfin/oauth';

export declare const connect: (clientId: string, tenantId: string, redirectUri: string, permissions?: string[], authFlowParams?: AuthFlowParams, authWindowOptions?: AuthWindowOptions) => Promise<Microsoft365Connection>;
/**
* Retrieves a connection to a Salesforce org, assuming the user is currently authenticated to Salesforce and the {@link https://help.salesforce.com/articleView?id=sf.connected_app_overview.htm | Connected App} has been previously authorized.
*
* Unlike {@link connect}, if a connection could not be established because the user is not authenticated to Salesforce or the {@link https://help.salesforce.com/articleView?id=sf.connected_app_overview.htm | Connected App} has not been authorized, the function simply returns `null` and does not throw an error.
*
* @param orgUrl - The URL of the Salesforce org to connect to, which should be in the form: https://*MyDomainName*.my.salesforce.com.
* @param consumerKey - The Consumer Key of the {@link https://help.salesforce.com/articleView?id=sf.connected_app_overview.htm | Connected App} to use for authorization.
* @param scope - Provide any additional OAuth {@link https://help.salesforce.com/s/articleView?id=sf.remoteaccess_oauth_tokens_scopes.htm | scopes} that may be required by your app.
*
* @returns A {@link SalesforceConnection | connection}, or `null` if the user is not authenticated to Salesforce or the {@link https://help.salesforce.com/articleView?id=sf.connected_app_overview.htm | Connected App} has not been authorized.
*
* @throws {@link AuthorizationError} if the authorization process does not complete successfully for any reason other than the user is not authenticated to Salesforce or the {@link https://help.salesforce.com/articleView?id=sf.connected_app_overview.htm | Connected App} has not been authorized.
* @throws {@link ParameterError} if invalid function parameter values are detected.
*/
export declare const getConnection: (clientId: string, tenantId: string, redirectUri: string, permissions?: string[]) => Promise<null | Microsoft365Connection>;
export declare const initProvider: (clientId: string, tenantId: string, redirectUri: string, permissions: string[]) => Promise<void>;
export declare const resetProvider: () => void;

@@ -6,2 +6,4 @@ import { ApiRequestHeaders, HttpMethod } from '@openfin/oauth';

* A connection to a Microsoft 365 instance.
*
* @group Types
*/

@@ -8,0 +10,0 @@ export type Microsoft365Connection = {

import { ApiError } from '@openfin/oauth';
/**
* Describes errors thrown when calling {@link https://developers.openfin.co/of-docs/docs/interoperability-overview | interop} functionality.
*
* @group Errors
*/

@@ -5,0 +7,0 @@ export declare class InteropError extends ApiError {

@@ -6,3 +6,3 @@ /**

*/
export { connect } from './connection/connection';
export { connect, getConnection } from './connection/connection';
export { Microsoft365Connection } from './connection/connection.types';

@@ -9,0 +9,0 @@ export * from './errors/errors';

@@ -0,1 +1,2 @@

import type OpenFin from '@openfin/core';
import { Microsoft365Connection } from '../../connection/connection.types';

@@ -20,5 +21,6 @@ import { ChannelChatOptions, GroupChatOptions, ShareChartOptions, ShareInstrumentOptions, TeamChannelResult, TeamsIntentHandlersSubscription, UserResult } from './teams.types';

*
* @param webUrl - A web URL that was retrieved from a Teams endpoint of the Graph API.
* @param url - A web URL that was retrieved from a Teams endpoint of the Graph API.
* @param viewIdentity - The identity of the view in which to open the URL. If not provided, the URL will be opened in the default browser.
*/
openUrl(webUrl: string): Promise<void>;
openUrl(url: string, viewIdentity?: OpenFin.Identity): Promise<void>;
/**

@@ -55,2 +57,3 @@ * When working with {@link https://developers.openfin.co/of-docs/docs/interop-apis | Interop} or {@link https://fdc3.finos.org/docs/api/spec | FDC3} APIs, adds support for Teams to respond to appropriate FDC3 {@link https://developers.openfin.co/of-docs/docs/interoperability-overview#intent | intents}, namely {@link https://fdc3.finos.org/docs/intents/ref/StartCall | StartCall} and {@link https://fdc3.finos.org/docs/intents/ref/StartChat | StartChat}.

* @param withVideo - Determines whether the caller’s camera will be turned on when making the call (defaults to `false`).
* @param viewIdentity - The identity of the view in which to start the call. If not provided, the call will be started in the default browser.
*

@@ -62,3 +65,3 @@ * @returns An array of resolved users indexed as per their email address provided in the `emailAddresses` parameter. If any user could not be resolved, `undefined` is returned at the corresponding index instead.

*/
startCall(emailAddresses?: string[], withVideo?: boolean): Promise<(UserResult | undefined)[]>;
startCall(emailAddresses?: string[], withVideo?: boolean, viewIdentity?: OpenFin.Identity): Promise<(UserResult | undefined)[]>;
/**

@@ -72,2 +75,3 @@ * Starts a Teams channel chat or group chat by providing a list of email addresses or team/channel IDs.

* @param options - Required options for starting a channel chat or a group chat.
* @param viewIdentity - The identity of the view in which to start the chat. If not provided, the chat will be started in the default browser.
*

@@ -79,3 +83,3 @@ * @returns When starting a group chat, the returned promise resolves to an array of resolved users indexed as per their email address provided in the `emailAddresses` parameter. If any user could not be resolved, `undefined` is returned at the corresponding index instead. When starting a channel chat, the returned promise resolves to an object describing the resolved team and channel. If the IDs provided do not resolve to an existing team/channel then the promise will resolve with `undefined`.

*/
startChat(options: ChannelChatOptions | GroupChatOptions): Promise<TeamChannelResult | (UserResult | undefined)[] | undefined>;
startChat(options: ChannelChatOptions | GroupChatOptions, viewIdentity?: OpenFin.Identity): Promise<TeamChannelResult | (UserResult | undefined)[] | undefined>;
}
import * as Graph from '@microsoft/microsoft-graph-types';
import OpenFin from '@openfin/core';
import type OpenFin from '@openfin/core';
import { Microsoft365Provider } from '../../provider/provider';

@@ -4,0 +4,0 @@ import { ChannelChatOptions, GroupChatOptions, ShareChartOptions, ShareInstrumentOptions, TeamChannelResult, UserResult } from './teams.types';

@@ -1,4 +0,6 @@

import OpenFin from '@openfin/core';
import type OpenFin from '@openfin/core';
/**
* Options provided to the {@link TeamsConnection.startChat} function to start a Teams channel chat.
*
* @group Types
*/

@@ -13,2 +15,4 @@ export type ChannelChatOptions = {

* Options provided to the {@link TeamsConnection.startChat} function to start a Teams group chat.
*
* @group Types
*/

@@ -25,2 +29,4 @@ export type GroupChatOptions = {

* Options provided to the {@link TeamsConnection.share} function to share a chart to a Teams chat.
*
* @group Types
*/

@@ -41,2 +47,4 @@ export type ShareChartOptions = {

* Options provided to the {@link TeamsConnection.share} function to share financial instrument price information to a Teams chat.
*
* @group Types
*/

@@ -63,2 +71,4 @@ export type ShareInstrumentOptions = {

* Channel information resolved by a Teams API function.
*
* @group Types
*/

@@ -77,2 +87,4 @@ export type TeamChannelResult = {

* Team/channel IDs provided to the {@link TeamsConnection.share} function to share to a Teams channel chat.
*
* @group Types
*/

@@ -87,2 +99,4 @@ export type TeamChannelTarget = {

* Subscription returned when calling {@link TeamsConnection.registerIntentHandlers}.
*
* @group Types
*/

@@ -105,2 +119,4 @@ export type TeamsIntentHandlersSubscription = {

* User information resolved by a Teams API function.
*
* @group Types
*/

@@ -107,0 +123,0 @@ export type UserResult = {

import * as Graph from '@microsoft/microsoft-graph-types';
import { AuthFlowParams, AuthServerMetadata, AuthWindowOptions, Logger, OAuthProvider, OAuthWorker } from '@openfin/oauth';
import { AuthFlowParams, AuthServerDiscoveryInfo, AuthServerMetadata, AuthWindowOptions, Logger, OAuthProvider, OAuthWorker } from '@openfin/oauth';
/**

@@ -17,4 +17,5 @@ * @internal

authorize(redirectUri: string, authFlowParams?: AuthFlowParams, authWindowOptions?: AuthWindowOptions): Promise<void>;
close(): Promise<void>;
getErrorMessageFromServerResponse(response: any): string | undefined;
static init(metadataUrl: string, apiOrigin: string, clientId: string, logPrefix: string, tenantId: string, redirectUri: string, permissions: string[]): Promise<Microsoft365Provider>;
static init(authServerMetadataInfo: AuthServerDiscoveryInfo, apiOrigin: string, clientId: string, logPrefix: string, tenantId: string, redirectUri: string, permissions: string[]): Promise<Microsoft365Provider>;
}

@@ -39,2 +39,4 @@ import { ApiRequestHeaders, HttpMethod } from '@openfin/oauth';

* @typeParam T - Type of the requested data (if relevant).
*
* @group Types
*/

@@ -53,2 +55,4 @@ export type GraphResponse<T = unknown> = {

* Note: This type is not intended to be imported and used, instead import `User` type from the {@link https://www.npmjs.com/package/@microsoft/microsoft-graph-types | @microsoft/microsoft-graph-types} NPM package.
*
* @group Types
*/

@@ -55,0 +59,0 @@ export type GraphUser = {

@@ -1,1 +0,1 @@

export declare const API_VERSION = "1.0.1";
export declare const API_VERSION = "1.1.0-beta.1";

Sorry, the diff of this file is too big to display