Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add content safety to smoke test #1975

Merged
merged 12 commits into from
Aug 18, 2023
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"mainEntryPointFilePath": "./types/index.d.ts",
"mainEntryPointFilePath": "./types/src/index.d.ts",
"docModel": { "enabled": true },
"apiReport": { "enabled": true, "reportFolder": "./review" },
"dtsRollup": {
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,25 @@
"description": "ContentSafety Service",
"keywords": ["node", "azure", "cloud", "typescript", "browser", "isomorphic"],
"license": "MIT",
"type": "module",
"main": "dist/index.js",
"module": "./dist-esm/index.js",
"module": "./dist-esm/src/index.js",
"types": "./types/ai-content-safety.d.ts",
"exports": {
".": {
"types": "./types/src/index.d.ts",
"require": "./dist/index.cjs",
"import": "./dist-esm/src/index.js"
},
"./api": {
"types": "./types/src/api/index.d.ts",
"import": "./dist-esm/src/api/index.js"
},
"./models": {
"types": "./types/src/models/index.d.ts",
"import": "./dist-esm/src/models/index.js"
}
},
"repository": "github:Azure/azure-sdk-for-js",
"bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" },
"files": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
## API Report File for "@azure-rest/ai-content-safety"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts

import { ClientOptions } from '@azure-rest/core-client';
import { KeyCredential } from '@azure/core-auth';
import { OperationOptions } from '@azure-rest/core-client';
import { TokenCredential } from '@azure/core-auth';

// @public
export interface AddOrUpdateBlockItemsOptions {
blockItems: TextBlockItemInfo[];
}

// @public (undocumented)
export interface AddOrUpdateBlockItemsOptions {
blockItems: TextBlockItemInfo[];
}

// @public
export interface AddOrUpdateBlockItemsResult {
value?: TextBlockItem[];
}

// @public
export interface AnalyzeImageOptions {
categories?: ImageCategory[];
image: ImageData_2;
outputType?: AnalyzeImageOutputType;
}

// @public
export type AnalyzeImageOutputType = string;

// @public
export interface AnalyzeImageResult {
analyzeResults: ImageAnalyzeSeverityResult[];
}

// @public
export interface AnalyzeTextOptions {
blocklistNames?: string[];
breakByBlocklists?: boolean;
categories?: TextCategory[];
outputType?: AnalyzeTextOutputType;
text: string;
}

// @public
export type AnalyzeTextOutputType = string;

// @public
export interface AnalyzeTextResult {
analyzeResults: TextAnalyzeSeverityResult[];
blocklistsMatchResults?: TextBlocklistMatchResult[];
}

// @public (undocumented)
export class ContentSafetyClient {
constructor(endpoint: string, credential: KeyCredential | TokenCredential, options?: ContentSafetyClientOptions);
// Warning: (ae-forgotten-export) The symbol "AddOrUpdateBlockItemsOptions_2" needs to be exported by the entry point index.d.ts
addOrUpdateBlockItems(blockItems: TextBlockItemInfo[], blocklistName: string, options?: AddOrUpdateBlockItemsOptions_2): Promise<AddOrUpdateBlockItemsResult>;
// Warning: (ae-forgotten-export) The symbol "AnalyzeImageOptions_2" needs to be exported by the entry point index.d.ts
analyzeImage(image: ImageData_2, options?: AnalyzeImageOptions_2): Promise<AnalyzeImageResult>;
// Warning: (ae-forgotten-export) The symbol "AnalyzeTextOptions_2" needs to be exported by the entry point index.d.ts
analyzeText(text: string, options?: AnalyzeTextOptions_2): Promise<AnalyzeTextResult>;
createOrUpdateTextBlocklist(blocklistName: string, options?: CreateOrUpdateTextBlocklistOptions): Promise<TextBlocklist>;
deleteTextBlocklist(blocklistName: string, options?: DeleteTextBlocklistOptions): Promise<void>;
getTextBlocklist(blocklistName: string, options?: GetTextBlocklistOptions): Promise<TextBlocklist>;
getTextBlocklistItem(blocklistName: string, blockItemId: string, options?: GetTextBlocklistItemOptions): Promise<TextBlockItem>;
listTextBlocklistItems(blocklistName: string, options?: ListTextBlocklistItemsOptions): Promise<TextBlockItemListResult>;
listTextBlocklists(options?: ListTextBlocklistsOptions): Promise<TextBlocklistResult>;
// Warning: (ae-forgotten-export) The symbol "RemoveBlockItemsOptions_2" needs to be exported by the entry point index.d.ts
removeBlockItems(blockItemIds: string[], blocklistName: string, options?: RemoveBlockItemsOptions_2): Promise<void>;
}

// @public (undocumented)
export interface ContentSafetyClientOptions extends ClientOptions {
}

// @public (undocumented)
export interface CreateOrUpdateTextBlocklistOptions extends OperationOptions {
contentType?: string;
description?: string;
}

// @public (undocumented)
export interface DeleteTextBlocklistOptions extends OperationOptions {
}

// @public (undocumented)
export interface GetTextBlocklistItemOptions extends OperationOptions {
}

// @public (undocumented)
export interface GetTextBlocklistOptions extends OperationOptions {
}

// @public
export interface ImageAnalyzeSeverityResult {
category: ImageCategory;
severity?: number;
}

// @public
export type ImageCategory = string;

// @public
interface ImageData_2 {
blobUrl?: string;
content?: Uint8Array;
}
export { ImageData_2 as ImageData }

// @public (undocumented)
export interface ListTextBlocklistItemsOptions extends OperationOptions {
maxpagesize?: number;
skip?: number;
top?: number;
}

// @public (undocumented)
export interface ListTextBlocklistsOptions extends OperationOptions {
}

// @public
export interface RemoveBlockItemsOptions {
blockItemIds: string[];
}

// @public (undocumented)
export interface RemoveBlockItemsOptions {
blockItemIds: string[];
}

// @public
export interface TextAnalyzeSeverityResult {
category: TextCategory;
severity?: number;
}

// @public
export interface TextBlockItem {
readonly blockItemId: string;
description?: string;
text: string;
}

// @public
export interface TextBlockItemInfo {
description?: string;
text: string;
}

// @public
export interface TextBlockItemListResult {
nextLink?: string;
value: TextBlockItem[];
}

// @public
export interface TextBlocklist {
readonly blocklistName: string;
description?: string;
}

// @public
export interface TextBlocklistMatchResult {
blockItemId: string;
blockItemText: string;
blocklistName: string;
}

// @public
export interface TextBlocklistResult {
nextLink?: string;
value: TextBlocklist[];
}

// @public
export type TextCategory = string;

// (No @packageDocumentation comment for this package)

```
Loading
Loading