@cdot65/prisma-airs-sdk 0.1.2 → 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/README.md +33 -1
- package/dist/index.cjs +704 -42
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9312 -32
- package/dist/index.d.ts +9312 -32
- package/dist/index.js +675 -42
- package/dist/index.js.map +1 -1
- package/package.json +10 -3
package/README.md
CHANGED
|
@@ -129,7 +129,39 @@ try {
|
|
|
129
129
|
}
|
|
130
130
|
```
|
|
131
131
|
|
|
132
|
-
Error types: `SERVER_SIDE_ERROR`, `CLIENT_SIDE_ERROR`, `USER_REQUEST_PAYLOAD_ERROR`, `MISSING_VARIABLE`, `AISEC_SDK_ERROR`.
|
|
132
|
+
Error types: `SERVER_SIDE_ERROR`, `CLIENT_SIDE_ERROR`, `USER_REQUEST_PAYLOAD_ERROR`, `MISSING_VARIABLE`, `AISEC_SDK_ERROR`, `OAUTH_ERROR`.
|
|
133
|
+
|
|
134
|
+
## Management API
|
|
135
|
+
|
|
136
|
+
Separate client for CRUD operations on Security Profiles and Custom Topics via OAuth2 client credentials. See [docs/management-api.md](docs/management-api.md) for full details.
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
# Required env vars (or pass as constructor options)
|
|
140
|
+
export PANW_MGMT_CLIENT_ID=your-client-id
|
|
141
|
+
export PANW_MGMT_CLIENT_SECRET=your-client-secret
|
|
142
|
+
export PANW_MGMT_TSG_ID=1234567890
|
|
143
|
+
# Optional: override for EU/UK/FedRAMP
|
|
144
|
+
# export PANW_MGMT_ENDPOINT=https://api.eu.sase.paloaltonetworks.com/aisec
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
```ts
|
|
148
|
+
import { ManagementClient } from '@cdot65/prisma-airs-sdk';
|
|
149
|
+
|
|
150
|
+
const client = new ManagementClient();
|
|
151
|
+
|
|
152
|
+
// Security Profiles
|
|
153
|
+
const profiles = await client.profiles.list();
|
|
154
|
+
const created = await client.profiles.create({ profile_name: 'my-profile', active: true, policy: { ... } });
|
|
155
|
+
await client.profiles.update(created.profile_id, { ... });
|
|
156
|
+
await client.profiles.delete(created.profile_id);
|
|
157
|
+
|
|
158
|
+
// Custom Topics
|
|
159
|
+
const topics = await client.topics.list();
|
|
160
|
+
const topic = await client.topics.create({ topic_name: 'pii-detector', examples: ['SSN: 123-45-6789'] });
|
|
161
|
+
await client.topics.update(topic.topic_id, { ... });
|
|
162
|
+
await client.topics.delete(topic.topic_id);
|
|
163
|
+
await client.topics.forceDelete(topic.topic_id); // even if referenced by a profile
|
|
164
|
+
```
|
|
133
165
|
|
|
134
166
|
## Migration from v0.1
|
|
135
167
|
|