Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
kneth committed Apr 25, 2024
1 parent 2955493 commit e5eee33
Showing 1 changed file with 25 additions and 14 deletions.
39 changes: 25 additions & 14 deletions bindgen/spec.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# yaml-language-server: $schema=generated/spec.schema.json

headers:
- "realm/sync/config.hpp"
- "realm/sync/subscriptions.hpp"
Expand All @@ -17,8 +19,8 @@ headers:
- "realm/object-store/sync/app.hpp"
- "realm/object-store/sync/sync_manager.hpp"
- "realm/object-store/sync/sync_session.hpp"
- "realm/object-store/sync/sync_user.hpp"
- "realm/object-store/sync/app_user.hpp"
- "realm/object-store/sync/sync_user.hpp"
- "realm/object-store/sync/mongo_collection.hpp"
- "realm/util/bson/bson.hpp"

Expand Down Expand Up @@ -484,7 +486,7 @@ records:

SyncConfig:
fields:
user: SharedUser
user: SharedSyncUser
partition_value:
type: std::string
default: ""
Expand Down Expand Up @@ -1202,9 +1204,8 @@ classes:
UserSubscriptionToken:
cppName: app::User::Token

User:
cppName: app::User
sharedPtrWrapped: SharedUser
SyncUser:
sharedPtrWrapped: SharedSyncUser
properties:
is_logged_in: bool
user_id: std::string
Expand All @@ -1213,6 +1214,21 @@ classes:
access_token: std::string
refresh_token: std::string
state: SyncUserState
sync_manager: SharedSyncManager
methods:
access_token_refresh_required: '() -> bool'
# request_log_out: '(cb: AsyncCallback<(err: std::optional<AppError>)>&&)'
request_refresh_user: '(cb: AsyncCallback<(err: std::optional<AppError>)>&&)'
request_refresh_location: '(cb: AsyncCallback<(err: std::optional<AppError>)>&&)'
request_access_token: '(cb: AsyncCallback<(err: std::optional<AppError>)>&&)'
track_realm: '(path: std::string_view)'
create_file_action: '(action: SyncFileAction, original_path: std::string_view, requested_recovery_dir: std::optional<std::string>, partition_value: std::string_view) -> std::string'

User:
base: SyncUser
cppName: app::User
sharedPtrWrapped: SharedUser
properties:
is_anonymous: bool
device_id: std::string
has_device_id: bool
Expand All @@ -1223,16 +1239,9 @@ classes:
app: SharedApp
methods:
log_out: ()
path_for_realm: '(config: SyncConfig&, custom_file_name: std::optional<std::string>&) -> std::string'
subscribe: '(observer: (user: IgnoreArgument<const User&>)) -> UserSubscriptionToken'
unsubscribe: '(token: UserSubscriptionToken)'
access_token_refresh_required: '() -> bool'
request_log_out: '(cb: AsyncCallback<(err: std::optional<AppError>)>&&)'
request_refresh_user: '(cb: AsyncCallback<(err: std::optional<AppError>)>&&)'
request_refresh_location: '(cb: AsyncCallback<(err: std::optional<AppError>)>&&)'
request_access_token: '(cb: AsyncCallback<(err: std::optional<AppError>)>&&)'
track_realm: '(path: std::string_view)'
create_file_action: '(action: SyncFileAction, original_path: std::string_view, requested_recovery_dir: std::optional<std::string>, partition_value: std::string_view) -> std::string'
path_for_realm: '(config: SyncConfig&, custom_file_name: std::optional<std::string>&) -> std::string'

UserProfile:
cppName: app::UserProfile
Expand Down Expand Up @@ -1265,6 +1274,7 @@ classes:
get_cached_app: '(app_id: const std::string&) -> SharedApp'
clear_cached_apps: ()
close_all_sync_sessions: ()

methods:
log_in_with_credentials: '(credentials: AppCredentials, cb: AsyncCallback<(user: const Nullable<SharedUser>&, err: std::optional<AppError>)>&&)'
log_out:
Expand Down Expand Up @@ -1351,7 +1361,7 @@ classes:
reconnect: ()
wait_for_sessions_to_terminate: ()
get_existing_active_session: '(path: const std::string&) -> Nullable<SharedSyncSession>'
get_all_sessions_for: '(user: const User&) -> std::vector<SharedSyncSession>'
get_all_sessions_for: '(user: const SyncUser&) -> std::vector<SharedSyncSession>'

ThreadSafeReference: {}
AsyncOpenTask:
Expand All @@ -1368,6 +1378,7 @@ classes:
state: SyncSessionState
connection_state: SyncSessionConnectionState
path: std::string
user: SharedSyncUser
config: SyncConfig
full_realm_url: std::string
methods:
Expand Down

0 comments on commit e5eee33

Please sign in to comment.