@azure-rest/ai-content-safety package

Interfaces

AddOrUpdateBlocklistItems
AddOrUpdateBlocklistItems200Response

The request has succeeded.

AddOrUpdateBlocklistItemsBodyParam
AddOrUpdateBlocklistItemsDefaultHeaders
AddOrUpdateBlocklistItemsDefaultResponse
AddOrUpdateTextBlocklistItemsOptions

The request to add blocklistItems to a text blocklist.

AddOrUpdateTextBlocklistItemsResultOutput

The response of adding blocklistItems to the text blocklist.

AnalyzeImage
AnalyzeImage200Response

The request has succeeded.

AnalyzeImageBodyParam
AnalyzeImageDefaultHeaders
AnalyzeImageDefaultResponse
AnalyzeImageOptions

The image analysis request.

AnalyzeImageOptionsOutput

The image analysis request.

AnalyzeImageResultOutput

The image analysis response.

AnalyzeText
AnalyzeText200Response

The request has succeeded.

AnalyzeTextBodyParam
AnalyzeTextDefaultHeaders
AnalyzeTextDefaultResponse
AnalyzeTextOptions

The text analysis request.

AnalyzeTextOptionsOutput

The text analysis request.

AnalyzeTextResultOutput

The text analysis response.

CreateOrUpdateTextBlocklist200Response

The request has succeeded.

CreateOrUpdateTextBlocklist201Response

The request has succeeded and a new resource has been created as a result.

CreateOrUpdateTextBlocklistBodyParam
CreateOrUpdateTextBlocklistDefaultHeaders
CreateOrUpdateTextBlocklistDefaultResponse
CreateOrUpdateTextBlocklistMediaTypesParam
DeleteTextBlocklist204Response

There is no content to send for this request, but the headers may be useful.

DeleteTextBlocklistDefaultHeaders
DeleteTextBlocklistDefaultResponse
GetTextBlocklist
GetTextBlocklist200Response

The request has succeeded.

GetTextBlocklistDefaultHeaders
GetTextBlocklistDefaultResponse
GetTextBlocklistItem
GetTextBlocklistItem200Response

The request has succeeded.

GetTextBlocklistItemDefaultHeaders
GetTextBlocklistItemDefaultResponse
ImageCategoriesAnalysisOutput

Image analysis result.

ImageData

The image can be either base64 encoded bytes or a blob URL. You can choose only one of these options. If both are provided, the request will be refused. The maximum image size is 2048 x 2048 pixels and should not exceed 4 MB, while the minimum image size is 50 x 50 pixels.

ImageDataOutput

The image can be either base64 encoded bytes or a blob URL. You can choose only one of these options. If both are provided, the request will be refused. The maximum image size is 2048 x 2048 pixels and should not exceed 4 MB, while the minimum image size is 50 x 50 pixels.

ListTextBlocklistItems
ListTextBlocklistItems200Response

The request has succeeded.

ListTextBlocklistItemsDefaultHeaders
ListTextBlocklistItemsDefaultResponse
ListTextBlocklistItemsQueryParam
ListTextBlocklistItemsQueryParamProperties
ListTextBlocklists
ListTextBlocklists200Response

The request has succeeded.

ListTextBlocklistsDefaultHeaders
ListTextBlocklistsDefaultResponse
PagingOptions

Options for the paging helper

RemoveBlocklistItems
RemoveBlocklistItems204Response

There is no content to send for this request, but the headers may be useful.

RemoveBlocklistItemsBodyParam
RemoveBlocklistItemsDefaultHeaders
RemoveBlocklistItemsDefaultResponse
RemoveTextBlocklistItemsOptions

The request to remove blocklistItems from a text blocklist.

Routes
TextBlocklist

Text Blocklist.

TextBlocklistItem

Item in a TextBlocklist.

TextBlocklistItemOutput

Item in a TextBlocklist.

TextBlocklistMatchOutput

The result of blocklist match.

TextBlocklistOutput

Text Blocklist.

TextCategoriesAnalysisOutput

Text analysis result.

Type Aliases

AddOrUpdateBlocklistItemsParameters
AnalyzeImageParameters
AnalyzeTextParameters
ContentSafetyClient
CreateOrUpdateTextBlocklistParameters
DeleteTextBlocklistParameters
GetArrayType

Helper type to extract the type of an array

GetPage

The type of a custom function that defines how to get a page and a link to the next one if any.

GetTextBlocklistItemParameters
GetTextBlocklistParameters
ListTextBlocklistItemsParameters
ListTextBlocklistsParameters
PagedTextBlocklistItemOutput

Paged collection of TextBlocklistItem items

PagedTextBlocklistOutput

Paged collection of TextBlocklist items

PaginateReturn

Helper type to infer the Type of the paged elements from the response type This type is generated based on the swagger information for x-ms-pageable specifically on the itemName property which indicates the property of the response where the page items are found. The default value is value. This type will allow us to provide strongly typed Iterator based on the response we get as second parameter

RemoveBlocklistItemsParameters
TextBlocklistResourceMergeAndPatch

The resource instance.

Functions

