1.0.29 • Published 2 days ago

w3platformsdk v1.0.29

Weekly downloads
-
License
ISC
Repository
-
Last release
2 days ago

W3 Platform Command Line Interface

The W3 Platform CLI is a Node.js based command-line tool that provides a set of utilities to interact with the W3 Platform services. This includes managing credentials, profiles, initializing environments, and handling user accounts.

Installation

Ensure that you have Node.js installed on your system.

  1. Clone this repository or download the source code.
  2. Navigate to the directory where you downloaded the CLI.
  3. Run the following command to install dependencies:
npm install
  1. To make the CLI globally available on your system, run:
npm link

Configuration

Before using the CLI, you need to configure your credentials:

w3platform-cli configure

Follow the prompts to enter your organization's name, API key, org ID, and secret.

Commands

The CLI supports various commands, such as:

  • configure: Sets up your API key and other configuration details required to authenticate against the W3 Platform services.
  • profiles: Lists all the profiles that have been configured on your local machine.
  • profile: Displays the currently active profile with its configuration details.
  • setProfile [profileName]: Switches the active profile to the one specified by profileName.
  • init: Begins the initialization process for your organization, setting up the necessary environment for using W3 Platform services.
  • createOwnerAccount: Specifically designed to be used during the initialization process, this creates the primary owner account for your organization.
  • createAccount: Creates a new user account within the organization.
  • createUser [accountId] [name]: Registers a new user within the account specified by accountId with the name name.
  • initEnv: Triggers the creation of a full environment setup, including all necessary services and configurations.
  • addUserRole [userId] [role]: Assigns a new role to a user identified by userId.
  • removeUserRole [userId] [role]: Removes a role from a user identified by userId.
  • assignUserToWebUser [userId] [UserWebId]: Links a user to a web user profile.
  • registerAdmin [accountId]: Registers an admin account using the accountId provided.
  • registerAccount [accountId]: Finalizes the account registration process for an account specified by accountId.
  • registerStorageService [accountId]: Signs up the account identified by accountId for the W3 storage service.
  • uploadContent [accountId] [fileName] [type] [description] [TTL]: Uploads content to the W3 platform under the provided account.
  • getContent [tokenId]: Retrieves content from the W3 platform using the provided token ID.
  • signupStorageRead [accountId]: Allows the specified account to read from W3 storage service.
  • assignContnet [tokenId] [tokenOwnerAccountId] [assignedAccountId]: Assigns access for content identified by tokenId to another account.
  • deprecateToken [tokenId] [storageAccountId]: Deprecates a token that was previously in use.
  • organizations: Lists all available organizations within the scope of the credentials provided.
  • callService [serviceId] [serviceOrgid] [accountId] [request]: Invokes a service with a specific request.
  • signupUser [name] [password] [email] [phone] [accountId]: Registers a web user on the W3 platform.
  • verifyUser [name] [code]: Verifies a user's identity with the provided code.
  • userLogin [name] [password]: Logs in a user to the W3 platform.
  • validateToken [tokenResponseFile]: Validates a user's login token.
  • forgotPassword [username]: Initiates a password reset process for a user.
  • confirmResetPassword [username] [newpassword] [code]: Finalizes the password reset process for a

Usage

To use the CLI, run w3platform followed by the command you want to execute. For example:

w3platform profiles

This command will display the current organization profiles configured on your system.

Contributing

Contributions are welcome. Please fork the repository and submit a pull request with your changes.

License

This project is open-source and available under the MIT License.

Support

If you encounter any issues or require assistance, please raise an issue in the repository or contact support@w3platform.com.

1.0.29

2 days ago

1.0.28

1 month ago

1.0.27

1 month ago

1.0.26

1 month ago

1.0.25

1 month ago

1.0.24

1 month ago

1.0.19

3 months ago

1.0.18

3 months ago

1.0.17

3 months ago

1.0.16

3 months ago

1.0.22

3 months ago

1.0.21

3 months ago

1.0.20

3 months ago

1.0.23

3 months ago

1.0.15

4 months ago

1.0.14

6 months ago

1.0.13

6 months ago

1.0.12

6 months ago

1.0.11

6 months ago

1.0.10

6 months ago

1.0.9

6 months ago

1.0.8

6 months ago

1.0.7

6 months ago

1.0.6

6 months ago

1.0.5

6 months ago

1.0.4

6 months ago

1.0.3

6 months ago

1.0.1

6 months ago

1.0.0

6 months ago