Skip to content

Commit a3e09ca

Browse files
feat(api): api update
1 parent 1e273eb commit a3e09ca

File tree

3 files changed

+16
-12
lines changed

3 files changed

+16
-12
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: 1761
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f782604bbee6c6e01169cb67a3fb54e9433f9d5058122a6fccf1b542880d80ff.yml
3-
openapi_spec_hash: 9137ae92331df0a7b8900897ea7a59c4
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-52fe0ebcbd9659cb9d111428183437c53ff6c8adfe97ffa4e80f934e28ba3d3c.yml
3+
openapi_spec_hash: 951f2fac0c6b1291702fae7239a0c3a4
44
config_hash: 150f1595200b5d085e0c40682eb2010b

workflows/instance.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -724,9 +724,10 @@ func (r InstanceGetResponseTriggerSource) IsKnown() bool {
724724
}
725725

726726
type InstanceNewParams struct {
727-
AccountID param.Field[string] `path:"account_id,required"`
728-
InstanceID param.Field[string] `json:"instance_id"`
729-
Params param.Field[interface{}] `json:"params"`
727+
AccountID param.Field[string] `path:"account_id,required"`
728+
InstanceID param.Field[string] `json:"instance_id"`
729+
InstanceRetention param.Field[interface{}] `json:"instance_retention"`
730+
Params param.Field[interface{}] `json:"params"`
730731
}
731732

732733
func (r InstanceNewParams) MarshalJSON() (data []byte, err error) {
@@ -899,8 +900,9 @@ func (r InstanceBulkParams) MarshalJSON() (data []byte, err error) {
899900
}
900901

901902
type InstanceBulkParamsBody struct {
902-
InstanceID param.Field[string] `json:"instance_id"`
903-
Params param.Field[interface{}] `json:"params"`
903+
InstanceID param.Field[string] `json:"instance_id"`
904+
InstanceRetention param.Field[interface{}] `json:"instance_retention"`
905+
Params param.Field[interface{}] `json:"params"`
904906
}
905907

906908
func (r InstanceBulkParamsBody) MarshalJSON() (data []byte, err error) {

workflows/instance_test.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,10 @@ func TestInstanceNewWithOptionalParams(t *testing.T) {
3232
context.TODO(),
3333
"x",
3434
workflows.InstanceNewParams{
35-
AccountID: cloudflare.F("account_id"),
36-
InstanceID: cloudflare.F("instance_id"),
37-
Params: cloudflare.F[any](map[string]interface{}{}),
35+
AccountID: cloudflare.F("account_id"),
36+
InstanceID: cloudflare.F("instance_id"),
37+
InstanceRetention: cloudflare.F[any](map[string]interface{}{}),
38+
Params: cloudflare.F[any](map[string]interface{}{}),
3839
},
3940
)
4041
if err != nil {
@@ -99,8 +100,9 @@ func TestInstanceBulkWithOptionalParams(t *testing.T) {
99100
workflows.InstanceBulkParams{
100101
AccountID: cloudflare.F("account_id"),
101102
Body: []workflows.InstanceBulkParamsBody{{
102-
InstanceID: cloudflare.F("instance_id"),
103-
Params: cloudflare.F[any](map[string]interface{}{}),
103+
InstanceID: cloudflare.F("instance_id"),
104+
InstanceRetention: cloudflare.F[any](map[string]interface{}{}),
105+
Params: cloudflare.F[any](map[string]interface{}{}),
104106
}},
105107
},
106108
)

0 commit comments

Comments
 (0)