@scaleway/sdk 2.49.1 → 2.51.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/api/applesilicon/v1alpha1/marshalling.gen.cjs +1 -0
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +1 -0
- package/dist/api/applesilicon/v1alpha1/types.gen.d.ts +8 -0
- package/dist/api/baremetal/v1/marshalling.gen.cjs +3 -1
- package/dist/api/baremetal/v1/marshalling.gen.js +3 -1
- package/dist/api/baremetal/v1/types.gen.d.ts +4 -3
- package/dist/api/dedibox/v1/types.gen.d.ts +1 -1
- package/dist/api/edge_services/v1alpha1/api.gen.cjs +39 -0
- package/dist/api/edge_services/v1alpha1/api.gen.d.ts +16 -1
- package/dist/api/edge_services/v1alpha1/api.gen.js +40 -1
- package/dist/api/edge_services/v1alpha1/index.gen.d.ts +1 -1
- package/dist/api/edge_services/v1alpha1/marshalling.gen.cjs +54 -6
- package/dist/api/edge_services/v1alpha1/marshalling.gen.d.ts +4 -1
- package/dist/api/edge_services/v1alpha1/marshalling.gen.js +54 -6
- package/dist/api/edge_services/v1alpha1/types.gen.d.ts +64 -1
- package/dist/api/iam/v1alpha1/marshalling.gen.cjs +9 -0
- package/dist/api/iam/v1alpha1/marshalling.gen.js +9 -0
- package/dist/api/iam/v1alpha1/types.gen.d.ts +18 -0
- package/dist/api/index.gen.d.ts +2 -1
- package/dist/api/inference/v1beta1/validation-rules.gen.cjs +1 -1
- package/dist/api/inference/v1beta1/validation-rules.gen.js +1 -1
- package/dist/api/instance/v1/api.gen.cjs +0 -37
- package/dist/api/instance/v1/api.gen.d.ts +1 -21
- package/dist/api/instance/v1/api.gen.js +1 -38
- package/dist/api/instance/v1/index.gen.d.ts +1 -1
- package/dist/api/instance/v1/marshalling.gen.cjs +1 -28
- package/dist/api/instance/v1/marshalling.gen.d.ts +1 -3
- package/dist/api/instance/v1/marshalling.gen.js +1 -28
- package/dist/api/instance/v1/types.gen.d.ts +9 -53
- package/dist/api/instance/v1/types.private.gen.d.ts +1 -3
- package/dist/api/jobs/v1alpha1/api.gen.cjs +46 -0
- package/dist/api/jobs/v1alpha1/api.gen.d.ts +6 -1
- package/dist/api/jobs/v1alpha1/api.gen.js +47 -1
- package/dist/api/jobs/v1alpha1/index.gen.d.ts +1 -1
- package/dist/api/jobs/v1alpha1/marshalling.gen.cjs +80 -0
- package/dist/api/jobs/v1alpha1/marshalling.gen.d.ts +6 -1
- package/dist/api/jobs/v1alpha1/marshalling.gen.js +81 -1
- package/dist/api/jobs/v1alpha1/types.gen.d.ts +81 -0
- package/dist/api/jobs/v1alpha1/validation-rules.gen.cjs +14 -2
- package/dist/api/jobs/v1alpha1/validation-rules.gen.d.ts +10 -0
- package/dist/api/jobs/v1alpha1/validation-rules.gen.js +15 -3
- package/dist/api/mongodb/index.gen.cjs +4 -0
- package/dist/api/mongodb/index.gen.d.ts +5 -0
- package/dist/api/mongodb/index.gen.js +4 -0
- package/dist/api/mongodb/v1alpha1/api.gen.cjs +385 -0
- package/dist/api/mongodb/v1alpha1/api.gen.d.ts +195 -0
- package/dist/api/mongodb/v1alpha1/api.gen.js +385 -0
- package/dist/api/mongodb/v1alpha1/content.gen.cjs +16 -0
- package/dist/api/mongodb/v1alpha1/content.gen.d.ts +5 -0
- package/dist/api/mongodb/v1alpha1/content.gen.js +16 -0
- package/dist/api/mongodb/v1alpha1/index.gen.cjs +9 -0
- package/dist/api/mongodb/v1alpha1/index.gen.d.ts +4 -0
- package/dist/api/mongodb/v1alpha1/index.gen.js +9 -0
- package/dist/api/mongodb/v1alpha1/marshalling.gen.cjs +326 -0
- package/dist/api/mongodb/v1alpha1/marshalling.gen.d.ts +19 -0
- package/dist/api/mongodb/v1alpha1/marshalling.gen.js +326 -0
- package/dist/api/mongodb/v1alpha1/types.gen.d.ts +461 -0
- package/dist/api/mongodb/v1alpha1/validation-rules.gen.cjs +147 -0
- package/dist/api/mongodb/v1alpha1/validation-rules.gen.d.ts +134 -0
- package/dist/api/mongodb/v1alpha1/validation-rules.gen.js +147 -0
- package/dist/api/tem/v1alpha1/index.gen.d.ts +1 -1
- package/dist/api/tem/v1alpha1/marshalling.gen.cjs +13 -0
- package/dist/api/tem/v1alpha1/marshalling.gen.js +13 -0
- package/dist/api/tem/v1alpha1/types.gen.d.ts +13 -2
- package/dist/api/webhosting/v1alpha1/types.gen.d.ts +1 -1
- package/dist/index.cjs +16 -14
- package/dist/index.js +16 -14
- package/dist/scw/constants.cjs +1 -1
- package/dist/scw/constants.d.ts +2 -2
- package/dist/scw/constants.js +1 -1
- package/package.json +2 -2
|
@@ -104,6 +104,7 @@ const unmarshalServer = (data) => {
|
|
|
104
104
|
createdAt: marshalling.unmarshalDate(data.created_at),
|
|
105
105
|
deletableAt: marshalling.unmarshalDate(data.deletable_at),
|
|
106
106
|
deletionScheduled: data.deletion_scheduled,
|
|
107
|
+
delivered: data.delivered,
|
|
107
108
|
id: data.id,
|
|
108
109
|
ip: data.ip,
|
|
109
110
|
name: data.name,
|
|
@@ -102,6 +102,7 @@ const unmarshalServer = (data) => {
|
|
|
102
102
|
createdAt: unmarshalDate(data.created_at),
|
|
103
103
|
deletableAt: unmarshalDate(data.deletable_at),
|
|
104
104
|
deletionScheduled: data.deletion_scheduled,
|
|
105
|
+
delivered: data.delivered,
|
|
105
106
|
id: data.id,
|
|
106
107
|
ip: data.ip,
|
|
107
108
|
name: data.name,
|
|
@@ -101,6 +101,14 @@ export interface Server {
|
|
|
101
101
|
deletionScheduled: boolean;
|
|
102
102
|
/** Zone of the server. */
|
|
103
103
|
zone: Zone;
|
|
104
|
+
/**
|
|
105
|
+
* Set to true once the server has completed its provisioning steps and is
|
|
106
|
+
* ready to use. Some OS configurations might require a reinstallation of the
|
|
107
|
+
* server before delivery depending on the available stock. A reinstallation
|
|
108
|
+
* after the initial delivery will not change this flag and can be tracked
|
|
109
|
+
* using the server status.
|
|
110
|
+
*/
|
|
111
|
+
delivered: boolean;
|
|
104
112
|
}
|
|
105
113
|
export type CreateServerRequest = {
|
|
106
114
|
/** Zone to target. If none is passed will use default zone from the config. */
|
|
@@ -166,7 +166,9 @@ const unmarshalPrivateNetworkOption = (data) => {
|
|
|
166
166
|
`Unmarshalling the type 'PrivateNetworkOption' failed as data isn't a dictionary.`
|
|
167
167
|
);
|
|
168
168
|
}
|
|
169
|
-
return {
|
|
169
|
+
return {
|
|
170
|
+
bandwidthInBps: data.bandwidth_in_bps
|
|
171
|
+
};
|
|
170
172
|
};
|
|
171
173
|
const unmarshalPublicBandwidthOption = (data) => {
|
|
172
174
|
if (!json.isJSONObject(data)) {
|
|
@@ -164,7 +164,9 @@ const unmarshalPrivateNetworkOption = (data) => {
|
|
|
164
164
|
`Unmarshalling the type 'PrivateNetworkOption' failed as data isn't a dictionary.`
|
|
165
165
|
);
|
|
166
166
|
}
|
|
167
|
-
return {
|
|
167
|
+
return {
|
|
168
|
+
bandwidthInBps: data.bandwidth_in_bps
|
|
169
|
+
};
|
|
168
170
|
};
|
|
169
171
|
const unmarshalPublicBandwidthOption = (data) => {
|
|
170
172
|
if (!isJSONObject(data)) {
|
|
@@ -53,6 +53,7 @@ export interface LicenseOption {
|
|
|
53
53
|
osId: string;
|
|
54
54
|
}
|
|
55
55
|
export interface PrivateNetworkOption {
|
|
56
|
+
bandwidthInBps: number;
|
|
56
57
|
}
|
|
57
58
|
export interface PublicBandwidthOption {
|
|
58
59
|
bandwidthInBps: number;
|
|
@@ -131,7 +132,7 @@ export interface OfferOptionOffer {
|
|
|
131
132
|
*/
|
|
132
133
|
publicBandwidth?: PublicBandwidthOption;
|
|
133
134
|
/**
|
|
134
|
-
* Private_network option.
|
|
135
|
+
* Private_network option, contains the bandwidth_in_bps.
|
|
135
136
|
*
|
|
136
137
|
* One-of ('option'): at most one of 'license', 'publicBandwidth',
|
|
137
138
|
* 'privateNetwork', 'remoteAccess', 'certification' could be set.
|
|
@@ -228,7 +229,7 @@ export interface ServerOption {
|
|
|
228
229
|
*/
|
|
229
230
|
publicBandwidth?: PublicBandwidthOption;
|
|
230
231
|
/**
|
|
231
|
-
* Private_network option.
|
|
232
|
+
* Private_network option, contains the bandwidth_in_bps.
|
|
232
233
|
*
|
|
233
234
|
* One-of ('option'): at most one of 'license', 'publicBandwidth',
|
|
234
235
|
* 'privateNetwork', 'remoteAccess', 'certification' could be set.
|
|
@@ -380,7 +381,7 @@ export interface Option {
|
|
|
380
381
|
*/
|
|
381
382
|
publicBandwidth?: PublicBandwidthOption;
|
|
382
383
|
/**
|
|
383
|
-
* Private_network option.
|
|
384
|
+
* Private_network option, contains the bandwidth_in_bps.
|
|
384
385
|
*
|
|
385
386
|
* One-of ('option'): at most one of 'license', 'publicBandwidth',
|
|
386
387
|
* 'privateNetwork', 'remoteAccess', 'certification' could be set.
|
|
@@ -36,7 +36,7 @@ export type ListServersRequestOrderBy = 'created_at_asc' | 'created_at_desc';
|
|
|
36
36
|
export type ListServicesRequestOrderBy = 'created_at_asc' | 'created_at_desc';
|
|
37
37
|
export type LogAction = 'unknown_log_action' | 'group_created' | 'group_deleted' | 'members_added' | 'members_deleted' | 'description_updated' | 'rpnv1_members_added' | 'rpnv1_members_deleted' | 'vlan_updated' | 'vlan_updated_on_all_servers';
|
|
38
38
|
export type LogStatus = 'unknown_log_status' | 'success' | 'in_progress' | 'error';
|
|
39
|
-
export type MemoryType = 'ddr2' | 'ddr3' | 'ddr4';
|
|
39
|
+
export type MemoryType = 'ddr2' | 'ddr3' | 'ddr4' | 'ddr5';
|
|
40
40
|
export type NetworkInterfaceInterfaceType = 'unknown' | 'normal' | 'ipmi' | 'virtual';
|
|
41
41
|
export type OSArch = 'unknown_arch' | 'amd64' | 'x86' | 'arm' | 'arm64';
|
|
42
42
|
export type OSType = 'unknown_type' | 'server' | 'virtu' | 'panel' | 'desktop' | 'custom' | 'rescue';
|
|
@@ -87,6 +87,29 @@ class API extends api.API {
|
|
|
87
87
|
request,
|
|
88
88
|
options
|
|
89
89
|
);
|
|
90
|
+
pageOfListPipelinesWithStages = (request = {}) => this.client.fetch(
|
|
91
|
+
{
|
|
92
|
+
method: "GET",
|
|
93
|
+
path: `/edge-services/v1alpha1/pipelines-stages`,
|
|
94
|
+
urlParams: marshalling.urlParams(
|
|
95
|
+
["name", request.name],
|
|
96
|
+
["order_by", request.orderBy],
|
|
97
|
+
["organization_id", request.organizationId],
|
|
98
|
+
["page", request.page],
|
|
99
|
+
[
|
|
100
|
+
"page_size",
|
|
101
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
102
|
+
],
|
|
103
|
+
["project_id", request.projectId]
|
|
104
|
+
)
|
|
105
|
+
},
|
|
106
|
+
marshalling_gen.unmarshalListPipelinesWithStagesResponse
|
|
107
|
+
);
|
|
108
|
+
listPipelinesWithStages = (request = {}) => resourcePaginator.enrichForPagination(
|
|
109
|
+
"pipelines",
|
|
110
|
+
this.pageOfListPipelinesWithStages,
|
|
111
|
+
request
|
|
112
|
+
);
|
|
90
113
|
/**
|
|
91
114
|
* Update pipeline. Update the parameters of an existing pipeline, specified
|
|
92
115
|
* by its `pipeline_id`. Parameters which can be updated include the `name`,
|
|
@@ -624,5 +647,21 @@ class API extends api.API {
|
|
|
624
647
|
method: "DELETE",
|
|
625
648
|
path: `/edge-services/v1alpha1/current-plan/${marshalling.validatePathParam("projectId", request.projectId ?? this.client.settings.defaultProjectId)}`
|
|
626
649
|
});
|
|
650
|
+
/**
|
|
651
|
+
* Gives information on the currently selected Edge Services subscription
|
|
652
|
+
* plan, resource usage and associated billing information for this calendar
|
|
653
|
+
* month (including whether consumption falls within or exceeds the currently
|
|
654
|
+
* selected subscription plan.).
|
|
655
|
+
*
|
|
656
|
+
* @param request - The request {@link GetBillingRequest}
|
|
657
|
+
* @returns A Promise of GetBillingResponse
|
|
658
|
+
*/
|
|
659
|
+
getBilling = (request = {}) => this.client.fetch(
|
|
660
|
+
{
|
|
661
|
+
method: "GET",
|
|
662
|
+
path: `/edge-services/v1alpha1/billing/${marshalling.validatePathParam("projectId", request.projectId ?? this.client.settings.defaultProjectId)}`
|
|
663
|
+
},
|
|
664
|
+
marshalling_gen.unmarshalGetBillingResponse
|
|
665
|
+
);
|
|
627
666
|
}
|
|
628
667
|
exports.API = API;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { API as ParentAPI } from '../../../bridge';
|
|
2
2
|
import type { WaitForOptions } from '../../../bridge';
|
|
3
|
-
import type { BackendStage, CacheStage, CheckDomainRequest, CheckDomainResponse, CheckLbOriginRequest, CheckLbOriginResponse, CheckPEMChainRequest, CheckPEMChainResponse, CreateBackendStageRequest, CreateCacheStageRequest, CreateDNSStageRequest, CreatePipelineRequest, CreatePurgeRequestRequest, CreateTLSStageRequest, DNSStage, DeleteBackendStageRequest, DeleteCacheStageRequest, DeleteCurrentPlanRequest, DeleteDNSStageRequest, DeletePipelineRequest, DeleteTLSStageRequest, GetBackendStageRequest, GetCacheStageRequest, GetCurrentPlanRequest, GetDNSStageRequest, GetPipelineRequest, GetPurgeRequestRequest, GetTLSStageRequest, ListBackendStagesRequest, ListBackendStagesResponse, ListCacheStagesRequest, ListCacheStagesResponse, ListDNSStagesRequest, ListDNSStagesResponse, ListPipelinesRequest, ListPipelinesResponse, ListPlansResponse, ListPurgeRequestsRequest, ListPurgeRequestsResponse, ListTLSStagesRequest, ListTLSStagesResponse, Pipeline, Plan, PurgeRequest, SelectPlanRequest, TLSStage, UpdateBackendStageRequest, UpdateCacheStageRequest, UpdateDNSStageRequest, UpdatePipelineRequest, UpdateTLSStageRequest } from './types.gen';
|
|
3
|
+
import type { BackendStage, CacheStage, CheckDomainRequest, CheckDomainResponse, CheckLbOriginRequest, CheckLbOriginResponse, CheckPEMChainRequest, CheckPEMChainResponse, CreateBackendStageRequest, CreateCacheStageRequest, CreateDNSStageRequest, CreatePipelineRequest, CreatePurgeRequestRequest, CreateTLSStageRequest, DNSStage, DeleteBackendStageRequest, DeleteCacheStageRequest, DeleteCurrentPlanRequest, DeleteDNSStageRequest, DeletePipelineRequest, DeleteTLSStageRequest, GetBackendStageRequest, GetBillingRequest, GetBillingResponse, GetCacheStageRequest, GetCurrentPlanRequest, GetDNSStageRequest, GetPipelineRequest, GetPurgeRequestRequest, GetTLSStageRequest, ListBackendStagesRequest, ListBackendStagesResponse, ListCacheStagesRequest, ListCacheStagesResponse, ListDNSStagesRequest, ListDNSStagesResponse, ListPipelinesRequest, ListPipelinesResponse, ListPipelinesWithStagesRequest, ListPipelinesWithStagesResponse, ListPlansResponse, ListPurgeRequestsRequest, ListPurgeRequestsResponse, ListTLSStagesRequest, ListTLSStagesResponse, Pipeline, Plan, PurgeRequest, SelectPlanRequest, TLSStage, UpdateBackendStageRequest, UpdateCacheStageRequest, UpdateDNSStageRequest, UpdatePipelineRequest, UpdateTLSStageRequest } from './types.gen';
|
|
4
4
|
/** Edge Services API. */
|
|
5
5
|
export declare class API extends ParentAPI {
|
|
6
6
|
protected pageOfListPipelines: (request?: Readonly<ListPipelinesRequest>) => Promise<ListPipelinesResponse>;
|
|
@@ -43,6 +43,11 @@ export declare class API extends ParentAPI {
|
|
|
43
43
|
* @returns A Promise of Pipeline
|
|
44
44
|
*/
|
|
45
45
|
waitForPipeline: (request: Readonly<GetPipelineRequest>, options?: Readonly<WaitForOptions<Pipeline>>) => Promise<Pipeline>;
|
|
46
|
+
protected pageOfListPipelinesWithStages: (request?: Readonly<ListPipelinesWithStagesRequest>) => Promise<ListPipelinesWithStagesResponse>;
|
|
47
|
+
listPipelinesWithStages: (request?: Readonly<ListPipelinesWithStagesRequest>) => Promise<ListPipelinesWithStagesResponse> & {
|
|
48
|
+
all: () => Promise<import("./types.gen").PipelineStages[]>;
|
|
49
|
+
[Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen").PipelineStages[], void, void>;
|
|
50
|
+
};
|
|
46
51
|
/**
|
|
47
52
|
* Update pipeline. Update the parameters of an existing pipeline, specified
|
|
48
53
|
* by its `pipeline_id`. Parameters which can be updated include the `name`,
|
|
@@ -301,4 +306,14 @@ export declare class API extends ParentAPI {
|
|
|
301
306
|
selectPlan: (request?: Readonly<SelectPlanRequest>) => Promise<Plan>;
|
|
302
307
|
getCurrentPlan: (request?: Readonly<GetCurrentPlanRequest>) => Promise<Plan>;
|
|
303
308
|
deleteCurrentPlan: (request?: Readonly<DeleteCurrentPlanRequest>) => Promise<void>;
|
|
309
|
+
/**
|
|
310
|
+
* Gives information on the currently selected Edge Services subscription
|
|
311
|
+
* plan, resource usage and associated billing information for this calendar
|
|
312
|
+
* month (including whether consumption falls within or exceeds the currently
|
|
313
|
+
* selected subscription plan.).
|
|
314
|
+
*
|
|
315
|
+
* @param request - The request {@link GetBillingRequest}
|
|
316
|
+
* @returns A Promise of GetBillingResponse
|
|
317
|
+
*/
|
|
318
|
+
getBilling: (request?: Readonly<GetBillingRequest>) => Promise<GetBillingResponse>;
|
|
304
319
|
}
|
|
@@ -4,7 +4,7 @@ import { urlParams, validatePathParam } from "../../../helpers/marshalling.js";
|
|
|
4
4
|
import "../../../vendor/base64/index.js";
|
|
5
5
|
import { enrichForPagination } from "../../../scw/fetch/resource-paginator.js";
|
|
6
6
|
import { PIPELINE_TRANSIENT_STATUSES, PURGE_REQUEST_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
7
|
-
import { unmarshalListPipelinesResponse, marshalCreatePipelineRequest, unmarshalPipeline, marshalUpdatePipelineRequest, unmarshalListDNSStagesResponse, marshalCreateDNSStageRequest, unmarshalDNSStage, marshalUpdateDNSStageRequest, unmarshalListTLSStagesResponse, marshalCreateTLSStageRequest, unmarshalTLSStage, marshalUpdateTLSStageRequest, unmarshalListCacheStagesResponse, marshalCreateCacheStageRequest, unmarshalCacheStage, marshalUpdateCacheStageRequest, unmarshalListBackendStagesResponse, marshalCreateBackendStageRequest, unmarshalBackendStage, marshalUpdateBackendStageRequest, marshalCheckDomainRequest, unmarshalCheckDomainResponse, marshalCheckPEMChainRequest, unmarshalCheckPEMChainResponse, unmarshalListPurgeRequestsResponse, marshalCreatePurgeRequestRequest, unmarshalPurgeRequest, marshalCheckLbOriginRequest, unmarshalCheckLbOriginResponse, unmarshalListPlansResponse, marshalSelectPlanRequest, unmarshalPlan } from "./marshalling.gen.js";
|
|
7
|
+
import { unmarshalListPipelinesResponse, marshalCreatePipelineRequest, unmarshalPipeline, unmarshalListPipelinesWithStagesResponse, marshalUpdatePipelineRequest, unmarshalListDNSStagesResponse, marshalCreateDNSStageRequest, unmarshalDNSStage, marshalUpdateDNSStageRequest, unmarshalListTLSStagesResponse, marshalCreateTLSStageRequest, unmarshalTLSStage, marshalUpdateTLSStageRequest, unmarshalListCacheStagesResponse, marshalCreateCacheStageRequest, unmarshalCacheStage, marshalUpdateCacheStageRequest, unmarshalListBackendStagesResponse, marshalCreateBackendStageRequest, unmarshalBackendStage, marshalUpdateBackendStageRequest, marshalCheckDomainRequest, unmarshalCheckDomainResponse, marshalCheckPEMChainRequest, unmarshalCheckPEMChainResponse, unmarshalListPurgeRequestsResponse, marshalCreatePurgeRequestRequest, unmarshalPurgeRequest, marshalCheckLbOriginRequest, unmarshalCheckLbOriginResponse, unmarshalListPlansResponse, marshalSelectPlanRequest, unmarshalPlan, unmarshalGetBillingResponse } from "./marshalling.gen.js";
|
|
8
8
|
const jsonContentHeaders = {
|
|
9
9
|
"Content-Type": "application/json; charset=utf-8"
|
|
10
10
|
};
|
|
@@ -85,6 +85,29 @@ class API extends API$1 {
|
|
|
85
85
|
request,
|
|
86
86
|
options
|
|
87
87
|
);
|
|
88
|
+
pageOfListPipelinesWithStages = (request = {}) => this.client.fetch(
|
|
89
|
+
{
|
|
90
|
+
method: "GET",
|
|
91
|
+
path: `/edge-services/v1alpha1/pipelines-stages`,
|
|
92
|
+
urlParams: urlParams(
|
|
93
|
+
["name", request.name],
|
|
94
|
+
["order_by", request.orderBy],
|
|
95
|
+
["organization_id", request.organizationId],
|
|
96
|
+
["page", request.page],
|
|
97
|
+
[
|
|
98
|
+
"page_size",
|
|
99
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
100
|
+
],
|
|
101
|
+
["project_id", request.projectId]
|
|
102
|
+
)
|
|
103
|
+
},
|
|
104
|
+
unmarshalListPipelinesWithStagesResponse
|
|
105
|
+
);
|
|
106
|
+
listPipelinesWithStages = (request = {}) => enrichForPagination(
|
|
107
|
+
"pipelines",
|
|
108
|
+
this.pageOfListPipelinesWithStages,
|
|
109
|
+
request
|
|
110
|
+
);
|
|
88
111
|
/**
|
|
89
112
|
* Update pipeline. Update the parameters of an existing pipeline, specified
|
|
90
113
|
* by its `pipeline_id`. Parameters which can be updated include the `name`,
|
|
@@ -622,6 +645,22 @@ class API extends API$1 {
|
|
|
622
645
|
method: "DELETE",
|
|
623
646
|
path: `/edge-services/v1alpha1/current-plan/${validatePathParam("projectId", request.projectId ?? this.client.settings.defaultProjectId)}`
|
|
624
647
|
});
|
|
648
|
+
/**
|
|
649
|
+
* Gives information on the currently selected Edge Services subscription
|
|
650
|
+
* plan, resource usage and associated billing information for this calendar
|
|
651
|
+
* month (including whether consumption falls within or exceeds the currently
|
|
652
|
+
* selected subscription plan.).
|
|
653
|
+
*
|
|
654
|
+
* @param request - The request {@link GetBillingRequest}
|
|
655
|
+
* @returns A Promise of GetBillingResponse
|
|
656
|
+
*/
|
|
657
|
+
getBilling = (request = {}) => this.client.fetch(
|
|
658
|
+
{
|
|
659
|
+
method: "GET",
|
|
660
|
+
path: `/edge-services/v1alpha1/billing/${validatePathParam("projectId", request.projectId ?? this.client.settings.defaultProjectId)}`
|
|
661
|
+
},
|
|
662
|
+
unmarshalGetBillingResponse
|
|
663
|
+
);
|
|
625
664
|
}
|
|
626
665
|
export {
|
|
627
666
|
API
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { API } from './api.gen';
|
|
2
2
|
export * from './content.gen';
|
|
3
|
-
export type { BackendStage, CacheStage, CheckDomainRequest, CheckDomainResponse, CheckLbOriginRequest, CheckLbOriginResponse, CheckPEMChainRequest, CheckPEMChainRequestSecretChain, CheckPEMChainResponse, CreateBackendStageRequest, CreateCacheStageRequest, CreateDNSStageRequest, CreatePipelineRequest, CreatePurgeRequestRequest, CreateTLSStageRequest, DNSStage, DNSStageType, DeleteBackendStageRequest, DeleteCacheStageRequest, DeleteCurrentPlanRequest, DeleteDNSStageRequest, DeletePipelineRequest, DeleteTLSStageRequest, GetBackendStageRequest, GetCacheStageRequest, GetCurrentPlanRequest, GetDNSStageRequest, GetPipelineRequest, GetPurgeRequestRequest, GetTLSStageRequest, LbOriginError, ListBackendStagesRequest, ListBackendStagesRequestOrderBy, ListBackendStagesResponse, ListCacheStagesRequest, ListCacheStagesRequestOrderBy, ListCacheStagesResponse, ListDNSStagesRequest, ListDNSStagesRequestOrderBy, ListDNSStagesResponse, ListPipelinesRequest, ListPipelinesRequestOrderBy, ListPipelinesResponse, ListPlansResponse, ListPurgeRequestsRequest, ListPurgeRequestsRequestOrderBy, ListPurgeRequestsResponse, ListTLSStagesRequest, ListTLSStagesRequestOrderBy, ListTLSStagesResponse, Pipeline, PipelineError, PipelineErrorCode, PipelineErrorSeverity, PipelineErrorStage, PipelineErrorType, PipelineStatus, Plan, PlanDetails, PlanName, PurgeRequest, PurgeRequestStatus, ScalewayLb, ScalewayLbBackendConfig, ScalewayS3BackendConfig, SelectPlanRequest, TLSSecret, TLSSecretsConfig, TLSStage, UpdateBackendStageRequest, UpdateCacheStageRequest, UpdateDNSStageRequest, UpdatePipelineRequest, UpdateTLSStageRequest, } from './types.gen';
|
|
3
|
+
export type { BackendStage, CacheStage, CheckDomainRequest, CheckDomainResponse, CheckLbOriginRequest, CheckLbOriginResponse, CheckPEMChainRequest, CheckPEMChainRequestSecretChain, CheckPEMChainResponse, CreateBackendStageRequest, CreateCacheStageRequest, CreateDNSStageRequest, CreatePipelineRequest, CreatePurgeRequestRequest, CreateTLSStageRequest, DNSStage, DNSStageType, DeleteBackendStageRequest, DeleteCacheStageRequest, DeleteCurrentPlanRequest, DeleteDNSStageRequest, DeletePipelineRequest, DeleteTLSStageRequest, GetBackendStageRequest, GetBillingRequest, GetBillingResponse, GetCacheStageRequest, GetCurrentPlanRequest, GetDNSStageRequest, GetPipelineRequest, GetPurgeRequestRequest, GetTLSStageRequest, LbOriginError, ListBackendStagesRequest, ListBackendStagesRequestOrderBy, ListBackendStagesResponse, ListCacheStagesRequest, ListCacheStagesRequestOrderBy, ListCacheStagesResponse, ListDNSStagesRequest, ListDNSStagesRequestOrderBy, ListDNSStagesResponse, ListPipelinesRequest, ListPipelinesRequestOrderBy, ListPipelinesResponse, ListPipelinesWithStagesRequest, ListPipelinesWithStagesRequestOrderBy, ListPipelinesWithStagesResponse, ListPlansResponse, ListPurgeRequestsRequest, ListPurgeRequestsRequestOrderBy, ListPurgeRequestsResponse, ListTLSStagesRequest, ListTLSStagesRequestOrderBy, ListTLSStagesResponse, Pipeline, PipelineError, PipelineErrorCode, PipelineErrorSeverity, PipelineErrorStage, PipelineErrorType, PipelineStages, PipelineStatus, Plan, PlanDetails, PlanName, PurgeRequest, PurgeRequestStatus, ScalewayLb, ScalewayLbBackendConfig, ScalewayS3BackendConfig, SelectPlanRequest, TLSSecret, TLSSecretsConfig, TLSStage, UpdateBackendStageRequest, UpdateCacheStageRequest, UpdateDNSStageRequest, UpdatePipelineRequest, UpdateTLSStageRequest, } from './types.gen';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const json = require("../../../helpers/json.cjs");
|
|
4
|
+
const customMarshalling = require("../../../scw/custom-marshalling.cjs");
|
|
4
5
|
const marshalling = require("../../../helpers/marshalling.cjs");
|
|
5
|
-
require("../../../vendor/base64/index.cjs");
|
|
6
6
|
const unmarshalScalewayLb = (data) => {
|
|
7
7
|
if (!json.isJSONObject(data)) {
|
|
8
8
|
throw new TypeError(
|
|
@@ -152,6 +152,23 @@ const unmarshalTLSStage = (data) => {
|
|
|
152
152
|
updatedAt: marshalling.unmarshalDate(data.updated_at)
|
|
153
153
|
};
|
|
154
154
|
};
|
|
155
|
+
const unmarshalPipelineStages = (data) => {
|
|
156
|
+
if (!json.isJSONObject(data)) {
|
|
157
|
+
throw new TypeError(
|
|
158
|
+
`Unmarshalling the type 'PipelineStages' failed as data isn't a dictionary.`
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
return {
|
|
162
|
+
backendStages: marshalling.unmarshalArrayOfObject(
|
|
163
|
+
data.backend_stages,
|
|
164
|
+
unmarshalBackendStage
|
|
165
|
+
),
|
|
166
|
+
cacheStages: marshalling.unmarshalArrayOfObject(data.cache_stages, unmarshalCacheStage),
|
|
167
|
+
dnsStages: marshalling.unmarshalArrayOfObject(data.dns_stages, unmarshalDNSStage),
|
|
168
|
+
pipeline: data.pipeline ? unmarshalPipeline(data.pipeline) : void 0,
|
|
169
|
+
tlsStages: marshalling.unmarshalArrayOfObject(data.tls_stages, unmarshalTLSStage)
|
|
170
|
+
};
|
|
171
|
+
};
|
|
155
172
|
const unmarshalPurgeRequest = (data) => {
|
|
156
173
|
if (!json.isJSONObject(data)) {
|
|
157
174
|
throw new TypeError(
|
|
@@ -199,6 +216,35 @@ const unmarshalCheckPEMChainResponse = (data) => {
|
|
|
199
216
|
isValid: data.is_valid
|
|
200
217
|
};
|
|
201
218
|
};
|
|
219
|
+
const unmarshalPlanDetails = (data) => {
|
|
220
|
+
if (!json.isJSONObject(data)) {
|
|
221
|
+
throw new TypeError(
|
|
222
|
+
`Unmarshalling the type 'PlanDetails' failed as data isn't a dictionary.`
|
|
223
|
+
);
|
|
224
|
+
}
|
|
225
|
+
return {
|
|
226
|
+
packageGb: data.package_gb,
|
|
227
|
+
pipelineLimit: data.pipeline_limit,
|
|
228
|
+
planName: data.plan_name
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
const unmarshalGetBillingResponse = (data) => {
|
|
232
|
+
if (!json.isJSONObject(data)) {
|
|
233
|
+
throw new TypeError(
|
|
234
|
+
`Unmarshalling the type 'GetBillingResponse' failed as data isn't a dictionary.`
|
|
235
|
+
);
|
|
236
|
+
}
|
|
237
|
+
return {
|
|
238
|
+
currentPlan: data.current_plan ? unmarshalPlanDetails(data.current_plan) : void 0,
|
|
239
|
+
currentPlanCacheUsage: data.current_plan_cache_usage,
|
|
240
|
+
extraCacheCost: data.extra_cache_cost ? customMarshalling.unmarshalMoney(data.extra_cache_cost) : void 0,
|
|
241
|
+
extraCacheUsage: data.extra_cache_usage,
|
|
242
|
+
extraPipelinesCost: data.extra_pipelines_cost ? customMarshalling.unmarshalMoney(data.extra_pipelines_cost) : void 0,
|
|
243
|
+
pipelineNumber: data.pipeline_number,
|
|
244
|
+
planCost: data.plan_cost ? customMarshalling.unmarshalMoney(data.plan_cost) : void 0,
|
|
245
|
+
totalCost: data.total_cost ? customMarshalling.unmarshalMoney(data.total_cost) : void 0
|
|
246
|
+
};
|
|
247
|
+
};
|
|
202
248
|
const unmarshalListBackendStagesResponse = (data) => {
|
|
203
249
|
if (!json.isJSONObject(data)) {
|
|
204
250
|
throw new TypeError(
|
|
@@ -243,16 +289,15 @@ const unmarshalListPipelinesResponse = (data) => {
|
|
|
243
289
|
totalCount: data.total_count
|
|
244
290
|
};
|
|
245
291
|
};
|
|
246
|
-
const
|
|
292
|
+
const unmarshalListPipelinesWithStagesResponse = (data) => {
|
|
247
293
|
if (!json.isJSONObject(data)) {
|
|
248
294
|
throw new TypeError(
|
|
249
|
-
`Unmarshalling the type '
|
|
295
|
+
`Unmarshalling the type 'ListPipelinesWithStagesResponse' failed as data isn't a dictionary.`
|
|
250
296
|
);
|
|
251
297
|
}
|
|
252
298
|
return {
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
planName: data.plan_name
|
|
299
|
+
pipelines: marshalling.unmarshalArrayOfObject(data.pipelines, unmarshalPipelineStages),
|
|
300
|
+
totalCount: data.total_count
|
|
256
301
|
};
|
|
257
302
|
};
|
|
258
303
|
const unmarshalListPlansResponse = (data) => {
|
|
@@ -461,14 +506,17 @@ exports.unmarshalCheckDomainResponse = unmarshalCheckDomainResponse;
|
|
|
461
506
|
exports.unmarshalCheckLbOriginResponse = unmarshalCheckLbOriginResponse;
|
|
462
507
|
exports.unmarshalCheckPEMChainResponse = unmarshalCheckPEMChainResponse;
|
|
463
508
|
exports.unmarshalDNSStage = unmarshalDNSStage;
|
|
509
|
+
exports.unmarshalGetBillingResponse = unmarshalGetBillingResponse;
|
|
464
510
|
exports.unmarshalListBackendStagesResponse = unmarshalListBackendStagesResponse;
|
|
465
511
|
exports.unmarshalListCacheStagesResponse = unmarshalListCacheStagesResponse;
|
|
466
512
|
exports.unmarshalListDNSStagesResponse = unmarshalListDNSStagesResponse;
|
|
467
513
|
exports.unmarshalListPipelinesResponse = unmarshalListPipelinesResponse;
|
|
514
|
+
exports.unmarshalListPipelinesWithStagesResponse = unmarshalListPipelinesWithStagesResponse;
|
|
468
515
|
exports.unmarshalListPlansResponse = unmarshalListPlansResponse;
|
|
469
516
|
exports.unmarshalListPurgeRequestsResponse = unmarshalListPurgeRequestsResponse;
|
|
470
517
|
exports.unmarshalListTLSStagesResponse = unmarshalListTLSStagesResponse;
|
|
471
518
|
exports.unmarshalPipeline = unmarshalPipeline;
|
|
519
|
+
exports.unmarshalPipelineStages = unmarshalPipelineStages;
|
|
472
520
|
exports.unmarshalPlan = unmarshalPlan;
|
|
473
521
|
exports.unmarshalPurgeRequest = unmarshalPurgeRequest;
|
|
474
522
|
exports.unmarshalTLSStage = unmarshalTLSStage;
|
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
import type { DefaultValues } from '../../../bridge';
|
|
2
|
-
import type { BackendStage, CacheStage, CheckDomainRequest, CheckDomainResponse, CheckLbOriginRequest, CheckLbOriginResponse, CheckPEMChainRequest, CheckPEMChainResponse, CreateBackendStageRequest, CreateCacheStageRequest, CreateDNSStageRequest, CreatePipelineRequest, CreatePurgeRequestRequest, CreateTLSStageRequest, DNSStage, ListBackendStagesResponse, ListCacheStagesResponse, ListDNSStagesResponse, ListPipelinesResponse, ListPlansResponse, ListPurgeRequestsResponse, ListTLSStagesResponse, Pipeline, Plan, PurgeRequest, SelectPlanRequest, TLSStage, UpdateBackendStageRequest, UpdateCacheStageRequest, UpdateDNSStageRequest, UpdatePipelineRequest, UpdateTLSStageRequest } from './types.gen';
|
|
2
|
+
import type { BackendStage, CacheStage, CheckDomainRequest, CheckDomainResponse, CheckLbOriginRequest, CheckLbOriginResponse, CheckPEMChainRequest, CheckPEMChainResponse, CreateBackendStageRequest, CreateCacheStageRequest, CreateDNSStageRequest, CreatePipelineRequest, CreatePurgeRequestRequest, CreateTLSStageRequest, DNSStage, GetBillingResponse, ListBackendStagesResponse, ListCacheStagesResponse, ListDNSStagesResponse, ListPipelinesResponse, ListPipelinesWithStagesResponse, ListPlansResponse, ListPurgeRequestsResponse, ListTLSStagesResponse, Pipeline, PipelineStages, Plan, PurgeRequest, SelectPlanRequest, TLSStage, UpdateBackendStageRequest, UpdateCacheStageRequest, UpdateDNSStageRequest, UpdatePipelineRequest, UpdateTLSStageRequest } from './types.gen';
|
|
3
3
|
export declare const unmarshalBackendStage: (data: unknown) => BackendStage;
|
|
4
4
|
export declare const unmarshalCacheStage: (data: unknown) => CacheStage;
|
|
5
5
|
export declare const unmarshalDNSStage: (data: unknown) => DNSStage;
|
|
6
6
|
export declare const unmarshalPipeline: (data: unknown) => Pipeline;
|
|
7
7
|
export declare const unmarshalTLSStage: (data: unknown) => TLSStage;
|
|
8
|
+
export declare const unmarshalPipelineStages: (data: unknown) => PipelineStages;
|
|
8
9
|
export declare const unmarshalPurgeRequest: (data: unknown) => PurgeRequest;
|
|
9
10
|
export declare const unmarshalCheckDomainResponse: (data: unknown) => CheckDomainResponse;
|
|
10
11
|
export declare const unmarshalCheckLbOriginResponse: (data: unknown) => CheckLbOriginResponse;
|
|
11
12
|
export declare const unmarshalCheckPEMChainResponse: (data: unknown) => CheckPEMChainResponse;
|
|
13
|
+
export declare const unmarshalGetBillingResponse: (data: unknown) => GetBillingResponse;
|
|
12
14
|
export declare const unmarshalListBackendStagesResponse: (data: unknown) => ListBackendStagesResponse;
|
|
13
15
|
export declare const unmarshalListCacheStagesResponse: (data: unknown) => ListCacheStagesResponse;
|
|
14
16
|
export declare const unmarshalListDNSStagesResponse: (data: unknown) => ListDNSStagesResponse;
|
|
15
17
|
export declare const unmarshalListPipelinesResponse: (data: unknown) => ListPipelinesResponse;
|
|
18
|
+
export declare const unmarshalListPipelinesWithStagesResponse: (data: unknown) => ListPipelinesWithStagesResponse;
|
|
16
19
|
export declare const unmarshalListPlansResponse: (data: unknown) => ListPlansResponse;
|
|
17
20
|
export declare const unmarshalListPurgeRequestsResponse: (data: unknown) => ListPurgeRequestsResponse;
|
|
18
21
|
export declare const unmarshalListTLSStagesResponse: (data: unknown) => ListTLSStagesResponse;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isJSONObject } from "../../../helpers/json.js";
|
|
2
|
+
import { unmarshalMoney } from "../../../scw/custom-marshalling.js";
|
|
2
3
|
import { unmarshalDate, unmarshalArrayOfObject, resolveOneOf } from "../../../helpers/marshalling.js";
|
|
3
|
-
import "../../../vendor/base64/index.js";
|
|
4
4
|
const unmarshalScalewayLb = (data) => {
|
|
5
5
|
if (!isJSONObject(data)) {
|
|
6
6
|
throw new TypeError(
|
|
@@ -150,6 +150,23 @@ const unmarshalTLSStage = (data) => {
|
|
|
150
150
|
updatedAt: unmarshalDate(data.updated_at)
|
|
151
151
|
};
|
|
152
152
|
};
|
|
153
|
+
const unmarshalPipelineStages = (data) => {
|
|
154
|
+
if (!isJSONObject(data)) {
|
|
155
|
+
throw new TypeError(
|
|
156
|
+
`Unmarshalling the type 'PipelineStages' failed as data isn't a dictionary.`
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
return {
|
|
160
|
+
backendStages: unmarshalArrayOfObject(
|
|
161
|
+
data.backend_stages,
|
|
162
|
+
unmarshalBackendStage
|
|
163
|
+
),
|
|
164
|
+
cacheStages: unmarshalArrayOfObject(data.cache_stages, unmarshalCacheStage),
|
|
165
|
+
dnsStages: unmarshalArrayOfObject(data.dns_stages, unmarshalDNSStage),
|
|
166
|
+
pipeline: data.pipeline ? unmarshalPipeline(data.pipeline) : void 0,
|
|
167
|
+
tlsStages: unmarshalArrayOfObject(data.tls_stages, unmarshalTLSStage)
|
|
168
|
+
};
|
|
169
|
+
};
|
|
153
170
|
const unmarshalPurgeRequest = (data) => {
|
|
154
171
|
if (!isJSONObject(data)) {
|
|
155
172
|
throw new TypeError(
|
|
@@ -197,6 +214,35 @@ const unmarshalCheckPEMChainResponse = (data) => {
|
|
|
197
214
|
isValid: data.is_valid
|
|
198
215
|
};
|
|
199
216
|
};
|
|
217
|
+
const unmarshalPlanDetails = (data) => {
|
|
218
|
+
if (!isJSONObject(data)) {
|
|
219
|
+
throw new TypeError(
|
|
220
|
+
`Unmarshalling the type 'PlanDetails' failed as data isn't a dictionary.`
|
|
221
|
+
);
|
|
222
|
+
}
|
|
223
|
+
return {
|
|
224
|
+
packageGb: data.package_gb,
|
|
225
|
+
pipelineLimit: data.pipeline_limit,
|
|
226
|
+
planName: data.plan_name
|
|
227
|
+
};
|
|
228
|
+
};
|
|
229
|
+
const unmarshalGetBillingResponse = (data) => {
|
|
230
|
+
if (!isJSONObject(data)) {
|
|
231
|
+
throw new TypeError(
|
|
232
|
+
`Unmarshalling the type 'GetBillingResponse' failed as data isn't a dictionary.`
|
|
233
|
+
);
|
|
234
|
+
}
|
|
235
|
+
return {
|
|
236
|
+
currentPlan: data.current_plan ? unmarshalPlanDetails(data.current_plan) : void 0,
|
|
237
|
+
currentPlanCacheUsage: data.current_plan_cache_usage,
|
|
238
|
+
extraCacheCost: data.extra_cache_cost ? unmarshalMoney(data.extra_cache_cost) : void 0,
|
|
239
|
+
extraCacheUsage: data.extra_cache_usage,
|
|
240
|
+
extraPipelinesCost: data.extra_pipelines_cost ? unmarshalMoney(data.extra_pipelines_cost) : void 0,
|
|
241
|
+
pipelineNumber: data.pipeline_number,
|
|
242
|
+
planCost: data.plan_cost ? unmarshalMoney(data.plan_cost) : void 0,
|
|
243
|
+
totalCost: data.total_cost ? unmarshalMoney(data.total_cost) : void 0
|
|
244
|
+
};
|
|
245
|
+
};
|
|
200
246
|
const unmarshalListBackendStagesResponse = (data) => {
|
|
201
247
|
if (!isJSONObject(data)) {
|
|
202
248
|
throw new TypeError(
|
|
@@ -241,16 +287,15 @@ const unmarshalListPipelinesResponse = (data) => {
|
|
|
241
287
|
totalCount: data.total_count
|
|
242
288
|
};
|
|
243
289
|
};
|
|
244
|
-
const
|
|
290
|
+
const unmarshalListPipelinesWithStagesResponse = (data) => {
|
|
245
291
|
if (!isJSONObject(data)) {
|
|
246
292
|
throw new TypeError(
|
|
247
|
-
`Unmarshalling the type '
|
|
293
|
+
`Unmarshalling the type 'ListPipelinesWithStagesResponse' failed as data isn't a dictionary.`
|
|
248
294
|
);
|
|
249
295
|
}
|
|
250
296
|
return {
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
planName: data.plan_name
|
|
297
|
+
pipelines: unmarshalArrayOfObject(data.pipelines, unmarshalPipelineStages),
|
|
298
|
+
totalCount: data.total_count
|
|
254
299
|
};
|
|
255
300
|
};
|
|
256
301
|
const unmarshalListPlansResponse = (data) => {
|
|
@@ -460,14 +505,17 @@ export {
|
|
|
460
505
|
unmarshalCheckLbOriginResponse,
|
|
461
506
|
unmarshalCheckPEMChainResponse,
|
|
462
507
|
unmarshalDNSStage,
|
|
508
|
+
unmarshalGetBillingResponse,
|
|
463
509
|
unmarshalListBackendStagesResponse,
|
|
464
510
|
unmarshalListCacheStagesResponse,
|
|
465
511
|
unmarshalListDNSStagesResponse,
|
|
466
512
|
unmarshalListPipelinesResponse,
|
|
513
|
+
unmarshalListPipelinesWithStagesResponse,
|
|
467
514
|
unmarshalListPlansResponse,
|
|
468
515
|
unmarshalListPurgeRequestsResponse,
|
|
469
516
|
unmarshalListTLSStagesResponse,
|
|
470
517
|
unmarshalPipeline,
|
|
518
|
+
unmarshalPipelineStages,
|
|
471
519
|
unmarshalPlan,
|
|
472
520
|
unmarshalPurgeRequest,
|
|
473
521
|
unmarshalTLSStage
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import type { Region, Zone } from '../../../bridge';
|
|
1
|
+
import type { Money, Region, Zone } from '../../../bridge';
|
|
2
2
|
export type DNSStageType = 'unknown_type' | 'auto' | 'managed' | 'custom';
|
|
3
3
|
export type LbOriginError = 'unknown' | 'timeout' | 'connection_refused' | 'tls_error';
|
|
4
4
|
export type ListBackendStagesRequestOrderBy = 'created_at_asc' | 'created_at_desc';
|
|
5
5
|
export type ListCacheStagesRequestOrderBy = 'created_at_asc' | 'created_at_desc';
|
|
6
6
|
export type ListDNSStagesRequestOrderBy = 'created_at_asc' | 'created_at_desc';
|
|
7
7
|
export type ListPipelinesRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'name_asc' | 'name_desc';
|
|
8
|
+
export type ListPipelinesWithStagesRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'name_asc' | 'name_desc';
|
|
8
9
|
export type ListPurgeRequestsRequestOrderBy = 'created_at_asc' | 'created_at_desc';
|
|
9
10
|
export type ListTLSStagesRequestOrderBy = 'created_at_asc' | 'created_at_desc';
|
|
10
11
|
export type PipelineErrorCode = 'unknown_code' | 'dns_invalid_format' | 'dns_invalid_tld' | 'dns_forbidden_root_domain' | 'dns_forbidden_scw_cloud' | 'dns_domain_dont_exist' | 'dns_cname_dont_exist' | 'dns_cname_resolve' | 'dns_fqdn_already_exists' | 'dns_fqdn_already_in_use' | 'tls_cert_deleted' | 'tls_cert_disabled' | 'tls_cert_expired' | 'tls_cert_invalid_format' | 'tls_cert_missing' | 'tls_chain_order' | 'tls_key_invalid_format' | 'tls_key_missing' | 'tls_key_too_many' | 'tls_managed_domain_rate_limit' | 'tls_managed_internal' | 'tls_pair_mismatch' | 'tls_root_inconsistent' | 'tls_root_incorrect' | 'tls_root_missing' | 'tls_san_mismatch' | 'tls_self_signed';
|
|
@@ -201,10 +202,20 @@ export interface CheckPEMChainRequestSecretChain {
|
|
|
201
202
|
secretRegion: string;
|
|
202
203
|
}
|
|
203
204
|
export interface PlanDetails {
|
|
205
|
+
/** Subscription plan name. */
|
|
204
206
|
planName: PlanName;
|
|
207
|
+
/** Amount of egress data from cache included in subscription plan. */
|
|
205
208
|
packageGb: number;
|
|
209
|
+
/** Number of pipelines included in subscription plan. */
|
|
206
210
|
pipelineLimit: number;
|
|
207
211
|
}
|
|
212
|
+
export interface PipelineStages {
|
|
213
|
+
pipeline?: Pipeline;
|
|
214
|
+
dnsStages: DNSStage[];
|
|
215
|
+
tlsStages: TLSStage[];
|
|
216
|
+
cacheStages: CacheStage[];
|
|
217
|
+
backendStages: BackendStage[];
|
|
218
|
+
}
|
|
208
219
|
export interface PurgeRequest {
|
|
209
220
|
/** ID of the purge request. */
|
|
210
221
|
id: string;
|
|
@@ -401,6 +412,46 @@ export type GetBackendStageRequest = {
|
|
|
401
412
|
/** ID of the requested backend stage. */
|
|
402
413
|
backendStageId: string;
|
|
403
414
|
};
|
|
415
|
+
export type GetBillingRequest = {
|
|
416
|
+
projectId?: string;
|
|
417
|
+
};
|
|
418
|
+
export interface GetBillingResponse {
|
|
419
|
+
/**
|
|
420
|
+
* Information on the currently-selected, active Edge Services subscription
|
|
421
|
+
* plan.
|
|
422
|
+
*/
|
|
423
|
+
currentPlan?: PlanDetails;
|
|
424
|
+
/** Price of the current subscription plan. */
|
|
425
|
+
planCost?: Money;
|
|
426
|
+
/** Total number of pipelines currently configured. */
|
|
427
|
+
pipelineNumber: number;
|
|
428
|
+
/**
|
|
429
|
+
* Cost to date (this month) of pipelines not included in the subscription
|
|
430
|
+
* plan.
|
|
431
|
+
*/
|
|
432
|
+
extraPipelinesCost?: Money;
|
|
433
|
+
/**
|
|
434
|
+
* Total amount of data egressed from the cache (this month), included in the
|
|
435
|
+
* active subscription plan.
|
|
436
|
+
*/
|
|
437
|
+
currentPlanCacheUsage: number;
|
|
438
|
+
/**
|
|
439
|
+
* Total amount of data egressed from cache (this month), not included in the
|
|
440
|
+
* active subscription plan.
|
|
441
|
+
*/
|
|
442
|
+
extraCacheUsage: number;
|
|
443
|
+
/**
|
|
444
|
+
* Cost to date (this month) of the data egressed from the cache that is not
|
|
445
|
+
* included in the active subscription plan.
|
|
446
|
+
*/
|
|
447
|
+
extraCacheCost?: Money;
|
|
448
|
+
/**
|
|
449
|
+
* Total cost to date (this month) of all Edge Services resources including
|
|
450
|
+
* active subscription plan, previously active plans, extra pipelines and
|
|
451
|
+
* extra egress cache data.
|
|
452
|
+
*/
|
|
453
|
+
totalCost?: Money;
|
|
454
|
+
}
|
|
404
455
|
export type GetCacheStageRequest = {
|
|
405
456
|
/** ID of the requested cache stage. */
|
|
406
457
|
cacheStageId: string;
|
|
@@ -550,6 +601,18 @@ export interface ListPipelinesResponse {
|
|
|
550
601
|
/** Count of all pipelines matching the requested criteria. */
|
|
551
602
|
totalCount: number;
|
|
552
603
|
}
|
|
604
|
+
export type ListPipelinesWithStagesRequest = {
|
|
605
|
+
orderBy?: ListPipelinesWithStagesRequestOrderBy;
|
|
606
|
+
page?: number;
|
|
607
|
+
pageSize?: number;
|
|
608
|
+
name?: string;
|
|
609
|
+
organizationId?: string;
|
|
610
|
+
projectId?: string;
|
|
611
|
+
};
|
|
612
|
+
export interface ListPipelinesWithStagesResponse {
|
|
613
|
+
pipelines: PipelineStages[];
|
|
614
|
+
totalCount: number;
|
|
615
|
+
}
|
|
553
616
|
export interface ListPlansResponse {
|
|
554
617
|
totalCount: number;
|
|
555
618
|
plans: PlanDetails[];
|
|
@@ -33,9 +33,11 @@ const unmarshalAPIKey = (data) => {
|
|
|
33
33
|
createdAt: marshalling.unmarshalDate(data.created_at),
|
|
34
34
|
creationIp: data.creation_ip,
|
|
35
35
|
defaultProjectId: data.default_project_id,
|
|
36
|
+
deletable: data.deletable,
|
|
36
37
|
description: data.description,
|
|
37
38
|
editable: data.editable,
|
|
38
39
|
expiresAt: marshalling.unmarshalDate(data.expires_at),
|
|
40
|
+
managed: data.managed,
|
|
39
41
|
secretKey: data.secret_key,
|
|
40
42
|
updatedAt: marshalling.unmarshalDate(data.updated_at),
|
|
41
43
|
userId: data.user_id
|
|
@@ -49,9 +51,11 @@ const unmarshalApplication = (data) => {
|
|
|
49
51
|
}
|
|
50
52
|
return {
|
|
51
53
|
createdAt: marshalling.unmarshalDate(data.created_at),
|
|
54
|
+
deletable: data.deletable,
|
|
52
55
|
description: data.description,
|
|
53
56
|
editable: data.editable,
|
|
54
57
|
id: data.id,
|
|
58
|
+
managed: data.managed,
|
|
55
59
|
name: data.name,
|
|
56
60
|
nbApiKeys: data.nb_api_keys,
|
|
57
61
|
organizationId: data.organization_id,
|
|
@@ -68,8 +72,11 @@ const unmarshalGroup = (data) => {
|
|
|
68
72
|
return {
|
|
69
73
|
applicationIds: data.application_ids,
|
|
70
74
|
createdAt: marshalling.unmarshalDate(data.created_at),
|
|
75
|
+
deletable: data.deletable,
|
|
71
76
|
description: data.description,
|
|
77
|
+
editable: data.editable,
|
|
72
78
|
id: data.id,
|
|
79
|
+
managed: data.managed,
|
|
73
80
|
name: data.name,
|
|
74
81
|
organizationId: data.organization_id,
|
|
75
82
|
tags: data.tags,
|
|
@@ -104,10 +111,12 @@ const unmarshalPolicy = (data) => {
|
|
|
104
111
|
return {
|
|
105
112
|
applicationId: data.application_id,
|
|
106
113
|
createdAt: marshalling.unmarshalDate(data.created_at),
|
|
114
|
+
deletable: data.deletable,
|
|
107
115
|
description: data.description,
|
|
108
116
|
editable: data.editable,
|
|
109
117
|
groupId: data.group_id,
|
|
110
118
|
id: data.id,
|
|
119
|
+
managed: data.managed,
|
|
111
120
|
name: data.name,
|
|
112
121
|
nbPermissionSets: data.nb_permission_sets,
|
|
113
122
|
nbRules: data.nb_rules,
|