Skip to content

Commit 9be9438

Browse files
feat(api): api update
1 parent 0f33a4a commit 9be9438

File tree

3 files changed

+5
-59
lines changed

3 files changed

+5
-59
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: 1794
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7ed04be8a99b699333d72c33e336aa5fb5f597ff0d6fe34602ed0c239f4392d9.yml
3-
openapi_spec_hash: 823750a5d4aad01e5abf3286ee68108c
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-22cf31982061fe2530842cf512531777a794c7163fa2b7859f80e746a63635cf.yml
3+
openapi_spec_hash: 663822c40fac1bb9cb61c588efd9f515
44
config_hash: 8c6400dba3f7d3f5c77b79f2e4a018bf

cloudforce_one/threatevent.go

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -158,21 +158,16 @@ func (r *ThreatEventService) Get(ctx context.Context, eventID string, query Thre
158158
}
159159

160160
type ThreatEventNewResponse struct {
161-
ID float64 `json:"id,required"`
162-
AccountID float64 `json:"accountId,required"`
163161
Attacker string `json:"attacker,required"`
164162
AttackerCountry string `json:"attackerCountry,required"`
165163
Category string `json:"category,required"`
166164
Date string `json:"date,required"`
167165
Event string `json:"event,required"`
168166
Indicator string `json:"indicator,required"`
169-
IndicatorType string `json:"indicatorType,required"`
170-
IndicatorTypeID float64 `json:"indicatorTypeId,required"`
171167
KillChain float64 `json:"killChain,required"`
172168
MitreAttack []string `json:"mitreAttack,required"`
173169
NumReferenced float64 `json:"numReferenced,required"`
174170
NumReferences float64 `json:"numReferences,required"`
175-
RawID string `json:"rawId,required"`
176171
Referenced []string `json:"referenced,required"`
177172
ReferencedIDs []float64 `json:"referencedIds,required"`
178173
References []string `json:"references,required"`
@@ -183,28 +178,22 @@ type ThreatEventNewResponse struct {
183178
TLP string `json:"tlp,required"`
184179
UUID string `json:"uuid,required"`
185180
Insight string `json:"insight"`
186-
ReleasabilityID string `json:"releasabilityId"`
187181
JSON threatEventNewResponseJSON `json:"-"`
188182
}
189183

190184
// threatEventNewResponseJSON contains the JSON metadata for the struct
191185
// [ThreatEventNewResponse]
192186
type threatEventNewResponseJSON struct {
193-
ID apijson.Field
194-
AccountID apijson.Field
195187
Attacker apijson.Field
196188
AttackerCountry apijson.Field
197189
Category apijson.Field
198190
Date apijson.Field
199191
Event apijson.Field
200192
Indicator apijson.Field
201-
IndicatorType apijson.Field
202-
IndicatorTypeID apijson.Field
203193
KillChain apijson.Field
204194
MitreAttack apijson.Field
205195
NumReferenced apijson.Field
206196
NumReferences apijson.Field
207-
RawID apijson.Field
208197
Referenced apijson.Field
209198
ReferencedIDs apijson.Field
210199
References apijson.Field
@@ -215,7 +204,6 @@ type threatEventNewResponseJSON struct {
215204
TLP apijson.Field
216205
UUID apijson.Field
217206
Insight apijson.Field
218-
ReleasabilityID apijson.Field
219207
raw string
220208
ExtraFields map[string]apijson.Field
221209
}
@@ -229,21 +217,16 @@ func (r threatEventNewResponseJSON) RawJSON() string {
229217
}
230218

231219
type ThreatEventListResponse struct {
232-
ID float64 `json:"id,required"`
233-
AccountID float64 `json:"accountId,required"`
234220
Attacker string `json:"attacker,required"`
235221
AttackerCountry string `json:"attackerCountry,required"`
236222
Category string `json:"category,required"`
237223
Date string `json:"date,required"`
238224
Event string `json:"event,required"`
239225
Indicator string `json:"indicator,required"`
240-
IndicatorType string `json:"indicatorType,required"`
241-
IndicatorTypeID float64 `json:"indicatorTypeId,required"`
242226
KillChain float64 `json:"killChain,required"`
243227
MitreAttack []string `json:"mitreAttack,required"`
244228
NumReferenced float64 `json:"numReferenced,required"`
245229
NumReferences float64 `json:"numReferences,required"`
246-
RawID string `json:"rawId,required"`
247230
Referenced []string `json:"referenced,required"`
248231
ReferencedIDs []float64 `json:"referencedIds,required"`
249232
References []string `json:"references,required"`
@@ -254,28 +237,22 @@ type ThreatEventListResponse struct {
254237
TLP string `json:"tlp,required"`
255238
UUID string `json:"uuid,required"`
256239
Insight string `json:"insight"`
257-
ReleasabilityID string `json:"releasabilityId"`
258240
JSON threatEventListResponseJSON `json:"-"`
259241
}
260242

261243
// threatEventListResponseJSON contains the JSON metadata for the struct
262244
// [ThreatEventListResponse]
263245
type threatEventListResponseJSON struct {
264-
ID apijson.Field
265-
AccountID apijson.Field
266246
Attacker apijson.Field
267247
AttackerCountry apijson.Field
268248
Category apijson.Field
269249
Date apijson.Field
270250
Event apijson.Field
271251
Indicator apijson.Field
272-
IndicatorType apijson.Field
273-
IndicatorTypeID apijson.Field
274252
KillChain apijson.Field
275253
MitreAttack apijson.Field
276254
NumReferenced apijson.Field
277255
NumReferences apijson.Field
278-
RawID apijson.Field
279256
Referenced apijson.Field
280257
ReferencedIDs apijson.Field
281258
References apijson.Field
@@ -286,7 +263,6 @@ type threatEventListResponseJSON struct {
286263
TLP apijson.Field
287264
UUID apijson.Field
288265
Insight apijson.Field
289-
ReleasabilityID apijson.Field
290266
raw string
291267
ExtraFields map[string]apijson.Field
292268
}
@@ -321,21 +297,16 @@ func (r threatEventDeleteResponseJSON) RawJSON() string {
321297
}
322298

323299
type ThreatEventEditResponse struct {
324-
ID float64 `json:"id,required"`
325-
AccountID float64 `json:"accountId,required"`
326300
Attacker string `json:"attacker,required"`
327301
AttackerCountry string `json:"attackerCountry,required"`
328302
Category string `json:"category,required"`
329303
Date string `json:"date,required"`
330304
Event string `json:"event,required"`
331305
Indicator string `json:"indicator,required"`
332-
IndicatorType string `json:"indicatorType,required"`
333-
IndicatorTypeID float64 `json:"indicatorTypeId,required"`
334306
KillChain float64 `json:"killChain,required"`
335307
MitreAttack []string `json:"mitreAttack,required"`
336308
NumReferenced float64 `json:"numReferenced,required"`
337309
NumReferences float64 `json:"numReferences,required"`
338-
RawID string `json:"rawId,required"`
339310
Referenced []string `json:"referenced,required"`
340311
ReferencedIDs []float64 `json:"referencedIds,required"`
341312
References []string `json:"references,required"`
@@ -346,28 +317,22 @@ type ThreatEventEditResponse struct {
346317
TLP string `json:"tlp,required"`
347318
UUID string `json:"uuid,required"`
348319
Insight string `json:"insight"`
349-
ReleasabilityID string `json:"releasabilityId"`
350320
JSON threatEventEditResponseJSON `json:"-"`
351321
}
352322

353323
// threatEventEditResponseJSON contains the JSON metadata for the struct
354324
// [ThreatEventEditResponse]
355325
type threatEventEditResponseJSON struct {
356-
ID apijson.Field
357-
AccountID apijson.Field
358326
Attacker apijson.Field
359327
AttackerCountry apijson.Field
360328
Category apijson.Field
361329
Date apijson.Field
362330
Event apijson.Field
363331
Indicator apijson.Field
364-
IndicatorType apijson.Field
365-
IndicatorTypeID apijson.Field
366332
KillChain apijson.Field
367333
MitreAttack apijson.Field
368334
NumReferenced apijson.Field
369335
NumReferences apijson.Field
370-
RawID apijson.Field
371336
Referenced apijson.Field
372337
ReferencedIDs apijson.Field
373338
References apijson.Field
@@ -378,7 +343,6 @@ type threatEventEditResponseJSON struct {
378343
TLP apijson.Field
379344
UUID apijson.Field
380345
Insight apijson.Field
381-
ReleasabilityID apijson.Field
382346
raw string
383347
ExtraFields map[string]apijson.Field
384348
}
@@ -392,21 +356,16 @@ func (r threatEventEditResponseJSON) RawJSON() string {
392356
}
393357

394358
type ThreatEventGetResponse struct {
395-
ID float64 `json:"id,required"`
396-
AccountID float64 `json:"accountId,required"`
397359
Attacker string `json:"attacker,required"`
398360
AttackerCountry string `json:"attackerCountry,required"`
399361
Category string `json:"category,required"`
400362
Date string `json:"date,required"`
401363
Event string `json:"event,required"`
402364
Indicator string `json:"indicator,required"`
403-
IndicatorType string `json:"indicatorType,required"`
404-
IndicatorTypeID float64 `json:"indicatorTypeId,required"`
405365
KillChain float64 `json:"killChain,required"`
406366
MitreAttack []string `json:"mitreAttack,required"`
407367
NumReferenced float64 `json:"numReferenced,required"`
408368
NumReferences float64 `json:"numReferences,required"`
409-
RawID string `json:"rawId,required"`
410369
Referenced []string `json:"referenced,required"`
411370
ReferencedIDs []float64 `json:"referencedIds,required"`
412371
References []string `json:"references,required"`
@@ -417,28 +376,22 @@ type ThreatEventGetResponse struct {
417376
TLP string `json:"tlp,required"`
418377
UUID string `json:"uuid,required"`
419378
Insight string `json:"insight"`
420-
ReleasabilityID string `json:"releasabilityId"`
421379
JSON threatEventGetResponseJSON `json:"-"`
422380
}
423381

424382
// threatEventGetResponseJSON contains the JSON metadata for the struct
425383
// [ThreatEventGetResponse]
426384
type threatEventGetResponseJSON struct {
427-
ID apijson.Field
428-
AccountID apijson.Field
429385
Attacker apijson.Field
430386
AttackerCountry apijson.Field
431387
Category apijson.Field
432388
Date apijson.Field
433389
Event apijson.Field
434390
Indicator apijson.Field
435-
IndicatorType apijson.Field
436-
IndicatorTypeID apijson.Field
437391
KillChain apijson.Field
438392
MitreAttack apijson.Field
439393
NumReferenced apijson.Field
440394
NumReferences apijson.Field
441-
RawID apijson.Field
442395
Referenced apijson.Field
443396
ReferencedIDs apijson.Field
444397
References apijson.Field
@@ -449,7 +402,6 @@ type threatEventGetResponseJSON struct {
449402
TLP apijson.Field
450403
UUID apijson.Field
451404
Insight apijson.Field
452-
ReleasabilityID apijson.Field
453405
raw string
454406
ExtraFields map[string]apijson.Field
455407
}
@@ -468,7 +420,6 @@ type ThreatEventNewParams struct {
468420
Category param.Field[string] `json:"category,required"`
469421
Date param.Field[time.Time] `json:"date,required" format:"date-time"`
470422
Event param.Field[string] `json:"event,required"`
471-
IndicatorType param.Field[string] `json:"indicatorType,required"`
472423
Raw param.Field[ThreatEventNewParamsRaw] `json:"raw,required"`
473424
TLP param.Field[string] `json:"tlp,required"`
474425
BodyAccountID param.Field[float64] `json:"accountId"`
@@ -605,7 +556,6 @@ type ThreatEventBulkNewParamsData struct {
605556
Category param.Field[string] `json:"category,required"`
606557
Date param.Field[time.Time] `json:"date,required" format:"date-time"`
607558
Event param.Field[string] `json:"event,required"`
608-
IndicatorType param.Field[string] `json:"indicatorType,required"`
609559
Raw param.Field[ThreatEventBulkNewParamsDataRaw] `json:"raw,required"`
610560
TLP param.Field[string] `json:"tlp,required"`
611561
AccountID param.Field[float64] `json:"accountId"`
@@ -641,7 +591,6 @@ type ThreatEventEditParams struct {
641591
Date param.Field[time.Time] `json:"date" format:"date-time"`
642592
Event param.Field[string] `json:"event"`
643593
Indicator param.Field[string] `json:"indicator"`
644-
IndicatorType param.Field[string] `json:"indicatorType"`
645594
Insight param.Field[string] `json:"insight"`
646595
Raw param.Field[ThreatEventEditParamsRaw] `json:"raw"`
647596
TargetCountry param.Field[string] `json:"targetCountry"`

cloudforce_one/threatevent_test.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ func TestThreatEventNewWithOptionalParams(t *testing.T) {
3535
Category: cloudflare.F("Domain Resolution"),
3636
Date: cloudflare.F(time.Now()),
3737
Event: cloudflare.F("An attacker registered the domain domain.com"),
38-
IndicatorType: cloudflare.F("domain"),
3938
Raw: cloudflare.F(cloudforce_one.ThreatEventNewParamsRaw{
4039
Data: cloudflare.F(map[string]interface{}{
4140
"foo": "bar",
@@ -146,10 +145,9 @@ func TestThreatEventBulkNew(t *testing.T) {
146145
_, err := client.CloudforceOne.ThreatEvents.BulkNew(context.TODO(), cloudforce_one.ThreatEventBulkNewParams{
147146
AccountID: cloudflare.F("account_id"),
148147
Data: cloudflare.F([]cloudforce_one.ThreatEventBulkNewParamsData{{
149-
Category: cloudflare.F("Domain Resolution"),
150-
Date: cloudflare.F(time.Now()),
151-
Event: cloudflare.F("An attacker registered the domain domain.com"),
152-
IndicatorType: cloudflare.F("domain"),
148+
Category: cloudflare.F("Domain Resolution"),
149+
Date: cloudflare.F(time.Now()),
150+
Event: cloudflare.F("An attacker registered the domain domain.com"),
153151
Raw: cloudflare.F(cloudforce_one.ThreatEventBulkNewParamsDataRaw{
154152
Data: cloudflare.F(map[string]interface{}{
155153
"foo": "bar",
@@ -203,7 +201,6 @@ func TestThreatEventEditWithOptionalParams(t *testing.T) {
203201
Date: cloudflare.F(time.Now()),
204202
Event: cloudflare.F("An attacker registered the domain domain.com"),
205203
Indicator: cloudflare.F("domain2.com"),
206-
IndicatorType: cloudflare.F("sha256"),
207204
Insight: cloudflare.F("new insight"),
208205
Raw: cloudflare.F(cloudforce_one.ThreatEventEditParamsRaw{
209206
Data: cloudflare.F(map[string]interface{}{

0 commit comments

Comments
 (0)