Skip to content

Commit 574588f

Browse files
authored
feat(serverless): https redirection (#263)
1 parent 2d42c92 commit 574588f

File tree

2 files changed

+40
-30
lines changed

2 files changed

+40
-30
lines changed

packages/clients/src/api/container/v1beta1/types.gen.ts

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
// If you have any remark or suggestion do not hesitate to open an issue.
33
import type { Region } from '../../../bridge'
44

5+
export type ContainerHttpOption =
6+
| 'unknown_http_option'
7+
| 'enabled'
8+
| 'redirected'
9+
510
export type ContainerPrivacy = 'unknown_privacy' | 'public' | 'private'
611

712
export type ContainerProtocol = 'unknown_protocol' | 'http1' | 'h2c'
@@ -99,13 +104,13 @@ export interface Container {
99104
port: number
100105
secretEnvironmentVariables: Array<SecretHashedValue>
101106
/**
102-
* @deprecated Possible values:
107+
* Possible values:
103108
*
104-
* - Redirected: Responds to HTTP request with a 302 redirect to ask the clients
105-
* to use HTTPS.
106-
* - Enabled: Serve both HTTP and HTTPS traffic.
109+
* - Redirected: Responds to HTTP request with a 302 redirect to ask the clients
110+
* to use HTTPS.
111+
* - Enabled: Serve both HTTP and HTTPS traffic.
107112
*/
108-
httpOption?: string
113+
httpOption: ContainerHttpOption
109114
region: Region
110115
}
111116

@@ -296,13 +301,13 @@ export type CreateContainerRequest = {
296301
port?: number
297302
secretEnvironmentVariables?: Array<Secret>
298303
/**
299-
* @deprecated Possible values:
304+
* Possible values:
300305
*
301-
* - Redirected: Responds to HTTP request with a 302 redirect to ask the clients
302-
* to use HTTPS.
303-
* - Enabled: Serve both HTTP and HTTPS traffic.
306+
* - Redirected: Responds to HTTP request with a 302 redirect to ask the clients
307+
* to use HTTPS.
308+
* - Enabled: Serve both HTTP and HTTPS traffic.
304309
*/
305-
httpOption?: string
310+
httpOption: ContainerHttpOption
306311
}
307312

308313
export type UpdateContainerRequest = {
@@ -323,13 +328,13 @@ export type UpdateContainerRequest = {
323328
port?: number
324329
secretEnvironmentVariables?: Array<Secret>
325330
/**
326-
* @deprecated Possible values:
331+
* Possible values:
327332
*
328-
* - Redirected: Responds to HTTP request with a 302 redirect to ask the clients
329-
* to use HTTPS.
330-
* - Enabled: Serve both HTTP and HTTPS traffic.
333+
* - Redirected: Responds to HTTP request with a 302 redirect to ask the clients
334+
* to use HTTPS.
335+
* - Enabled: Serve both HTTP and HTTPS traffic.
331336
*/
332-
httpOption?: string
337+
httpOption: ContainerHttpOption
333338
}
334339

335340
export type DeleteContainerRequest = {

packages/clients/src/api/function/v1beta1/types.gen.ts

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ export type DomainStatus =
1919
| 'creating'
2020
| 'pending'
2121

22+
export type FunctionHttpOption =
23+
| 'unknown_http_option'
24+
| 'enabled'
25+
| 'redirected'
26+
2227
export type FunctionPrivacy = 'unknown_privacy' | 'public' | 'private'
2328

2429
export type FunctionRuntime =
@@ -214,13 +219,13 @@ export interface Function {
214219
secretEnvironmentVariables: Array<SecretHashedValue>
215220
region: Region
216221
/**
217-
* @deprecated Possible values:
222+
* Possible values:
218223
*
219-
* - Redirected: Responds to HTTP request with a 302 redirect to ask the clients
220-
* to use HTTPS.
221-
* - Enabled: Serve both HTTP and HTTPS traffic.
224+
* - Redirected: Responds to HTTP request with a 302 redirect to ask the clients
225+
* to use HTTPS.
226+
* - Enabled: Serve both HTTP and HTTPS traffic.
222227
*/
223-
httpOption?: string
228+
httpOption: FunctionHttpOption
224229
runtimeMessage: string
225230
}
226231

@@ -513,13 +518,13 @@ export type CreateFunctionRequest = {
513518
description?: string
514519
secretEnvironmentVariables?: Array<Secret>
515520
/**
516-
* @deprecated Possible values:
521+
* Possible values:
517522
*
518-
* - Redirected: Responds to HTTP request with a 302 redirect to ask the clients
519-
* to use HTTPS.
520-
* - Enabled: Serve both HTTP and HTTPS traffic.
523+
* - Redirected: Responds to HTTP request with a 302 redirect to ask the clients
524+
* to use HTTPS.
525+
* - Enabled: Serve both HTTP and HTTPS traffic.
521526
*/
522-
httpOption?: string
527+
httpOption: FunctionHttpOption
523528
}
524529

525530
export type UpdateFunctionRequest = {
@@ -538,13 +543,13 @@ export type UpdateFunctionRequest = {
538543
description?: string
539544
secretEnvironmentVariables?: Array<Secret>
540545
/**
541-
* @deprecated Possible values:
546+
* Possible values:
542547
*
543-
* - Redirected: Responds to HTTP request with a 302 redirect to ask the clients
544-
* to use HTTPS.
545-
* - Enabled: Serve both HTTP and HTTPS traffic.
548+
* - Redirected: Responds to HTTP request with a 302 redirect to ask the clients
549+
* to use HTTPS.
550+
* - Enabled: Serve both HTTP and HTTPS traffic.
546551
*/
547-
httpOption?: string
552+
httpOption: FunctionHttpOption
548553
}
549554

550555
export type DeleteFunctionRequest = {

0 commit comments

Comments
 (0)