@cdot65/prisma-airs-sdk 0.23.0 → 0.24.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.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.23.0";
32
+ var SDK_VERSION = "0.24.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";
@@ -16629,14 +16629,32 @@ var logsOptionsSchema = telemetryWindowSchema.extend({
16629
16629
  traceId: nonBlankString.optional(),
16630
16630
  statusCode: z54.number().int().nonnegative().safe().optional()
16631
16631
  }).strict();
16632
- var filteredChartOptionsSchema = telemetryWindowSchema.extend({
16632
+ var chartFilterFields = {
16633
16633
  traceId: nonBlankString.optional(),
16634
- metadata: GatewayJsonObjectSchema.pipe(z54.record(z54.string())).optional()
16635
- }).strict();
16634
+ metadata: GatewayJsonObjectSchema.pipe(z54.record(z54.string())).optional(),
16635
+ statusCodes: z54.array(z54.number().int().nonnegative().safe()).nonempty().optional(),
16636
+ apiKeyIds: z54.array(z54.string().uuid()).nonempty().optional(),
16637
+ aiOrgModels: z54.array(z54.string().regex(/^[^,\s]+__[^,\s]+$/)).nonempty().optional(),
16638
+ totalUnitsMin: z54.number().int().nonnegative().safe().optional(),
16639
+ totalUnitsMax: z54.number().int().nonnegative().safe().optional(),
16640
+ costMin: z54.number().finite().nonnegative().optional(),
16641
+ costMax: z54.number().finite().nonnegative().optional()
16642
+ };
16643
+ function validChartBounds(opts) {
16644
+ return (opts.totalUnitsMin === void 0 || opts.totalUnitsMax === void 0 || opts.totalUnitsMin <= opts.totalUnitsMax) && (opts.costMin === void 0 || opts.costMax === void 0 || opts.costMin <= opts.costMax);
16645
+ }
16646
+ var AIGatewayChartFiltersSchema = z54.object(chartFilterFields).strict().refine(validChartBounds);
16647
+ var filteredChartOptionsSchema = telemetryWindowSchema.extend(chartFilterFields).strict().refine(validChartBounds);
16636
16648
  function serializeChartOptions(tsgId, opts) {
16637
16649
  const params = serializeWindow(tsgId, opts, filteredChartOptionsSchema);
16638
16650
  if (opts.traceId !== void 0) params.traceId = opts.traceId;
16639
16651
  if (opts.metadata !== void 0) params.metadata = JSON.stringify(opts.metadata);
16652
+ if (opts.statusCodes !== void 0) params.statusCode = opts.statusCodes.join(",");
16653
+ if (opts.apiKeyIds !== void 0) params.apiKeyIds = opts.apiKeyIds.join(",");
16654
+ if (opts.aiOrgModels !== void 0) params.aiOrgModel = opts.aiOrgModels.join(",");
16655
+ for (const key of ["totalUnitsMin", "totalUnitsMax", "costMin", "costMax"]) {
16656
+ if (opts[key] !== void 0) params[key] = String(opts[key]);
16657
+ }
16640
16658
  return params;
16641
16659
  }
16642
16660
  var AIGatewayTelemetryClient = class {
@@ -16664,7 +16682,7 @@ var AIGatewayTelemetryClient = class {
16664
16682
  }
16665
16683
  /**
16666
16684
  * Total and per-day spend. **Values are in cents.**
16667
- * @param opts - Workspace slug, time window and optional verified trace/metadata filters.
16685
+ * @param opts - Workspace slug, time window and verified trace, metadata, list and range filters.
16668
16686
  * @returns Cost series plus the period total, in cents.
16669
16687
  * @example
16670
16688
  * ```ts
@@ -16685,7 +16703,7 @@ var AIGatewayTelemetryClient = class {
16685
16703
  }
16686
16704
  /**
16687
16705
  * Per-day request counts.
16688
- * @param opts - Workspace slug, time window and optional verified trace/metadata filters.
16706
+ * @param opts - Workspace slug, time window and verified trace, metadata, list and range filters.
16689
16707
  * @returns Request-count series plus the filtered period total.
16690
16708
  * @example
16691
16709
  * ```ts
@@ -16706,7 +16724,7 @@ var AIGatewayTelemetryClient = class {
16706
16724
  }
16707
16725
  /**
16708
16726
  * Latency in milliseconds. Percentiles are returned per-bucket and for the period.
16709
- * @param opts - Workspace slug, time window and optional verified trace/metadata filters.
16727
+ * @param opts - Workspace slug, time window and verified trace, metadata, list and range filters.
16710
16728
  * @returns Latency series with p50/p90/p99; `data.total` is the period mean, not a sum.
16711
16729
  * The period mean and percentiles are null when the cohort has no matching requests.
16712
16730
  * @example
@@ -16728,7 +16746,7 @@ var AIGatewayTelemetryClient = class {
16728
16746
  }
16729
16747
  /**
16730
16748
  * Token usage, split into request and response units.
16731
- * @param opts - Workspace slug, time window and optional verified trace/metadata filters.
16749
+ * @param opts - Workspace slug, time window and verified trace, metadata, list and range filters.
16732
16750
  * @returns Token series plus request/response unit totals.
16733
16751
  * @example
16734
16752
  * ```ts
@@ -21298,6 +21316,7 @@ function setDottedValue(input, path, value2) {
21298
21316
  export {
21299
21317
  AIGatewayApiKeysClient,
21300
21318
  AIGatewayAuditLogsClient,
21319
+ AIGatewayChartFiltersSchema,
21301
21320
  AIGatewayClient,
21302
21321
  AIGatewayConfigsClient,
21303
21322
  AIGatewayDeploymentsClient,