@crowdstrike/aidr 1.0.2 → 1.1.0
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/.github/CODEOWNERS +1 -1
- package/.github/workflows/ci.yml +0 -43
- package/.github/workflows/publish.yml +52 -0
- package/README.md +91 -0
- package/dist/index.cjs +9 -0
- package/dist/index.d.cts +121 -99
- package/dist/index.d.mts +121 -99
- package/dist/index.mjs +9 -0
- package/dist/schemas/ai-guard.cjs +35 -68
- package/dist/schemas/ai-guard.d.cts +75 -42
- package/dist/schemas/ai-guard.d.mts +75 -42
- package/dist/schemas/ai-guard.mjs +33 -63
- package/package.json +1 -1
- package/specs/ai-guard.openapi.json +302 -210
- package/src/schemas/ai-guard.ts +121 -142
- package/src/services/ai-guard.ts +12 -0
- package/src/types/ai-guard.ts +125 -118
- package/tests/ai-guard.test.ts +26 -1
package/.github/CODEOWNERS
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
* @
|
|
1
|
+
* @crowdstrike/aidr-typescript-CS-Maintainers
|
package/.github/workflows/ci.yml
CHANGED
|
@@ -83,46 +83,3 @@ jobs:
|
|
|
83
83
|
|
|
84
84
|
- name: Test
|
|
85
85
|
run: ./scripts/test
|
|
86
|
-
|
|
87
|
-
release:
|
|
88
|
-
needs:
|
|
89
|
-
- build
|
|
90
|
-
- lint
|
|
91
|
-
- test
|
|
92
|
-
if: github.repository == 'crowdstrike/aidr-typescript' && github.event_name != 'pull_request'
|
|
93
|
-
runs-on: ubuntu-24.04
|
|
94
|
-
environment: release
|
|
95
|
-
permissions:
|
|
96
|
-
contents: write
|
|
97
|
-
id-token: write
|
|
98
|
-
issues: write
|
|
99
|
-
packages: write
|
|
100
|
-
pull-requests: write
|
|
101
|
-
steps:
|
|
102
|
-
- name: Checkout code
|
|
103
|
-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
104
|
-
with:
|
|
105
|
-
fetch-depth: 0
|
|
106
|
-
filter: blob:none
|
|
107
|
-
show-progress: false
|
|
108
|
-
|
|
109
|
-
- run: corepack enable
|
|
110
|
-
|
|
111
|
-
- name: Setup Node.js
|
|
112
|
-
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
|
|
113
|
-
with:
|
|
114
|
-
node-version: 24.11.1
|
|
115
|
-
cache: pnpm
|
|
116
|
-
|
|
117
|
-
- name: Install dependencies
|
|
118
|
-
run: pnpm install
|
|
119
|
-
|
|
120
|
-
- name: Build
|
|
121
|
-
run: pnpm build
|
|
122
|
-
|
|
123
|
-
- name: semantic-release
|
|
124
|
-
run: pnpx semantic-release
|
|
125
|
-
env:
|
|
126
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
127
|
-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
128
|
-
LOG_LEVEL: debug
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
name: Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
concurrency:
|
|
12
|
+
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
|
|
13
|
+
cancel-in-progress: true
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
release:
|
|
17
|
+
if: github.repository == 'crowdstrike/aidr-typescript'
|
|
18
|
+
runs-on: ubuntu-24.04
|
|
19
|
+
environment: release
|
|
20
|
+
permissions:
|
|
21
|
+
contents: write
|
|
22
|
+
id-token: write
|
|
23
|
+
issues: write
|
|
24
|
+
packages: write
|
|
25
|
+
pull-requests: write
|
|
26
|
+
steps:
|
|
27
|
+
- name: Checkout code
|
|
28
|
+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
29
|
+
with:
|
|
30
|
+
fetch-depth: 0
|
|
31
|
+
filter: blob:none
|
|
32
|
+
show-progress: false
|
|
33
|
+
|
|
34
|
+
- run: corepack enable
|
|
35
|
+
|
|
36
|
+
- name: Setup Node.js
|
|
37
|
+
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
|
|
38
|
+
with:
|
|
39
|
+
node-version: 24.11.1
|
|
40
|
+
cache: pnpm
|
|
41
|
+
|
|
42
|
+
- name: Install dependencies
|
|
43
|
+
run: pnpm install
|
|
44
|
+
|
|
45
|
+
- name: Build
|
|
46
|
+
run: pnpm build
|
|
47
|
+
|
|
48
|
+
- name: semantic-release
|
|
49
|
+
run: pnpx semantic-release
|
|
50
|
+
env:
|
|
51
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
52
|
+
LOG_LEVEL: debug
|
package/README.md
CHANGED
|
@@ -1,3 +1,94 @@
|
|
|
1
1
|
# CrowdStrike AIDR TypeScript SDK
|
|
2
2
|
|
|
3
3
|
TypeScript SDK for CrowdStrike AIDR.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @crowdstrike/aidr
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pnpm add @crowdstrike/aidr
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
yarn add @crowdstrike/aidr
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import { AIGuard } from "@crowdstrike/aidr";
|
|
23
|
+
|
|
24
|
+
const client = new AIGuard({
|
|
25
|
+
token: "your-api-token",
|
|
26
|
+
baseURLTemplate: "https://api.crowdstrike.com/aidr/{SERVICE_NAME}",
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
const response = await client.guardChatCompletions({
|
|
30
|
+
guard_input: {
|
|
31
|
+
messages: [
|
|
32
|
+
{
|
|
33
|
+
role: "user",
|
|
34
|
+
content: "Hello, how can I help you?",
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
console.log(response);
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Retries
|
|
44
|
+
|
|
45
|
+
The SDK supports automatic retries for temporary failures (network errors or
|
|
46
|
+
HTTP/5XX server errors). It supports configuring retries at the client level or
|
|
47
|
+
per-request.
|
|
48
|
+
|
|
49
|
+
```typescript
|
|
50
|
+
// Set the default number of retries when creating the client.
|
|
51
|
+
const client = new AIGuard({
|
|
52
|
+
token: "your-api-token",
|
|
53
|
+
baseURLTemplate: "https://api.crowdstrike.com/aidr/{SERVICE_NAME}",
|
|
54
|
+
maxRetries: 3, // Default is 2.
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
const response = await client.guardChatCompletions(
|
|
58
|
+
{
|
|
59
|
+
guard_input: {
|
|
60
|
+
messages: [{ role: "user", content: "Hello" }],
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
// Override the default retry count for this specific request.
|
|
65
|
+
maxRetries: 5,
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Timeouts
|
|
71
|
+
|
|
72
|
+
Configure request timeouts to control how long the client waits for a response
|
|
73
|
+
before timing out.
|
|
74
|
+
|
|
75
|
+
```typescript
|
|
76
|
+
// Set the default timeout (in milliseconds) when creating the client.
|
|
77
|
+
const client = new AIGuard({
|
|
78
|
+
token: "your-api-token",
|
|
79
|
+
baseURLTemplate: "https://api.crowdstrike.com/{SERVICE_NAME}",
|
|
80
|
+
timeout: 30000, // 30 seconds (default is 60 seconds).
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
const response = await client.guardChatCompletions(
|
|
84
|
+
{
|
|
85
|
+
guard_input: {
|
|
86
|
+
messages: [{ role: "user", content: "Hello" }],
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
// Override the default timeout for a specific request.
|
|
91
|
+
timeout: 10000, // 10 seconds.
|
|
92
|
+
}
|
|
93
|
+
);
|
|
94
|
+
```
|
package/dist/index.cjs
CHANGED
|
@@ -350,6 +350,15 @@ var AIGuard = class extends Client {
|
|
|
350
350
|
...options
|
|
351
351
|
});
|
|
352
352
|
}
|
|
353
|
+
/**
|
|
354
|
+
* Decrypt or unredact fpe redactions
|
|
355
|
+
*/
|
|
356
|
+
unredact(body, options) {
|
|
357
|
+
return this.post("/v1/unredact", {
|
|
358
|
+
body,
|
|
359
|
+
...options
|
|
360
|
+
});
|
|
361
|
+
}
|
|
353
362
|
};
|
|
354
363
|
|
|
355
364
|
//#endregion
|
package/dist/index.d.cts
CHANGED
|
@@ -110,6 +110,7 @@ type PangeaResponse = {
|
|
|
110
110
|
};
|
|
111
111
|
};
|
|
112
112
|
type PangeaValidationErrors = PangeaResponse;
|
|
113
|
+
type PangeaAcceptedResponse = PangeaResponse;
|
|
113
114
|
/**
|
|
114
115
|
* Device status. Allowed values are active, pending, disabled
|
|
115
116
|
*/
|
|
@@ -657,7 +658,7 @@ type ChatCompletionsGuard = {
|
|
|
657
658
|
/**
|
|
658
659
|
* (AIDR) Event Type.
|
|
659
660
|
*/
|
|
660
|
-
event_type?:
|
|
661
|
+
event_type?: string;
|
|
661
662
|
/**
|
|
662
663
|
* (AIDR) collector instance id.
|
|
663
664
|
*/
|
|
@@ -714,6 +715,10 @@ type ChatCompletionsGuard = {
|
|
|
714
715
|
tools: Array<string>;
|
|
715
716
|
}> | undefined;
|
|
716
717
|
};
|
|
718
|
+
/**
|
|
719
|
+
* FPE (Format Preserving Encryption) context from a previous guard request. When provided, the encrypted input will be unredacted before processing.
|
|
720
|
+
*/
|
|
721
|
+
input_fpe_context?: string;
|
|
717
722
|
};
|
|
718
723
|
type AidrPromptInjectionResult = {
|
|
719
724
|
/**
|
|
@@ -1521,10 +1526,6 @@ type AidrServiceConfigResult = AidrServiceConfig;
|
|
|
1521
1526
|
* A time in ISO-8601 format
|
|
1522
1527
|
*/
|
|
1523
1528
|
type AidrTimestamp = string;
|
|
1524
|
-
/**
|
|
1525
|
-
* A time in ISO-8601 format or null
|
|
1526
|
-
*/
|
|
1527
|
-
type AirdTimestampNullable = AuthnTimestamp | null;
|
|
1528
1529
|
/**
|
|
1529
1530
|
* Define field name and path mapping to extract from the log
|
|
1530
1531
|
*/
|
|
@@ -1761,9 +1762,28 @@ type AidrMetricResultDetectorItem = {
|
|
|
1761
1762
|
};
|
|
1762
1763
|
};
|
|
1763
1764
|
/**
|
|
1764
|
-
*
|
|
1765
|
+
* Configuration for an individual access rule used in an AI Guard recipe. Each rule defines its matching logic and the action to apply when the logic evaluates to true.
|
|
1765
1766
|
*/
|
|
1766
|
-
type
|
|
1767
|
+
type AccessRuleSettings = {
|
|
1768
|
+
/**
|
|
1769
|
+
* Unique identifier for this rule. Should be user-readable and consistent across recipe updates.
|
|
1770
|
+
*/
|
|
1771
|
+
rule_key: string;
|
|
1772
|
+
/**
|
|
1773
|
+
* Display label for the rule shown in user interfaces.
|
|
1774
|
+
*/
|
|
1775
|
+
name: string;
|
|
1776
|
+
/**
|
|
1777
|
+
* Action to apply if the rule matches. Use 'block' to stop further processing or 'report' to simply log the match.
|
|
1778
|
+
*/
|
|
1779
|
+
state: 'block' | 'report';
|
|
1780
|
+
/**
|
|
1781
|
+
* JSON Logic condition that determines whether this rule matches.
|
|
1782
|
+
*/
|
|
1783
|
+
logic: {
|
|
1784
|
+
[key: string]: unknown;
|
|
1785
|
+
};
|
|
1786
|
+
};
|
|
1767
1787
|
/**
|
|
1768
1788
|
* Details about the evaluation of a single rule, including whether it matched, the action to take, the rule name, and optional debugging information.
|
|
1769
1789
|
*/
|
|
@@ -1793,49 +1813,6 @@ type AccessRuleResult = {
|
|
|
1793
1813
|
[key: string]: unknown;
|
|
1794
1814
|
};
|
|
1795
1815
|
};
|
|
1796
|
-
/**
|
|
1797
|
-
* Defines an AI Guard recipe - a named configuration of detectors and redaction settings used to analyze and protect data flows in AI-powered applications.
|
|
1798
|
-
*
|
|
1799
|
-
* Recipes specify which detectors are active, how they behave, and may include reusable settings such as FPE tweaks.
|
|
1800
|
-
*
|
|
1801
|
-
* For details, see the [AI Guard Recipes](https://pangea.cloud/docs/ai-guard/recipes) documentation.
|
|
1802
|
-
*/
|
|
1803
|
-
type RecipeConfig = {
|
|
1804
|
-
/**
|
|
1805
|
-
* Human-readable name of the recipe
|
|
1806
|
-
*/
|
|
1807
|
-
name: string;
|
|
1808
|
-
/**
|
|
1809
|
-
* Detailed description of the recipe's purpose or use case
|
|
1810
|
-
*/
|
|
1811
|
-
description: string;
|
|
1812
|
-
/**
|
|
1813
|
-
* Optional version identifier for the recipe. Can be used to track changes.
|
|
1814
|
-
*/
|
|
1815
|
-
version?: string;
|
|
1816
|
-
/**
|
|
1817
|
-
* Settings for [AI Guard Detectors](https://pangea.cloud/docs/ai-guard/recipes#detectors), including which detectors to enable and how they behave
|
|
1818
|
-
*/
|
|
1819
|
-
detectors?: DetectorSettings;
|
|
1820
|
-
/**
|
|
1821
|
-
* Configuration for access rules used in an AI Guard recipe.
|
|
1822
|
-
*/
|
|
1823
|
-
access_rules?: Array<AccessRuleSettings>;
|
|
1824
|
-
/**
|
|
1825
|
-
* Connector-level Redact configuration. These settings allow you to define reusable redaction parameters, such as FPE tweak value.
|
|
1826
|
-
*/
|
|
1827
|
-
connector_settings?: {
|
|
1828
|
-
/**
|
|
1829
|
-
* Settings for Redact integration at the recipe level
|
|
1830
|
-
*/
|
|
1831
|
-
redact?: {
|
|
1832
|
-
/**
|
|
1833
|
-
* ID of a Vault secret containing the tweak value used for Format-Preserving Encryption (FPE). Enables deterministic encryption, ensuring that identical inputs produce consistent encrypted outputs.
|
|
1834
|
-
*/
|
|
1835
|
-
fpe_tweak_vault_secret_id?: string;
|
|
1836
|
-
};
|
|
1837
|
-
};
|
|
1838
|
-
};
|
|
1839
1816
|
/**
|
|
1840
1817
|
* Configuration for individual detectors used in an AI Guard recipe. Each entry specifies the detector to use, its enabled state, detector-specific settings, and the [action](https://pangea.cloud/docs/ai-guard/recipes#actions) to apply when detections occur.
|
|
1841
1818
|
*/
|
|
@@ -1880,6 +1857,49 @@ type DetectorSettings = Array<{
|
|
|
1880
1857
|
}>;
|
|
1881
1858
|
};
|
|
1882
1859
|
}>;
|
|
1860
|
+
/**
|
|
1861
|
+
* Defines an AI Guard recipe - a named configuration of detectors and redaction settings used to analyze and protect data flows in AI-powered applications.
|
|
1862
|
+
*
|
|
1863
|
+
* Recipes specify which detectors are active, how they behave, and may include reusable settings such as FPE tweaks.
|
|
1864
|
+
*
|
|
1865
|
+
* For details, see the [AI Guard Recipes](https://pangea.cloud/docs/ai-guard/recipes) documentation.
|
|
1866
|
+
*/
|
|
1867
|
+
type RecipeConfig = {
|
|
1868
|
+
/**
|
|
1869
|
+
* Human-readable name of the recipe
|
|
1870
|
+
*/
|
|
1871
|
+
name: string;
|
|
1872
|
+
/**
|
|
1873
|
+
* Detailed description of the recipe's purpose or use case
|
|
1874
|
+
*/
|
|
1875
|
+
description: string;
|
|
1876
|
+
/**
|
|
1877
|
+
* Optional version identifier for the recipe. Can be used to track changes.
|
|
1878
|
+
*/
|
|
1879
|
+
version?: string;
|
|
1880
|
+
/**
|
|
1881
|
+
* Settings for [AI Guard Detectors](https://pangea.cloud/docs/ai-guard/recipes#detectors), including which detectors to enable and how they behave
|
|
1882
|
+
*/
|
|
1883
|
+
detectors?: DetectorSettings;
|
|
1884
|
+
/**
|
|
1885
|
+
* Configuration for access rules used in an AI Guard recipe.
|
|
1886
|
+
*/
|
|
1887
|
+
access_rules?: Array<AccessRuleSettings>;
|
|
1888
|
+
/**
|
|
1889
|
+
* Connector-level Redact configuration. These settings allow you to define reusable redaction parameters, such as FPE tweak value.
|
|
1890
|
+
*/
|
|
1891
|
+
connector_settings?: {
|
|
1892
|
+
/**
|
|
1893
|
+
* Settings for Redact integration at the recipe level
|
|
1894
|
+
*/
|
|
1895
|
+
redact?: {
|
|
1896
|
+
/**
|
|
1897
|
+
* ID of a Vault secret containing the tweak value used for Format-Preserving Encryption (FPE). Enables deterministic encryption, ensuring that identical inputs produce consistent encrypted outputs.
|
|
1898
|
+
*/
|
|
1899
|
+
fpe_tweak_vault_secret_id?: string;
|
|
1900
|
+
};
|
|
1901
|
+
};
|
|
1902
|
+
};
|
|
1883
1903
|
type RuleRedactionConfig = ({
|
|
1884
1904
|
redaction_type?: 'mask' | 'detect_only';
|
|
1885
1905
|
} | {
|
|
@@ -1946,53 +1966,6 @@ type RuleRedactionConfig = ({
|
|
|
1946
1966
|
*/
|
|
1947
1967
|
fpe_alphabet?: 'numeric' | 'alphalower' | 'alphaupper' | 'alpha' | 'alphanumericlower' | 'alphanumericupper' | 'alphanumeric' | null;
|
|
1948
1968
|
};
|
|
1949
|
-
/**
|
|
1950
|
-
* Configuration for an individual access rule used in an AI Guard recipe. Each rule defines its matching logic and the action to apply when the logic evaluates to true.
|
|
1951
|
-
*/
|
|
1952
|
-
type AccessRuleSettings = {
|
|
1953
|
-
/**
|
|
1954
|
-
* Unique identifier for this rule. Should be user-readable and consistent across recipe updates.
|
|
1955
|
-
*/
|
|
1956
|
-
rule_key: string;
|
|
1957
|
-
/**
|
|
1958
|
-
* Display label for the rule shown in user interfaces.
|
|
1959
|
-
*/
|
|
1960
|
-
name: string;
|
|
1961
|
-
/**
|
|
1962
|
-
* Action to apply if the rule matches. Use 'block' to stop further processing or 'report' to simply log the match.
|
|
1963
|
-
*/
|
|
1964
|
-
state: 'block' | 'report';
|
|
1965
|
-
/**
|
|
1966
|
-
* JSON Logic condition that determines whether this rule matches.
|
|
1967
|
-
*/
|
|
1968
|
-
logic: {
|
|
1969
|
-
[key: string]: unknown;
|
|
1970
|
-
};
|
|
1971
|
-
};
|
|
1972
|
-
type LanguageResult = {
|
|
1973
|
-
/**
|
|
1974
|
-
* The action taken by this Detector
|
|
1975
|
-
*/
|
|
1976
|
-
action?: string;
|
|
1977
|
-
language?: string;
|
|
1978
|
-
};
|
|
1979
|
-
type RedactEntityResult = {
|
|
1980
|
-
/**
|
|
1981
|
-
* Detected redaction rules.
|
|
1982
|
-
*/
|
|
1983
|
-
entities?: Array<{
|
|
1984
|
-
/**
|
|
1985
|
-
* The action taken on this Entity
|
|
1986
|
-
*/
|
|
1987
|
-
action: string;
|
|
1988
|
-
type: string;
|
|
1989
|
-
value: string;
|
|
1990
|
-
redacted: boolean;
|
|
1991
|
-
start_pos?: number;
|
|
1992
|
-
}>;
|
|
1993
|
-
};
|
|
1994
|
-
type MaliciousEntityAction = 'report' | 'defang' | 'disabled' | 'block';
|
|
1995
|
-
type PiiEntityAction = 'disabled' | 'report' | 'block' | 'mask' | 'partial_masking' | 'replacement' | 'hash' | 'fpe';
|
|
1996
1969
|
type AidrPostV1GuardChatCompletionsData = {
|
|
1997
1970
|
body?: ChatCompletionsGuard;
|
|
1998
1971
|
path?: never;
|
|
@@ -2132,8 +2105,52 @@ type AidrPostV1GuardChatCompletionsResponses = {
|
|
|
2132
2105
|
fpe_context?: string;
|
|
2133
2106
|
};
|
|
2134
2107
|
};
|
|
2108
|
+
/**
|
|
2109
|
+
* Asynchronous request in progress
|
|
2110
|
+
*/
|
|
2111
|
+
202: PangeaResponse & PangeaAcceptedResponse;
|
|
2135
2112
|
};
|
|
2136
2113
|
type AidrPostV1GuardChatCompletionsResponse = AidrPostV1GuardChatCompletionsResponses[keyof AidrPostV1GuardChatCompletionsResponses];
|
|
2114
|
+
type AidrPostV1UnredactData = {
|
|
2115
|
+
body?: {
|
|
2116
|
+
/**
|
|
2117
|
+
* Data to unredact
|
|
2118
|
+
*/
|
|
2119
|
+
redacted_data: unknown;
|
|
2120
|
+
/**
|
|
2121
|
+
* FPE context used to decrypt and unredact data
|
|
2122
|
+
*/
|
|
2123
|
+
fpe_context: string;
|
|
2124
|
+
};
|
|
2125
|
+
path?: never;
|
|
2126
|
+
query?: never;
|
|
2127
|
+
url: '/v1/unredact';
|
|
2128
|
+
};
|
|
2129
|
+
type AidrPostV1UnredactErrors = {
|
|
2130
|
+
/**
|
|
2131
|
+
* Validation errors
|
|
2132
|
+
*/
|
|
2133
|
+
400: PangeaResponse & PangeaValidationErrors;
|
|
2134
|
+
};
|
|
2135
|
+
type AidrPostV1UnredactError = AidrPostV1UnredactErrors[keyof AidrPostV1UnredactErrors];
|
|
2136
|
+
type AidrPostV1UnredactResponses = {
|
|
2137
|
+
/**
|
|
2138
|
+
* The unredacted data
|
|
2139
|
+
*/
|
|
2140
|
+
200: PangeaResponse & {
|
|
2141
|
+
result?: {
|
|
2142
|
+
/**
|
|
2143
|
+
* The unredacted data
|
|
2144
|
+
*/
|
|
2145
|
+
data: unknown;
|
|
2146
|
+
};
|
|
2147
|
+
};
|
|
2148
|
+
/**
|
|
2149
|
+
* Asynchronous request in progress
|
|
2150
|
+
*/
|
|
2151
|
+
202: PangeaResponse & PangeaAcceptedResponse;
|
|
2152
|
+
};
|
|
2153
|
+
type AidrPostV1UnredactResponse = AidrPostV1UnredactResponses[keyof AidrPostV1UnredactResponses];
|
|
2137
2154
|
type GetAsyncRequestData = {
|
|
2138
2155
|
body?: never;
|
|
2139
2156
|
path: {
|
|
@@ -2154,11 +2171,12 @@ type GetAsyncRequestResponses = {
|
|
|
2154
2171
|
* Asynchronous request in progress
|
|
2155
2172
|
*/
|
|
2156
2173
|
202: PangeaResponse & {
|
|
2157
|
-
result
|
|
2174
|
+
result: {
|
|
2158
2175
|
ttl_mins?: number;
|
|
2159
2176
|
retry_counter?: number;
|
|
2160
2177
|
location?: string;
|
|
2161
2178
|
};
|
|
2179
|
+
status: 'Accepted';
|
|
2162
2180
|
};
|
|
2163
2181
|
};
|
|
2164
2182
|
type GetAsyncRequestResponse = GetAsyncRequestResponses[keyof GetAsyncRequestResponses];
|
|
@@ -2342,6 +2360,10 @@ declare class AIGuard extends Client {
|
|
|
2342
2360
|
* malicious content, and other undesirable data transfers.
|
|
2343
2361
|
*/
|
|
2344
2362
|
guardChatCompletions(body: ChatCompletionsGuard, options?: RequestOptions): Promise<MaybeAcceptedResponse<AidrPostV1GuardChatCompletionsResponse['result']>>;
|
|
2363
|
+
/**
|
|
2364
|
+
* Decrypt or unredact fpe redactions
|
|
2365
|
+
*/
|
|
2366
|
+
unredact(body: AidrPostV1UnredactData['body'], options?: RequestOptions): Promise<MaybeAcceptedResponse<AidrPostV1UnredactResponse['result']>>;
|
|
2345
2367
|
}
|
|
2346
2368
|
//#endregion
|
|
2347
|
-
export { AIGuard, APIResponse, AcceptedResponse, AccessRuleResult, AccessRuleSettings, AidrAccessRulesResponse, AidrAuditDataActivity, AidrCustomlist, AidrCustomlistResult, AidrCustomlistSearch, AidrCustomlistSearchResult, AidrDevice, AidrDeviceCheckResult, AidrDeviceId, AidrDeviceResult, AidrDeviceSearch, AidrDeviceSearchResult, AidrDeviceStatus, AidrDeviceTokenInfo, AidrEmpty, AidrFieldAlias, AidrFieldAliasResult, AidrFieldAliasSearch, AidrFieldAliasSearchResult, AidrGolangDuration, AidrIpv4OrV6, AidrLanguageResult, AidrLog, AidrLogs, AidrMaliciousEntityResult, AidrMetric, AidrMetricAggregateItem, AidrMetricAggregatesResult, AidrMetricAggregatesSearchParams, AidrMetricItem, AidrMetricOnlyData, AidrMetricResult, AidrMetricResultDetectorItem, AidrMetricpoolId, AidrMetricpoolResource, AidrOtelAnyValue, AidrOtelArrayValue, AidrOtelInstrumentationScope, AidrOtelKeyValue, AidrOtelKeyValueList, AidrOtelLogRecord, AidrOtelResource, AidrOtelResourceLogs, AidrOtelScopeLogs, AidrPolicy, AidrPolicyDefaults, AidrPolicyResult, AidrPolicySearch, AidrPolicySearchResult, AidrPolicycollectionResult, AidrPolicycollectionSearch, AidrPolicycollectionSearchResult, AidrPostV1GuardChatCompletionsData, AidrPostV1GuardChatCompletionsError, AidrPostV1GuardChatCompletionsErrors, AidrPostV1GuardChatCompletionsResponse, AidrPostV1GuardChatCompletionsResponses, AidrPromptInjectionResult, AidrPromptItem, AidrPromptItemListResult, AidrRedactEntityResult, AidrResourceFieldMapping, AidrSavedFilter, AidrSavedFilterResult, AidrSavedFilterSearch, AidrSavedFilterSearchResult, AidrSensorHealth, AidrSensorInsights, AidrSensorInsightsItem, AidrSensorInsightsResult, AidrServiceConfig, AidrServiceConfigList, AidrServiceConfigResult, AidrSingleEntityResult, AidrTimestamp, AidrTopicResult,
|
|
2369
|
+
export { AIGuard, APIResponse, AcceptedResponse, AccessRuleResult, AccessRuleSettings, AidrAccessRulesResponse, AidrAuditDataActivity, AidrCustomlist, AidrCustomlistResult, AidrCustomlistSearch, AidrCustomlistSearchResult, AidrDevice, AidrDeviceCheckResult, AidrDeviceId, AidrDeviceResult, AidrDeviceSearch, AidrDeviceSearchResult, AidrDeviceStatus, AidrDeviceTokenInfo, AidrEmpty, AidrFieldAlias, AidrFieldAliasResult, AidrFieldAliasSearch, AidrFieldAliasSearchResult, AidrGolangDuration, AidrIpv4OrV6, AidrLanguageResult, AidrLog, AidrLogs, AidrMaliciousEntityResult, AidrMetric, AidrMetricAggregateItem, AidrMetricAggregatesResult, AidrMetricAggregatesSearchParams, AidrMetricItem, AidrMetricOnlyData, AidrMetricResult, AidrMetricResultDetectorItem, AidrMetricpoolId, AidrMetricpoolResource, AidrOtelAnyValue, AidrOtelArrayValue, AidrOtelInstrumentationScope, AidrOtelKeyValue, AidrOtelKeyValueList, AidrOtelLogRecord, AidrOtelResource, AidrOtelResourceLogs, AidrOtelScopeLogs, AidrPolicy, AidrPolicyDefaults, AidrPolicyResult, AidrPolicySearch, AidrPolicySearchResult, AidrPolicycollectionResult, AidrPolicycollectionSearch, AidrPolicycollectionSearchResult, AidrPostV1GuardChatCompletionsData, AidrPostV1GuardChatCompletionsError, AidrPostV1GuardChatCompletionsErrors, AidrPostV1GuardChatCompletionsResponse, AidrPostV1GuardChatCompletionsResponses, AidrPostV1UnredactData, AidrPostV1UnredactError, AidrPostV1UnredactErrors, AidrPostV1UnredactResponse, AidrPostV1UnredactResponses, AidrPromptInjectionResult, AidrPromptItem, AidrPromptItemListResult, AidrRedactEntityResult, AidrResourceFieldMapping, AidrSavedFilter, AidrSavedFilterResult, AidrSavedFilterSearch, AidrSavedFilterSearchResult, AidrSensorHealth, AidrSensorInsights, AidrSensorInsightsItem, AidrSensorInsightsResult, AidrServiceConfig, AidrServiceConfigList, AidrServiceConfigResult, AidrSingleEntityResult, AidrTimestamp, AidrTopicResult, ChatCompletionsGuard, DetectorSettings, ErrorResponse, FilterId, GetAsyncRequestData, GetAsyncRequestResponse, GetAsyncRequestResponses, MaybeAcceptedResponse, PangeaAcceptedResponse, PangeaResponse, PangeaValidationErrors, PolicyId, RecipeConfig, RuleRedactionConfig, ServiceConfigId };
|