Skip to content

Commit 251f100

Browse files
feat(api): api update
1 parent b32732f commit 251f100

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+14090
-2340
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 1741
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1275196e3f721bb51d5293558a64f10e71a492cb107d88242147bd58f94310d9.yml
3-
openapi_spec_hash: 3875d70a6134a2081a6c8c1de038901d
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-67f1e6a1c9002584a0b224367460a0322a4a0591334123eb4630caf4c278e4b4.yml
3+
openapi_spec_hash: 2f45d30f8bbb348c3105378c8ba3e96c
44
config_hash: f6c4a93139a93cfd16a678e54b5fb249

src/resources/radar/ai/bots/summary.ts

Lines changed: 60 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -35,58 +35,98 @@ export class Summary extends APIResource {
3535
}
3636

3737
export interface SummaryUserAgentResponse {
38+
/**
39+
* Metadata for the results.
40+
*/
3841
meta: SummaryUserAgentResponse.Meta;
3942

4043
summary_0: Record<string, string>;
4144
}
4245

4346
export namespace SummaryUserAgentResponse {
47+
/**
48+
* Metadata for the results.
49+
*/
4450
export interface Meta {
51+
confidenceInfo: Meta.ConfidenceInfo | null;
52+
4553
dateRange: Array<Meta.DateRange>;
4654

55+
/**
56+
* Timestamp of the last dataset update.
57+
*/
4758
lastUpdated: string;
4859

49-
normalization: string;
50-
51-
confidenceInfo?: Meta.ConfidenceInfo;
60+
/**
61+
* Normalization method applied to the results. Refer to
62+
* [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/).
63+
*/
64+
normalization:
65+
| 'PERCENTAGE'
66+
| 'MIN0_MAX'
67+
| 'MIN_MAX'
68+
| 'RAW_VALUES'
69+
| 'PERCENTAGE_CHANGE'
70+
| 'ROLLING_AVERAGE'
71+
| 'OVERLAPPED_PERCENTAGE';
72+
73+
/**
74+
* Measurement units for the results.
75+
*/
76+
units: Array<Meta.Unit>;
5277
}
5378

5479
export namespace Meta {
55-
export interface DateRange {
56-
/**
57-
* Adjusted end of date range.
58-
*/
59-
endTime: string;
80+
export interface ConfidenceInfo {
81+
annotations: Array<ConfidenceInfo.Annotation>;
6082

6183
/**
62-
* Adjusted start of date range.
84+
* Provides an indication of how much confidence Cloudflare has in the data.
6385
*/
64-
startTime: string;
65-
}
66-
67-
export interface ConfidenceInfo {
68-
annotations?: Array<ConfidenceInfo.Annotation>;
69-
70-
level?: number;
86+
level: number;
7187
}
7288

7389
export namespace ConfidenceInfo {
90+
/**
91+
* Annotation associated with the result (e.g. outage or other type of event).
92+
*/
7493
export interface Annotation {
7594
dataSource: string;
7695

7796
description: string;
7897

98+
endTime: string;
99+
79100
eventType: string;
80101

102+
/**
103+
* Whether event is a single point in time or a time range.
104+
*/
81105
isInstantaneous: boolean;
82106

83-
endTime?: string;
84-
85-
linkedUrl?: string;
107+
linkedUrl: string;
86108

87-
startTime?: string;
109+
startTime: string;
88110
}
89111
}
112+
113+
export interface DateRange {
114+
/**
115+
* Adjusted end of date range.
116+
*/
117+
endTime: string;
118+
119+
/**
120+
* Adjusted start of date range.
121+
*/
122+
startTime: string;
123+
}
124+
125+
export interface Unit {
126+
name: string;
127+
128+
value: string;
129+
}
90130
}
91131
}
92132

src/resources/radar/ai/inference/summary.ts

Lines changed: 120 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -57,114 +57,194 @@ export class Summary extends APIResource {
5757
}
5858

5959
export interface SummaryModelResponse {
60+
/**
61+
* Metadata for the results.
62+
*/
6063
meta: SummaryModelResponse.Meta;
6164

6265
summary_0: Record<string, string>;
6366
}
6467

6568
export namespace SummaryModelResponse {
69+
/**
70+
* Metadata for the results.
71+
*/
6672
export interface Meta {
73+
confidenceInfo: Meta.ConfidenceInfo | null;
74+
6775
dateRange: Array<Meta.DateRange>;
6876

77+
/**
78+
* Timestamp of the last dataset update.
79+
*/
6980
lastUpdated: string;
7081

71-
normalization: string;
72-
73-
confidenceInfo?: Meta.ConfidenceInfo;
82+
/**
83+
* Normalization method applied to the results. Refer to
84+
* [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/).
85+
*/
86+
normalization:
87+
| 'PERCENTAGE'
88+
| 'MIN0_MAX'
89+
| 'MIN_MAX'
90+
| 'RAW_VALUES'
91+
| 'PERCENTAGE_CHANGE'
92+
| 'ROLLING_AVERAGE'
93+
| 'OVERLAPPED_PERCENTAGE';
94+
95+
/**
96+
* Measurement units for the results.
97+
*/
98+
units: Array<Meta.Unit>;
7499
}
75100

76101
export namespace Meta {
77-
export interface DateRange {
78-
/**
79-
* Adjusted end of date range.
80-
*/
81-
endTime: string;
102+
export interface ConfidenceInfo {
103+
annotations: Array<ConfidenceInfo.Annotation>;
82104

83105
/**
84-
* Adjusted start of date range.
106+
* Provides an indication of how much confidence Cloudflare has in the data.
85107
*/
86-
startTime: string;
87-
}
88-
89-
export interface ConfidenceInfo {
90-
annotations?: Array<ConfidenceInfo.Annotation>;
91-
92-
level?: number;
108+
level: number;
93109
}
94110

95111
export namespace ConfidenceInfo {
112+
/**
113+
* Annotation associated with the result (e.g. outage or other type of event).
114+
*/
96115
export interface Annotation {
97116
dataSource: string;
98117

99118
description: string;
100119

120+
endTime: string;
121+
101122
eventType: string;
102123

124+
/**
125+
* Whether event is a single point in time or a time range.
126+
*/
103127
isInstantaneous: boolean;
104128

105-
endTime?: string;
106-
107-
linkedUrl?: string;
129+
linkedUrl: string;
108130

109-
startTime?: string;
131+
startTime: string;
110132
}
111133
}
134+
135+
export interface DateRange {
136+
/**
137+
* Adjusted end of date range.
138+
*/
139+
endTime: string;
140+
141+
/**
142+
* Adjusted start of date range.
143+
*/
144+
startTime: string;
145+
}
146+
147+
export interface Unit {
148+
name: string;
149+
150+
value: string;
151+
}
112152
}
113153
}
114154

115155
export interface SummaryTaskResponse {
156+
/**
157+
* Metadata for the results.
158+
*/
116159
meta: SummaryTaskResponse.Meta;
117160

118161
summary_0: Record<string, string>;
119162
}
120163

121164
export namespace SummaryTaskResponse {
165+
/**
166+
* Metadata for the results.
167+
*/
122168
export interface Meta {
169+
confidenceInfo: Meta.ConfidenceInfo | null;
170+
123171
dateRange: Array<Meta.DateRange>;
124172

173+
/**
174+
* Timestamp of the last dataset update.
175+
*/
125176
lastUpdated: string;
126177

127-
normalization: string;
128-
129-
confidenceInfo?: Meta.ConfidenceInfo;
178+
/**
179+
* Normalization method applied to the results. Refer to
180+
* [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/).
181+
*/
182+
normalization:
183+
| 'PERCENTAGE'
184+
| 'MIN0_MAX'
185+
| 'MIN_MAX'
186+
| 'RAW_VALUES'
187+
| 'PERCENTAGE_CHANGE'
188+
| 'ROLLING_AVERAGE'
189+
| 'OVERLAPPED_PERCENTAGE';
190+
191+
/**
192+
* Measurement units for the results.
193+
*/
194+
units: Array<Meta.Unit>;
130195
}
131196

132197
export namespace Meta {
133-
export interface DateRange {
134-
/**
135-
* Adjusted end of date range.
136-
*/
137-
endTime: string;
198+
export interface ConfidenceInfo {
199+
annotations: Array<ConfidenceInfo.Annotation>;
138200

139201
/**
140-
* Adjusted start of date range.
202+
* Provides an indication of how much confidence Cloudflare has in the data.
141203
*/
142-
startTime: string;
143-
}
144-
145-
export interface ConfidenceInfo {
146-
annotations?: Array<ConfidenceInfo.Annotation>;
147-
148-
level?: number;
204+
level: number;
149205
}
150206

151207
export namespace ConfidenceInfo {
208+
/**
209+
* Annotation associated with the result (e.g. outage or other type of event).
210+
*/
152211
export interface Annotation {
153212
dataSource: string;
154213

155214
description: string;
156215

216+
endTime: string;
217+
157218
eventType: string;
158219

220+
/**
221+
* Whether event is a single point in time or a time range.
222+
*/
159223
isInstantaneous: boolean;
160224

161-
endTime?: string;
162-
163-
linkedUrl?: string;
225+
linkedUrl: string;
164226

165-
startTime?: string;
227+
startTime: string;
166228
}
167229
}
230+
231+
export interface DateRange {
232+
/**
233+
* Adjusted end of date range.
234+
*/
235+
endTime: string;
236+
237+
/**
238+
* Adjusted start of date range.
239+
*/
240+
startTime: string;
241+
}
242+
243+
export interface Unit {
244+
name: string;
245+
246+
value: string;
247+
}
168248
}
169249
}
170250

0 commit comments

Comments
 (0)