@scaleway/sdk-iam 2.3.0 → 2.3.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.
@@ -14,10 +14,7 @@ class API extends API$1 {
14
14
  ["order_by", request.orderBy],
15
15
  ["organization_id", request.organizationId],
16
16
  ["page", request.page],
17
- [
18
- "page_size",
19
- request.pageSize ?? this.client.settings.defaultPageSize
20
- ],
17
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
21
18
  ["project_id", request.projectId]
22
19
  )
23
20
  },
@@ -82,10 +79,12 @@ class API extends API$1 {
82
79
  *
83
80
  * @param request - The request {@link DeleteSSHKeyRequest}
84
81
  */
85
- deleteSSHKey = (request) => this.client.fetch({
86
- method: "DELETE",
87
- path: `/iam/v1alpha1/ssh-keys/${validatePathParam("sshKeyId", request.sshKeyId)}`
88
- });
82
+ deleteSSHKey = (request) => this.client.fetch(
83
+ {
84
+ method: "DELETE",
85
+ path: `/iam/v1alpha1/ssh-keys/${validatePathParam("sshKeyId", request.sshKeyId)}`
86
+ }
87
+ );
89
88
  pageOfListUsers = (request = {}) => this.client.fetch(
90
89
  {
91
90
  method: "GET",
@@ -93,15 +92,9 @@ class API extends API$1 {
93
92
  urlParams: urlParams(
94
93
  ["mfa", request.mfa],
95
94
  ["order_by", request.orderBy],
96
- [
97
- "organization_id",
98
- request.organizationId ?? this.client.settings.defaultOrganizationId
99
- ],
95
+ ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId],
100
96
  ["page", request.page],
101
- [
102
- "page_size",
103
- request.pageSize ?? this.client.settings.defaultPageSize
104
- ],
97
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
105
98
  ["tag", request.tag],
106
99
  ["type", request.type],
107
100
  ["user_ids", request.userIds]
@@ -151,10 +144,12 @@ class API extends API$1 {
151
144
  *
152
145
  * @param request - The request {@link DeleteUserRequest}
153
146
  */
154
- deleteUser = (request) => this.client.fetch({
155
- method: "DELETE",
156
- path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}`
157
- });
147
+ deleteUser = (request) => this.client.fetch(
148
+ {
149
+ method: "DELETE",
150
+ path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}`
151
+ }
152
+ );
158
153
  /**
159
154
  * Create a new user. Create a new user. You must define the `organization_id` in your request. If you are adding a member, enter the member's details. If you are adding a guest, you must define the `email` and not add the member attribute.
160
155
  *
@@ -243,12 +238,14 @@ class API extends API$1 {
243
238
  *
244
239
  * @param request - The request {@link DeleteUserMFAOTPRequest}
245
240
  */
246
- deleteUserMFAOTP = (request) => this.client.fetch({
247
- body: "{}",
248
- headers: jsonContentHeaders,
249
- method: "DELETE",
250
- path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}/mfa-otp`
251
- });
241
+ deleteUserMFAOTP = (request) => this.client.fetch(
242
+ {
243
+ body: "{}",
244
+ headers: jsonContentHeaders,
245
+ method: "DELETE",
246
+ path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}/mfa-otp`
247
+ }
248
+ );
252
249
  /**
253
250
  * Lock a member. Lock a member. A locked member cannot log in or use API keys until the locked status is removed.
254
251
  *
@@ -289,7 +286,9 @@ class API extends API$1 {
289
286
  {
290
287
  method: "GET",
291
288
  path: `/iam/v1alpha1/grace-periods`,
292
- urlParams: urlParams(["user_id", request.userId])
289
+ urlParams: urlParams(
290
+ ["user_id", request.userId]
291
+ )
293
292
  },
294
293
  unmarshalListGracePeriodsResponse
295
294
  );
@@ -309,22 +308,26 @@ class API extends API$1 {
309
308
  },
310
309
  unmarshalInitiateUserConnectionResponse
311
310
  );
312
- joinUserConnection = (request) => this.client.fetch({
313
- body: JSON.stringify(
314
- marshalJoinUserConnectionRequest(request, this.client.settings)
315
- ),
316
- headers: jsonContentHeaders,
317
- method: "POST",
318
- path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}/join-connection`
319
- });
320
- removeUserConnection = (request) => this.client.fetch({
321
- body: JSON.stringify(
322
- marshalRemoveUserConnectionRequest(request, this.client.settings)
323
- ),
324
- headers: jsonContentHeaders,
325
- method: "POST",
326
- path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}/remove-connection`
327
- });
311
+ joinUserConnection = (request) => this.client.fetch(
312
+ {
313
+ body: JSON.stringify(
314
+ marshalJoinUserConnectionRequest(request, this.client.settings)
315
+ ),
316
+ headers: jsonContentHeaders,
317
+ method: "POST",
318
+ path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}/join-connection`
319
+ }
320
+ );
321
+ removeUserConnection = (request) => this.client.fetch(
322
+ {
323
+ body: JSON.stringify(
324
+ marshalRemoveUserConnectionRequest(request, this.client.settings)
325
+ ),
326
+ headers: jsonContentHeaders,
327
+ method: "POST",
328
+ path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}/remove-connection`
329
+ }
330
+ );
328
331
  pageOfListApplications = (request = {}) => this.client.fetch(
329
332
  {
330
333
  method: "GET",
@@ -334,15 +337,9 @@ class API extends API$1 {
334
337
  ["editable", request.editable],
335
338
  ["name", request.name],
336
339
  ["order_by", request.orderBy],
337
- [
338
- "organization_id",
339
- request.organizationId ?? this.client.settings.defaultOrganizationId
340
- ],
340
+ ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId],
341
341
  ["page", request.page],
342
- [
343
- "page_size",
344
- request.pageSize ?? this.client.settings.defaultPageSize
345
- ],
342
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
346
343
  ["tag", request.tag]
347
344
  )
348
345
  },
@@ -407,10 +404,12 @@ class API extends API$1 {
407
404
  *
408
405
  * @param request - The request {@link DeleteApplicationRequest}
409
406
  */
410
- deleteApplication = (request) => this.client.fetch({
411
- method: "DELETE",
412
- path: `/iam/v1alpha1/applications/${validatePathParam("applicationId", request.applicationId)}`
413
- });
407
+ deleteApplication = (request) => this.client.fetch(
408
+ {
409
+ method: "DELETE",
410
+ path: `/iam/v1alpha1/applications/${validatePathParam("applicationId", request.applicationId)}`
411
+ }
412
+ );
414
413
  pageOfListGroups = (request = {}) => this.client.fetch(
415
414
  {
416
415
  method: "GET",
@@ -420,15 +419,9 @@ class API extends API$1 {
420
419
  ["group_ids", request.groupIds],
421
420
  ["name", request.name],
422
421
  ["order_by", request.orderBy],
423
- [
424
- "organization_id",
425
- request.organizationId ?? this.client.settings.defaultOrganizationId
426
- ],
422
+ ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId],
427
423
  ["page", request.page],
428
- [
429
- "page_size",
430
- request.pageSize ?? this.client.settings.defaultPageSize
431
- ],
424
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
432
425
  ["tag", request.tag],
433
426
  ["user_ids", request.userIds]
434
427
  )
@@ -562,10 +555,12 @@ class API extends API$1 {
562
555
  *
563
556
  * @param request - The request {@link DeleteGroupRequest}
564
557
  */
565
- deleteGroup = (request) => this.client.fetch({
566
- method: "DELETE",
567
- path: `/iam/v1alpha1/groups/${validatePathParam("groupId", request.groupId)}`
568
- });
558
+ deleteGroup = (request) => this.client.fetch(
559
+ {
560
+ method: "DELETE",
561
+ path: `/iam/v1alpha1/groups/${validatePathParam("groupId", request.groupId)}`
562
+ }
563
+ );
569
564
  pageOfListPolicies = (request = {}) => this.client.fetch(
570
565
  {
571
566
  method: "GET",
@@ -576,15 +571,9 @@ class API extends API$1 {
576
571
  ["group_ids", request.groupIds],
577
572
  ["no_principal", request.noPrincipal],
578
573
  ["order_by", request.orderBy],
579
- [
580
- "organization_id",
581
- request.organizationId ?? this.client.settings.defaultOrganizationId
582
- ],
574
+ ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId],
583
575
  ["page", request.page],
584
- [
585
- "page_size",
586
- request.pageSize ?? this.client.settings.defaultPageSize
587
- ],
576
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
588
577
  ["policy_ids", request.policyIds],
589
578
  ["policy_name", request.policyName],
590
579
  ["tag", request.tag],
@@ -652,10 +641,12 @@ class API extends API$1 {
652
641
  *
653
642
  * @param request - The request {@link DeletePolicyRequest}
654
643
  */
655
- deletePolicy = (request) => this.client.fetch({
656
- method: "DELETE",
657
- path: `/iam/v1alpha1/policies/${validatePathParam("policyId", request.policyId)}`
658
- });
644
+ deletePolicy = (request) => this.client.fetch(
645
+ {
646
+ method: "DELETE",
647
+ path: `/iam/v1alpha1/policies/${validatePathParam("policyId", request.policyId)}`
648
+ }
649
+ );
659
650
  /**
660
651
  * Clone a policy. Clone a policy. You must define specify the `policy_id` parameter in your request.
661
652
  *
@@ -694,10 +685,7 @@ class API extends API$1 {
694
685
  path: `/iam/v1alpha1/rules`,
695
686
  urlParams: urlParams(
696
687
  ["page", request.page],
697
- [
698
- "page_size",
699
- request.pageSize ?? this.client.settings.defaultPageSize
700
- ],
688
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
701
689
  ["policy_id", request.policyId]
702
690
  )
703
691
  },
@@ -716,15 +704,9 @@ class API extends API$1 {
716
704
  path: `/iam/v1alpha1/permission-sets`,
717
705
  urlParams: urlParams(
718
706
  ["order_by", request.orderBy],
719
- [
720
- "organization_id",
721
- request.organizationId ?? this.client.settings.defaultOrganizationId
722
- ],
707
+ ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId],
723
708
  ["page", request.page],
724
- [
725
- "page_size",
726
- request.pageSize ?? this.client.settings.defaultPageSize
727
- ]
709
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
728
710
  )
729
711
  },
730
712
  unmarshalListPermissionSetsResponse
@@ -735,11 +717,7 @@ class API extends API$1 {
735
717
  * @param request - The request {@link ListPermissionSetsRequest}
736
718
  * @returns A Promise of ListPermissionSetsResponse
737
719
  */
738
- listPermissionSets = (request = {}) => enrichForPagination(
739
- "permissionSets",
740
- this.pageOfListPermissionSets,
741
- request
742
- );
720
+ listPermissionSets = (request = {}) => enrichForPagination("permissionSets", this.pageOfListPermissionSets, request);
743
721
  pageOfListAPIKeys = (request = {}) => this.client.fetch(
744
722
  {
745
723
  method: "GET",
@@ -753,21 +731,19 @@ class API extends API$1 {
753
731
  ["editable", request.editable],
754
732
  ["expired", request.expired],
755
733
  ["order_by", request.orderBy],
756
- [
757
- "organization_id",
758
- request.organizationId ?? this.client.settings.defaultOrganizationId
759
- ],
734
+ ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId],
760
735
  ["page", request.page],
761
- [
762
- "page_size",
763
- request.pageSize ?? this.client.settings.defaultPageSize
764
- ],
765
- ...Object.entries(
766
- resolveOneOf([
767
- { param: "application_id", value: request.applicationId },
768
- { param: "user_id", value: request.userId }
769
- ])
770
- )
736
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
737
+ ...Object.entries(resolveOneOf([
738
+ {
739
+ param: "application_id",
740
+ value: request.applicationId
741
+ },
742
+ {
743
+ param: "user_id",
744
+ value: request.userId
745
+ }
746
+ ]))
771
747
  )
772
748
  },
773
749
  unmarshalListAPIKeysResponse
@@ -831,25 +807,21 @@ class API extends API$1 {
831
807
  *
832
808
  * @param request - The request {@link DeleteAPIKeyRequest}
833
809
  */
834
- deleteAPIKey = (request) => this.client.fetch({
835
- method: "DELETE",
836
- path: `/iam/v1alpha1/api-keys/${validatePathParam("accessKey", request.accessKey)}`
837
- });
810
+ deleteAPIKey = (request) => this.client.fetch(
811
+ {
812
+ method: "DELETE",
813
+ path: `/iam/v1alpha1/api-keys/${validatePathParam("accessKey", request.accessKey)}`
814
+ }
815
+ );
838
816
  pageOfListQuota = (request = {}) => this.client.fetch(
839
817
  {
840
818
  method: "GET",
841
819
  path: `/iam/v1alpha1/quota`,
842
820
  urlParams: urlParams(
843
821
  ["order_by", request.orderBy],
844
- [
845
- "organization_id",
846
- request.organizationId ?? this.client.settings.defaultOrganizationId
847
- ],
822
+ ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId],
848
823
  ["page", request.page],
849
- [
850
- "page_size",
851
- request.pageSize ?? this.client.settings.defaultPageSize
852
- ],
824
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
853
825
  ["quotum_names", request.quotumNames]
854
826
  )
855
827
  },
@@ -872,10 +844,9 @@ class API extends API$1 {
872
844
  {
873
845
  method: "GET",
874
846
  path: `/iam/v1alpha1/quota/${validatePathParam("quotumName", request.quotumName)}`,
875
- urlParams: urlParams([
876
- "organization_id",
877
- request.organizationId ?? this.client.settings.defaultOrganizationId
878
- ])
847
+ urlParams: urlParams(
848
+ ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId]
849
+ )
879
850
  },
880
851
  unmarshalQuotum
881
852
  );
@@ -888,10 +859,7 @@ class API extends API$1 {
888
859
  ["expired", request.expired],
889
860
  ["order_by", request.orderBy],
890
861
  ["page", request.page],
891
- [
892
- "page_size",
893
- request.pageSize ?? this.client.settings.defaultPageSize
894
- ]
862
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
895
863
  )
896
864
  },
897
865
  unmarshalListJWTsResponse
@@ -938,10 +906,12 @@ class API extends API$1 {
938
906
  *
939
907
  * @param request - The request {@link DeleteJWTRequest}
940
908
  */
941
- deleteJWT = (request) => this.client.fetch({
942
- method: "DELETE",
943
- path: `/iam/v1alpha1/jwts/${validatePathParam("jti", request.jti)}`
944
- });
909
+ deleteJWT = (request) => this.client.fetch(
910
+ {
911
+ method: "DELETE",
912
+ path: `/iam/v1alpha1/jwts/${validatePathParam("jti", request.jti)}`
913
+ }
914
+ );
945
915
  pageOfListLogs = (request = {}) => this.client.fetch(
946
916
  {
947
917
  method: "GET",
@@ -951,15 +921,9 @@ class API extends API$1 {
951
921
  ["created_after", request.createdAfter],
952
922
  ["created_before", request.createdBefore],
953
923
  ["order_by", request.orderBy],
954
- [
955
- "organization_id",
956
- request.organizationId ?? this.client.settings.defaultOrganizationId
957
- ],
924
+ ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId],
958
925
  ["page", request.page],
959
- [
960
- "page_size",
961
- request.pageSize ?? this.client.settings.defaultPageSize
962
- ],
926
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
963
927
  ["resource_type", request.resourceType],
964
928
  ["search", request.search]
965
929
  )
@@ -1008,10 +972,7 @@ class API extends API$1 {
1008
972
  updateOrganizationSecuritySettings = (request = {}) => this.client.fetch(
1009
973
  {
1010
974
  body: JSON.stringify(
1011
- marshalUpdateOrganizationSecuritySettingsRequest(
1012
- request,
1013
- this.client.settings
1014
- )
975
+ marshalUpdateOrganizationSecuritySettingsRequest(request, this.client.settings)
1015
976
  ),
1016
977
  headers: jsonContentHeaders,
1017
978
  method: "PATCH",
@@ -1058,10 +1019,7 @@ class API extends API$1 {
1058
1019
  updateOrganizationLoginMethods = (request = {}) => this.client.fetch(
1059
1020
  {
1060
1021
  body: JSON.stringify(
1061
- marshalUpdateOrganizationLoginMethodsRequest(
1062
- request,
1063
- this.client.settings
1064
- )
1022
+ marshalUpdateOrganizationLoginMethodsRequest(request, this.client.settings)
1065
1023
  ),
1066
1024
  headers: jsonContentHeaders,
1067
1025
  method: "PATCH",
@@ -1119,10 +1077,12 @@ class API extends API$1 {
1119
1077
  *
1120
1078
  * @param request - The request {@link DeleteSamlRequest}
1121
1079
  */
1122
- deleteSaml = (request) => this.client.fetch({
1123
- method: "DELETE",
1124
- path: `/iam/v1alpha1/saml/${validatePathParam("samlId", request.samlId)}`
1125
- });
1080
+ deleteSaml = (request) => this.client.fetch(
1081
+ {
1082
+ method: "DELETE",
1083
+ path: `/iam/v1alpha1/saml/${validatePathParam("samlId", request.samlId)}`
1084
+ }
1085
+ );
1126
1086
  /**
1127
1087
  * Parse SAML xml metadata file.
1128
1088
  *
@@ -1175,10 +1135,12 @@ class API extends API$1 {
1175
1135
  *
1176
1136
  * @param request - The request {@link DeleteSamlCertificateRequest}
1177
1137
  */
1178
- deleteSamlCertificate = (request) => this.client.fetch({
1179
- method: "DELETE",
1180
- path: `/iam/v1alpha1/saml-certificates/${validatePathParam("certificateId", request.certificateId)}`
1181
- });
1138
+ deleteSamlCertificate = (request) => this.client.fetch(
1139
+ {
1140
+ method: "DELETE",
1141
+ path: `/iam/v1alpha1/saml-certificates/${validatePathParam("certificateId", request.certificateId)}`
1142
+ }
1143
+ );
1182
1144
  /**
1183
1145
  * Get SCIM configuration of an Organization.
1184
1146
  *
@@ -1212,10 +1174,12 @@ class API extends API$1 {
1212
1174
  *
1213
1175
  * @param request - The request {@link DeleteScimRequest}
1214
1176
  */
1215
- deleteScim = (request) => this.client.fetch({
1216
- method: "DELETE",
1217
- path: `/iam/v1alpha1/scim/${validatePathParam("scimId", request.scimId)}`
1218
- });
1177
+ deleteScim = (request) => this.client.fetch(
1178
+ {
1179
+ method: "DELETE",
1180
+ path: `/iam/v1alpha1/scim/${validatePathParam("scimId", request.scimId)}`
1181
+ }
1182
+ );
1219
1183
  pageOfListScimTokens = (request) => this.client.fetch(
1220
1184
  {
1221
1185
  method: "GET",
@@ -1223,10 +1187,7 @@ class API extends API$1 {
1223
1187
  urlParams: urlParams(
1224
1188
  ["order_by", request.orderBy],
1225
1189
  ["page", request.page],
1226
- [
1227
- "page_size",
1228
- request.pageSize ?? this.client.settings.defaultPageSize
1229
- ]
1190
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
1230
1191
  )
1231
1192
  },
1232
1193
  unmarshalListScimTokensResponse
@@ -1256,10 +1217,12 @@ class API extends API$1 {
1256
1217
  *
1257
1218
  * @param request - The request {@link DeleteScimTokenRequest}
1258
1219
  */
1259
- deleteScimToken = (request) => this.client.fetch({
1260
- method: "DELETE",
1261
- path: `/iam/v1alpha1/scim-tokens/${validatePathParam("tokenId", request.tokenId)}`
1262
- });
1220
+ deleteScimToken = (request) => this.client.fetch(
1221
+ {
1222
+ method: "DELETE",
1223
+ path: `/iam/v1alpha1/scim-tokens/${validatePathParam("tokenId", request.tokenId)}`
1224
+ }
1225
+ );
1263
1226
  /**
1264
1227
  * Start registering a WebAuthn authenticator.
1265
1228
  *
@@ -1270,7 +1233,9 @@ class API extends API$1 {
1270
1233
  {
1271
1234
  method: "POST",
1272
1235
  path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}/start-webauthn-registration`,
1273
- urlParams: urlParams(["origin", request.origin])
1236
+ urlParams: urlParams(
1237
+ ["origin", request.origin]
1238
+ )
1274
1239
  },
1275
1240
  unmarshalStartUserWebAuthnRegistrationResponse
1276
1241
  );
@@ -1283,10 +1248,7 @@ class API extends API$1 {
1283
1248
  finishUserWebAuthnRegistration = (request) => this.client.fetch(
1284
1249
  {
1285
1250
  body: JSON.stringify(
1286
- marshalFinishUserWebAuthnRegistrationRequest(
1287
- request,
1288
- this.client.settings
1289
- )
1251
+ marshalFinishUserWebAuthnRegistrationRequest(request, this.client.settings)
1290
1252
  ),
1291
1253
  headers: jsonContentHeaders,
1292
1254
  method: "POST",
@@ -1301,10 +1263,7 @@ class API extends API$1 {
1301
1263
  urlParams: urlParams(
1302
1264
  ["order_by", request.orderBy],
1303
1265
  ["page", request.page],
1304
- [
1305
- "page_size",
1306
- request.pageSize ?? this.client.settings.defaultPageSize
1307
- ]
1266
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
1308
1267
  )
1309
1268
  },
1310
1269
  unmarshalListUserWebAuthnAuthenticatorsResponse
@@ -1315,11 +1274,7 @@ class API extends API$1 {
1315
1274
  * @param request - The request {@link ListUserWebAuthnAuthenticatorsRequest}
1316
1275
  * @returns A Promise of ListUserWebAuthnAuthenticatorsResponse
1317
1276
  */
1318
- listUserWebAuthnAuthenticators = (request) => enrichForPagination(
1319
- "authenticators",
1320
- this.pageOfListUserWebAuthnAuthenticators,
1321
- request
1322
- );
1277
+ listUserWebAuthnAuthenticators = (request) => enrichForPagination("authenticators", this.pageOfListUserWebAuthnAuthenticators, request);
1323
1278
  /**
1324
1279
  * Update a WebAuthn authenticator.
1325
1280
  *
@@ -1329,10 +1284,7 @@ class API extends API$1 {
1329
1284
  updateWebAuthnAuthenticator = (request) => this.client.fetch(
1330
1285
  {
1331
1286
  body: JSON.stringify(
1332
- marshalUpdateWebAuthnAuthenticatorRequest(
1333
- request,
1334
- this.client.settings
1335
- )
1287
+ marshalUpdateWebAuthnAuthenticatorRequest(request, this.client.settings)
1336
1288
  ),
1337
1289
  headers: jsonContentHeaders,
1338
1290
  method: "PATCH",
@@ -1345,12 +1297,14 @@ class API extends API$1 {
1345
1297
  *
1346
1298
  * @param request - The request {@link DeleteWebAuthnAuthenticatorRequest}
1347
1299
  */
1348
- deleteWebAuthnAuthenticator = (request) => this.client.fetch({
1349
- body: "{}",
1350
- headers: jsonContentHeaders,
1351
- method: "DELETE",
1352
- path: `/iam/v1alpha1/webauthn-authenticator/${validatePathParam("authenticatorId", request.authenticatorId)}`
1353
- });
1300
+ deleteWebAuthnAuthenticator = (request) => this.client.fetch(
1301
+ {
1302
+ body: "{}",
1303
+ headers: jsonContentHeaders,
1304
+ method: "DELETE",
1305
+ path: `/iam/v1alpha1/webauthn-authenticator/${validatePathParam("authenticatorId", request.authenticatorId)}`
1306
+ }
1307
+ );
1354
1308
  }
1355
1309
  export {
1356
1310
  API
@@ -1,4 +1,4 @@
1
- export { API } from './api.gen.js';
1
+ export { API, } from './api.gen.js';
2
2
  export * from './marshalling.gen.js';
3
3
  export type { AddGroupMemberRequest, AddGroupMembersRequest, AddSamlCertificateRequest, APIKey, Application, BearerType, ClonePolicyRequest, Connection, ConnectionConnectedOrganization, ConnectionConnectedUser, CreateAPIKeyRequest, CreateApplicationRequest, CreateGroupRequest, CreateJWTRequest, CreatePolicyRequest, CreateScimTokenRequest, CreateScimTokenResponse, CreateSSHKeyRequest, CreateUserMFAOTPRequest, CreateUserRequest, CreateUserRequestMember, DeleteAPIKeyRequest, DeleteApplicationRequest, DeleteGroupRequest, DeleteJWTRequest, DeletePolicyRequest, DeleteSamlCertificateRequest, DeleteSamlRequest, DeleteScimRequest, DeleteScimTokenRequest, DeleteSSHKeyRequest, DeleteUserMFAOTPRequest, DeleteUserRequest, DeleteWebAuthnAuthenticatorRequest, EnableOrganizationSamlRequest, EnableOrganizationScimRequest, EncodedJWT, FinishUserWebAuthnRegistrationRequest, FinishUserWebAuthnRegistrationResponse, GetAPIKeyRequest, GetApplicationRequest, GetGroupRequest, GetJWTRequest, GetLogRequest, GetOrganizationRequest, GetOrganizationSamlRequest, GetOrganizationScimRequest, GetOrganizationSecuritySettingsRequest, GetPolicyRequest, GetQuotumRequest, GetSSHKeyRequest, GetUserConnectionsRequest, GetUserConnectionsResponse, GetUserRequest, GracePeriod, GracePeriodType, Group, InitiateUserConnectionRequest, InitiateUserConnectionResponse, JoinUserConnectionRequest, JWT, ListAPIKeysRequest, ListAPIKeysRequestOrderBy, ListAPIKeysResponse, ListApplicationsRequest, ListApplicationsRequestOrderBy, ListApplicationsResponse, ListGracePeriodsRequest, ListGracePeriodsResponse, ListGroupsRequest, ListGroupsRequestOrderBy, ListGroupsResponse, ListJWTsRequest, ListJWTsRequestOrderBy, ListJWTsResponse, ListLogsRequest, ListLogsRequestOrderBy, ListLogsResponse, ListPermissionSetsRequest, ListPermissionSetsRequestOrderBy, ListPermissionSetsResponse, ListPoliciesRequest, ListPoliciesRequestOrderBy, ListPoliciesResponse, ListQuotaRequest, ListQuotaRequestOrderBy, ListQuotaResponse, ListRulesRequest, ListRulesResponse, ListSamlCertificatesRequest, ListSamlCertificatesResponse, ListScimTokensRequest, ListScimTokensRequestOrderBy, ListScimTokensResponse, ListSSHKeysRequest, ListSSHKeysRequestOrderBy, ListSSHKeysResponse, ListUsersRequest, ListUsersRequestOrderBy, ListUsersResponse, ListUserWebAuthnAuthenticatorsRequest, ListUserWebAuthnAuthenticatorsRequestOrderBy, ListUserWebAuthnAuthenticatorsResponse, LocalityType, LockUserRequest, Log, LogAction, LogResourceType, MFAOTP, Organization, OrganizationSecuritySettings, ParseSamlMetadataRequest, ParseSamlMetadataResponse, PermissionSet, PermissionSetScopeType, Policy, Quotum, QuotumLimit, RemoveGroupMemberRequest, RemoveUserConnectionRequest, Rule, RuleSpecs, Saml, SamlCertificate, SamlCertificateOrigin, SamlCertificateType, SamlServiceProvider, SamlStatus, Scim, ScimToken, SetGroupMembersRequest, SetOrganizationAliasRequest, SetRulesRequest, SetRulesResponse, SSHKey, StartUserWebAuthnRegistrationRequest, StartUserWebAuthnRegistrationResponse, UnlockUserRequest, UpdateAPIKeyRequest, UpdateApplicationRequest, UpdateGroupRequest, UpdateOrganizationLoginMethodsRequest, UpdateOrganizationSecuritySettingsRequest, UpdatePolicyRequest, UpdateSamlRequest, UpdateSSHKeyRequest, UpdateUserPasswordRequest, UpdateUserRequest, UpdateUserUsernameRequest, UpdateWebAuthnAuthenticatorRequest, User, UserStatus, UserType, ValidateUserMFAOTPRequest, ValidateUserMFAOTPResponse, WebAuthnAuthenticator, } from './types.gen.js';
4
4
  export * as ValidationRules from './validation-rules.gen.js';
@@ -347,10 +347,7 @@ const unmarshalListApplicationsResponse = (data) => {
347
347
  );
348
348
  }
349
349
  return {
350
- applications: unmarshalArrayOfObject(
351
- data.applications,
352
- unmarshalApplication
353
- ),
350
+ applications: unmarshalArrayOfObject(data.applications, unmarshalApplication),
354
351
  totalCount: data.total_count
355
352
  };
356
353
  };
@@ -373,10 +370,7 @@ const unmarshalListGracePeriodsResponse = (data) => {
373
370
  );
374
371
  }
375
372
  return {
376
- gracePeriods: unmarshalArrayOfObject(
377
- data.grace_periods,
378
- unmarshalGracePeriod
379
- )
373
+ gracePeriods: unmarshalArrayOfObject(data.grace_periods, unmarshalGracePeriod)
380
374
  };
381
375
  };
382
376
  const unmarshalListGroupsResponse = (data) => {
@@ -433,10 +427,7 @@ const unmarshalListPermissionSetsResponse = (data) => {
433
427
  );
434
428
  }
435
429
  return {
436
- permissionSets: unmarshalArrayOfObject(
437
- data.permission_sets,
438
- unmarshalPermissionSet
439
- ),
430
+ permissionSets: unmarshalArrayOfObject(data.permission_sets, unmarshalPermissionSet),
440
431
  totalCount: data.total_count
441
432
  };
442
433
  };
@@ -507,10 +498,7 @@ const unmarshalListSamlCertificatesResponse = (data) => {
507
498
  );
508
499
  }
509
500
  return {
510
- certificates: unmarshalArrayOfObject(
511
- data.certificates,
512
- unmarshalSamlCertificate
513
- )
501
+ certificates: unmarshalArrayOfObject(data.certificates, unmarshalSamlCertificate)
514
502
  };
515
503
  };
516
504
  const unmarshalListScimTokensResponse = (data) => {
@@ -531,10 +519,7 @@ const unmarshalListUserWebAuthnAuthenticatorsResponse = (data) => {
531
519
  );
532
520
  }
533
521
  return {
534
- authenticators: unmarshalArrayOfObject(
535
- data.authenticators,
536
- unmarshalWebAuthnAuthenticator
537
- ),
522
+ authenticators: unmarshalArrayOfObject(data.authenticators, unmarshalWebAuthnAuthenticator),
538
523
  totalCount: data.total_count
539
524
  };
540
525
  };
@@ -673,8 +658,14 @@ const unmarshalValidateUserMFAOTPResponse = (data) => {
673
658
  };
674
659
  const marshalAddGroupMemberRequest = (request, defaults) => ({
675
660
  ...resolveOneOf([
676
- { param: "user_id", value: request.userId },
677
- { param: "application_id", value: request.applicationId }
661
+ {
662
+ param: "user_id",
663
+ value: request.userId
664
+ },
665
+ {
666
+ param: "application_id",
667
+ value: request.applicationId
668
+ }
678
669
  ])
679
670
  });
680
671
  const marshalAddGroupMembersRequest = (request, defaults) => ({
@@ -690,8 +681,14 @@ const marshalCreateAPIKeyRequest = (request, defaults) => ({
690
681
  description: request.description,
691
682
  expires_at: request.expiresAt,
692
683
  ...resolveOneOf([
693
- { param: "application_id", value: request.applicationId },
694
- { param: "user_id", value: request.userId }
684
+ {
685
+ param: "application_id",
686
+ value: request.applicationId
687
+ },
688
+ {
689
+ param: "user_id",
690
+ value: request.userId
691
+ }
695
692
  ])
696
693
  });
697
694
  const marshalCreateApplicationRequest = (request, defaults) => ({
@@ -714,8 +711,14 @@ const marshalRuleSpecs = (request, defaults) => ({
714
711
  condition: request.condition,
715
712
  permission_set_names: request.permissionSetNames,
716
713
  ...resolveOneOf([
717
- { param: "project_ids", value: request.projectIds },
718
- { param: "organization_id", value: request.organizationId }
714
+ {
715
+ param: "project_ids",
716
+ value: request.projectIds
717
+ },
718
+ {
719
+ param: "organization_id",
720
+ value: request.organizationId
721
+ }
719
722
  ])
720
723
  });
721
724
  const marshalCreatePolicyRequest = (request, defaults) => ({
@@ -725,10 +728,22 @@ const marshalCreatePolicyRequest = (request, defaults) => ({
725
728
  rules: request.rules !== void 0 ? request.rules.map((elt) => marshalRuleSpecs(elt)) : void 0,
726
729
  tags: request.tags,
727
730
  ...resolveOneOf([
728
- { param: "user_id", value: request.userId },
729
- { param: "group_id", value: request.groupId },
730
- { param: "application_id", value: request.applicationId },
731
- { param: "no_principal", value: request.noPrincipal }
731
+ {
732
+ param: "user_id",
733
+ value: request.userId
734
+ },
735
+ {
736
+ param: "group_id",
737
+ value: request.groupId
738
+ },
739
+ {
740
+ param: "application_id",
741
+ value: request.applicationId
742
+ },
743
+ {
744
+ param: "no_principal",
745
+ value: request.noPrincipal
746
+ }
732
747
  ])
733
748
  });
734
749
  const marshalCreateSSHKeyRequest = (request, defaults) => ({
@@ -751,7 +766,10 @@ const marshalCreateUserRequest = (request, defaults) => ({
751
766
  organization_id: request.organizationId ?? defaults.defaultOrganizationId,
752
767
  tags: request.tags,
753
768
  ...resolveOneOf([
754
- { param: "email", value: request.email },
769
+ {
770
+ param: "email",
771
+ value: request.email
772
+ },
755
773
  {
756
774
  param: "member",
757
775
  value: request.member !== void 0 ? marshalCreateUserRequestMember(request.member) : void 0
@@ -777,8 +795,14 @@ const marshalParseSamlMetadataRequest = async (request, defaults) => ({
777
795
  });
778
796
  const marshalRemoveGroupMemberRequest = (request, defaults) => ({
779
797
  ...resolveOneOf([
780
- { param: "user_id", value: request.userId },
781
- { param: "application_id", value: request.applicationId }
798
+ {
799
+ param: "user_id",
800
+ value: request.userId
801
+ },
802
+ {
803
+ param: "application_id",
804
+ value: request.applicationId
805
+ }
782
806
  ])
783
807
  });
784
808
  const marshalRemoveUserConnectionRequest = (request, defaults) => ({
@@ -828,10 +852,22 @@ const marshalUpdatePolicyRequest = (request, defaults) => ({
828
852
  name: request.name,
829
853
  tags: request.tags,
830
854
  ...resolveOneOf([
831
- { param: "user_id", value: request.userId },
832
- { param: "group_id", value: request.groupId },
833
- { param: "application_id", value: request.applicationId },
834
- { param: "no_principal", value: request.noPrincipal }
855
+ {
856
+ param: "user_id",
857
+ value: request.userId
858
+ },
859
+ {
860
+ param: "group_id",
861
+ value: request.groupId
862
+ },
863
+ {
864
+ param: "application_id",
865
+ value: request.applicationId
866
+ },
867
+ {
868
+ param: "no_principal",
869
+ value: request.noPrincipal
870
+ }
835
871
  ])
836
872
  });
837
873
  const marshalUpdateSSHKeyRequest = (request, defaults) => ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-iam",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "description": "Scaleway SDK iam",
5
5
  "license": "Apache-2.0",
6
6
  "files": [
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@scaleway/random-name": "5.1.2",
30
- "@scaleway/sdk-std": "2.1.0"
30
+ "@scaleway/sdk-std": "2.1.1"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "@scaleway/sdk-client": "^2.1.0"