@scaleway/sdk 2.47.0 → 2.48.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/baremetal/v1/api.gen.cjs +33 -0
- package/dist/api/baremetal/v1/api.gen.d.ts +17 -1
- package/dist/api/baremetal/v1/api.gen.js +34 -1
- package/dist/api/baremetal/v1/index.gen.d.ts +1 -1
- package/dist/api/baremetal/v1/marshalling.gen.cjs +200 -0
- package/dist/api/baremetal/v1/marshalling.gen.d.ts +4 -1
- package/dist/api/baremetal/v1/marshalling.gen.js +200 -0
- package/dist/api/baremetal/v1/types.gen.d.ts +74 -0
- package/dist/api/billing/v2alpha1/marshalling.gen.cjs +1 -0
- package/dist/api/billing/v2alpha1/marshalling.gen.js +1 -0
- package/dist/api/billing/v2alpha1/types.gen.d.ts +2 -0
- package/dist/api/billing/v2beta1/marshalling.gen.cjs +1 -0
- package/dist/api/billing/v2beta1/marshalling.gen.js +1 -0
- package/dist/api/billing/v2beta1/types.gen.d.ts +2 -0
- package/dist/api/edge_services/v1alpha1/api.gen.cjs +37 -0
- package/dist/api/edge_services/v1alpha1/api.gen.d.ts +5 -1
- package/dist/api/edge_services/v1alpha1/api.gen.js +38 -1
- package/dist/api/edge_services/v1alpha1/index.gen.d.ts +1 -1
- package/dist/api/edge_services/v1alpha1/marshalling.gen.cjs +56 -16
- package/dist/api/edge_services/v1alpha1/marshalling.gen.d.ts +5 -2
- package/dist/api/edge_services/v1alpha1/marshalling.gen.js +56 -16
- package/dist/api/edge_services/v1alpha1/types.gen.d.ts +51 -28
- package/dist/api/k8s/v1/marshalling.gen.cjs +1 -0
- package/dist/api/k8s/v1/marshalling.gen.js +1 -0
- package/dist/api/k8s/v1/types.gen.d.ts +2 -0
- package/dist/api/k8s/v1/validation-rules.gen.cjs +2 -4
- package/dist/api/k8s/v1/validation-rules.gen.d.ts +0 -2
- package/dist/api/k8s/v1/validation-rules.gen.js +2 -4
- 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
|
@@ -7,6 +7,11 @@ export type ListServersRequestOrderBy = 'created_at_asc' | 'created_at_desc';
|
|
|
7
7
|
export type ListSettingsRequestOrderBy = 'created_at_asc' | 'created_at_desc';
|
|
8
8
|
export type OfferStock = 'empty' | 'low' | 'available';
|
|
9
9
|
export type OfferSubscriptionPeriod = 'unknown_subscription_period' | 'hourly' | 'monthly';
|
|
10
|
+
export type SchemaFilesystemFormat = 'unknown_format' | 'fat32' | 'ext4' | 'swap' | 'zfs';
|
|
11
|
+
export type SchemaLogicalVolumeType = 'unknown_raid_type' | 'striped' | 'mirror' | 'raid0' | 'raid1' | 'raid5' | 'raid6' | 'raid10';
|
|
12
|
+
export type SchemaPartitionLabel = 'unknown_partition_label' | 'uefi' | 'legacy' | 'root' | 'boot' | 'swap' | 'data' | 'home' | 'raid' | 'lvm' | 'zfs';
|
|
13
|
+
export type SchemaPoolType = 'unknown_type' | 'no_raid' | 'mirror' | 'raidz1' | 'raidz2';
|
|
14
|
+
export type SchemaRAIDLevel = 'unknown_raid_level' | 'raid_level_0' | 'raid_level_1' | 'raid_level_5' | 'raid_level_6' | 'raid_level_10';
|
|
10
15
|
export type ServerBootType = 'unknown_boot_type' | 'normal' | 'rescue';
|
|
11
16
|
export type ServerInstallStatus = 'unknown' | 'to_install' | 'installing' | 'completed' | 'error';
|
|
12
17
|
export type ServerOptionOptionStatus = 'option_status_unknown' | 'option_status_enable' | 'option_status_enabling' | 'option_status_disabling' | 'option_status_error';
|
|
@@ -14,6 +19,50 @@ export type ServerPingStatus = 'ping_status_unknown' | 'ping_status_up' | 'ping_
|
|
|
14
19
|
export type ServerPrivateNetworkStatus = 'unknown' | 'attaching' | 'attached' | 'error' | 'detaching' | 'locked';
|
|
15
20
|
export type ServerStatus = 'unknown' | 'delivering' | 'ready' | 'stopping' | 'stopped' | 'starting' | 'error' | 'deleting' | 'locked' | 'out_of_stock' | 'ordered' | 'resetting';
|
|
16
21
|
export type SettingType = 'unknown' | 'smtp';
|
|
22
|
+
export interface SchemaLogicalVolume {
|
|
23
|
+
name: string;
|
|
24
|
+
type: SchemaLogicalVolumeType;
|
|
25
|
+
size: number;
|
|
26
|
+
stripedNumber: number;
|
|
27
|
+
mirrorNumber: number;
|
|
28
|
+
}
|
|
29
|
+
export interface SchemaPartition {
|
|
30
|
+
label: SchemaPartitionLabel;
|
|
31
|
+
number: number;
|
|
32
|
+
size: number;
|
|
33
|
+
}
|
|
34
|
+
export interface SchemaVolumeGroup {
|
|
35
|
+
volumeGroupName: string;
|
|
36
|
+
physicalVolumes: string[];
|
|
37
|
+
logicalVolumes: SchemaLogicalVolume[];
|
|
38
|
+
}
|
|
39
|
+
export interface SchemaPool {
|
|
40
|
+
name: string;
|
|
41
|
+
type: SchemaPoolType;
|
|
42
|
+
devices: string[];
|
|
43
|
+
options: string[];
|
|
44
|
+
filesystemOptions: string[];
|
|
45
|
+
}
|
|
46
|
+
export interface SchemaDisk {
|
|
47
|
+
device: string;
|
|
48
|
+
partitions: SchemaPartition[];
|
|
49
|
+
}
|
|
50
|
+
export interface SchemaFilesystem {
|
|
51
|
+
device: string;
|
|
52
|
+
format: SchemaFilesystemFormat;
|
|
53
|
+
mountpoint: string;
|
|
54
|
+
}
|
|
55
|
+
export interface SchemaLVM {
|
|
56
|
+
volumeGroups: SchemaVolumeGroup[];
|
|
57
|
+
}
|
|
58
|
+
export interface SchemaRAID {
|
|
59
|
+
name: string;
|
|
60
|
+
level: SchemaRAIDLevel;
|
|
61
|
+
devices: string[];
|
|
62
|
+
}
|
|
63
|
+
export interface SchemaZFS {
|
|
64
|
+
pools: SchemaPool[];
|
|
65
|
+
}
|
|
17
66
|
export interface CertificationOption {
|
|
18
67
|
}
|
|
19
68
|
export interface LicenseOption {
|
|
@@ -26,6 +75,13 @@ export interface PublicBandwidthOption {
|
|
|
26
75
|
}
|
|
27
76
|
export interface RemoteAccessOption {
|
|
28
77
|
}
|
|
78
|
+
export interface Schema {
|
|
79
|
+
disks: SchemaDisk[];
|
|
80
|
+
raids: SchemaRAID[];
|
|
81
|
+
filesystems: SchemaFilesystem[];
|
|
82
|
+
lvm?: SchemaLVM;
|
|
83
|
+
zfs?: SchemaZFS;
|
|
84
|
+
}
|
|
29
85
|
export interface OSOSField {
|
|
30
86
|
editable: boolean;
|
|
31
87
|
required: boolean;
|
|
@@ -518,6 +574,14 @@ export type GetBMCAccessRequest = {
|
|
|
518
574
|
/** ID of the server. */
|
|
519
575
|
serverId: string;
|
|
520
576
|
};
|
|
577
|
+
export type GetDefaultPartitioningSchemaRequest = {
|
|
578
|
+
/** Zone to target. If none is passed will use default zone from the config. */
|
|
579
|
+
zone?: Zone;
|
|
580
|
+
/** ID of the offer. */
|
|
581
|
+
offerId: string;
|
|
582
|
+
/** ID of the OS. */
|
|
583
|
+
osId: string;
|
|
584
|
+
};
|
|
521
585
|
export type GetOSRequest = {
|
|
522
586
|
/** Zone to target. If none is passed will use default zone from the config. */
|
|
523
587
|
zone?: Zone;
|
|
@@ -806,3 +870,13 @@ export type UpdateSettingRequest = {
|
|
|
806
870
|
/** Defines whether the setting is enabled. */
|
|
807
871
|
enabled?: boolean;
|
|
808
872
|
};
|
|
873
|
+
export type ValidatePartitioningSchemaRequest = {
|
|
874
|
+
/** Zone to target. If none is passed will use default zone from the config. */
|
|
875
|
+
zone?: Zone;
|
|
876
|
+
/** Partitioning schema. */
|
|
877
|
+
partitioningSchema?: Schema;
|
|
878
|
+
/** Offer ID of the server. */
|
|
879
|
+
offerId: string;
|
|
880
|
+
/** OS ID. */
|
|
881
|
+
osId: string;
|
|
882
|
+
};
|
|
@@ -14,6 +14,8 @@ export interface DiscountFilter {
|
|
|
14
14
|
type: DiscountFilterType;
|
|
15
15
|
/** Value of filter, it can be a product/range/region/zone value. */
|
|
16
16
|
value: string;
|
|
17
|
+
/** Boolean to describe if filter is an excluding filter. */
|
|
18
|
+
exclude: boolean;
|
|
17
19
|
}
|
|
18
20
|
export interface GetConsumptionResponseConsumption {
|
|
19
21
|
/** Monetary value of the consumption. */
|
|
@@ -21,6 +21,8 @@ export interface DiscountFilter {
|
|
|
21
21
|
type: DiscountFilterType;
|
|
22
22
|
/** Value of filter. */
|
|
23
23
|
value: string;
|
|
24
|
+
/** Boolean to describe if filter is an excluding filter. */
|
|
25
|
+
exclude: boolean;
|
|
24
26
|
}
|
|
25
27
|
export interface ListConsumptionsResponseConsumption {
|
|
26
28
|
/** Monetary value of the consumption. */
|
|
@@ -595,5 +595,42 @@ class API extends api.API {
|
|
|
595
595
|
},
|
|
596
596
|
marshalling_gen.unmarshalCheckLbOriginResponse
|
|
597
597
|
);
|
|
598
|
+
listPlans = () => this.client.fetch(
|
|
599
|
+
{
|
|
600
|
+
method: "GET",
|
|
601
|
+
path: `/edge-services/v1alpha1/plans`
|
|
602
|
+
},
|
|
603
|
+
marshalling_gen.unmarshalListPlansResponse
|
|
604
|
+
);
|
|
605
|
+
selectPlan = (request = {}) => this.client.fetch(
|
|
606
|
+
{
|
|
607
|
+
body: JSON.stringify(
|
|
608
|
+
marshalling_gen.marshalSelectPlanRequest(request, this.client.settings)
|
|
609
|
+
),
|
|
610
|
+
headers: jsonContentHeaders,
|
|
611
|
+
method: "PATCH",
|
|
612
|
+
path: `/edge-services/v1alpha1/current-plan`
|
|
613
|
+
},
|
|
614
|
+
marshalling_gen.unmarshalPlan
|
|
615
|
+
);
|
|
616
|
+
getCurrentPlan = (request = {}) => this.client.fetch(
|
|
617
|
+
{
|
|
618
|
+
method: "GET",
|
|
619
|
+
path: `/edge-services/v1alpha1/current-plan`,
|
|
620
|
+
urlParams: marshalling.urlParams([
|
|
621
|
+
"project_id",
|
|
622
|
+
request.projectId ?? this.client.settings.defaultProjectId
|
|
623
|
+
])
|
|
624
|
+
},
|
|
625
|
+
marshalling_gen.unmarshalPlan
|
|
626
|
+
);
|
|
627
|
+
deleteCurrentPlan = (request = {}) => this.client.fetch({
|
|
628
|
+
method: "DELETE",
|
|
629
|
+
path: `/edge-services/v1alpha1/current-plan`,
|
|
630
|
+
urlParams: marshalling.urlParams([
|
|
631
|
+
"project_id",
|
|
632
|
+
request.projectId ?? this.client.settings.defaultProjectId
|
|
633
|
+
])
|
|
634
|
+
});
|
|
598
635
|
}
|
|
599
636
|
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, DeleteDNSStageRequest, DeletePipelineRequest, DeleteTLSStageRequest, GetBackendStageRequest, GetCacheStageRequest, GetDNSStageRequest, GetPipelineRequest, GetPurgeRequestRequest, GetTLSStageRequest, ListBackendStagesRequest, ListBackendStagesResponse, ListCacheStagesRequest, ListCacheStagesResponse, ListDNSStagesRequest, ListDNSStagesResponse, ListPipelinesRequest, ListPipelinesResponse, ListPurgeRequestsRequest, ListPurgeRequestsResponse, ListTLSStagesRequest, ListTLSStagesResponse, Pipeline, PurgeRequest, 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, 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';
|
|
4
4
|
/** Edge Services API. */
|
|
5
5
|
export declare class API extends ParentAPI {
|
|
6
6
|
protected pageOfListPipelines: (request?: Readonly<ListPipelinesRequest>) => Promise<ListPipelinesResponse>;
|
|
@@ -297,4 +297,8 @@ export declare class API extends ParentAPI {
|
|
|
297
297
|
*/
|
|
298
298
|
waitForPurgeRequest: (request: Readonly<GetPurgeRequestRequest>, options?: Readonly<WaitForOptions<PurgeRequest>>) => Promise<PurgeRequest>;
|
|
299
299
|
checkLbOrigin: (request?: Readonly<CheckLbOriginRequest>) => Promise<CheckLbOriginResponse>;
|
|
300
|
+
listPlans: () => Promise<ListPlansResponse>;
|
|
301
|
+
selectPlan: (request?: Readonly<SelectPlanRequest>) => Promise<Plan>;
|
|
302
|
+
getCurrentPlan: (request?: Readonly<GetCurrentPlanRequest>) => Promise<Plan>;
|
|
303
|
+
deleteCurrentPlan: (request?: Readonly<DeleteCurrentPlanRequest>) => Promise<void>;
|
|
300
304
|
}
|
|
@@ -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 } from "./marshalling.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";
|
|
8
8
|
const jsonContentHeaders = {
|
|
9
9
|
"Content-Type": "application/json; charset=utf-8"
|
|
10
10
|
};
|
|
@@ -593,6 +593,43 @@ class API extends API$1 {
|
|
|
593
593
|
},
|
|
594
594
|
unmarshalCheckLbOriginResponse
|
|
595
595
|
);
|
|
596
|
+
listPlans = () => this.client.fetch(
|
|
597
|
+
{
|
|
598
|
+
method: "GET",
|
|
599
|
+
path: `/edge-services/v1alpha1/plans`
|
|
600
|
+
},
|
|
601
|
+
unmarshalListPlansResponse
|
|
602
|
+
);
|
|
603
|
+
selectPlan = (request = {}) => this.client.fetch(
|
|
604
|
+
{
|
|
605
|
+
body: JSON.stringify(
|
|
606
|
+
marshalSelectPlanRequest(request, this.client.settings)
|
|
607
|
+
),
|
|
608
|
+
headers: jsonContentHeaders,
|
|
609
|
+
method: "PATCH",
|
|
610
|
+
path: `/edge-services/v1alpha1/current-plan`
|
|
611
|
+
},
|
|
612
|
+
unmarshalPlan
|
|
613
|
+
);
|
|
614
|
+
getCurrentPlan = (request = {}) => this.client.fetch(
|
|
615
|
+
{
|
|
616
|
+
method: "GET",
|
|
617
|
+
path: `/edge-services/v1alpha1/current-plan`,
|
|
618
|
+
urlParams: urlParams([
|
|
619
|
+
"project_id",
|
|
620
|
+
request.projectId ?? this.client.settings.defaultProjectId
|
|
621
|
+
])
|
|
622
|
+
},
|
|
623
|
+
unmarshalPlan
|
|
624
|
+
);
|
|
625
|
+
deleteCurrentPlan = (request = {}) => this.client.fetch({
|
|
626
|
+
method: "DELETE",
|
|
627
|
+
path: `/edge-services/v1alpha1/current-plan`,
|
|
628
|
+
urlParams: urlParams([
|
|
629
|
+
"project_id",
|
|
630
|
+
request.projectId ?? this.client.settings.defaultProjectId
|
|
631
|
+
])
|
|
632
|
+
});
|
|
596
633
|
}
|
|
597
634
|
export {
|
|
598
635
|
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, DeleteDNSStageRequest, DeletePipelineRequest, DeleteTLSStageRequest, GetBackendStageRequest, GetCacheStageRequest, GetDNSStageRequest, GetPipelineRequest, GetPurgeRequestRequest, GetTLSStageRequest, LbOriginError, ListBackendStagesRequest, ListBackendStagesRequestOrderBy, ListBackendStagesResponse, ListCacheStagesRequest, ListCacheStagesRequestOrderBy, ListCacheStagesResponse, ListDNSStagesRequest, ListDNSStagesRequestOrderBy, ListDNSStagesResponse, ListPipelinesRequest, ListPipelinesRequestOrderBy, ListPipelinesResponse, ListPurgeRequestsRequest, ListPurgeRequestsRequestOrderBy, ListPurgeRequestsResponse, ListTLSStagesRequest, ListTLSStagesRequestOrderBy, ListTLSStagesResponse, Pipeline, PipelineError, PipelineErrorCode, PipelineErrorSeverity, PipelineErrorStage, PipelineErrorType, PipelineStatus, PurgeRequest, PurgeRequestStatus, ScalewayLb, ScalewayLbBackendConfig, ScalewayS3BackendConfig, 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, 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';
|
|
@@ -122,22 +122,6 @@ const unmarshalPipeline = (data) => {
|
|
|
122
122
|
updatedAt: marshalling.unmarshalDate(data.updated_at)
|
|
123
123
|
};
|
|
124
124
|
};
|
|
125
|
-
const unmarshalPurgeRequest = (data) => {
|
|
126
|
-
if (!json.isJSONObject(data)) {
|
|
127
|
-
throw new TypeError(
|
|
128
|
-
`Unmarshalling the type 'PurgeRequest' failed as data isn't a dictionary.`
|
|
129
|
-
);
|
|
130
|
-
}
|
|
131
|
-
return {
|
|
132
|
-
all: data.all,
|
|
133
|
-
assets: data.assets,
|
|
134
|
-
createdAt: marshalling.unmarshalDate(data.created_at),
|
|
135
|
-
id: data.id,
|
|
136
|
-
pipelineId: data.pipeline_id,
|
|
137
|
-
status: data.status,
|
|
138
|
-
updatedAt: marshalling.unmarshalDate(data.updated_at)
|
|
139
|
-
};
|
|
140
|
-
};
|
|
141
125
|
const unmarshalTLSSecret = (data) => {
|
|
142
126
|
if (!json.isJSONObject(data)) {
|
|
143
127
|
throw new TypeError(
|
|
@@ -168,6 +152,22 @@ const unmarshalTLSStage = (data) => {
|
|
|
168
152
|
updatedAt: marshalling.unmarshalDate(data.updated_at)
|
|
169
153
|
};
|
|
170
154
|
};
|
|
155
|
+
const unmarshalPurgeRequest = (data) => {
|
|
156
|
+
if (!json.isJSONObject(data)) {
|
|
157
|
+
throw new TypeError(
|
|
158
|
+
`Unmarshalling the type 'PurgeRequest' failed as data isn't a dictionary.`
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
return {
|
|
162
|
+
all: data.all,
|
|
163
|
+
assets: data.assets,
|
|
164
|
+
createdAt: marshalling.unmarshalDate(data.created_at),
|
|
165
|
+
id: data.id,
|
|
166
|
+
pipelineId: data.pipeline_id,
|
|
167
|
+
status: data.status,
|
|
168
|
+
updatedAt: marshalling.unmarshalDate(data.updated_at)
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
171
|
const unmarshalCheckDomainResponse = (data) => {
|
|
172
172
|
if (!json.isJSONObject(data)) {
|
|
173
173
|
throw new TypeError(
|
|
@@ -243,6 +243,29 @@ const unmarshalListPipelinesResponse = (data) => {
|
|
|
243
243
|
totalCount: data.total_count
|
|
244
244
|
};
|
|
245
245
|
};
|
|
246
|
+
const unmarshalPlanDetails = (data) => {
|
|
247
|
+
if (!json.isJSONObject(data)) {
|
|
248
|
+
throw new TypeError(
|
|
249
|
+
`Unmarshalling the type 'PlanDetails' failed as data isn't a dictionary.`
|
|
250
|
+
);
|
|
251
|
+
}
|
|
252
|
+
return {
|
|
253
|
+
packageGb: data.package_gb,
|
|
254
|
+
pipelineLimit: data.pipeline_limit,
|
|
255
|
+
planName: data.plan_name
|
|
256
|
+
};
|
|
257
|
+
};
|
|
258
|
+
const unmarshalListPlansResponse = (data) => {
|
|
259
|
+
if (!json.isJSONObject(data)) {
|
|
260
|
+
throw new TypeError(
|
|
261
|
+
`Unmarshalling the type 'ListPlansResponse' failed as data isn't a dictionary.`
|
|
262
|
+
);
|
|
263
|
+
}
|
|
264
|
+
return {
|
|
265
|
+
plans: marshalling.unmarshalArrayOfObject(data.plans, unmarshalPlanDetails),
|
|
266
|
+
totalCount: data.total_count
|
|
267
|
+
};
|
|
268
|
+
};
|
|
246
269
|
const unmarshalListPurgeRequestsResponse = (data) => {
|
|
247
270
|
if (!json.isJSONObject(data)) {
|
|
248
271
|
throw new TypeError(
|
|
@@ -268,6 +291,16 @@ const unmarshalListTLSStagesResponse = (data) => {
|
|
|
268
291
|
totalCount: data.total_count
|
|
269
292
|
};
|
|
270
293
|
};
|
|
294
|
+
const unmarshalPlan = (data) => {
|
|
295
|
+
if (!json.isJSONObject(data)) {
|
|
296
|
+
throw new TypeError(
|
|
297
|
+
`Unmarshalling the type 'Plan' failed as data isn't a dictionary.`
|
|
298
|
+
);
|
|
299
|
+
}
|
|
300
|
+
return {
|
|
301
|
+
planName: data.plan_name
|
|
302
|
+
};
|
|
303
|
+
};
|
|
271
304
|
const marshalCheckDomainRequest = (request, defaults) => ({
|
|
272
305
|
cname: request.cname,
|
|
273
306
|
fqdn: request.fqdn,
|
|
@@ -361,6 +394,10 @@ const marshalCreateTLSStageRequest = (request, defaults) => ({
|
|
|
361
394
|
{ param: "backend_stage_id", value: request.backendStageId }
|
|
362
395
|
])
|
|
363
396
|
});
|
|
397
|
+
const marshalSelectPlanRequest = (request, defaults) => ({
|
|
398
|
+
plan_name: request.planName,
|
|
399
|
+
project_id: request.projectId ?? defaults.defaultProjectId
|
|
400
|
+
});
|
|
364
401
|
const marshalUpdateBackendStageRequest = (request, defaults) => ({
|
|
365
402
|
...marshalling.resolveOneOf([
|
|
366
403
|
{
|
|
@@ -412,6 +449,7 @@ exports.marshalCreateDNSStageRequest = marshalCreateDNSStageRequest;
|
|
|
412
449
|
exports.marshalCreatePipelineRequest = marshalCreatePipelineRequest;
|
|
413
450
|
exports.marshalCreatePurgeRequestRequest = marshalCreatePurgeRequestRequest;
|
|
414
451
|
exports.marshalCreateTLSStageRequest = marshalCreateTLSStageRequest;
|
|
452
|
+
exports.marshalSelectPlanRequest = marshalSelectPlanRequest;
|
|
415
453
|
exports.marshalUpdateBackendStageRequest = marshalUpdateBackendStageRequest;
|
|
416
454
|
exports.marshalUpdateCacheStageRequest = marshalUpdateCacheStageRequest;
|
|
417
455
|
exports.marshalUpdateDNSStageRequest = marshalUpdateDNSStageRequest;
|
|
@@ -427,8 +465,10 @@ exports.unmarshalListBackendStagesResponse = unmarshalListBackendStagesResponse;
|
|
|
427
465
|
exports.unmarshalListCacheStagesResponse = unmarshalListCacheStagesResponse;
|
|
428
466
|
exports.unmarshalListDNSStagesResponse = unmarshalListDNSStagesResponse;
|
|
429
467
|
exports.unmarshalListPipelinesResponse = unmarshalListPipelinesResponse;
|
|
468
|
+
exports.unmarshalListPlansResponse = unmarshalListPlansResponse;
|
|
430
469
|
exports.unmarshalListPurgeRequestsResponse = unmarshalListPurgeRequestsResponse;
|
|
431
470
|
exports.unmarshalListTLSStagesResponse = unmarshalListTLSStagesResponse;
|
|
432
471
|
exports.unmarshalPipeline = unmarshalPipeline;
|
|
472
|
+
exports.unmarshalPlan = unmarshalPlan;
|
|
433
473
|
exports.unmarshalPurgeRequest = unmarshalPurgeRequest;
|
|
434
474
|
exports.unmarshalTLSStage = unmarshalTLSStage;
|
|
@@ -1,11 +1,11 @@
|
|
|
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, ListPurgeRequestsResponse, ListTLSStagesResponse, Pipeline, PurgeRequest, 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, ListBackendStagesResponse, ListCacheStagesResponse, ListDNSStagesResponse, ListPipelinesResponse, ListPlansResponse, ListPurgeRequestsResponse, ListTLSStagesResponse, Pipeline, 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
|
-
export declare const unmarshalPurgeRequest: (data: unknown) => PurgeRequest;
|
|
8
7
|
export declare const unmarshalTLSStage: (data: unknown) => TLSStage;
|
|
8
|
+
export declare const unmarshalPurgeRequest: (data: unknown) => PurgeRequest;
|
|
9
9
|
export declare const unmarshalCheckDomainResponse: (data: unknown) => CheckDomainResponse;
|
|
10
10
|
export declare const unmarshalCheckLbOriginResponse: (data: unknown) => CheckLbOriginResponse;
|
|
11
11
|
export declare const unmarshalCheckPEMChainResponse: (data: unknown) => CheckPEMChainResponse;
|
|
@@ -13,8 +13,10 @@ export declare const unmarshalListBackendStagesResponse: (data: unknown) => List
|
|
|
13
13
|
export declare const unmarshalListCacheStagesResponse: (data: unknown) => ListCacheStagesResponse;
|
|
14
14
|
export declare const unmarshalListDNSStagesResponse: (data: unknown) => ListDNSStagesResponse;
|
|
15
15
|
export declare const unmarshalListPipelinesResponse: (data: unknown) => ListPipelinesResponse;
|
|
16
|
+
export declare const unmarshalListPlansResponse: (data: unknown) => ListPlansResponse;
|
|
16
17
|
export declare const unmarshalListPurgeRequestsResponse: (data: unknown) => ListPurgeRequestsResponse;
|
|
17
18
|
export declare const unmarshalListTLSStagesResponse: (data: unknown) => ListTLSStagesResponse;
|
|
19
|
+
export declare const unmarshalPlan: (data: unknown) => Plan;
|
|
18
20
|
export declare const marshalCheckDomainRequest: (request: CheckDomainRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
19
21
|
export declare const marshalCheckLbOriginRequest: (request: CheckLbOriginRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
20
22
|
export declare const marshalCheckPEMChainRequest: (request: CheckPEMChainRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
@@ -24,6 +26,7 @@ export declare const marshalCreateDNSStageRequest: (request: CreateDNSStageReque
|
|
|
24
26
|
export declare const marshalCreatePipelineRequest: (request: CreatePipelineRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
25
27
|
export declare const marshalCreatePurgeRequestRequest: (request: CreatePurgeRequestRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
26
28
|
export declare const marshalCreateTLSStageRequest: (request: CreateTLSStageRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
29
|
+
export declare const marshalSelectPlanRequest: (request: SelectPlanRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
27
30
|
export declare const marshalUpdateBackendStageRequest: (request: UpdateBackendStageRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
28
31
|
export declare const marshalUpdateCacheStageRequest: (request: UpdateCacheStageRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
29
32
|
export declare const marshalUpdateDNSStageRequest: (request: UpdateDNSStageRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
@@ -120,22 +120,6 @@ const unmarshalPipeline = (data) => {
|
|
|
120
120
|
updatedAt: unmarshalDate(data.updated_at)
|
|
121
121
|
};
|
|
122
122
|
};
|
|
123
|
-
const unmarshalPurgeRequest = (data) => {
|
|
124
|
-
if (!isJSONObject(data)) {
|
|
125
|
-
throw new TypeError(
|
|
126
|
-
`Unmarshalling the type 'PurgeRequest' failed as data isn't a dictionary.`
|
|
127
|
-
);
|
|
128
|
-
}
|
|
129
|
-
return {
|
|
130
|
-
all: data.all,
|
|
131
|
-
assets: data.assets,
|
|
132
|
-
createdAt: unmarshalDate(data.created_at),
|
|
133
|
-
id: data.id,
|
|
134
|
-
pipelineId: data.pipeline_id,
|
|
135
|
-
status: data.status,
|
|
136
|
-
updatedAt: unmarshalDate(data.updated_at)
|
|
137
|
-
};
|
|
138
|
-
};
|
|
139
123
|
const unmarshalTLSSecret = (data) => {
|
|
140
124
|
if (!isJSONObject(data)) {
|
|
141
125
|
throw new TypeError(
|
|
@@ -166,6 +150,22 @@ const unmarshalTLSStage = (data) => {
|
|
|
166
150
|
updatedAt: unmarshalDate(data.updated_at)
|
|
167
151
|
};
|
|
168
152
|
};
|
|
153
|
+
const unmarshalPurgeRequest = (data) => {
|
|
154
|
+
if (!isJSONObject(data)) {
|
|
155
|
+
throw new TypeError(
|
|
156
|
+
`Unmarshalling the type 'PurgeRequest' failed as data isn't a dictionary.`
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
return {
|
|
160
|
+
all: data.all,
|
|
161
|
+
assets: data.assets,
|
|
162
|
+
createdAt: unmarshalDate(data.created_at),
|
|
163
|
+
id: data.id,
|
|
164
|
+
pipelineId: data.pipeline_id,
|
|
165
|
+
status: data.status,
|
|
166
|
+
updatedAt: unmarshalDate(data.updated_at)
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
169
|
const unmarshalCheckDomainResponse = (data) => {
|
|
170
170
|
if (!isJSONObject(data)) {
|
|
171
171
|
throw new TypeError(
|
|
@@ -241,6 +241,29 @@ const unmarshalListPipelinesResponse = (data) => {
|
|
|
241
241
|
totalCount: data.total_count
|
|
242
242
|
};
|
|
243
243
|
};
|
|
244
|
+
const unmarshalPlanDetails = (data) => {
|
|
245
|
+
if (!isJSONObject(data)) {
|
|
246
|
+
throw new TypeError(
|
|
247
|
+
`Unmarshalling the type 'PlanDetails' failed as data isn't a dictionary.`
|
|
248
|
+
);
|
|
249
|
+
}
|
|
250
|
+
return {
|
|
251
|
+
packageGb: data.package_gb,
|
|
252
|
+
pipelineLimit: data.pipeline_limit,
|
|
253
|
+
planName: data.plan_name
|
|
254
|
+
};
|
|
255
|
+
};
|
|
256
|
+
const unmarshalListPlansResponse = (data) => {
|
|
257
|
+
if (!isJSONObject(data)) {
|
|
258
|
+
throw new TypeError(
|
|
259
|
+
`Unmarshalling the type 'ListPlansResponse' failed as data isn't a dictionary.`
|
|
260
|
+
);
|
|
261
|
+
}
|
|
262
|
+
return {
|
|
263
|
+
plans: unmarshalArrayOfObject(data.plans, unmarshalPlanDetails),
|
|
264
|
+
totalCount: data.total_count
|
|
265
|
+
};
|
|
266
|
+
};
|
|
244
267
|
const unmarshalListPurgeRequestsResponse = (data) => {
|
|
245
268
|
if (!isJSONObject(data)) {
|
|
246
269
|
throw new TypeError(
|
|
@@ -266,6 +289,16 @@ const unmarshalListTLSStagesResponse = (data) => {
|
|
|
266
289
|
totalCount: data.total_count
|
|
267
290
|
};
|
|
268
291
|
};
|
|
292
|
+
const unmarshalPlan = (data) => {
|
|
293
|
+
if (!isJSONObject(data)) {
|
|
294
|
+
throw new TypeError(
|
|
295
|
+
`Unmarshalling the type 'Plan' failed as data isn't a dictionary.`
|
|
296
|
+
);
|
|
297
|
+
}
|
|
298
|
+
return {
|
|
299
|
+
planName: data.plan_name
|
|
300
|
+
};
|
|
301
|
+
};
|
|
269
302
|
const marshalCheckDomainRequest = (request, defaults) => ({
|
|
270
303
|
cname: request.cname,
|
|
271
304
|
fqdn: request.fqdn,
|
|
@@ -359,6 +392,10 @@ const marshalCreateTLSStageRequest = (request, defaults) => ({
|
|
|
359
392
|
{ param: "backend_stage_id", value: request.backendStageId }
|
|
360
393
|
])
|
|
361
394
|
});
|
|
395
|
+
const marshalSelectPlanRequest = (request, defaults) => ({
|
|
396
|
+
plan_name: request.planName,
|
|
397
|
+
project_id: request.projectId ?? defaults.defaultProjectId
|
|
398
|
+
});
|
|
362
399
|
const marshalUpdateBackendStageRequest = (request, defaults) => ({
|
|
363
400
|
...resolveOneOf([
|
|
364
401
|
{
|
|
@@ -411,6 +448,7 @@ export {
|
|
|
411
448
|
marshalCreatePipelineRequest,
|
|
412
449
|
marshalCreatePurgeRequestRequest,
|
|
413
450
|
marshalCreateTLSStageRequest,
|
|
451
|
+
marshalSelectPlanRequest,
|
|
414
452
|
marshalUpdateBackendStageRequest,
|
|
415
453
|
marshalUpdateCacheStageRequest,
|
|
416
454
|
marshalUpdateDNSStageRequest,
|
|
@@ -426,9 +464,11 @@ export {
|
|
|
426
464
|
unmarshalListCacheStagesResponse,
|
|
427
465
|
unmarshalListDNSStagesResponse,
|
|
428
466
|
unmarshalListPipelinesResponse,
|
|
467
|
+
unmarshalListPlansResponse,
|
|
429
468
|
unmarshalListPurgeRequestsResponse,
|
|
430
469
|
unmarshalListTLSStagesResponse,
|
|
431
470
|
unmarshalPipeline,
|
|
471
|
+
unmarshalPlan,
|
|
432
472
|
unmarshalPurgeRequest,
|
|
433
473
|
unmarshalTLSStage
|
|
434
474
|
};
|