Skip to content

Commit

Permalink
feat(api): api update (#3558)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Nov 4, 2024
1 parent dfcfc3f commit 1ee2686
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 1397
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d331b5873193f7387a1fadc13f4426111538c2ccddfc4dc8594e56fabc179ffb.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-385fc2d66d706295125b67c579537147eccd7b072b91ac51383b964daab136d1.yml
39 changes: 36 additions & 3 deletions intel/dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,10 @@ type DNSListResponse struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
// Whether the API call was successful
Success DNSListResponseSuccess `json:"success,required"`
Result DNS `json:"result"`
JSON dnsListResponseJSON `json:"-"`
Success DNSListResponseSuccess `json:"success,required"`
Result DNS `json:"result"`
ResultInfo DNSListResponseResultInfo `json:"result_info"`
JSON dnsListResponseJSON `json:"-"`
}

// dnsListResponseJSON contains the JSON metadata for the struct [DNSListResponse]
Expand All @@ -138,6 +139,7 @@ type dnsListResponseJSON struct {
Messages apijson.Field
Success apijson.Field
Result apijson.Field
ResultInfo apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
Expand Down Expand Up @@ -165,6 +167,37 @@ func (r DNSListResponseSuccess) IsKnown() bool {
return false
}

type DNSListResponseResultInfo struct {
// Total number of results for the requested service
Count float64 `json:"count"`
// Current page within paginated list of results
Page float64 `json:"page"`
// Number of results per page of results
PerPage float64 `json:"per_page"`
// Total results available without any search parameters
TotalCount float64 `json:"total_count"`
JSON dnsListResponseResultInfoJSON `json:"-"`
}

// dnsListResponseResultInfoJSON contains the JSON metadata for the struct
// [DNSListResponseResultInfo]
type dnsListResponseResultInfoJSON struct {
Count apijson.Field
Page apijson.Field
PerPage apijson.Field
TotalCount apijson.Field
raw string
ExtraFields map[string]apijson.Field
}

func (r *DNSListResponseResultInfo) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}

func (r dnsListResponseResultInfoJSON) RawJSON() string {
return r.raw
}

type DNSListParams struct {
// Identifier
AccountID param.Field[string] `path:"account_id,required"`
Expand Down

0 comments on commit 1ee2686

Please sign in to comment.