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 @@ -128,4 +128,4 @@
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure-rest/ai-content-safety?view=azure-node-preview"
}
}
}
172 changes: 146 additions & 26 deletions sdk/contentsafety/ai-content-safety-rest/review/ai-content-safety.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,13 @@ export interface AnalyzeImageDefaultResponse extends HttpResponse {

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

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

// @public (undocumented)
export type AnalyzeImageParameters = AnalyzeImageBodyParam & RequestParameters;
Expand Down Expand Up @@ -154,20 +150,14 @@ export interface AnalyzeTextDefaultResponse extends HttpResponse {
// @public
export interface AnalyzeTextOptions {
blocklistNames?: string[];
categories?: string[];
categories?: TextCategory[];
haltOnBlocklistHit?: boolean;
outputType?: string;
outputType?: AnalyzeTextOutputType;
text: string;
}

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

// @public (undocumented)
export type AnalyzeTextParameters = AnalyzeTextBodyParam & RequestParameters;
Expand All @@ -184,7 +174,12 @@ export type ContentSafetyClient = Client & {
};

// @public
function createClient(endpoint: string, credentials: TokenCredential | KeyCredential, options?: ClientOptions): ContentSafetyClient;
export interface ContentSafetyClientOptions extends ClientOptions {
apiVersion?: string;
}

// @public
function createClient(endpointParam: string, credentials: TokenCredential | KeyCredential, { apiVersion, ...options }?: ContentSafetyClientOptions): ContentSafetyClient;
export default createClient;

// @public
Expand Down Expand Up @@ -255,6 +250,57 @@ export interface DeleteTextBlocklistDefaultResponse extends HttpResponse {
// @public (undocumented)
export type DeleteTextBlocklistParameters = RequestParameters;

// @public (undocumented)
export interface DetectTextProtectedMaterial {
post(options: DetectTextProtectedMaterialParameters): StreamableMethod<DetectTextProtectedMaterial200Response | DetectTextProtectedMaterialDefaultResponse>;
}

// @public
export interface DetectTextProtectedMaterial200Response extends HttpResponse {
// (undocumented)
body: DetectTextProtectedMaterialResultOutput;
// (undocumented)
status: "200";
}

// @public (undocumented)
export interface DetectTextProtectedMaterialBodyParam {
body: DetectTextProtectedMaterialOptions;
}

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

// @public (undocumented)
export interface DetectTextProtectedMaterialDefaultResponse extends HttpResponse {
// (undocumented)
body: ErrorResponse;
// (undocumented)
headers: RawHttpHeaders & DetectTextProtectedMaterialDefaultHeaders;
// (undocumented)
status: string;
}

// @public
export interface DetectTextProtectedMaterialOptions {
text: string;
}

// @public (undocumented)
export type DetectTextProtectedMaterialParameters = DetectTextProtectedMaterialBodyParam & RequestParameters;

// @public
export interface DetectTextProtectedMaterialResultOutput {
protectedMaterialAnalysis: TextProtectedMaterialAnalysisResultOutput;
}

// @public
export interface DocumentInjectionAnalysisResultOutput {
attackDetected: boolean;
}

// @public
export type GetArrayType<T> = T extends Array<infer TData> ? TData : never;

Expand Down Expand Up @@ -330,28 +376,34 @@ export type GetTextBlocklistParameters = RequestParameters;

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

// @public
export type ImageCategory = string;

// @public
export type ImageCategoryOutput = string;

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

// @public
export interface ImageDataOutput {
blobUrl?: string;
content?: string;
}
// @public (undocumented)
export function isUnexpected(response: AnalyzeImage200Response | AnalyzeImageDefaultResponse): response is AnalyzeImageDefaultResponse;

// @public (undocumented)
export function isUnexpected(response: AnalyzeText200Response | AnalyzeTextDefaultResponse): response is AnalyzeTextDefaultResponse;

// @public (undocumented)
export function isUnexpected(response: AnalyzeImage200Response | AnalyzeImageDefaultResponse): response is AnalyzeImageDefaultResponse;
export function isUnexpected(response: ShieldPrompt200Response | ShieldPromptDefaultResponse): response is ShieldPromptDefaultResponse;

// @public (undocumented)
export function isUnexpected(response: DetectTextProtectedMaterial200Response | DetectTextProtectedMaterialDefaultResponse): response is DetectTextProtectedMaterialDefaultResponse;

// @public (undocumented)
export function isUnexpected(response: GetTextBlocklist200Response | GetTextBlocklistDefaultResponse): response is GetTextBlocklistDefaultResponse;
Expand Down Expand Up @@ -514,8 +566,10 @@ export interface RemoveTextBlocklistItemsOptions {

// @public (undocumented)
export interface Routes {
(path: "/text:analyze"): AnalyzeText;
(path: "/image:analyze"): AnalyzeImage;
(path: "/text:analyze"): AnalyzeText;
(path: "/text:shieldPrompt"): ShieldPrompt;
(path: "/text:detectProtectedMaterial"): DetectTextProtectedMaterial;
(path: "/text/blocklists/{blocklistName}", blocklistName: string): GetTextBlocklist;
(path: "/text/blocklists"): ListTextBlocklists;
(path: "/text/blocklists/{blocklistName}:addOrUpdateBlocklistItems", blocklistName: string): AddOrUpdateBlocklistItems;
Expand All @@ -524,6 +578,54 @@ export interface Routes {
(path: "/text/blocklists/{blocklistName}/blocklistItems", blocklistName: string): ListTextBlocklistItems;
}

// @public (undocumented)
export interface ShieldPrompt {
post(options: ShieldPromptParameters): StreamableMethod<ShieldPrompt200Response | ShieldPromptDefaultResponse>;
}

// @public
export interface ShieldPrompt200Response extends HttpResponse {
// (undocumented)
body: ShieldPromptResultOutput;
// (undocumented)
status: "200";
}

// @public (undocumented)
export interface ShieldPromptBodyParam {
body: ShieldPromptOptions;
}

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

// @public (undocumented)
export interface ShieldPromptDefaultResponse extends HttpResponse {
// (undocumented)
body: ErrorResponse;
// (undocumented)
headers: RawHttpHeaders & ShieldPromptDefaultHeaders;
// (undocumented)
status: string;
}

// @public
export interface ShieldPromptOptions {
documents?: string[];
userPrompt?: string;
}

// @public (undocumented)
export type ShieldPromptParameters = ShieldPromptBodyParam & RequestParameters;

// @public
export interface ShieldPromptResultOutput {
documentsAnalysis?: Array<DocumentInjectionAnalysisResultOutput>;
userPromptAnalysis?: UserPromptInjectionAnalysisResultOutput;
}

// @public
export interface TextBlocklist {
blocklistName: string;
Expand All @@ -533,13 +635,15 @@ export interface TextBlocklist {
// @public
export interface TextBlocklistItem {
description?: string;
isRegex?: boolean;
text: string;
}

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

Expand All @@ -561,10 +665,26 @@ export type TextBlocklistResourceMergeAndPatch = Partial<TextBlocklist>;

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

// @public
export type TextCategory = string;

// @public
export type TextCategoryOutput = string;

// @public
export interface TextProtectedMaterialAnalysisResultOutput {
detected: boolean;
}

// @public
export interface UserPromptInjectionAnalysisResultOutput {
attackDetected: boolean;
}

// (No @packageDocumentation comment for this package)

```
Loading