Skip to content

Commit

Permalink
Merge branch 'main' of github.com:bitwarden/sdk into ps/zeroize-decry…
Browse files Browse the repository at this point in the history
…pted
  • Loading branch information
Hinton committed Jan 25, 2024
2 parents 74a5b08 + 8f31441 commit c57bea6
Show file tree
Hide file tree
Showing 79 changed files with 962 additions and 400 deletions.
1 change: 1 addition & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base",
"github>bitwarden/renovate-config:pin-actions",
":combinePatchMinorReleases",
":dependencyDashboard",
":maintainLockFilesWeekly",
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
run: cross build -p bitwarden-uniffi --release --target=${{ matrix.settings.target }}

- name: Upload artifact
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595 # v4.1.0
uses: actions/upload-artifact@694cdabd8bdb0f10b2cea11669e1bf5453eed0a6 # v4.2.0
with:
name: android-${{ matrix.settings.target }}
path: ./target/${{ matrix.settings.target }}/release/libbitwarden_uniffi.so
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
run: zip -j ./bws-${{ matrix.settings.target }}-${{ env._PACKAGE_VERSION }}.zip ./target/${{ matrix.settings.target }}/release/bws

- name: Upload artifact
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595 # v4.1.0
uses: actions/upload-artifact@694cdabd8bdb0f10b2cea11669e1bf5453eed0a6 # v4.2.0
with:
name: bws-${{ matrix.settings.target }}-${{ env._PACKAGE_VERSION }}.zip
path: ./bws-${{ matrix.settings.target }}-${{ env._PACKAGE_VERSION }}.zip
Expand Down Expand Up @@ -142,7 +142,7 @@ jobs:
run: zip ./bws-macos-universal-${{ env._PACKAGE_VERSION }}.zip ./bws-macos-universal/bws

- name: Upload artifact
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595 # v4.1.0
uses: actions/upload-artifact@694cdabd8bdb0f10b2cea11669e1bf5453eed0a6 # v4.2.0
with:
name: bws-macos-universal-${{ env._PACKAGE_VERSION }}.zip
path: ./bws-macos-universal-${{ env._PACKAGE_VERSION }}.zip
Expand Down Expand Up @@ -177,7 +177,7 @@ jobs:
sed -i.bak 's/\$NAME\$/Bitwarden Secrets Manager CLI/g' THIRDPARTY.html
- name: Upload artifact
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595 # v4.1.0
uses: actions/upload-artifact@694cdabd8bdb0f10b2cea11669e1bf5453eed0a6 # v4.2.0
with:
name: THIRDPARTY.html
path: ./crates/bws/THIRDPARTY.html
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
working-directory: languages/csharp/Bitwarden.Sdk

- name: Upload NuGet package
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595 # v4.1.0
uses: actions/upload-artifact@694cdabd8bdb0f10b2cea11669e1bf5453eed0a6 # v4.2.0
with:
name: Bitwarden.Sdk.0.0.1.nupkg
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-napi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
run: ${{ matrix.settings.build }}

- name: Upload artifact
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595 # v4.1.0
uses: actions/upload-artifact@694cdabd8bdb0f10b2cea11669e1bf5453eed0a6 # v4.2.0
with:
name: sdk-bitwarden-napi-${{ matrix.settings.target }}
path: ${{ github.workspace }}/crates/bitwarden-napi/sdk-napi.*.node
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/build-python-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,30 +66,30 @@ jobs:
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Setup Node
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
with:
node-version: 18

- name: Install rust
uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7 # stable
uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248 # stable
with:
toolchain: stable
targets: ${{ matrix.settings.target }}

- name: Cache cargo registry
uses: Swatinem/rust-cache@3cf7f8cc28d1b4e7d01e3783be10a97d55d483c8 # v2.7.1
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
with:
key: ${{ matrix.settings.target }}-cargo-${{ matrix.settings.os }}

- name: Retrieve schemas
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0
uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
with:
name: schemas.py
path: ${{ github.workspace }}/languages/python/bitwarden_sdk

- name: Build wheels
if: ${{ matrix.settings.target != 'x86_64-unknown-linux-gnu' }}
uses: PyO3/maturin-action@b9e8f88fd4448fdecf5095864cdc7e39a544aa9f # v1.40.7
uses: PyO3/maturin-action@a3013db91b2ef2e51420cfe99ee619c8e72a17e6 # v1.40.8
with:
target: ${{ matrix.settings.target }}
args: --release --find-interpreter --sdist
Expand All @@ -99,7 +99,7 @@ jobs:

