Skip to content

Commit fc33831

Browse files
stainless-app[bot]stainless-bot
authored andcommittedNov 14, 2024·
feat(api): api update (#3603)
1 parent eca1540 commit fc33831

7 files changed

+48
-52
lines changed
 

‎.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 1417
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-238bdc2301e165198e92ece05a86c3b80aa6653c5cd7334b3dc59fd9d687acce.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1c64fbec9a1e17ca560abf251c26a4adb4d60123dbe3f7dcc10819494cd97a6f.yml

‎email_security/investigate.go

+23-26
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ func NewInvestigateService(opts ...option.RequestOption) (r *InvestigateService)
3838
return
3939
}
4040

41-
// This endpoint returns information for each email that matches the search
42-
// parameter(s).
41+
// Returns information for each email that matches the search parameter(s).
4342
func (r *InvestigateService) List(ctx context.Context, params InvestigateListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[InvestigateListResponse], err error) {
4443
var raw *http.Response
4544
opts = append(r.Options[:], opts...)
@@ -61,14 +60,13 @@ func (r *InvestigateService) List(ctx context.Context, params InvestigateListPar
6160
return res, nil
6261
}
6362

64-
// This endpoint returns information for each email that matches the search
65-
// parameter(s).
63+
// Returns information for each email that matches the search parameter(s).
6664
func (r *InvestigateService) ListAutoPaging(ctx context.Context, params InvestigateListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[InvestigateListResponse] {
6765
return pagination.NewV4PagePaginationArrayAutoPager(r.List(ctx, params, opts...))
6866
}
6967

70-
// For emails that have a detection, this endpoint returns detection details such
71-
// as threat categories, sender information, and links.
68+
// Returns detection details such as threat categories and sender information for
69+
// non-benign messages.
7270
func (r *InvestigateService) Detections(ctx context.Context, postfixID string, query InvestigateDetectionsParams, opts ...option.RequestOption) (res *InvestigateDetectionsResponse, err error) {
7371
var env InvestigateDetectionsResponseEnvelope
7472
opts = append(r.Options[:], opts...)
@@ -110,8 +108,8 @@ func (r *InvestigateService) Get(ctx context.Context, postfixID string, query In
110108
return
111109
}
112110

113-
// For emails that have a detection, this endpoint returns a preview of the message
114-
// body as a base64 encoded PNG image.
111+
// Returns a preview of the message body as a base64 encoded PNG image for
112+
// non-benign messages.
115113
func (r *InvestigateService) Preview(ctx context.Context, postfixID string, query InvestigatePreviewParams, opts ...option.RequestOption) (res *InvestigatePreviewResponse, err error) {
116114
var env InvestigatePreviewResponseEnvelope
117115
opts = append(r.Options[:], opts...)
@@ -132,8 +130,7 @@ func (r *InvestigateService) Preview(ctx context.Context, postfixID string, quer
132130
return
133131
}
134132

135-
// For emails that have a detection, this endpoint returns the raw email as an EML
136-
// file.
133+
// Returns the raw eml of any non-benign message.
137134
func (r *InvestigateService) Raw(ctx context.Context, postfixID string, query InvestigateRawParams, opts ...option.RequestOption) (res *InvestigateRawResponse, err error) {
138135
var env InvestigateRawResponseEnvelope
139136
opts = append(r.Options[:], opts...)
@@ -182,7 +179,7 @@ type InvestigateListResponse struct {
182179
DetectionReasons []string `json:"detection_reasons,required"`
183180
IsPhishSubmission bool `json:"is_phish_submission,required"`
184181
IsQuarantined bool `json:"is_quarantined,required"`
185-
// Message identifier
182+
// The identifier of the message.
186183
PostfixID string `json:"postfix_id,required"`
187184
Ts string `json:"ts,required"`
188185
AlertID string `json:"alert_id,nullable"`
@@ -499,9 +496,9 @@ func (r investigateDetectionsResponseLinkJSON) RawJSON() string {
499496
}
500497

501498
type InvestigateDetectionsResponseSenderInfo struct {
502-
// Name of the autonomous system
499+
// The name of the autonomous system.
503500
AsName string `json:"as_name,nullable"`
504-
// Number of the autonomous system
501+
// The number of the autonomous system.
505502
AsNumber int64 `json:"as_number,nullable"`
506503
Geo string `json:"geo,nullable"`
507504
IP string `json:"ip,nullable"`
@@ -665,7 +662,7 @@ type InvestigateGetResponse struct {
665662
DetectionReasons []string `json:"detection_reasons,required"`
666663
IsPhishSubmission bool `json:"is_phish_submission,required"`
667664
IsQuarantined bool `json:"is_quarantined,required"`
668-
// Message identifier
665+
// The identifier of the message.
669666
PostfixID string `json:"postfix_id,required"`
670667
Ts string `json:"ts,required"`
671668
AlertID string `json:"alert_id,nullable"`
@@ -849,7 +846,7 @@ func (r InvestigateGetResponseValidationSPF) IsKnown() bool {
849846
}
850847

851848
type InvestigatePreviewResponse struct {
852-
// Base64 encoded PNG image
849+
// A base64 encoded PNG image of the email.
853850
Screenshot string `json:"screenshot,required"`
854851
JSON investigatePreviewResponseJSON `json:"-"`
855852
}
@@ -871,7 +868,7 @@ func (r investigatePreviewResponseJSON) RawJSON() string {
871868
}
872869

873870
type InvestigateRawResponse struct {
874-
// UTF-8 encoded eml file
871+
// A UTF-8 encoded eml file of the email.
875872
Raw string `json:"raw,required"`
876873
JSON investigateRawResponseJSON `json:"-"`
877874
}
@@ -1010,26 +1007,26 @@ func (r investigateTraceResponseOutboundLineJSON) RawJSON() string {
10101007
type InvestigateListParams struct {
10111008
// Account Identifier
10121009
AccountID param.Field[string] `path:"account_id,required"`
1013-
// Controls whether the message action log in included in the response.
1010+
// Determines if the message action log is included in the response.
10141011
ActionLog param.Field[bool] `query:"action_log"`
10151012
AlertID param.Field[string] `query:"alert_id"`
1016-
// If `false`, the search includes non-detections.
1013+
// Determines if the search results will include detections or not.
10171014
DetectionsOnly param.Field[bool] `query:"detections_only"`
1018-
// Filter by the sender domain
1015+
// The sender domains the search filters by.
10191016
Domain param.Field[string] `query:"domain"`
10201017
// The end of the search date range. Defaults to `now`.
10211018
End param.Field[time.Time] `query:"end" format:"date-time"`
1022-
// Filter messages by the provided disposition.
1019+
// The dispositions the search filters by.
10231020
FinalDisposition param.Field[InvestigateListParamsFinalDisposition] `query:"final_disposition"`
1024-
// Filter messages by actions applied to them
1021+
// The message actions the search filters by.
10251022
MessageAction param.Field[InvestigateListParamsMessageAction] `query:"message_action"`
10261023
MessageID param.Field[string] `query:"message_id"`
10271024
Metric param.Field[string] `query:"metric"`
1028-
// Page number of paginated results.
1025+
// The page number of paginated results.
10291026
Page param.Field[int64] `query:"page"`
1030-
// Number of results to display.
1027+
// The number of results per page.
10311028
PerPage param.Field[int64] `query:"per_page"`
1032-
// Space delimited query term(s). The search is case-insensitive.
1029+
// The space-delimited term used in the query. The search is case-insensitive.
10331030
//
10341031
// The content of the following email metadata fields are searched:
10351032
//
@@ -1068,7 +1065,7 @@ func (r InvestigateListParams) URLQuery() (v url.Values) {
10681065
})
10691066
}
10701067

1071-
// Filter messages by the provided disposition.
1068+
// The dispositions the search filters by.
10721069
type InvestigateListParamsFinalDisposition string
10731070

10741071
const (
@@ -1087,7 +1084,7 @@ func (r InvestigateListParamsFinalDisposition) IsKnown() bool {
10871084
return false
10881085
}
10891086

1090-
// Filter messages by actions applied to them
1087+
// The message actions the search filters by.
10911088
type InvestigateListParamsMessageAction string
10921089

10931090
const (

‎email_security/settingallowpattern.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func (r *SettingAllowPatternService) New(ctx context.Context, params SettingAllo
5757
return
5858
}
5959

60-
// List, search, and sort an accounts's email allow patterns.
60+
// Lists, searches, and sorts an account’s email allow patterns.
6161
func (r *SettingAllowPatternService) List(ctx context.Context, params SettingAllowPatternListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[SettingAllowPatternListResponse], err error) {
6262
var raw *http.Response
6363
opts = append(r.Options[:], opts...)
@@ -79,7 +79,7 @@ func (r *SettingAllowPatternService) List(ctx context.Context, params SettingAll
7979
return res, nil
8080
}
8181

82-
// List, search, and sort an accounts's email allow patterns.
82+
// Lists, searches, and sorts an account’s email allow patterns.
8383
func (r *SettingAllowPatternService) ListAutoPaging(ctx context.Context, params SettingAllowPatternListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[SettingAllowPatternListResponse] {
8484
return pagination.NewV4PagePaginationArrayAutoPager(r.List(ctx, params, opts...))
8585
}
@@ -571,10 +571,10 @@ type SettingAllowPatternListParams struct {
571571
IsSpoof param.Field[bool] `query:"is_spoof"`
572572
// The field to sort by.
573573
Order param.Field[SettingAllowPatternListParamsOrder] `query:"order"`
574-
// Page number of paginated results.
574+
// The page number of paginated results.
575575
Page param.Field[int64] `query:"page"`
576576
PatternType param.Field[SettingAllowPatternListParamsPatternType] `query:"pattern_type"`
577-
// Number of results to display.
577+
// The number of results per page.
578578
PerPage param.Field[int64] `query:"per_page"`
579579
// Allows searching in multiple properties of a record simultaneously. This
580580
// parameter is intended for human users, not automation. Its exact behavior is

‎email_security/settingblocksender.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -524,10 +524,10 @@ type SettingBlockSenderListParams struct {
524524
Direction param.Field[SettingBlockSenderListParamsDirection] `query:"direction"`
525525
// The field to sort by.
526526
Order param.Field[SettingBlockSenderListParamsOrder] `query:"order"`
527-
// Page number of paginated results.
527+
// The page number of paginated results.
528528
Page param.Field[int64] `query:"page"`
529529
PatternType param.Field[SettingBlockSenderListParamsPatternType] `query:"pattern_type"`
530-
// Number of results to display.
530+
// The number of results per page.
531531
PerPage param.Field[int64] `query:"per_page"`
532532
// Allows searching in multiple properties of a record simultaneously. This
533533
// parameter is intended for human users, not automation. Its exact behavior is

‎email_security/settingdomain.go

+10-11
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func NewSettingDomainService(opts ...option.RequestOption) (r *SettingDomainServ
3838
return
3939
}
4040

41-
// List, search, and sort an account's email domains.
41+
// Lists, searches, and sorts an accounts email domains.
4242
func (r *SettingDomainService) List(ctx context.Context, params SettingDomainListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[SettingDomainListResponse], err error) {
4343
var raw *http.Response
4444
opts = append(r.Options[:], opts...)
@@ -60,7 +60,7 @@ func (r *SettingDomainService) List(ctx context.Context, params SettingDomainLis
6060
return res, nil
6161
}
6262

63-
// List, search, and sort an account's email domains.
63+
// Lists, searches, and sorts an accounts email domains.
6464
func (r *SettingDomainService) ListAutoPaging(ctx context.Context, params SettingDomainListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[SettingDomainListResponse] {
6565
return pagination.NewV4PagePaginationArrayAutoPager(r.List(ctx, params, opts...))
6666
}
@@ -100,7 +100,7 @@ func (r *SettingDomainService) Edit(ctx context.Context, domainID int64, params
100100
}
101101

102102
type SettingDomainListResponse struct {
103-
// Unique domain identifier
103+
// The unique identifier for the domain.
104104
ID int64 `json:"id,required"`
105105
AllowedDeliveryModes []SettingDomainListResponseAllowedDeliveryMode `json:"allowed_delivery_modes,required"`
106106
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
@@ -171,7 +171,7 @@ func (r SettingDomainListResponseFolder) IsKnown() bool {
171171
}
172172

173173
type SettingDomainDeleteResponse struct {
174-
// Unique domain identifier
174+
// The unique identifier for the domain.
175175
ID int64 `json:"id,required"`
176176
JSON settingDomainDeleteResponseJSON `json:"-"`
177177
}
@@ -193,7 +193,7 @@ func (r settingDomainDeleteResponseJSON) RawJSON() string {
193193
}
194194

195195
type SettingDomainEditResponse struct {
196-
// Unique domain identifier
196+
// The unique identifier for the domain.
197197
ID int64 `json:"id,required"`
198198
AllowedDeliveryModes []SettingDomainEditResponseAllowedDeliveryMode `json:"allowed_delivery_modes,required"`
199199
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
@@ -266,18 +266,17 @@ func (r SettingDomainEditResponseFolder) IsKnown() bool {
266266
type SettingDomainListParams struct {
267267
// Account Identifier
268268
AccountID param.Field[string] `path:"account_id,required"`
269-
// If present, the response contains only domains with the provided delivery mode.
269+
// Filters response to domains with the provided delivery mode.
270270
AllowedDeliveryMode param.Field[SettingDomainListParamsAllowedDeliveryMode] `query:"allowed_delivery_mode"`
271271
// The sorting direction.
272272
Direction param.Field[SettingDomainListParamsDirection] `query:"direction"`
273-
// Filter result by the provided domains. Allows for multiple occurrences, e.g.,
274-
// `domain=example.com&domain=example.xyz`.
273+
// Filters results by the provided domains, allowing for multiple occurrences.
275274
Domain param.Field[[]string] `query:"domain"`
276275
// The field to sort by.
277276
Order param.Field[SettingDomainListParamsOrder] `query:"order"`
278-
// Page number of paginated results.
277+
// The page number of paginated results.
279278
Page param.Field[int64] `query:"page"`
280-
// Number of results to display.
279+
// The number of results per page.
281280
PerPage param.Field[int64] `query:"per_page"`
282281
// Allows searching in multiple properties of a record simultaneously. This
283282
// parameter is intended for human users, not automation. Its exact behavior is
@@ -294,7 +293,7 @@ func (r SettingDomainListParams) URLQuery() (v url.Values) {
294293
})
295294
}
296295

297-
// If present, the response contains only domains with the provided delivery mode.
296+
// Filters response to domains with the provided delivery mode.
298297
type SettingDomainListParamsAllowedDeliveryMode string
299298

300299
const (

‎email_security/settingimpersonationregistry.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func (r *SettingImpersonationRegistryService) New(ctx context.Context, params Se
5757
return
5858
}
5959

60-
// List, search, and sort entries in impersonation registry.
60+
// Lists, searches, and sorts entries in the impersonation registry.
6161
func (r *SettingImpersonationRegistryService) List(ctx context.Context, params SettingImpersonationRegistryListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[SettingImpersonationRegistryListResponse], err error) {
6262
var raw *http.Response
6363
opts = append(r.Options[:], opts...)
@@ -79,7 +79,7 @@ func (r *SettingImpersonationRegistryService) List(ctx context.Context, params S
7979
return res, nil
8080
}
8181

82-
// List, search, and sort entries in impersonation registry.
82+
// Lists, searches, and sorts entries in the impersonation registry.
8383
func (r *SettingImpersonationRegistryService) ListAutoPaging(ctx context.Context, params SettingImpersonationRegistryListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[SettingImpersonationRegistryListResponse] {
8484
return pagination.NewV4PagePaginationArrayAutoPager(r.List(ctx, params, opts...))
8585
}
@@ -461,9 +461,9 @@ type SettingImpersonationRegistryListParams struct {
461461
Direction param.Field[SettingImpersonationRegistryListParamsDirection] `query:"direction"`
462462
// The field to sort by.
463463
Order param.Field[SettingImpersonationRegistryListParamsOrder] `query:"order"`
464-
// Page number of paginated results.
464+
// The page number of paginated results.
465465
Page param.Field[int64] `query:"page"`
466-
// Number of results to display.
466+
// The number of results per page.
467467
PerPage param.Field[int64] `query:"per_page"`
468468
Provenance param.Field[SettingImpersonationRegistryListParamsProvenance] `query:"provenance"`
469469
// Allows searching in multiple properties of a record simultaneously. This

‎email_security/settingtrusteddomain.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func (r *SettingTrustedDomainService) New(ctx context.Context, params SettingTru
5757
return
5858
}
5959

60-
// List, search, and sort an account's trusted email domains.
60+
// Lists, searches, and sorts an accounts trusted email domains.
6161
func (r *SettingTrustedDomainService) List(ctx context.Context, params SettingTrustedDomainListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[SettingTrustedDomainListResponse], err error) {
6262
var raw *http.Response
6363
opts = append(r.Options[:], opts...)
@@ -79,7 +79,7 @@ func (r *SettingTrustedDomainService) List(ctx context.Context, params SettingTr
7979
return res, nil
8080
}
8181

82-
// List, search, and sort an account's trusted email domains.
82+
// Lists, searches, and sorts an accounts trusted email domains.
8383
func (r *SettingTrustedDomainService) ListAutoPaging(ctx context.Context, params SettingTrustedDomainListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[SettingTrustedDomainListResponse] {
8484
return pagination.NewV4PagePaginationArrayAutoPager(r.List(ctx, params, opts...))
8585
}
@@ -435,9 +435,9 @@ type SettingTrustedDomainListParams struct {
435435
IsSimilarity param.Field[bool] `query:"is_similarity"`
436436
// The field to sort by.
437437
Order param.Field[SettingTrustedDomainListParamsOrder] `query:"order"`
438-
// Page number of paginated results.
438+
// The page number of paginated results.
439439
Page param.Field[int64] `query:"page"`
440-
// Number of results to display.
440+
// The number of results per page.
441441
PerPage param.Field[int64] `query:"per_page"`
442442
// Allows searching in multiple properties of a record simultaneously. This
443443
// parameter is intended for human users, not automation. Its exact behavior is

0 commit comments

Comments
 (0)
Please sign in to comment.