@scaleway/sdk 1.34.0 → 2.0.0-alpha.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/api/account/v2/api.gen.js +1 -1
- package/dist/api/account/v3/api.gen.js +1 -1
- package/dist/api/applesilicon/v1alpha1/api.gen.js +1 -1
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +26 -26
- package/dist/api/baremetal/v1/api.gen.js +6 -6
- package/dist/api/baremetal/v1/marshalling.gen.js +109 -120
- package/dist/api/billing/v2alpha1/api.gen.js +3 -3
- package/dist/api/billing/v2alpha1/marshalling.gen.js +9 -9
- package/dist/api/cockpit/v1beta1/api.gen.js +47 -71
- package/dist/api/cockpit/v1beta1/marshalling.gen.js +43 -63
- package/dist/api/container/v1beta1/api.gen.js +11 -11
- package/dist/api/container/v1beta1/marshalling.gen.js +76 -102
- package/dist/api/document_db/v1beta1/api.gen.js +6 -6
- package/dist/api/document_db/v1beta1/marshalling.gen.js +169 -225
- package/dist/api/domain/v2beta1/api.gen.js +45 -38
- package/dist/api/domain/v2beta1/index.gen.js +2 -0
- package/dist/api/domain/v2beta1/marshalling.gen.js +361 -575
- package/dist/api/flexibleip/v1alpha1/api.gen.js +15 -7
- package/dist/api/flexibleip/v1alpha1/marshalling.gen.js +2 -2
- package/dist/api/function/v1beta1/api.gen.js +11 -11
- package/dist/api/function/v1beta1/marshalling.gen.js +103 -129
- package/dist/api/iam/v1alpha1/api.gen.js +64 -32
- package/dist/api/iam/v1alpha1/marshalling.gen.js +68 -78
- package/dist/api/instance/v1/api.gen.js +1 -1
- package/dist/api/instance/v1/marshalling.gen.js +397 -602
- package/dist/api/iot/v1/api.gen.js +35 -27
- package/dist/api/iot/v1/marshalling.gen.js +111 -162
- package/dist/api/ipfs/v1alpha1/api.gen.js +2 -2
- package/dist/api/ipfs/v1alpha1/marshalling.gen.js +23 -27
- package/dist/api/k8s/v1/api.gen.js +3 -3
- package/dist/api/k8s/v1/marshalling.gen.js +109 -194
- package/dist/api/lb/v1/api.gen.js +583 -552
- package/dist/api/lb/v1/marshalling.gen.js +245 -361
- package/dist/api/marketplace/v1/marshalling.gen.js +11 -11
- package/dist/api/marketplace/v2/api.gen.js +6 -6
- package/dist/api/mnq/v1alpha1/api.gen.js +21 -14
- package/dist/api/mnq/v1alpha1/marshalling.gen.js +35 -40
- package/dist/api/rdb/v1/api.gen.js +7 -7
- package/dist/api/rdb/v1/marshalling.gen.js +184 -240
- package/dist/api/redis/v1/api.gen.js +1 -1
- package/dist/api/redis/v1/marshalling.gen.js +73 -97
- package/dist/api/registry/v1/api.gen.js +3 -3
- package/dist/api/registry/v1/marshalling.gen.js +5 -7
- package/dist/api/secret/v1alpha1/api.gen.js +2 -2
- package/dist/api/secret/v1alpha1/marshalling.gen.js +20 -30
- package/dist/api/tem/v1alpha1/api.gen.js +1 -1
- package/dist/api/tem/v1alpha1/marshalling.gen.js +52 -61
- package/dist/api/test/v1/api.gen.js +8 -25
- package/dist/api/test/v1/marshalling.gen.js +5 -7
- package/dist/api/vpc/v1/api.gen.js +1 -1
- package/dist/api/vpc/v2/api.gen.js +2 -2
- package/dist/api/vpc/v2/marshalling.gen.js +3 -5
- package/dist/api/vpcgw/v1/api.gen.js +6 -6
- package/dist/api/vpcgw/v1/marshalling.gen.js +36 -49
- package/dist/api/webhosting/v1alpha1/api.gen.js +56 -4
- package/dist/api/webhosting/v1alpha1/index.gen.js +1 -1
- package/dist/api/webhosting/v1alpha1/marshalling.gen.js +69 -42
- package/dist/api/webhosting/v1alpha1/validation-rules.gen.js +10 -1
- package/dist/index.cjs +3127 -3989
- package/dist/index.d.ts +9658 -12221
- package/package.json +2 -2
|
@@ -20,7 +20,7 @@ class API extends API$1 {
|
|
|
20
20
|
return _this.client.fetch({
|
|
21
21
|
method: 'GET',
|
|
22
22
|
path: `/iam/v1alpha1/ssh-keys`,
|
|
23
|
-
urlParams: urlParams(['disabled', request.disabled], ['name', request.name], ['order_by', request.orderBy
|
|
23
|
+
urlParams: urlParams(['disabled', request.disabled], ['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
24
24
|
}, unmarshalListSSHKeysResponse);
|
|
25
25
|
};
|
|
26
26
|
})();
|
|
@@ -105,7 +105,7 @@ class API extends API$1 {
|
|
|
105
105
|
return _this3.client.fetch({
|
|
106
106
|
method: 'GET',
|
|
107
107
|
path: `/iam/v1alpha1/users`,
|
|
108
|
-
urlParams: urlParams(['mfa', request.mfa], ['order_by', request.orderBy
|
|
108
|
+
urlParams: urlParams(['mfa', request.mfa], ['order_by', request.orderBy], ['organization_id', request.organizationId ?? _this3.client.settings.defaultOrganizationId], ['page', request.page], ['page_size', request.pageSize ?? _this3.client.settings.defaultPageSize], ['user_ids', request.userIds])
|
|
109
109
|
}, unmarshalListUsersResponse);
|
|
110
110
|
};
|
|
111
111
|
})();
|
|
@@ -179,7 +179,7 @@ class API extends API$1 {
|
|
|
179
179
|
return _this5.client.fetch({
|
|
180
180
|
method: 'GET',
|
|
181
181
|
path: `/iam/v1alpha1/applications`,
|
|
182
|
-
urlParams: urlParams(['application_ids', request.applicationIds], ['editable', request.editable], ['name', request.name], ['order_by', request.orderBy
|
|
182
|
+
urlParams: urlParams(['application_ids', request.applicationIds], ['editable', request.editable], ['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId ?? _this5.client.settings.defaultOrganizationId], ['page', request.page], ['page_size', request.pageSize ?? _this5.client.settings.defaultPageSize])
|
|
183
183
|
}, unmarshalListApplicationsResponse);
|
|
184
184
|
};
|
|
185
185
|
})();
|
|
@@ -268,7 +268,7 @@ class API extends API$1 {
|
|
|
268
268
|
return _this7.client.fetch({
|
|
269
269
|
method: 'GET',
|
|
270
270
|
path: `/iam/v1alpha1/groups`,
|
|
271
|
-
urlParams: urlParams(['application_ids', request.applicationIds], ['group_ids', request.groupIds], ['name', request.name], ['order_by', request.orderBy
|
|
271
|
+
urlParams: urlParams(['application_ids', request.applicationIds], ['group_ids', request.groupIds], ['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this7.client.settings.defaultPageSize], ['user_ids', request.userIds])
|
|
272
272
|
}, unmarshalListGroupsResponse);
|
|
273
273
|
};
|
|
274
274
|
})();
|
|
@@ -421,7 +421,7 @@ class API extends API$1 {
|
|
|
421
421
|
return _this9.client.fetch({
|
|
422
422
|
method: 'GET',
|
|
423
423
|
path: `/iam/v1alpha1/policies`,
|
|
424
|
-
urlParams: urlParams(['application_ids', request.applicationIds], ['editable', request.editable], ['group_ids', request.groupIds], ['no_principal', request.noPrincipal], ['order_by', request.orderBy
|
|
424
|
+
urlParams: urlParams(['application_ids', request.applicationIds], ['editable', request.editable], ['group_ids', request.groupIds], ['no_principal', request.noPrincipal], ['order_by', request.orderBy], ['organization_id', request.organizationId ?? _this9.client.settings.defaultOrganizationId], ['page', request.page], ['page_size', request.pageSize ?? _this9.client.settings.defaultPageSize], ['policy_name', request.policyName], ['user_ids', request.userIds])
|
|
425
425
|
}, unmarshalListPoliciesResponse);
|
|
426
426
|
};
|
|
427
427
|
})();
|
|
@@ -536,11 +536,19 @@ class API extends API$1 {
|
|
|
536
536
|
method: 'PUT',
|
|
537
537
|
path: `/iam/v1alpha1/rules`
|
|
538
538
|
}, unmarshalSetRulesResponse);
|
|
539
|
-
pageOfListRules =
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
539
|
+
pageOfListRules = (() => {
|
|
540
|
+
var _this11 = this;
|
|
541
|
+
return function (request) {
|
|
542
|
+
if (request === void 0) {
|
|
543
|
+
request = {};
|
|
544
|
+
}
|
|
545
|
+
return _this11.client.fetch({
|
|
546
|
+
method: 'GET',
|
|
547
|
+
path: `/iam/v1alpha1/rules`,
|
|
548
|
+
urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? _this11.client.settings.defaultPageSize], ['policy_id', request.policyId])
|
|
549
|
+
}, unmarshalListRulesResponse);
|
|
550
|
+
};
|
|
551
|
+
})();
|
|
544
552
|
|
|
545
553
|
/**
|
|
546
554
|
* List rules of a given policy. List the rules of a given policy. By default,
|
|
@@ -551,17 +559,25 @@ class API extends API$1 {
|
|
|
551
559
|
* @param request - The request {@link ListRulesRequest}
|
|
552
560
|
* @returns A Promise of ListRulesResponse
|
|
553
561
|
*/
|
|
554
|
-
listRules =
|
|
562
|
+
listRules = (() => {
|
|
563
|
+
var _this12 = this;
|
|
564
|
+
return function (request) {
|
|
565
|
+
if (request === void 0) {
|
|
566
|
+
request = {};
|
|
567
|
+
}
|
|
568
|
+
return enrichForPagination('rules', _this12.pageOfListRules, request);
|
|
569
|
+
};
|
|
570
|
+
})();
|
|
555
571
|
pageOfListPermissionSets = (() => {
|
|
556
|
-
var
|
|
572
|
+
var _this13 = this;
|
|
557
573
|
return function (request) {
|
|
558
574
|
if (request === void 0) {
|
|
559
575
|
request = {};
|
|
560
576
|
}
|
|
561
|
-
return
|
|
577
|
+
return _this13.client.fetch({
|
|
562
578
|
method: 'GET',
|
|
563
579
|
path: `/iam/v1alpha1/permission-sets`,
|
|
564
|
-
urlParams: urlParams(['order_by', request.orderBy
|
|
580
|
+
urlParams: urlParams(['order_by', request.orderBy], ['organization_id', request.organizationId ?? _this13.client.settings.defaultOrganizationId], ['page', request.page], ['page_size', request.pageSize ?? _this13.client.settings.defaultPageSize])
|
|
565
581
|
}, unmarshalListPermissionSetsResponse);
|
|
566
582
|
};
|
|
567
583
|
})();
|
|
@@ -575,24 +591,24 @@ class API extends API$1 {
|
|
|
575
591
|
* @returns A Promise of ListPermissionSetsResponse
|
|
576
592
|
*/
|
|
577
593
|
listPermissionSets = (() => {
|
|
578
|
-
var
|
|
594
|
+
var _this14 = this;
|
|
579
595
|
return function (request) {
|
|
580
596
|
if (request === void 0) {
|
|
581
597
|
request = {};
|
|
582
598
|
}
|
|
583
|
-
return enrichForPagination('permissionSets',
|
|
599
|
+
return enrichForPagination('permissionSets', _this14.pageOfListPermissionSets, request);
|
|
584
600
|
};
|
|
585
601
|
})();
|
|
586
602
|
pageOfListAPIKeys = (() => {
|
|
587
|
-
var
|
|
603
|
+
var _this15 = this;
|
|
588
604
|
return function (request) {
|
|
589
605
|
if (request === void 0) {
|
|
590
606
|
request = {};
|
|
591
607
|
}
|
|
592
|
-
return
|
|
608
|
+
return _this15.client.fetch({
|
|
593
609
|
method: 'GET',
|
|
594
610
|
path: `/iam/v1alpha1/api-keys`,
|
|
595
|
-
urlParams: urlParams(['access_key', request.accessKey], ['bearer_id', request.bearerId], ['bearer_type', request.bearerType
|
|
611
|
+
urlParams: urlParams(['access_key', request.accessKey], ['bearer_id', request.bearerId], ['bearer_type', request.bearerType], ['description', request.description], ['editable', request.editable], ['expired', request.expired], ['order_by', request.orderBy], ['organization_id', request.organizationId ?? _this15.client.settings.defaultOrganizationId], ['page', request.page], ['page_size', request.pageSize ?? _this15.client.settings.defaultPageSize], ...Object.entries(resolveOneOf([{
|
|
596
612
|
param: 'application_id',
|
|
597
613
|
value: request.applicationId
|
|
598
614
|
}, {
|
|
@@ -613,12 +629,12 @@ class API extends API$1 {
|
|
|
613
629
|
* @returns A Promise of ListAPIKeysResponse
|
|
614
630
|
*/
|
|
615
631
|
listAPIKeys = (() => {
|
|
616
|
-
var
|
|
632
|
+
var _this16 = this;
|
|
617
633
|
return function (request) {
|
|
618
634
|
if (request === void 0) {
|
|
619
635
|
request = {};
|
|
620
636
|
}
|
|
621
|
-
return enrichForPagination('apiKeys',
|
|
637
|
+
return enrichForPagination('apiKeys', _this16.pageOfListAPIKeys, request);
|
|
622
638
|
};
|
|
623
639
|
})();
|
|
624
640
|
|
|
@@ -682,15 +698,15 @@ class API extends API$1 {
|
|
|
682
698
|
path: `/iam/v1alpha1/api-keys/${validatePathParam('accessKey', request.accessKey)}`
|
|
683
699
|
});
|
|
684
700
|
pageOfListQuota = (() => {
|
|
685
|
-
var
|
|
701
|
+
var _this17 = this;
|
|
686
702
|
return function (request) {
|
|
687
703
|
if (request === void 0) {
|
|
688
704
|
request = {};
|
|
689
705
|
}
|
|
690
|
-
return
|
|
706
|
+
return _this17.client.fetch({
|
|
691
707
|
method: 'GET',
|
|
692
708
|
path: `/iam/v1alpha1/quota`,
|
|
693
|
-
urlParams: urlParams(['order_by', request.orderBy
|
|
709
|
+
urlParams: urlParams(['order_by', request.orderBy], ['organization_id', request.organizationId ?? _this17.client.settings.defaultOrganizationId], ['page', request.page], ['page_size', request.pageSize ?? _this17.client.settings.defaultPageSize])
|
|
694
710
|
}, unmarshalListQuotaResponse);
|
|
695
711
|
};
|
|
696
712
|
})();
|
|
@@ -706,12 +722,12 @@ class API extends API$1 {
|
|
|
706
722
|
* @returns A Promise of ListQuotaResponse
|
|
707
723
|
*/
|
|
708
724
|
listQuota = (() => {
|
|
709
|
-
var
|
|
725
|
+
var _this18 = this;
|
|
710
726
|
return function (request) {
|
|
711
727
|
if (request === void 0) {
|
|
712
728
|
request = {};
|
|
713
729
|
}
|
|
714
|
-
return enrichForPagination('quota',
|
|
730
|
+
return enrichForPagination('quota', _this18.pageOfListQuota, request);
|
|
715
731
|
};
|
|
716
732
|
})();
|
|
717
733
|
|
|
@@ -728,11 +744,19 @@ class API extends API$1 {
|
|
|
728
744
|
path: `/iam/v1alpha1/quota/${validatePathParam('quotumName', request.quotumName)}`,
|
|
729
745
|
urlParams: urlParams(['organization_id', request.organizationId ?? this.client.settings.defaultOrganizationId])
|
|
730
746
|
}, unmarshalQuotum);
|
|
731
|
-
pageOfListJWTs =
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
747
|
+
pageOfListJWTs = (() => {
|
|
748
|
+
var _this19 = this;
|
|
749
|
+
return function (request) {
|
|
750
|
+
if (request === void 0) {
|
|
751
|
+
request = {};
|
|
752
|
+
}
|
|
753
|
+
return _this19.client.fetch({
|
|
754
|
+
method: 'GET',
|
|
755
|
+
path: `/iam/v1alpha1/jwts`,
|
|
756
|
+
urlParams: urlParams(['audience_id', request.audienceId], ['expired', request.expired], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this19.client.settings.defaultPageSize])
|
|
757
|
+
}, unmarshalListJWTsResponse);
|
|
758
|
+
};
|
|
759
|
+
})();
|
|
736
760
|
|
|
737
761
|
/**
|
|
738
762
|
* List JWTs.
|
|
@@ -740,7 +764,15 @@ class API extends API$1 {
|
|
|
740
764
|
* @param request - The request {@link ListJWTsRequest}
|
|
741
765
|
* @returns A Promise of ListJWTsResponse
|
|
742
766
|
*/
|
|
743
|
-
listJWTs =
|
|
767
|
+
listJWTs = (() => {
|
|
768
|
+
var _this20 = this;
|
|
769
|
+
return function (request) {
|
|
770
|
+
if (request === void 0) {
|
|
771
|
+
request = {};
|
|
772
|
+
}
|
|
773
|
+
return enrichForPagination('jwts', _this20.pageOfListJWTs, request);
|
|
774
|
+
};
|
|
775
|
+
})();
|
|
744
776
|
|
|
745
777
|
/**
|
|
746
778
|
* Get a JWT.
|
|
@@ -4,22 +4,37 @@ import { unmarshalDate, unmarshalArrayOfObject, resolveOneOf } from '../../../he
|
|
|
4
4
|
|
|
5
5
|
// This file was automatically generated. DO NOT EDIT.
|
|
6
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
|
+
};
|
|
7
22
|
const unmarshalAPIKey = data => {
|
|
8
23
|
if (!isJSONObject(data)) {
|
|
9
24
|
throw new TypeError(`Unmarshalling the type 'APIKey' failed as data isn't a dictionary.`);
|
|
10
25
|
}
|
|
11
26
|
return {
|
|
12
27
|
accessKey: data.access_key,
|
|
13
|
-
applicationId: data.application_id,
|
|
28
|
+
applicationId: data.application_id ? data.application_id : undefined,
|
|
14
29
|
createdAt: unmarshalDate(data.created_at),
|
|
15
30
|
creationIp: data.creation_ip,
|
|
16
31
|
defaultProjectId: data.default_project_id,
|
|
17
32
|
description: data.description,
|
|
18
33
|
editable: data.editable,
|
|
19
34
|
expiresAt: unmarshalDate(data.expires_at),
|
|
20
|
-
secretKey: data.secret_key,
|
|
35
|
+
secretKey: data.secret_key ? data.secret_key : undefined,
|
|
21
36
|
updatedAt: unmarshalDate(data.updated_at),
|
|
22
|
-
userId: data.user_id
|
|
37
|
+
userId: data.user_id ? data.user_id : undefined
|
|
23
38
|
};
|
|
24
39
|
};
|
|
25
40
|
const unmarshalApplication = data => {
|
|
@@ -52,52 +67,25 @@ const unmarshalGroup = data => {
|
|
|
52
67
|
userIds: data.user_ids
|
|
53
68
|
};
|
|
54
69
|
};
|
|
55
|
-
const unmarshalJWT = data => {
|
|
56
|
-
if (!isJSONObject(data)) {
|
|
57
|
-
throw new TypeError(`Unmarshalling the type 'JWT' failed as data isn't a dictionary.`);
|
|
58
|
-
}
|
|
59
|
-
return {
|
|
60
|
-
audienceId: data.audience_id,
|
|
61
|
-
createdAt: unmarshalDate(data.created_at),
|
|
62
|
-
expiresAt: unmarshalDate(data.expires_at),
|
|
63
|
-
ip: data.ip,
|
|
64
|
-
issuerId: data.issuer_id,
|
|
65
|
-
jti: data.jti,
|
|
66
|
-
updatedAt: unmarshalDate(data.updated_at),
|
|
67
|
-
userAgent: data.user_agent
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
const unmarshalPermissionSet = data => {
|
|
71
|
-
if (!isJSONObject(data)) {
|
|
72
|
-
throw new TypeError(`Unmarshalling the type 'PermissionSet' failed as data isn't a dictionary.`);
|
|
73
|
-
}
|
|
74
|
-
return {
|
|
75
|
-
categories: data.categories,
|
|
76
|
-
description: data.description,
|
|
77
|
-
id: data.id,
|
|
78
|
-
name: data.name,
|
|
79
|
-
scopeType: data.scope_type
|
|
80
|
-
};
|
|
81
|
-
};
|
|
82
70
|
const unmarshalPolicy = data => {
|
|
83
71
|
if (!isJSONObject(data)) {
|
|
84
72
|
throw new TypeError(`Unmarshalling the type 'Policy' failed as data isn't a dictionary.`);
|
|
85
73
|
}
|
|
86
74
|
return {
|
|
87
|
-
applicationId: data.application_id,
|
|
75
|
+
applicationId: data.application_id ? data.application_id : undefined,
|
|
88
76
|
createdAt: unmarshalDate(data.created_at),
|
|
89
77
|
description: data.description,
|
|
90
78
|
editable: data.editable,
|
|
91
|
-
groupId: data.group_id,
|
|
79
|
+
groupId: data.group_id ? data.group_id : undefined,
|
|
92
80
|
id: data.id,
|
|
93
81
|
name: data.name,
|
|
94
82
|
nbPermissionSets: data.nb_permission_sets,
|
|
95
83
|
nbRules: data.nb_rules,
|
|
96
84
|
nbScopes: data.nb_scopes,
|
|
97
|
-
noPrincipal: data.no_principal,
|
|
85
|
+
noPrincipal: data.no_principal ? data.no_principal : undefined,
|
|
98
86
|
organizationId: data.organization_id,
|
|
99
87
|
updatedAt: unmarshalDate(data.updated_at),
|
|
100
|
-
userId: data.user_id
|
|
88
|
+
userId: data.user_id ? data.user_id : undefined
|
|
101
89
|
};
|
|
102
90
|
};
|
|
103
91
|
const unmarshalQuotum = data => {
|
|
@@ -105,22 +93,9 @@ const unmarshalQuotum = data => {
|
|
|
105
93
|
throw new TypeError(`Unmarshalling the type 'Quotum' failed as data isn't a dictionary.`);
|
|
106
94
|
}
|
|
107
95
|
return {
|
|
108
|
-
limit: data.limit,
|
|
96
|
+
limit: data.limit ? data.limit : undefined,
|
|
109
97
|
name: data.name,
|
|
110
|
-
unlimited: data.unlimited
|
|
111
|
-
};
|
|
112
|
-
};
|
|
113
|
-
const unmarshalRule = data => {
|
|
114
|
-
if (!isJSONObject(data)) {
|
|
115
|
-
throw new TypeError(`Unmarshalling the type 'Rule' failed as data isn't a dictionary.`);
|
|
116
|
-
}
|
|
117
|
-
return {
|
|
118
|
-
accountRootUserId: data.account_root_user_id,
|
|
119
|
-
id: data.id,
|
|
120
|
-
organizationId: data.organization_id,
|
|
121
|
-
permissionSetNames: data.permission_set_names,
|
|
122
|
-
permissionSetsScopeType: data.permission_sets_scope_type,
|
|
123
|
-
projectIds: data.project_ids
|
|
98
|
+
unlimited: data.unlimited ? data.unlimited : undefined
|
|
124
99
|
};
|
|
125
100
|
};
|
|
126
101
|
const unmarshalSSHKey = data => {
|
|
@@ -153,7 +128,7 @@ const unmarshalUser = data => {
|
|
|
153
128
|
mfa: data.mfa,
|
|
154
129
|
organizationId: data.organization_id,
|
|
155
130
|
status: data.status,
|
|
156
|
-
twoFactorEnabled: data.two_factor_enabled,
|
|
131
|
+
twoFactorEnabled: data.two_factor_enabled ? data.two_factor_enabled : undefined,
|
|
157
132
|
type: data.type,
|
|
158
133
|
updatedAt: unmarshalDate(data.updated_at)
|
|
159
134
|
};
|
|
@@ -194,6 +169,18 @@ const unmarshalListJWTsResponse = data => {
|
|
|
194
169
|
totalCount: data.total_count
|
|
195
170
|
};
|
|
196
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
|
+
};
|
|
197
184
|
const unmarshalListPermissionSetsResponse = data => {
|
|
198
185
|
if (!isJSONObject(data)) {
|
|
199
186
|
throw new TypeError(`Unmarshalling the type 'ListPermissionSetsResponse' failed as data isn't a dictionary.`);
|
|
@@ -221,6 +208,19 @@ const unmarshalListQuotaResponse = data => {
|
|
|
221
208
|
totalCount: data.total_count
|
|
222
209
|
};
|
|
223
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
224
|
const unmarshalListRulesResponse = data => {
|
|
225
225
|
if (!isJSONObject(data)) {
|
|
226
226
|
throw new TypeError(`Unmarshalling the type 'ListRulesResponse' failed as data isn't a dictionary.`);
|
|
@@ -256,23 +256,13 @@ const unmarshalSetRulesResponse = data => {
|
|
|
256
256
|
rules: unmarshalArrayOfObject(data.rules, unmarshalRule)
|
|
257
257
|
};
|
|
258
258
|
};
|
|
259
|
-
const marshalRuleSpecs = (request, defaults) => ({
|
|
260
|
-
permission_set_names: request.permissionSetNames,
|
|
261
|
-
...resolveOneOf([{
|
|
262
|
-
param: 'project_ids',
|
|
263
|
-
value: request.projectIds
|
|
264
|
-
}, {
|
|
265
|
-
param: 'organization_id',
|
|
266
|
-
value: request.organizationId
|
|
267
|
-
}])
|
|
268
|
-
});
|
|
269
259
|
const marshalAddGroupMemberRequest = (request, defaults) => ({
|
|
270
260
|
...resolveOneOf([{
|
|
271
|
-
param: 'user_id',
|
|
272
|
-
value: request.userId
|
|
273
|
-
}, {
|
|
274
261
|
param: 'application_id',
|
|
275
262
|
value: request.applicationId
|
|
263
|
+
}, {
|
|
264
|
+
param: 'user_id',
|
|
265
|
+
value: request.userId
|
|
276
266
|
}])
|
|
277
267
|
});
|
|
278
268
|
const marshalAddGroupMembersRequest = (request, defaults) => ({
|
|
@@ -305,19 +295,19 @@ const marshalCreatePolicyRequest = (request, defaults) => ({
|
|
|
305
295
|
description: request.description,
|
|
306
296
|
name: request.name || randomName('pol'),
|
|
307
297
|
organization_id: request.organizationId ?? defaults.defaultOrganizationId,
|
|
308
|
-
rules: request.rules
|
|
298
|
+
rules: request.rules,
|
|
309
299
|
...resolveOneOf([{
|
|
310
|
-
param: '
|
|
311
|
-
value: request.
|
|
300
|
+
param: 'application_id',
|
|
301
|
+
value: request.applicationId
|
|
312
302
|
}, {
|
|
313
303
|
param: 'group_id',
|
|
314
304
|
value: request.groupId
|
|
315
|
-
}, {
|
|
316
|
-
param: 'application_id',
|
|
317
|
-
value: request.applicationId
|
|
318
305
|
}, {
|
|
319
306
|
param: 'no_principal',
|
|
320
307
|
value: request.noPrincipal
|
|
308
|
+
}, {
|
|
309
|
+
param: 'user_id',
|
|
310
|
+
value: request.userId
|
|
321
311
|
}])
|
|
322
312
|
});
|
|
323
313
|
const marshalCreateSSHKeyRequest = (request, defaults) => ({
|
|
@@ -331,11 +321,11 @@ const marshalCreateUserRequest = (request, defaults) => ({
|
|
|
331
321
|
});
|
|
332
322
|
const marshalRemoveGroupMemberRequest = (request, defaults) => ({
|
|
333
323
|
...resolveOneOf([{
|
|
334
|
-
param: 'user_id',
|
|
335
|
-
value: request.userId
|
|
336
|
-
}, {
|
|
337
324
|
param: 'application_id',
|
|
338
325
|
value: request.applicationId
|
|
326
|
+
}, {
|
|
327
|
+
param: 'user_id',
|
|
328
|
+
value: request.userId
|
|
339
329
|
}])
|
|
340
330
|
});
|
|
341
331
|
const marshalSetGroupMembersRequest = (request, defaults) => ({
|
|
@@ -344,7 +334,7 @@ const marshalSetGroupMembersRequest = (request, defaults) => ({
|
|
|
344
334
|
});
|
|
345
335
|
const marshalSetRulesRequest = (request, defaults) => ({
|
|
346
336
|
policy_id: request.policyId,
|
|
347
|
-
rules: request.rules
|
|
337
|
+
rules: request.rules
|
|
348
338
|
});
|
|
349
339
|
const marshalUpdateAPIKeyRequest = (request, defaults) => ({
|
|
350
340
|
default_project_id: request.defaultProjectId,
|
|
@@ -362,17 +352,17 @@ const marshalUpdatePolicyRequest = (request, defaults) => ({
|
|
|
362
352
|
description: request.description,
|
|
363
353
|
name: request.name,
|
|
364
354
|
...resolveOneOf([{
|
|
365
|
-
param: '
|
|
366
|
-
value: request.
|
|
355
|
+
param: 'application_id',
|
|
356
|
+
value: request.applicationId
|
|
367
357
|
}, {
|
|
368
358
|
param: 'group_id',
|
|
369
359
|
value: request.groupId
|
|
370
|
-
}, {
|
|
371
|
-
param: 'application_id',
|
|
372
|
-
value: request.applicationId
|
|
373
360
|
}, {
|
|
374
361
|
param: 'no_principal',
|
|
375
362
|
value: request.noPrincipal
|
|
363
|
+
}, {
|
|
364
|
+
param: 'user_id',
|
|
365
|
+
value: request.userId
|
|
376
366
|
}])
|
|
377
367
|
});
|
|
378
368
|
const marshalUpdateSSHKeyRequest = (request, defaults) => ({
|
|
@@ -83,7 +83,7 @@ class API extends API$1 {
|
|
|
83
83
|
return _this4.client.fetch({
|
|
84
84
|
method: 'GET',
|
|
85
85
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this4.client.settings.defaultZone)}/servers`,
|
|
86
|
-
urlParams: urlParams(['commercial_type', request.commercialType], ['name', request.name], ['order', request.order], ['organization', request.organization], ['page', request.page], ['per_page', request.perPage ?? _this4.client.settings.defaultPageSize], ['private_ip', request.privateIp], ['private_network', request.privateNetwork], ['private_networks', request.privateNetworks && request.privateNetworks.length > 0 ? request.privateNetworks.join(',') : undefined], ['private_nic_mac_address', request.privateNicMacAddress], ['project', request.project], ['
|
|
86
|
+
urlParams: urlParams(['commercial_type', request.commercialType], ['name', request.name], ['order', request.order], ['organization', request.organization], ['page', request.page], ['per_page', request.perPage ?? _this4.client.settings.defaultPageSize], ['private_ip', request.privateIp], ['private_network', request.privateNetwork], ['private_networks', request.privateNetworks && request.privateNetworks.length > 0 ? request.privateNetworks.join(',') : undefined], ['private_nic_mac_address', request.privateNicMacAddress], ['project', request.project], ['state', request.state], ['tags', request.tags && request.tags.length > 0 ? request.tags.join(',') : undefined], ['without_ip', request.withoutIp])
|
|
87
87
|
}, unmarshalListServersResponse);
|
|
88
88
|
};
|
|
89
89
|
})();
|