Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 19 additions & 6 deletions sdk/contentsafety/ai-content-safety-rest/api-extractor.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,31 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"mainEntryPointFilePath": "./types/src/index.d.ts",
"docModel": { "enabled": true },
"apiReport": { "enabled": true, "reportFolder": "./review" },
"docModel": {
"enabled": true
},
"apiReport": {
"enabled": true,
"reportFolder": "./review"
},
"dtsRollup": {
"enabled": true,
"untrimmedFilePath": "",
"publicTrimmedFilePath": "./types/ai-content-safety.d.ts"
},
"messages": {
"tsdocMessageReporting": { "default": { "logLevel": "none" } },
"tsdocMessageReporting": {
"default": {
"logLevel": "none"
}
},
"extractorMessageReporting": {
"ae-missing-release-tag": { "logLevel": "none" },
"ae-unresolved-link": { "logLevel": "none" }
"ae-missing-release-tag": {
"logLevel": "none"
},
"ae-unresolved-link": {
"logLevel": "none"
}
}
}
}
}
2 changes: 1 addition & 1 deletion sdk/contentsafety/ai-content-safety-rest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,4 @@
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure-rest/ai-content-safety?view=azure-node-preview"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,52 +15,52 @@ import { PathUncheckedResponse } from '@azure-rest/core-client';
import { RawHttpHeaders } from '@azure/core-rest-pipeline';
import { RequestParameters } from '@azure-rest/core-client';
import { StreamableMethod } from '@azure-rest/core-client';
import { TokenCredential } from '@azure/core-auth';

