From 1bfe1dc1b9a68fefdca979dabfff5722ecce32cd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Apr 2024 11:44:23 +0000 Subject: [PATCH] feat(api): OpenAPI spec update via Stainless API (#1789) --- images/v2directupload.go | 4 ++++ images/v2directupload_test.go | 1 + 2 files changed, 5 insertions(+) diff --git a/images/v2directupload.go b/images/v2directupload.go index 931e8497a55..8bc3f3edb5e 100644 --- a/images/v2directupload.go +++ b/images/v2directupload.go @@ -81,6 +81,10 @@ func (r v2DirectUploadNewResponseJSON) RawJSON() string { type V2DirectUploadNewParams struct { // Account identifier tag. AccountID param.Field[string] `path:"account_id,required"` + // Optional Image Custom ID. Up to 1024 chars. Can include any number of subpaths, + // and utf8 characters. Cannot start nor end with a / (forward slash). Cannot be a + // UUID. + ID param.Field[string] `json:"id"` // The date after which the upload will not be accepted. Minimum: Now + 2 minutes. // Maximum: Now + 6 hours. Expiry param.Field[time.Time] `json:"expiry" format:"date-time"` diff --git a/images/v2directupload_test.go b/images/v2directupload_test.go index ec3bb54fb90..70bcaee3491 100644 --- a/images/v2directupload_test.go +++ b/images/v2directupload_test.go @@ -31,6 +31,7 @@ func TestV2DirectUploadNewWithOptionalParams(t *testing.T) { ) _, err := client.Images.V2.DirectUploads.New(context.TODO(), images.V2DirectUploadNewParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + ID: cloudflare.F("this/is/my-customid"), Expiry: cloudflare.F(time.Now()), Metadata: cloudflare.F[any](map[string]interface{}{}), RequireSignedURLs: cloudflare.F(true),