Skip to content

Commit

Permalink
feat: OpenAPI spec update via Stainless API (#1551)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Mar 12, 2024
1 parent 4ba8991 commit 8a14e82
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions url_scanner/urlscanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ func (r urlScannerScanResponseTaskJSON) RawJSON() string {
type URLScannerScanParams struct {
// Return only scans created by account.
AccountScans param.Field[bool] `query:"account_scans"`
// Filter scans by Autonomous System Number (ASN) of _any_ request made by the
// webpage.
ASN param.Field[string] `query:"asn"`
// Filter scans requested before date (inclusive).
DateEnd param.Field[time.Time] `query:"date_end" format:"date-time"`
// Filter scans requested after date (inclusive).
Expand All @@ -122,10 +125,14 @@ type URLScannerScanParams struct {
Hostname param.Field[string] `query:"hostname"`
// Filter scans by IP address (IPv4 or IPv6) of _any_ request made by the webpage.
IP param.Field[string] `query:"ip"`
// Filter scans by malicious verdict.
IsMalicious param.Field[bool] `query:"is_malicious"`
// Limit the number of objects in the response.
Limit param.Field[int64] `query:"limit"`
// Pagination cursor to get the next set of results.
NextCursor param.Field[string] `query:"next_cursor"`
// Filter scans by main page Autonomous System Number (ASN).
PageASN param.Field[string] `query:"page_asn"`
// Filter scans by main page hostname .
PageHostname param.Field[string] `query:"page_hostname"`
// Filter scans by main page IP address (IPv4 or IPv6).
Expand Down
3 changes: 3 additions & 0 deletions url_scanner/urlscanner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,15 @@ func TestURLScannerScanWithOptionalParams(t *testing.T) {
"string",
url_scanner.URLScannerScanParams{
AccountScans: cloudflare.F(true),
ASN: cloudflare.F("13335"),
DateEnd: cloudflare.F(time.Now()),
DateStart: cloudflare.F(time.Now()),
Hostname: cloudflare.F("example.com"),
IP: cloudflare.F("1.1.1.1"),
IsMalicious: cloudflare.F(true),
Limit: cloudflare.F(int64(100)),
NextCursor: cloudflare.F("string"),
PageASN: cloudflare.F("string"),
PageHostname: cloudflare.F("string"),
PageIP: cloudflare.F("string"),
PagePath: cloudflare.F("string"),
Expand Down

0 comments on commit 8a14e82

Please sign in to comment.