- name: Build wheels (Linux - x86_64)
if: ${{ matrix.settings.target == 'x86_64-unknown-linux-gnu' }}
uses: PyO3/maturin-action@b9e8f88fd4448fdecf5095864cdc7e39a544aa9f # v1.40.7
uses: PyO3/maturin-action@a3013db91b2ef2e51420cfe99ee619c8e72a17e6 # v1.40.8
with:
target: ${{ matrix.settings.target }}
args: --release --find-interpreter --sdist
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-rust-cross-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
run: cargo build --target ${{ matrix.settings.target }} --release

- name: Upload Artifact
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595 # v4.1.0
uses: actions/upload-artifact@694cdabd8bdb0f10b2cea11669e1bf5453eed0a6 # v4.2.0
with:
name: libbitwarden_c_files-${{ matrix.settings.target }}
path: |
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/generate_schemas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,48 +37,48 @@ jobs:
run: npm run schemas

- name: Upload ts schemas artifact
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595 # v4.1.0
uses: actions/upload-artifact@694cdabd8bdb0f10b2cea11669e1bf5453eed0a6 # v4.2.0
with:
name: schemas.ts
path: ${{ github.workspace }}/languages/js/sdk-client/src/schemas.ts
if-no-files-found: error

- name: Upload c# schemas artifact
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595 # v4.1.0
uses: actions/upload-artifact@694cdabd8bdb0f10b2cea11669e1bf5453eed0a6 # v4.2.0
with:
name: schemas.cs
path: ${{ github.workspace }}/languages/csharp/Bitwarden.Sdk/schemas.cs
if-no-files-found: error

- name: Upload python schemas artifact
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595 # v4.1.0
uses: actions/upload-artifact@694cdabd8bdb0f10b2cea11669e1bf5453eed0a6 # v4.2.0
with:
name: schemas.py
path: ${{ github.workspace }}/languages/python/bitwarden_sdk/schemas.py
if-no-files-found: error

- name: Upload ruby schemas artifact
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595 # v4.1.0
uses: actions/upload-artifact@694cdabd8bdb0f10b2cea11669e1bf5453eed0a6 # v4.2.0
with:
name: schemas.rb
path: ${{ github.workspace }}/languages/ruby/bitwarden_sdk/lib/schemas.rb
if-no-files-found: error

