@scaleway/sdk 2.45.0 → 2.46.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 (110) hide show
  1. package/dist/api/account/index.gen.d.ts +6 -0
  2. package/dist/api/applesilicon/index.gen.d.ts +5 -0
  3. package/dist/api/baremetal/index.gen.d.ts +5 -0
  4. package/dist/api/baremetal/v1/index.gen.d.ts +1 -1
  5. package/dist/api/baremetal/v1/marshalling.gen.cjs +61 -1
  6. package/dist/api/baremetal/v1/marshalling.gen.js +61 -1
  7. package/dist/api/baremetal/v1/types.gen.d.ts +120 -1
  8. package/dist/api/billing/index.gen.d.ts +6 -0
  9. package/dist/api/block/index.gen.d.ts +5 -0
  10. package/dist/api/cockpit/index.gen.d.ts +6 -0
  11. package/dist/api/cockpit/v1/types.gen.d.ts +1 -1
  12. package/dist/api/container/index.gen.d.ts +5 -0
  13. package/dist/api/container/v1beta1/api.gen.cjs +0 -23
  14. package/dist/api/container/v1beta1/api.gen.d.ts +1 -9
  15. package/dist/api/container/v1beta1/api.gen.js +1 -24
  16. package/dist/api/container/v1beta1/index.gen.d.ts +1 -1
  17. package/dist/api/container/v1beta1/types.gen.d.ts +0 -12
  18. package/dist/api/dedibox/index.gen.d.ts +5 -0
  19. package/dist/api/document_db/index.gen.d.ts +5 -0
  20. package/dist/api/domain/index.gen.d.ts +5 -0
  21. package/dist/api/edge_services/index.gen.d.ts +5 -0
  22. package/dist/api/flexibleip/index.gen.d.ts +5 -0
  23. package/dist/api/function/index.gen.d.ts +5 -0
  24. package/dist/api/function/v1beta1/api.gen.cjs +0 -23
  25. package/dist/api/function/v1beta1/api.gen.d.ts +1 -9
  26. package/dist/api/function/v1beta1/api.gen.js +1 -24
  27. package/dist/api/function/v1beta1/index.gen.d.ts +1 -1
  28. package/dist/api/function/v1beta1/types.gen.d.ts +0 -12
  29. package/dist/api/iam/index.gen.d.ts +5 -0
  30. package/dist/api/iam/v1alpha1/api.gen.cjs +1 -1
  31. package/dist/api/iam/v1alpha1/api.gen.d.ts +1 -1
  32. package/dist/api/iam/v1alpha1/api.gen.js +1 -1
  33. package/dist/api/iam/v1alpha1/index.gen.d.ts +1 -1
  34. package/dist/api/iam/v1alpha1/marshalling.gen.cjs +16 -3
  35. package/dist/api/iam/v1alpha1/marshalling.gen.js +16 -3
  36. package/dist/api/iam/v1alpha1/types.gen.d.ts +25 -3
  37. package/dist/api/iam/v1alpha1/validation-rules.gen.cjs +12 -0
  38. package/dist/api/iam/v1alpha1/validation-rules.gen.d.ts +11 -0
  39. package/dist/api/iam/v1alpha1/validation-rules.gen.js +12 -0
  40. package/dist/api/index.gen.d.ts +43 -0
  41. package/dist/api/inference/index.gen.d.ts +5 -0
  42. package/dist/api/instance/index.gen.d.ts +5 -0
  43. package/dist/api/instance/v1/marshalling.gen.cjs +1 -0
  44. package/dist/api/instance/v1/marshalling.gen.js +1 -0
  45. package/dist/api/instance/v1/types.gen.d.ts +22 -8
  46. package/dist/api/instance/v1/types.private.gen.d.ts +2 -2
  47. package/dist/api/iot/index.gen.d.ts +5 -0
  48. package/dist/api/ipam/index.gen.d.ts +5 -0
  49. package/dist/api/ipam/v1/api.gen.cjs +67 -2
  50. package/dist/api/ipam/v1/api.gen.d.ts +38 -3
  51. package/dist/api/ipam/v1/api.gen.js +68 -3
  52. package/dist/api/ipam/v1/index.gen.d.ts +1 -1
  53. package/dist/api/ipam/v1/marshalling.gen.cjs +18 -0
  54. package/dist/api/ipam/v1/marshalling.gen.d.ts +4 -1
  55. package/dist/api/ipam/v1/marshalling.gen.js +18 -0
  56. package/dist/api/ipam/v1/types.gen.d.ts +59 -5
  57. package/dist/api/ipfs/index.gen.d.ts +5 -0
  58. package/dist/api/jobs/index.gen.d.ts +5 -0
  59. package/dist/api/k8s/index.gen.d.ts +5 -0
  60. package/dist/api/k8s/v1/api.gen.cjs +17 -0
  61. package/dist/api/k8s/v1/api.gen.d.ts +10 -1
  62. package/dist/api/k8s/v1/api.gen.js +17 -0
  63. package/dist/api/k8s/v1/index.gen.d.ts +1 -1
  64. package/dist/api/k8s/v1/types.gen.d.ts +13 -0
  65. package/dist/api/key_manager/index.gen.d.ts +5 -0
  66. package/dist/api/key_manager/v1alpha1/api.gen.cjs +31 -0
  67. package/dist/api/key_manager/v1alpha1/api.gen.d.ts +17 -1
  68. package/dist/api/key_manager/v1alpha1/api.gen.js +32 -1
  69. package/dist/api/key_manager/v1alpha1/index.gen.d.ts +1 -1
  70. package/dist/api/key_manager/v1alpha1/marshalling.gen.cjs +7 -0
  71. package/dist/api/key_manager/v1alpha1/marshalling.gen.d.ts +2 -1
  72. package/dist/api/key_manager/v1alpha1/marshalling.gen.js +7 -0
  73. package/dist/api/key_manager/v1alpha1/types.gen.d.ts +33 -0
  74. package/dist/api/lb/index.gen.d.ts +5 -0
  75. package/dist/api/llm_inference/index.gen.d.ts +5 -0
  76. package/dist/api/marketplace/index.gen.d.ts +5 -0
  77. package/dist/api/mnq/index.gen.d.ts +5 -0
  78. package/dist/api/qaas/index.gen.d.ts +5 -0
  79. package/dist/api/qaas/v1alpha1/api.gen.d.ts +256 -0
  80. package/dist/api/qaas/v1alpha1/content.gen.d.ts +7 -0
  81. package/dist/api/qaas/v1alpha1/index.gen.d.ts +4 -0
  82. package/dist/api/qaas/v1alpha1/marshalling.gen.d.ts +22 -0
  83. package/dist/api/qaas/v1alpha1/types.gen.d.ts +470 -0
  84. package/dist/api/qaas/v1alpha1/validation-rules.gen.d.ts +10 -0
  85. package/dist/api/rdb/index.gen.d.ts +5 -0
  86. package/dist/api/redis/index.gen.d.ts +5 -0
  87. package/dist/api/registry/index.gen.d.ts +5 -0
  88. package/dist/api/secret/index.gen.d.ts +6 -0
  89. package/dist/api/serverless_sqldb/index.gen.d.ts +5 -0
  90. package/dist/api/tem/index.gen.d.ts +5 -0
  91. package/dist/api/tem/v1alpha1/content.gen.cjs +4 -1
  92. package/dist/api/tem/v1alpha1/content.gen.js +4 -1
  93. package/dist/api/tem/v1alpha1/types.gen.d.ts +1 -1
  94. package/dist/api/test/index.gen.d.ts +5 -0
  95. package/dist/api/vpc/index.gen.d.ts +6 -0
  96. package/dist/api/vpc/v2/marshalling.gen.cjs +1 -0
  97. package/dist/api/vpc/v2/marshalling.gen.js +1 -0
  98. package/dist/api/vpc/v2/types.gen.d.ts +3 -0
  99. package/dist/api/vpcgw/index.gen.d.ts +5 -0
  100. package/dist/api/webhosting/index.gen.d.ts +6 -0
  101. package/dist/api/webhosting/v1/api.gen.d.ts +326 -0
  102. package/dist/api/webhosting/v1/content.gen.d.ts +5 -0
  103. package/dist/api/webhosting/v1/index.gen.d.ts +4 -0
  104. package/dist/api/webhosting/v1/marshalling.gen.d.ts +29 -0
  105. package/dist/api/webhosting/v1/types.gen.d.ts +693 -0
  106. package/dist/api/webhosting/v1/validation-rules.gen.d.ts +72 -0
  107. package/dist/scw/constants.cjs +1 -1
  108. package/dist/scw/constants.d.ts +2 -2
  109. package/dist/scw/constants.js +1 -1
  110. package/package.json +2 -2
