Skip to content

Commit

Permalink
Merge branch 'main' into southworks/delete/ms-rest-js-botbuilder-ai
Browse files Browse the repository at this point in the history
  • Loading branch information
JhontSouth committed Nov 8, 2023
2 parents 9150495 + 36fc0d0 commit 1d9a400
Show file tree
Hide file tree
Showing 56 changed files with 4,729 additions and 1,811 deletions.
14 changes: 7 additions & 7 deletions libraries/adaptive-expressions-ie11/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
"terser-webpack-plugin": "^4.2.3"
},
"devDependencies": {
"@babel/core": "^7.6.4",
"@babel/plugin-proposal-class-properties": "^7.5.5",
"@babel/plugin-proposal-decorators": "^7.6.0",
"@babel/plugin-transform-runtime": "^7.6.2",
"@babel/preset-env": "^7.6.3",
"@babel/preset-typescript": "^7.6.0",
"@babel/runtime": "^7.6.3",
"@babel/core": "^7.23.2",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-proposal-decorators": "^7.23.2",
"@babel/plugin-transform-runtime": "^7.23.2",
"@babel/preset-env": "^7.23.2",
"@babel/preset-typescript": "^7.23.2",
"@babel/runtime": "^7.23.2",
"babel-loader": "^8.0.6",
"ts-loader": "^7.0.5",
"typescript": "3.5.3",
Expand Down
3 changes: 0 additions & 3 deletions libraries/botbuilder-ai/src/luisRuntimeClientContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/

import { ServiceClient, ServiceClientCredentials, ServiceClientOptions } from '@azure/core-http';
Expand Down
268 changes: 268 additions & 0 deletions libraries/botbuilder-ai/src/luisV2-models/luisModels.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,268 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*/

import { RequestOptionsBase, HttpResponse } from '@azure/core-http';

/**
* Represents an intent prediction.
*/
export interface Intent {
/**
* The score of the fired intent.
*/
score?: number;
/**
* The prediction of the dispatched application.
*/
childApp?: Prediction;
}

/**
* The result of the sentiment analysis.
*/
export interface Sentiment {
/**
* The label of the sentiment analysis result.
*/
label?: string;
/**
* The sentiment score of the query.
*/
score: number;
}

/**
* Represents the prediction of a query.
*/
export interface Prediction {
/**
* The query after pre-processing and normalization.
*/
normalizedQuery: string;
/**
* The query after spell checking. Only set if spell check was enabled and a spelling mistake was
* found.
*/
alteredQuery?: string;
/**
* The name of the top scoring intent.
*/
topIntent: string;
/**
* A dictionary representing the intents that fired.
*/
intents: { [propertyName: string]: Intent };
/**
* The dictionary representing the entities that fired.
*/
entities: { [propertyName: string]: any };
/**
* The result of the sentiment analysis.
*/
sentiment?: Sentiment;
}

/**
* Represents the prediction response.
*/
export interface PredictionResponse {
/**
* The query used in the prediction.
*/
query: string;
/**
* The prediction of the requested query.
*/
prediction: Prediction;
}

/**
* Represents the definition of the error that occurred.
*/
export interface ErrorBody {
/**
* The error code.
*/
code: string;
/**
* The error message.
*/
message: string;
}

/**
* Represents the error that occurred.
*/
export interface ErrorModel {
error: ErrorBody;
}

/**
* The custom options for the prediction request.
*/
export interface PredictionRequestOptions {
/**
* The reference DateTime used for predicting datetime entities.
*/
datetimeReference?: Date;
/**
* Whether to make the external entities resolution override the predictions if an overlap
* occurs.
*/
overridePredictions?: boolean;
}

/**
* Defines a user predicted entity that extends an already existing one.
*/
export interface ExternalEntity {
/**
* The name of the entity to extend.
*/
entityName: string;
/**
* The start character index of the predicted entity.
*/
startIndex: number;
/**
* The length of the predicted entity.
*/
entityLength: number;
/**
* A user supplied custom resolution to return as the entity's prediction.
*/
resolution?: any;
}

/**
* Defines a sub-list to append to an existing list entity.
*/
export interface RequestList {
/**
* The name of the sub-list.
*/
name?: string;
/**
* The canonical form of the sub-list.
*/
canonicalForm: string;
/**
* The synonyms of the canonical form.
*/
synonyms?: string[];
}

/**
* Defines an extension for a list entity.
*/
export interface DynamicList {
/**
* The name of the list entity to extend.
*/
listEntityName: string;
/**
* The lists to append on the extended list entity.
*/
requestLists: RequestList[];
}

/**
* Represents the prediction request parameters.
*/
export interface PredictionRequest {
/**
* The query to predict.
*/
query: string;
/**
* The custom options defined for this request.
*/
options?: PredictionRequestOptions;
/**
* The externally predicted entities for this request.
*/
externalEntities?: ExternalEntity[];
/**
* The dynamically created list entities for this request.
*/
dynamicLists?: DynamicList[];
}

/**
* Optional Parameters.
*/
export interface PredictionGetVersionPredictionOptionalParams extends RequestOptionsBase {
/**
* Indicates whether to get extra metadata for the entities predictions or not.
*/
verbose?: boolean;
/**
* Indicates whether to return all the intents in the response or just the top intent.
*/
showAllIntents?: boolean;
/**
* Indicates whether to log the endpoint query or not.
*/
log?: boolean;
}

/**
* Optional Parameters.
*/
export interface PredictionGetSlotPredictionOptionalParams extends RequestOptionsBase {
/**
* Indicates whether to get extra metadata for the entities predictions or not.
*/
verbose?: boolean;
/**
* Indicates whether to return all the intents in the response or just the top intent.
*/
showAllIntents?: boolean;
/**
* Indicates whether to log the endpoint query or not.
*/
log?: boolean;
}

/**
* Contains response data for the getVersionPrediction operation.
*/
export type PredictionGetVersionPredictionResponse = PredictionResponse & {
/**
* The underlying HTTP response.
*/
_response: HttpResponse & {
/**
* The response body as text (string format)
*/
bodyAsText: string;

/**
* The response body as parsed JSON or XML
*/
parsedBody: PredictionResponse;
};
};

/**
* Contains response data for the getSlotPrediction operation.
*/
export type PredictionGetSlotPredictionResponse = PredictionResponse & {
/**
* The underlying HTTP response.
*/
_response: HttpResponse & {
/**
* The response body as text (string format)
*/
bodyAsText: string;

/**
* The response body as parsed JSON or XML
*/
parsedBody: PredictionResponse;
};
};
16 changes: 16 additions & 0 deletions libraries/botbuilder/etc/botbuilder.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
```ts

import { AceRequest } from 'botbuilder-core';
import { Activity } from 'botbuilder-core';
import { ActivityHandler } from 'botbuilder-core';
import { ActivityHandlerBase } from 'botbuilder-core';
Expand All @@ -22,6 +23,7 @@ import { BotFrameworkClient } from 'botbuilder-core';
import { BotFrameworkSkill } from 'botbuilder-core';
import { BotState } from 'botbuilder-core';
import { CancelOperationResponse } from 'botframework-connector';
import { CardViewResponse } from 'botbuilder-core';
import { ChannelAccount } from 'botbuilder-core';
import { ChannelInfo } from 'botbuilder-core';
import { ClaimsIdentity } from 'botframework-connector';
Expand All @@ -39,6 +41,8 @@ import { ConversationState } from 'botbuilder-core';
import { CoreAppCredentials } from 'botbuilder-core';
import { ExtendedUserTokenProvider } from 'botbuilder-core';
import { FileConsentCardResponse } from 'botbuilder-core';
import { GetPropertyPaneConfigurationResponse } from 'botbuilder-core';
import { HandleActionResponse } from 'botbuilder-core';
import { HttpClient } from '@azure/ms-rest-js';
import { HttpOperationResponse } from '@azure/ms-rest-js';
import { ICredentialProvider } from 'botframework-connector';
Expand All @@ -63,9 +67,11 @@ import { O365ConnectorCardActionQuery } from 'botbuilder-core';
import { OnBehalfOf } from 'botbuilder-core';
import { PagedMembersResult } from 'botbuilder-core';
import { PagedResult } from 'botbuilder-core';
import { QuickViewResponse } from 'botbuilder-core';
import { ReadReceiptInfo } from 'botframework-connector';
import { RequestHandler } from 'botframework-streaming';
import { ResourceResponse } from 'botbuilder-core';
import { SetPropertyPaneConfigurationResponse } from 'botbuilder-core';
import { SigninStateVerificationQuery } from 'botbuilder-core';
import { SignInUrlResponse } from 'botframework-connector';
import { SimpleCredentialProvider } from 'botframework-connector';
Expand Down Expand Up @@ -338,6 +344,16 @@ export class SetSpeakMiddleware implements Middleware {
onTurn(turnContext: TurnContext, next: () => Promise<void>): Promise<void>;
}

// @public
export class SharePointActivityHandler extends ActivityHandler {
protected onInvokeActivity(context: TurnContext): Promise<InvokeResponse>;
protected onSharePointTaskGetCardViewAsync(_context: TurnContext, _aceRequest: AceRequest): Promise<CardViewResponse>;
protected onSharePointTaskGetPropertyPaneConfigurationAsync(_context: TurnContext, _aceRequest: AceRequest): Promise<GetPropertyPaneConfigurationResponse>;
protected onSharePointTaskGetQuickViewAsync(_context: TurnContext, _aceRequest: AceRequest): Promise<QuickViewResponse>;
protected onSharePointTaskHandleActionAsync(_context: TurnContext, _aceRequest: AceRequest): Promise<HandleActionResponse>;
protected onSharePointTaskSetPropertyPaneConfigurationAsync(_context: TurnContext, _aceRequest: AceRequest): Promise<SetPropertyPaneConfigurationResponse>;
}

// @public @deprecated (undocumented)
export class SkillHandler extends ChannelServiceHandler {
constructor(adapter: BotAdapter, bot: ActivityHandlerBase, conversationIdFactory: SkillConversationIdFactoryBase, credentialProvider: ICredentialProvider, authConfig: AuthenticationConfiguration, channelService?: string);
Expand Down
1 change: 1 addition & 0 deletions libraries/botbuilder/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ export { HandoffEventNames } from './handoffEventNames';
export { Request, Response, WebRequest, WebResponse } from './interfaces';
export { StatusCodeError } from './statusCodeError';
export { StreamingHttpClient, TokenResolver } from './streaming';
export { SharePointActivityHandler } from './sharepoint/sharePointActivityHandler';
Loading

0 comments on commit 1d9a400

Please sign in to comment.