- name: Upload json schemas artifact
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595 # v4.1.0
uses: actions/upload-artifact@694cdabd8bdb0f10b2cea11669e1bf5453eed0a6 # v4.2.0
with:
name: sdk-schemas-json
path: ${{ github.workspace }}/support/schemas/*
if-no-files-found: error

- name: Upload Go schemas artifact
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595 # v4.1.0
uses: actions/upload-artifact@694cdabd8bdb0f10b2cea11669e1bf5453eed0a6 # v4.2.0
with:
name: schemas.go
path: ${{ github.workspace }}/languages/go/schema.go

- name: Upload java schemas artifact
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595 # v4.1.0
uses: actions/upload-artifact@694cdabd8bdb0f10b2cea11669e1bf5453eed0a6 # v4.2.0
with:
name: sdk-schemas-java
path: ${{ github.workspace }}/languages/java/src/main/java/com/bitwarden/sdk/schema/*
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,16 @@ jobs:
with:
toolchain: stable

- name: Install rust nightly
run: |
rustup toolchain install nightly
rustup component add rustfmt --toolchain nightly-x86_64-unknown-linux-gnu
- name: Cache cargo registry
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3

- name: Cargo fmt
run: cargo fmt --check
run: cargo +nightly fmt --check

- name: Set up Node
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Set up Ruby
uses: ruby/setup-ruby@b203567269b5bbc256dbc1c84f7495913f977353 # v1.167.0
uses: ruby/setup-ruby@5daca165445f0ae10478593083f72ca2625e241d # v1.169.0
with:
ruby-version: 3.2

Expand Down
20 changes: 7 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions crates/bitwarden-api-api/src/apis/access_policies_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,24 @@ pub enum AccessPoliciesIdPutError {
UnknownValue(serde_json::Value),
}

/// struct for typed errors of method [`organizations_id_access_policies_people_potential_grantees_get`]
/// struct for typed errors of method
/// [`organizations_id_access_policies_people_potential_grantees_get`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum OrganizationsIdAccessPoliciesPeoplePotentialGranteesGetError {
UnknownValue(serde_json::Value),
}

/// struct for typed errors of method [`organizations_id_access_policies_projects_potential_grantees_get`]
/// struct for typed errors of method
/// [`organizations_id_access_policies_projects_potential_grantees_get`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum OrganizationsIdAccessPoliciesProjectsPotentialGranteesGetError {
UnknownValue(serde_json::Value),
}

/// struct for typed errors of method [`organizations_id_access_policies_service_accounts_potential_grantees_get`]
/// struct for typed errors of method
/// [`organizations_id_access_policies_service_accounts_potential_grantees_get`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum OrganizationsIdAccessPoliciesServiceAccountsPotentialGranteesGetError {
Expand Down
6 changes: 4 additions & 2 deletions crates/bitwarden-api-api/src/apis/collections_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ pub enum OrganizationsOrgIdCollectionsIdDeletePostError {
UnknownValue(serde_json::Value),
}

/// struct for typed errors of method [`organizations_org_id_collections_id_delete_user_org_user_id_post`]
/// struct for typed errors of method
/// [`organizations_org_id_collections_id_delete_user_org_user_id_post`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum OrganizationsOrgIdCollectionsIdDeleteUserOrgUserIdPostError {
Expand Down Expand Up @@ -97,7 +98,8 @@ pub enum OrganizationsOrgIdCollectionsIdPutError {
UnknownValue(serde_json::Value),
}

/// struct for typed errors of method [`organizations_org_id_collections_id_user_org_user_id_delete`]
/// struct for typed errors of method
/// [`organizations_org_id_collections_id_user_org_user_id_delete`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum OrganizationsOrgIdCollectionsIdUserOrgUserIdDeleteError {
Expand Down
3 changes: 2 additions & 1 deletion crates/bitwarden-api-api/src/apis/groups_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ pub enum OrganizationsOrgIdGroupsIdDeletePostError {
UnknownValue(serde_json::Value),
}

/// struct for typed errors of method [`organizations_org_id_groups_id_delete_user_org_user_id_post`]
/// struct for typed errors of method
/// [`organizations_org_id_groups_id_delete_user_org_user_id_post`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum OrganizationsOrgIdGroupsIdDeleteUserOrgUserIdPostError {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@ pub enum OrganizationsConnectionsEnabledGetError {
UnknownValue(serde_json::Value),
}

/// struct for typed errors of method [`organizations_connections_organization_connection_id_delete`]
/// struct for typed errors of method
/// [`organizations_connections_organization_connection_id_delete`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum OrganizationsConnectionsOrganizationConnectionIdDeleteError {
UnknownValue(serde_json::Value),
}

/// struct for typed errors of method [`organizations_connections_organization_connection_id_delete_post`]
/// struct for typed errors of method
/// [`organizations_connections_organization_connection_id_delete_post`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum OrganizationsConnectionsOrganizationConnectionIdDeletePostError {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,24 @@ pub enum OrganizationSponsorshipSponsoredSponsoredOrgIdDeleteError {
UnknownValue(serde_json::Value),
}

/// struct for typed errors of method [`organization_sponsorship_sponsored_sponsored_org_id_remove_post`]
/// struct for typed errors of method
/// [`organization_sponsorship_sponsored_sponsored_org_id_remove_post`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum OrganizationSponsorshipSponsoredSponsoredOrgIdRemovePostError {
UnknownValue(serde_json::Value),
}

/// struct for typed errors of method [`organization_sponsorship_sponsoring_org_id_families_for_enterprise_post`]
/// struct for typed errors of method
/// [`organization_sponsorship_sponsoring_org_id_families_for_enterprise_post`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum OrganizationSponsorshipSponsoringOrgIdFamiliesForEnterprisePostError {
UnknownValue(serde_json::Value),
}

/// struct for typed errors of method [`organization_sponsorship_sponsoring_org_id_families_for_enterprise_resend_post`]
/// struct for typed errors of method
/// [`organization_sponsorship_sponsoring_org_id_families_for_enterprise_resend_post`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum OrganizationSponsorshipSponsoringOrgIdFamiliesForEnterpriseResendPostError {
Expand All @@ -62,7 +65,8 @@ pub enum OrganizationSponsorshipSponsoringOrganizationIdDeleteError {
UnknownValue(serde_json::Value),
}

/// struct for typed errors of method [`organization_sponsorship_sponsoring_organization_id_delete_post`]
/// struct for typed errors of method
/// [`organization_sponsorship_sponsoring_organization_id_delete_post`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum OrganizationSponsorshipSponsoringOrganizationIdDeletePostError {
Expand Down
Loading

0 comments on commit c57bea6

Please sign in to comment.