@@ -1,6 +1,6 @@
1
1
  import { API as ParentAPI } from '../../../bridge';
2
2
  import type { Region, WaitForOptions } from '../../../bridge';
3
- import type { CreateCronRequest, CreateDomainRequest, CreateFunctionRequest, CreateNamespaceRequest, CreateTokenRequest, CreateTriggerRequest, Cron, DeleteCronRequest, DeleteDomainRequest, DeleteFunctionRequest, DeleteNamespaceRequest, DeleteTokenRequest, DeleteTriggerRequest, DeployFunctionRequest, Domain, DownloadURL, Function, GetCronRequest, GetDomainRequest, GetFunctionDownloadURLRequest, GetFunctionRequest, GetFunctionUploadURLRequest, GetNamespaceRequest, GetTokenRequest, GetTriggerRequest, IssueJWTRequest, ListCronsRequest, ListCronsResponse, ListDomainsRequest, ListDomainsResponse, ListFunctionRuntimesRequest, ListFunctionRuntimesResponse, ListFunctionsRequest, ListFunctionsResponse, ListNamespacesRequest, ListNamespacesResponse, ListTokensRequest, ListTokensResponse, ListTriggersRequest, ListTriggersResponse, Namespace, Token, Trigger, UpdateCronRequest, UpdateFunctionRequest, UpdateNamespaceRequest, UpdateTriggerRequest, UploadURL } from './types.gen';
3
+ import type { CreateCronRequest, CreateDomainRequest, CreateFunctionRequest, CreateNamespaceRequest, CreateTokenRequest, CreateTriggerRequest, Cron, DeleteCronRequest, DeleteDomainRequest, DeleteFunctionRequest, DeleteNamespaceRequest, DeleteTokenRequest, DeleteTriggerRequest, DeployFunctionRequest, Domain, DownloadURL, Function, GetCronRequest, GetDomainRequest, GetFunctionDownloadURLRequest, GetFunctionRequest, GetFunctionUploadURLRequest, GetNamespaceRequest, GetTokenRequest, GetTriggerRequest, ListCronsRequest, ListCronsResponse, ListDomainsRequest, ListDomainsResponse, ListFunctionRuntimesRequest, ListFunctionRuntimesResponse, ListFunctionsRequest, ListFunctionsResponse, ListNamespacesRequest, ListNamespacesResponse, ListTokensRequest, ListTokensResponse, ListTriggersRequest, ListTriggersResponse, Namespace, Token, Trigger, UpdateCronRequest, UpdateFunctionRequest, UpdateNamespaceRequest, UpdateTriggerRequest, UploadURL } from './types.gen';
4
4
  /**
5
5
  * Serverless Functions API.
6
6
  *
@@ -231,14 +231,6 @@ export declare class API extends ParentAPI {
231
231
  * @returns A Promise of Domain
232
232
  */
233
233
  deleteDomain: (request: Readonly<DeleteDomainRequest>) => Promise<Domain>;
