Skip to content

Commit 32d0d5f

Browse files
chore(api): update composite API spec
1 parent 723c6e7 commit 32d0d5f

File tree

8 files changed

+323
-91
lines changed

8 files changed

+323
-91
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 2023
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a2cb90b273f4b2f2f1d7b5b1dc8d12401512d5fa26c8e3238532ddf21d5cb2ba.yml
3-
openapi_spec_hash: 382f52cee347b776d182ad32ea3dd7cf
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2b935132316d46fe098e11238cf09f7861e29754870e6775c31d53108b357a35.yml
3+
openapi_spec_hash: 3c786e10f8e2cea0b76e820dbd848eab
44
config_hash: 7a08b6d7e050d324501d76c833118c84

workers/betaworkerversion.go

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -425,8 +425,8 @@ type VersionBinding struct {
425425
Format VersionBindingsFormat `json:"format"`
426426
// Name of the Vectorize index to bind to.
427427
IndexName string `json:"index_name"`
428-
// JSON data to use.
429-
Json string `json:"json"`
428+
// This field can have the runtime type of [interface{}].
429+
Json interface{} `json:"json"`
430430
// The
431431
// [jurisdiction](https://developers.cloudflare.com/r2/reference/data-location/#jurisdictional-restrictions)
432432
// of the R2 bucket.
@@ -1069,7 +1069,7 @@ func (r VersionBindingsWorkersBindingKindDispatchNamespaceType) IsKnown() bool {
10691069
type VersionBindingsWorkersBindingKindDispatchNamespaceOutbound struct {
10701070
// Pass information from the Dispatch Worker to the Outbound Worker through the
10711071
// parameters.
1072-
Params []string `json:"params"`
1072+
Params []VersionBindingsWorkersBindingKindDispatchNamespaceOutboundParam `json:"params"`
10731073
// Outbound worker.
10741074
Worker VersionBindingsWorkersBindingKindDispatchNamespaceOutboundWorker `json:"worker"`
10751075
JSON versionBindingsWorkersBindingKindDispatchNamespaceOutboundJSON `json:"-"`
@@ -1093,8 +1093,33 @@ func (r versionBindingsWorkersBindingKindDispatchNamespaceOutboundJSON) RawJSON(
10931093
return r.raw
10941094
}
10951095

1096+
type VersionBindingsWorkersBindingKindDispatchNamespaceOutboundParam struct {
1097+
// Name of the parameter.
1098+
Name string `json:"name,required"`
1099+
JSON versionBindingsWorkersBindingKindDispatchNamespaceOutboundParamJSON `json:"-"`
1100+
}
1101+
1102+
// versionBindingsWorkersBindingKindDispatchNamespaceOutboundParamJSON contains the
1103+
// JSON metadata for the struct
1104+
// [VersionBindingsWorkersBindingKindDispatchNamespaceOutboundParam]
1105+
type versionBindingsWorkersBindingKindDispatchNamespaceOutboundParamJSON struct {
1106+
Name apijson.Field
1107+
raw string
1108+
ExtraFields map[string]apijson.Field
1109+
}
1110+
1111+
func (r *VersionBindingsWorkersBindingKindDispatchNamespaceOutboundParam) UnmarshalJSON(data []byte) (err error) {
1112+
return apijson.UnmarshalRoot(data, r)
1113+
}
1114+
1115+
func (r versionBindingsWorkersBindingKindDispatchNamespaceOutboundParamJSON) RawJSON() string {
1116+
return r.raw
1117+
}
1118+
10961119
// Outbound worker.
10971120
type VersionBindingsWorkersBindingKindDispatchNamespaceOutboundWorker struct {
1121+
// Entrypoint to invoke on the outbound worker.
1122+
Entrypoint string `json:"entrypoint"`
10981123
// Environment of the outbound worker.
10991124
Environment string `json:"environment"`
11001125
// Name of the outbound worker.
@@ -1106,6 +1131,7 @@ type VersionBindingsWorkersBindingKindDispatchNamespaceOutboundWorker struct {
11061131
// the JSON metadata for the struct
11071132
// [VersionBindingsWorkersBindingKindDispatchNamespaceOutboundWorker]
11081133
type versionBindingsWorkersBindingKindDispatchNamespaceOutboundWorkerJSON struct {
1134+
Entrypoint apijson.Field
11091135
Environment apijson.Field
11101136
Service apijson.Field
11111137
raw string
@@ -1317,7 +1343,7 @@ func (r VersionBindingsWorkersBindingKindImagesType) IsKnown() bool {
13171343

13181344
type VersionBindingsWorkersBindingKindJson struct {
13191345
// JSON data to use.
1320-
Json string `json:"json,required"`
1346+
Json interface{} `json:"json,required"`
13211347
// A JavaScript variable name for the binding.
13221348
Name string `json:"name,required"`
13231349
// The kind of resource that the binding provides.
@@ -2897,9 +2923,8 @@ type VersionBindingParam struct {
28972923
// [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#format).
28982924
Format param.Field[VersionBindingsFormat] `json:"format"`
28992925
// Name of the Vectorize index to bind to.
2900-
IndexName param.Field[string] `json:"index_name"`
2901-
// JSON data to use.
2902-
Json param.Field[string] `json:"json"`
2926+
IndexName param.Field[string] `json:"index_name"`
2927+
Json param.Field[interface{}] `json:"json"`
29032928
// The
29042929
// [jurisdiction](https://developers.cloudflare.com/r2/reference/data-location/#jurisdictional-restrictions)
29052930
// of the R2 bucket.
@@ -3092,31 +3117,6 @@ func (r VersionBindingsWorkersBindingKindDispatchNamespaceParam) MarshalJSON() (
30923117
func (r VersionBindingsWorkersBindingKindDispatchNamespaceParam) implementsVersionBindingsUnionParam() {
30933118
}
30943119

3095-
// Outbound worker.
3096-
type VersionBindingsWorkersBindingKindDispatchNamespaceOutboundParam struct {
3097-
// Pass information from the Dispatch Worker to the Outbound Worker through the
3098-
// parameters.
3099-
Params param.Field[[]string] `json:"params"`
3100-
// Outbound worker.
3101-
Worker param.Field[VersionBindingsWorkersBindingKindDispatchNamespaceOutboundWorkerParam] `json:"worker"`
3102-
}
3103-
3104-
func (r VersionBindingsWorkersBindingKindDispatchNamespaceOutboundParam) MarshalJSON() (data []byte, err error) {
3105-
return apijson.MarshalRoot(r)
3106-
}
3107-
3108-
// Outbound worker.
3109-
type VersionBindingsWorkersBindingKindDispatchNamespaceOutboundWorkerParam struct {
3110-
// Environment of the outbound worker.
3111-
Environment param.Field[string] `json:"environment"`
3112-
// Name of the outbound worker.
3113-
Service param.Field[string] `json:"service"`
3114-
}
3115-
3116-
func (r VersionBindingsWorkersBindingKindDispatchNamespaceOutboundWorkerParam) MarshalJSON() (data []byte, err error) {
3117-
return apijson.MarshalRoot(r)
3118-
}
3119-
31203120
type VersionBindingsWorkersBindingKindDurableObjectNamespaceParam struct {
31213121
// A JavaScript variable name for the binding.
31223122
Name param.Field[string] `json:"name,required"`
@@ -3191,7 +3191,7 @@ func (r VersionBindingsWorkersBindingKindImagesParam) implementsVersionBindingsU
31913191

31923192
type VersionBindingsWorkersBindingKindJsonParam struct {
31933193
// JSON data to use.
3194-
Json param.Field[string] `json:"json,required"`
3194+
Json param.Field[interface{}] `json:"json,required"`
31953195
// A JavaScript variable name for the binding.
31963196
Name param.Field[string] `json:"name,required"`
31973197
// The kind of resource that the binding provides.

workers/script.go

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1609,14 +1609,14 @@ func (r ScriptListResponseUsageModel) IsKnown() bool {
16091609
type ScriptDeleteResponse = interface{}
16101610

16111611
type ScriptSearchResponse struct {
1612+
// Identifier.
1613+
ID string `json:"id,required"`
16121614
// When the script was created.
16131615
CreatedOn time.Time `json:"created_on,required" format:"date-time"`
16141616
// When the script was last modified.
16151617
ModifiedOn time.Time `json:"modified_on,required" format:"date-time"`
16161618
// Name of the script, used in URLs and route configuration.
16171619
ScriptName string `json:"script_name,required"`
1618-
// Identifier.
1619-
ScriptTag string `json:"script_tag,required"`
16201620
// Whether the environment is the default environment.
16211621
EnvironmentIsDefault bool `json:"environment_is_default"`
16221622
// Name of the environment.
@@ -1629,10 +1629,10 @@ type ScriptSearchResponse struct {
16291629
// scriptSearchResponseJSON contains the JSON metadata for the struct
16301630
// [ScriptSearchResponse]
16311631
type scriptSearchResponseJSON struct {
1632+
ID apijson.Field
16321633
CreatedOn apijson.Field
16331634
ModifiedOn apijson.Field
16341635
ScriptName apijson.Field
1635-
ScriptTag apijson.Field
16361636
EnvironmentIsDefault apijson.Field
16371637
EnvironmentName apijson.Field
16381638
ServiceName apijson.Field
@@ -1850,9 +1850,8 @@ type ScriptUpdateParamsMetadataBinding struct {
18501850
// [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#format).
18511851
Format param.Field[ScriptUpdateParamsMetadataBindingsFormat] `json:"format"`
18521852
// Name of the Vectorize index to bind to.
1853-
IndexName param.Field[string] `json:"index_name"`
1854-
// JSON data to use.
1855-
Json param.Field[string] `json:"json"`
1853+
IndexName param.Field[string] `json:"index_name"`
1854+
Json param.Field[interface{}] `json:"json"`
18561855
// The
18571856
// [jurisdiction](https://developers.cloudflare.com/r2/reference/data-location/#jurisdictional-restrictions)
18581857
// of the R2 bucket.
@@ -2159,7 +2158,7 @@ func (r ScriptUpdateParamsMetadataBindingsWorkersBindingKindDispatchNamespaceTyp
21592158
type ScriptUpdateParamsMetadataBindingsWorkersBindingKindDispatchNamespaceOutbound struct {
21602159
// Pass information from the Dispatch Worker to the Outbound Worker through the
21612160
// parameters.
2162-
Params param.Field[[]string] `json:"params"`
2161+
Params param.Field[[]ScriptUpdateParamsMetadataBindingsWorkersBindingKindDispatchNamespaceOutboundParam] `json:"params"`
21632162
// Outbound worker.
21642163
Worker param.Field[ScriptUpdateParamsMetadataBindingsWorkersBindingKindDispatchNamespaceOutboundWorker] `json:"worker"`
21652164
}
@@ -2168,8 +2167,19 @@ func (r ScriptUpdateParamsMetadataBindingsWorkersBindingKindDispatchNamespaceOut
21682167
return apijson.MarshalRoot(r)
21692168
}
21702169

2170+
type ScriptUpdateParamsMetadataBindingsWorkersBindingKindDispatchNamespaceOutboundParam struct {
2171+
// Name of the parameter.
2172+
Name param.Field[string] `json:"name,required"`
2173+
}
2174+
2175+
func (r ScriptUpdateParamsMetadataBindingsWorkersBindingKindDispatchNamespaceOutboundParam) MarshalJSON() (data []byte, err error) {
2176+
return apijson.MarshalRoot(r)
2177+
}
2178+
21712179
// Outbound worker.
21722180
type ScriptUpdateParamsMetadataBindingsWorkersBindingKindDispatchNamespaceOutboundWorker struct {
2181+
// Entrypoint to invoke on the outbound worker.
2182+
Entrypoint param.Field[string] `json:"entrypoint"`
21732183
// Environment of the outbound worker.
21742184
Environment param.Field[string] `json:"environment"`
21752185
// Name of the outbound worker.
@@ -2317,7 +2327,7 @@ func (r ScriptUpdateParamsMetadataBindingsWorkersBindingKindImagesType) IsKnown(
23172327

23182328
type ScriptUpdateParamsMetadataBindingsWorkersBindingKindJson struct {
23192329
// JSON data to use.
2320-
Json param.Field[string] `json:"json,required"`
2330+
Json param.Field[interface{}] `json:"json,required"`
23212331
// A JavaScript variable name for the binding.
23222332
Name param.Field[string] `json:"name,required"`
23232333
// The kind of resource that the binding provides.

0 commit comments

Comments
 (0)