import { APIResource } from "../../../../resource.js"; import * as Core from "../../../../core.js"; import * as ProfilesCustomAPI from "../profiles/custom.js"; import { SinglePage } from "../../../../pagination.js"; export declare class Custom extends APIResource { /** * Creates a DLP custom entry. * * @example * ```ts * const custom = * await client.zeroTrust.dlp.entries.custom.create({ * account_id: 'account_id', * enabled: true, * name: 'name', * pattern: { regex: 'regex' }, * }); * ``` */ create(params: CustomCreateParams, options?: Core.RequestOptions): Core.APIPromise; /** * Updates a DLP custom entry. * * @example * ```ts * const custom = * await client.zeroTrust.dlp.entries.custom.update( * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', * { * account_id: 'account_id', * enabled: true, * name: 'name', * pattern: { regex: 'regex' }, * }, * ); * ``` */ update(entryId: string, params: CustomUpdateParams, options?: Core.RequestOptions): Core.APIPromise; /** * Lists all DLP entries in an account. * * @example * ```ts * // Automatically fetches more pages as needed. * for await (const customListResponse of client.zeroTrust.dlp.entries.custom.list( * { account_id: 'account_id' }, * )) { * // ... * } * ``` */ list(params: CustomListParams, options?: Core.RequestOptions): Core.PagePromise; /** * Deletes a DLP custom entry. * * @example * ```ts * const custom = * await client.zeroTrust.dlp.entries.custom.delete( * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', * { account_id: 'account_id' }, * ); * ``` */ delete(entryId: string, params: CustomDeleteParams, options?: Core.RequestOptions): Core.APIPromise; /** * Fetches a DLP entry by ID. * * @example * ```ts * const custom = * await client.zeroTrust.dlp.entries.custom.get( * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', * { account_id: 'account_id' }, * ); * ``` */ get(entryId: string, params: CustomGetParams, options?: Core.RequestOptions): Core.APIPromise; } export declare class CustomListResponsesSinglePage extends SinglePage { } export interface CustomCreateResponse { id: string; created_at: string; /** * @deprecated */ enabled: boolean; name: string; pattern: ProfilesCustomAPI.Pattern; updated_at: string; description?: string | null; /** * @deprecated */ profile_id?: string | null; } export interface CustomUpdateResponse { id: string; created_at: string; /** * @deprecated */ enabled: boolean; name: string; pattern: ProfilesCustomAPI.Pattern; updated_at: string; description?: string | null; /** * @deprecated */ profile_id?: string | null; } export type CustomListResponse = CustomListResponse.UnionMember0 | CustomListResponse.UnionMember1 | CustomListResponse.UnionMember2 | CustomListResponse.UnionMember3 | CustomListResponse.UnionMember4 | CustomListResponse.UnionMember5 | CustomListResponse.UnionMember6; export declare namespace CustomListResponse { interface UnionMember0 { id: string; created_at: string; /** * @deprecated */ enabled: boolean; name: string; pattern: ProfilesCustomAPI.Pattern; type: 'custom'; updated_at: string; description?: string | null; /** * @deprecated */ profile_id?: string | null; upload_status?: 'empty' | 'uploading' | 'pending' | 'processing' | 'failed' | 'complete'; } interface UnionMember1 { id: string; created_at: string; /** * @deprecated */ enabled: boolean; name: string; type: 'custom_prompt_topic'; updated_at: string; upload_status?: 'empty' | 'uploading' | 'pending' | 'processing' | 'failed' | 'complete'; } interface UnionMember2 { id: string; confidence: UnionMember2.Confidence; enabled: boolean; name: string; type: 'predefined'; /** * @deprecated */ profile_id?: string | null; upload_status?: 'empty' | 'uploading' | 'pending' | 'processing' | 'failed' | 'complete'; /** * A Predefined AI prompt classification topic entry. */ variant?: UnionMember2.UnionMember0 | UnionMember2.UnionMember1; } namespace UnionMember2 { interface Confidence { /** * Indicates whether this entry has AI remote service validation. */ ai_context_available: boolean; /** * Indicates whether this entry has any form of validation that is not an AI remote * service. */ available: boolean; } /** * A Predefined AI prompt classification topic entry. */ interface UnionMember0 { topic_type: 'Intent' | 'Content'; type: 'PromptTopic'; /** * A customer-facing explanation of what this predefined AI prompt topic * represents. */ description?: string | null; } /** * A general predefined entry. */ interface UnionMember1 { type: 'General'; /** * A customer-facing explanation of what this predefined entry represents. */ description?: string | null; } } interface UnionMember3 { id: string; created_at: string; enabled: boolean; name: string; type: 'integration'; updated_at: string; profile_id?: string | null; upload_status?: 'empty' | 'uploading' | 'pending' | 'processing' | 'failed' | 'complete'; } interface UnionMember4 { id: string; /** * Only applies to custom word lists. Determines if the words should be matched in * a case-sensitive manner Cannot be set to false if secret is true */ case_sensitive: boolean; created_at: string; enabled: boolean; name: string; secret: boolean; type: 'exact_data'; updated_at: string; upload_status?: 'empty' | 'uploading' | 'pending' | 'processing' | 'failed' | 'complete'; } interface UnionMember5 { id: string; created_at: string; enabled: boolean; name: string; type: 'document_fingerprint'; updated_at: string; upload_status?: 'empty' | 'uploading' | 'pending' | 'processing' | 'failed' | 'complete'; } interface UnionMember6 { id: string; created_at: string; enabled: boolean; name: string; type: 'word_list'; updated_at: string; word_list: unknown; profile_id?: string | null; upload_status?: 'empty' | 'uploading' | 'pending' | 'processing' | 'failed' | 'complete'; } } export type CustomDeleteResponse = unknown; export type CustomGetResponse = CustomGetResponse.UnionMember0 | CustomGetResponse.UnionMember1 | CustomGetResponse.UnionMember2 | CustomGetResponse.UnionMember3 | CustomGetResponse.UnionMember4 | CustomGetResponse.UnionMember5 | CustomGetResponse.UnionMember6; export declare namespace CustomGetResponse { interface UnionMember0 { id: string; created_at: string; /** * @deprecated */ enabled: boolean; name: string; pattern: ProfilesCustomAPI.Pattern; type: 'custom'; updated_at: string; description?: string | null; /** * @deprecated */ profile_id?: string | null; profiles?: Array; upload_status?: 'empty' | 'uploading' | 'pending' | 'processing' | 'failed' | 'complete'; } namespace UnionMember0 { /** * Computed entry field for a profile that an entry is shared into. */ interface Profile { id: string; name: string; } } interface UnionMember1 { id: string; created_at: string; /** * @deprecated */ enabled: boolean; name: string; type: 'custom_prompt_topic'; updated_at: string; profiles?: Array; upload_status?: 'empty' | 'uploading' | 'pending' | 'processing' | 'failed' | 'complete'; } namespace UnionMember1 { /** * Computed entry field for a profile that an entry is shared into. */ interface Profile { id: string; name: string; } } interface UnionMember2 { id: string; confidence: UnionMember2.Confidence; enabled: boolean; name: string; type: 'predefined'; /** * @deprecated */ profile_id?: string | null; profiles?: Array; upload_status?: 'empty' | 'uploading' | 'pending' | 'processing' | 'failed' | 'complete'; /** * A Predefined AI prompt classification topic entry. */ variant?: UnionMember2.UnionMember0 | UnionMember2.UnionMember1; } namespace UnionMember2 { interface Confidence { /** * Indicates whether this entry has AI remote service validation. */ ai_context_available: boolean; /** * Indicates whether this entry has any form of validation that is not an AI remote * service. */ available: boolean; } /** * Computed entry field for a profile that an entry is shared into. */ interface Profile { id: string; name: string; } /** * A Predefined AI prompt classification topic entry. */ interface UnionMember0 { topic_type: 'Intent' | 'Content'; type: 'PromptTopic'; /** * A customer-facing explanation of what this predefined AI prompt topic * represents. */ description?: string | null; } /** * A general predefined entry. */ interface UnionMember1 { type: 'General'; /** * A customer-facing explanation of what this predefined entry represents. */ description?: string | null; } } interface UnionMember3 { id: string; created_at: string; enabled: boolean; name: string; type: 'integration'; updated_at: string; profile_id?: string | null; profiles?: Array; upload_status?: 'empty' | 'uploading' | 'pending' | 'processing' | 'failed' | 'complete'; } namespace UnionMember3 { /** * Computed entry field for a profile that an entry is shared into. */ interface Profile { id: string; name: string; } } interface UnionMember4 { id: string; /** * Only applies to custom word lists. Determines if the words should be matched in * a case-sensitive manner Cannot be set to false if secret is true */ case_sensitive: boolean; created_at: string; enabled: boolean; name: string; secret: boolean; type: 'exact_data'; updated_at: string; profiles?: Array; upload_status?: 'empty' | 'uploading' | 'pending' | 'processing' | 'failed' | 'complete'; } namespace UnionMember4 { /** * Computed entry field for a profile that an entry is shared into. */ interface Profile { id: string; name: string; } } interface UnionMember5 { id: string; created_at: string; enabled: boolean; name: string; type: 'document_fingerprint'; updated_at: string; profiles?: Array; upload_status?: 'empty' | 'uploading' | 'pending' | 'processing' | 'failed' | 'complete'; } namespace UnionMember5 { /** * Computed entry field for a profile that an entry is shared into. */ interface Profile { id: string; name: string; } } interface UnionMember6 { id: string; created_at: string; enabled: boolean; name: string; type: 'word_list'; updated_at: string; word_list: unknown; profile_id?: string | null; profiles?: Array; upload_status?: 'empty' | 'uploading' | 'pending' | 'processing' | 'failed' | 'complete'; } namespace UnionMember6 { /** * Computed entry field for a profile that an entry is shared into. */ interface Profile { id: string; name: string; } } } export interface CustomCreateParams { /** * Path param */ account_id: string; /** * Body param */ enabled: boolean; /** * Body param */ name: string; /** * Body param */ pattern: ProfilesCustomAPI.PatternParam; /** * Body param */ description?: string | null; /** * Body param */ profile_id?: string; } export interface CustomUpdateParams { /** * Path param */ account_id: string; /** * Body param */ enabled: boolean; /** * Body param */ name: string; /** * Body param */ pattern: ProfilesCustomAPI.PatternParam; /** * Body param */ description?: string | null; } export interface CustomListParams { account_id: string; } export interface CustomDeleteParams { account_id: string; } export interface CustomGetParams { account_id: string; } export declare namespace Custom { export { type CustomCreateResponse as CustomCreateResponse, type CustomUpdateResponse as CustomUpdateResponse, type CustomListResponse as CustomListResponse, type CustomDeleteResponse as CustomDeleteResponse, type CustomGetResponse as CustomGetResponse, CustomListResponsesSinglePage as CustomListResponsesSinglePage, type CustomCreateParams as CustomCreateParams, type CustomUpdateParams as CustomUpdateParams, type CustomListParams as CustomListParams, type CustomDeleteParams as CustomDeleteParams, type CustomGetParams as CustomGetParams, }; } //# sourceMappingURL=custom.d.ts.map