Skip to content

Commit 7a8b5bc

Browse files
authored
Merge branch 'main' into v1.6960.0
2 parents 7280ce0 + b0d384a commit 7a8b5bc

File tree

11 files changed

+5755
-2203
lines changed

11 files changed

+5755
-2203
lines changed

.github/workflows/deploy-package.yml

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,6 @@ jobs:
2020
persist-credentials: false
2121
token: ${{ secrets.GH_TOKEN }}
2222
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
23-
24-
- name: Setup SSH signing
25-
run: |
26-
mkdir -p ~/.ssh
27-
echo "${{ secrets.SSH_SIGNING_PRIVATE_KEY }}" > ~/.ssh/signing_key
28-
chmod 600 ~/.ssh/signing_key
29-
echo "${{ secrets.SSH_SIGNING_PUBLIC_KEY }}" > ~/.ssh/signing_key.pub
30-
chmod 644 ~/.ssh/signing_key.pub
31-
git config --global gpg.format ssh
32-
git config --global user.signingkey ~/.ssh/signing_key.pub
33-
git config --global commit.gpgsign true
34-
git config --global tag.gpgsign true
35-
3623
- name: Git Identity
3724
run: |
3825
git config --global user.name 'scaleway-bot'
@@ -48,16 +35,11 @@ jobs:
4835
registry-url: 'https://registry.npmjs.org/'
4936
node-version: 20
5037
check-latest: true
51-
- run: make install-dependencies
52-
- run: make build
38+
- run: pnpm install
39+
- run: pnpm run build
5340

5441
- name: Version package with lerna
55-
run: |
56-
pnpm lerna changed
57-
# Commit any generated files before versioning
58-
git add .
59-
git commit -m "chore: update generated files" || true
60-
pnpm lerna version -y --no-private --force-git-tag --create-release github
42+
run: pnpm lerna version -y --no-private --force-git-tag --create-release github
6143
env:
6244
HUSKY: 0
6345
GH_TOKEN: ${{ secrets.GH_TOKEN }}

