Koji.remix.cancel();
Manages the customization experience for your Koji app.
Cancels the customization experience and returns to where the user was before they started customization. If the user has made changes, they are prompted to confirm the cancellation.
Koji.remix.cancel();
Source: frontend/remix/index.ts#L185
Retrieves sensitive data that was [[encryptValue | stored as an encrypted value]].
Note
|
Only the owner of the Koji app can access the decrypted value with this method. For example, to check that the value was entered correctly. To retrieve the value for other users, use {@doclink core-backend-secret#resolveValue | Secret.resolveValue} on the backend. |
encryptedValue
- Any, Path where the encrypted value is stored.
Promise<String>, Decrypted value.
const value = await Koji.remix.decryptValue(encryptPath);
Source: frontend/remix/index.ts#L233
Stores sensitive data as an encrypted value. The sensitive data can only be accessed programmatically and is not available when the Koji app is configured.
rawValue
- Any, Value to encrypt.
options
- EncryptValueOptions (Optional), Options when encrypting a secret value.
Promise<String>, Encrypted value. Use this value to [[decryptValue | decrypt the value]] on the frontend, for the creator, or to {@doclink core-backend-secret#resolveValue | resolve the value} on the backend, for other users.
const encryptPath = await Koji.remix.encryptValue(text);
Source: frontend/remix/index.ts#L204
Advances the Koji app’s mode from customization to preview.
<button onClick={() => Koji.remix.finish()}>
Next
</button>
Source: frontend/remix/index.ts#L168
Gets the customization data for the Koji app.
path
- String (Optional), Array of keys to target a specific value in the object.
defaultValue
- Any (Optional), Value to return if no value exists at the targeted path.
Any, Object containing the current customization data.
// Return the entire `remixData` object
const values = Koji.remix.get();
// Return a particular value
const backgroundColor = Koji.remix.get(['colors', 'background']);
// Return a particular value with a default if the value is not defined
const textColor = Koji.remix.get(['colors', 'text'], '#000000');
Source: frontend/remix/index.ts#L108
Initializes the Koji app’s customization data with default values.
Note
|
In most cases, you do not need to call this method manually because it is automatically called when you initialize the package with Koji.config .
Use this method only if you want to use the Remix class by itself, without any other classes in the package.
|
remixData
- Any, Object containing the default values for your Koji app.
import { remixData } from '../../koji.json;
Koji.remix.init(remixData));
Source: frontend/remix/index.ts#L68
Replaces all customization data with the specified object.
Note
|
This method overwrites all existing values in the customization data. To update specific values only, use [[set]]. |
newValues
- Object, Object containing the new customization data for the Koji app.
Promise<Boolean>, Indicates whether the customization data was successfully replaced.
await Koji.remix.overwrite({'myColor': color, 'myText': text});
Source: frontend/remix/index.ts#L152
Updates the specified values in the customization data.
Note
|
This method updates only the values that are specified in newValue . If other values exist, they are not changed. To replace all customization data, use [[overwrite]].
|
newValue
- Object, Key-value pairs to update in the customization data.
Promise<Boolean>, Indicates whether the values were successfully updated.
await Koji.remix.set({'myColor': color});
Source: frontend/remix/index.ts#L128
Options when encrypting a secret value.
skipEncryptionAtRest
- Boolean (Optional), Set true to bypass at-rest encryption on Koji's servers, allowing you to encrypt values larger than 4kb.