Skip to content

feat(edge_services): add search waf stage method #2005

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 46 additions & 24 deletions packages/clients/src/api/edge_services/v1beta1/api.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ import type {
PurgeRequest,
RouteStage,
SearchBackendStagesRequest,
SearchWafStagesRequest,
SelectPlanRequest,
SetHeadStageRequest,
SetRouteRulesRequest,
Expand Down Expand Up @@ -712,6 +713,30 @@ export class API extends ParentAPI {
path: `/edge-services/v1beta1/backend-stages/${validatePathParam('backendStageId', request.backendStageId)}`,
})

searchBackendStages = (request: Readonly<SearchBackendStagesRequest> = {}) =>
this.client.fetch<ListBackendStagesResponse>(
{
method: 'GET',
path: `/edge-services/v1beta1/search-backend-stages`,
urlParams: urlParams(
['bucket_name', request.bucketName],
['bucket_region', request.bucketRegion],
['lb_id', request.lbId],
['order_by', request.orderBy],
['page', request.page],
[
'page_size',
request.pageSize ?? this.client.settings.defaultPageSize,
],
[
'project_id',
request.projectId ?? this.client.settings.defaultProjectId,
],
),
},
unmarshalListBackendStagesResponse,
)

protected pageOfListWafStages = (request: Readonly<ListWafStagesRequest>) =>
this.client.fetch<ListWafStagesResponse>(
{
Expand Down Expand Up @@ -802,6 +827,27 @@ export class API extends ParentAPI {
path: `/edge-services/v1beta1/waf-stages/${validatePathParam('wafStageId', request.wafStageId)}`,
})

searchWafStages = (request: Readonly<SearchWafStagesRequest> = {}) =>
this.client.fetch<ListWafStagesResponse>(
{
method: 'GET',
path: `/edge-services/v1beta1/search-waf-stages`,
urlParams: urlParams(
['order_by', request.orderBy],
['page', request.page],
[
'page_size',
request.pageSize ?? this.client.settings.defaultPageSize,
],
[
'project_id',
request.projectId ?? this.client.settings.defaultProjectId,
],
),
},
unmarshalListWafStagesResponse,
)

protected pageOfListRouteStages = (
request: Readonly<ListRouteStagesRequest>,
) =>
Expand Down Expand Up @@ -973,30 +1019,6 @@ export class API extends ParentAPI {
unmarshalCheckPEMChainResponse,
)

searchBackendStages = (request: Readonly<SearchBackendStagesRequest> = {}) =>
this.client.fetch<ListBackendStagesResponse>(
{
method: 'GET',
path: `/edge-services/v1beta1/search-backend-stages`,
urlParams: urlParams(
['bucket_name', request.bucketName],
['bucket_region', request.bucketRegion],
['lb_id', request.lbId],
['order_by', request.orderBy],
['page', request.page],
[
'page_size',
request.pageSize ?? this.client.settings.defaultPageSize,
],
[
'project_id',
request.projectId ?? this.client.settings.defaultProjectId,
],
),
},
unmarshalListBackendStagesResponse,
)

protected pageOfListPurgeRequests = (
request: Readonly<ListPurgeRequestsRequest> = {},
) =>
Expand Down
2 changes: 2 additions & 0 deletions packages/clients/src/api/edge_services/v1beta1/index.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ export type {
ScalewayS3BackendConfig,
SearchBackendStagesRequest,
SearchBackendStagesRequestOrderBy,
SearchWafStagesRequest,
SearchWafStagesRequestOrderBy,
SelectPlanRequest,
SetHeadStageRequest,
SetHeadStageRequestAddNewHeadStage,
Expand Down
9 changes: 9 additions & 0 deletions packages/clients/src/api/edge_services/v1beta1/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ export type SearchBackendStagesRequestOrderBy =
| 'created_at_asc'
| 'created_at_desc'

export type SearchWafStagesRequestOrderBy = 'created_at_asc' | 'created_at_desc'

export type WafStageMode = 'unknown_mode' | 'disable' | 'log_only' | 'enable'

export interface ScalewayLb {
Expand Down Expand Up @@ -1403,6 +1405,13 @@ export type SearchBackendStagesRequest = {
lbId?: string
}

export type SearchWafStagesRequest = {
orderBy?: SearchWafStagesRequestOrderBy
page?: number
pageSize?: number
projectId?: string
}

export type SelectPlanRequest = {
projectId?: string
planName?: PlanName
Expand Down
Loading