Skip to content

Commit

Permalink
Mark parameters optional
Browse files Browse the repository at this point in the history
  • Loading branch information
nakedmcse committed Mar 21, 2024
1 parent 078cf5e commit ac69f90
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/model/rest/FileUploadParameters.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Description, Name, Pattern, Property } from "@tsed/schema";
import { Description, Name, Optional, Pattern, Property } from "@tsed/schema";

@Name("WaifuUploadParameters")
@Description("Upload parameters for put requests")
Expand All @@ -7,22 +7,26 @@ export class FileUploadParameters {
"a string containing a number and a letter of `m` for mins, `h` for hours, `d` for days. For example: `1h` would be 1 hour and `1d` would be 1 day. leave this blank if you want the file to exist according to the retention policy",
)
@Pattern(/^$|^\d+[mhd]$/)
@Optional()
@Property()
public expires?: string;

@Description(
"if set to true, then your filename will not appear in the URL. if false, then it will appear in the URL. defaults to false",
)
@Optional()
@Property()
public hide_filename?: boolean;

@Description(
"Set a password for this file, this will encrypt the file on the server that not even the server owner can obtain it, when fetching the file. you can fill out the `x-password` http header with your password to obtain the file via API",
)
@Optional()
@Property()
public password?: string;

@Description("Shh, it's a secret ;)")
@Optional()
@Property()
public secret_token?: string;
}

0 comments on commit ac69f90

Please sign in to comment.