@cdot65/prisma-airs-sdk 0.22.0 → 0.23.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/dist/index.cjs +40 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +67 -48
- package/dist/index.d.ts +67 -48
- package/dist/index.js +40 -16
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -29,7 +29,7 @@ var MAX_NUMBER_OF_BATCH_SCAN_OBJECTS = 20;
|
|
|
29
29
|
var MAX_CONNECTION_POOL_SIZE = 100;
|
|
30
30
|
var MAX_NUMBER_OF_RETRIES = 5;
|
|
31
31
|
var HTTP_FORCE_RETRY_STATUS_CODES = [500, 502, 503, 504];
|
|
32
|
-
var SDK_VERSION = "0.
|
|
32
|
+
var SDK_VERSION = "0.23.0";
|
|
33
33
|
var USER_AGENT = `PAN-AIRS/${SDK_VERSION}-typescript-sdk`;
|
|
34
34
|
var DEFAULT_MGMT_ENDPOINT = "https://api.sase.paloaltonetworks.com/aisec";
|
|
35
35
|
var DEFAULT_TOKEN_ENDPOINT = "https://auth.apps.paloaltonetworks.com/oauth2/access_token";
|
|
@@ -5015,10 +5015,10 @@ var LatencyChartResponseSchema = aiGatewayEnvelope(
|
|
|
5015
5015
|
p99: z42.number()
|
|
5016
5016
|
}).passthrough()
|
|
5017
5017
|
),
|
|
5018
|
-
total: z42.number(),
|
|
5019
|
-
p50: z42.number(),
|
|
5020
|
-
p90: z42.number(),
|
|
5021
|
-
p99: z42.number(),
|
|
5018
|
+
total: z42.number().nullable(),
|
|
5019
|
+
p50: z42.number().nullable(),
|
|
5020
|
+
p90: z42.number().nullable(),
|
|
5021
|
+
p99: z42.number().nullable(),
|
|
5022
5022
|
...quotaFlag
|
|
5023
5023
|
}).passthrough()
|
|
5024
5024
|
);
|
|
@@ -16629,10 +16629,16 @@ var logsOptionsSchema = telemetryWindowSchema.extend({
|
|
|
16629
16629
|
traceId: nonBlankString.optional(),
|
|
16630
16630
|
statusCode: z54.number().int().nonnegative().safe().optional()
|
|
16631
16631
|
}).strict();
|
|
16632
|
-
var
|
|
16632
|
+
var filteredChartOptionsSchema = telemetryWindowSchema.extend({
|
|
16633
16633
|
traceId: nonBlankString.optional(),
|
|
16634
16634
|
metadata: GatewayJsonObjectSchema.pipe(z54.record(z54.string())).optional()
|
|
16635
16635
|
}).strict();
|
|
16636
|
+
function serializeChartOptions(tsgId, opts) {
|
|
16637
|
+
const params = serializeWindow(tsgId, opts, filteredChartOptionsSchema);
|
|
16638
|
+
if (opts.traceId !== void 0) params.traceId = opts.traceId;
|
|
16639
|
+
if (opts.metadata !== void 0) params.metadata = JSON.stringify(opts.metadata);
|
|
16640
|
+
return params;
|
|
16641
|
+
}
|
|
16636
16642
|
var AIGatewayTelemetryClient = class {
|
|
16637
16643
|
baseUrl;
|
|
16638
16644
|
auth;
|
|
@@ -16658,7 +16664,7 @@ var AIGatewayTelemetryClient = class {
|
|
|
16658
16664
|
}
|
|
16659
16665
|
/**
|
|
16660
16666
|
* Total and per-day spend. **Values are in cents.**
|
|
16661
|
-
* @param opts - Workspace slug and
|
|
16667
|
+
* @param opts - Workspace slug, time window and optional verified trace/metadata filters.
|
|
16662
16668
|
* @returns Cost series plus the period total, in cents.
|
|
16663
16669
|
* @example
|
|
16664
16670
|
* ```ts
|
|
@@ -16670,7 +16676,12 @@ var AIGatewayTelemetryClient = class {
|
|
|
16670
16676
|
* ```
|
|
16671
16677
|
*/
|
|
16672
16678
|
async cost(opts) {
|
|
16673
|
-
return this.chart(
|
|
16679
|
+
return this.chart(
|
|
16680
|
+
"cost",
|
|
16681
|
+
opts,
|
|
16682
|
+
CostChartResponseSchema,
|
|
16683
|
+
serializeChartOptions(this.tsgId, opts)
|
|
16684
|
+
);
|
|
16674
16685
|
}
|
|
16675
16686
|
/**
|
|
16676
16687
|
* Per-day request counts.
|
|
@@ -16686,15 +16697,18 @@ var AIGatewayTelemetryClient = class {
|
|
|
16686
16697
|
* ```
|
|
16687
16698
|
*/
|
|
16688
16699
|
async requests(opts) {
|
|
16689
|
-
|
|
16690
|
-
|
|
16691
|
-
|
|
16692
|
-
|
|
16700
|
+
return this.chart(
|
|
16701
|
+
"requests",
|
|
16702
|
+
opts,
|
|
16703
|
+
CountChartResponseSchema,
|
|
16704
|
+
serializeChartOptions(this.tsgId, opts)
|
|
16705
|
+
);
|
|
16693
16706
|
}
|
|
16694
16707
|
/**
|
|
16695
16708
|
* Latency in milliseconds. Percentiles are returned per-bucket and for the period.
|
|
16696
|
-
* @param opts - Workspace slug and
|
|
16709
|
+
* @param opts - Workspace slug, time window and optional verified trace/metadata filters.
|
|
16697
16710
|
* @returns Latency series with p50/p90/p99; `data.total` is the period mean, not a sum.
|
|
16711
|
+
* The period mean and percentiles are null when the cohort has no matching requests.
|
|
16698
16712
|
* @example
|
|
16699
16713
|
* ```ts
|
|
16700
16714
|
* import { AIGatewayClient } from '@cdot65/prisma-airs-sdk';
|
|
@@ -16705,11 +16719,16 @@ var AIGatewayTelemetryClient = class {
|
|
|
16705
16719
|
* ```
|
|
16706
16720
|
*/
|
|
16707
16721
|
async latency(opts) {
|
|
16708
|
-
return this.chart(
|
|
16722
|
+
return this.chart(
|
|
16723
|
+
"latency",
|
|
16724
|
+
opts,
|
|
16725
|
+
LatencyChartResponseSchema,
|
|
16726
|
+
serializeChartOptions(this.tsgId, opts)
|
|
16727
|
+
);
|
|
16709
16728
|
}
|
|
16710
16729
|
/**
|
|
16711
16730
|
* Token usage, split into request and response units.
|
|
16712
|
-
* @param opts - Workspace slug and
|
|
16731
|
+
* @param opts - Workspace slug, time window and optional verified trace/metadata filters.
|
|
16713
16732
|
* @returns Token series plus request/response unit totals.
|
|
16714
16733
|
* @example
|
|
16715
16734
|
* ```ts
|
|
@@ -16721,7 +16740,12 @@ var AIGatewayTelemetryClient = class {
|
|
|
16721
16740
|
* ```
|
|
16722
16741
|
*/
|
|
16723
16742
|
async tokens(opts) {
|
|
16724
|
-
return this.chart(
|
|
16743
|
+
return this.chart(
|
|
16744
|
+
"tokens",
|
|
16745
|
+
opts,
|
|
16746
|
+
TokensChartResponseSchema,
|
|
16747
|
+
serializeChartOptions(this.tsgId, opts)
|
|
16748
|
+
);
|
|
16725
16749
|
}
|
|
16726
16750
|
/**
|
|
16727
16751
|
* Per-day error counts.
|