packages_generated/container/src/v1beta1/types.gen.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1282,7 +1282,18 @@ export type UpdateContainerRequest = {
12821282
*/
12831283
port?: number
12841284
/**
1285-
* Secret environment variables of the container.
1285+
* During an update, secret environment variables that are not specified in this field will be kept unchanged.
1286+
1287+
In order to delete a specific secret environment variable, you must reference its key, but not provide any value for it.
1288+
For example, the following payload will delete the `TO_DELETE` secret environment variable:
1289+
1290+
```json
1291+
{
1292+
"secret_environment_variables":[
1293+
{"key":"TO_DELETE"}
1294+
]
1295+
}
1296+
```.
12861297
*/
12871298
secretEnvironmentVariables?: Secret[]
12881299
/**

packages_generated/function/src/v1beta1/types.gen.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1281,7 +1281,18 @@ export type UpdateFunctionRequest = {
12811281
*/
12821282
description?: string
12831283
/**
1284-
* Secret environment variables of the function.
1284+
* During an update, secret environment variables that are not specified in this field will be kept unchanged.
1285+
1286+
In order to delete a specific secret environment variable, you must reference its key, but not provide any value for it.
1287+
For example, the following payload will delete the `TO_DELETE` secret environment variable:
1288+
1289+
```json
1290+
{
1291+
"secret_environment_variables":[
1292+
{"key":"TO_DELETE"}
1293+
]
1294+
}
1295+
```.
12851296
*/
12861297
secretEnvironmentVariables?: Secret[]
12871298
/**

packages_generated/iam/src/v1alpha1/api.gen.ts

Lines changed: 19 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import {
1515
marshalCreateApplicationRequest,
1616
marshalCreateGroupRequest,
1717
marshalCreateJWTRequest,
18-
marshalCreateOrganizationSamlRequest,
1918
marshalCreatePolicyRequest,
2019
marshalCreateSSHKeyRequest,
2120
marshalCreateUserRequest,
@@ -28,9 +27,9 @@ import {
2827
marshalUpdateAPIKeyRequest,
2928
marshalUpdateApplicationRequest,
3029
marshalUpdateGroupRequest,
31-
marshalUpdateOrganizationSamlRequest,
3230
marshalUpdateOrganizationSecuritySettingsRequest,
3331
marshalUpdatePolicyRequest,
32+
marshalUpdateSamlRequest,
3433
marshalUpdateSSHKeyRequest,
3534
marshalUpdateUserPasswordRequest,
3635
marshalUpdateUserRequest,
@@ -64,7 +63,6 @@ import {
6463
unmarshalQuotum,
6564
unmarshalSaml,
6665
unmarshalSamlCertificate,
67-
unmarshalSamlInformation,
6866
unmarshalSetRulesResponse,
6967
unmarshalSSHKey,
7068
unmarshalUser,
@@ -81,7 +79,6 @@ import type {
8179
CreateApplicationRequest,
8280
CreateGroupRequest,
8381
CreateJWTRequest,
84-
CreateOrganizationSamlRequest,
8582
CreatePolicyRequest,
8683
CreateSSHKeyRequest,
8784
CreateUserMFAOTPRequest,
@@ -90,12 +87,13 @@ import type {
9087
DeleteApplicationRequest,
9188
DeleteGroupRequest,
9289
DeleteJWTRequest,
93-
DeleteOrganizationSamlRequest,
9490
DeletePolicyRequest,
9591
DeleteSamlCertificateRequest,
92+
DeleteSamlRequest,
9693
DeleteSSHKeyRequest,
9794
DeleteUserMFAOTPRequest,
9895
DeleteUserRequest,
96+
EnableOrganizationSamlRequest,
9997
EncodedJWT,
10098
GetAPIKeyRequest,
10199
GetApplicationRequest,
@@ -107,7 +105,6 @@ import type {
107105
GetOrganizationSecuritySettingsRequest,
108106
GetPolicyRequest,
109107
GetQuotumRequest,
110-
GetSamlInformationRequest,
111108
GetSSHKeyRequest,
112109
GetUserConnectionsRequest,
113110
GetUserConnectionsResponse,
@@ -155,7 +152,6 @@ import type {
155152
RemoveUserConnectionRequest,
156153
Saml,
157154
SamlCertificate,
158-
SamlInformation,
159155
SetGroupMembersRequest,
160156
SetOrganizationAliasRequest,
161157
SetRulesRequest,
@@ -165,9 +161,9 @@ import type {
165161
UpdateAPIKeyRequest,
166162
UpdateApplicationRequest,
167163
UpdateGroupRequest,
168-
UpdateOrganizationSamlRequest,
169164
UpdateOrganizationSecuritySettingsRequest,
170165
UpdatePolicyRequest,
166+
UpdateSamlRequest,
171167
UpdateSSHKeyRequest,
172168
UpdateUserPasswordRequest,
173169
UpdateUserRequest,
@@ -1425,17 +1421,17 @@ export class API extends ParentAPI {
14251421
)
14261422

14271423
/**
1428-
* Create a SAML Identity Provider configuration for an Organization.
1424+
* Enable SAML Identity Provider for an Organization.
14291425
*
1430-
* @param request - The request {@link CreateOrganizationSamlRequest}
1426+
* @param request - The request {@link EnableOrganizationSamlRequest}
14311427
* @returns A Promise of Saml
14321428
*/
1433-
createOrganizationSaml = (request: Readonly<CreateOrganizationSamlRequest>) =>
1429+
enableOrganizationSaml = (
1430+
request: Readonly<EnableOrganizationSamlRequest> = {},
1431+
) =>
14341432
this.client.fetch<Saml>(
14351433
{
1436-
body: JSON.stringify(
1437-
marshalCreateOrganizationSamlRequest(request, this.client.settings),
1438-
),
1434+
body: '{}',
14391435
headers: jsonContentHeaders,
14401436
method: 'POST',
14411437
path: `/iam/v1alpha1/organizations/${validatePathParam('organizationId', request.organizationId ?? this.client.settings.defaultOrganizationId)}/saml`,
@@ -1444,37 +1440,33 @@ export class API extends ParentAPI {
14441440
)
14451441

14461442
/**
1447-
* Update a SAML Identity Provider configuration for an Organization.
1443+
* Update SAML Identity Provider configuration.
14481444
*
1449-
* @param request - The request {@link UpdateOrganizationSamlRequest}
1445+
* @param request - The request {@link UpdateSamlRequest}
14501446
* @returns A Promise of Saml
14511447
*/
1452-
updateOrganizationSaml = (
1453-
request: Readonly<UpdateOrganizationSamlRequest> = {},
1454-
) =>
1448+
updateSaml = (request: Readonly<UpdateSamlRequest>) =>
14551449
this.client.fetch<Saml>(
14561450
{
14571451
body: JSON.stringify(
1458-
marshalUpdateOrganizationSamlRequest(request, this.client.settings),
1452+
marshalUpdateSamlRequest(request, this.client.settings),
14591453
),
14601454
headers: jsonContentHeaders,
14611455
method: 'PATCH',
1462-
path: `/iam/v1alpha1/organizations/${validatePathParam('organizationId', request.organizationId ?? this.client.settings.defaultOrganizationId)}/saml`,
1456+
path: `/iam/v1alpha1/saml/${validatePathParam('samlId', request.samlId)}`,
14631457
},
14641458
unmarshalSaml,
14651459
)
14661460

14671461
/**
1468-
* Delete a SAML Identity Provider configuration for an Organization.
1462+
* Disable SAML Identity Provider for an Organization.
14691463
*
1470-
* @param request - The request {@link DeleteOrganizationSamlRequest}
1464+
* @param request - The request {@link DeleteSamlRequest}
14711465
*/
1472-
deleteOrganizationSaml = (
1473-
request: Readonly<DeleteOrganizationSamlRequest> = {},
1474-
) =>
1466+
deleteSaml = (request: Readonly<DeleteSamlRequest>) =>
14751467
this.client.fetch<void>({
14761468
method: 'DELETE',
1477-
path: `/iam/v1alpha1/organizations/${validatePathParam('organizationId', request.organizationId ?? this.client.settings.defaultOrganizationId)}/saml`,
1469+
path: `/iam/v1alpha1/saml/${validatePathParam('samlId', request.samlId)}`,
14781470
})
14791471

14801472
/**
@@ -1521,19 +1513,4 @@ export class API extends ParentAPI {
15211513
method: 'DELETE',
15221514
path: `/iam/v1alpha1/saml-certificates/${validatePathParam('certificateId', request.certificateId)}`,
15231515
})
1524-
1525-
/**
1526-
* Get SAML information.
1527-
*
1528-
* @param request - The request {@link GetSamlInformationRequest}
1529-
* @returns A Promise of SamlInformation
1530-
*/
1531-
getSamlInformation = (request: Readonly<GetSamlInformationRequest> = {}) =>
1532-
this.client.fetch<SamlInformation>(
1533-
{
1534-
method: 'GET',
1535-
path: `/iam/v1alpha1/saml-information`,
1536-
},
1537-
unmarshalSamlInformation,
1538-
)
15391516
}

packages_generated/iam/src/v1alpha1/marshalling.gen.ts

Lines changed: 23 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import type {
2121
CreateApplicationRequest,
2222
CreateGroupRequest,
2323
CreateJWTRequest,
24-
CreateOrganizationSamlRequest,
2524
CreatePolicyRequest,
2625
CreateSSHKeyRequest,
2726
CreateUserRequest,
@@ -60,7 +59,7 @@ import type {
6059
RuleSpecs,
6160
Saml,
6261
SamlCertificate,
63-
SamlInformation,
62+
SamlServiceProvider,
6463
SetGroupMembersRequest,
6564
SetOrganizationAliasRequest,
6665
SetRulesRequest,
@@ -69,9 +68,9 @@ import type {
6968
UpdateAPIKeyRequest,
7069
UpdateApplicationRequest,
7170
UpdateGroupRequest,
72-
UpdateOrganizationSamlRequest,
7371
UpdateOrganizationSecuritySettingsRequest,
7472
UpdatePolicyRequest,
73+
UpdateSamlRequest,
7574
UpdateSSHKeyRequest,
7675
UpdateUserPasswordRequest,
7776
UpdateUserRequest,
@@ -698,31 +697,35 @@ export const unmarshalOrganizationSecuritySettings = (
698697
} as OrganizationSecuritySettings
699698
}
700699

701-
export const unmarshalSaml = (data: unknown): Saml => {
700+
const unmarshalSamlServiceProvider = (data: unknown): SamlServiceProvider => {
702701
if (!isJSONObject(data)) {
703702
throw new TypeError(
704-
`Unmarshalling the type 'Saml' failed as data isn't a dictionary.`,
703+
`Unmarshalling the type 'SamlServiceProvider' failed as data isn't a dictionary.`,
705704
)
706705
}
707706

708707
return {
708+
assertionConsumerServiceUrl: data.assertion_consumer_service_url,
709709
entityId: data.entity_id,
710-
id: data.id,
711-
singleSignOnUrl: data.single_sign_on_url,
712-
} as Saml
710+
} as SamlServiceProvider
713711
}
714712

715-
export const unmarshalSamlInformation = (data: unknown): SamlInformation => {
713+
export const unmarshalSaml = (data: unknown): Saml => {
716714
if (!isJSONObject(data)) {
717715
throw new TypeError(
718-
`Unmarshalling the type 'SamlInformation' failed as data isn't a dictionary.`,
716+
`Unmarshalling the type 'Saml' failed as data isn't a dictionary.`,
719717
)
720718
}
721719

722720
return {
723-
assertionConsumerServiceUrl: data.assertion_consumer_service_url,
724721
entityId: data.entity_id,
725-
} as SamlInformation
722+
id: data.id,
723+
serviceProvider: data.service_provider
724+
? unmarshalSamlServiceProvider(data.service_provider)
725+
: undefined,
726+
singleSignOnUrl: data.single_sign_on_url,
727+
status: data.status,
728+
} as Saml
726729
}
727730

728731
export const unmarshalSetRulesResponse = (data: unknown): SetRulesResponse => {
@@ -818,14 +821,6 @@ export const marshalCreateJWTRequest = (
818821
user_id: request.userId,
819822
})
820823

821-
export const marshalCreateOrganizationSamlRequest = (
822-
request: CreateOrganizationSamlRequest,
823-
defaults: DefaultValues,
824-
): Record<string, unknown> => ({
825-
entity_id: request.entityId,
826-
single_sign_on_url: request.singleSignOnUrl,
827-
})
828-
829824
const marshalRuleSpecs = (
830825
request: RuleSpecs,
831826
defaults: DefaultValues,
@@ -973,14 +968,6 @@ export const marshalUpdateGroupRequest = (
973968
tags: request.tags,
974969
})
975970

976-
export const marshalUpdateOrganizationSamlRequest = (
977-
request: UpdateOrganizationSamlRequest,
978-
defaults: DefaultValues,
979-
): Record<string, unknown> => ({
980-
entity_id: request.entityId,
981-
single_sign_on_url: request.singleSignOnUrl,
982-
})
983-
984971
export const marshalUpdateOrganizationSecuritySettingsRequest = (
985972
request: UpdateOrganizationSecuritySettingsRequest,
986973
defaults: DefaultValues,
@@ -1013,6 +1000,14 @@ export const marshalUpdateSSHKeyRequest = (
10131000
name: request.name,
10141001
})
10151002

1003+
export const marshalUpdateSamlRequest = (
1004+
request: UpdateSamlRequest,
1005+
defaults: DefaultValues,
1006+
): Record<string, unknown> => ({
1007+
entity_id: request.entityId,
1008+
single_sign_on_url: request.singleSignOnUrl,
1009+
})
1010+
10161011
export const marshalUpdateUserPasswordRequest = (
10171012
request: UpdateUserPasswordRequest,
10181013
defaults: DefaultValues,

0 commit comments

Comments
 (0)