Skip to content

Commit 98d853d

Browse files
chore(api): upload stainless config from cloudflare-config
1 parent 54d5709 commit 98d853d

23 files changed

+537
-4552
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 1790
1+
configured_endpoints: 1781
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a617495230e553e067b258702b644f898b56c21bdf238c1eb2dd10df376f098d.yml
33
openapi_spec_hash: ae16f120056f9a9558a408f0c1ecb626
4-
config_hash: 320699f1f989d92845c2558a970acd18
4+
config_hash: a433f3793b734bc6fcc9d9e0c27ff8c2

api.md

Lines changed: 21 additions & 61 deletions
Large diffs are not rendered by default.

kv/namespace.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,6 @@ func (r *NamespaceService) Get(ctx context.Context, namespaceID string, query Na
225225
return
226226
}
227227

228-
type Any = interface{}
229-
230228
type Namespace struct {
231229
// Namespace identifier tag.
232230
ID string `json:"id,required"`
@@ -454,8 +452,8 @@ func (r NamespaceBulkGetResponseWorkersKVBulkGetResultWithMetadata) implementsNa
454452
}
455453

456454
type NamespaceBulkGetResponseWorkersKVBulkGetResultWithMetadataValue struct {
457-
Metadata Any `json:"metadata,required"`
458-
Value Any `json:"value,required"`
455+
Metadata interface{} `json:"metadata,required"`
456+
Value interface{} `json:"value,required"`
459457
// Expires the key at a certain time, measured in number of seconds since the UNIX
460458
// epoch.
461459
Expiration float64 `json:"expiration"`
@@ -866,8 +864,8 @@ type NamespaceBulkUpdateParamsBody struct {
866864
// epoch.
867865
Expiration param.Field[float64] `json:"expiration"`
868866
// Expires the key after a number of seconds. Must be at least 60.
869-
ExpirationTTL param.Field[float64] `json:"expiration_ttl"`
870-
Metadata param.Field[AnyParam] `json:"metadata"`
867+
ExpirationTTL param.Field[float64] `json:"expiration_ttl"`
868+
Metadata param.Field[interface{}] `json:"metadata"`
871869
}
872870

873871
func (r NamespaceBulkUpdateParamsBody) MarshalJSON() (data []byte, err error) {

kv/namespacekey.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,9 @@ type Key struct {
155155
Name string `json:"name,required"`
156156
// The time, measured in number of seconds since the UNIX epoch, at which the key
157157
// will expire. This property is omitted for keys that will not expire.
158-
Expiration float64 `json:"expiration"`
159-
Metadata Any `json:"metadata"`
160-
JSON keyJSON `json:"-"`
158+
Expiration float64 `json:"expiration"`
159+
Metadata interface{} `json:"metadata"`
160+
JSON keyJSON `json:"-"`
161161
}
162162

163163
// keyJSON contains the JSON metadata for the struct [Key]
@@ -354,8 +354,8 @@ func (r NamespaceKeyBulkGetResponseWorkersKVBulkGetResultWithMetadata) implement
354354
}
355355

356356
type NamespaceKeyBulkGetResponseWorkersKVBulkGetResultWithMetadataValue struct {
357-
Metadata Any `json:"metadata,required"`
358-
Value Any `json:"value,required"`
357+
Metadata interface{} `json:"metadata,required"`
358+
Value interface{} `json:"value,required"`
359359
// Expires the key at a certain time, measured in number of seconds since the UNIX
360360
// epoch.
361361
Expiration float64 `json:"expiration"`
@@ -581,8 +581,8 @@ type NamespaceKeyBulkUpdateParamsBody struct {
581581
// epoch.
582582
Expiration param.Field[float64] `json:"expiration"`
583583
// Expires the key after a number of seconds. Must be at least 60.
584-
ExpirationTTL param.Field[float64] `json:"expiration_ttl"`
585-
Metadata param.Field[AnyParam] `json:"metadata"`
584+
ExpirationTTL param.Field[float64] `json:"expiration_ttl"`
585+
Metadata param.Field[interface{}] `json:"metadata"`
586586
}
587587

588588
func (r NamespaceKeyBulkUpdateParamsBody) MarshalJSON() (data []byte, err error) {

kv/namespacemetadata.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func NewNamespaceMetadataService(opts ...option.RequestOption) (r *NamespaceMeta
3737
// Returns the metadata associated with the given key in the given namespace. Use
3838
// URL-encoding to use special characters (for example, `:`, `!`, `%`) in the key
3939
// name.
40-
func (r *NamespaceMetadataService) Get(ctx context.Context, namespaceID string, keyName string, query NamespaceMetadataGetParams, opts ...option.RequestOption) (res *Any, err error) {
40+
func (r *NamespaceMetadataService) Get(ctx context.Context, namespaceID string, keyName string, query NamespaceMetadataGetParams, opts ...option.RequestOption) (res *NamespaceMetadataGetResponse, err error) {
4141
var env NamespaceMetadataGetResponseEnvelope
4242
opts = append(r.Options[:], opts...)
4343
if query.AccountID.Value == "" {
@@ -61,6 +61,8 @@ func (r *NamespaceMetadataService) Get(ctx context.Context, namespaceID string,
6161
return
6262
}
6363

64+
type NamespaceMetadataGetResponse = interface{}
65+
6466
type NamespaceMetadataGetParams struct {
6567
// Identifier.
6668
AccountID param.Field[string] `path:"account_id,required"`
@@ -71,7 +73,7 @@ type NamespaceMetadataGetResponseEnvelope struct {
7173
Messages []shared.ResponseInfo `json:"messages,required"`
7274
// Whether the API call was successful.
7375
Success NamespaceMetadataGetResponseEnvelopeSuccess `json:"success,required"`
74-
Result Any `json:"result"`
76+
Result NamespaceMetadataGetResponse `json:"result"`
7577
JSON namespaceMetadataGetResponseEnvelopeJSON `json:"-"`
7678
}
7779

kv/namespacevalue.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,8 @@ type NamespaceValueUpdateParams struct {
169169
// epoch.
170170
Expiration param.Field[float64] `query:"expiration"`
171171
// Expires the key after a number of seconds. Must be at least 60.
172-
ExpirationTTL param.Field[float64] `query:"expiration_ttl"`
173-
Metadata param.Field[AnyParam] `json:"metadata"`
172+
ExpirationTTL param.Field[float64] `query:"expiration_ttl"`
173+
Metadata param.Field[interface{}] `json:"metadata"`
174174
}
175175

176176
func (r NamespaceValueUpdateParams) MarshalMultipart() (data []byte, contentType string, err error) {

radar/ai.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ import (
1313
// automatically. You should not instantiate this service directly, and instead use
1414
// the [NewAIService] method instead.
1515
type AIService struct {
16-
Options []option.RequestOption
17-
Inference *AIInferenceService
18-
Bots *AIBotService
16+
Options []option.RequestOption
17+
ToMarkdown *AIToMarkdownService
18+
Inference *AIInferenceService
19+
Bots *AIBotService
20+
TimeseriesGroups *AITimeseriesGroupService
1921
}
2022

2123
// NewAIService generates a new service that applies the given options to each
@@ -24,7 +26,9 @@ type AIService struct {
2426
func NewAIService(opts ...option.RequestOption) (r *AIService) {
2527
r = &AIService{}
2628
r.Options = opts
29+
r.ToMarkdown = NewAIToMarkdownService(opts...)
2730
r.Inference = NewAIInferenceService(opts...)
2831
r.Bots = NewAIBotService(opts...)
32+
r.TimeseriesGroups = NewAITimeseriesGroupService(opts...)
2933
return
3034
}

0 commit comments

Comments
 (0)