@cdot65/prisma-airs-sdk 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +215 -106
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +255 -3
- package/dist/index.d.ts +255 -3
- package/dist/index.js +212 -106
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
|
+
/** Options for initializing the global scan API configuration. */
|
|
3
4
|
interface InitOptions {
|
|
5
|
+
/** AIRS API key. Falls back to `PANW_AI_SEC_API_KEY` env var. */
|
|
4
6
|
apiKey?: string;
|
|
7
|
+
/** Pre-obtained bearer token. Falls back to `PANW_AI_SEC_API_TOKEN` env var. */
|
|
5
8
|
apiToken?: string;
|
|
9
|
+
/** AIRS API endpoint URL. Falls back to `PANW_AI_SEC_API_ENDPOINT` env var. */
|
|
6
10
|
apiEndpoint?: string;
|
|
11
|
+
/** Max retry attempts (0–5). Defaults to 5. */
|
|
7
12
|
numRetries?: number;
|
|
8
13
|
}
|
|
9
14
|
declare class Configuration {
|
|
@@ -20,9 +25,16 @@ declare class Configuration {
|
|
|
20
25
|
init(opts?: InitOptions): void;
|
|
21
26
|
reset(): void;
|
|
22
27
|
}
|
|
28
|
+
/** Global singleton holding scan API configuration. */
|
|
23
29
|
declare const globalConfiguration: Configuration;
|
|
30
|
+
/**
|
|
31
|
+
* Initialize the global scan API configuration. Must be called before using {@link Scanner}.
|
|
32
|
+
* @param opts - Configuration options. Reads env vars as fallbacks.
|
|
33
|
+
* @throws {AISecSDKException} If neither apiKey nor apiToken is provided.
|
|
34
|
+
*/
|
|
24
35
|
declare function init(opts?: InitOptions): void;
|
|
25
36
|
|
|
37
|
+
/** Zod schema for AI security profile identifier. Requires profile_id or profile_name. */
|
|
26
38
|
declare const AiProfileSchema: z.ZodEffects<z.ZodObject<{
|
|
27
39
|
profile_id: z.ZodOptional<z.ZodString>;
|
|
28
40
|
profile_name: z.ZodOptional<z.ZodString>;
|
|
@@ -39,8 +51,10 @@ declare const AiProfileSchema: z.ZodEffects<z.ZodObject<{
|
|
|
39
51
|
profile_id?: string | undefined;
|
|
40
52
|
profile_name?: string | undefined;
|
|
41
53
|
}>;
|
|
54
|
+
/** AI security profile identifier. At least one of profile_id or profile_name required. */
|
|
42
55
|
type AiProfile = z.infer<typeof AiProfileSchema>;
|
|
43
56
|
|
|
57
|
+
/** Zod schema for AI agent metadata. */
|
|
44
58
|
declare const AgentMetaSchema: z.ZodObject<{
|
|
45
59
|
agent_id: z.ZodOptional<z.ZodString>;
|
|
46
60
|
agent_version: z.ZodOptional<z.ZodString>;
|
|
@@ -54,7 +68,9 @@ declare const AgentMetaSchema: z.ZodObject<{
|
|
|
54
68
|
agent_version?: string | undefined;
|
|
55
69
|
agent_arn?: string | undefined;
|
|
56
70
|
}>;
|
|
71
|
+
/** AI agent metadata (agent ID, version, ARN). */
|
|
57
72
|
type AgentMeta = z.infer<typeof AgentMetaSchema>;
|
|
73
|
+
/** Zod schema for scan request metadata. */
|
|
58
74
|
declare const MetadataSchema: z.ZodObject<{
|
|
59
75
|
app_name: z.ZodOptional<z.ZodString>;
|
|
60
76
|
app_user: z.ZodOptional<z.ZodString>;
|
|
@@ -94,8 +110,10 @@ declare const MetadataSchema: z.ZodObject<{
|
|
|
94
110
|
agent_arn?: string | undefined;
|
|
95
111
|
} | undefined;
|
|
96
112
|
}>;
|
|
113
|
+
/** Application metadata attached to scan requests. */
|
|
97
114
|
type Metadata = z.infer<typeof MetadataSchema>;
|
|
98
115
|
|
|
116
|
+
/** Zod schema for masked data in scan results. */
|
|
99
117
|
declare const MaskedDataSchema: z.ZodObject<{
|
|
100
118
|
data: z.ZodOptional<z.ZodString>;
|
|
101
119
|
pattern_detections: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
|
|
@@ -106,7 +124,9 @@ declare const MaskedDataSchema: z.ZodObject<{
|
|
|
106
124
|
data?: string | undefined;
|
|
107
125
|
pattern_detections?: Record<string, unknown>[] | undefined;
|
|
108
126
|
}>;
|
|
127
|
+
/** Masked data containing redacted content and pattern detections. */
|
|
109
128
|
type MaskedData = z.infer<typeof MaskedDataSchema>;
|
|
129
|
+
/** Zod schema for I/O detection flags. */
|
|
110
130
|
declare const IODetectedSchema: z.ZodObject<{
|
|
111
131
|
url_cats: z.ZodOptional<z.ZodBoolean>;
|
|
112
132
|
dlp: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -126,7 +146,9 @@ declare const IODetectedSchema: z.ZodObject<{
|
|
|
126
146
|
toxic_content: z.ZodOptional<z.ZodBoolean>;
|
|
127
147
|
malicious_code: z.ZodOptional<z.ZodBoolean>;
|
|
128
148
|
}, z.ZodTypeAny, "passthrough">>;
|
|
149
|
+
/** Flags indicating which detection types triggered on input or output. */
|
|
129
150
|
type IODetected = z.infer<typeof IODetectedSchema>;
|
|
151
|
+
/** Zod schema for the scan summary (verdict + action). */
|
|
130
152
|
declare const ScanSummarySchema: z.ZodObject<{
|
|
131
153
|
verdict: z.ZodOptional<z.ZodString>;
|
|
132
154
|
action: z.ZodOptional<z.ZodString>;
|
|
@@ -137,7 +159,9 @@ declare const ScanSummarySchema: z.ZodObject<{
|
|
|
137
159
|
verdict: z.ZodOptional<z.ZodString>;
|
|
138
160
|
action: z.ZodOptional<z.ZodString>;
|
|
139
161
|
}, z.ZodTypeAny, "passthrough">>;
|
|
162
|
+
/** Scan summary containing overall verdict and action. */
|
|
140
163
|
type ScanSummary = z.infer<typeof ScanSummarySchema>;
|
|
164
|
+
/** Zod schema for tool/agent detection results. */
|
|
141
165
|
declare const ToolDetectedSchema: z.ZodObject<{
|
|
142
166
|
verdict: z.ZodOptional<z.ZodString>;
|
|
143
167
|
metadata: z.ZodOptional<z.ZodObject<{
|
|
@@ -257,7 +281,9 @@ declare const ToolDetectedSchema: z.ZodObject<{
|
|
|
257
281
|
malicious_code: z.ZodOptional<z.ZodBoolean>;
|
|
258
282
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
259
283
|
}>;
|
|
284
|
+
/** Detection results for tool/agent interactions. */
|
|
260
285
|
type ToolDetected = z.infer<typeof ToolDetectedSchema>;
|
|
286
|
+
/** Zod schema for a complete scan response from the AIRS API. */
|
|
261
287
|
declare const ScanResponseSchema: z.ZodObject<{
|
|
262
288
|
source: z.ZodOptional<z.ZodString>;
|
|
263
289
|
report_id: z.ZodString;
|
|
@@ -621,8 +647,10 @@ declare const ScanResponseSchema: z.ZodObject<{
|
|
|
621
647
|
created_at?: string | undefined;
|
|
622
648
|
completed_at?: string | undefined;
|
|
623
649
|
}>;
|
|
650
|
+
/** Complete scan response with verdict, action, and detection details. */
|
|
624
651
|
type ScanResponse = z.infer<typeof ScanResponseSchema>;
|
|
625
652
|
|
|
653
|
+
/** Zod schema for an async scan batch item. */
|
|
626
654
|
declare const AsyncScanObjectSchema: z.ZodObject<{
|
|
627
655
|
req_id: z.ZodNumber;
|
|
628
656
|
scan_req: z.ZodObject<{
|
|
@@ -908,7 +936,9 @@ declare const AsyncScanObjectSchema: z.ZodObject<{
|
|
|
908
936
|
session_id?: string | undefined;
|
|
909
937
|
};
|
|
910
938
|
}>;
|
|
939
|
+
/** Async scan batch item containing a request ID and scan request. */
|
|
911
940
|
type AsyncScanObject = z.infer<typeof AsyncScanObjectSchema>;
|
|
941
|
+
/** Zod schema for the async scan API response. */
|
|
912
942
|
declare const AsyncScanResponseSchema: z.ZodObject<{
|
|
913
943
|
received: z.ZodString;
|
|
914
944
|
scan_id: z.ZodString;
|
|
@@ -925,8 +955,10 @@ declare const AsyncScanResponseSchema: z.ZodObject<{
|
|
|
925
955
|
source?: string | undefined;
|
|
926
956
|
report_id?: string | undefined;
|
|
927
957
|
}>;
|
|
958
|
+
/** Async scan API response with scan ID for later querying. */
|
|
928
959
|
type AsyncScanResponse = z.infer<typeof AsyncScanResponseSchema>;
|
|
929
960
|
|
|
961
|
+
/** Zod schema for a scan ID query result. */
|
|
930
962
|
declare const ScanIdResultSchema: z.ZodObject<{
|
|
931
963
|
source: z.ZodOptional<z.ZodString>;
|
|
932
964
|
req_id: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1452,8 +1484,10 @@ declare const ScanIdResultSchema: z.ZodObject<{
|
|
|
1452
1484
|
completed_at?: string | undefined;
|
|
1453
1485
|
} | undefined;
|
|
1454
1486
|
}>;
|
|
1487
|
+
/** Result of querying a scan by its scan ID, including status and full scan response. */
|
|
1455
1488
|
type ScanIdResult = z.infer<typeof ScanIdResultSchema>;
|
|
1456
1489
|
|
|
1490
|
+
/** Zod schema for a detailed threat scan report. */
|
|
1457
1491
|
declare const ThreatScanReportSchema: z.ZodObject<{
|
|
1458
1492
|
source: z.ZodOptional<z.ZodString>;
|
|
1459
1493
|
report_id: z.ZodOptional<z.ZodString>;
|
|
@@ -1655,8 +1689,10 @@ declare const ThreatScanReportSchema: z.ZodObject<{
|
|
|
1655
1689
|
} | undefined;
|
|
1656
1690
|
}[] | undefined;
|
|
1657
1691
|
}>;
|
|
1692
|
+
/** Detailed threat scan report with per-service detection results. */
|
|
1658
1693
|
type ThreatScanReport = z.infer<typeof ThreatScanReportSchema>;
|
|
1659
1694
|
|
|
1695
|
+
/** Zod schema for tool/function call event metadata. */
|
|
1660
1696
|
declare const ToolEventMetadataSchema: z.ZodObject<{
|
|
1661
1697
|
ecosystem: z.ZodString;
|
|
1662
1698
|
method: z.ZodString;
|
|
@@ -1673,7 +1709,9 @@ declare const ToolEventMetadataSchema: z.ZodObject<{
|
|
|
1673
1709
|
server_name: string;
|
|
1674
1710
|
tool_invoked?: string | undefined;
|
|
1675
1711
|
}>;
|
|
1712
|
+
/** Tool/function call event metadata (ecosystem, method, server, tool). */
|
|
1676
1713
|
type ToolEventMetadata = z.infer<typeof ToolEventMetadataSchema>;
|
|
1714
|
+
/** Zod schema for a tool/function call event with input and output. */
|
|
1677
1715
|
declare const ToolEventSchema: z.ZodObject<{
|
|
1678
1716
|
metadata: z.ZodOptional<z.ZodObject<{
|
|
1679
1717
|
ecosystem: z.ZodString;
|
|
@@ -1712,8 +1750,10 @@ declare const ToolEventSchema: z.ZodObject<{
|
|
|
1712
1750
|
input?: string | undefined;
|
|
1713
1751
|
output?: string | undefined;
|
|
1714
1752
|
}>;
|
|
1753
|
+
/** Tool/function call event with optional input and output strings. */
|
|
1715
1754
|
type ToolEvent = z.infer<typeof ToolEventSchema>;
|
|
1716
1755
|
|
|
1756
|
+
/** Zod schema for a single content item within a scan request. */
|
|
1717
1757
|
declare const ScanRequestContentsInnerSchema: z.ZodObject<{
|
|
1718
1758
|
prompt: z.ZodOptional<z.ZodString>;
|
|
1719
1759
|
response: z.ZodOptional<z.ZodString>;
|
|
@@ -1791,7 +1831,9 @@ declare const ScanRequestContentsInnerSchema: z.ZodObject<{
|
|
|
1791
1831
|
output?: string | undefined;
|
|
1792
1832
|
} | undefined;
|
|
1793
1833
|
}>;
|
|
1834
|
+
/** Single content item within a scan request. */
|
|
1794
1835
|
type ScanRequestContentsInner = z.infer<typeof ScanRequestContentsInnerSchema>;
|
|
1836
|
+
/** Zod schema for a complete scan request payload. */
|
|
1795
1837
|
declare const ScanRequestSchema: z.ZodObject<{
|
|
1796
1838
|
tr_id: z.ZodOptional<z.ZodString>;
|
|
1797
1839
|
session_id: z.ZodOptional<z.ZodString>;
|
|
@@ -1998,16 +2040,28 @@ declare const ScanRequestSchema: z.ZodObject<{
|
|
|
1998
2040
|
tr_id?: string | undefined;
|
|
1999
2041
|
session_id?: string | undefined;
|
|
2000
2042
|
}>;
|
|
2043
|
+
/** Complete scan request payload sent to the AIRS API. */
|
|
2001
2044
|
type ScanRequest = z.infer<typeof ScanRequestSchema>;
|
|
2002
2045
|
|
|
2046
|
+
/** Options for constructing a {@link Content} instance. At least one field is required. */
|
|
2003
2047
|
interface ContentOptions {
|
|
2048
|
+
/** User prompt text. Max 2 MB. */
|
|
2004
2049
|
prompt?: string;
|
|
2050
|
+
/** AI model response text. Max 2 MB. */
|
|
2005
2051
|
response?: string;
|
|
2052
|
+
/** Conversation context. Max 100 MB. */
|
|
2006
2053
|
context?: string;
|
|
2054
|
+
/** Code prompt text. Max 2 MB. */
|
|
2007
2055
|
codePrompt?: string;
|
|
2056
|
+
/** Code response text. Max 2 MB. */
|
|
2008
2057
|
codeResponse?: string;
|
|
2058
|
+
/** Tool/function call event data. */
|
|
2009
2059
|
toolEvent?: ToolEvent;
|
|
2010
2060
|
}
|
|
2061
|
+
/**
|
|
2062
|
+
* Represents content to be scanned by AIRS.
|
|
2063
|
+
* Validates byte-length limits on construction and property assignment.
|
|
2064
|
+
*/
|
|
2011
2065
|
declare class Content {
|
|
2012
2066
|
private _prompt?;
|
|
2013
2067
|
private _response?;
|
|
@@ -2028,37 +2082,115 @@ declare class Content {
|
|
|
2028
2082
|
set codeResponse(value: string | undefined);
|
|
2029
2083
|
get toolEvent(): ToolEvent | undefined;
|
|
2030
2084
|
set toolEvent(value: ToolEvent | undefined);
|
|
2085
|
+
/** Total byte length of all text content fields. */
|
|
2031
2086
|
get length(): number;
|
|
2087
|
+
/** Serialize to the API request format. */
|
|
2032
2088
|
toJSON(): ScanRequestContentsInner;
|
|
2089
|
+
/**
|
|
2090
|
+
* Create a Content instance from an API response object.
|
|
2091
|
+
* @param json - Scan request contents inner object.
|
|
2092
|
+
*/
|
|
2033
2093
|
static fromJSON(json: ScanRequestContentsInner): Content;
|
|
2094
|
+
/**
|
|
2095
|
+
* Load content from a JSON file.
|
|
2096
|
+
* @param filePath - Path to JSON file containing scan request contents.
|
|
2097
|
+
*/
|
|
2034
2098
|
static fromJSONFile(filePath: string): Content;
|
|
2035
2099
|
}
|
|
2036
2100
|
|
|
2101
|
+
/** Optional parameters for {@link Scanner.syncScan}. */
|
|
2037
2102
|
interface SyncScanOptions {
|
|
2103
|
+
/** Transaction ID for tracing. Max 100 characters. */
|
|
2038
2104
|
trId?: string;
|
|
2105
|
+
/** Session ID for grouping related scans. Max 100 characters. */
|
|
2039
2106
|
sessionId?: string;
|
|
2107
|
+
/** Application metadata attached to the scan request. */
|
|
2040
2108
|
metadata?: Metadata;
|
|
2041
2109
|
}
|
|
2110
|
+
/** Client for AIRS scan operations (sync, async, and query). */
|
|
2042
2111
|
declare class Scanner {
|
|
2112
|
+
/**
|
|
2113
|
+
* Perform a synchronous content scan.
|
|
2114
|
+
* @param aiProfile - AI security profile to scan against.
|
|
2115
|
+
* @param content - Content to scan.
|
|
2116
|
+
* @param opts - Optional transaction/session IDs and metadata.
|
|
2117
|
+
* @returns Scan response with verdict, action, and detection details.
|
|
2118
|
+
*/
|
|
2043
2119
|
syncScan(aiProfile: AiProfile, content: Content, opts?: SyncScanOptions): Promise<ScanResponse>;
|
|
2120
|
+
/**
|
|
2121
|
+
* Submit content for asynchronous scanning.
|
|
2122
|
+
* @param scanObjects - Array of scan objects (1–5 items).
|
|
2123
|
+
* @returns Response containing scan IDs for later querying.
|
|
2124
|
+
*/
|
|
2044
2125
|
asyncScan(scanObjects: AsyncScanObject[]): Promise<AsyncScanResponse>;
|
|
2126
|
+
/**
|
|
2127
|
+
* Query scan results by scan IDs.
|
|
2128
|
+
* @param scanIds - Array of scan UUIDs (1–5 items).
|
|
2129
|
+
* @returns Array of scan results with status and response data.
|
|
2130
|
+
*/
|
|
2045
2131
|
queryByScanIds(scanIds: string[]): Promise<ScanIdResult[]>;
|
|
2132
|
+
/**
|
|
2133
|
+
* Query detailed threat reports by report IDs.
|
|
2134
|
+
* @param reportIds - Array of report IDs (1–5 items).
|
|
2135
|
+
* @returns Array of threat scan reports with detection details.
|
|
2136
|
+
*/
|
|
2046
2137
|
queryByReportIds(reportIds: string[]): Promise<ThreatScanReport[]>;
|
|
2047
2138
|
}
|
|
2048
2139
|
|
|
2140
|
+
/** Classification of SDK errors by origin. */
|
|
2049
2141
|
declare enum ErrorType {
|
|
2142
|
+
/** 5xx response from the AIRS API. */
|
|
2050
2143
|
SERVER_SIDE_ERROR = "AISEC_SERVER_SIDE_ERROR",
|
|
2144
|
+
/** 4xx response or network failure. */
|
|
2051
2145
|
CLIENT_SIDE_ERROR = "AISEC_CLIENT_SIDE_ERROR",
|
|
2146
|
+
/** Invalid user-supplied input (bad UUID, oversized content, etc.). */
|
|
2052
2147
|
USER_REQUEST_PAYLOAD_ERROR = "AISEC_USER_REQUEST_PAYLOAD_ERROR",
|
|
2148
|
+
/** Required configuration value is missing. */
|
|
2053
2149
|
MISSING_VARIABLE = "AISEC_MISSING_VARIABLE",
|
|
2150
|
+
/** Internal SDK error. */
|
|
2054
2151
|
AISEC_SDK_ERROR = "AISEC_SDK_ERROR",
|
|
2152
|
+
/** OAuth2 token fetch failure. */
|
|
2055
2153
|
OAUTH_ERROR = "AISEC_OAUTH_ERROR"
|
|
2056
2154
|
}
|
|
2155
|
+
/**
|
|
2156
|
+
* Base exception for all AIRS SDK errors.
|
|
2157
|
+
* The `errorType` field classifies the error origin.
|
|
2158
|
+
*/
|
|
2057
2159
|
declare class AISecSDKException extends Error {
|
|
2058
2160
|
readonly errorType?: ErrorType;
|
|
2161
|
+
/**
|
|
2162
|
+
* @param message - Human-readable error description.
|
|
2163
|
+
* @param errorType - Classification of the error.
|
|
2164
|
+
*/
|
|
2059
2165
|
constructor(message: string, errorType?: ErrorType);
|
|
2060
2166
|
}
|
|
2061
2167
|
|
|
2168
|
+
/** Scan result verdict classification. */
|
|
2169
|
+
declare const Verdict: {
|
|
2170
|
+
readonly BENIGN: "benign";
|
|
2171
|
+
readonly MALICIOUS: "malicious";
|
|
2172
|
+
readonly UNKNOWN: "unknown";
|
|
2173
|
+
};
|
|
2174
|
+
/** Union type of all possible verdict values. */
|
|
2175
|
+
type Verdict = (typeof Verdict)[keyof typeof Verdict];
|
|
2176
|
+
/** Enforcement action taken by AIRS. */
|
|
2177
|
+
declare const Action: {
|
|
2178
|
+
readonly ALLOW: "allow";
|
|
2179
|
+
readonly BLOCK: "block";
|
|
2180
|
+
readonly ALERT: "alert";
|
|
2181
|
+
};
|
|
2182
|
+
/** Union type of all possible action values. */
|
|
2183
|
+
type Action = (typeof Action)[keyof typeof Action];
|
|
2184
|
+
/** Top-level scan result category. */
|
|
2185
|
+
declare const Category: {
|
|
2186
|
+
readonly BENIGN: "benign";
|
|
2187
|
+
readonly MALICIOUS: "malicious";
|
|
2188
|
+
readonly UNKNOWN: "unknown";
|
|
2189
|
+
};
|
|
2190
|
+
/** Union type of all possible category values. */
|
|
2191
|
+
type Category = (typeof Category)[keyof typeof Category];
|
|
2192
|
+
|
|
2193
|
+
/** Zod schema for prompt detection detail data. */
|
|
2062
2194
|
declare const PromptDetectionDetailsSchema: z.ZodObject<{
|
|
2063
2195
|
topic_guardrails_details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2064
2196
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -2066,7 +2198,9 @@ declare const PromptDetectionDetailsSchema: z.ZodObject<{
|
|
|
2066
2198
|
}, {
|
|
2067
2199
|
topic_guardrails_details?: Record<string, unknown> | undefined;
|
|
2068
2200
|
}>;
|
|
2201
|
+
/** Prompt detection detail data including topic guardrails. */
|
|
2069
2202
|
type PromptDetectionDetails = z.infer<typeof PromptDetectionDetailsSchema>;
|
|
2203
|
+
/** Zod schema for prompt-side detection flags. */
|
|
2070
2204
|
declare const PromptDetectedSchema: z.ZodObject<{
|
|
2071
2205
|
url_cats: z.ZodOptional<z.ZodBoolean>;
|
|
2072
2206
|
dlp: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -2092,8 +2226,10 @@ declare const PromptDetectedSchema: z.ZodObject<{
|
|
|
2092
2226
|
agent?: boolean | undefined;
|
|
2093
2227
|
topic_violation?: boolean | undefined;
|
|
2094
2228
|
}>;
|
|
2229
|
+
/** Flags indicating which detection types triggered on the prompt. */
|
|
2095
2230
|
type PromptDetected = z.infer<typeof PromptDetectedSchema>;
|
|
2096
2231
|
|
|
2232
|
+
/** Zod schema for response detection detail data. */
|
|
2097
2233
|
declare const ResponseDetectionDetailsSchema: z.ZodObject<{
|
|
2098
2234
|
topic_guardrails_details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2099
2235
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -2101,7 +2237,9 @@ declare const ResponseDetectionDetailsSchema: z.ZodObject<{
|
|
|
2101
2237
|
}, {
|
|
2102
2238
|
topic_guardrails_details?: Record<string, unknown> | undefined;
|
|
2103
2239
|
}>;
|
|
2240
|
+
/** Response detection detail data including topic guardrails. */
|
|
2104
2241
|
type ResponseDetectionDetails = z.infer<typeof ResponseDetectionDetailsSchema>;
|
|
2242
|
+
/** Zod schema for response-side detection flags. */
|
|
2105
2243
|
declare const ResponseDetectedSchema: z.ZodObject<{
|
|
2106
2244
|
url_cats: z.ZodOptional<z.ZodBoolean>;
|
|
2107
2245
|
dlp: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -2130,8 +2268,10 @@ declare const ResponseDetectedSchema: z.ZodObject<{
|
|
|
2130
2268
|
db_security?: boolean | undefined;
|
|
2131
2269
|
ungrounded?: boolean | undefined;
|
|
2132
2270
|
}>;
|
|
2271
|
+
/** Flags indicating which detection types triggered on the response. */
|
|
2133
2272
|
type ResponseDetected = z.infer<typeof ResponseDetectedSchema>;
|
|
2134
2273
|
|
|
2274
|
+
/** Zod schema for detection service detail results (URLF and DLP reports). */
|
|
2135
2275
|
declare const DSDetailResultSchema: z.ZodObject<{
|
|
2136
2276
|
urlf_report: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2137
2277
|
url: z.ZodOptional<z.ZodString>;
|
|
@@ -2197,7 +2337,9 @@ declare const DSDetailResultSchema: z.ZodObject<{
|
|
|
2197
2337
|
data_pattern_rule2_verdict?: string | undefined;
|
|
2198
2338
|
} | undefined;
|
|
2199
2339
|
}>;
|
|
2340
|
+
/** Detection service detail results containing URLF and DLP reports. */
|
|
2200
2341
|
type DSDetailResult = z.infer<typeof DSDetailResultSchema>;
|
|
2342
|
+
/** Zod schema for detection service result metadata (score and confidence). */
|
|
2201
2343
|
declare const DSResultMetadataSchema: z.ZodObject<{
|
|
2202
2344
|
score: z.ZodOptional<z.ZodNumber>;
|
|
2203
2345
|
confidence: z.ZodOptional<z.ZodString>;
|
|
@@ -2208,7 +2350,9 @@ declare const DSResultMetadataSchema: z.ZodObject<{
|
|
|
2208
2350
|
score: z.ZodOptional<z.ZodNumber>;
|
|
2209
2351
|
confidence: z.ZodOptional<z.ZodString>;
|
|
2210
2352
|
}, z.ZodTypeAny, "passthrough">>;
|
|
2353
|
+
/** Detection service result metadata with score and confidence. */
|
|
2211
2354
|
type DSResultMetadata = z.infer<typeof DSResultMetadataSchema>;
|
|
2355
|
+
/** Zod schema for an individual detection service result. */
|
|
2212
2356
|
declare const DetectionServiceResultSchema: z.ZodObject<{
|
|
2213
2357
|
data_type: z.ZodOptional<z.ZodString>;
|
|
2214
2358
|
detection_service: z.ZodOptional<z.ZodString>;
|
|
@@ -2338,8 +2482,10 @@ declare const DetectionServiceResultSchema: z.ZodObject<{
|
|
|
2338
2482
|
} | undefined;
|
|
2339
2483
|
} | undefined;
|
|
2340
2484
|
}>;
|
|
2485
|
+
/** Individual detection service result with verdict, action, and details. */
|
|
2341
2486
|
type DetectionServiceResult = z.infer<typeof DetectionServiceResultSchema>;
|
|
2342
2487
|
|
|
2488
|
+
/** Zod schema for a DLP (Data Loss Prevention) report. */
|
|
2343
2489
|
declare const DlpReportSchema: z.ZodObject<{
|
|
2344
2490
|
dlp_report_id: z.ZodOptional<z.ZodString>;
|
|
2345
2491
|
dlp_profile_name: z.ZodOptional<z.ZodString>;
|
|
@@ -2362,8 +2508,10 @@ declare const DlpReportSchema: z.ZodObject<{
|
|
|
2362
2508
|
data_pattern_rule1_verdict?: string | undefined;
|
|
2363
2509
|
data_pattern_rule2_verdict?: string | undefined;
|
|
2364
2510
|
}>;
|
|
2511
|
+
/** DLP report with profile info and data pattern rule verdicts. */
|
|
2365
2512
|
type DlpReport = z.infer<typeof DlpReportSchema>;
|
|
2366
2513
|
|
|
2514
|
+
/** Zod schema for a URL filtering report entry. */
|
|
2367
2515
|
declare const UrlfEntrySchema: z.ZodObject<{
|
|
2368
2516
|
url: z.ZodOptional<z.ZodString>;
|
|
2369
2517
|
risk_level: z.ZodOptional<z.ZodString>;
|
|
@@ -2377,8 +2525,10 @@ declare const UrlfEntrySchema: z.ZodObject<{
|
|
|
2377
2525
|
risk_level?: string | undefined;
|
|
2378
2526
|
categories?: string[] | undefined;
|
|
2379
2527
|
}>;
|
|
2528
|
+
/** URL filtering report entry with URL, risk level, and categories. */
|
|
2380
2529
|
type UrlfEntry = z.infer<typeof UrlfEntrySchema>;
|
|
2381
2530
|
|
|
2531
|
+
/** Zod schema for an AIRS API error response. */
|
|
2382
2532
|
declare const ErrorResponseSchema: z.ZodObject<{
|
|
2383
2533
|
status_code: z.ZodOptional<z.ZodNumber>;
|
|
2384
2534
|
message: z.ZodOptional<z.ZodString>;
|
|
@@ -2420,8 +2570,10 @@ declare const ErrorResponseSchema: z.ZodObject<{
|
|
|
2420
2570
|
unit?: string | undefined;
|
|
2421
2571
|
} | undefined;
|
|
2422
2572
|
}>;
|
|
2573
|
+
/** AIRS API error response with optional retry-after guidance. */
|
|
2423
2574
|
type ErrorResponse = z.infer<typeof ErrorResponseSchema>;
|
|
2424
2575
|
|
|
2576
|
+
/** Zod schema for the security profile policy. */
|
|
2425
2577
|
declare const PolicySchema: z.ZodObject<{
|
|
2426
2578
|
'data-leak-detection': z.ZodOptional<z.ZodObject<{
|
|
2427
2579
|
'data-leak-detection-status': z.ZodOptional<z.ZodString>;
|
|
@@ -2954,7 +3106,9 @@ declare const PolicySchema: z.ZodObject<{
|
|
|
2954
3106
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
2955
3107
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
2956
3108
|
}, z.ZodTypeAny, "passthrough">>;
|
|
3109
|
+
/** Security profile policy containing all protection and configuration settings. */
|
|
2957
3110
|
type Policy = z.infer<typeof PolicySchema>;
|
|
3111
|
+
/** Zod schema for an AIRS security profile. */
|
|
2958
3112
|
declare const SecurityProfileSchema: z.ZodObject<{
|
|
2959
3113
|
profile_id: z.ZodOptional<z.ZodString>;
|
|
2960
3114
|
profile_name: z.ZodString;
|
|
@@ -4576,7 +4730,9 @@ declare const SecurityProfileSchema: z.ZodObject<{
|
|
|
4576
4730
|
updated_by: z.ZodOptional<z.ZodString>;
|
|
4577
4731
|
last_modified_ts: z.ZodOptional<z.ZodString>;
|
|
4578
4732
|
}, z.ZodTypeAny, "passthrough">>;
|
|
4733
|
+
/** AIRS security profile with name, policy, and audit metadata. */
|
|
4579
4734
|
type SecurityProfile = z.infer<typeof SecurityProfileSchema>;
|
|
4735
|
+
/** Zod schema for a security profile create/update request. */
|
|
4580
4736
|
declare const CreateSecurityProfileRequestSchema: z.ZodObject<{
|
|
4581
4737
|
profile_id: z.ZodOptional<z.ZodString>;
|
|
4582
4738
|
profile_name: z.ZodString;
|
|
@@ -6198,7 +6354,9 @@ declare const CreateSecurityProfileRequestSchema: z.ZodObject<{
|
|
|
6198
6354
|
updated_by: z.ZodOptional<z.ZodString>;
|
|
6199
6355
|
last_modified_ts: z.ZodOptional<z.ZodString>;
|
|
6200
6356
|
}, z.ZodTypeAny, "passthrough">>;
|
|
6357
|
+
/** Request body for creating or updating a security profile. */
|
|
6201
6358
|
type CreateSecurityProfileRequest = z.infer<typeof CreateSecurityProfileRequestSchema>;
|
|
6359
|
+
/** Zod schema for a paginated security profile list response. */
|
|
6202
6360
|
declare const SecurityProfileListResponseSchema: z.ZodObject<{
|
|
6203
6361
|
ai_profiles: z.ZodArray<z.ZodObject<{
|
|
6204
6362
|
profile_id: z.ZodOptional<z.ZodString>;
|
|
@@ -11069,7 +11227,9 @@ declare const SecurityProfileListResponseSchema: z.ZodObject<{
|
|
|
11069
11227
|
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
11070
11228
|
next_offset: z.ZodOptional<z.ZodNumber>;
|
|
11071
11229
|
}, z.ZodTypeAny, "passthrough">>;
|
|
11230
|
+
/** Paginated list of security profiles. */
|
|
11072
11231
|
type SecurityProfileListResponse = z.infer<typeof SecurityProfileListResponseSchema>;
|
|
11232
|
+
/** Zod schema for a profile deletion response. */
|
|
11073
11233
|
declare const DeleteProfileResponseSchema: z.ZodObject<{
|
|
11074
11234
|
message: z.ZodString;
|
|
11075
11235
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
@@ -11077,7 +11237,9 @@ declare const DeleteProfileResponseSchema: z.ZodObject<{
|
|
|
11077
11237
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
11078
11238
|
message: z.ZodString;
|
|
11079
11239
|
}, z.ZodTypeAny, "passthrough">>;
|
|
11240
|
+
/** Response from deleting a security profile. */
|
|
11080
11241
|
type DeleteProfileResponse = z.infer<typeof DeleteProfileResponseSchema>;
|
|
11242
|
+
/** Zod schema for a profile deletion conflict (409). */
|
|
11081
11243
|
declare const DeleteProfileConflictSchema: z.ZodObject<{
|
|
11082
11244
|
message: z.ZodString;
|
|
11083
11245
|
payload: z.ZodArray<z.ZodObject<{
|
|
@@ -11124,8 +11286,10 @@ declare const DeleteProfileConflictSchema: z.ZodObject<{
|
|
|
11124
11286
|
priority: z.ZodNumber;
|
|
11125
11287
|
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
11126
11288
|
}, z.ZodTypeAny, "passthrough">>;
|
|
11289
|
+
/** Conflict response when deleting a profile referenced by policies. */
|
|
11127
11290
|
type DeleteProfileConflict = z.infer<typeof DeleteProfileConflictSchema>;
|
|
11128
11291
|
|
|
11292
|
+
/** Zod schema for an AIRS custom topic. */
|
|
11129
11293
|
declare const CustomTopicSchema: z.ZodObject<{
|
|
11130
11294
|
topic_id: z.ZodOptional<z.ZodString>;
|
|
11131
11295
|
topic_name: z.ZodString;
|
|
@@ -11160,7 +11324,9 @@ declare const CustomTopicSchema: z.ZodObject<{
|
|
|
11160
11324
|
last_modified_ts: z.ZodOptional<z.ZodString>;
|
|
11161
11325
|
created_ts: z.ZodOptional<z.ZodString>;
|
|
11162
11326
|
}, z.ZodTypeAny, "passthrough">>;
|
|
11327
|
+
/** AIRS custom topic with name, description, examples, and audit metadata. */
|
|
11163
11328
|
type CustomTopic = z.infer<typeof CustomTopicSchema>;
|
|
11329
|
+
/** Zod schema for a custom topic create/update request. */
|
|
11164
11330
|
declare const CreateCustomTopicRequestSchema: z.ZodObject<{
|
|
11165
11331
|
topic_id: z.ZodOptional<z.ZodString>;
|
|
11166
11332
|
topic_name: z.ZodString;
|
|
@@ -11195,7 +11361,9 @@ declare const CreateCustomTopicRequestSchema: z.ZodObject<{
|
|
|
11195
11361
|
last_modified_ts: z.ZodOptional<z.ZodString>;
|
|
11196
11362
|
created_ts: z.ZodOptional<z.ZodString>;
|
|
11197
11363
|
}, z.ZodTypeAny, "passthrough">>;
|
|
11364
|
+
/** Request body for creating or updating a custom topic. */
|
|
11198
11365
|
type CreateCustomTopicRequest = z.infer<typeof CreateCustomTopicRequestSchema>;
|
|
11366
|
+
/** Zod schema for a paginated custom topic list response. */
|
|
11199
11367
|
declare const CustomTopicListResponseSchema: z.ZodObject<{
|
|
11200
11368
|
custom_topics: z.ZodArray<z.ZodObject<{
|
|
11201
11369
|
topic_id: z.ZodOptional<z.ZodString>;
|
|
@@ -11305,7 +11473,9 @@ declare const CustomTopicListResponseSchema: z.ZodObject<{
|
|
|
11305
11473
|
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
11306
11474
|
next_offset: z.ZodOptional<z.ZodNumber>;
|
|
11307
11475
|
}, z.ZodTypeAny, "passthrough">>;
|
|
11476
|
+
/** Paginated list of custom topics. */
|
|
11308
11477
|
type CustomTopicListResponse = z.infer<typeof CustomTopicListResponseSchema>;
|
|
11478
|
+
/** Zod schema for a topic deletion response. */
|
|
11309
11479
|
declare const DeleteTopicResponseSchema: z.ZodObject<{
|
|
11310
11480
|
message: z.ZodString;
|
|
11311
11481
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
@@ -11313,7 +11483,9 @@ declare const DeleteTopicResponseSchema: z.ZodObject<{
|
|
|
11313
11483
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
11314
11484
|
message: z.ZodString;
|
|
11315
11485
|
}, z.ZodTypeAny, "passthrough">>;
|
|
11486
|
+
/** Response from deleting a custom topic. */
|
|
11316
11487
|
type DeleteTopicResponse = z.infer<typeof DeleteTopicResponseSchema>;
|
|
11488
|
+
/** Zod schema for a topic deletion conflict (409). */
|
|
11317
11489
|
declare const DeleteTopicConflictSchema: z.ZodObject<{
|
|
11318
11490
|
message: z.ZodString;
|
|
11319
11491
|
payload: z.ZodArray<z.ZodObject<{
|
|
@@ -11360,6 +11532,7 @@ declare const DeleteTopicConflictSchema: z.ZodObject<{
|
|
|
11360
11532
|
revision: z.ZodNumber;
|
|
11361
11533
|
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
11362
11534
|
}, z.ZodTypeAny, "passthrough">>;
|
|
11535
|
+
/** Conflict response when deleting a topic referenced by profiles. */
|
|
11363
11536
|
type DeleteTopicConflict = z.infer<typeof DeleteTopicConflictSchema>;
|
|
11364
11537
|
|
|
11365
11538
|
declare const HEADER_API_KEY = "x-pan-token";
|
|
@@ -11386,8 +11559,8 @@ declare const MAX_NUMBER_OF_BATCH_SCAN_OBJECTS = 5;
|
|
|
11386
11559
|
declare const MAX_CONNECTION_POOL_SIZE = 100;
|
|
11387
11560
|
declare const MAX_NUMBER_OF_RETRIES = 5;
|
|
11388
11561
|
declare const HTTP_FORCE_RETRY_STATUS_CODES: number[];
|
|
11389
|
-
declare const SDK_VERSION = "0.1
|
|
11390
|
-
declare const USER_AGENT = "PAN-AIRS/0.1
|
|
11562
|
+
declare const SDK_VERSION = "0.2.1";
|
|
11563
|
+
declare const USER_AGENT = "PAN-AIRS/0.2.1-typescript-sdk";
|
|
11391
11564
|
declare const DEFAULT_MGMT_ENDPOINT = "https://api.sase.paloaltonetworks.com/aisec";
|
|
11392
11565
|
declare const DEFAULT_TOKEN_ENDPOINT = "https://auth.apps.paloaltonetworks.com/oauth2/access_token";
|
|
11393
11566
|
declare const MGMT_CLIENT_ID = "PANW_MGMT_CLIENT_ID";
|
|
@@ -11405,12 +11578,21 @@ declare const MGMT_TOPIC_PATH = "/v1/mgmt/topic";
|
|
|
11405
11578
|
declare const MGMT_TOPICS_TSG_PATH = "/v1/mgmt/topics/tsg";
|
|
11406
11579
|
declare const MGMT_TOPIC_FORCE_PATH = "/v1/mgmt/topic/force";
|
|
11407
11580
|
|
|
11581
|
+
/** Options for constructing an {@link OAuthClient}. */
|
|
11408
11582
|
interface OAuthClientOptions {
|
|
11583
|
+
/** OAuth2 client ID. */
|
|
11409
11584
|
clientId: string;
|
|
11585
|
+
/** OAuth2 client secret. */
|
|
11410
11586
|
clientSecret: string;
|
|
11587
|
+
/** Tenant Service Group ID. */
|
|
11411
11588
|
tsgId: string;
|
|
11589
|
+
/** OAuth2 token endpoint URL. Defaults to Palo Alto Networks auth endpoint. */
|
|
11412
11590
|
tokenEndpoint?: string;
|
|
11413
11591
|
}
|
|
11592
|
+
/**
|
|
11593
|
+
* OAuth2 client_credentials token manager.
|
|
11594
|
+
* Caches tokens, refreshes before expiry, and deduplicates concurrent requests.
|
|
11595
|
+
*/
|
|
11414
11596
|
declare class OAuthClient {
|
|
11415
11597
|
readonly tokenEndpoint: string;
|
|
11416
11598
|
private readonly clientId;
|
|
@@ -11420,64 +11602,134 @@ declare class OAuthClient {
|
|
|
11420
11602
|
private expiresAt;
|
|
11421
11603
|
private pendingFetch;
|
|
11422
11604
|
constructor(opts: OAuthClientOptions);
|
|
11605
|
+
/**
|
|
11606
|
+
* Get a valid access token, refreshing if needed.
|
|
11607
|
+
* @returns Bearer access token string.
|
|
11608
|
+
*/
|
|
11423
11609
|
getToken(): Promise<string>;
|
|
11610
|
+
/** Clear the cached token, forcing a fresh fetch on next call. */
|
|
11424
11611
|
clearToken(): void;
|
|
11425
11612
|
private fetchToken;
|
|
11426
11613
|
}
|
|
11427
11614
|
|
|
11615
|
+
/** Pagination parameters for list operations. */
|
|
11428
11616
|
interface PaginationOptions {
|
|
11617
|
+
/** Starting offset. Defaults to 0. */
|
|
11429
11618
|
offset?: number;
|
|
11619
|
+
/** Max items to return. Defaults to 100. */
|
|
11430
11620
|
limit?: number;
|
|
11431
11621
|
}
|
|
11622
|
+
/** @internal */
|
|
11432
11623
|
interface ProfilesClientOptions {
|
|
11433
11624
|
baseUrl: string;
|
|
11434
11625
|
oauthClient: OAuthClient;
|
|
11435
11626
|
tsgId: string;
|
|
11436
11627
|
numRetries: number;
|
|
11437
11628
|
}
|
|
11629
|
+
/** Client for AIRS security profile CRUD operations. */
|
|
11438
11630
|
declare class ProfilesClient {
|
|
11439
11631
|
private readonly baseUrl;
|
|
11440
11632
|
private readonly oauthClient;
|
|
11441
11633
|
private readonly tsgId;
|
|
11442
11634
|
private readonly numRetries;
|
|
11443
11635
|
constructor(opts: ProfilesClientOptions);
|
|
11636
|
+
/**
|
|
11637
|
+
* Create a new security profile.
|
|
11638
|
+
* @param request - Profile configuration.
|
|
11639
|
+
* @returns The created security profile.
|
|
11640
|
+
*/
|
|
11444
11641
|
create(request: CreateSecurityProfileRequest): Promise<SecurityProfile>;
|
|
11642
|
+
/**
|
|
11643
|
+
* List security profiles for the TSG.
|
|
11644
|
+
* @param opts - Pagination options.
|
|
11645
|
+
* @returns Paginated list of security profiles.
|
|
11646
|
+
*/
|
|
11445
11647
|
list(opts?: PaginationOptions): Promise<SecurityProfileListResponse>;
|
|
11648
|
+
/**
|
|
11649
|
+
* Update an existing security profile.
|
|
11650
|
+
* @param profileId - UUID of the profile to update.
|
|
11651
|
+
* @param request - Updated profile configuration.
|
|
11652
|
+
* @returns The updated security profile.
|
|
11653
|
+
*/
|
|
11446
11654
|
update(profileId: string, request: CreateSecurityProfileRequest): Promise<SecurityProfile>;
|
|
11655
|
+
/**
|
|
11656
|
+
* Delete a security profile.
|
|
11657
|
+
* @param profileId - UUID of the profile to delete.
|
|
11658
|
+
* @returns Deletion confirmation message.
|
|
11659
|
+
*/
|
|
11447
11660
|
delete(profileId: string): Promise<DeleteProfileResponse>;
|
|
11448
11661
|
}
|
|
11449
11662
|
|
|
11663
|
+
/** @internal */
|
|
11450
11664
|
interface TopicsClientOptions {
|
|
11451
11665
|
baseUrl: string;
|
|
11452
11666
|
oauthClient: OAuthClient;
|
|
11453
11667
|
tsgId: string;
|
|
11454
11668
|
numRetries: number;
|
|
11455
11669
|
}
|
|
11670
|
+
/** Client for AIRS custom topic CRUD operations. */
|
|
11456
11671
|
declare class TopicsClient {
|
|
11457
11672
|
private readonly baseUrl;
|
|
11458
11673
|
private readonly oauthClient;
|
|
11459
11674
|
private readonly tsgId;
|
|
11460
11675
|
private readonly numRetries;
|
|
11461
11676
|
constructor(opts: TopicsClientOptions);
|
|
11677
|
+
/**
|
|
11678
|
+
* Create a new custom topic.
|
|
11679
|
+
* @param request - Topic definition with name, description, and examples.
|
|
11680
|
+
* @returns The created custom topic.
|
|
11681
|
+
*/
|
|
11462
11682
|
create(request: CreateCustomTopicRequest): Promise<CustomTopic>;
|
|
11683
|
+
/**
|
|
11684
|
+
* List custom topics for the TSG.
|
|
11685
|
+
* @param opts - Pagination options.
|
|
11686
|
+
* @returns Paginated list of custom topics.
|
|
11687
|
+
*/
|
|
11463
11688
|
list(opts?: PaginationOptions): Promise<CustomTopicListResponse>;
|
|
11689
|
+
/**
|
|
11690
|
+
* Update an existing custom topic.
|
|
11691
|
+
* @param topicId - UUID of the topic to update.
|
|
11692
|
+
* @param request - Updated topic definition.
|
|
11693
|
+
* @returns The updated custom topic.
|
|
11694
|
+
*/
|
|
11464
11695
|
update(topicId: string, request: CreateCustomTopicRequest): Promise<CustomTopic>;
|
|
11696
|
+
/**
|
|
11697
|
+
* Delete a custom topic. Fails if topic is referenced by a profile.
|
|
11698
|
+
* @param topicId - UUID of the topic to delete.
|
|
11699
|
+
* @returns Deletion confirmation message.
|
|
11700
|
+
*/
|
|
11465
11701
|
delete(topicId: string): Promise<DeleteTopicResponse>;
|
|
11702
|
+
/**
|
|
11703
|
+
* Force-delete a custom topic, removing it from any referencing profiles.
|
|
11704
|
+
* @param topicId - UUID of the topic to force-delete.
|
|
11705
|
+
* @returns Deletion confirmation message.
|
|
11706
|
+
*/
|
|
11466
11707
|
forceDelete(topicId: string): Promise<DeleteTopicResponse>;
|
|
11467
11708
|
}
|
|
11468
11709
|
|
|
11710
|
+
/** Options for constructing a {@link ManagementClient}. */
|
|
11469
11711
|
interface ManagementClientOptions {
|
|
11712
|
+
/** OAuth2 client ID. Falls back to `PANW_MGMT_CLIENT_ID` env var. */
|
|
11470
11713
|
clientId?: string;
|
|
11714
|
+
/** OAuth2 client secret. Falls back to `PANW_MGMT_CLIENT_SECRET` env var. */
|
|
11471
11715
|
clientSecret?: string;
|
|
11716
|
+
/** Tenant Service Group ID. Falls back to `PANW_MGMT_TSG_ID` env var. */
|
|
11472
11717
|
tsgId?: string;
|
|
11718
|
+
/** Management API endpoint URL. Falls back to `PANW_MGMT_ENDPOINT` env var. */
|
|
11473
11719
|
apiEndpoint?: string;
|
|
11720
|
+
/** OAuth2 token endpoint URL. Falls back to `PANW_MGMT_TOKEN_ENDPOINT` env var. */
|
|
11474
11721
|
tokenEndpoint?: string;
|
|
11722
|
+
/** Max retry attempts (0–5). Defaults to 5. */
|
|
11475
11723
|
numRetries?: number;
|
|
11476
11724
|
}
|
|
11725
|
+
/**
|
|
11726
|
+
* Client for AIRS management API operations (profiles and topics CRUD).
|
|
11727
|
+
* Authenticates via OAuth2 client_credentials flow.
|
|
11728
|
+
*/
|
|
11477
11729
|
declare class ManagementClient {
|
|
11478
11730
|
readonly profiles: ProfilesClient;
|
|
11479
11731
|
readonly topics: TopicsClient;
|
|
11480
11732
|
constructor(opts?: ManagementClientOptions);
|
|
11481
11733
|
}
|
|
11482
11734
|
|
|
11483
|
-
export { AISecSDKException, AI_SEC_API_ENDPOINT, AI_SEC_API_KEY, AI_SEC_API_TOKEN, ASYNC_SCAN_PATH, type AgentMeta, AgentMetaSchema, type AiProfile, AiProfileSchema, type AsyncScanObject, AsyncScanObjectSchema, type AsyncScanResponse, AsyncScanResponseSchema, BEARER, Content, type ContentOptions, type CreateCustomTopicRequest, CreateCustomTopicRequestSchema, type CreateSecurityProfileRequest, CreateSecurityProfileRequestSchema, type CustomTopic, type CustomTopicListResponse, CustomTopicListResponseSchema, CustomTopicSchema, DEFAULT_ENDPOINT, DEFAULT_MGMT_ENDPOINT, DEFAULT_TOKEN_ENDPOINT, type DSDetailResult, DSDetailResultSchema, type DSResultMetadata, DSResultMetadataSchema, type DeleteProfileConflict, DeleteProfileConflictSchema, type DeleteProfileResponse, DeleteProfileResponseSchema, type DeleteTopicConflict, DeleteTopicConflictSchema, type DeleteTopicResponse, DeleteTopicResponseSchema, type DetectionServiceResult, DetectionServiceResultSchema, type DlpReport, DlpReportSchema, type ErrorResponse, ErrorResponseSchema, ErrorType, HEADER_API_KEY, HEADER_AUTH_TOKEN, HTTP_FORCE_RETRY_STATUS_CODES, type IODetected, IODetectedSchema, type InitOptions, MAX_AI_PROFILE_NAME_LENGTH, MAX_API_KEY_LENGTH, MAX_CONNECTION_POOL_SIZE, MAX_CONTENT_CONTEXT_LENGTH, MAX_CONTENT_PROMPT_LENGTH, MAX_CONTENT_RESPONSE_LENGTH, MAX_NUMBER_OF_BATCH_SCAN_OBJECTS, MAX_NUMBER_OF_REPORT_IDS, MAX_NUMBER_OF_RETRIES, MAX_NUMBER_OF_SCAN_IDS, MAX_REPORT_ID_STR_LENGTH, MAX_SCAN_ID_STR_LENGTH, MAX_SESSION_ID_STR_LENGTH, MAX_TOKEN_LENGTH, MAX_TRANSACTION_ID_STR_LENGTH, MGMT_CLIENT_ID, MGMT_CLIENT_SECRET, MGMT_ENDPOINT, MGMT_PROFILES_TSG_PATH, MGMT_PROFILE_PATH, MGMT_TOKEN_ENDPOINT, MGMT_TOPICS_TSG_PATH, MGMT_TOPIC_FORCE_PATH, MGMT_TOPIC_PATH, MGMT_TSG_ID, ManagementClient, type ManagementClientOptions, type MaskedData, MaskedDataSchema, type Metadata, MetadataSchema, PAYLOAD_HASH, type PaginationOptions, type Policy, PolicySchema, ProfilesClient, type PromptDetected, PromptDetectedSchema, type PromptDetectionDetails, PromptDetectionDetailsSchema, type ResponseDetected, ResponseDetectedSchema, type ResponseDetectionDetails, ResponseDetectionDetailsSchema, SCAN_REPORTS_PATH, SCAN_RESULTS_PATH, SDK_VERSION, SYNC_SCAN_PATH, type ScanIdResult, ScanIdResultSchema, type ScanRequest, type ScanRequestContentsInner, ScanRequestContentsInnerSchema, ScanRequestSchema, type ScanResponse, ScanResponseSchema, type ScanSummary, ScanSummarySchema, Scanner, type SecurityProfile, type SecurityProfileListResponse, SecurityProfileListResponseSchema, SecurityProfileSchema, type SyncScanOptions, type ThreatScanReport, ThreatScanReportSchema, type ToolDetected, ToolDetectedSchema, type ToolEvent, type ToolEventMetadata, ToolEventMetadataSchema, ToolEventSchema, TopicsClient, USER_AGENT, type UrlfEntry, UrlfEntrySchema, globalConfiguration, init };
|
|
11735
|
+
export { AISecSDKException, AI_SEC_API_ENDPOINT, AI_SEC_API_KEY, AI_SEC_API_TOKEN, ASYNC_SCAN_PATH, Action, Action as ActionType, type AgentMeta, AgentMetaSchema, type AiProfile, AiProfileSchema, type AsyncScanObject, AsyncScanObjectSchema, type AsyncScanResponse, AsyncScanResponseSchema, BEARER, Category, Category as CategoryType, Content, type ContentOptions, type CreateCustomTopicRequest, CreateCustomTopicRequestSchema, type CreateSecurityProfileRequest, CreateSecurityProfileRequestSchema, type CustomTopic, type CustomTopicListResponse, CustomTopicListResponseSchema, CustomTopicSchema, DEFAULT_ENDPOINT, DEFAULT_MGMT_ENDPOINT, DEFAULT_TOKEN_ENDPOINT, type DSDetailResult, DSDetailResultSchema, type DSResultMetadata, DSResultMetadataSchema, type DeleteProfileConflict, DeleteProfileConflictSchema, type DeleteProfileResponse, DeleteProfileResponseSchema, type DeleteTopicConflict, DeleteTopicConflictSchema, type DeleteTopicResponse, DeleteTopicResponseSchema, type DetectionServiceResult, DetectionServiceResultSchema, type DlpReport, DlpReportSchema, type ErrorResponse, ErrorResponseSchema, ErrorType, HEADER_API_KEY, HEADER_AUTH_TOKEN, HTTP_FORCE_RETRY_STATUS_CODES, type IODetected, IODetectedSchema, type InitOptions, MAX_AI_PROFILE_NAME_LENGTH, MAX_API_KEY_LENGTH, MAX_CONNECTION_POOL_SIZE, MAX_CONTENT_CONTEXT_LENGTH, MAX_CONTENT_PROMPT_LENGTH, MAX_CONTENT_RESPONSE_LENGTH, MAX_NUMBER_OF_BATCH_SCAN_OBJECTS, MAX_NUMBER_OF_REPORT_IDS, MAX_NUMBER_OF_RETRIES, MAX_NUMBER_OF_SCAN_IDS, MAX_REPORT_ID_STR_LENGTH, MAX_SCAN_ID_STR_LENGTH, MAX_SESSION_ID_STR_LENGTH, MAX_TOKEN_LENGTH, MAX_TRANSACTION_ID_STR_LENGTH, MGMT_CLIENT_ID, MGMT_CLIENT_SECRET, MGMT_ENDPOINT, MGMT_PROFILES_TSG_PATH, MGMT_PROFILE_PATH, MGMT_TOKEN_ENDPOINT, MGMT_TOPICS_TSG_PATH, MGMT_TOPIC_FORCE_PATH, MGMT_TOPIC_PATH, MGMT_TSG_ID, ManagementClient, type ManagementClientOptions, type MaskedData, MaskedDataSchema, type Metadata, MetadataSchema, PAYLOAD_HASH, type PaginationOptions, type Policy, PolicySchema, ProfilesClient, type PromptDetected, PromptDetectedSchema, type PromptDetectionDetails, PromptDetectionDetailsSchema, type ResponseDetected, ResponseDetectedSchema, type ResponseDetectionDetails, ResponseDetectionDetailsSchema, SCAN_REPORTS_PATH, SCAN_RESULTS_PATH, SDK_VERSION, SYNC_SCAN_PATH, type ScanIdResult, ScanIdResultSchema, type ScanRequest, type ScanRequestContentsInner, ScanRequestContentsInnerSchema, ScanRequestSchema, type ScanResponse, ScanResponseSchema, type ScanSummary, ScanSummarySchema, Scanner, type SecurityProfile, type SecurityProfileListResponse, SecurityProfileListResponseSchema, SecurityProfileSchema, type SyncScanOptions, type ThreatScanReport, ThreatScanReportSchema, type ToolDetected, ToolDetectedSchema, type ToolEvent, type ToolEventMetadata, ToolEventMetadataSchema, ToolEventSchema, TopicsClient, USER_AGENT, type UrlfEntry, UrlfEntrySchema, Verdict, Verdict as VerdictType, globalConfiguration, init };
|