Skip to content

Commit

Permalink
feat(api): api update (#3541)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Oct 28, 2024
1 parent be8f7c6 commit a2cc425
Show file tree
Hide file tree
Showing 28 changed files with 258 additions and 121 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: 1380
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare/cloudflare-2684ea7add0e2cb3fd382f271b525ce6bdd4dfad3c255916202a8a0d1c9f2fe0.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare/cloudflare-b821111ffaf200734fe86328d0d8677e58c28b9bee0a7d0a759704778026b904.yml
24 changes: 21 additions & 3 deletions addressing/loadocument.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 9,7 @@ import (
"fmt"
"mime/multipart"
"net/http"
"time"

"github.com/cloudflare/cloudflare-go/v3/internal/apiform"
"github.com/cloudflare/cloudflare-go/v3/internal/apijson"
Expand Down Expand Up @@ -57,15 58,32 @@ func (r *LOADocumentService) New(ctx context.Context, params LOADocumentNewParam
}

type LOADocumentNewResponse struct {
// Name of LOA document.
Filename string `json:"filename"`
JSON loaDocumentNewResponseJSON `json:"-"`
// Identifier for the uploaded LOA document.
ID string `json:"id,nullable"`
// Identifier
AccountID string `json:"account_id"`
Created time.Time `json:"created" format:"date-time"`
// Name of LOA document. Max file size 10MB, and supported filetype is pdf.
Filename string `json:"filename"`
// File size of the uploaded LOA document.
SizeBytes int64 `json:"size_bytes"`
// Whether the LOA has been verified by Cloudflare staff.
Verified bool `json:"verified"`
// Timestamp of the moment the LOA was marked as validated.
VerifiedAt time.Time `json:"verified_at,nullable" format:"date-time"`
JSON loaDocumentNewResponseJSON `json:"-"`
}

// loaDocumentNewResponseJSON contains the JSON metadata for the struct
// [LOADocumentNewResponse]
type loaDocumentNewResponseJSON struct {
ID apijson.Field
AccountID apijson.Field
Created apijson.Field
Filename apijson.Field
SizeBytes apijson.Field
Verified apijson.Field
VerifiedAt apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
Expand Down
9 changes: 2 additions & 7 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -6859,15 6859,10 @@ Methods:

# OriginPostQuantumEncryption

Response Types:

- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/origin_post_quantum_encryption">origin_post_quantum_encryption</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/origin_post_quantum_encryption#OriginPostQuantumEncryptionUpdateResponse">OriginPostQuantumEncryptionUpdateResponse</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/origin_post_quantum_encryption">origin_post_quantum_encryption</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/origin_post_quantum_encryption#OriginPostQuantumEncryptionGetResponse">OriginPostQuantumEncryptionGetResponse</a>

Methods:

- <code title="put /zones/{zone_id}/cache/origin_post_quantum_encryption">client.OriginPostQuantumEncryption.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/origin_post_quantum_encryption#OriginPostQuantumEncryptionService.Update">Update</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, params <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/origin_post_quantum_encryption">origin_post_quantum_encryption</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/origin_post_quantum_encryption#OriginPostQuantumEncryptionUpdateParams">OriginPostQuantumEncryptionUpdateParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/origin_post_quantum_encryption">origin_post_quantum_encryption</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/origin_post_quantum_encryption#OriginPostQuantumEncryptionUpdateResponse">OriginPostQuantumEncryptionUpdateResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="get /zones/{zone_id}/cache/origin_post_quantum_encryption">client.OriginPostQuantumEncryption.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/origin_post_quantum_encryption#OriginPostQuantumEncryptionService.Get">Get</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, query <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/origin_post_quantum_encryption">origin_post_quantum_encryption</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/origin_post_quantum_encryption#OriginPostQuantumEncryptionGetParams">OriginPostQuantumEncryptionGetParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/origin_post_quantum_encryption">origin_post_quantum_encryption</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/origin_post_quantum_encryption#OriginPostQuantumEncryptionGetResponse">OriginPostQuantumEncryptionGetResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="put /zones/{zone_id}/cache/origin_post_quantum_encryption">client.OriginPostQuantumEncryption.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/origin_post_quantum_encryption#OriginPostQuantumEncryptionService.Update">Update</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, params <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/origin_post_quantum_encryption">origin_post_quantum_encryption</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/origin_post_quantum_encryption#OriginPostQuantumEncryptionUpdateParams">OriginPostQuantumEncryptionUpdateParams</a>) (interface{}, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="get /zones/{zone_id}/cache/origin_post_quantum_encryption">client.OriginPostQuantumEncryption.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/origin_post_quantum_encryption#OriginPostQuantumEncryptionService.Get">Get</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, query <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/origin_post_quantum_encryption">origin_post_quantum_encryption</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/origin_post_quantum_encryption#OriginPostQuantumEncryptionGetParams">OriginPostQuantumEncryptionGetParams</a>) (interface{}, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>

# Speed

Expand Down
16 changes: 8 additions & 8 deletions argo/tieredcaching.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 191,11 @@ func (r TieredCachingEditParamsValue) IsKnown() bool {
}

type TieredCachingEditResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result TieredCachingEditResponse `json:"result,required"`
// Whether the API call was successful
Success TieredCachingEditResponseEnvelopeSuccess `json:"success,required"`
Result TieredCachingEditResponse `json:"result"`
JSON tieredCachingEditResponseEnvelopeJSON `json:"-"`
}

Expand All @@ -204,8 204,8 @@ type TieredCachingEditResponseEnvelope struct {
type tieredCachingEditResponseEnvelopeJSON struct {
Errors apijson.Field
Messages apijson.Field
Success apijson.Field
Result apijson.Field
Success apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
Expand Down Expand Up @@ -239,11 239,11 @@ type TieredCachingGetParams struct {
}

type TieredCachingGetResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result TieredCachingGetResponse `json:"result,required"`
// Whether the API call was successful
Success TieredCachingGetResponseEnvelopeSuccess `json:"success,required"`
Result TieredCachingGetResponse `json:"result"`
JSON tieredCachingGetResponseEnvelopeJSON `json:"-"`
}

Expand All @@ -252,8 252,8 @@ type TieredCachingGetResponseEnvelope struct {
type tieredCachingGetResponseEnvelopeJSON struct {
Errors apijson.Field
Messages apijson.Field
Success apijson.Field
Result apijson.Field
Success apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
Expand Down
40 changes: 20 additions & 20 deletions cache/cachereserve.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,23 354,23 @@ func (r CacheReserveClearParams) MarshalJSON() (data []byte, err error) {
type CacheReserveClearResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
// Whether the API call was successful
Success CacheReserveClearResponseEnvelopeSuccess `json:"success,required"`
// You can use Cache Reserve Clear to clear your Cache Reserve, but you must first
// disable Cache Reserve. In most cases, this will be accomplished within 24 hours.
// You cannot re-enable Cache Reserve while this process is ongoing. Keep in mind
// that you cannot undo or cancel this operation.
Result CacheReserveClearResponse `json:"result"`
JSON cacheReserveClearResponseEnvelopeJSON `json:"-"`
Result CacheReserveClearResponse `json:"result,required"`
// Whether the API call was successful
Success CacheReserveClearResponseEnvelopeSuccess `json:"success,required"`
JSON cacheReserveClearResponseEnvelopeJSON `json:"-"`
}

// cacheReserveClearResponseEnvelopeJSON contains the JSON metadata for the struct
// [CacheReserveClearResponseEnvelope]
type cacheReserveClearResponseEnvelopeJSON struct {
Errors apijson.Field
Messages apijson.Field
Success apijson.Field
Result apijson.Field
Success apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
Expand Down Expand Up @@ -428,25 428,25 @@ func (r CacheReserveEditParamsValue) IsKnown() bool {
type CacheReserveEditResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
// Whether the API call was successful
Success CacheReserveEditResponseEnvelopeSuccess `json:"success,required"`
// Increase cache lifetimes by automatically storing all cacheable files into
// Cloudflare's persistent object storage buckets. Requires Cache Reserve
// subscription. Note: using Tiered Cache with Cache Reserve is highly recommended
// to reduce Reserve operations costs. See the
// [developer docs](https://developers.cloudflare.com/cache/about/cache-reserve)
// for more information.
Result CacheReserveEditResponse `json:"result"`
JSON cacheReserveEditResponseEnvelopeJSON `json:"-"`
Result CacheReserveEditResponse `json:"result,required"`
// Whether the API call was successful
Success CacheReserveEditResponseEnvelopeSuccess `json:"success,required"`
JSON cacheReserveEditResponseEnvelopeJSON `json:"-"`
}

// cacheReserveEditResponseEnvelopeJSON contains the JSON metadata for the struct
// [CacheReserveEditResponseEnvelope]
type cacheReserveEditResponseEnvelopeJSON struct {
Errors apijson.Field
Messages apijson.Field
Success apijson.Field
Result apijson.Field
Success apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
Expand Down Expand Up @@ -482,25 482,25 @@ type CacheReserveGetParams struct {
type CacheReserveGetResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
// Whether the API call was successful
Success CacheReserveGetResponseEnvelopeSuccess `json:"success,required"`
// Increase cache lifetimes by automatically storing all cacheable files into
// Cloudflare's persistent object storage buckets. Requires Cache Reserve
// subscription. Note: using Tiered Cache with Cache Reserve is highly recommended
// to reduce Reserve operations costs. See the
// [developer docs](https://developers.cloudflare.com/cache/about/cache-reserve)
// for more information.
Result CacheReserveGetResponse `json:"result"`
JSON cacheReserveGetResponseEnvelopeJSON `json:"-"`
Result CacheReserveGetResponse `json:"result,required"`
// Whether the API call was successful
Success CacheReserveGetResponseEnvelopeSuccess `json:"success,required"`
JSON cacheReserveGetResponseEnvelopeJSON `json:"-"`
}

// cacheReserveGetResponseEnvelopeJSON contains the JSON metadata for the struct
// [CacheReserveGetResponseEnvelope]
type cacheReserveGetResponseEnvelopeJSON struct {
Errors apijson.Field
Messages apijson.Field
Success apijson.Field
Result apijson.Field
Success apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
Expand Down Expand Up @@ -536,23 536,23 @@ type CacheReserveStatusParams struct {
type CacheReserveStatusResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
// Whether the API call was successful
Success CacheReserveStatusResponseEnvelopeSuccess `json:"success,required"`
// You can use Cache Reserve Clear to clear your Cache Reserve, but you must first
// disable Cache Reserve. In most cases, this will be accomplished within 24 hours.
// You cannot re-enable Cache Reserve while this process is ongoing. Keep in mind
// that you cannot undo or cancel this operation.
Result CacheReserveStatusResponse `json:"result"`
JSON cacheReserveStatusResponseEnvelopeJSON `json:"-"`
Result CacheReserveStatusResponse `json:"result,required"`
// Whether the API call was successful
Success CacheReserveStatusResponseEnvelopeSuccess `json:"success,required"`
JSON cacheReserveStatusResponseEnvelopeJSON `json:"-"`
}

// cacheReserveStatusResponseEnvelopeJSON contains the JSON metadata for the struct
// [CacheReserveStatusResponseEnvelope]
type cacheReserveStatusResponseEnvelopeJSON struct {
Errors apijson.Field
Messages apijson.Field
Success apijson.Field
Result apijson.Field
Success apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
Expand Down
20 changes: 10 additions & 10 deletions cache/regionaltieredcache.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,22 240,22 @@ func (r RegionalTieredCacheEditParamsValue) IsKnown() bool {
type RegionalTieredCacheEditResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
// Whether the API call was successful
Success RegionalTieredCacheEditResponseEnvelopeSuccess `json:"success,required"`
// Instructs Cloudflare to check a regional hub data center on the way to your
// upper tier. This can help improve performance for smart and custom tiered cache
// topologies.
Result RegionalTieredCacheEditResponse `json:"result"`
JSON regionalTieredCacheEditResponseEnvelopeJSON `json:"-"`
Result RegionalTieredCacheEditResponse `json:"result,required"`
// Whether the API call was successful
Success RegionalTieredCacheEditResponseEnvelopeSuccess `json:"success,required"`
JSON regionalTieredCacheEditResponseEnvelopeJSON `json:"-"`
}

// regionalTieredCacheEditResponseEnvelopeJSON contains the JSON metadata for the
// struct [RegionalTieredCacheEditResponseEnvelope]
type regionalTieredCacheEditResponseEnvelopeJSON struct {
Errors apijson.Field
Messages apijson.Field
Success apijson.Field
Result apijson.Field
Success apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
Expand Down Expand Up @@ -291,22 291,22 @@ type RegionalTieredCacheGetParams struct {
type RegionalTieredCacheGetResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
// Whether the API call was successful
Success RegionalTieredCacheGetResponseEnvelopeSuccess `json:"success,required"`
// Instructs Cloudflare to check a regional hub data center on the way to your
// upper tier. This can help improve performance for smart and custom tiered cache
// topologies.
Result RegionalTieredCacheGetResponse `json:"result"`
JSON regionalTieredCacheGetResponseEnvelopeJSON `json:"-"`
Result RegionalTieredCacheGetResponse `json:"result,required"`
// Whether the API call was successful
Success RegionalTieredCacheGetResponseEnvelopeSuccess `json:"success,required"`
JSON regionalTieredCacheGetResponseEnvelopeJSON `json:"-"`
}

// regionalTieredCacheGetResponseEnvelopeJSON contains the JSON metadata for the
// struct [RegionalTieredCacheGetResponseEnvelope]
type regionalTieredCacheGetResponseEnvelopeJSON struct {
Errors apijson.Field
Messages apijson.Field
Success apijson.Field
Result apijson.Field
Success apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
Expand Down
24 changes: 12 additions & 12 deletions cache/smarttieredcache.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 233,11 @@ type SmartTieredCacheDeleteParams struct {
}

type SmartTieredCacheDeleteResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result SmartTieredCacheDeleteResponse `json:"result,required"`
// Whether the API call was successful
Success SmartTieredCacheDeleteResponseEnvelopeSuccess `json:"success,required"`
Result SmartTieredCacheDeleteResponse `json:"result"`
JSON smartTieredCacheDeleteResponseEnvelopeJSON `json:"-"`
}

Expand All @@ -246,8 246,8 @@ type SmartTieredCacheDeleteResponseEnvelope struct {
type smartTieredCacheDeleteResponseEnvelopeJSON struct {
Errors apijson.Field
Messages apijson.Field
Success apijson.Field
Result apijson.Field
Success apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
Expand Down Expand Up @@ -303,11 303,11 @@ func (r SmartTieredCacheEditParamsValue) IsKnown() bool {
}

type SmartTieredCacheEditResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result SmartTieredCacheEditResponse `json:"result,required"`
// Whether the API call was successful
Success SmartTieredCacheEditResponseEnvelopeSuccess `json:"success,required"`
Result SmartTieredCacheEditResponse `json:"result"`
JSON smartTieredCacheEditResponseEnvelopeJSON `json:"-"`
}

Expand All @@ -316,8 316,8 @@ type SmartTieredCacheEditResponseEnvelope struct {
type smartTieredCacheEditResponseEnvelopeJSON struct {
Errors apijson.Field
Messages apijson.Field
Success apijson.Field
Result apijson.Field
Success apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
Expand Down Expand Up @@ -351,11 351,11 @@ type SmartTieredCacheGetParams struct {
}

type SmartTieredCacheGetResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result SmartTieredCacheGetResponse `json:"result,required"`
// Whether the API call was successful
Success SmartTieredCacheGetResponseEnvelopeSuccess `json:"success,required"`
Result SmartTieredCacheGetResponse `json:"result"`
JSON smartTieredCacheGetResponseEnvelopeJSON `json:"-"`
}

Expand All @@ -364,8 364,8 @@ type SmartTieredCacheGetResponseEnvelope struct {
type smartTieredCacheGetResponseEnvelopeJSON struct {
Errors apijson.Field
Messages apijson.Field
Success apijson.Field
Result apijson.Field
Success apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
Expand Down
Loading

0 comments on commit a2cc425

Please sign in to comment.