// @public (undocumented)
export interface AddBlockItems {
post(options?: AddBlockItemsParameters): StreamableMethod<AddBlockItems200Response | AddBlockItemsDefaultResponse>;
export interface AddOrUpdateBlocklistItems {
post(options: AddOrUpdateBlocklistItemsParameters): StreamableMethod<AddOrUpdateBlocklistItems200Response | AddOrUpdateBlocklistItemsDefaultResponse>;
}

// @public
export interface AddBlockItems200Response extends HttpResponse {
export interface AddOrUpdateBlocklistItems200Response extends HttpResponse {
// (undocumented)
body: AddBlockItemsResultOutput;
body: AddOrUpdateTextBlocklistItemsResultOutput;
// (undocumented)
status: "200";
}

// @public (undocumented)
export interface AddBlockItemsBodyParam {
// (undocumented)
body?: AddBlockItemsOptions;
export interface AddOrUpdateBlocklistItemsBodyParam {
body: AddOrUpdateTextBlocklistItemsOptions;
}

// @public (undocumented)
export interface AddBlockItemsDefaultHeaders {
export interface AddOrUpdateBlocklistItemsDefaultHeaders {
"x-ms-error-code"?: string;
}

// @public (undocumented)
export interface AddBlockItemsDefaultResponse extends HttpResponse {
export interface AddOrUpdateBlocklistItemsDefaultResponse extends HttpResponse {
// (undocumented)
body: ErrorResponse;
// (undocumented)
headers: RawHttpHeaders & AddBlockItemsDefaultHeaders;
headers: RawHttpHeaders & AddOrUpdateBlocklistItemsDefaultHeaders;
// (undocumented)
status: string;
}

// @public (undocumented)
export type AddOrUpdateBlocklistItemsParameters = AddOrUpdateBlocklistItemsBodyParam & RequestParameters;

// @public
export interface AddBlockItemsOptions {
blockItems: Array<TextBlockItemInfo>;
export interface AddOrUpdateTextBlocklistItemsOptions {
blocklistItems: Array<TextBlocklistItem>;
}

// @public (undocumented)
export type AddBlockItemsParameters = AddBlockItemsBodyParam & RequestParameters;

// @public
export interface AddBlockItemsResultOutput {
value?: Array<TextBlockItemOutput>;
export interface AddOrUpdateTextBlocklistItemsResultOutput {
blocklistItems: Array<TextBlocklistItemOutput>;
}

// @public (undocumented)
Expand Down Expand Up @@ -100,23 +100,22 @@ export interface AnalyzeImageDefaultResponse extends HttpResponse {
export interface AnalyzeImageOptions {
categories?: string[];
image: ImageData_2;
outputType?: string;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jeremymeng I remember this ImageData_2 issue is fixed, do you have any idea this issue is back again?

I believe we only have one ImageData defined.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MaryGao It's the annoying api-extractor behavior and I don't remember we ever get to the bottom of this.

}

// @public
export interface AnalyzeImageOptionsOutput {
categories?: string[];
image: ImageDataOutput;
outputType?: string;
}

// @public (undocumented)
export type AnalyzeImageParameters = AnalyzeImageBodyParam & RequestParameters;

// @public
export interface AnalyzeImageResultOutput {
hateResult?: ImageAnalyzeSeverityResultOutput;
selfHarmResult?: ImageAnalyzeSeverityResultOutput;
sexualResult?: ImageAnalyzeSeverityResultOutput;
violenceResult?: ImageAnalyzeSeverityResultOutput;
categoriesAnalysis: Array<ImageCategoriesAnalysisOutput>;
}

// @public (undocumented)
Expand Down Expand Up @@ -155,16 +154,18 @@ export interface AnalyzeTextDefaultResponse extends HttpResponse {
// @public
export interface AnalyzeTextOptions {
blocklistNames?: string[];
breakByBlocklists?: boolean;
categories?: string[];
haltOnBlocklistHit?: boolean;
outputType?: string;
text: string;
}

// @public
export interface AnalyzeTextOptionsOutput {
blocklistNames?: string[];
breakByBlocklists?: boolean;
categories?: string[];
haltOnBlocklistHit?: boolean;
outputType?: string;
text: string;
}

Expand All @@ -173,11 +174,8 @@ export type AnalyzeTextParameters = AnalyzeTextBodyParam & RequestParameters;

// @public
export interface AnalyzeTextResultOutput {
blocklistsMatchResults?: Array<TextBlocklistMatchResultOutput>;
hateResult?: TextAnalyzeSeverityResultOutput;
selfHarmResult?: TextAnalyzeSeverityResultOutput;
sexualResult?: TextAnalyzeSeverityResultOutput;
violenceResult?: TextAnalyzeSeverityResultOutput;
blocklistsMatch?: Array<TextBlocklistMatchOutput>;
categoriesAnalysis: Array<TextCategoriesAnalysisOutput>;
}

// @public (undocumented)
Expand All @@ -186,7 +184,7 @@ export type ContentSafetyClient = Client & {
};

// @public
function createClient(endpoint: string, credentials: KeyCredential, options?: ClientOptions): ContentSafetyClient;
function createClient(endpoint: string, credentials: TokenCredential | KeyCredential, options?: ClientOptions): ContentSafetyClient;
export default createClient;

// @public
Expand Down Expand Up @@ -304,7 +302,7 @@ export interface GetTextBlocklistItem {
// @public
export interface GetTextBlocklistItem200Response extends HttpResponse {
// (undocumented)
body: TextBlockItemOutput;
body: TextBlocklistItemOutput;
// (undocumented)
status: "200";
}
Expand All @@ -331,9 +329,9 @@ export type GetTextBlocklistItemParameters = RequestParameters;
export type GetTextBlocklistParameters = RequestParameters;

// @public
export interface ImageAnalyzeSeverityResultOutput {
export interface ImageCategoriesAnalysisOutput {
category: string;
severity: number;
severity?: number;
}

// @public
Expand Down Expand Up @@ -368,10 +366,10 @@ export function isUnexpected(response: DeleteTextBlocklist204Response | DeleteTe
export function isUnexpected(response: ListTextBlocklists200Response | ListTextBlocklistsDefaultResponse): response is ListTextBlocklistsDefaultResponse;

// @public (undocumented)
export function isUnexpected(response: AddBlockItems200Response | AddBlockItemsDefaultResponse): response is AddBlockItemsDefaultResponse;
export function isUnexpected(response: AddOrUpdateBlocklistItems200Response | AddOrUpdateBlocklistItemsDefaultResponse): response is AddOrUpdateBlocklistItemsDefaultResponse;

// @public (undocumented)
export function isUnexpected(response: RemoveBlockItems204Response | RemoveBlockItemsDefaultResponse): response is RemoveBlockItemsDefaultResponse;
export function isUnexpected(response: RemoveBlocklistItems204Response | RemoveBlocklistItemsDefaultResponse): response is RemoveBlocklistItemsDefaultResponse;

// @public (undocumented)
export function isUnexpected(response: GetTextBlocklistItem200Response | GetTextBlocklistItemDefaultResponse): response is GetTextBlocklistItemDefaultResponse;
Expand All @@ -387,7 +385,7 @@ export interface ListTextBlocklistItems {
// @public
export interface ListTextBlocklistItems200Response extends HttpResponse {
// (undocumented)
body: TextBlockItemListOutput;
body: PagedTextBlocklistItemOutput;
// (undocumented)
status: "200";
}
Expand Down Expand Up @@ -431,7 +429,7 @@ export interface ListTextBlocklists {
// @public
export interface ListTextBlocklists200Response extends HttpResponse {
// (undocumented)
body: TextBlocklistListOutput;
body: PagedTextBlocklistOutput;
// (undocumented)
status: "200";
}
Expand All @@ -454,6 +452,12 @@ export interface ListTextBlocklistsDefaultResponse extends HttpResponse {
// @public (undocumented)
export type ListTextBlocklistsParameters = RequestParameters;

// @public
export type PagedTextBlocklistItemOutput = Paged<TextBlocklistItemOutput>;

// @public
export type PagedTextBlocklistOutput = Paged<TextBlocklistOutput>;

// @public
export function paginate<TResponse extends PathUncheckedResponse>(client: Client, initialResponse: TResponse, options?: PagingOptions<TResponse>): PagedAsyncIterableIterator<PaginateReturn<TResponse>>;

Expand All @@ -470,95 +474,80 @@ export interface PagingOptions<TResponse> {
}

// @public (undocumented)
export interface RemoveBlockItems {
post(options?: RemoveBlockItemsParameters): StreamableMethod<RemoveBlockItems204Response | RemoveBlockItemsDefaultResponse>;
export interface RemoveBlocklistItems {
post(options: RemoveBlocklistItemsParameters): StreamableMethod<RemoveBlocklistItems204Response | RemoveBlocklistItemsDefaultResponse>;
}

// @public
export interface RemoveBlockItems204Response extends HttpResponse {
export interface RemoveBlocklistItems204Response extends HttpResponse {
// (undocumented)
status: "204";
}

// @public (undocumented)
export interface RemoveBlockItemsBodyParam {
// (undocumented)
body?: RemoveBlockItemsOptions;
export interface RemoveBlocklistItemsBodyParam {
body: RemoveTextBlocklistItemsOptions;
}

// @public (undocumented)
export interface RemoveBlockItemsDefaultHeaders {
export interface RemoveBlocklistItemsDefaultHeaders {
"x-ms-error-code"?: string;
}

// @public (undocumented)
export interface RemoveBlockItemsDefaultResponse extends HttpResponse {
export interface RemoveBlocklistItemsDefaultResponse extends HttpResponse {
// (undocumented)
body: ErrorResponse;
// (undocumented)
headers: RawHttpHeaders & RemoveBlockItemsDefaultHeaders;
headers: RawHttpHeaders & RemoveBlocklistItemsDefaultHeaders;
// (undocumented)
status: string;
}

// @public (undocumented)
export type RemoveBlocklistItemsParameters = RemoveBlocklistItemsBodyParam & RequestParameters;

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

// @public (undocumented)
export type RemoveBlockItemsParameters = RemoveBlockItemsBodyParam & RequestParameters;

// @public (undocumented)
export interface Routes {
(path: "/text:analyze"): AnalyzeText;
(path: "/image:analyze"): AnalyzeImage;
(path: "/text/blocklists/{blocklistName}", blocklistName: string): GetTextBlocklist;
(path: "/text/blocklists"): ListTextBlocklists;
(path: "/text/blocklists/{blocklistName}:addBlockItems", blocklistName: string): AddBlockItems;
(path: "/text/blocklists/{blocklistName}:removeBlockItems", blocklistName: string): RemoveBlockItems;
(path: "/text/blocklists/{blocklistName}/blockItems/{blockItemId}", blocklistName: string, blockItemId: string): GetTextBlocklistItem;
(path: "/text/blocklists/{blocklistName}/blockItems", blocklistName: string): ListTextBlocklistItems;
}

// @public
export interface TextAnalyzeSeverityResultOutput {
category: string;
severity: number;
(path: "/text/blocklists/{blocklistName}:addOrUpdateBlocklistItems", blocklistName: string): AddOrUpdateBlocklistItems;
(path: "/text/blocklists/{blocklistName}:removeBlocklistItems", blocklistName: string): RemoveBlocklistItems;
(path: "/text/blocklists/{blocklistName}/blocklistItems/{blocklistItemId}", blocklistName: string, blocklistItemId: string): GetTextBlocklistItem;
(path: "/text/blocklists/{blocklistName}/blocklistItems", blocklistName: string): ListTextBlocklistItems;
}

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

// @public
export type TextBlockItemListOutput = Paged<TextBlockItemOutput>;

// @public
export interface TextBlockItemOutput {
blockItemId: string;
export interface TextBlocklistItem {
description?: string;
text: string;
}

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

// @public
export type TextBlocklistListOutput = Paged<TextBlocklistOutput>;

// @public
export interface TextBlocklistMatchResultOutput {
blockItemId: string;
blockItemText: string;
export interface TextBlocklistMatchOutput {
blocklistItemId: string;
blocklistItemText: string;
blocklistName: string;
length: number;
offset: number;
}

// @public
Expand All @@ -570,6 +559,12 @@ export interface TextBlocklistOutput {
// @public
export type TextBlocklistResourceMergeAndPatch = Partial<TextBlocklist>;

// @public
export interface TextCategoriesAnalysisOutput {
category: string;
severity?: number;
}

// (No @packageDocumentation comment for this package)

```
Loading