Built-in Functions
Actions have functions that are provided from the start. This is called a built-in function. Built-in functions correspond to methods of the object $fn and can be called in the form $fn.XXX.
Tips
$fn.addUsers(param)
Add users to the application’s authorization group. "asynchronous"
Tips
Arguments
Name | Type | Description |
---|---|---|
param | object | Group name and user information to add |
parameters details
Property | Type | Description |
---|---|---|
groupName | string | Group Name |
emails | array of string | Array of email addresses of users to add to the group |
Return value
None
Sample
$fn.createFolder(path)
Creates a folder in the specified path. "asynchronous"
Tips
Arguments
Name | Type | Description |
---|---|---|
path | string | Path of the folder to be created |
Tips
Return value
None
Sample
$fn.createGroup(param)
Add an authorization group for the application. "asynchronous"
Tips
Arguments
Name | Type | Description |
---|---|---|
param | object | Group information to be registered |
parameters details
Property | Type | Description |
---|---|---|
groupName | string | Group Name |
description | string | Details |
Return value
Type | Description |
---|---|
Promise<Group> | Registered Group Information |
Object | Property | Type | Description |
---|---|---|---|
Group | groupName | string | Group Name |
description | string | Description | |
members | object array | Active user array belonging to group |
Tips
Sample
$fn.createUser(param)
Add an authenticated user for the application. "asynchronous"
Tips
Arguments
Name | Type | Description |
---|---|---|
param | object | User information to be registered |
parameters details
Property | Type | Description |
---|---|---|
string | Email (string used for sign-in ID) | |
name | string | Name |
password | string | Temporary password |
sendMail | boolean | true: Send issue mail false: Do not send issue mail Default is false |
custom_01 | string | Custom Attribute 1 |
custom_02 | string | Custom Attribute 2 |
custom_03 | string | Custom Attribute 3 |
custom_04 | string | Custom Attribute 4 |
custom_05 | string | Custom Attribute 5 |
custom_06 | string | Custom Attribute 6 |
custom_07 | string | Custom Attribute 7 |
custom_08 | string | Custom Attribute 8 |
custom_09 | string | Custom Attribute 9 |
custom_10 | string | Custom Attribute 10 |
Tips
Return value
Type | Description |
---|---|
Promise<User> | Registered User Information |
Object | Property | Type | Description |
---|---|---|---|
User | userId | string | User ID (GUID) |
string | |||
name | string | Name | |
custom_01 | string | Custom Attribute 1 | |
custom_02 | string | Custom Attribute 2 | |
custom_03 | string | Custom Attribute 3 | |
custom_04 | string | Custom Attribute 4 | |
custom_05 | string | Custom Attribute 5 | |
custom_06 | string | Custom Attribute 6 | |
custom_07 | string | Custom Attribute 7 | |
custom_08 | string | Custom Attribute 8 | |
custom_09 | string | Custom Attribute 9 | |
custom_10 | string | Custom Attribute 10 | |
enabled | boolean | Enable/Disable | |
created | string | Creation date and time | |
updated | string | Update date and time | |
status | string | User Status |
Tips
Sample
$fn.csvToObject(csv)
Converts the specified CSV file data to object format.
Arguments
Name | Type | Description |
---|---|---|
csv | Buffer | Buffer object in CSV file |
CSV File Specifications
Header | Required This is the name of the object’s property. Only single-byte alphanumeric characters are allowed. (Starting with a numeral is not acceptable.) Example)“email”, “name” |
Delimiter | ,(comma) |
Field | If the value contains double quotes,commas, or line breaks, be sure to enclose them. |
Newline Character | CRLF or LF |
Encoding | UTF-8 |
BOM | Without BOM or with BOM |
Return value
Type | Description |
---|---|
array of object | Converts CSV file data to object format and returns it |
Tips
Sample
$fn.deleteFile(path)
Deletes files in the specified path. "asynchronous"
Tips
Arguments
Name | Type | Description |
---|---|---|
path | string | Path of the file to be deleted |
Tips
Return value
None
Sample
$fn.deleteFolder(path)
Deletes folder in the specified path. "asynchronous"
Tips
Arguments
Name | Type | Description |
---|---|---|
path | string | Path of the folder to be deleted |
Tips
Return value
None
Sample
$fn.deleteUser(email)
Deletes the authenticated user of the application. "asynchronous"
Tips
Arguments
Name | Type | Description |
---|---|---|
string | Email of user to be deleted |
Return value
None
Tips
Sample
$fn.download(file, filename)
Download the specified file locally. The name of the file to be downloaded, can be specified. "asynchronous"
Tips
Arguments
Name | Type | Description |
---|---|---|
file | Buffer | Buffer object of the file to download |
filename | string | File name to download |
Return value
None
Sample
$fn.getCurrentPosition()
Obtains the current location of the smartphone device.
Tips
Arguments
None
Return value
Type | Description |
---|---|
GeolocationCoordinates | Device Location |
Sample
$fn.getCurrentUser()
Retrieves the user who is signed in. "asynchronous"
Tips
Arguments
None
Return value
Type | Description |
---|---|
User | Returns the user currently signed in |
Object | Property | Type | Description |
---|---|---|---|
User | userId | string | User ID (GUID) |
string | |||
name | string | Name | |
custom_01 | string | Custom Attribute 1 | |
custom_02 | string | Custom Attribute 2 | |
custom_03 | string | Custom Attribute 3 | |
custom_04 | string | Custom Attribute 4 | |
custom_05 | string | Custom Attribute 5 | |
custom_06 | string | Custom Attribute 6 | |
custom_07 | string | Custom Attribute 7 | |
custom_08 | string | Custom Attribute 8 | |
custom_09 | string | Custom Attribute 9 | |
custom_10 | string | Custom Attribute 10 | |
enabled | boolean | Enable/Disable | |
created | string | Creation date and time | |
updated | string | Update date and time | |
status | string | User Status |
Sample
$fn.getFile(path)
Retrieves the file at the specified path. "asynchronous"
Tips
Arguments
Name | Type | Description |
---|---|---|
path | string | Path of file to be retrieved |
Tips
Return value
Type | Description |
---|---|
Promise<{data: Buffer}> | Object with properties of binary data (data: Buffer type) to be retrieved from Amazon S3 |
Tips
Sample
$fn.getFileNames(path)
Obtains a list of file names in a specified directory path. "asynchronous"
Tips
Arguments
Name | Type | Description |
---|---|---|
path | string | Path of the directory to be retrieved |
Return value
Type | Description |
---|---|
array of string | List of file names in target directory |
Tips
Sample
$fn.getGroups(option)
Retrieves all groups that exist in the user manager. "asynchronous"
Tips
Arguments
Name | Type | Description |
---|---|---|
option | object | Specify whether to include invalid users |
Option Details
Name | Type | Description |
---|---|---|
containUsers | boolean | true: Include users belonging to the group false: Do not include users belonging to the group Default is true |
Return value
Type | Description |
---|---|
Promise<Group[]> | Group list |
Object | Property | Type | Description |
---|---|---|---|
Group | groupName | string | Group Name |
description | string | Description | |
members | object array | Active user array belonging to group |
Sample
$fn.getLanguage()
Gets the currently displayed language.
Arguments
None
Return value
Type | Description |
---|---|
string | Returns one of the values of "default | en | ja" |
Sample
const lang = $fn.getLanguage();
$fn.getPresignedUrl(path,options)
Issues a signed URL to access a file manager in the WebPerformerNX execution environment. "asynchronous"
Tips
Argument
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
path | string |
| ||||||
options | object | Signed URL validity time |
Options Details
Property | Type | Description |
---|---|---|
expiresIn | number | Validity time of signed URL (seconds) Default is 900 |
Tips
Return value
Type | Description |
---|---|
String | Signed URL |
Sample
Tips
Tips
$fn.getUploadFiles()
Retrieve files uploaded with the push button or icon button."asynchronous"
Tips
Arguments
None
Return value
Type | Description |
---|---|
Promise <FileInfo[]> | Uploaded file information |
Object | Property | Type | Description |
---|---|---|---|
FileInfo | data | Buffer | File data |
filename | string | File name | |
filesize | number | File size |
Sample
$fn.getUsers(groupName?,option)
Retrieves the users present in the User Manager."asynchronous"
Tips
Arguments
Name | Type | Description |
---|---|---|
groupName? | string | Group name for user extraction conditions |
option | object | Specify whether to include invalid users |
Option details
Name | Type | Description |
---|---|---|
disabled | boolean | true: Include invalid users false: Do not include invalid users. Default is false |
Tips
Return value
Type | Description |
---|---|
Promise<User[]> | List of users matching the criteria |
Object | Property | Type | Description |
---|---|---|---|
User | userId | string | User ID (GUID) |
string | |||
name | string | name | |
custom_01 | string | Custom Attribute 1 | |
custom_02 | string | Custom Attribute 2 | |
custom_03 | string | Custom Attribute 3 | |
custom_04 | string | Custom Attribute 4 | |
custom_05 | string | Custom Attribute 5 | |
custom_06 | string | Custom Attribute 6 | |
custom_07 | string | Custom Attribute 7 | |
custom_08 | string | Custom Attribute 8 | |
custom_09 | string | Custom Attribute 9 | |
custom_10 | string | Custom Attribute 10 | |
enabled | boolean | Enable/Disable | |
created | string | Creation date and time | |
updated | string | Update date and time | |
status | string | User Status |
Sample
$fn.link(url)
Function to display the URL destination in a new tab.
Tips
Arguments
Name | Type | Description |
---|---|---|
url | string | Website URL |
Return value
None
Sample
$fn.link(‘https://google.com/’);
$fn.listUsersByEmail(email,option)
Performs forward match search by Email to retrieve users present in the user manager. "asynchronous"
Tips
Argument
Name | Type | Description |
---|---|---|
string | Search string | |
option | object | Specify whether to include invalid users |
option details
Name | Type | Description |
---|---|---|
disabled | boolean | true: Include disabled users false: Do not include invalid users Default is false |
Tips
Return value
Type | Description |
---|---|
Promise<User[]> | List of users matching the criteria |
Object | Property | Type | Description |
---|---|---|---|
User | userId | string | User ID (GUID) |
string | |||
name | string | User Name | |
custom_01 | string | Custom Attribute 1 | |
custom_02 | string | Custom Attribute 2 | |
custom_03 | string | Custom Attribute 3 | |
custom_04 | string | Custom Attribute 4 | |
custom_05 | string | Custom Attribute 5 | |
custom_06 | string | Custom Attribute 6 | |
custom_07 | string | Custom Attribute 7 | |
custom_08 | string | Custom Attribute 8 | |
custom_09 | string | Custom Attribute 9 | |
custom_10 | string | Custom Attribute 10 | |
enabled | boolean | Enable/Disable | |
created | string | Creation date and time | |
updated | string | Update date and time | |
status | string | User Status |
Sample
$fn.listUsersByName(name,option)
Performs a forward match search by user name to retrieve users present in the user manager. "asynchronous"
Tips
Arguments
Name | Type | Description |
---|---|---|
name | String | Search string |
option | object | specify whether to include invalid users |
Option details
Name | Type | Description |
---|---|---|
disabled | boolean | true: Include disabled users false: Do not include invalid users Default is false |
Tips
Return value
Type | Description |
---|---|
Promise<User[]> | List of users matching the criteria |
Object | Property | Type | Description |
---|---|---|---|
User | userId | string | User ID (GUID) |
string | |||
name | string | User Name | |
custom_01 | string | Custom Attribute 1 | |
custom_02 | string | Custom Attribute 2 | |
custom_03 | string | Custom Attribute 3 | |
custom_04 | string | Custom Attribute 4 | |
custom_05 | string | Custom Attribute 5 | |
custom_06 | string | Custom Attribute 6 | |
custom_07 | string | Custom Attribute 7 | |
custom_08 | string | Custom Attribute 8 | |
custom_09 | string | Custom Attribute 9 | |
custom_10 | string | Custom Attribute 10 | |
enabled | boolean | Enable/Disable | |
created | string | Creation date and time | |
updated | string | Update date and time | |
status | string | User Status |
Sample
$fn.message(parameters)
The snack bar component displays a message on the screen.
Arguments
Name | Type | Description |
---|---|---|
parameters | object | Object indicating message content |
parameters details
Property | Type | Description |
---|---|---|
message | string | Message string to be displayed |
close | boolean | Button to close the message - Show (default) - Hide |
autoHideDuration | number | Time to auto-close (ms) |
severity | string | Specify alert display - none (default) - error - warning - info - success |
position | string | Specify display position - bottom-left - bottom-center (default) - bottom-right - top-left - top-center - top-right |
transitionDuration | number | Snack bar display and fade-out time (milliseconds) |
Tips
Return value
None
Sample
$fn.nextUI(uiCode)
Function to transition the screen to another UI.
Arguments
Name | Type | Description |
---|---|---|
uiCode | string | ID of target UI |
Tips
Return value
None
Sample
$fn.nextUI(‘UI01’);
$fn.putFile(path, parameters)
Saves the file to the specified path. "asynchronous"
Tips
Arguments
Name | Type | Description |
---|---|---|
path | string | Path of the file to save |
parameters | object | data: Buffer | Unit8Array | Objects with string as a property |
Tips
Return value
None
Sample
$fn.removeUsers(param)
Exclude registered users from application authorization groups."asynchronous"
Tips
Arguments
Name | Type | Description |
---|---|---|
param | object | Group name and user information to be excluded |
param details
Property | Type | Description |
---|---|---|
groupName | string | Group Name |
emails | array of string | Array of email addresses of users to exclude from the group |
Return value
None
Sample
$fn.resetPassword(param)
Reset application authenticated user passwords."asynchronous"
Tips
Arguments
Name | Type | Description |
---|---|---|
param | object | Information about the user whose password is to be reset |
param details
Property | Type | Description |
---|---|---|
string | ||
password | string | Temporary password |
Return value
Type | Description |
---|---|
Promise | Password reset user information |
Object | Property | Type | Description |
---|---|---|---|
User | userId | string | User ID (GUID) |
string | |||
name | string | Name | |
custom_01 | string | Custom Attribute 1 | |
custom_02 | string | Custom Attribute 2 | |
custom_03 | string | Custom Attribute 3 | |
custom_04 | string | Custom Attribute 4 | |
custom_05 | string | Custom Attribute 5 | |
custom_06 | string | Custom Attribute 6 | |
custom_07 | string | Custom Attribute 7 | |
custom_08 | string | Custom Attribute 8 | |
custom_09 | string | Custom Attribute 9 | |
custom_10 | string | Custom Attribute 10 | |
enabled | boolean | Enable/Disable | |
created | string | Creation date and time | |
updated | string | Update date and time | |
status | string | User Status |
Sample
$fn.sendMail(param)
Send an email. "asynchronous"
Tips
Arguments
Name | Type | Description |
---|---|---|
param | object | Parameter object indicating the contents of the email transmission |
param details
Property | Type | Description |
---|---|---|
to | string array | TO address (multiple) |
cc | string array | CC address (multiple) |
bcc | string array | BCC address (multiple) |
fromAddress | string | From address |
fromName | string | From Name |
subject | string | Subject |
text | string | Body |
encoding | boolean | true: Base64 encoding of fromName false: Do not Base64-encode fromName Default is false |
Tips
Execution Environment | fromAddress | fromName | Email Address Identities format |
---|---|---|---|
Free | -(not available) | -(not available) | no-reply@webperformer.jp |
Premium | available | not available | configured address |
Premium | not available | available | configured name no-reply@webperformer.jp |
Premium | available | available | configured name |
Return value
None
Tips
Sample
$fn.setLanguage(language)
Change the display language.
Arguments
Name | Type | Description |
---|---|---|
language | string | Set one of the values of "default | en | ja" |
Return value
None
Sample
$fn.setLanguage(‘en’);
$fn.signOut()
Sign out.
Tips
Arguments
None
Return value
None
Sample
$fn.signOut();
$fn.updateUser(param)
Update the application’s authenticated users. "asynchronous"
Tips
Arguments
Name | Type | Description |
---|---|---|
param | object | User information to update |
param details
Property | Type | Description |
---|---|---|
originalEmail | string | Email(before update) |
string | Email(after update) | |
name | string | Name |
enabled | boolean | true: Enabled false: Disabled Default is true |
custom_01 | string | Custom Attribute 1 |
custom_02 | string | Custom Attribute 2 |
custom_03 | string | Custom Attribute 3 |
custom_04 | string | Custom Attribute 4 |
custom_05 | string | Custom Attribute 5 |
custom_06 | string | Custom Attribute 6 |
custom_07 | string | Custom Attribute 7 |
custom_08 | string | Custom Attribute 8 |
custom_09 | string | Custom Attribute 9 |
custom_10 | string | Custom Attribute 10 |
Tips
Return value
Type | Description |
---|---|
Promise<User> | Updated user information |
Object | Property | Type | Description |
---|---|---|---|
User | userId | string | User ID (GUID) |
string | |||
name | string | Name | |
custom_01 | string | Custom Attribute 1 | |
custom_02 | string | Custom Attribute 2 | |
custom_03 | string | Custom Attribute 3 | |
custom_04 | string | Custom Attribute 4 | |
custom_05 | string | Custom Attribute 5 | |
custom_06 | string | Custom Attribute 6 | |
custom_07 | string | Custom Attribute 7 | |
custom_08 | string | Custom Attribute 8 | |
custom_09 | string | Custom Attribute 9 | |
custom_10 | string | Custom Attribute 10 | |
enabled | boolean | Enable/Disable | |
created | string | Creation date and time | |
updated | string | Update date and time | |
status | string | User Status |