@scaleway/sdk 1.11.0 → 1.13.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/README.md +1 -1
- package/dist/api/domain/v2beta1/api.gen.js +1 -21
- package/dist/api/iam/v1alpha1/api.gen.js +18 -1
- package/dist/api/iam/v1alpha1/marshalling.gen.js +5 -1
- package/dist/api/k8s/v1/api.gen.js +15 -1
- package/dist/api/k8s/v1/marshalling.gen.js +7 -3
- package/dist/api/lb/v1/api.gen.js +4 -2
- package/dist/api/rdb/v1/marshalling.gen.js +3 -1
- package/dist/api/secret/v1alpha1/api.gen.js +28 -11
- package/dist/api/secret/v1alpha1/marshalling.gen.js +10 -1
- package/dist/api/tem/v1alpha1/api.gen.js +10 -2
- package/dist/api/tem/v1alpha1/marshalling.gen.js +1 -0
- package/dist/api/vpc/index.js +2 -0
- package/dist/api/vpc/v2/api.gen.js +231 -0
- package/dist/api/vpc/v2/index.gen.js +4 -0
- package/dist/api/vpc/v2/marshalling.gen.js +135 -0
- package/dist/index.cjs +839 -440
- package/dist/index.d.ts +2291 -1676
- package/dist/scw/client-ini-profile.js +3 -3
- package/dist/scw/client.js +2 -2
- package/dist/scw/constants.js +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import randomName from '../../../node_modules/.pnpm/@scaleway_random-name@4.0.1/node_modules/@scaleway/random-name/dist/index.js';
|
|
2
|
+
import { isJSONObject } from '../../../helpers/json.js';
|
|
3
|
+
import { unmarshalDate, unmarshalArrayOfObject, resolveOneOf } from '../../../helpers/marshalling.js';
|
|
4
|
+
|
|
5
|
+
// This file was automatically generated. DO NOT EDIT.
|
|
6
|
+
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
7
|
+
const unmarshalSubnet = data => {
|
|
8
|
+
if (!isJSONObject(data)) {
|
|
9
|
+
throw new TypeError(`Unmarshalling the type 'Subnet' failed as data isn't a dictionary.`);
|
|
10
|
+
}
|
|
11
|
+
return {
|
|
12
|
+
createdAt: unmarshalDate(data.created_at),
|
|
13
|
+
id: data.id,
|
|
14
|
+
subnet: data.subnet,
|
|
15
|
+
updatedAt: unmarshalDate(data.updated_at)
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
const unmarshalPrivateNetwork = data => {
|
|
19
|
+
if (!isJSONObject(data)) {
|
|
20
|
+
throw new TypeError(`Unmarshalling the type 'PrivateNetwork' failed as data isn't a dictionary.`);
|
|
21
|
+
}
|
|
22
|
+
return {
|
|
23
|
+
createdAt: unmarshalDate(data.created_at),
|
|
24
|
+
id: data.id,
|
|
25
|
+
name: data.name,
|
|
26
|
+
organizationId: data.organization_id,
|
|
27
|
+
projectId: data.project_id,
|
|
28
|
+
region: data.region,
|
|
29
|
+
subnets: unmarshalArrayOfObject(data.subnets, unmarshalSubnet),
|
|
30
|
+
tags: data.tags,
|
|
31
|
+
updatedAt: unmarshalDate(data.updated_at),
|
|
32
|
+
vpcId: data.vpc_id
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
const unmarshalVPC = data => {
|
|
36
|
+
if (!isJSONObject(data)) {
|
|
37
|
+
throw new TypeError(`Unmarshalling the type 'VPC' failed as data isn't a dictionary.`);
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
createdAt: unmarshalDate(data.created_at),
|
|
41
|
+
id: data.id,
|
|
42
|
+
isDefault: data.is_default,
|
|
43
|
+
name: data.name,
|
|
44
|
+
organizationId: data.organization_id,
|
|
45
|
+
projectId: data.project_id,
|
|
46
|
+
region: data.region,
|
|
47
|
+
tags: data.tags,
|
|
48
|
+
updatedAt: unmarshalDate(data.updated_at)
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
const unmarshalAddSubnetsResponse = data => {
|
|
52
|
+
if (!isJSONObject(data)) {
|
|
53
|
+
throw new TypeError(`Unmarshalling the type 'AddSubnetsResponse' failed as data isn't a dictionary.`);
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
subnets: data.subnets
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
const unmarshalDeleteSubnetsResponse = data => {
|
|
60
|
+
if (!isJSONObject(data)) {
|
|
61
|
+
throw new TypeError(`Unmarshalling the type 'DeleteSubnetsResponse' failed as data isn't a dictionary.`);
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
subnets: data.subnets
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
const unmarshalListPrivateNetworksResponse = data => {
|
|
68
|
+
if (!isJSONObject(data)) {
|
|
69
|
+
throw new TypeError(`Unmarshalling the type 'ListPrivateNetworksResponse' failed as data isn't a dictionary.`);
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
privateNetworks: unmarshalArrayOfObject(data.private_networks, unmarshalPrivateNetwork),
|
|
73
|
+
totalCount: data.total_count
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
const unmarshalListVPCsResponse = data => {
|
|
77
|
+
if (!isJSONObject(data)) {
|
|
78
|
+
throw new TypeError(`Unmarshalling the type 'ListVPCsResponse' failed as data isn't a dictionary.`);
|
|
79
|
+
}
|
|
80
|
+
return {
|
|
81
|
+
totalCount: data.total_count,
|
|
82
|
+
vpcs: unmarshalArrayOfObject(data.vpcs, unmarshalVPC)
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
const unmarshalSetSubnetsResponse = data => {
|
|
86
|
+
if (!isJSONObject(data)) {
|
|
87
|
+
throw new TypeError(`Unmarshalling the type 'SetSubnetsResponse' failed as data isn't a dictionary.`);
|
|
88
|
+
}
|
|
89
|
+
return {
|
|
90
|
+
subnets: data.subnets
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
const marshalAddSubnetsRequest = (request, defaults) => ({
|
|
94
|
+
subnets: request.subnets
|
|
95
|
+
});
|
|
96
|
+
const marshalCreatePrivateNetworkRequest = (request, defaults) => ({
|
|
97
|
+
name: request.name || randomName('pn'),
|
|
98
|
+
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
99
|
+
subnets: request.subnets,
|
|
100
|
+
tags: request.tags,
|
|
101
|
+
vpc_id: request.vpcId
|
|
102
|
+
});
|
|
103
|
+
const marshalCreateVPCRequest = (request, defaults) => ({
|
|
104
|
+
name: request.name || randomName('vpc'),
|
|
105
|
+
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
106
|
+
tags: request.tags
|
|
107
|
+
});
|
|
108
|
+
const marshalDeleteSubnetsRequest = (request, defaults) => ({
|
|
109
|
+
subnets: request.subnets
|
|
110
|
+
});
|
|
111
|
+
const marshalMigrateZonalPrivateNetworksRequest = (request, defaults) => ({
|
|
112
|
+
private_network_ids: request.privateNetworkIds,
|
|
113
|
+
...resolveOneOf([{
|
|
114
|
+
default: defaults.defaultProjectId,
|
|
115
|
+
param: 'project_id',
|
|
116
|
+
value: request.projectId
|
|
117
|
+
}, {
|
|
118
|
+
default: defaults.defaultOrganizationId,
|
|
119
|
+
param: 'organization_id',
|
|
120
|
+
value: request.organizationId
|
|
121
|
+
}])
|
|
122
|
+
});
|
|
123
|
+
const marshalSetSubnetsRequest = (request, defaults) => ({
|
|
124
|
+
subnets: request.subnets
|
|
125
|
+
});
|
|
126
|
+
const marshalUpdatePrivateNetworkRequest = (request, defaults) => ({
|
|
127
|
+
name: request.name,
|
|
128
|
+
tags: request.tags
|
|
129
|
+
});
|
|
130
|
+
const marshalUpdateVPCRequest = (request, defaults) => ({
|
|
131
|
+
name: request.name,
|
|
132
|
+
tags: request.tags
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
export { marshalAddSubnetsRequest, marshalCreatePrivateNetworkRequest, marshalCreateVPCRequest, marshalDeleteSubnetsRequest, marshalMigrateZonalPrivateNetworksRequest, marshalSetSubnetsRequest, marshalUpdatePrivateNetworkRequest, marshalUpdateVPCRequest, unmarshalAddSubnetsResponse, unmarshalDeleteSubnetsResponse, unmarshalListPrivateNetworksResponse, unmarshalListVPCsResponse, unmarshalPrivateNetwork, unmarshalSetSubnetsResponse, unmarshalVPC };
|