Skip to content

Commit

Permalink
Implement feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
krollins-mdb committed Nov 6, 2023
1 parent ae035e1 commit a352935
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 2 deletions.
2 changes: 2 additions & 0 deletions examples/node/v12/__tests__/metadata.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// :snippet-start: imports
import Realm, { BSON, MetadataMode } from "realm";
// :snippet-end:
import { Task } from "./models/models.ts";
import { APP_ID } from "../config.ts";

Expand Down
2 changes: 2 additions & 0 deletions examples/node/v12/__tests__/metadata.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
// :snippet-start: imports
import Realm, {
AppConfiguration,
BSON,
MetadataMode,
Configuration,
} from "realm";
// :snippet-end:
import { Task } from "./models/models";
import { APP_ID } from "../config";

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.. code-block:: javascript
import Realm, { BSON, MetadataMode } from "realm";
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.. code-block:: typescript
import Realm, {
AppConfiguration,
BSON,
MetadataMode,
Configuration,
} from "realm";
15 changes: 14 additions & 1 deletion source/sdk/node/app-services/connect-to-app-services-backend.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,21 @@ to determine encryption behavior.
To encrypt App metadata:

#. Import ``MetadataMode`` from ``Realm``.

.. tabs-realm-languages::

.. tab::
:tabid: typescript

.. include:: /examples/generated/node/v12/formatted/metadata.test.snippet.imports.ts.rst

.. tab::
:tabid: javascript

.. include:: /examples/generated/node/v12/formatted/metadata.test.snippet.imports.js.rst

#. Create an App configuration object that contains the ``metadata`` property.
#. Set ``metadata.mode`` to a value from the ``MetadataMode`` enum.
#. Set ``metadata.mode`` to ``MetadataMode.Encryption``.
#. Set ``metadata.encryptionKey`` to the key you want to use for encryption.
#. Pass the App configuration object to ``new Realm.App()``.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ To encrypt App metadata:
.. include:: /examples/generated/react-native/v12/EncryptMetadata.snippet.imports.tsx.rst

#. Create an App configuration object that contains the ``metadata`` property.
#. Set ``metadata.mode`` to a value from the ``MetadataMode`` enum.
#. Set ``metadata.mode`` to ``MetadataMode.Encryption``.
#. Set ``metadata.encryptionKey`` to the key you want to use for encryption.
#. Pass the App configuration object to ``new Realm.App()``.

Expand Down

0 comments on commit a352935

Please sign in to comment.