default(string, TokenCredential | KeyCredential, ClientOptions)

Initialize a new instance of ContentSafetyClient

isUnexpected(AnalyzeText200Response | AnalyzeTextDefaultResponse)
isUnexpected(AnalyzeImage200Response | AnalyzeImageDefaultResponse)
isUnexpected(GetTextBlocklist200Response | GetTextBlocklistDefaultResponse)
isUnexpected(CreateOrUpdateTextBlocklist200Response | CreateOrUpdateTextBlocklist201Response | CreateOrUpdateTextBlocklistDefaultResponse)
isUnexpected(DeleteTextBlocklist204Response | DeleteTextBlocklistDefaultResponse)
isUnexpected(ListTextBlocklists200Response | ListTextBlocklistsDefaultResponse)
isUnexpected(AddOrUpdateBlocklistItems200Response | AddOrUpdateBlocklistItemsDefaultResponse)
isUnexpected(RemoveBlocklistItems204Response | RemoveBlocklistItemsDefaultResponse)
isUnexpected(GetTextBlocklistItem200Response | GetTextBlocklistItemDefaultResponse)
isUnexpected(ListTextBlocklistItems200Response | ListTextBlocklistItemsDefaultResponse)
paginate<TResponse>(Client, TResponse, PagingOptions<TResponse>)

Helper to paginate results from an initial response that follows the specification of Autorest x-ms-pageable extension

Function Details

default(string, TokenCredential | KeyCredential, ClientOptions)

Initialize a new instance of ContentSafetyClient

function default(endpoint: string, credentials: TokenCredential | KeyCredential, options?: ClientOptions): ContentSafetyClient

Parameters

endpoint

string

Supported Cognitive Services endpoints (protocol and hostname, for example: https://.cognitiveservices.azure.com).

credentials

TokenCredential | KeyCredential

uniquely identify client credential

options
ClientOptions

the parameter for all optional parameters

Returns

isUnexpected(AnalyzeText200Response | AnalyzeTextDefaultResponse)

function isUnexpected(response: AnalyzeText200Response | AnalyzeTextDefaultResponse): response

Parameters

Returns

response

isUnexpected(AnalyzeImage200Response | AnalyzeImageDefaultResponse)

function isUnexpected(response: AnalyzeImage200Response | AnalyzeImageDefaultResponse): response

Parameters

Returns

response

isUnexpected(GetTextBlocklist200Response | GetTextBlocklistDefaultResponse)

function isUnexpected(response: GetTextBlocklist200Response | GetTextBlocklistDefaultResponse): response

Parameters

Returns

response

isUnexpected(CreateOrUpdateTextBlocklist200Response | CreateOrUpdateTextBlocklist201Response | CreateOrUpdateTextBlocklistDefaultResponse)

function isUnexpected(response: CreateOrUpdateTextBlocklist200Response | CreateOrUpdateTextBlocklist201Response | CreateOrUpdateTextBlocklistDefaultResponse): response

Parameters

Returns

response

isUnexpected(DeleteTextBlocklist204Response | DeleteTextBlocklistDefaultResponse)

function isUnexpected(response: DeleteTextBlocklist204Response | DeleteTextBlocklistDefaultResponse): response

Parameters

Returns

response

isUnexpected(ListTextBlocklists200Response | ListTextBlocklistsDefaultResponse)

function isUnexpected(response: ListTextBlocklists200Response | ListTextBlocklistsDefaultResponse): response

Parameters

Returns

response

isUnexpected(AddOrUpdateBlocklistItems200Response | AddOrUpdateBlocklistItemsDefaultResponse)

function isUnexpected(response: AddOrUpdateBlocklistItems200Response | AddOrUpdateBlocklistItemsDefaultResponse): response

Parameters

Returns

response

isUnexpected(RemoveBlocklistItems204Response | RemoveBlocklistItemsDefaultResponse)

function isUnexpected(response: RemoveBlocklistItems204Response | RemoveBlocklistItemsDefaultResponse): response

Parameters

Returns

response

isUnexpected(GetTextBlocklistItem200Response | GetTextBlocklistItemDefaultResponse)

function isUnexpected(response: GetTextBlocklistItem200Response | GetTextBlocklistItemDefaultResponse): response

Parameters

Returns

response

isUnexpected(ListTextBlocklistItems200Response | ListTextBlocklistItemsDefaultResponse)

function isUnexpected(response: ListTextBlocklistItems200Response | ListTextBlocklistItemsDefaultResponse): response

Parameters

Returns

response

paginate<TResponse>(Client, TResponse, PagingOptions<TResponse>)

Helper to paginate results from an initial response that follows the specification of Autorest x-ms-pageable extension

function paginate<TResponse>(client: Client, initialResponse: TResponse, options?: PagingOptions<TResponse>): PagedAsyncIterableIterator<PaginateReturn<TResponse>>

Parameters

client
Client

Client to use for sending the next page requests

initialResponse

TResponse

Initial response containing the nextLink and current page of elements

options

PagingOptions<TResponse>

Returns

  • PagedAsyncIterableIterator to iterate the elements