234
- /**
235
- * Create a JWT token. Deprecated in favor of CreateToken.
236
- *
237
- * @deprecated
238
- * @param request - The request {@link IssueJWTRequest}
239
- * @returns A Promise of Token
240
- */
241
- issueJWT: (request?: Readonly<IssueJWTRequest>) => Promise<Token>;
242
234
  /**
243
235
  * Create a new revocable token.
244
236
  *
@@ -4,7 +4,7 @@ import { validatePathParam, urlParams, resolveOneOf } from "../../../helpers/mar
4
4
  import "../../../vendor/base64/index.js";
5
5
  import { enrichForPagination } from "../../../scw/fetch/resource-paginator.js";
6
6
  import { NAMESPACE_TRANSIENT_STATUSES, FUNCTION_TRANSIENT_STATUSES, CRON_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES, TOKEN_TRANSIENT_STATUSES, TRIGGER_TRANSIENT_STATUSES } from "./content.gen.js";
7
- import { unmarshalListNamespacesResponse, unmarshalNamespace, marshalCreateNamespaceRequest, marshalUpdateNamespaceRequest, unmarshalListFunctionsResponse, unmarshalFunction, marshalCreateFunctionRequest, marshalUpdateFunctionRequest, unmarshalListFunctionRuntimesResponse, unmarshalUploadURL, unmarshalDownloadURL, unmarshalListCronsResponse, unmarshalCron, marshalCreateCronRequest, marshalUpdateCronRequest, unmarshalListDomainsResponse, unmarshalDomain, marshalCreateDomainRequest, unmarshalToken, marshalCreateTokenRequest, unmarshalListTokensResponse, marshalCreateTriggerRequest, unmarshalTrigger, unmarshalListTriggersResponse, marshalUpdateTriggerRequest } from "./marshalling.gen.js";
7
+ import { unmarshalListNamespacesResponse, unmarshalNamespace, marshalCreateNamespaceRequest, marshalUpdateNamespaceRequest, unmarshalListFunctionsResponse, unmarshalFunction, marshalCreateFunctionRequest, marshalUpdateFunctionRequest, unmarshalListFunctionRuntimesResponse, unmarshalUploadURL, unmarshalDownloadURL, unmarshalListCronsResponse, unmarshalCron, marshalCreateCronRequest, marshalUpdateCronRequest, unmarshalListDomainsResponse, unmarshalDomain, marshalCreateDomainRequest, marshalCreateTokenRequest, unmarshalToken, unmarshalListTokensResponse, marshalCreateTriggerRequest, unmarshalTrigger, unmarshalListTriggersResponse, marshalUpdateTriggerRequest } from "./marshalling.gen.js";
8
8
  const jsonContentHeaders = {
9
9
  "Content-Type": "application/json; charset=utf-8"
10
10
  };
@@ -451,29 +451,6 @@ class API extends API$1 {
451
451
  },
452
452
  unmarshalDomain
453
453
  );
454
- /**
455
- * Create a JWT token. Deprecated in favor of CreateToken.
456
- *
457
- * @deprecated
458
- * @param request - The request {@link IssueJWTRequest}
459
- * @returns A Promise of Token
460
- */
461
- issueJWT = (request = {}) => this.client.fetch(
462
- {
463
- method: "GET",
464
- path: `/functions/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/issue-jwt`,
465
- urlParams: urlParams(
466
- ["expires_at", request.expiresAt],
467
- ...Object.entries(
468
- resolveOneOf([
469
- { param: "function_id", value: request.functionId },
470
- { param: "namespace_id", value: request.namespaceId }
471
- ])
472
- )
473
- )
474
- },
475
- unmarshalToken
476
- );
477
454
  /**
478
455
  * Create a new revocable token.
479
456
  *
@@ -1,4 +1,4 @@
1
1
  export { API } from './api.gen';
2
2
  export * from './content.gen';
3
- export type { CreateCronRequest, CreateDomainRequest, CreateFunctionRequest, CreateNamespaceRequest, CreateTokenRequest, CreateTriggerRequest, CreateTriggerRequestMnqNatsClientConfig, CreateTriggerRequestMnqSqsClientConfig, CreateTriggerRequestSqsClientConfig, Cron, CronStatus, DeleteCronRequest, DeleteDomainRequest, DeleteFunctionRequest, DeleteNamespaceRequest, DeleteTokenRequest, DeleteTriggerRequest, DeployFunctionRequest, Domain, DomainStatus, DownloadURL, Function, FunctionHttpOption, FunctionPrivacy, FunctionRuntime, FunctionSandbox, FunctionStatus, GetCronRequest, GetDomainRequest, GetFunctionDownloadURLRequest, GetFunctionRequest, GetFunctionUploadURLRequest, GetNamespaceRequest, GetTokenRequest, GetTriggerRequest, IssueJWTRequest, ListCronsRequest, ListCronsRequestOrderBy, ListCronsResponse, ListDomainsRequest, ListDomainsRequestOrderBy, ListDomainsResponse, ListFunctionRuntimesRequest, ListFunctionRuntimesResponse, ListFunctionsRequest, ListFunctionsRequestOrderBy, ListFunctionsResponse, ListNamespacesRequest, ListNamespacesRequestOrderBy, ListNamespacesResponse, ListTokensRequest, ListTokensRequestOrderBy, ListTokensResponse, ListTriggersRequest, ListTriggersRequestOrderBy, ListTriggersResponse, Namespace, NamespaceStatus, Runtime, RuntimeStatus, Secret, SecretHashedValue, Token, TokenStatus, Trigger, TriggerInputType, TriggerMnqNatsClientConfig, TriggerMnqSqsClientConfig, TriggerSqsClientConfig, TriggerStatus, UpdateCronRequest, UpdateFunctionRequest, UpdateNamespaceRequest, UpdateTriggerRequest, UpdateTriggerRequestSqsClientConfig, UploadURL, } from './types.gen';
3
+ export type { CreateCronRequest, CreateDomainRequest, CreateFunctionRequest, CreateNamespaceRequest, CreateTokenRequest, CreateTriggerRequest, CreateTriggerRequestMnqNatsClientConfig, CreateTriggerRequestMnqSqsClientConfig, CreateTriggerRequestSqsClientConfig, Cron, CronStatus, DeleteCronRequest, DeleteDomainRequest, DeleteFunctionRequest, DeleteNamespaceRequest, DeleteTokenRequest, DeleteTriggerRequest, DeployFunctionRequest, Domain, DomainStatus, DownloadURL, Function, FunctionHttpOption, FunctionPrivacy, FunctionRuntime, FunctionSandbox, FunctionStatus, GetCronRequest, GetDomainRequest, GetFunctionDownloadURLRequest, GetFunctionRequest, GetFunctionUploadURLRequest, GetNamespaceRequest, GetTokenRequest, GetTriggerRequest, ListCronsRequest, ListCronsRequestOrderBy, ListCronsResponse, ListDomainsRequest, ListDomainsRequestOrderBy, ListDomainsResponse, ListFunctionRuntimesRequest, ListFunctionRuntimesResponse, ListFunctionsRequest, ListFunctionsRequestOrderBy, ListFunctionsResponse, ListNamespacesRequest, ListNamespacesRequestOrderBy, ListNamespacesResponse, ListTokensRequest, ListTokensRequestOrderBy, ListTokensResponse, ListTriggersRequest, ListTriggersRequestOrderBy, ListTriggersResponse, Namespace, NamespaceStatus, Runtime, RuntimeStatus, Secret, SecretHashedValue, Token, TokenStatus, Trigger, TriggerInputType, TriggerMnqNatsClientConfig, TriggerMnqSqsClientConfig, TriggerSqsClientConfig, TriggerStatus, UpdateCronRequest, UpdateFunctionRequest, UpdateNamespaceRequest, UpdateTriggerRequest, UpdateTriggerRequestSqsClientConfig, UploadURL, } from './types.gen';
4
4
  export * as ValidationRules from './validation-rules.gen';
@@ -547,18 +547,6 @@ export type GetTriggerRequest = {
547
547
  /** ID of the trigger to get. */
