@azure/ai-content-safety package
Interfaces
| AcsApproval |
Approval metadata returned by an ACS deny decision. Unified Moderate does not invoke an approval workflow. |
| AcsEvidence |
Evidence or a verification pointer returned by policy evaluation. |
| AcsHarmDetail |
The detection result for one blocklist evaluated as part of a harm result. |
| AcsHarmResult |
The moderation and policy-attribution result for one harm category. The category name is the key in the harmResults map and is not restricted to a predefined set. |
| AcsTransform |
A canonical ACS transform applied by Unified Moderate. |
| AcsVerdict |
The complete Agent Control Specification policy verdict. |
| AddOrUpdateBlocklistItemsOptionalParams |
Optional parameters. |
| AddOrUpdateBlocklistItemsOptions |
The request to add blocklistItems to a text blocklist. |
| AddOrUpdateTextBlocklistItemsResult |
The response of adding blocklistItems to the text blocklist. |
| AnalyzeImageOptionalParams |
Optional parameters. |
| AnalyzeImageOptions |
The image analysis request. |
| AnalyzeImageResult |
The image analysis response. |
| AnalyzeTextOptionalParams |
Optional parameters. |
| AnalyzeTextOptions |
The text analysis request. |
| AnalyzeTextResult |
The text analysis response. |
| BlocklistClientOptionalParams |
Optional parameters for the client. |
| ContentProvenanceClientOptionalParams |
Optional parameters for the client. |
| ContentSafetyClientOptionalParams |
Optional parameters for the client. |
| CreateOrUpdateTextBlocklistOptionalParams |
Optional parameters. |
| CreateOrUpdateTextBlocklistOptions |
Mutable properties used to create or update a text blocklist. |
| DeleteTextBlocklistOptionalParams |
Optional parameters. |
| DetectOptionalParams |
Optional parameters. |
| DetectOptions |
Input describing the media to inspect using Content Provenance Detection. |
| DetectProvenanceResult |
Result of a Content Provenance Detection operation. |
| DetectTextProtectedMaterialOptionalParams |
Optional parameters. |
| DetectTextProtectedMaterialOptions |
The request of detecting potential protected material present in the given text. |
| DetectTextProtectedMaterialResult |
The combined detection results of potential protected material. |
| DetectedProvenance |
A Microsoft-issued provenance signal indicating the media was created or modified using AI. |
| DocumentInjectionAnalysisResult |
The individual analysis result of potential injection attacks in the given documents. |
| GetOperationStatusOptionalParams |
Optional parameters. |
| GetTextBlocklistItemOptionalParams |
Optional parameters. |
| GetTextBlocklistOptionalParams |
Optional parameters. |
| ImageCategoriesAnalysis |
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. |
| ListTextBlocklistItemsOptionalParams |
Optional parameters. |
| ListTextBlocklistsOptionalParams |
Optional parameters. |
| PageSettings |
Options for the byPage method |
| PagedAsyncIterableIterator |
An interface that allows async iterable iteration both to completion and by page. |
| ProvenanceContent |
Source content descriptor for a Content Provenance Detection operation. |
| ProvenanceDetectOperation |
Status and result of an asynchronous Content Provenance Detection operation. |
| RemoveBlocklistItemsOptionalParams |
Optional parameters. |
| RemoveBlocklistItemsOptions |
The request to remove blocklistItems from a text blocklist. |
| RestorePollerOptions | |
| ShieldPromptOptionalParams |
Optional parameters. |
| ShieldPromptOptions |
The request of analyzing potential direct or indirect injection attacks. |
| ShieldPromptResult |
The combined analysis results of potential direct or indirect injection attacks. |
| TextBlocklist |
Text Blocklist. |
| TextBlocklistItem |
Item in a TextBlocklist returned by the service. |
| TextBlocklistItemInput |
Item to add to a TextBlocklist. |
| TextBlocklistMatch |
The result of blocklist match. |
| TextCategoriesAnalysis |
Text analysis result. |
| TextProtectedMaterialAnalysisResult |
The individual detection result of potential protected material. |
| UnifiedModerateContext |
Optional agent, session, and request context supplied to policy evaluation. |
| UnifiedModerateOptionalParams |
Optional parameters. |
| UnifiedModerateOptions |
A request to evaluate and enforce an applicable policy for one workload event. The service uses the first policy it can resolve from policyId and then from the policy binding for targetResourceId, in that order. The request fails if neither selector resolves a policy. |
| UnifiedModerateResult |
The enforced result of unified moderation. |
| UserPromptInjectionAnalysisResult |
The individual analysis result of potential injection attacks in the given user prompt. |
Type Aliases
| AcsDecision |
The canonical decision returned by Agent Control Specification policy evaluation. |
| AnalyzeImageOutputType |
The type of image analysis output. |
| AnalyzeTextOutputType |
The type of text analysis output. |
| ContinuablePage |
An interface that describes a page of results. |
| DetectOutcome |
Top-level outcome of a Content Provenance Detection operation. |
| DetectedProvenanceType |
Detected provenance record type. |
| ImageCategory |
The harm category supported in Image content analysis. |
| OperationState |
Enum describing allowed operation states. |
| ProvenanceOperationKind |
Kind of asynchronous Content Provenance Detection operation. |
| TextCategory |
The harm category supported in Text content analysis. |
| UnifiedModerateSource |
The workload event source evaluated by Unified Moderate. |
| UnifiedModerateVerdict |
The caller-facing enforcement result returned by Unified Moderate. |
Enums
| KnownVersions |
Known values of KnownVersions that the service accepts. |
Functions
| is |
Typeguard for RestError |
| restore |
Creates a poller from the serialized state of another poller. This can be useful when you want to create pollers on a different host or a poller needs to be constructed after the original one is not in scope. |
Variables
| Rest |
A custom error type for failed pipeline requests. |
Function Details
isRestError(unknown)
Typeguard for RestError
function isRestError(e: unknown): e is RestError
Parameters
- e
-
unknown
Something caught by a catch clause.
Returns
e is RestError
restorePoller<TResponse, TResult>(ContentProvenanceClient, string, (args: any[]) => PollerLike<OperationState<TResult>, TResult>, RestorePollerOptions<TResult, TResponse>)
Creates a poller from the serialized state of another poller. This can be useful when you want to create pollers on a different host or a poller needs to be constructed after the original one is not in scope.
function restorePoller<TResponse, TResult>(client: ContentProvenanceClient, serializedState: string, sourceOperation: (args: any[]) => PollerLike<OperationState<TResult>, TResult>, options?: RestorePollerOptions<TResult, TResponse>): PollerLike<OperationState<TResult>, TResult>
Parameters
- client
- ContentProvenanceClient
- serializedState
-
string
- sourceOperation
-
(args: any[]) => PollerLike<OperationState<TResult>, TResult>
- options
-
RestorePollerOptions<TResult, TResponse>
Returns
PollerLike<OperationState<TResult>, TResult>
Variable Details
RestError
A custom error type for failed pipeline requests.
RestError: RestErrorConstructor