Skip to content

Commit

Permalink
Merge branch 'master' into ms-fix-pdf-viewer-pages-error
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoTuxx authored Jan 16, 2025
2 parents 03d00fe + bdf1be4 commit fa8049b
Show file tree
Hide file tree
Showing 231 changed files with 830 additions and 737 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
TESTBED_SERVER: http://localhost:6777
services:
parsec-testbed-server:
image: ghcr.io/scille/parsec-cloud/parsec-testbed-server:3.2.4-a.0.dev.20102.1979660
image: ghcr.io/scille/parsec-cloud/parsec-testbed-server:3.2.4-a.0.dev.20104.7da2559
ports:
- 6777:6777
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
# https://github.com/Scille/parsec-cloud/pkgs/container/parsec-cloud%2Fparsec-testbed-server
services:
parsec-testbed-server:
image: ghcr.io/scille/parsec-cloud/parsec-testbed-server:3.2.4-a.0.dev.20102.1979660
image: ghcr.io/scille/parsec-cloud/parsec-testbed-server:3.2.4-a.0.dev.20104.7da2559
ports:
- 6777:6777
steps:
Expand Down
2 changes: 1 addition & 1 deletion cli/src/testenv_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::{
};

use libparsec::{
authenticated_cmds::{latest::device_create, v4::user_create},
authenticated_cmds::{latest::device_create, latest::user_create},
AuthenticatedCmds, Bytes, CertificateSignerOwned, ClientConfig, DateTime, DeviceAccessStrategy,
DeviceCertificate, DeviceID, DeviceLabel, DevicePurpose, HumanHandle, LocalDevice,
MaybeRedacted, OrganizationID, ParsecAddr, PrivateKeyAlgorithm, ProxyConfig, SigningKey,
Expand Down
4 changes: 2 additions & 2 deletions cli/tests/integration/invitations/cancel.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use libparsec::{
authenticated_cmds::v4::invite_new_device, get_default_config_dir, tmp_path, AuthenticatedCmds,
InvitationType, ParsecInvitationAddr, ProxyConfig, TmpPath,
authenticated_cmds::latest::invite_new_device, get_default_config_dir, tmp_path,
AuthenticatedCmds, InvitationType, ParsecInvitationAddr, ProxyConfig, TmpPath,
};

use crate::{
Expand Down
4 changes: 2 additions & 2 deletions cli/tests/integration/invitations/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use std::io::{BufReader, Write};
use assert_cmd::cargo::CommandCargoExt;

use libparsec::{
authenticated_cmds::v4::invite_new_device, get_default_config_dir, tmp_path, AuthenticatedCmds,
InvitationType, ParsecInvitationAddr, ProxyConfig, TmpPath,
authenticated_cmds::latest::invite_new_device, get_default_config_dir, tmp_path,
AuthenticatedCmds, InvitationType, ParsecInvitationAddr, ProxyConfig, TmpPath,
};

use crate::{
Expand Down
4 changes: 2 additions & 2 deletions cli/tests/integration/invitations/list.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use libparsec::{
authenticated_cmds::v4::invite_new_device, get_default_config_dir, tmp_path, AuthenticatedCmds,
InvitationToken, ProxyConfig, TmpPath,
authenticated_cmds::latest::invite_new_device, get_default_config_dir, tmp_path,
AuthenticatedCmds, InvitationToken, ProxyConfig, TmpPath,
};
use predicates::prelude::PredicateBooleanExt;

Expand Down
2 changes: 1 addition & 1 deletion cli/tests/integration/invitations/shared_recovery.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::sync::{Arc, Mutex};

use libparsec::{
authenticated_cmds::v4::invite_new_shamir_recovery, get_default_config_dir, tmp_path,
authenticated_cmds::latest::invite_new_shamir_recovery, get_default_config_dir, tmp_path,
AuthenticatedCmds, InvitationType, ParsecInvitationAddr, ProxyConfig, TmpPath,
};
use rexpect::{session::PtySession, spawn};
Expand Down
4 changes: 2 additions & 2 deletions cli/tests/integration/invitations/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use std::io::{BufReader, Write};
use assert_cmd::cargo::CommandCargoExt;

use libparsec::{
authenticated_cmds::v4::invite_new_user, get_default_config_dir, tmp_path, AuthenticatedCmds,
InvitationType, ParsecInvitationAddr, ProxyConfig, TmpPath,
authenticated_cmds::latest::invite_new_user, get_default_config_dir, tmp_path,
AuthenticatedCmds, InvitationType, ParsecInvitationAddr, ProxyConfig, TmpPath,
};

use crate::{
Expand Down
2 changes: 1 addition & 1 deletion libparsec/crates/client/src/client/recovery_device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use libparsec_platform_device_loader::{
get_default_key_file, save_device, PlatformImportRecoveryDeviceError, SaveDeviceError,
};
use libparsec_platform_storage::certificates::PerTopicLastTimestamps;
use libparsec_protocol::authenticated_cmds::v4::device_create;
use libparsec_protocol::authenticated_cmds::latest::device_create;
use libparsec_types::prelude::*;

use crate::{
Expand Down
14 changes: 7 additions & 7 deletions libparsec/crates/client/src/client/tos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ pub async fn get_tos(client_ops: &Client) -> Result<Tos, ClientGetTosError> {
let request = tos_cmds::latest::tos_get::Req;
let rep = client_ops.cmds.send(request).await?;
match rep {
tos_cmds::v4::tos_get::Rep::Ok {
tos_cmds::latest::tos_get::Rep::Ok {
updated_on,
per_locale_urls,
} => Ok(Tos {
per_locale_urls,
updated_on,
}),
tos_cmds::v4::tos_get::Rep::NoTos => Err(ClientGetTosError::NoTos),
tos_cmds::v4::tos_get::Rep::UnknownStatus { unknown_status, .. } => {
tos_cmds::latest::tos_get::Rep::NoTos => Err(ClientGetTosError::NoTos),
tos_cmds::latest::tos_get::Rep::UnknownStatus { unknown_status, .. } => {
Err(ClientGetTosError::Internal(anyhow::anyhow!(
"Unknown error status `{}` from server",
unknown_status
Expand Down Expand Up @@ -88,17 +88,17 @@ pub async fn accept_tos(
let request = tos_cmds::latest::tos_accept::Req { tos_updated_on };
let rep = client_ops.cmds.send(request).await?;
match rep {
tos_cmds::v4::tos_accept::Rep::Ok => {
tos_cmds::latest::tos_accept::Rep::Ok => {
// If TOS acceptance was required, it most likely means the connection
// monitor is currently polling the server from time to time in order to
// detect when the TOS have been accepted.
// So we send a dedicated event to speed up the process.
client_ops.event_bus.send(&EventShouldRetryConnectionNow);
Ok(())
}
tos_cmds::v4::tos_accept::Rep::TosMismatch => Err(ClientAcceptTosError::TosMismatch),
tos_cmds::v4::tos_accept::Rep::NoTos => Err(ClientAcceptTosError::NoTos),
tos_cmds::v4::tos_accept::Rep::UnknownStatus { unknown_status, .. } => {
tos_cmds::latest::tos_accept::Rep::TosMismatch => Err(ClientAcceptTosError::TosMismatch),
tos_cmds::latest::tos_accept::Rep::NoTos => Err(ClientAcceptTosError::NoTos),
tos_cmds::latest::tos_accept::Rep::UnknownStatus { unknown_status, .. } => {
Err(ClientAcceptTosError::Internal(anyhow::anyhow!(
"Unknown error status `{}` from server",
unknown_status
Expand Down
2 changes: 1 addition & 1 deletion libparsec/crates/client/src/invite/claimer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use invited_cmds::latest::invite_claimer_step;
use libparsec_client_connection::AuthenticatedCmds;
use libparsec_client_connection::{protocol::invited_cmds, ConnectionError, InvitedCmds};
use libparsec_protocol::authenticated_cmds;
use libparsec_protocol::invited_cmds::v4::invite_info::ShamirRecoveryRecipient;
use libparsec_protocol::invited_cmds::latest::invite_info::ShamirRecoveryRecipient;
use libparsec_types::prelude::*;

use crate::client::{register_new_device, RegisterNewDeviceError};
Expand Down
2 changes: 1 addition & 1 deletion libparsec/crates/client/src/monitors/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ use libparsec_platform_async::{
channel, pretend_future_is_send_on_web, select2_biased, stream::StreamExt,
};
use libparsec_platform_storage::certificates::PerTopicLastTimestamps;
use libparsec_protocol::authenticated_cmds::v4::events_listen::{APIEvent, Rep, Req};
use libparsec_protocol::authenticated_cmds::latest::events_listen::{APIEvent, Rep, Req};

use crate::event_bus::*;

Expand Down
2 changes: 1 addition & 1 deletion libparsec/crates/client/tests/unit/invite/claimer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::sync::{Arc, Mutex};
use libparsec_client_connection::{
protocol, test_register_send_hook, test_register_sequence_of_send_hooks,
};
use libparsec_protocol::invited_cmds::v4::invite_claimer_step::{ClaimerStep, GreeterStep};
use libparsec_protocol::invited_cmds::latest::invite_claimer_step::{ClaimerStep, GreeterStep};
use libparsec_tests_fixtures::prelude::*;
use libparsec_types::prelude::*;

Expand Down
2 changes: 1 addition & 1 deletion libparsec/crates/client/tests/unit/invite/shamir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use std::{collections::HashMap, sync::Arc};

use super::utils::client_factory;
use libparsec_protocol::invited_cmds::v4::invite_info::ShamirRecoveryRecipient;
use libparsec_protocol::invited_cmds::latest::invite_info::ShamirRecoveryRecipient;
use libparsec_tests_fixtures::prelude::*;
use libparsec_types::prelude::*;

Expand Down
4 changes: 2 additions & 2 deletions libparsec/crates/client_connection/tests/unit/anonymous.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,9 @@ register_rpc_http_hook!(
rpc_unsupported_api_version_http_codes_422_with_supported_api_versions,
StatusCode::from_u16(422).unwrap(),
|err| {
p_assert_matches!(err, ConnectionError::UnsupportedApiVersion { api_version, supported_api_versions } if api_version == *API_LATEST_VERSION && supported_api_versions == vec![(5,1).into(), (6,0).into()]);
p_assert_matches!(err, ConnectionError::UnsupportedApiVersion { api_version, supported_api_versions } if api_version == *API_LATEST_VERSION && supported_api_versions == vec![(8,1).into(), (9,0).into()]);
},
"Supported-Api-Versions": "5.1;6.0"
"Supported-Api-Versions": "8.1;9.0"
);
register_rpc_http_hook!(
rpc_expired_organization_http_codes_460,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -827,9 +827,9 @@ register_rpc_http_hook!(
rpc_unsupported_api_version_http_codes_422_with_supported_api_versions,
StatusCode::from_u16(422).unwrap(),
|err| {
p_assert_matches!(err, ConnectionError::UnsupportedApiVersion { api_version, supported_api_versions } if api_version == *API_LATEST_VERSION && supported_api_versions == vec![(5,1).into(), (6,0).into()]);
p_assert_matches!(err, ConnectionError::UnsupportedApiVersion { api_version, supported_api_versions } if api_version == *API_LATEST_VERSION && supported_api_versions == vec![(8,1).into(), (9,0).into()]);
},
"Supported-Api-Versions": "5.1;6.0"
"Supported-Api-Versions": "8.1;9.0"
);
register_rpc_http_hook!(
rpc_expired_organization_http_codes_460,
Expand Down Expand Up @@ -981,9 +981,9 @@ register_rpc_http_hook!(
sse_unsupported_api_version_http_codes_422_with_supported_api_versions,
StatusCode::from_u16(422).unwrap(),
|err| {
p_assert_matches!(err, ConnectionError::UnsupportedApiVersion { api_version, supported_api_versions } if api_version == *API_LATEST_VERSION && supported_api_versions == vec![(5,1).into(), (6,0).into()]);
p_assert_matches!(err, ConnectionError::UnsupportedApiVersion { api_version, supported_api_versions } if api_version == *API_LATEST_VERSION && supported_api_versions == vec![(8,1).into(), (9,0).into()]);
},
"Supported-Api-Versions": "5.1;6.0"
"Supported-Api-Versions": "8.1;9.0"
);
register_sse_http_hook!(
sse_expired_organization_http_codes_460,
Expand Down
4 changes: 2 additions & 2 deletions libparsec/crates/client_connection/tests/unit/invited.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,9 @@ register_rpc_http_hook!(
rpc_unsupported_api_version_http_codes_422_with_supported_api_versions,
StatusCode::from_u16(422).unwrap(),
|err| {
p_assert_matches!(err, ConnectionError::UnsupportedApiVersion { api_version, supported_api_versions } if api_version == *API_LATEST_VERSION && supported_api_versions == vec![(5,1).into(), (6,0).into()]);
p_assert_matches!(err, ConnectionError::UnsupportedApiVersion { api_version, supported_api_versions } if api_version == *API_LATEST_VERSION && supported_api_versions == vec![(8,1).into(), (9,0).into()]);
},
"Supported-Api-Versions": "5.1;6.0"
"Supported-Api-Versions": "8.1;9.0"
);
register_rpc_http_hook!(
rpc_expired_organization_http_codes_460,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"major_versions": [
4
5
],
"req": {
"cmd": "organization_bootstrap",
Expand Down
2 changes: 1 addition & 1 deletion libparsec/crates/protocol/schema/anonymous_cmds/ping.json5
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"major_versions": [
4
5
],
"req": {
"cmd": "ping",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"major_versions": [
4
5
],
"req": {
"cmd": "pki_enrollment_info",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"major_versions": [
4
5
],
"req": {
"cmd": "pki_enrollment_submit",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"major_versions": [
4
5
],
"req": {
"cmd": "block_create",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"major_versions": [
4
5
],
"req": {
"cmd": "block_read",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"major_versions": [
4
5
],
"req": {
"cmd": "certificate_get",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"major_versions": [
4
5
],
"req": {
"cmd": "device_create",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"major_versions": [
4
5
],
"req": {
"cmd": "events_listen",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"major_versions": [
4
5
],
"req": {
"cmd": "invite_cancel",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"major_versions": [
4
5
],
"req": {
"cmd": "invite_complete",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"major_versions": [
4
5
],
"req": {
"cmd": "invite_greeter_cancel_greeting_attempt",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"major_versions": [
4
5
],
"req": {
"cmd": "invite_greeter_start_greeting_attempt",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"major_versions": [
4
5
],
"req": {
"cmd": "invite_greeter_step",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"major_versions": [
4
5
],
"req": {
"cmd": "invite_list"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"major_versions": [
4
5
],
"req": {
"cmd": "invite_new_device",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"major_versions": [
4
5
],
"req": {
"cmd": "invite_new_shamir_recovery",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"major_versions": [
4
5
],
"req": {
"cmd": "invite_new_user",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"major_versions": [
4
5
],
"req": {
"cmd": "list_frozen_users"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"major_versions": [
4
5
],
"req": {
"cmd": "ping",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"major_versions": [
4
5
],
"req": {
"cmd": "pki_enrollment_accept",
Expand Down
Loading

0 comments on commit fa8049b

Please sign in to comment.