Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Branch for Consolidated SDK Docs #3255

Open
wants to merge 66 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
4498f2f
Scaffold ToC for consolidated SDK docs
dacharyc May 7, 2024
d308023
Update landing page and add missing placeholder pages
dacharyc May 7, 2024
95361c0
Remove 'Swift' reference from landing page
dacharyc May 7, 2024
760a9ed
Add IoT
dacharyc May 7, 2024
9c249f6
Add test and debug section, move logging into new section
dacharyc May 7, 2024
3f5e7a0
Partial Create page as PoC
dacharyc May 8, 2024
6c255ff
Delete Java API reference to make build errors easier to parse
dacharyc May 8, 2024
ca4d1bf
Fix includes file naming
dacharyc May 8, 2024
1a9a3dd
Fix build errors
dacharyc May 8, 2024
7996661
Provide examples to copy for easier implementation
dacharyc May 8, 2024
12149ed
Add consolidated page example
dacharyc May 8, 2024
43d6c79
Consolidate and rename code example placeholders
dacharyc May 9, 2024
4da6ed0
Add missing serialization & threading pages
dacharyc May 13, 2024
971dfd3
Add release notes, fix API reference issues
dacharyc May 13, 2024
b59b8d5
Add a placeholder page for live vs. frozen objects
dacharyc May 13, 2024
4528af3
Move temp files out of source and resolve build errors
dacharyc May 15, 2024
db143e6
Fix remaining build errors
dacharyc May 15, 2024
6ae1805
Add meta and facet values to the page template
dacharyc May 20, 2024
39b1564
DOCSP-39161 .NET updateBaseURL (#3246)
lindseymoore May 20, 2024
643a481
Add new IDs to templates, add new Java Kotlin placeholders
dacharyc May 22, 2024
a0659fc
(DOCSP-39539): Consolidate Stream Data to Atlas page (#3268)
dacharyc May 24, 2024
97d3e5b
(DOCSP-39540) Consolidate Partition-Based Sync page (#3279)
dacharyc Jun 4, 2024
8ee6c6b
(DOCSP-39501): Consolidate Quick Start page (#3280)
dacharyc Jun 18, 2024
c33fc22
(DOCSP-39525): Consolidate Create and Delete Users page (#3289)
dacharyc Jun 18, 2024
7cf0f51
(DOCSP-39526): Consolidate Authenticate Users page (#3281)
dacharyc Jun 18, 2024
bfa23dd
(DOCSP-26313): Swift: Add a Handle Sync Errors page for SwiftUI (#2524)
dacharyc May 17, 2024
b8d909b
DOCSP-39161 .NET updateBaseURL (#3246)
lindseymoore May 20, 2024
a3d9c9a
Review comments for DOCSP-39161 .NET baseurl (#3267)
lindseymoore May 23, 2024
6a10d8b
Add C++ template app and tutorial to SDK docs (#3263)
dacharyc May 17, 2024
ba89df7
Realm Java cannot use RealmAny in new apps (#3274)
kneth May 24, 2024
dd89a55
DOCSP-40104: Fixed typo in read.txt (#3284)
osharaf-mdb Jun 5, 2024
5a50133
DOCSP-36167: Update .NET compatibility with note on source generator …
cbullinger Jun 11, 2024
96b31f0
(DOCSP-40014): Update Swift 'static' framework install instructions (…
dacharyc Jun 11, 2024
6ca5b90
DOCSP-39924: Update eligible SDKs with collections in mixed info (#3293)
cbullinger Jun 17, 2024
a51fffb
DOCSP-40232 formatting typo (#3294)
osharaf-mdb Jun 12, 2024
227206b
Create netlify.toml (#3309)
branberry Jun 24, 2024
3b7abbe
Merge branch 'feature-consolidated-sdk-docs' into master
dacharyc Jun 24, 2024
22a4cb8
Remove misplaced .NET file
dacharyc Jun 24, 2024
451b40f
DOCSP-16785 the the typo (#3297)
osharaf-mdb Jun 25, 2024
569a50d
(DOCSP-39541) Consolidate logging page (#3273)
krollins-mdb Jun 25, 2024
ae0e146
(DOCSP-39513): Consolidate Create page (#3270)
dacharyc Jun 25, 2024
b9d858c
(DOCSP-39538): Consolidate Manage Sync Sessions page (#3285)
dacharyc Jun 25, 2024
c607575
Merge branch 'master' into feature-consolidated-sdk-docs
dacharyc Jun 25, 2024
1021196
(DOCSP-39536): Consolidate Write Data to a Synced Database page (#3286)
dacharyc Jul 11, 2024
81be17c
(DOCSP-39503): Consolidate Relationships page (#3287)
dacharyc Jul 12, 2024
ebc8e9d
(DOCSP-39502): Consolidate Define an Object Model page (#3314)
dacharyc Jul 19, 2024
9cd2167
DOCSP-36298 : Refactor RQL for JSv12 (#3266)
cbullinger Jul 19, 2024
f8eb607
(DOCSP-39530): Consolidate Multi-User Applications page (#3323)
dacharyc Jul 19, 2024
bca55ae
Merge branch 'master' into feature-consolidated-sdk-docs
dacharyc Jul 19, 2024
07d21c7
Don't run Java tests in CI anymore, but keep the workflows just in case
dacharyc Jul 19, 2024
78520c0
Fix build error related to changed ref target
dacharyc Jul 19, 2024
c63b55c
(DOCSP-41633): Consolidation: Incorporate Counter and Progress Notifi…
dacharyc Jul 22, 2024
e7fa389
(DOCSP-39523): Consolidate Call a Function page (#3322)
dacharyc Jul 23, 2024
fc3abb9
(DOCSP-41466): Create: Use third-party libraries for some C# operatio…
dacharyc Jul 30, 2024
7f294fe
(DOCSP-39500): Consolidate Install page (#3326)
dacharyc Jul 31, 2024
6411c1c
(DOCSP-39535): Consolidate Manage Sync Subscriptions page (#3320)
dacharyc Aug 1, 2024
d492af4
(DOCSP-42045): Fix wrong C++ tab ID (#3353)
dacharyc Aug 1, 2024
6835ea9
(DOCSP-39527): Consolidate Custom User Data page (#3346)
dacharyc Aug 6, 2024
8f7001a
(DOCSP-39516): Consolidate Delete page (#3336)
dacharyc Aug 6, 2024
08af422
(DOCSP-39519): Port Swift Filter Data page for consolidated docs (#3349)
dacharyc Aug 8, 2024
6ffd8b5
(DOCSP-39531): Consolidate Link User Identities page (#3350)
dacharyc Aug 8, 2024
c2b6210
Consolidation Providers and Hooks (#3356)
osharaf-mdb Aug 9, 2024
ccb45ee
(DOCSP-39546): Port SwiftUI content for consolidated docs (#3365)
dacharyc Aug 16, 2024
ad32aa9
(DOCSP-39514): Consolidate Read page (#3357)
dacharyc Aug 16, 2024
c92d7f9
(DOCSP-39533): Consolidate Add Sync to an App page (#3351)
dacharyc Aug 16, 2024
3c38bc1
(DOCSP-39528): Consolidate User Metadata page (#3344)
dacharyc Aug 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
(DOCSP-39525): Consolidate Create and Delete Users page (#3289)
## Pull Request Info - SDK Docs Consolidation

Jira ticket: https://jira.mongodb.org/browse/DOCSP-39525

*Staged Page*

- [Create, Delete, and Remove
Users](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39525/sdk/users/create-and-delete-users/)

*Page Source*

Add links to every SDK's pages where you got the SDK-specific
information:

- [Flutter: Delete a
User](https://www.mongodb.com/docs/atlas/device-sdks/sdk/flutter/users/delete-user/)
- [Java: Create and Delete
Users](https://www.mongodb.com/docs/atlas/device-sdks/sdk/java/users/create-delete-users/)
- [Kotlin: Delete
Users](https://www.mongodb.com/docs/atlas/device-sdks/sdk/kotlin/users/delete-users/)
- [.NET: Create and Delete
Users](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/manage-users/create-and-delete-users/)
- [Node.js: Create and Delete
Users](https://www.mongodb.com/docs/atlas/device-sdks/sdk/node/users/create-delete-users/)
- [Swift: Create and Delete
Users](https://www.mongodb.com/docs/atlas/device-sdks/sdk/swift/users/create-and-delete-users/)

### PR Author Checklist

Before requesting a review for your PR, please check these items:

- [x] Open the PR against the `feature-consolidated-sdk-docs` branch
instead of `master`
- [x] Tag the consolidated page for:
  - genre
  - meta.keywords
  - meta.description

#### Naming
- [x] Update Realm naming and the language around persistence
layer/local/device per [this
document](https://docs.google.com/document/d/126OczVxBWAwZ4P5ZsSM29WI3REvONEr1ald-mAwPtyQ/edit?usp=sharing)
- [x] Include `.rst` files comply with [the naming
guidelines](https://docs.google.com/document/d/1h8cr66zoEVeXytVfvDxlCSsUS5IZwvUQvfSCEXNMpek/edit#heading=h.ulh8b5f2hu9)

#### Links and Refs
- [x] Create new consolidated SDK ref targets starting with "_sdks-" for
relevant sections
- [x] Remove or update any SDK-specific refs to use the new consolidated
SDK ref targets
- [x] [Update any Kotlin API
links](https://jira.mongodb.org/browse/DOCSP-32519) to use the new
Kotlin SDK roles

#### Content
- [x] Shared code boxes have snippets or placeholders for all 9
languages
- [x] API description sections have API details or a generic placeholder
for all 9 languages
- [x] Check related pages for relevant content to include
- [x] Create a ticket for missing examples in each relevant SDK:
Consolidation Gaps epic

### Reviewer Checklist

As a reviewer, please check these items:

- [x] Shared code example boxes contain language-specific snippets or
placeholders for every language
- [x] API reference details contain working API reference links or
generic content
- [x] Realm naming/language has been updated
- [x] All relevant content from individual SDK pages is present on the
consolidated page
dacharyc authored Jun 18, 2024

Verified

This commit was signed with the committer’s verified signature.
jordemort Jordan Webb
commit c33fc2223168a938e8bbd52c7c91630e68bfa0e0
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
The C++ SDK does not have the ability to delete users through the SDK.
You can delete users from the server using the :ref:`App Services
Admin API <admin-api>` ``delete a user`` endpoints. You could optionally
create an :ref:`Atlas Function <functions>` that uses the Admin API to
delete a user, and :ref:`call the function from the SDK <sdks-call-function>`.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
The C++ SDK does not have the ability to remove users through the SDK.
Instead, you could :ref:`log out the user <sdks-logout>`, and then manually
delete the user's synced database and cached app files from the filesystem.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
To delete a user, call the :dotnet-sdk:`DeleteUserFromServerAsync(User)
<reference/Realms.Sync.App.html#Realms_Sync_App_DeleteUserFromServerAsync_Realms_Sync_User_>`
method.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Call the :dotnet-sdk:`RemoveUserAsync(User)
<reference/Realms.Sync.App.html#Realms_Sync_App_RemoveUserAsync_Realms_Sync_User_>`
method to remove the user and their data from the device.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Call the :flutter-sdk:`App.deleteUser() <realm/App/deleteUser.html>`
on a user object to delete the user's account from your App Services App.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Call the :flutter-sdk:`App.removeUser() <realm/latest/realm/App/removeUser.html>`
on a user object to remove the user and their data from the device.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
The Java SDK does not have the ability to delete users through the SDK.
You can delete users from the server using the :ref:`App Services
Admin API <admin-api>` ``delete a user`` endpoints. You could optionally
create an :ref:`Atlas Function <functions>` that uses the Admin API to
delete a user, and :ref:`call the function from the SDK <sdks-call-function>`.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
To remove a ``User`` object from your client app, call the
:java-sdk:`User.remove() <io/realm/mongodb/User.html#remove()>` or
:java-sdk:`User.removeAsync()
<io/realm/mongodb/User.html#removeAsync(io.realm.mongodb.App.Callback)>`
method.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Call the :js-sdk:`App.deleteUser() <classes/App.html#deleteUser>` method with a
user object to delete the user from your App Services App. This deletes the
object from the server in addition to clearing data from the device.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Call the :js-sdk:`App.removeUser()
<https://www.mongodb.com/docs/realm-sdks/js/latest/classes/App.html#removeUser>`
method with a user object to remove the user from the device. This clears user
data from the device, but does not delete the user from Atlas.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
To permanently delete a ``User`` object from both your client app
*and* the Atlas App Services App, call the :kotlin-sync-sdk:`delete
<io.realm.kotlin.mongodb/-user/delete.html>` method on a logged-in user:
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
To remove a ``User`` object from your client app, call the
:kotlin-sync-sdk:`remove <io.realm.kotlin.mongodb/-user/remove.html>`
method on a user:
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
You can call the :objc-sdk:`-deleteWithCompletion
<Classes/RLMUser.html#/c:objc(cs)RLMUser(im)deleteWithCompletion:>`
method on a :objc-sdk:`RLMUser object <Classes/RLMUser.html>` to delete the
user object from your App Services App. This deletes the object from the
server in addition to clearing data from the device.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
You can call the :objc-sdk:`-removeWithCompletion
<Classes/RLMUser.html#/c:objc(cs)RLMUser(im)removeWithCompletion:>`
method on a :objc-sdk:`RLMUser object <Classes/RLMUser.html>` to remove the
user from the device. This clears user data from the device, but does not
delete the user from Atlas.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
You can call the :swift-sdk:`delete
<Extensions/User.html#/s:So7RLMUserC10RealmSwiftE6delete7Combine6FutureCyyts5Error_pGyF>`
method on a user object to delete the user object from your App Services App.
This deletes the object from the server in addition to clearing data from the
device.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
You can call the :swift-sdk:`remove
<Extensions/User.html#/s:So7RLMUserC10RealmSwiftE6remove7Combine6FutureCyyts5Error_pGyF>`
method on a user object to remove the user from the device. This clears user
data from the device, but does not delete the user from Atlas.
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
.. tabs-drivers::

tabs:
- id: cpp-sdk
content: |

.. literalinclude:: /examples/MissingPlaceholders/api.cpp
:language: cpp

- id: csharp
content: |

.. literalinclude:: /examples/generated/dotnet/WorkWithRealm.snippet.delete-user.cs
:language: csharp

- id: dart
content: |

.. literalinclude:: /examples/generated/flutter/authenticate_users_test.snippet.delete-user.dart
:language: dart

- id: java
content: |

.. literalinclude:: /examples/MissingPlaceholders/api.java
:language: java

- id: java-kotlin
content: |

.. literalinclude:: /examples/MissingPlaceholders/api-java-kotlin.kt
:language: kotlin

- id: javascript
content: |

.. literalinclude:: /examples/generated/node/authenticate.snippet.delete-user.js
:language: javascript

- id: kotlin
content: |

.. literalinclude:: /examples/generated/kotlin/AuthenticationTest.snippet.delete-user.kt
:language: kotlin

- id: objectivec
content: |

.. literalinclude:: /examples/MissingPlaceholders/example.m
:language: objectivec

- id: swift
content: |

**Async/Await**

.. literalinclude:: /examples/generated/code/start/DeleteUsers.snippet.async-await-delete-user.swift
:language: swift
:copyable: false

**Closure-Style**

.. literalinclude:: /examples/generated/code/start/DeleteUsers.snippet.closure-delete-user.swift
:language: swift
:copyable: false

- id: typescript
content: |

.. literalinclude:: /examples/generated/node/authenticate.snippet.delete-user.js
:language: typescript
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
.. tabs-drivers::

tabs:
- id: cpp-sdk
content: |

.. literalinclude:: /examples/MissingPlaceholders/api.cpp
:language: cpp

- id: csharp
content: |

.. literalinclude:: /examples/MissingPlaceholders/example.cs
:language: csharp

- id: dart
content: |

.. literalinclude:: /examples/MissingPlaceholders/example.dart
:language: dart

- id: java
content: |

.. literalinclude:: /examples/MissingPlaceholders/example.java
:language: java

- id: java-kotlin
content: |

.. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt
:language: kotlin

- id: javascript
content: |

.. literalinclude:: /examples/MissingPlaceholders/example.js
:language: javascript

- id: kotlin
content: |

.. literalinclude:: /examples/generated/kotlin/AuthenticationTest.snippet.remove-user.kt
:language: kotlin

- id: objectivec
content: |

.. literalinclude:: /examples/MissingPlaceholders/example.m
:language: objectivec

- id: swift
content: |

.. literalinclude:: /examples/MissingPlaceholders/example.swift
:language: swift

- id: typescript
content: |

.. literalinclude:: /examples/MissingPlaceholders/example.ts
:language: typescript
2 changes: 1 addition & 1 deletion source/sdk/users.txt
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ Manage Users
.. toctree::
:titlesonly:

Create and Delete Users </sdk/users/create-and-delete-users>
Create, Delete, & Remove Users </sdk/users/create-and-delete-users>
Authenticate Users </sdk/users/authenticate-users>
Custom User Data </sdk/users/custom-user-data>
User Metadata </sdk/users/user-metadata>
5 changes: 5 additions & 0 deletions source/sdk/users/authenticate-users.txt
Original file line number Diff line number Diff line change
@@ -21,3 +21,8 @@ Offline Login

Refresh Token Expiration
------------------------

.. _sdks-logout:

Log a User Out
--------------
Loading