@scaleway/sdk-edge-services 2.22.0 → 2.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/v1beta1/api.gen.d.ts +1 -1
- package/dist/v1beta1/index.gen.d.ts +1 -1
- package/dist/v1beta1/marshalling.gen.js +8 -0
- package/dist/v1beta1/types.gen.d.ts +15 -0
- package/dist/v1beta1/validation-rules.gen.d.ts +5 -0
- package/dist/v1beta1/validation-rules.gen.js +3 -1
- package/package.json +4 -4
|
@@ -434,7 +434,7 @@ export declare class API extends ParentAPI {
|
|
|
434
434
|
*/
|
|
435
435
|
deleteCurrentPlan: (request?: Readonly<DeleteCurrentPlanRequest>) => Promise<void>;
|
|
436
436
|
/**
|
|
437
|
-
* Gives information on the currently selected Edge Services subscription plan, resource usage and associated billing information for this calendar month (including whether consumption falls within or exceeds the currently selected subscription plan.).
|
|
437
|
+
* Billing information. Gives information on the currently selected Edge Services subscription plan, resource usage and associated billing information for this calendar month (including whether consumption falls within or exceeds the currently selected subscription plan.).
|
|
438
438
|
*
|
|
439
439
|
* @param request - The request {@link GetBillingRequest}
|
|
440
440
|
* @returns A Promise of GetBillingResponse
|
|
@@ -2,5 +2,5 @@ export { API, } from './api.gen.js';
|
|
|
2
2
|
export * from './content.gen.js';
|
|
3
3
|
export * from './constants.gen.js';
|
|
4
4
|
export * from './marshalling.gen.js';
|
|
5
|
-
export type { AddRouteRulesRequest, AddRouteRulesResponse, BackendStage, CacheStage, CheckDomainRequest, CheckDomainResponse, CheckLbOriginRequest, CheckLbOriginResponse, CheckPEMChainRequest, CheckPEMChainRequestSecretChain, CheckPEMChainResponse, CreateBackendStageRequest, CreateCacheStageRequest, CreateDNSStageRequest, CreatePipelineRequest, CreatePurgeRequestRequest, CreateRouteStageRequest, CreateTLSStageRequest, CreateVPCEndpointRequest, CreateWafStageRequest, DNSStage, DNSStageType, DeleteBackendStageRequest, DeleteCacheStageRequest, DeleteCurrentPlanRequest, DeleteDNSStageRequest, DeletePipelineRequest, DeleteRouteStageRequest, DeleteTLSStageRequest, DeleteVPCEndpointRequest, DeleteWafStageRequest, GetBackendStageRequest, GetBillingRequest, GetBillingResponse, GetCacheStageRequest, GetCurrentPlanRequest, GetDNSStageRequest, GetPipelineRequest, GetPurgeRequestRequest, GetRouteStageRequest, GetTLSStageRequest, GetVPCEndpointRequest, GetWafStageRequest, HeadStageResponse, HeadStageResponseHeadStage, LbOriginError, ListBackendStagesRequest, ListBackendStagesRequestOrderBy, ListBackendStagesResponse, ListCacheStagesRequest, ListCacheStagesRequestOrderBy, ListCacheStagesResponse, ListDNSStagesRequest, ListDNSStagesRequestOrderBy, ListDNSStagesResponse, ListHeadStagesRequest, ListHeadStagesResponse, ListHeadStagesResponseHeadStage, ListNodesResponse, ListPipelinesRequest, ListPipelinesRequestOrderBy, ListPipelinesResponse, ListPipelinesWithStagesRequest, ListPipelinesWithStagesRequestOrderBy, ListPipelinesWithStagesResponse, ListPlansResponse, ListPurgeRequestsRequest, ListPurgeRequestsRequestOrderBy, ListPurgeRequestsResponse, ListRouteRulesRequest, ListRouteRulesResponse, ListRouteStagesRequest, ListRouteStagesRequestOrderBy, ListRouteStagesResponse, ListTLSStagesRequest, ListTLSStagesRequestOrderBy, ListTLSStagesResponse, ListVPCEndpointsRequest, ListVPCEndpointsRequestOrderBy, ListVPCEndpointsResponse, ListWafStagesRequest, ListWafStagesRequestOrderBy, ListWafStagesResponse, Node, Pipeline, PipelineError, PipelineErrorCode, PipelineErrorSeverity, PipelineErrorStage, PipelineErrorType, PipelineStages, PipelineStatus, Plan, PlanDetails, PlanName, PlanUsageDetails, PurgeRequest, PurgeRequestStatus, RouteRule, RouteStage, RuleHttpMatch, RuleHttpMatchHostFilter, RuleHttpMatchHostFilterHostFilterType, RuleHttpMatchMethodFilter, RuleHttpMatchPathFilter, RuleHttpMatchPathFilterPathFilterType, ScalewayLb, ScalewayLbBackendConfig, ScalewayS3BackendConfig, ScalewayServerlessContainerBackendConfig, ScalewayServerlessFunctionBackendConfig, SearchBackendStagesRequest, SearchBackendStagesRequestOrderBy, SearchRouteRulesRequest, SearchRouteRulesRequestOrderBy, SearchWafStagesRequest, SearchWafStagesRequestOrderBy, SelectPlanRequest, SetHeadStageRequest, SetHeadStageRequestAddNewHeadStage, SetHeadStageRequestRemoveHeadStage, SetHeadStageRequestSwapHeadStage, SetPipelineVPCEndpointsRequest, SetPipelineVPCEndpointsResponse, SetRouteRulesRequest, SetRouteRulesRequestRouteRule, SetRouteRulesResponse, StageStatus, TLSSecret, TLSSecretsConfig, TLSStage, UpdateBackendStageRequest, UpdateCacheStageRequest, UpdateDNSStageRequest, UpdatePipelineRequest, UpdateRouteStageRequest, UpdateTLSStageRequest, UpdateWafStageRequest, VPCEndpoint, WafStage, WafStageMode, } from './types.gen.js';
|
|
5
|
+
export type { AddRouteRulesRequest, AddRouteRulesResponse, BackendStage, CacheStage, CheckDomainRequest, CheckDomainResponse, CheckLbOriginRequest, CheckLbOriginResponse, CheckPEMChainRequest, CheckPEMChainRequestSecretChain, CheckPEMChainResponse, CreateBackendStageRequest, CreateCacheStageRequest, CreateDNSStageRequest, CreatePipelineRequest, CreatePurgeRequestRequest, CreateRouteStageRequest, CreateTLSStageRequest, CreateVPCEndpointRequest, CreateWafStageRequest, DNSStage, DNSStageType, DeleteBackendStageRequest, DeleteCacheStageRequest, DeleteCurrentPlanRequest, DeleteDNSStageRequest, DeletePipelineRequest, DeleteRouteStageRequest, DeleteTLSStageRequest, DeleteVPCEndpointRequest, DeleteWafStageRequest, GetBackendStageRequest, GetBillingRequest, GetBillingResponse, GetCacheStageRequest, GetCurrentPlanRequest, GetDNSStageRequest, GetPipelineRequest, GetPurgeRequestRequest, GetRouteStageRequest, GetTLSStageRequest, GetVPCEndpointRequest, GetWafStageRequest, HeadStageResponse, HeadStageResponseHeadStage, LbOriginError, ListBackendStagesRequest, ListBackendStagesRequestOrderBy, ListBackendStagesResponse, ListCacheStagesRequest, ListCacheStagesRequestOrderBy, ListCacheStagesResponse, ListDNSStagesRequest, ListDNSStagesRequestOrderBy, ListDNSStagesResponse, ListHeadStagesRequest, ListHeadStagesResponse, ListHeadStagesResponseHeadStage, ListNodesResponse, ListPipelinesRequest, ListPipelinesRequestOrderBy, ListPipelinesResponse, ListPipelinesWithStagesRequest, ListPipelinesWithStagesRequestOrderBy, ListPipelinesWithStagesResponse, ListPlansResponse, ListPurgeRequestsRequest, ListPurgeRequestsRequestOrderBy, ListPurgeRequestsResponse, ListRouteRulesRequest, ListRouteRulesResponse, ListRouteStagesRequest, ListRouteStagesRequestOrderBy, ListRouteStagesResponse, ListTLSStagesRequest, ListTLSStagesRequestOrderBy, ListTLSStagesResponse, ListVPCEndpointsRequest, ListVPCEndpointsRequestOrderBy, ListVPCEndpointsResponse, ListWafStagesRequest, ListWafStagesRequestOrderBy, ListWafStagesResponse, Node, Pipeline, PipelineError, PipelineErrorCode, PipelineErrorSeverity, PipelineErrorStage, PipelineErrorType, PipelineStages, PipelineStatus, Plan, PlanDetails, PlanName, PlanUsageDetails, PurgeRequest, PurgeRequestStatus, RouteRule, RouteStage, RuleHttpMatch, RuleHttpMatchHostFilter, RuleHttpMatchHostFilterHostFilterType, RuleHttpMatchMethodFilter, RuleHttpMatchPathFilter, RuleHttpMatchPathFilterPathFilterType, ScalewayLb, ScalewayLbBackendConfig, ScalewayS3BackendConfig, ScalewayServerlessContainerBackendConfig, ScalewayServerlessFunctionBackendConfig, SearchBackendStagesRequest, SearchBackendStagesRequestOrderBy, SearchRouteRulesRequest, SearchRouteRulesRequestOrderBy, SearchWafStagesRequest, SearchWafStagesRequestOrderBy, SelectPlanRequest, SetHeadStageRequest, SetHeadStageRequestAddNewHeadStage, SetHeadStageRequestRemoveHeadStage, SetHeadStageRequestSwapHeadStage, SetPipelineVPCEndpointsRequest, SetPipelineVPCEndpointsResponse, SetRouteRulesRequest, SetRouteRulesRequestRouteRule, SetRouteRulesResponse, StageStatus, TLSSecret, TLSSecretsConfig, TLSStage, UpdateBackendStageRequest, UpdateCacheStageRequest, UpdateDNSStageRequest, UpdatePipelineRequest, UpdateRouteStageRequest, UpdateTLSStageRequest, UpdateWafStageRequest, VPCEndpoint, WafExclusionRule, WafStage, WafStageMode, } from './types.gen.js';
|
|
6
6
|
export * as ValidationRules from './validation-rules.gen.js';
|
|
@@ -147,11 +147,16 @@ const unmarshalTLSStage = (data) => {
|
|
|
147
147
|
wafStageId: data.waf_stage_id
|
|
148
148
|
};
|
|
149
149
|
};
|
|
150
|
+
const unmarshalWafExclusionRule = (data) => {
|
|
151
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'WafExclusionRule' failed as data isn't a dictionary.`);
|
|
152
|
+
return { ruleId: data.rule_id };
|
|
153
|
+
};
|
|
150
154
|
const unmarshalWafStage = (data) => {
|
|
151
155
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'WafStage' failed as data isn't a dictionary.`);
|
|
152
156
|
return {
|
|
153
157
|
backendStageId: data.backend_stage_id,
|
|
154
158
|
createdAt: unmarshalDate(data.created_at),
|
|
159
|
+
exclusionRules: unmarshalArrayOfObject(data.exclusion_rules, unmarshalWafExclusionRule),
|
|
155
160
|
id: data.id,
|
|
156
161
|
mode: data.mode,
|
|
157
162
|
paranoiaLevel: data.paranoia_level,
|
|
@@ -597,7 +602,9 @@ const marshalCreateVPCEndpointRequest = (request, defaults) => ({
|
|
|
597
602
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
598
603
|
region: request.region ?? defaults.defaultRegion
|
|
599
604
|
});
|
|
605
|
+
const marshalWafExclusionRule = (request, defaults) => ({ rule_id: request.ruleId });
|
|
600
606
|
const marshalCreateWafStageRequest = (request, defaults) => ({
|
|
607
|
+
exclusion_rules: request.exclusionRules !== void 0 ? request.exclusionRules.map((elt) => marshalWafExclusionRule(elt, defaults)) : void 0,
|
|
601
608
|
mode: request.mode,
|
|
602
609
|
paranoia_level: request.paranoiaLevel,
|
|
603
610
|
...resolveOneOf([{
|
|
@@ -724,6 +731,7 @@ const marshalUpdateTLSStageRequest = (request, defaults) => ({
|
|
|
724
731
|
])
|
|
725
732
|
});
|
|
726
733
|
const marshalUpdateWafStageRequest = (request, defaults) => ({
|
|
734
|
+
exclusion_rules: request.exclusionRules !== void 0 ? request.exclusionRules.map((elt) => marshalWafExclusionRule(elt, defaults)) : void 0,
|
|
727
735
|
mode: request.mode,
|
|
728
736
|
paranoia_level: request.paranoiaLevel,
|
|
729
737
|
...resolveOneOf([{
|
|
@@ -118,6 +118,9 @@ export interface TLSSecret {
|
|
|
118
118
|
*/
|
|
119
119
|
region: ScwRegion;
|
|
120
120
|
}
|
|
121
|
+
export interface WafExclusionRule {
|
|
122
|
+
ruleId: number;
|
|
123
|
+
}
|
|
121
124
|
export interface RuleHttpMatch {
|
|
122
125
|
/**
|
|
123
126
|
* HTTP methods to filter for. A request using any of these methods will be considered to match the rule. Possible values are `get`, `post`, `put`, `patch`, `delete`, `head`, `options`. All methods will match if none is provided.
|
|
@@ -449,6 +452,10 @@ export interface WafStage {
|
|
|
449
452
|
* One-of ('next'): at most one of 'backendStageId' could be set.
|
|
450
453
|
*/
|
|
451
454
|
backendStageId?: string;
|
|
455
|
+
/**
|
|
456
|
+
* List of OWASP® CRS rule IDs excluded from WAF.
|
|
457
|
+
*/
|
|
458
|
+
exclusionRules: WafExclusionRule[];
|
|
452
459
|
}
|
|
453
460
|
export interface SetRouteRulesRequestRouteRule {
|
|
454
461
|
/**
|
|
@@ -905,6 +912,10 @@ export type CreateWafStageRequest = {
|
|
|
905
912
|
* Sensitivity level (`1`,`2`,`3`,`4`) to use when classifying requests as malicious. With a high level, requests are more likely to be classed as malicious, and false positives are expected. With a lower level, requests are more likely to be classed as benign.
|
|
906
913
|
*/
|
|
907
914
|
paranoiaLevel: number;
|
|
915
|
+
/**
|
|
916
|
+
* List of OWASP® CRS rule IDs excluded from WAF.
|
|
917
|
+
*/
|
|
918
|
+
exclusionRules?: WafExclusionRule[];
|
|
908
919
|
/**
|
|
909
920
|
* ID of the backend stage to forward requests to after the WAF stage.
|
|
910
921
|
*
|
|
@@ -1717,6 +1728,10 @@ export type UpdateWafStageRequest = {
|
|
|
1717
1728
|
* Sensitivity level (`1`,`2`,`3`,`4`) to use when classifying requests as malicious. With a high level, requests are more likely to be classed as malicious, and false positives are expected. With a lower level, requests are more likely to be classed as benign.
|
|
1718
1729
|
*/
|
|
1719
1730
|
paranoiaLevel?: number;
|
|
1731
|
+
/**
|
|
1732
|
+
* List of OWASP® CRS rule IDs excluded from WAF.
|
|
1733
|
+
*/
|
|
1734
|
+
exclusionRules?: WafExclusionRule[];
|
|
1720
1735
|
/**
|
|
1721
1736
|
* ID of the backend stage to forward requests to after the WAF stage.
|
|
1722
1737
|
*
|
|
@@ -19,6 +19,11 @@ export declare const UpdateWafStageRequest: {
|
|
|
19
19
|
lessThanOrEqual: number;
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
+
export declare const WafExclusionRule: {
|
|
23
|
+
ruleId: {
|
|
24
|
+
greaterThan: number;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
22
27
|
export declare const WafStage: {
|
|
23
28
|
paranoiaLevel: {
|
|
24
29
|
greaterThanOrEqual: number;
|
|
@@ -4,6 +4,7 @@ var validation_rules_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
4
4
|
CreateWafStageRequest: () => CreateWafStageRequest,
|
|
5
5
|
ListVPCEndpointsRequest: () => ListVPCEndpointsRequest,
|
|
6
6
|
UpdateWafStageRequest: () => UpdateWafStageRequest,
|
|
7
|
+
WafExclusionRule: () => WafExclusionRule,
|
|
7
8
|
WafStage: () => WafStage
|
|
8
9
|
});
|
|
9
10
|
const CreateWafStageRequest = { paranoiaLevel: {
|
|
@@ -21,9 +22,10 @@ const UpdateWafStageRequest = { paranoiaLevel: {
|
|
|
21
22
|
greaterThanOrEqual: 1,
|
|
22
23
|
lessThanOrEqual: 4
|
|
23
24
|
} };
|
|
25
|
+
const WafExclusionRule = { ruleId: { greaterThan: 0 } };
|
|
24
26
|
const WafStage = { paranoiaLevel: {
|
|
25
27
|
greaterThanOrEqual: 1,
|
|
26
28
|
lessThanOrEqual: 4
|
|
27
29
|
} };
|
|
28
30
|
//#endregion
|
|
29
|
-
export { CreateWafStageRequest, ListVPCEndpointsRequest, UpdateWafStageRequest, WafStage, validation_rules_gen_exports };
|
|
31
|
+
export { CreateWafStageRequest, ListVPCEndpointsRequest, UpdateWafStageRequest, WafExclusionRule, WafStage, validation_rules_gen_exports };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk-edge-services",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.23.0",
|
|
4
4
|
"description": "Scaleway SDK edge-services",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -33,14 +33,14 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@scaleway/random-name": "6.0.2",
|
|
36
|
-
"@scaleway/sdk-std": "2.8.
|
|
36
|
+
"@scaleway/sdk-std": "2.8.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@repo/configs": "^0.1.1",
|
|
40
|
-
"@scaleway/sdk-client": "^2.
|
|
40
|
+
"@scaleway/sdk-client": "^2.9.0"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"@scaleway/sdk-client": "^2.
|
|
43
|
+
"@scaleway/sdk-client": "^2.9.0"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"package:check": "pnpm publint",
|