@scaleway/sdk 2.63.0 → 2.65.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/dist/api/applesilicon/v1alpha1/api.gen.d.ts +3 -3
  2. package/dist/api/applesilicon/v1alpha1/types.gen.d.ts +20 -20
  3. package/dist/api/cockpit/v1/api.gen.cjs +19 -1
  4. package/dist/api/cockpit/v1/api.gen.d.ts +4 -3
  5. package/dist/api/cockpit/v1/api.gen.js +20 -2
  6. package/dist/api/cockpit/v1/index.gen.d.ts +1 -1
  7. package/dist/api/cockpit/v1/marshalling.gen.cjs +13 -0
  8. package/dist/api/cockpit/v1/marshalling.gen.d.ts +2 -1
  9. package/dist/api/cockpit/v1/marshalling.gen.js +13 -0
  10. package/dist/api/cockpit/v1/types.gen.d.ts +50 -31
  11. package/dist/api/edge_services/v1alpha1/types.gen.d.ts +3 -3
  12. package/dist/api/iam/v1alpha1/index.gen.d.ts +1 -1
  13. package/dist/api/iam/v1alpha1/marshalling.gen.cjs +16 -0
  14. package/dist/api/iam/v1alpha1/marshalling.gen.js +16 -0
  15. package/dist/api/iam/v1alpha1/types.gen.d.ts +48 -4
  16. package/dist/api/iam/v1alpha1/validation-rules.gen.cjs +7 -3
  17. package/dist/api/iam/v1alpha1/validation-rules.gen.d.ts +6 -3
  18. package/dist/api/iam/v1alpha1/validation-rules.gen.js +7 -3
  19. package/dist/api/inference/v1beta1/api.gen.d.ts +2 -2
  20. package/dist/api/inference/v1beta1/types.gen.d.ts +21 -21
  21. package/dist/api/instance/v1/api.gen.d.ts +2 -2
  22. package/dist/api/instance/v1/types.gen.d.ts +87 -87
  23. package/dist/api/instance/v1/types.private.gen.d.ts +5 -5
  24. package/dist/api/interlink/v1beta1/api.gen.cjs +5 -1
  25. package/dist/api/interlink/v1beta1/api.gen.d.ts +2 -2
  26. package/dist/api/interlink/v1beta1/api.gen.js +5 -1
  27. package/dist/api/interlink/v1beta1/marshalling.gen.cjs +1 -0
  28. package/dist/api/interlink/v1beta1/marshalling.gen.js +1 -0
  29. package/dist/api/interlink/v1beta1/types.gen.d.ts +29 -24
  30. package/dist/api/ipam/v1/api.gen.cjs +5 -1
  31. package/dist/api/ipam/v1/api.gen.d.ts +2 -2
  32. package/dist/api/ipam/v1/api.gen.js +5 -1
  33. package/dist/api/ipam/v1/types.gen.d.ts +13 -13
  34. package/dist/api/key_manager/v1alpha1/api.gen.cjs +41 -37
  35. package/dist/api/key_manager/v1alpha1/api.gen.d.ts +38 -38
  36. package/dist/api/key_manager/v1alpha1/api.gen.js +41 -37
  37. package/dist/api/key_manager/v1alpha1/types.gen.d.ts +31 -30
  38. package/dist/api/lb/v1/api.gen.cjs +5 -1
  39. package/dist/api/lb/v1/api.gen.d.ts +3 -3
  40. package/dist/api/lb/v1/api.gen.js +5 -1
  41. package/dist/api/lb/v1/types.gen.d.ts +116 -116
  42. package/dist/api/vpc/v2/api.gen.cjs +5 -21
  43. package/dist/api/vpc/v2/api.gen.d.ts +3 -13
  44. package/dist/api/vpc/v2/api.gen.js +6 -22
  45. package/dist/api/vpc/v2/index.gen.d.ts +1 -1
  46. package/dist/api/vpc/v2/marshalling.gen.cjs +0 -16
  47. package/dist/api/vpc/v2/marshalling.gen.d.ts +1 -2
  48. package/dist/api/vpc/v2/marshalling.gen.js +1 -17
  49. package/dist/api/vpc/v2/types.gen.d.ts +24 -49
  50. package/dist/api/webhosting/v1/api.gen.cjs +98 -10
  51. package/dist/api/webhosting/v1/api.gen.d.ts +40 -12
  52. package/dist/api/webhosting/v1/api.gen.js +100 -12
  53. package/dist/api/webhosting/v1/content.gen.cjs +4 -0
  54. package/dist/api/webhosting/v1/content.gen.d.ts +5 -1
  55. package/dist/api/webhosting/v1/content.gen.js +4 -0
  56. package/dist/api/webhosting/v1/index.gen.cjs +2 -0
  57. package/dist/api/webhosting/v1/index.gen.d.ts +1 -1
  58. package/dist/api/webhosting/v1/index.gen.js +3 -1
  59. package/dist/api/webhosting/v1/marshalling.gen.cjs +45 -0
  60. package/dist/api/webhosting/v1/marshalling.gen.d.ts +3 -1
  61. package/dist/api/webhosting/v1/marshalling.gen.js +45 -0
  62. package/dist/api/webhosting/v1/types.gen.d.ts +102 -36
  63. package/dist/api/webhosting/v1alpha1/api.gen.cjs +6 -2
  64. package/dist/api/webhosting/v1alpha1/api.gen.d.ts +3 -3
  65. package/dist/api/webhosting/v1alpha1/api.gen.js +6 -2
  66. package/dist/api/webhosting/v1alpha1/types.gen.d.ts +19 -19
  67. package/dist/scw/constants.cjs +1 -1
  68. package/dist/scw/constants.d.ts +2 -2
  69. package/dist/scw/constants.js +1 -1
  70. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- import type { Region } from '../../../bridge';
