@stacksjs/ts-cloud 0.5.14 → 0.5.16

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.
@@ -5,6 +5,8 @@ export interface MetricDatapoint {
5
5
  Average?: number;
6
6
  Maximum?: number;
7
7
  Minimum?: number;
8
+ /** Percentile values when ExtendedStatistics were requested, e.g. { p95: 86 }. */
9
+ Percentiles?: Record<string, number>;
8
10
  Unit?: string;
9
11
  }
10
12
  /** A CloudWatch alarm summary. */
@@ -36,8 +38,27 @@ export declare class CloudWatchClient {
36
38
  StartTime: Date;
37
39
  EndTime: Date;
38
40
  Period: number;
39
- Statistics: Array<'Sum' | 'Average' | 'Maximum' | 'Minimum'>;
41
+ Statistics?: Array<'Sum' | 'Average' | 'Maximum' | 'Minimum'>;
42
+ /** Percentiles like ['p50','p95','p99'] (CloudWatch ExtendedStatistics). */
43
+ ExtendedStatistics?: string[];
40
44
  }): Promise<MetricDatapoint[]>;
45
+ /**
46
+ * Return a time-ordered series of a single statistic over a window — for
47
+ * sparklines. `stat` is 'Sum'|'Average'|'Maximum'|'Minimum' or a percentile
48
+ * like 'p95'.
49
+ */
50
+ getMetricSeries(options: {
51
+ Namespace: string;
52
+ MetricName: string;
53
+ Dimensions?: Array<{
54
+ Name: string;
55
+ Value: string;
56
+ }>;
57
+ StartTime: Date;
58
+ EndTime: Date;
59
+ Period: number;
60
+ Stat: string;
61
+ }): Promise<number[]>;
41
62
  /** List alarms, optionally filtered by name prefix. */
42
63
  describeAlarms(options?: {
43
64
  AlarmNamePrefix?: string;
@@ -30,4 +30,9 @@ export declare class CostExplorerClient {
30
30
  end: string;
31
31
  granularity?: 'DAILY' | 'MONTHLY';
32
32
  }): Promise<ServiceCost[]>;
33
+ /** Total unblended cost per day over a window (for the spend trend chart). */
34
+ getDailyTotals(params: {
35
+ start: string;
36
+ end: string;
37
+ }): Promise<number[]>;
33
38
  }
@@ -0,0 +1,21 @@
1
+ export interface WebAclSummary {
2
+ Name?: string;
3
+ Id?: string;
4
+ ARN?: string;
5
+ }
6
+ export interface WafRule {
7
+ Name?: string;
8
+ Priority?: number;
9
+ Action?: string;
10
+ }
11
+ /** Minimal WAFv2 client (JSON API) — enough to list a web ACL's rules. */
12
+ export declare class WAFv2Client {
13
+ private client;
14
+ private region;
15
+ constructor(region?: string);
16
+ private call;
17
+ /** List regional web ACLs. */
18
+ listWebACLs(scope?: 'REGIONAL' | 'CLOUDFRONT'): Promise<WebAclSummary[]>;
19
+ /** Get a web ACL's rules (action label flattened from the rule's Action map). */
20
+ getWebACLRules(name: string, id: string, scope?: 'REGIONAL' | 'CLOUDFRONT'): Promise<WafRule[]>;
21
+ }