548
548
  triggerId: string;
549
549
  };
550
- export type IssueJWTRequest = {
551
- /**
552
- * Region to target. If none is passed will use default region from the
553
- * config.
554
- */
555
- region?: Region;
556
- /** One-of ('scope'): at most one of 'functionId', 'namespaceId' could be set. */
557
- functionId?: string;
558
- /** One-of ('scope'): at most one of 'functionId', 'namespaceId' could be set. */
559
- namespaceId?: string;
560
- expiresAt?: Date;
561
- };
562
550
  export type ListCronsRequest = {
563
551
  /**
564
552
  * Region to target. If none is passed will use default region from the
@@ -0,0 +1,5 @@
1
+ /**
2
+ * This file is automatically generated from /scripts/generate.js PLEASE DO NOT
3
+ * EDIT HERE
4
+ */
5
+ export * as v1alpha1 from './v1alpha1/index.gen';
@@ -185,7 +185,7 @@ class API extends api.API {
185
185
  * @param request - The request {@link CreateUserRequest}
186
186
  * @returns A Promise of User
187
187
  */
188
- createUser = (request) => this.client.fetch(
188
+ createUser = (request = {}) => this.client.fetch(
189
189
  {
190
190
  body: JSON.stringify(
191
191
  marshalling_gen.marshalCreateUserRequest(request, this.client.settings)
@@ -102,7 +102,7 @@ export declare class API extends ParentAPI {
102
102
  * @param request - The request {@link CreateUserRequest}
103
103
  * @returns A Promise of User
104
104
  */
105
- createUser: (request: Readonly<CreateUserRequest>) => Promise<User>;
105
+ createUser: (request?: Readonly<CreateUserRequest>) => Promise<User>;
106
106
  protected pageOfListApplications: (request?: Readonly<ListApplicationsRequest>) => Promise<ListApplicationsResponse>;
107
107
  /**
108
108
  * List applications of an Organization. List the applications of an
@@ -183,7 +183,7 @@ class API extends API$1 {
183
183
  * @param request - The request {@link CreateUserRequest}
184
184
  * @returns A Promise of User
185
185
  */
186
- createUser = (request) => this.client.fetch(
186
+ createUser = (request = {}) => this.client.fetch(
187
187
  {
188
188
  body: JSON.stringify(
189
189
  marshalCreateUserRequest(request, this.client.settings)
@@ -1,3 +1,3 @@
1
1
  export { API } from './api.gen';
2
- export type { APIKey, AddGroupMemberRequest, AddGroupMembersRequest, Application, BearerType, ClonePolicyRequest, CreateAPIKeyRequest, CreateApplicationRequest, CreateGroupRequest, CreateJWTRequest, CreatePolicyRequest, CreateSSHKeyRequest, CreateUserRequest, DeleteAPIKeyRequest, DeleteApplicationRequest, DeleteGroupRequest, DeleteJWTRequest, DeletePolicyRequest, DeleteSSHKeyRequest, DeleteUserRequest, EncodedJWT, GetAPIKeyRequest, GetApplicationRequest, GetGroupRequest, GetJWTRequest, GetLogRequest, GetPolicyRequest, GetQuotumRequest, GetSSHKeyRequest, GetUserRequest, Group, JWT, ListAPIKeysRequest, ListAPIKeysRequestOrderBy, ListAPIKeysResponse, ListApplicationsRequest, ListApplicationsRequestOrderBy, ListApplicationsResponse, 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, Log, LogAction, LogResourceType, PermissionSet, PermissionSetScopeType, Policy, Quotum, RemoveGroupMemberRequest, Rule, RuleSpecs, SSHKey, SetGroupMembersRequest, SetRulesRequest, SetRulesResponse, UpdateAPIKeyRequest, UpdateApplicationRequest, UpdateGroupRequest, UpdatePolicyRequest, UpdateSSHKeyRequest, UpdateUserRequest, User, UserStatus, UserType, } from './types.gen';
2
+ export type { APIKey, AddGroupMemberRequest, AddGroupMembersRequest, Application, BearerType, ClonePolicyRequest, CreateAPIKeyRequest, CreateApplicationRequest, CreateGroupRequest, CreateJWTRequest, CreatePolicyRequest, CreateSSHKeyRequest, CreateUserRequest, CreateUserRequestMember, DeleteAPIKeyRequest, DeleteApplicationRequest, DeleteGroupRequest, DeleteJWTRequest, DeletePolicyRequest, DeleteSSHKeyRequest, DeleteUserRequest, EncodedJWT, GetAPIKeyRequest, GetApplicationRequest, GetGroupRequest, GetJWTRequest, GetLogRequest, GetPolicyRequest, GetQuotumRequest, GetSSHKeyRequest, GetUserRequest, Group, JWT, ListAPIKeysRequest, ListAPIKeysRequestOrderBy, ListAPIKeysResponse, ListApplicationsRequest, ListApplicationsRequestOrderBy, ListApplicationsResponse, 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, Log, LogAction, LogResourceType, PermissionSet, PermissionSetScopeType, Policy, Quotum, RemoveGroupMemberRequest, Rule, RuleSpecs, SSHKey, SetGroupMembersRequest, SetRulesRequest, SetRulesResponse, UpdateAPIKeyRequest, UpdateApplicationRequest, UpdateGroupRequest, UpdatePolicyRequest, UpdateSSHKeyRequest, UpdateUserRequest, User, UserStatus, UserType, } from './types.gen';
3
3
  export * as ValidationRules from './validation-rules.gen';
@@ -171,7 +171,8 @@ const unmarshalUser = (data) => {
171
171
  tags: data.tags,
172
172
  twoFactorEnabled: data.two_factor_enabled,
173
173
  type: data.type,
174
- updatedAt: marshalling.unmarshalDate(data.updated_at)
174
+ updatedAt: marshalling.unmarshalDate(data.updated_at),
175
+ username: data.username
175
176
  };
176
177
  };
177
178
  const unmarshalEncodedJWT = (data) => {
@@ -414,10 +415,22 @@ const marshalCreateSSHKeyRequest = (request, defaults) => ({
414
415
  project_id: request.projectId ?? defaults.defaultProjectId,
415
416
  public_key: request.publicKey
416
417
  });
417
- const marshalCreateUserRequest = (request, defaults) => ({
418
+ const marshalCreateUserRequestMember = (request, defaults) => ({
418
419
  email: request.email,
420
+ password: request.password,
421
+ send_password_email: request.sendPasswordEmail,
422
+ username: request.username
423
+ });
424
+ const marshalCreateUserRequest = (request, defaults) => ({
419
425
  organization_id: request.organizationId ?? defaults.defaultOrganizationId,
420
- tags: request.tags
426
+ tags: request.tags,
427
+ ...marshalling.resolveOneOf([
428
+ { param: "email", value: request.email },
429
+ {
430
+ param: "member",
431
+ value: request.member !== void 0 ? marshalCreateUserRequestMember(request.member) : void 0
432
+ }
433
+ ])
421
434
  });
422
435
  const marshalRemoveGroupMemberRequest = (request, defaults) => ({
423
436
  ...marshalling.resolveOneOf([
@@ -169,7 +169,8 @@ const unmarshalUser = (data) => {
169
169
  tags: data.tags,
170
170
  twoFactorEnabled: data.two_factor_enabled,
171
171
  type: data.type,
172
- updatedAt: unmarshalDate(data.updated_at)
172
+ updatedAt: unmarshalDate(data.updated_at),
173
+ username: data.username
173
174
  };
174
175
  };
175
176
  const unmarshalEncodedJWT = (data) => {
@@ -412,10 +413,22 @@ const marshalCreateSSHKeyRequest = (request, defaults) => ({
412
413
  project_id: request.projectId ?? defaults.defaultProjectId,
413
414
  public_key: request.publicKey
414
415
  });
415
- const marshalCreateUserRequest = (request, defaults) => ({
416
+ const marshalCreateUserRequestMember = (request, defaults) => ({
416
417
  email: request.email,
418
+ password: request.password,
419
+ send_password_email: request.sendPasswordEmail,
420
+ username: request.username
421
+ });
422
+ const marshalCreateUserRequest = (request, defaults) => ({
417
423
  organization_id: request.organizationId ?? defaults.defaultOrganizationId,
418
- tags: request.tags
424
+ tags: request.tags,
425
+ ...resolveOneOf([
426
+ { param: "email", value: request.email },
427
+ {
428
+ param: "member",
429
+ value: request.member !== void 0 ? marshalCreateUserRequestMember(request.member) : void 0
430
+ }
431
+ ])
419
432
  });
420
433
  const marshalRemoveGroupMemberRequest = (request, defaults) => ({
421
434
  ...resolveOneOf([
@@ -13,7 +13,7 @@ export type LogAction = 'unknown_action' | 'created' | 'updated' | 'deleted';
13
13
  export type LogResourceType = 'unknown_resource_type' | 'api_key' | 'user' | 'application' | 'group' | 'policy';
14
14
  export type PermissionSetScopeType = 'unknown_scope_type' | 'projects' | 'organization' | 'account_root_user';
15
15
  export type UserStatus = 'unknown_status' | 'invitation_pending' | 'activated';
16
- export type UserType = 'unknown_type' | 'guest' | 'owner';
16
+ export type UserType = 'unknown_type' | 'guest' | 'owner' | 'member';
17
17
  export interface RuleSpecs {
18
18
  /** Names of permission sets bound to the rule. */
19
19
  permissionSetNames?: string[];
@@ -34,6 +34,16 @@ export interface RuleSpecs {
34
34
  */
35
35
  organizationId?: string;
36
36
  }
37
+ export interface CreateUserRequestMember {
38
+ /** Email of the user to create. */
39
+ email: string;
40
+ /** Whether or not to send an email containing the member's password. */
41
+ sendPasswordEmail: boolean;
42
+ /** The member's username. */
43
+ username: string;
44
+ /** The member's password. */
45
+ password: string;
46
+ }
37
47
  export interface JWT {
38
48
  /** JWT ID. */
39
49
  jti: string;
@@ -286,6 +296,8 @@ export interface User {
286
296
  id: string;
287
297
  /** Email of user. */
288
298
  email: string;
299
+ /** User identifier unique to the Organization. */
300
+ username: string;
289
301
  /** Date user was created. */
290
302
  createdAt?: Date;
291
303
  /** Date of last user update. */
@@ -439,10 +451,20 @@ export type CreateSSHKeyRequest = {
439
451
  export type CreateUserRequest = {
440
452
  /** ID of the Organization. */
441
453
  organizationId?: string;
442
- /** Email of the user. */
443
- email: string;
454
+ /**
455
+ * Email of the user.
456
+ *
457
+ * One-of ('type'): at most one of 'email', 'member' could be set.
458
+ */
459
+ email?: string;
444
460
  /** Tags associated with the user. */
445
461
  tags?: string[];
462
+ /**
463
+ * A new IAM Member to create.
464
+ *
465
+ * One-of ('type'): at most one of 'email', 'member' could be set.
466
+ */
467
+ member?: CreateUserRequestMember;
446
468
  };
447
469
  export type DeleteAPIKeyRequest = {
448
470
  /** Access key to delete. */
@@ -49,6 +49,17 @@ const CreateSSHKeyRequest = {
49
49
  minLength: 1
50
50
  }
51
51
  };
52
+ const CreateUserRequestMember = {
53
+ password: {
54
+ ignoreEmpty: true,
55
+ maxLength: 72
56
+ },
57
+ username: {
58
+ maxLength: 64,
59
+ minLength: 2,
60
+ pattern: /^[a-zA-Z0-9._-]+$/
61
+ }
62
+ };
52
63
  const GetQuotumRequest = {
53
64
  quotumName: {
54
65
  minLength: 1
@@ -221,6 +232,7 @@ exports.CreateApplicationRequest = CreateApplicationRequest;
221
232
  exports.CreateGroupRequest = CreateGroupRequest;
222
233
  exports.CreatePolicyRequest = CreatePolicyRequest;
223
234
  exports.CreateSSHKeyRequest = CreateSSHKeyRequest;
235
+ exports.CreateUserRequestMember = CreateUserRequestMember;
224
236
  exports.GetQuotumRequest = GetQuotumRequest;
225
237
  exports.ListAPIKeysRequest = ListAPIKeysRequest;
226
238
  exports.ListApplicationsRequest = ListApplicationsRequest;
@@ -47,6 +47,17 @@ export declare const CreateSSHKeyRequest: {
47
47
  minLength: number;
48
48
  };
49
49
  };
50
+ export declare const CreateUserRequestMember: {
51
+ password: {
52
+ ignoreEmpty: boolean;
53
+ maxLength: number;
54
+ };
55
+ username: {
56
+ maxLength: number;
57
+ minLength: number;
58
+ pattern: RegExp;
59
+ };
60
+ };
50
61
  export declare const GetQuotumRequest: {
51
62
  quotumName: {
52
63
  minLength: number;
@@ -47,6 +47,17 @@ const CreateSSHKeyRequest = {
47
47
  minLength: 1
48
48
  }
49
49
  };
50
+ const CreateUserRequestMember = {
51
+ password: {
52
+ ignoreEmpty: true,
53
+ maxLength: 72
54
+ },
55
+ username: {
56
+ maxLength: 64,
57
+ minLength: 2,
58
+ pattern: /^[a-zA-Z0-9._-]+$/
59
+ }
60
+ };
50
61
  const GetQuotumRequest = {
51
62
  quotumName: {
52
63
  minLength: 1
@@ -220,6 +231,7 @@ export {
220
231
  CreateGroupRequest,
221
232
  CreatePolicyRequest,
222
233
  CreateSSHKeyRequest,
234
+ CreateUserRequestMember,
223
235
  GetQuotumRequest,
224
236
  ListAPIKeysRequest,
225
237
  ListApplicationsRequest,
@@ -0,0 +1,43 @@
1
+ /**
2
+ * This file is automatically generated from /scripts/generate.js PLEASE DO NOT
3
+ * EDIT HERE
4
+ */
5
+ import * as Account from './account/index.gen';
6
+ import * as Applesilicon from './applesilicon/index.gen';
7
+ import * as Baremetal from './baremetal/index.gen';
8
+ import * as Billing from './billing/index.gen';
9
+ import * as Block from './block/index.gen';
10
+ import * as Cockpit from './cockpit/index.gen';
11
+ import * as Container from './container/index.gen';
12
+ import * as Dedibox from './dedibox/index.gen';
13
+ import * as DocumentDb from './document_db/index.gen';
14
+ import * as Domain from './domain/index.gen';
15
+ import * as EdgeServices from './edge_services/index.gen';
16
+ import * as Flexibleip from './flexibleip/index.gen';
17
+ import * as Function from './function/index.gen';
18
+ import * as Iam from './iam/index.gen';
19
+ import * as Inference from './inference/index.gen';
20
+ import * as Instance from './instance/index.gen';
21
+ import * as Iot from './iot/index.gen';
22
+ import * as Ipam from './ipam/index.gen';
23
+ import * as Ipfs from './ipfs/index.gen';
24
+ import * as Jobs from './jobs/index.gen';
25
+ import * as K8s from './k8s/index.gen';
26
+ import * as KeyManager from './key_manager/index.gen';
27
+ import * as Lb from './lb/index.gen';
28
+ import * as LlmInference from './llm_inference/index.gen';
29
+ import * as Marketplace from './marketplace/index.gen';
30
+ import * as Mnq from './mnq/index.gen';
31
+ import * as Qaas from './qaas/index.gen';
32
+ import * as Rdb from './rdb/index.gen';
33
+ import * as Redis from './redis/index.gen';
34
+ import * as Registry from './registry/index.gen';
35
+ import * as Secret from './secret/index.gen';
36
+ import * as ServerlessSqldb from './serverless_sqldb/index.gen';
37
+ import * as Std from './std/index.gen';
38
+ import * as Tem from './tem/index.gen';
39
+ import * as Test from './test/index.gen';
40
+ import * as Vpc from './vpc/index.gen';
41
+ import * as Vpcgw from './vpcgw/index.gen';
42
+ import * as Webhosting from './webhosting/index.gen';
43
+ export { Account, Applesilicon, Baremetal, Billing, Block, Cockpit, Container, Dedibox, DocumentDb, Domain, EdgeServices, Flexibleip, Function, Iam, Inference, Instance, Iot, Ipam, Ipfs, Jobs, K8s, KeyManager, Lb, LlmInference, Marketplace, Mnq, Qaas, Rdb, Redis, Registry, Secret, ServerlessSqldb, Std, Tem, Test, Vpc, Vpcgw, Webhosting, };
@@ -0,0 +1,5 @@
1
+ /**
2
+ * This file is automatically generated from /scripts/generate.js PLEASE DO NOT
3
+ * EDIT HERE
4
+ */
5
+ export * as v1beta1 from './v1beta1/index.gen';
@@ -0,0 +1,5 @@
1
+ /**
2
+ * This file is automatically generated from /scripts/generate.js PLEASE DO NOT
3
+ * EDIT HERE
4
+ */
5
+ export * as v1 from './v1/index';
@@ -867,6 +867,7 @@ const unmarshalServerType = (data) => {
867
867
  altNames: data.alt_names,
868
868
  arch: data.arch,
869
869
  baremetal: data.baremetal,
870
+ blockBandwidth: data.block_bandwidth,
870
871
  capabilities: data.capabilities ? unmarshalServerTypeCapabilities(data.capabilities) : void 0,
871
872
  gpu: data.gpu,
872
873
  hourlyPrice: data.hourly_price,
@@ -865,6 +865,7 @@ const unmarshalServerType = (data) => {
865
865
  altNames: data.alt_names,
866
866
  arch: data.arch,
867
867
  baremetal: data.baremetal,
868
+ blockBandwidth: data.block_bandwidth,
868
869
  capabilities: data.capabilities ? unmarshalServerTypeCapabilities(data.capabilities) : void 0,
869
870
  gpu: data.gpu,
870
871
  hourlyPrice: data.hourly_price,
@@ -282,8 +282,11 @@ export interface Server {
282
282
  creationDate?: Date;
283
283
  /** True if a dynamic IPv4 is required. */
284
284
  dynamicIpRequired: boolean;
285
- /** True to configure the instance so it uses the new routed IP mode. */
286
- routedIpEnabled: boolean;
285
+ /**
286
+ * @deprecated True to configure the instance so it uses the routed IP mode.
287
+ * Use of `routed_ip_enabled` as `False` is deprecated.
288
+ */
289
+ routedIpEnabled?: boolean;
287
290
  /**
288
291
  * @deprecated True if IPv6 is enabled (deprecated and always `False` when
289
292
  * `routed_ip_enabled` is `True`).
@@ -566,6 +569,11 @@ export interface ServerType {
566
569
  capabilities?: ServerTypeCapabilities;
567
570
  /** Maximum available scratch storage. */
568
571
  scratchStorageMaxSize?: number;
572
+ /**
573
+ * The maximum bandwidth allocated to block storage access (in bytes per
574
+ * second).
575
+ */
576
+ blockBandwidth?: number;
569
577
  }
570
578
  export interface VolumeType {
571
579
  displayName: string;
@@ -718,7 +726,10 @@ export type CreateIpRequest = {
718
726
  tags?: string[];
719
727
  /** UUID of the Instance you want to attach the IP to. */
720
728
  server?: string;
721
- /** IP type to reserve (either 'nat', 'routed_ipv4' or 'routed_ipv6'). */
729
+ /**
730
+ * IP type to reserve (either 'routed_ipv4' or 'routed_ipv6', use of 'nat' is
731
+ * deprecated).
732
+ */
722
733
  type?: IpType;
723
734
  };
724
735
  export interface CreateIpResponse {
@@ -855,7 +866,10 @@ export type CreateServerRequest = {
855
866
  name?: string;
856
867
  /** Define if a dynamic IPv4 is required for the Instance. */
857
868
  dynamicIpRequired?: boolean;
858
- /** If true, configure the Instance so it uses the new routed IP mode. */
869
+ /**
870
+ * @deprecated If true, configure the Instance so it uses the new routed IP
871
+ * mode.
872
+ */
859
873
  routedIpEnabled?: boolean;
860
874
  /** Define the Instance commercial type (i.e. GP1-S). */
861
875
  commercialType: string;
@@ -1251,8 +1265,8 @@ export type ListIpsRequest = {
1251
1265
  /** A positive integer to choose the page to return. */
1252
1266
  page?: number;
1253
1267
  /**
1254
- * Filter on the IP Mobility IP type (whose value should be either 'nat',
1255
- * 'routed_ipv4' or 'routed_ipv6').
1268
+ * Filter on the IP Mobility IP type (whose value should be either
1269
+ * 'routed_ipv4', 'routed_ipv6' or 'nat').
1256
1270
  */
1257
1271
  type?: string;
1258
1272
  };
@@ -1779,8 +1793,8 @@ export type UpdateServerRequest = {
1779
1793
  bootscript?: string;
1780
1794
  dynamicIpRequired?: boolean;
1781
1795
  /**
1782
- * True to configure the instance so it uses the new routed IP mode (once this
1783
- * is set to True you cannot set it back to False).
1796
+ * @deprecated True to configure the instance so it uses the new routed IP
1797
+ * mode (once this is set to True you cannot set it back to False).
1784
1798
  */
1785
1799
  routedIpEnabled?: boolean;
1786
1800
  /** A list of reserved IP IDs to attach to the Instance. */
@@ -83,8 +83,8 @@ export type SetServerRequest = {
83
83
  /** True if a dynamic IPv4 is required. */
84
84
  dynamicIpRequired: boolean;
85
85
  /**
86
- * True to configure the instance so it uses the new routed IP mode (once this
87
- * is set to True you cannot set it back to False).
86
+ * @deprecated True to configure the instance so it uses the new routed IP
87
+ * mode (once this is set to True you cannot set it back to False).
88
88
  */
89
89
  routedIpEnabled?: boolean;
90
90
  /**
@@ -0,0 +1,5 @@
1
+ /**
2
+ * This file is automatically generated from /scripts/generate.js PLEASE DO NOT
3
+ * EDIT HERE
4
+ */
5
+ export * as v1 from './v1/index.gen';
@@ -0,0 +1,5 @@
1
+ /**
2
+ * This file is automatically generated from /scripts/generate.js PLEASE DO NOT
3
+ * EDIT HERE
4
+ */
5
+ export * as v1 from './v1/index.gen';
@@ -12,8 +12,8 @@ class API extends api.API {
12
12
  /** Lists the available regions of the API. */
13
13
  static LOCALITIES = ["fr-par", "nl-ams", "pl-waw"];
14
14
  /**
15
- * Book a new IP. Book a new IP from the specified source. Currently IPs can
16
- * only be booked from a Private Network.
15
+ * Reserve a new IP. Reserve a new IP from the specified source. Currently IPs
16
+ * can only be reserved from a Private Network.
17
17
  *
18
18
  * @param request - The request {@link BookIPRequest}
19
19
  * @returns A Promise of IP
@@ -123,5 +123,70 @@ class API extends api.API {
123
123
  * @returns A Promise of ListIPsResponse
124
124
  */
125
125
  listIPs = (request = {}) => resourcePaginator.enrichForPagination("ips", this.pageOfListIPs, request);
126
+ /**
127
+ * Attach IP to custom resource. Attach an existing reserved IP from a Private
128
+ * Network subnet to a custom, named resource via its MAC address. An example
129
+ * of a custom resource is a virtual machine hosted on an Elastic Metal
130
+ * server. Do not use this method for attaching IP addresses to standard
131
+ * Scaleway resources as it will fail - see the relevant product API for an
132
+ * equivalent method.
133
+ *
134
+ * @param request - The request {@link AttachIPRequest}
135
+ * @returns A Promise of IP
136
+ */
137
+ attachIP = (request) => this.client.fetch(
138
+ {
139
+ body: JSON.stringify(
140
+ marshalling_gen.marshalAttachIPRequest(request, this.client.settings)
141
+ ),
142
+ headers: jsonContentHeaders,
143
+ method: "POST",
144
+ path: `/ipam/v1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/ips/${marshalling.validatePathParam("ipId", request.ipId)}/attach`
145
+ },
146
+ marshalling_gen.unmarshalIP
147
+ );
148
+ /**
149
+ * Detach IP from a custom resource. Detach a private IP from a custom
150
+ * resource. An example of a custom resource is a virtual machine hosted on an
151
+ * Elastic Metal server. Do not use this method for detaching IP addresses
152
+ * from standard Scaleway resources (e.g. Instances, Load Balancers) as it
153
+ * will fail - see the relevant product API for an equivalent method.
154
+ *
155
+ * @param request - The request {@link DetachIPRequest}
156
+ * @returns A Promise of IP
157
+ */
158
+ detachIP = (request) => this.client.fetch(
159
+ {
160
+ body: JSON.stringify(
161
+ marshalling_gen.marshalDetachIPRequest(request, this.client.settings)
162
+ ),
163
+ headers: jsonContentHeaders,
164
+ method: "POST",
165
+ path: `/ipam/v1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/ips/${marshalling.validatePathParam("ipId", request.ipId)}/detach`
166
+ },
167
+ marshalling_gen.unmarshalIP
168
+ );
169
+ /**
170
+ * Move IP to a custom resource. Move an existing reserved private IP from one
171
+ * custom resource (e.g. a virtual machine hosted on an Elastic Metal server)
172
+ * to another custom resource. This will detach it from the first resource,
173
+ * and attach it to the second. Do not use this method for moving IP addresses
174
+ * between standard Scaleway resources (e.g. Instances, Load Balancers) as it
175
+ * will fail - see the relevant product API for an equivalent method.
176
+ *
177
+ * @param request - The request {@link MoveIPRequest}
178
+ * @returns A Promise of IP
179
+ */
180
+ moveIP = (request) => this.client.fetch(
181
+ {
182
+ body: JSON.stringify(
183
+ marshalling_gen.marshalMoveIPRequest(request, this.client.settings)
184
+ ),
185
+ headers: jsonContentHeaders,
186
+ method: "POST",
187
+ path: `/ipam/v1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/ips/${marshalling.validatePathParam("ipId", request.ipId)}/move`
188
+ },
189
+ marshalling_gen.unmarshalIP
190
+ );
126
191
  }
127
192
  exports.API = API;