1
+ import type { Region as ScwRegion } from '../../../bridge';
2
2
  export type DataSourceOrigin = 'unknown_origin' | 'scaleway' | 'external' | 'custom';
3
3
  export type DataSourceType = 'unknown_type' | 'metrics' | 'logs' | 'traces';
4
4
  export type GrafanaUserRole = 'unknown_role' | 'editor' | 'viewer';
@@ -26,11 +26,10 @@ export interface ContactPoint {
26
26
  * One-of ('configuration'): at most one of 'email' could be set.
27
27
  */
28
28
  email?: ContactPointEmail;
29
- /**
30
- * Region to target. If none is passed will use default region from the
31
- * config.
32
- */
33
- region: Region;
29
+ /** Region. */
30
+ region: ScwRegion;
31
+ /** Send an email notification when an alert is marked as resolved. */
32
+ receiveResolvedNotifications: boolean;
34
33
  }
35
34
  /** Data source. */
36
35
  export interface DataSource {
@@ -55,7 +54,7 @@ export interface DataSource {
55
54
  /** BETA - Duration for which the data will be retained in the data source. */
56
55
  retentionDays: number;
57
56
  /** Region of the data source. */
58
- region: Region;
57
+ region: ScwRegion;
59
58
  }
60
59
  /** Grafana dashboard. */
61
60
  export interface GrafanaProductDashboard {
@@ -124,7 +123,7 @@ export interface Token {
124
123
  /** Token secret key. */
125
124
  secretKey?: string;
126
125
  /** Regions where the token is located. */
127
- region: Region;
126
+ region: ScwRegion;
128
127
  }
129
128
  /** Data source usage. */
130
129
  export interface Usage {
@@ -143,7 +142,7 @@ export interface Usage {
143
142
  /** Data source usage for the given interval. */
144
143
  quantityOverInterval: number;
145
144
  /** Region of the data source usage. */
146
- region: Region;
145
+ region: ScwRegion;
147
146
  }
148
147
  /** Alert manager information. */
149
148
  export interface AlertManager {
@@ -154,7 +153,7 @@ export interface AlertManager {
154
153
  /** Managed alerts are enabled. */
155
154
  managedAlertsEnabled: boolean;
156
155
  /** Regions where the Alert manager is enabled. */
157
- region: Region;
156
+ region: ScwRegion;
158
157
  }
159
158
  /** Cockpit configuration. */
160
159
  export interface GetConfigResponse {
@@ -327,7 +326,7 @@ export type RegionalApiCreateContactPointRequest = {
327
326
  * Region to target. If none is passed will use default region from the
328
327
  * config.
329
328
  */
330
- region?: Region;
329
+ region?: ScwRegion;
331
330
  /** ID of the Project to create the contact point in. */
332
331
  projectId?: string;
333
332
  /**
@@ -336,6 +335,8 @@ export type RegionalApiCreateContactPointRequest = {
336
335
  * One-of ('configuration'): at most one of 'email' could be set.
337
336
  */
338
337
  email?: ContactPointEmail;
338
+ /** Send an email notification when an alert is marked as resolved. */
339
+ receiveResolvedNotifications?: boolean;
339
340
  };
340
341
  /** Create a data source. */
341
342
  export type RegionalApiCreateDataSourceRequest = {
@@ -343,7 +344,7 @@ export type RegionalApiCreateDataSourceRequest = {
343
344
  * Region to target. If none is passed will use default region from the
344
345
  * config.
345
346
  */
346
- region?: Region;
347
+ region?: ScwRegion;
347
348
  /** ID of the Project the data source belongs to. */
348
349
  projectId?: string;
349
350
  /** Data source name. */
@@ -359,7 +360,7 @@ export type RegionalApiCreateTokenRequest = {
359
360
  * Region to target. If none is passed will use default region from the
360
361
  * config.
361
362
  */
362
- region?: Region;
363
+ region?: ScwRegion;
363
364
  /** ID of the Project the token belongs to. */
364
365
  projectId?: string;
365
366
  /** Name of the token. */
@@ -373,7 +374,7 @@ export type RegionalApiDeleteContactPointRequest = {
373
374
  * Region to target. If none is passed will use default region from the
374
375
  * config.
375
376
  */
376
- region?: Region;
377
+ region?: ScwRegion;
377
378
  /** ID of the Project containing the contact point to delete. */
378
379
  projectId?: string;
379
380
  /**
@@ -389,7 +390,7 @@ export type RegionalApiDeleteDataSourceRequest = {
389
390
  * Region to target. If none is passed will use default region from the
390
391
  * config.
391
392
  */
392
- region?: Region;
393
+ region?: ScwRegion;
393
394
  /** ID of the data source to delete. */
394
395
  dataSourceId: string;
395
396
  };
@@ -399,7 +400,7 @@ export type RegionalApiDeleteTokenRequest = {
399
400
  * Region to target. If none is passed will use default region from the
400
401
  * config.
401
402
  */
402
- region?: Region;
403
+ region?: ScwRegion;
403
404
  /** ID of the token to delete. */
404
405
  tokenId: string;
405
406
  };
@@ -409,7 +410,7 @@ export type RegionalApiDisableAlertManagerRequest = {
409
410
  * Region to target. If none is passed will use default region from the
410
411
  * config.
411
412
  */
412
- region?: Region;
413
+ region?: ScwRegion;
413
414
  /** ID of the Project to disable the Alert manager in. */
414
415
  projectId?: string;
415
416
  };
@@ -419,7 +420,7 @@ export type RegionalApiDisableManagedAlertsRequest = {
419
420
  * Region to target. If none is passed will use default region from the
420
421
  * config.
421
422
  */
422
- region?: Region;
423
+ region?: ScwRegion;
423
424
  /** ID of the Project. */
424
425
  projectId?: string;
425
426
  };
@@ -429,7 +430,7 @@ export type RegionalApiEnableAlertManagerRequest = {
429
430
  * Region to target. If none is passed will use default region from the
430
431
  * config.
431
432
  */
432
- region?: Region;
433
+ region?: ScwRegion;
433
434
  /** ID of the Project to enable the Alert manager in. */
434
435
  projectId?: string;
435
436
  };
@@ -439,7 +440,7 @@ export type RegionalApiEnableManagedAlertsRequest = {
439
440
  * Region to target. If none is passed will use default region from the
440
441
  * config.
441
442
  */
442
- region?: Region;
443
+ region?: ScwRegion;
443
444
  /** ID of the Project. */
444
445
  projectId?: string;
445
446
  };
@@ -449,7 +450,7 @@ export type RegionalApiGetAlertManagerRequest = {
449
450
  * Region to target. If none is passed will use default region from the
450
451
  * config.
451
452
  */
452
- region?: Region;
453
+ region?: ScwRegion;
453
454
  /** Project ID of the requested Alert manager. */
454
455
  projectId?: string;
455
456
  };
@@ -459,7 +460,7 @@ export type RegionalApiGetConfigRequest = {
459
460
  * Region to target. If none is passed will use default region from the
460
461
  * config.
461
462
  */
462
- region?: Region;
463
+ region?: ScwRegion;
463
464
  };
464
465
  /** Retrieve a data source. */
465
466
  export type RegionalApiGetDataSourceRequest = {
@@ -467,7 +468,7 @@ export type RegionalApiGetDataSourceRequest = {
467
468
  * Region to target. If none is passed will use default region from the
468
469
  * config.
469
470
  */
470
- region?: Region;
471
+ region?: ScwRegion;
471
472
  /** ID of the relevant data source. */
472
473
  dataSourceId: string;
473
474
  };
@@ -477,7 +478,7 @@ export type RegionalApiGetTokenRequest = {
477
478
  * Region to target. If none is passed will use default region from the
478
479
  * config.
479
480
  */
480
- region?: Region;
481
+ region?: ScwRegion;
481
482
  /** Token ID. */
482
483
  tokenId: string;
483
484
  };
@@ -486,7 +487,7 @@ export type RegionalApiGetUsageOverviewRequest = {
486
487
  * Region to target. If none is passed will use default region from the
487
488
  * config.
488
489
  */
489
- region?: Region;
490
+ region?: ScwRegion;
490
491
  projectId?: string;
491
492
  interval?: string;
492
493
  };
@@ -496,7 +497,7 @@ export type RegionalApiListContactPointsRequest = {
496
497
  * Region to target. If none is passed will use default region from the
497
498
  * config.
498
499
  */
499
- region?: Region;
500
+ region?: ScwRegion;
500
501
  /** Page number to return, from the paginated results. */
501
502
  page?: number;
502
503
  /** Total count of contact points to return per page. */
@@ -510,7 +511,7 @@ export type RegionalApiListDataSourcesRequest = {
510
511
  * Region to target. If none is passed will use default region from the
511
512
  * config.
512
513
  */
513
- region?: Region;
514
+ region?: ScwRegion;
514
515
  /** Page number to return, from the paginated results. */
515
516
  page?: number;
516
517
  /** Number of data sources to return per page. */
@@ -539,7 +540,7 @@ export type RegionalApiListManagedAlertsRequest = {
539
540
  * Region to target. If none is passed will use default region from the
540
541
  * config.
541
542
  */
542
- region?: Region;
543
+ region?: ScwRegion;
543
544
  /** Page number to return, from the paginated results. */
544
545
  page?: number;
545
546
  /** Number of data sources to return per page. */
@@ -558,7 +559,7 @@ export type RegionalApiListTokensRequest = {
558
559
  * Region to target. If none is passed will use default region from the
559
560
  * config.
560
561
  */
561
- region?: Region;
562
+ region?: ScwRegion;
562
563
  /** Page number to return, from the paginated results. */
563
564
  page?: number;
564
565
  /** Number of tokens to return per page. */
@@ -576,17 +577,35 @@ export type RegionalApiTriggerTestAlertRequest = {
576
577
  * Region to target. If none is passed will use default region from the
577
578
  * config.
578
579
  */
579
- region?: Region;
580
+ region?: ScwRegion;
580
581
  /** ID of the Project. */
581
582
  projectId?: string;
582
583
  };
584
+ /** Update a contact point. */
585
+ export type RegionalApiUpdateContactPointRequest = {
586
+ /**
587
+ * Region to target. If none is passed will use default region from the
588
+ * config.
589
+ */
590
+ region?: ScwRegion;
591
+ /** ID of the Project containing the contact point to update. */
592
+ projectId?: string;
593
+ /**
594
+ * Email address of the contact point to update.
595
+ *
596
+ * One-of ('configuration'): at most one of 'email' could be set.
597
+ */
598
+ email?: ContactPointEmail;
599
+ /** Enable or disable notifications when alert is resolved. */
600
+ receiveResolvedNotifications?: boolean;
601
+ };
583
602
  /** Update a data source name. */
584
603
  export type RegionalApiUpdateDataSourceRequest = {
585
604
  /**
586
605
  * Region to target. If none is passed will use default region from the
587
606
  * config.
588
607
  */
589
- region?: Region;
608
+ region?: ScwRegion;
590
609
  /** ID of the data source to update. */
591
610
  dataSourceId: string;
592
611
  /** Updated name of the data source. */
@@ -1,4 +1,4 @@
1
- import type { Money, Region, Zone } from '../../../bridge';
1
+ import type { Money, Region as ScwRegion, Zone as ScwZone } from '../../../bridge';
2
2
  export type DNSStageType = 'unknown_type' | 'auto' | 'managed' | 'custom';
3
3
  export type LbOriginError = 'unknown' | 'timeout' | 'connection_refused' | 'tls_error';
4
4
  export type ListBackendStagesRequestOrderBy = 'created_at_asc' | 'created_at_desc';
@@ -19,7 +19,7 @@ export interface ScalewayLb {
19
19
  /** ID of the Load Balancer. */
20
20
  id: string;
21
21
  /** Zone of the Load Balancer. */
22
- zone: Zone;
22
+ zone: ScwZone;
23
23
  /** ID of the frontend linked to the Load Balancer. */
24
24
  frontendId: string;
25
25
  /** Defines whether the Load Balancer's frontend handles SSL connections. */
@@ -53,7 +53,7 @@ export interface TLSSecret {
53
53
  /** ID of the Secret. */
54
54
  secretId: string;
55
55
  /** Region of the Secret. */
56
- region: Region;
56
+ region: ScwRegion;
57
57
  }
58
58
  export interface BackendStage {
59
59
  /** ID of the backend stage. */
@@ -1,3 +1,3 @@
1
1
  export { API } from './api.gen.js';
2
- export type { APIKey, AddGroupMemberRequest, AddGroupMembersRequest, Application, BearerType, ClonePolicyRequest, CreateAPIKeyRequest, CreateApplicationRequest, CreateGroupRequest, CreateJWTRequest, CreatePolicyRequest, CreateSSHKeyRequest, CreateUserMFAOTPRequest, CreateUserRequest, CreateUserRequestMember, DeleteAPIKeyRequest, DeleteApplicationRequest, DeleteGroupRequest, DeleteJWTRequest, DeletePolicyRequest, DeleteSSHKeyRequest, DeleteUserMFAOTPRequest, DeleteUserRequest, EncodedJWT, GetAPIKeyRequest, GetApplicationRequest, GetGroupRequest, GetJWTRequest, GetLogRequest, GetOrganizationSecuritySettingsRequest, GetPolicyRequest, GetQuotumRequest, GetSSHKeyRequest, GetUserRequest, GracePeriod, GracePeriodType, Group, 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, ListSSHKeysRequest, ListSSHKeysRequestOrderBy, ListSSHKeysResponse, ListUsersRequest, ListUsersRequestOrderBy, ListUsersResponse, LockUserRequest, Log, LogAction, LogResourceType, MFAOTP, OrganizationSecuritySettings, PermissionSet, PermissionSetScopeType, Policy, Quotum, RemoveGroupMemberRequest, Rule, RuleSpecs, SSHKey, SetGroupMembersRequest, SetRulesRequest, SetRulesResponse, UnlockUserRequest, UpdateAPIKeyRequest, UpdateApplicationRequest, UpdateGroupRequest, UpdateOrganizationSecuritySettingsRequest, UpdatePolicyRequest, UpdateSSHKeyRequest, UpdateUserPasswordRequest, UpdateUserRequest, UpdateUserUsernameRequest, User, UserStatus, UserType, ValidateUserMFAOTPRequest, ValidateUserMFAOTPResponse, } from './types.gen';
2
+ export type { APIKey, AddGroupMemberRequest, AddGroupMembersRequest, Application, BearerType, ClonePolicyRequest, CreateAPIKeyRequest, CreateApplicationRequest, CreateGroupRequest, CreateJWTRequest, CreatePolicyRequest, CreateSSHKeyRequest, CreateUserMFAOTPRequest, CreateUserRequest, CreateUserRequestMember, DeleteAPIKeyRequest, DeleteApplicationRequest, DeleteGroupRequest, DeleteJWTRequest, DeletePolicyRequest, DeleteSSHKeyRequest, DeleteUserMFAOTPRequest, DeleteUserRequest, EncodedJWT, GetAPIKeyRequest, GetApplicationRequest, GetGroupRequest, GetJWTRequest, GetLogRequest, GetOrganizationSecuritySettingsRequest, GetPolicyRequest, GetQuotumRequest, GetSSHKeyRequest, GetUserRequest, GracePeriod, GracePeriodType, Group, 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, ListSSHKeysRequest, ListSSHKeysRequestOrderBy, ListSSHKeysResponse, ListUsersRequest, ListUsersRequestOrderBy, ListUsersResponse, LocalityType, LockUserRequest, Log, LogAction, LogResourceType, MFAOTP, OrganizationSecuritySettings, PermissionSet, PermissionSetScopeType, Policy, Quotum, QuotumLimit, RemoveGroupMemberRequest, Rule, RuleSpecs, SSHKey, SetGroupMembersRequest, SetRulesRequest, SetRulesResponse, UnlockUserRequest, UpdateAPIKeyRequest, UpdateApplicationRequest, UpdateGroupRequest, UpdateOrganizationSecuritySettingsRequest, UpdatePolicyRequest, UpdateSSHKeyRequest, UpdateUserPasswordRequest, UpdateUserRequest, UpdateUserUsernameRequest, User, UserStatus, UserType, ValidateUserMFAOTPRequest, ValidateUserMFAOTPResponse, } from './types.gen';
3
3
  export * as ValidationRules from './validation-rules.gen.js';
@@ -128,6 +128,20 @@ const unmarshalPolicy = (data) => {
128
128
  userId: data.user_id
129
129
  };
130
130
  };
131
+ const unmarshalQuotumLimit = (data) => {
132
+ if (!json.isJSONObject(data)) {
133
+ throw new TypeError(
134
+ `Unmarshalling the type 'QuotumLimit' failed as data isn't a dictionary.`
135
+ );
136
+ }
137
+ return {
138
+ global: data.global,
139
+ limit: data.limit,
140
+ region: data.region,
141
+ unlimited: data.unlimited,
142
+ zone: data.zone
143
+ };
144
+ };
131
145
  const unmarshalQuotum = (data) => {
132
146
  if (!json.isJSONObject(data)) {
133
147
  throw new TypeError(
@@ -137,6 +151,8 @@ const unmarshalQuotum = (data) => {
137
151
  return {
138
152
  description: data.description,
139
153
  limit: data.limit,
154
+ limits: marshalling.unmarshalArrayOfObject(data.limits, unmarshalQuotumLimit),
155
+ localityType: data.locality_type,
140
156
  name: data.name,
141
157
  prettyName: data.pretty_name,
142
158
  unit: data.unit,
@@ -126,6 +126,20 @@ const unmarshalPolicy = (data) => {
126
126
  userId: data.user_id
127
127
  };
128
128
  };
129
+ const unmarshalQuotumLimit = (data) => {
130
+ if (!isJSONObject(data)) {
131
+ throw new TypeError(
132
+ `Unmarshalling the type 'QuotumLimit' failed as data isn't a dictionary.`
133
+ );
134
+ }
135
+ return {
136
+ global: data.global,
137
+ limit: data.limit,
138
+ region: data.region,
139
+ unlimited: data.unlimited,
140
+ zone: data.zone
141
+ };
142
+ };
129
143
  const unmarshalQuotum = (data) => {
130
144
  if (!isJSONObject(data)) {
131
145
  throw new TypeError(
@@ -135,6 +149,8 @@ const unmarshalQuotum = (data) => {
135
149
  return {
136
150
  description: data.description,
137
151
  limit: data.limit,
152
+ limits: unmarshalArrayOfObject(data.limits, unmarshalQuotumLimit),
153
+ localityType: data.locality_type,
138
154
  name: data.name,
139
155
  prettyName: data.pretty_name,
140
156
  unit: data.unit,
@@ -1,3 +1,4 @@
1
+ import type { Region as ScwRegion, Zone as ScwZone } from '../../../bridge';
1
2
  export type BearerType = 'unknown_bearer_type' | 'user' | 'application';
2
3
  export type GracePeriodType = 'unknown_grace_period_type' | 'update_password' | 'set_mfa';
3
4
  export type ListAPIKeysRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'updated_at_asc' | 'updated_at_desc' | 'expires_at_asc' | 'expires_at_desc' | 'access_key_asc' | 'access_key_desc';
@@ -10,11 +11,47 @@ export type ListPoliciesRequestOrderBy = 'policy_name_asc' | 'policy_name_desc'
10
11
  export type ListQuotaRequestOrderBy = 'name_asc' | 'name_desc';
11
12
  export type ListSSHKeysRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'updated_at_asc' | 'updated_at_desc' | 'name_asc' | 'name_desc';
12
13
  export type ListUsersRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'updated_at_asc' | 'updated_at_desc' | 'email_asc' | 'email_desc' | 'last_login_asc' | 'last_login_desc' | 'username_asc' | 'username_desc';
14
+ export type LocalityType = 'global' | 'region' | 'zone';
13
15
  export type LogAction = 'unknown_action' | 'created' | 'updated' | 'deleted';
14
16
  export type LogResourceType = 'unknown_resource_type' | 'api_key' | 'user' | 'application' | 'group' | 'policy';
15
17
  export type PermissionSetScopeType = 'unknown_scope_type' | 'projects' | 'organization' | 'account_root_user';
16
18
  export type UserStatus = 'unknown_status' | 'invitation_pending' | 'activated';
17
19
  export type UserType = 'unknown_type' | 'guest' | 'owner' | 'member';
20
+ export interface QuotumLimit {
21
+ /**
22
+ * Whether or not the limit is applied globally.
23
+ *
24
+ * One-of ('locality'): at most one of 'global', 'region', 'zone' could be
25
+ * set.
26
+ */
27
+ global?: boolean;
28
+ /**
29
+ * The region on which the limit is applied.
30
+ *
31
+ * One-of ('locality'): at most one of 'global', 'region', 'zone' could be
32
+ * set.
33
+ */
34
+ region?: ScwRegion;
35
+ /**
36
+ * The zone on which the limit is applied.
37
+ *
38
+ * One-of ('locality'): at most one of 'global', 'region', 'zone' could be
39
+ * set.
40
+ */
41
+ zone?: ScwZone;
42
+ /**
43
+ * Maximum locality limit.
44
+ *
45
+ * One-of ('value'): at most one of 'limit', 'unlimited' could be set.
46
+ */
47
+ limit?: number;
48
+ /**
49
+ * Whether or not the quota per locality is unlimited.
50
+ *
51
+ * One-of ('value'): at most one of 'limit', 'unlimited' could be set.
52
+ */
53
+ unlimited?: boolean;
54
+ }
18
55
  export interface JWT {
19
56
  /** JWT ID. */
20
57
  jti: string;
@@ -254,15 +291,15 @@ export interface Quotum {
254
291
  /** Name of the quota. */
255
292
  name: string;
256
293
  /**
257
- * Maximum limit of the quota.
294
+ * @deprecated Maximum limit of the quota.
258
295
  *
259
- * One-of ('value'): at most one of 'limit', 'unlimited' could be set.
296
+ * One-of ('value'): at most one of 'limit', 'unlimited' could be set.
260
297
  */
261
298
  limit?: number;
262
299
  /**
263
- * Defines whether or not the quota is unlimited.
300
+ * @deprecated Defines whether or not the quota is unlimited.
264
301
  *
265
- * One-of ('value'): at most one of 'limit', 'unlimited' could be set.
302
+ * One-of ('value'): at most one of 'limit', 'unlimited' could be set.
266
303
  */
267
304
  unlimited?: boolean;
268
305
  /** A human-readable name for the quota. */
@@ -271,6 +308,13 @@ export interface Quotum {
271
308
  unit: string;
272
309
  /** Details about the quota. */
273
310
  description: string;
311
+ /**
312
+ * Whether this quotum is applied on at the zone level, region level, or
313
+ * globally.
314
+ */
315
+ localityType: LocalityType;
316
+ /** Limits per locality. */
317
+ limits: QuotumLimit[];
274
318
  }
275
319
  export interface Rule {
276
320
  /** Id of rule. */
@@ -50,9 +50,6 @@ const CreateSSHKeyRequest = {
50
50
  }
51
51
  };
52
52
  const CreateUserRequestMember = {
53
- email: {
54
- ignoreEmpty: true
55
- },
56
53
  password: {
57
54
  ignoreEmpty: true,
58
55
  maxLength: 72
@@ -215,6 +212,12 @@ const UpdateGroupRequest = {
215
212
  pattern: /^[a-zA-Z0-9\(\)\._\- ]+$/
216
213
  }
217
214
  };
215
+ const UpdateOrganizationSecuritySettingsRequest = {
216
+ loginAttemptsBeforeLocked: {
217
+ greaterThanOrEqual: 1,
218
+ lessThanOrEqual: 50
219
+ }
220
+ };
218
221
  const UpdatePolicyRequest = {
219
222
  description: {
220
223
  maxLength: 200
@@ -270,6 +273,7 @@ exports.RuleSpecs = RuleSpecs;
270
273
  exports.UpdateAPIKeyRequest = UpdateAPIKeyRequest;
271
274
  exports.UpdateApplicationRequest = UpdateApplicationRequest;
272
275
  exports.UpdateGroupRequest = UpdateGroupRequest;
276
+ exports.UpdateOrganizationSecuritySettingsRequest = UpdateOrganizationSecuritySettingsRequest;
273
277
  exports.UpdatePolicyRequest = UpdatePolicyRequest;
274
278
  exports.UpdateSSHKeyRequest = UpdateSSHKeyRequest;
275
279
  exports.UpdateUserPasswordRequest = UpdateUserPasswordRequest;
@@ -48,9 +48,6 @@ export declare const CreateSSHKeyRequest: {
48
48
  };
49
49
  };
50
50
  export declare const CreateUserRequestMember: {
51
- email: {
52
- ignoreEmpty: boolean;
53
- };
54
51
  password: {
55
52
  ignoreEmpty: boolean;
56
53
  maxLength: number;
@@ -213,6 +210,12 @@ export declare const UpdateGroupRequest: {
213
210
  pattern: RegExp;
214
211
  };
215
212
  };
213
+ export declare const UpdateOrganizationSecuritySettingsRequest: {
214
+ loginAttemptsBeforeLocked: {
215
+ greaterThanOrEqual: number;
216
+ lessThanOrEqual: number;
217
+ };
218
+ };
216
219
  export declare const UpdatePolicyRequest: {
217
220
  description: {
218
221
  maxLength: number;
@@ -48,9 +48,6 @@ const CreateSSHKeyRequest = {
48
48
  }
49
49
  };
50
50
  const CreateUserRequestMember = {
51
- email: {
52
- ignoreEmpty: true
53
- },
54
51
  password: {
55
52
  ignoreEmpty: true,
56
53
  maxLength: 72
@@ -213,6 +210,12 @@ const UpdateGroupRequest = {
213
210
  pattern: /^[a-zA-Z0-9\(\)\._\- ]+$/
214
211
  }
215
212
  };
213
+ const UpdateOrganizationSecuritySettingsRequest = {
214
+ loginAttemptsBeforeLocked: {
215
+ greaterThanOrEqual: 1,
216
+ lessThanOrEqual: 50
217
+ }
218
+ };
216
219
  const UpdatePolicyRequest = {
217
220
  description: {
218
221
  maxLength: 200
@@ -269,6 +272,7 @@ export {
269
272
  UpdateAPIKeyRequest,
270
273
  UpdateApplicationRequest,
271
274
  UpdateGroupRequest,
275
+ UpdateOrganizationSecuritySettingsRequest,
272
276
  UpdatePolicyRequest,
273
277
  UpdateSSHKeyRequest,
274
278
  UpdateUserPasswordRequest,
@@ -1,5 +1,5 @@
1
1
  import { API as ParentAPI } from '../../../bridge';
2
- import type { Region, WaitForOptions } from '../../../bridge';
2
+ import type { Region as ScwRegion, WaitForOptions } from '../../../bridge';
3
3
  import type { AddDeploymentACLRulesRequest, AddDeploymentACLRulesResponse, CreateDeploymentRequest, CreateEndpointRequest, DeleteDeploymentACLRuleRequest, DeleteDeploymentRequest, DeleteEndpointRequest, Deployment, Endpoint, Eula, GetDeploymentCertificateRequest, GetDeploymentRequest, GetModelEulaRequest, GetModelRequest, ListDeploymentACLRulesRequest, ListDeploymentACLRulesResponse, ListDeploymentsRequest, ListDeploymentsResponse, ListModelsRequest, ListModelsResponse, ListNodeTypesRequest, ListNodeTypesResponse, Model, SetDeploymentACLRulesRequest, SetDeploymentACLRulesResponse, UpdateDeploymentRequest, UpdateEndpointRequest } from './types.gen';
4
4
  /**
5
5
  * Managed Inference API.
@@ -8,7 +8,7 @@ import type { AddDeploymentACLRulesRequest, AddDeploymentACLRulesResponse, Creat
8
8
  */
9
9
  export declare class API extends ParentAPI {
10
10
  /** Lists the available regions of the API. */
11
- static readonly LOCALITIES: Region[];
11
+ static readonly LOCALITIES: ScwRegion[];
12
12
  protected pageOfListDeployments: (request?: Readonly<ListDeploymentsRequest>) => Promise<ListDeploymentsResponse>;
13
13
  /**
14
14
  * List inference deployments. List all your inference deployments.