@scaleway/sdk 3.0.0-alpha.0 → 3.1.1
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/index.gen.d.ts +362 -0
- package/dist/index.gen.js +323 -0
- package/package.json +71 -25
- package/README.md +0 -46
- package/dist/api/account/index.js +0 -4
- package/dist/api/account/v2/api.gen.js +0 -147
- package/dist/api/account/v2/index.gen.js +0 -4
- package/dist/api/account/v2/marshalling.gen.js +0 -39
- package/dist/api/account/v3/api.gen.js +0 -129
- package/dist/api/account/v3/index.gen.js +0 -6
- package/dist/api/account/v3/marshalling.gen.js +0 -39
- package/dist/api/account/v3/validation-rules.gen.js +0 -39
- package/dist/api/applesilicon/index.js +0 -2
- package/dist/api/applesilicon/v1alpha1/api.gen.js +0 -220
- package/dist/api/applesilicon/v1alpha1/content.gen.js +0 -7
- package/dist/api/applesilicon/v1alpha1/index.gen.js +0 -5
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +0 -113
- package/dist/api/baremetal/index.js +0 -2
- package/dist/api/baremetal/v1/api.gen.js +0 -523
- package/dist/api/baremetal/v1/api.utils.js +0 -27
- package/dist/api/baremetal/v1/content.gen.js +0 -13
- package/dist/api/baremetal/v1/index.js +0 -5
- package/dist/api/baremetal/v1/marshalling.gen.js +0 -395
- package/dist/api/baremetal/v1/validation-rules.gen.js +0 -109
- package/dist/api/billing/index.js +0 -2
- package/dist/api/billing/v2alpha1/api.gen.js +0 -80
- package/dist/api/billing/v2alpha1/index.gen.js +0 -4
- package/dist/api/billing/v2alpha1/marshalling.gen.js +0 -53
- package/dist/api/block/index.js +0 -2
- package/dist/api/block/v1alpha1/api.gen.js +0 -245
- package/dist/api/block/v1alpha1/content.gen.js +0 -13
- package/dist/api/block/v1alpha1/index.gen.js +0 -7
- package/dist/api/block/v1alpha1/marshalling.gen.js +0 -175
- package/dist/api/block/v1alpha1/validation-rules.gen.js +0 -42
- package/dist/api/cockpit/index.js +0 -2
- package/dist/api/cockpit/v1beta1/api.gen.js +0 -448
- package/dist/api/cockpit/v1beta1/content.gen.js +0 -7
- package/dist/api/cockpit/v1beta1/index.gen.js +0 -5
- package/dist/api/cockpit/v1beta1/marshalling.gen.js +0 -220
- package/dist/api/container/index.js +0 -2
- package/dist/api/container/v1beta1/api.gen.js +0 -549
- package/dist/api/container/v1beta1/content.gen.js +0 -22
- package/dist/api/container/v1beta1/index.gen.js +0 -5
- package/dist/api/container/v1beta1/marshalling.gen.js +0 -330
- package/dist/api/document_db/index.js +0 -2
- package/dist/api/document_db/v1beta1/api.gen.js +0 -830
- package/dist/api/document_db/v1beta1/content.gen.js +0 -19
- package/dist/api/document_db/v1beta1/index.gen.js +0 -7
- package/dist/api/document_db/v1beta1/marshalling.gen.js +0 -580
- package/dist/api/document_db/v1beta1/validation-rules.gen.js +0 -10
- package/dist/api/domain/index.js +0 -2
- package/dist/api/domain/v2beta1/api.gen.js +0 -875
- package/dist/api/domain/v2beta1/content.gen.js +0 -28
- package/dist/api/domain/v2beta1/index.gen.js +0 -7
- package/dist/api/domain/v2beta1/marshalling.gen.js +0 -958
- package/dist/api/flexibleip/index.js +0 -2
- package/dist/api/flexibleip/v1alpha1/api.gen.js +0 -203
- package/dist/api/flexibleip/v1alpha1/content.gen.js +0 -10
- package/dist/api/flexibleip/v1alpha1/index.gen.js +0 -7
- package/dist/api/flexibleip/v1alpha1/marshalling.gen.js +0 -97
- package/dist/api/flexibleip/v1alpha1/validation-rules.gen.js +0 -14
- package/dist/api/function/index.js +0 -2
- package/dist/api/function/v1beta1/api.gen.js +0 -560
- package/dist/api/function/v1beta1/content.gen.js +0 -22
- package/dist/api/function/v1beta1/index.gen.js +0 -5
- package/dist/api/function/v1beta1/marshalling.gen.js +0 -368
- package/dist/api/iam/index.js +0 -2
- package/dist/api/iam/v1alpha1/api.gen.js +0 -799
- package/dist/api/iam/v1alpha1/index.gen.js +0 -6
- package/dist/api/iam/v1alpha1/marshalling.gen.js +0 -373
- package/dist/api/iam/v1alpha1/validation-rules.gen.js +0 -207
- package/dist/api/instance/index.js +0 -2
- package/dist/api/instance/v1/api.gen.js +0 -1003
- package/dist/api/instance/v1/api.utils.js +0 -369
- package/dist/api/instance/v1/content.gen.js +0 -31
- package/dist/api/instance/v1/index.js +0 -2
- package/dist/api/instance/v1/marshalling.gen.js +0 -1206
- package/dist/api/instance/v1/marshalling.utils.js +0 -63
- package/dist/api/iot/index.js +0 -2
- package/dist/api/iot/v1/api.gen.js +0 -581
- package/dist/api/iot/v1/content.gen.js +0 -7
- package/dist/api/iot/v1/index.gen.js +0 -5
- package/dist/api/iot/v1/marshalling.gen.js +0 -388
- package/dist/api/ipfs/index.js +0 -2
- package/dist/api/ipfs/v1alpha1/api.gen.js +0 -197
- package/dist/api/ipfs/v1alpha1/content.gen.js +0 -7
- package/dist/api/ipfs/v1alpha1/index.gen.js +0 -5
- package/dist/api/ipfs/v1alpha1/marshalling.gen.js +0 -121
- package/dist/api/k8s/index.js +0 -2
- package/dist/api/k8s/v1/api.gen.js +0 -454
- package/dist/api/k8s/v1/api.utils.js +0 -13
- package/dist/api/k8s/v1/content.gen.js +0 -13
- package/dist/api/k8s/v1/index.js +0 -4
- package/dist/api/k8s/v1/marshalling.gen.js +0 -333
- package/dist/api/k8s/v1/validation-rules.gen.js +0 -101
- package/dist/api/lb/index.js +0 -2
- package/dist/api/lb/v1/api.gen.js +0 -1669
- package/dist/api/lb/v1/api.utils.js +0 -81
- package/dist/api/lb/v1/content.gen.js +0 -16
- package/dist/api/lb/v1/index.js +0 -2
- package/dist/api/lb/v1/marshalling.gen.js +0 -923
- package/dist/api/marketplace/index.js +0 -4
- package/dist/api/marketplace/v1/api.gen.js +0 -60
- package/dist/api/marketplace/v1/index.gen.js +0 -4
- package/dist/api/marketplace/v1/marshalling.gen.js +0 -92
- package/dist/api/marketplace/v2/api.gen.js +0 -162
- package/dist/api/marketplace/v2/index.gen.js +0 -4
- package/dist/api/marketplace/v2/marshalling.gen.js +0 -94
- package/dist/api/mnq/index.js +0 -2
- package/dist/api/mnq/v1alpha1/api.gen.js +0 -205
- package/dist/api/mnq/v1alpha1/index.gen.js +0 -4
- package/dist/api/mnq/v1alpha1/marshalling.gen.js +0 -121
- package/dist/api/rdb/index.js +0 -2
- package/dist/api/rdb/v1/api.gen.js +0 -972
- package/dist/api/rdb/v1/content.gen.js +0 -22
- package/dist/api/rdb/v1/index.gen.js +0 -7
- package/dist/api/rdb/v1/marshalling.gen.js +0 -636
- package/dist/api/rdb/v1/validation-rules.gen.js +0 -10
- package/dist/api/redis/index.js +0 -2
- package/dist/api/redis/v1/api.gen.js +0 -389
- package/dist/api/redis/v1/content.gen.js +0 -7
- package/dist/api/redis/v1/index.gen.js +0 -5
- package/dist/api/redis/v1/marshalling.gen.js +0 -259
- package/dist/api/registry/index.js +0 -2
- package/dist/api/registry/v1/api.gen.js +0 -252
- package/dist/api/registry/v1/content.gen.js +0 -13
- package/dist/api/registry/v1/index.gen.js +0 -5
- package/dist/api/registry/v1/marshalling.gen.js +0 -106
- package/dist/api/secret/index.js +0 -2
- package/dist/api/secret/v1alpha1/api.gen.js +0 -415
- package/dist/api/secret/v1alpha1/index.gen.js +0 -4
- package/dist/api/secret/v1alpha1/marshalling.gen.js +0 -143
- package/dist/api/tem/index.js +0 -2
- package/dist/api/tem/v1alpha1/api.gen.js +0 -229
- package/dist/api/tem/v1alpha1/content.gen.js +0 -10
- package/dist/api/tem/v1alpha1/index.gen.js +0 -5
- package/dist/api/tem/v1alpha1/marshalling.gen.js +0 -159
- package/dist/api/test/index.js +0 -2
- package/dist/api/test/v1/api.gen.js +0 -152
- package/dist/api/test/v1/content.gen.js +0 -7
- package/dist/api/test/v1/index.gen.js +0 -5
- package/dist/api/test/v1/marshalling.gen.js +0 -79
- package/dist/api/vpc/index.js +0 -4
- package/dist/api/vpc/v1/api.gen.js +0 -110
- package/dist/api/vpc/v1/index.gen.js +0 -4
- package/dist/api/vpc/v1/marshalling.gen.js +0 -44
- package/dist/api/vpc/v2/api.gen.js +0 -276
- package/dist/api/vpc/v2/index.gen.js +0 -4
- package/dist/api/vpc/v2/marshalling.gen.js +0 -135
- package/dist/api/vpcgw/index.js +0 -2
- package/dist/api/vpcgw/v1/api.gen.js +0 -669
- package/dist/api/vpcgw/v1/content.gen.js +0 -10
- package/dist/api/vpcgw/v1/index.gen.js +0 -5
- package/dist/api/vpcgw/v1/marshalling.gen.js +0 -336
- package/dist/api/webhosting/index.js +0 -2
- package/dist/api/webhosting/v1alpha1/api.gen.js +0 -210
- package/dist/api/webhosting/v1alpha1/content.gen.js +0 -7
- package/dist/api/webhosting/v1alpha1/index.gen.js +0 -7
- package/dist/api/webhosting/v1alpha1/marshalling.gen.js +0 -173
- package/dist/api/webhosting/v1alpha1/validation-rules.gen.js +0 -23
- package/dist/helpers/is-browser.js +0 -5
- package/dist/helpers/is-response.js +0 -10
- package/dist/helpers/json.js +0 -11
- package/dist/helpers/marshalling.js +0 -130
- package/dist/index.cjs +0 -24364
- package/dist/index.d.ts +0 -27584
- package/dist/index.js +0 -69
- package/dist/internal/async/interval-retrier.js +0 -105
- package/dist/internal/async/sleep.js +0 -13
- package/dist/internal/interceptors/composer.js +0 -46
- package/dist/internal/interceptors/helpers.js +0 -32
- package/dist/internal/logger/console-logger.js +0 -38
- package/dist/internal/logger/index.js +0 -41
- package/dist/internal/logger/level-resolver.js +0 -13
- package/dist/internal/validations/string-validation.js +0 -38
- package/dist/node_modules/.pnpm/@scaleway_random-name@4.0.2/node_modules/@scaleway/random-name/dist/index.js +0 -13
- package/dist/scw/api.js +0 -12
- package/dist/scw/auth.js +0 -68
- package/dist/scw/client-ini-factory.js +0 -174
- package/dist/scw/client-ini-profile.js +0 -54
- package/dist/scw/client-settings.js +0 -78
- package/dist/scw/client.js +0 -98
- package/dist/scw/constants.js +0 -4
- package/dist/scw/custom-marshalling.js +0 -131
- package/dist/scw/errors/error-parser.js +0 -107
- package/dist/scw/errors/non-standard/invalid-request-mapper.js +0 -36
- package/dist/scw/errors/non-standard/unknown-resource-mapper.js +0 -27
- package/dist/scw/errors/scw-error.js +0 -66
- package/dist/scw/errors/standard/already-exists-error.js +0 -26
- package/dist/scw/errors/standard/denied-authentication-error.js +0 -52
- package/dist/scw/errors/standard/index.js +0 -13
- package/dist/scw/errors/standard/invalid-arguments-error.js +0 -67
- package/dist/scw/errors/standard/out-of-stock-error.js +0 -22
- package/dist/scw/errors/standard/permissions-denied-error.js +0 -48
- package/dist/scw/errors/standard/precondition-failed-error.js +0 -42
- package/dist/scw/errors/standard/quotas-exceeded-error.js +0 -68
- package/dist/scw/errors/standard/resource-expired-error.js +0 -26
- package/dist/scw/errors/standard/resource-locked-error.js +0 -25
- package/dist/scw/errors/standard/resource-not-found-error.js +0 -25
- package/dist/scw/errors/standard/too-many-requests-error.js +0 -70
- package/dist/scw/errors/standard/transient-state-error.js +0 -26
- package/dist/scw/errors/types.js +0 -23
- package/dist/scw/fetch/build-fetcher.js +0 -72
- package/dist/scw/fetch/http-dumper.js +0 -54
- package/dist/scw/fetch/http-interceptors.js +0 -99
- package/dist/scw/fetch/resource-paginator.js +0 -84
- package/dist/scw/fetch/response-parser.js +0 -72
- package/node_modules/@scaleway/random-name/.npmignore +0 -4
- package/node_modules/@scaleway/random-name/CHANGELOG.md +0 -129
- package/node_modules/@scaleway/random-name/LICENSE.md +0 -21
- package/node_modules/@scaleway/random-name/README.md +0 -26
- package/node_modules/@scaleway/random-name/dist/index.d.ts +0 -3
- package/node_modules/@scaleway/random-name/dist/index.js +0 -13
- package/node_modules/@scaleway/random-name/package.json +0 -23
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { API } from './api.gen.js';
|
|
2
|
-
import * as validationRules_gen from './validation-rules.gen.js';
|
|
3
|
-
export { validationRules_gen as ValidationRules };
|
|
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.
|
|
@@ -1,373 +0,0 @@
|
|
|
1
|
-
import randomName from '../../../node_modules/.pnpm/@scaleway_random-name@4.0.2/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 unmarshalJWT = data => {
|
|
8
|
-
if (!isJSONObject(data)) {
|
|
9
|
-
throw new TypeError(`Unmarshalling the type 'JWT' failed as data isn't a dictionary.`);
|
|
10
|
-
}
|
|
11
|
-
return {
|
|
12
|
-
audienceId: data.audience_id,
|
|
13
|
-
createdAt: unmarshalDate(data.created_at),
|
|
14
|
-
expiresAt: unmarshalDate(data.expires_at),
|
|
15
|
-
ip: data.ip,
|
|
16
|
-
issuerId: data.issuer_id,
|
|
17
|
-
jti: data.jti,
|
|
18
|
-
updatedAt: unmarshalDate(data.updated_at),
|
|
19
|
-
userAgent: data.user_agent
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
const unmarshalAPIKey = data => {
|
|
23
|
-
if (!isJSONObject(data)) {
|
|
24
|
-
throw new TypeError(`Unmarshalling the type 'APIKey' failed as data isn't a dictionary.`);
|
|
25
|
-
}
|
|
26
|
-
return {
|
|
27
|
-
accessKey: data.access_key,
|
|
28
|
-
applicationId: data.application_id ? data.application_id : undefined,
|
|
29
|
-
createdAt: unmarshalDate(data.created_at),
|
|
30
|
-
creationIp: data.creation_ip,
|
|
31
|
-
defaultProjectId: data.default_project_id,
|
|
32
|
-
description: data.description,
|
|
33
|
-
editable: data.editable,
|
|
34
|
-
expiresAt: unmarshalDate(data.expires_at),
|
|
35
|
-
secretKey: data.secret_key ? data.secret_key : undefined,
|
|
36
|
-
updatedAt: unmarshalDate(data.updated_at),
|
|
37
|
-
userId: data.user_id ? data.user_id : undefined
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
const unmarshalApplication = data => {
|
|
41
|
-
if (!isJSONObject(data)) {
|
|
42
|
-
throw new TypeError(`Unmarshalling the type 'Application' failed as data isn't a dictionary.`);
|
|
43
|
-
}
|
|
44
|
-
return {
|
|
45
|
-
createdAt: unmarshalDate(data.created_at),
|
|
46
|
-
description: data.description,
|
|
47
|
-
editable: data.editable,
|
|
48
|
-
id: data.id,
|
|
49
|
-
name: data.name,
|
|
50
|
-
nbApiKeys: data.nb_api_keys,
|
|
51
|
-
organizationId: data.organization_id,
|
|
52
|
-
updatedAt: unmarshalDate(data.updated_at)
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
const unmarshalGroup = data => {
|
|
56
|
-
if (!isJSONObject(data)) {
|
|
57
|
-
throw new TypeError(`Unmarshalling the type 'Group' failed as data isn't a dictionary.`);
|
|
58
|
-
}
|
|
59
|
-
return {
|
|
60
|
-
applicationIds: data.application_ids,
|
|
61
|
-
createdAt: unmarshalDate(data.created_at),
|
|
62
|
-
description: data.description,
|
|
63
|
-
id: data.id,
|
|
64
|
-
name: data.name,
|
|
65
|
-
organizationId: data.organization_id,
|
|
66
|
-
updatedAt: unmarshalDate(data.updated_at),
|
|
67
|
-
userIds: data.user_ids
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
const unmarshalPolicy = data => {
|
|
71
|
-
if (!isJSONObject(data)) {
|
|
72
|
-
throw new TypeError(`Unmarshalling the type 'Policy' failed as data isn't a dictionary.`);
|
|
73
|
-
}
|
|
74
|
-
return {
|
|
75
|
-
applicationId: data.application_id ? data.application_id : undefined,
|
|
76
|
-
createdAt: unmarshalDate(data.created_at),
|
|
77
|
-
description: data.description,
|
|
78
|
-
editable: data.editable,
|
|
79
|
-
groupId: data.group_id ? data.group_id : undefined,
|
|
80
|
-
id: data.id,
|
|
81
|
-
name: data.name,
|
|
82
|
-
nbPermissionSets: data.nb_permission_sets,
|
|
83
|
-
nbRules: data.nb_rules,
|
|
84
|
-
nbScopes: data.nb_scopes,
|
|
85
|
-
noPrincipal: data.no_principal ? data.no_principal : undefined,
|
|
86
|
-
organizationId: data.organization_id,
|
|
87
|
-
updatedAt: unmarshalDate(data.updated_at),
|
|
88
|
-
userId: data.user_id ? data.user_id : undefined
|
|
89
|
-
};
|
|
90
|
-
};
|
|
91
|
-
const unmarshalQuotum = data => {
|
|
92
|
-
if (!isJSONObject(data)) {
|
|
93
|
-
throw new TypeError(`Unmarshalling the type 'Quotum' failed as data isn't a dictionary.`);
|
|
94
|
-
}
|
|
95
|
-
return {
|
|
96
|
-
limit: data.limit ? data.limit : undefined,
|
|
97
|
-
name: data.name,
|
|
98
|
-
unlimited: data.unlimited ? data.unlimited : undefined
|
|
99
|
-
};
|
|
100
|
-
};
|
|
101
|
-
const unmarshalSSHKey = data => {
|
|
102
|
-
if (!isJSONObject(data)) {
|
|
103
|
-
throw new TypeError(`Unmarshalling the type 'SSHKey' failed as data isn't a dictionary.`);
|
|
104
|
-
}
|
|
105
|
-
return {
|
|
106
|
-
createdAt: unmarshalDate(data.created_at),
|
|
107
|
-
disabled: data.disabled,
|
|
108
|
-
fingerprint: data.fingerprint,
|
|
109
|
-
id: data.id,
|
|
110
|
-
name: data.name,
|
|
111
|
-
organizationId: data.organization_id,
|
|
112
|
-
projectId: data.project_id,
|
|
113
|
-
publicKey: data.public_key,
|
|
114
|
-
updatedAt: unmarshalDate(data.updated_at)
|
|
115
|
-
};
|
|
116
|
-
};
|
|
117
|
-
const unmarshalUser = data => {
|
|
118
|
-
if (!isJSONObject(data)) {
|
|
119
|
-
throw new TypeError(`Unmarshalling the type 'User' failed as data isn't a dictionary.`);
|
|
120
|
-
}
|
|
121
|
-
return {
|
|
122
|
-
accountRootUserId: data.account_root_user_id,
|
|
123
|
-
createdAt: unmarshalDate(data.created_at),
|
|
124
|
-
deletable: data.deletable,
|
|
125
|
-
email: data.email,
|
|
126
|
-
id: data.id,
|
|
127
|
-
lastLoginAt: unmarshalDate(data.last_login_at),
|
|
128
|
-
mfa: data.mfa,
|
|
129
|
-
organizationId: data.organization_id,
|
|
130
|
-
status: data.status,
|
|
131
|
-
twoFactorEnabled: data.two_factor_enabled ? data.two_factor_enabled : undefined,
|
|
132
|
-
type: data.type,
|
|
133
|
-
updatedAt: unmarshalDate(data.updated_at)
|
|
134
|
-
};
|
|
135
|
-
};
|
|
136
|
-
const unmarshalListAPIKeysResponse = data => {
|
|
137
|
-
if (!isJSONObject(data)) {
|
|
138
|
-
throw new TypeError(`Unmarshalling the type 'ListAPIKeysResponse' failed as data isn't a dictionary.`);
|
|
139
|
-
}
|
|
140
|
-
return {
|
|
141
|
-
apiKeys: unmarshalArrayOfObject(data.api_keys, unmarshalAPIKey),
|
|
142
|
-
totalCount: data.total_count
|
|
143
|
-
};
|
|
144
|
-
};
|
|
145
|
-
const unmarshalListApplicationsResponse = data => {
|
|
146
|
-
if (!isJSONObject(data)) {
|
|
147
|
-
throw new TypeError(`Unmarshalling the type 'ListApplicationsResponse' failed as data isn't a dictionary.`);
|
|
148
|
-
}
|
|
149
|
-
return {
|
|
150
|
-
applications: unmarshalArrayOfObject(data.applications, unmarshalApplication),
|
|
151
|
-
totalCount: data.total_count
|
|
152
|
-
};
|
|
153
|
-
};
|
|
154
|
-
const unmarshalListGroupsResponse = data => {
|
|
155
|
-
if (!isJSONObject(data)) {
|
|
156
|
-
throw new TypeError(`Unmarshalling the type 'ListGroupsResponse' failed as data isn't a dictionary.`);
|
|
157
|
-
}
|
|
158
|
-
return {
|
|
159
|
-
groups: unmarshalArrayOfObject(data.groups, unmarshalGroup),
|
|
160
|
-
totalCount: data.total_count
|
|
161
|
-
};
|
|
162
|
-
};
|
|
163
|
-
const unmarshalListJWTsResponse = data => {
|
|
164
|
-
if (!isJSONObject(data)) {
|
|
165
|
-
throw new TypeError(`Unmarshalling the type 'ListJWTsResponse' failed as data isn't a dictionary.`);
|
|
166
|
-
}
|
|
167
|
-
return {
|
|
168
|
-
jwts: unmarshalArrayOfObject(data.jwts, unmarshalJWT),
|
|
169
|
-
totalCount: data.total_count
|
|
170
|
-
};
|
|
171
|
-
};
|
|
172
|
-
const unmarshalPermissionSet = data => {
|
|
173
|
-
if (!isJSONObject(data)) {
|
|
174
|
-
throw new TypeError(`Unmarshalling the type 'PermissionSet' failed as data isn't a dictionary.`);
|
|
175
|
-
}
|
|
176
|
-
return {
|
|
177
|
-
categories: data.categories ? data.categories : undefined,
|
|
178
|
-
description: data.description,
|
|
179
|
-
id: data.id,
|
|
180
|
-
name: data.name,
|
|
181
|
-
scopeType: data.scope_type
|
|
182
|
-
};
|
|
183
|
-
};
|
|
184
|
-
const unmarshalListPermissionSetsResponse = data => {
|
|
185
|
-
if (!isJSONObject(data)) {
|
|
186
|
-
throw new TypeError(`Unmarshalling the type 'ListPermissionSetsResponse' failed as data isn't a dictionary.`);
|
|
187
|
-
}
|
|
188
|
-
return {
|
|
189
|
-
permissionSets: unmarshalArrayOfObject(data.permission_sets, unmarshalPermissionSet),
|
|
190
|
-
totalCount: data.total_count
|
|
191
|
-
};
|
|
192
|
-
};
|
|
193
|
-
const unmarshalListPoliciesResponse = data => {
|
|
194
|
-
if (!isJSONObject(data)) {
|
|
195
|
-
throw new TypeError(`Unmarshalling the type 'ListPoliciesResponse' failed as data isn't a dictionary.`);
|
|
196
|
-
}
|
|
197
|
-
return {
|
|
198
|
-
policies: unmarshalArrayOfObject(data.policies, unmarshalPolicy),
|
|
199
|
-
totalCount: data.total_count
|
|
200
|
-
};
|
|
201
|
-
};
|
|
202
|
-
const unmarshalListQuotaResponse = data => {
|
|
203
|
-
if (!isJSONObject(data)) {
|
|
204
|
-
throw new TypeError(`Unmarshalling the type 'ListQuotaResponse' failed as data isn't a dictionary.`);
|
|
205
|
-
}
|
|
206
|
-
return {
|
|
207
|
-
quota: unmarshalArrayOfObject(data.quota, unmarshalQuotum),
|
|
208
|
-
totalCount: data.total_count
|
|
209
|
-
};
|
|
210
|
-
};
|
|
211
|
-
const unmarshalRule = data => {
|
|
212
|
-
if (!isJSONObject(data)) {
|
|
213
|
-
throw new TypeError(`Unmarshalling the type 'Rule' failed as data isn't a dictionary.`);
|
|
214
|
-
}
|
|
215
|
-
return {
|
|
216
|
-
accountRootUserId: data.account_root_user_id ? data.account_root_user_id : undefined,
|
|
217
|
-
id: data.id,
|
|
218
|
-
organizationId: data.organization_id ? data.organization_id : undefined,
|
|
219
|
-
permissionSetNames: data.permission_set_names ? data.permission_set_names : undefined,
|
|
220
|
-
permissionSetsScopeType: data.permission_sets_scope_type,
|
|
221
|
-
projectIds: data.project_ids ? data.project_ids : undefined
|
|
222
|
-
};
|
|
223
|
-
};
|
|
224
|
-
const unmarshalListRulesResponse = data => {
|
|
225
|
-
if (!isJSONObject(data)) {
|
|
226
|
-
throw new TypeError(`Unmarshalling the type 'ListRulesResponse' failed as data isn't a dictionary.`);
|
|
227
|
-
}
|
|
228
|
-
return {
|
|
229
|
-
rules: unmarshalArrayOfObject(data.rules, unmarshalRule),
|
|
230
|
-
totalCount: data.total_count
|
|
231
|
-
};
|
|
232
|
-
};
|
|
233
|
-
const unmarshalListSSHKeysResponse = data => {
|
|
234
|
-
if (!isJSONObject(data)) {
|
|
235
|
-
throw new TypeError(`Unmarshalling the type 'ListSSHKeysResponse' failed as data isn't a dictionary.`);
|
|
236
|
-
}
|
|
237
|
-
return {
|
|
238
|
-
sshKeys: unmarshalArrayOfObject(data.ssh_keys, unmarshalSSHKey),
|
|
239
|
-
totalCount: data.total_count
|
|
240
|
-
};
|
|
241
|
-
};
|
|
242
|
-
const unmarshalListUsersResponse = data => {
|
|
243
|
-
if (!isJSONObject(data)) {
|
|
244
|
-
throw new TypeError(`Unmarshalling the type 'ListUsersResponse' failed as data isn't a dictionary.`);
|
|
245
|
-
}
|
|
246
|
-
return {
|
|
247
|
-
totalCount: data.total_count,
|
|
248
|
-
users: unmarshalArrayOfObject(data.users, unmarshalUser)
|
|
249
|
-
};
|
|
250
|
-
};
|
|
251
|
-
const unmarshalSetRulesResponse = data => {
|
|
252
|
-
if (!isJSONObject(data)) {
|
|
253
|
-
throw new TypeError(`Unmarshalling the type 'SetRulesResponse' failed as data isn't a dictionary.`);
|
|
254
|
-
}
|
|
255
|
-
return {
|
|
256
|
-
rules: unmarshalArrayOfObject(data.rules, unmarshalRule)
|
|
257
|
-
};
|
|
258
|
-
};
|
|
259
|
-
const marshalAddGroupMemberRequest = (request, defaults) => ({
|
|
260
|
-
...resolveOneOf([{
|
|
261
|
-
param: 'application_id',
|
|
262
|
-
value: request.applicationId
|
|
263
|
-
}, {
|
|
264
|
-
param: 'user_id',
|
|
265
|
-
value: request.userId
|
|
266
|
-
}])
|
|
267
|
-
});
|
|
268
|
-
const marshalAddGroupMembersRequest = (request, defaults) => ({
|
|
269
|
-
application_ids: request.applicationIds,
|
|
270
|
-
user_ids: request.userIds
|
|
271
|
-
});
|
|
272
|
-
const marshalCreateAPIKeyRequest = (request, defaults) => ({
|
|
273
|
-
default_project_id: request.defaultProjectId,
|
|
274
|
-
description: request.description,
|
|
275
|
-
expires_at: request.expiresAt,
|
|
276
|
-
...resolveOneOf([{
|
|
277
|
-
param: 'application_id',
|
|
278
|
-
value: request.applicationId
|
|
279
|
-
}, {
|
|
280
|
-
param: 'user_id',
|
|
281
|
-
value: request.userId
|
|
282
|
-
}])
|
|
283
|
-
});
|
|
284
|
-
const marshalCreateApplicationRequest = (request, defaults) => ({
|
|
285
|
-
description: request.description,
|
|
286
|
-
name: request.name || randomName('app'),
|
|
287
|
-
organization_id: request.organizationId ?? defaults.defaultOrganizationId
|
|
288
|
-
});
|
|
289
|
-
const marshalCreateGroupRequest = (request, defaults) => ({
|
|
290
|
-
description: request.description,
|
|
291
|
-
name: request.name || randomName('grp'),
|
|
292
|
-
organization_id: request.organizationId ?? defaults.defaultOrganizationId
|
|
293
|
-
});
|
|
294
|
-
const marshalCreatePolicyRequest = (request, defaults) => ({
|
|
295
|
-
description: request.description,
|
|
296
|
-
name: request.name || randomName('pol'),
|
|
297
|
-
organization_id: request.organizationId ?? defaults.defaultOrganizationId,
|
|
298
|
-
rules: request.rules,
|
|
299
|
-
...resolveOneOf([{
|
|
300
|
-
param: 'application_id',
|
|
301
|
-
value: request.applicationId
|
|
302
|
-
}, {
|
|
303
|
-
param: 'group_id',
|
|
304
|
-
value: request.groupId
|
|
305
|
-
}, {
|
|
306
|
-
param: 'no_principal',
|
|
307
|
-
value: request.noPrincipal
|
|
308
|
-
}, {
|
|
309
|
-
param: 'user_id',
|
|
310
|
-
value: request.userId
|
|
311
|
-
}])
|
|
312
|
-
});
|
|
313
|
-
const marshalCreateSSHKeyRequest = (request, defaults) => ({
|
|
314
|
-
name: request.name || randomName('key'),
|
|
315
|
-
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
316
|
-
public_key: request.publicKey
|
|
317
|
-
});
|
|
318
|
-
const marshalCreateUserRequest = (request, defaults) => ({
|
|
319
|
-
email: request.email,
|
|
320
|
-
organization_id: request.organizationId ?? defaults.defaultOrganizationId
|
|
321
|
-
});
|
|
322
|
-
const marshalRemoveGroupMemberRequest = (request, defaults) => ({
|
|
323
|
-
...resolveOneOf([{
|
|
324
|
-
param: 'application_id',
|
|
325
|
-
value: request.applicationId
|
|
326
|
-
}, {
|
|
327
|
-
param: 'user_id',
|
|
328
|
-
value: request.userId
|
|
329
|
-
}])
|
|
330
|
-
});
|
|
331
|
-
const marshalSetGroupMembersRequest = (request, defaults) => ({
|
|
332
|
-
application_ids: request.applicationIds,
|
|
333
|
-
user_ids: request.userIds
|
|
334
|
-
});
|
|
335
|
-
const marshalSetRulesRequest = (request, defaults) => ({
|
|
336
|
-
policy_id: request.policyId,
|
|
337
|
-
rules: request.rules
|
|
338
|
-
});
|
|
339
|
-
const marshalUpdateAPIKeyRequest = (request, defaults) => ({
|
|
340
|
-
default_project_id: request.defaultProjectId,
|
|
341
|
-
description: request.description
|
|
342
|
-
});
|
|
343
|
-
const marshalUpdateApplicationRequest = (request, defaults) => ({
|
|
344
|
-
description: request.description,
|
|
345
|
-
name: request.name
|
|
346
|
-
});
|
|
347
|
-
const marshalUpdateGroupRequest = (request, defaults) => ({
|
|
348
|
-
description: request.description,
|
|
349
|
-
name: request.name
|
|
350
|
-
});
|
|
351
|
-
const marshalUpdatePolicyRequest = (request, defaults) => ({
|
|
352
|
-
description: request.description,
|
|
353
|
-
name: request.name,
|
|
354
|
-
...resolveOneOf([{
|
|
355
|
-
param: 'application_id',
|
|
356
|
-
value: request.applicationId
|
|
357
|
-
}, {
|
|
358
|
-
param: 'group_id',
|
|
359
|
-
value: request.groupId
|
|
360
|
-
}, {
|
|
361
|
-
param: 'no_principal',
|
|
362
|
-
value: request.noPrincipal
|
|
363
|
-
}, {
|
|
364
|
-
param: 'user_id',
|
|
365
|
-
value: request.userId
|
|
366
|
-
}])
|
|
367
|
-
});
|
|
368
|
-
const marshalUpdateSSHKeyRequest = (request, defaults) => ({
|
|
369
|
-
disabled: request.disabled,
|
|
370
|
-
name: request.name
|
|
371
|
-
});
|
|
372
|
-
|
|
373
|
-
export { marshalAddGroupMemberRequest, marshalAddGroupMembersRequest, marshalCreateAPIKeyRequest, marshalCreateApplicationRequest, marshalCreateGroupRequest, marshalCreatePolicyRequest, marshalCreateSSHKeyRequest, marshalCreateUserRequest, marshalRemoveGroupMemberRequest, marshalSetGroupMembersRequest, marshalSetRulesRequest, marshalUpdateAPIKeyRequest, marshalUpdateApplicationRequest, marshalUpdateGroupRequest, marshalUpdatePolicyRequest, marshalUpdateSSHKeyRequest, unmarshalAPIKey, unmarshalApplication, unmarshalGroup, unmarshalJWT, unmarshalListAPIKeysResponse, unmarshalListApplicationsResponse, unmarshalListGroupsResponse, unmarshalListJWTsResponse, unmarshalListPermissionSetsResponse, unmarshalListPoliciesResponse, unmarshalListQuotaResponse, unmarshalListRulesResponse, unmarshalListSSHKeysResponse, unmarshalListUsersResponse, unmarshalPolicy, unmarshalQuotum, unmarshalSSHKey, unmarshalSetRulesResponse, unmarshalUser };
|
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
// This file was automatically generated. DO NOT EDIT.
|
|
2
|
-
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
3
|
-
|
|
4
|
-
const CreateAPIKeyRequest = {
|
|
5
|
-
description: {
|
|
6
|
-
ignoreEmpty: true,
|
|
7
|
-
maxLength: 200
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
|
-
const CreateApplicationRequest = {
|
|
11
|
-
description: {
|
|
12
|
-
ignoreEmpty: true,
|
|
13
|
-
maxLength: 200
|
|
14
|
-
},
|
|
15
|
-
name: {
|
|
16
|
-
maxLength: 64,
|
|
17
|
-
minLength: 1,
|
|
18
|
-
pattern: /^[a-zA-Z0-9\(\)\._\- ]+$/
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
const CreateGroupRequest = {
|
|
22
|
-
description: {
|
|
23
|
-
ignoreEmpty: true,
|
|
24
|
-
maxLength: 200
|
|
25
|
-
},
|
|
26
|
-
name: {
|
|
27
|
-
maxLength: 64,
|
|
28
|
-
minLength: 1,
|
|
29
|
-
pattern: /^[a-zA-Z0-9\(\)\._\- ]+$/
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
const CreatePolicyRequest = {
|
|
33
|
-
description: {
|
|
34
|
-
ignoreEmpty: true,
|
|
35
|
-
maxLength: 200
|
|
36
|
-
},
|
|
37
|
-
name: {
|
|
38
|
-
maxLength: 64,
|
|
39
|
-
minLength: 1,
|
|
40
|
-
pattern: /^[a-zA-Z0-9\(\)\._\- ]+$/
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
const CreateSSHKeyRequest = {
|
|
44
|
-
name: {
|
|
45
|
-
ignoreEmpty: true,
|
|
46
|
-
maxLength: 1000
|
|
47
|
-
},
|
|
48
|
-
publicKey: {
|
|
49
|
-
maxLength: 65000,
|
|
50
|
-
minLength: 1
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
const GetQuotumRequest = {
|
|
54
|
-
quotumName: {
|
|
55
|
-
minLength: 1
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
const ListAPIKeysRequest = {
|
|
59
|
-
description: {
|
|
60
|
-
maxLength: 200
|
|
61
|
-
},
|
|
62
|
-
page: {
|
|
63
|
-
greaterThan: 0
|
|
64
|
-
},
|
|
65
|
-
pageSize: {
|
|
66
|
-
greaterThanOrEqual: 1,
|
|
67
|
-
lessThanOrEqual: 100
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
const ListApplicationsRequest = {
|
|
71
|
-
name: {
|
|
72
|
-
maxLength: 64,
|
|
73
|
-
minLength: 1,
|
|
74
|
-
pattern: /^[a-zA-Z0-9\(\)\._\- ]+$/
|
|
75
|
-
},
|
|
76
|
-
page: {
|
|
77
|
-
greaterThan: 0
|
|
78
|
-
},
|
|
79
|
-
pageSize: {
|
|
80
|
-
greaterThanOrEqual: 1,
|
|
81
|
-
lessThanOrEqual: 100
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
const ListGroupsRequest = {
|
|
85
|
-
name: {
|
|
86
|
-
minLength: 1
|
|
87
|
-
},
|
|
88
|
-
page: {
|
|
89
|
-
greaterThan: 0
|
|
90
|
-
},
|
|
91
|
-
pageSize: {
|
|
92
|
-
greaterThanOrEqual: 1,
|
|
93
|
-
lessThanOrEqual: 100
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
const ListJWTsRequest = {
|
|
97
|
-
page: {
|
|
98
|
-
greaterThan: 0
|
|
99
|
-
},
|
|
100
|
-
pageSize: {
|
|
101
|
-
greaterThanOrEqual: 1,
|
|
102
|
-
lessThanOrEqual: 100
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
const ListPermissionSetsRequest = {
|
|
106
|
-
page: {
|
|
107
|
-
greaterThan: 0
|
|
108
|
-
},
|
|
109
|
-
pageSize: {
|
|
110
|
-
greaterThanOrEqual: 1,
|
|
111
|
-
lessThanOrEqual: 100
|
|
112
|
-
}
|
|
113
|
-
};
|
|
114
|
-
const ListPoliciesRequest = {
|
|
115
|
-
page: {
|
|
116
|
-
greaterThan: 0
|
|
117
|
-
},
|
|
118
|
-
pageSize: {
|
|
119
|
-
greaterThanOrEqual: 1,
|
|
120
|
-
lessThanOrEqual: 100
|
|
121
|
-
},
|
|
122
|
-
policyName: {
|
|
123
|
-
minLength: 1
|
|
124
|
-
}
|
|
125
|
-
};
|
|
126
|
-
const ListQuotaRequest = {
|
|
127
|
-
page: {
|
|
128
|
-
greaterThan: 0
|
|
129
|
-
},
|
|
130
|
-
pageSize: {
|
|
131
|
-
greaterThanOrEqual: 1,
|
|
132
|
-
lessThanOrEqual: 100
|
|
133
|
-
}
|
|
134
|
-
};
|
|
135
|
-
const ListRulesRequest = {
|
|
136
|
-
page: {
|
|
137
|
-
greaterThan: 0
|
|
138
|
-
},
|
|
139
|
-
pageSize: {
|
|
140
|
-
greaterThanOrEqual: 1,
|
|
141
|
-
lessThanOrEqual: 100
|
|
142
|
-
}
|
|
143
|
-
};
|
|
144
|
-
const ListSSHKeysRequest = {
|
|
145
|
-
name: {
|
|
146
|
-
maxLength: 1000,
|
|
147
|
-
minLength: 1
|
|
148
|
-
},
|
|
149
|
-
page: {
|
|
150
|
-
greaterThan: 0
|
|
151
|
-
},
|
|
152
|
-
pageSize: {
|
|
153
|
-
greaterThanOrEqual: 1,
|
|
154
|
-
lessThanOrEqual: 100
|
|
155
|
-
}
|
|
156
|
-
};
|
|
157
|
-
const ListUsersRequest = {
|
|
158
|
-
page: {
|
|
159
|
-
greaterThan: 0
|
|
160
|
-
},
|
|
161
|
-
pageSize: {
|
|
162
|
-
greaterThanOrEqual: 1,
|
|
163
|
-
lessThanOrEqual: 100
|
|
164
|
-
}
|
|
165
|
-
};
|
|
166
|
-
const UpdateAPIKeyRequest = {
|
|
167
|
-
description: {
|
|
168
|
-
maxLength: 200
|
|
169
|
-
}
|
|
170
|
-
};
|
|
171
|
-
const UpdateApplicationRequest = {
|
|
172
|
-
description: {
|
|
173
|
-
maxLength: 200
|
|
174
|
-
},
|
|
175
|
-
name: {
|
|
176
|
-
maxLength: 64,
|
|
177
|
-
minLength: 1,
|
|
178
|
-
pattern: /^[a-zA-Z0-9\(\)\._\- ]+$/
|
|
179
|
-
}
|
|
180
|
-
};
|
|
181
|
-
const UpdateGroupRequest = {
|
|
182
|
-
description: {
|
|
183
|
-
maxLength: 200
|
|
184
|
-
},
|
|
185
|
-
name: {
|
|
186
|
-
maxLength: 64,
|
|
187
|
-
minLength: 1,
|
|
188
|
-
pattern: /^[a-zA-Z0-9\(\)\._\- ]+$/
|
|
189
|
-
}
|
|
190
|
-
};
|
|
191
|
-
const UpdatePolicyRequest = {
|
|
192
|
-
description: {
|
|
193
|
-
maxLength: 200
|
|
194
|
-
},
|
|
195
|
-
name: {
|
|
196
|
-
maxLength: 64,
|
|
197
|
-
minLength: 1,
|
|
198
|
-
pattern: /^[a-zA-Z0-9\(\)\._\- ]+$/
|
|
199
|
-
}
|
|
200
|
-
};
|
|
201
|
-
const UpdateSSHKeyRequest = {
|
|
202
|
-
name: {
|
|
203
|
-
maxLength: 1000
|
|
204
|
-
}
|
|
205
|
-
};
|
|
206
|
-
|
|
207
|
-
export { CreateAPIKeyRequest, CreateApplicationRequest, CreateGroupRequest, CreatePolicyRequest, CreateSSHKeyRequest, GetQuotumRequest, ListAPIKeysRequest, ListApplicationsRequest, ListGroupsRequest, ListJWTsRequest, ListPermissionSetsRequest, ListPoliciesRequest, ListQuotaRequest, ListRulesRequest, ListSSHKeysRequest, ListUsersRequest, UpdateAPIKeyRequest, UpdateApplicationRequest, UpdateGroupRequest, UpdatePolicyRequest, UpdateSSHKeyRequest };
|