Skip to content

Commit 8419aa6

Browse files
SK-2341 update README and samples
1 parent 77a0ff9 commit 8419aa6

File tree

3 files changed

+24
-24
lines changed

3 files changed

+24
-24
lines changed

README.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ const credentials = { token: "<YOUR_BEARER_TOKEN>" };
152152
```
153153

154154
### Notes:
155-
- Use only ONLY authentication method.
155+
- Use only ONE authentication method.
156156
- API Key or Environment Variables are recommended for production use.
157157
- Secure storage of credentials is essential.
158158
- For overriding behavior and priority order of credentials, please refer to [Initialize the client](#initialize-the-client) section in [Quickstart](#quickstart).
@@ -411,10 +411,10 @@ const primaryCredentials: Credentials = { /////////////////
411411
// VaultConfig stores all necessary details to connect to a specific Skyflow vault.
412412

413413
const primaryVaultConfig: VaultConfig = {
414-
vaultId: '<PRIMARY_VAULT_ID>', // Replace with your primary vaulID
415-
clusterId: '<CLUSTER_ID>', // Replace with the cluster ID (partthe vault URL, e.g., https://{clusterId}.vault.skyflowapis.com).
416-
env: Env.PROD, // Set the environment (PRSANDBOX, STAGE, DEV).
417-
credentials: primaryCredentials // Attach the primcredentials to this vault configuration.
414+
vaultId: '<PRIMARY_VAULT_ID>', // Replace with your primary vault ID
415+
clusterId: '<CLUSTER_ID>', // Replace with the cluster ID (part of the vault URL, e.g., https://{clusterId}.vault.skyflowapis.com).
416+
env: Env.PROD, // Set the environment (PROD, SANDBOX, STAGE, DEV).
417+
credentials: primaryCredentials // Attach the primary credentials to this vault configuration.
418418
};
419419

420420
// Step 3: Create credentials as a JSON object (if a Bearer Token is not provided).
@@ -498,10 +498,10 @@ import {
498498
} from 'skyflow-node';
499499

500500
/*
501-
* This example demonstrates how to insert sensitive data (e.g., cardinformation) into a Skyflow vault using the Skyflow client.
501+
* This example demonstrates how to insert sensitive data (e.g., card information) into a Skyflow vault using the Skyflow client.
502502
*
503503
* 1. Initializes the Skyflow client.
504-
* 2. Prepares a record with sensitive data (e.g., card number and cardholdername).
504+
* 2. Prepares a record with sensitive data (e.g., card number and cardholder name).
505505
* 3. Creates an insert request for inserting the data into the Skyflow vault.
506506
* 4. Prints the response of the insert operation.
507507
*/
@@ -517,7 +517,7 @@ try{
517517

518518
// Step 2: Create Insert Request
519519
const insertReq: InsertRequest = new InsertRequest(
520-
'table1', // Specify the table in the vault where the data will inserted
520+
'table1', // Specify the table in the vault where the data should be inserted
521521
insertData, // Attach the data (records) to be inserted
522522

523523
);
@@ -588,12 +588,12 @@ try {
588588
// Step 1: Prepare the data to be inserted into the Skyflow vault
589589
const insertData: Record<string, unknown>[] = [
590590
{
591-
<FIELD_NAME_1>: '<VALUE_1>', // Replace with actual fielname and value
592-
<FIELD_NAME_2>: '<VALUE_2>', // Replace with actual fielname and value
591+
<FIELD_NAME_1>: '<VALUE_1>', // Replace with actual field name and value
592+
<FIELD_NAME_2>: '<VALUE_2>', // Replace with actual field name and value
593593
},
594594
{
595-
<FIELD_NAME_1>: '<VALUE_1>', // Replace with actual fielname and value
596-
<FIELD_NAME_2>: '<VALUE_2>', // Replace with actual fielname and value
595+
<FIELD_NAME_1>: '<VALUE_1>', // Replace with actual field name and value
596+
<FIELD_NAME_2>: '<VALUE_2>', // Replace with actual field name and value
597597
},
598598
]
599599

@@ -664,7 +664,7 @@ try {
664664

665665
// Step 4: Create Insert Request
666666
const insertReq: InsertRequest = new InsertRequest(
667-
'table1', // Specify the table in the vault where the data will inserted
667+
'table1', // Specify the table in the vault where the data should be inserted
668668
insertData, // Attach the data (records) to be inserted
669669
);
670670

@@ -859,7 +859,7 @@ try {
859859
Notes:
860860
861861
- `redactionType` defaults to `RedactionType.PLAIN_TEXT`.
862-
- `continueOnError` default valus is `False`.
862+
- `continueOnError` default value is `False`.
863863
864864
#### An [example](https://github.com/skyflowapi/skyflow-node/blob/v2/samples/vault-api/detokenzie-records.ts) of a detokenize call
865865
@@ -1266,7 +1266,7 @@ try {
12661266

12671267
// Step 4: Send the request to the Skyflow vault and retrieve the records
12681268
const getResponse: GetResponse = await skyflowClient
1269-
.vault(primaryVaultConfif.vaultId)
1269+
.vault(primaryVaultConfig.vaultId)
12701270
.get(getRequest, getOptions);
12711271
// Replace <VAULT_ID> with your actual Skyflow vault ID
12721272

@@ -1346,7 +1346,7 @@ try {
13461346

13471347
// Step 4: Send the request to the Skyflow vault and retrieve the records
13481348
const getResponse: GetResponse = await skyflowClient
1349-
.vault(primaryVaultConfif.vaultId)
1349+
.vault(primaryVaultConfig.vaultId)
13501350
.get(getRequest, getOptions);
13511351
// Replace <VAULT_ID> with your actual Skyflow vault ID
13521352

@@ -1529,7 +1529,7 @@ try {
15291529
// Step 4: Configure Update Options
15301530
const updateOptions: UpdateOptions = new UpdateOptions();
15311531
updateOptions.setReturnTokens(true); // Specify whether to return tokens in the response
1532-
updatedOptions.setTokens(tokens); // The tokens associated with specific columns
1532+
updateOptions.setTokens(tokens); // The tokens associated with specific columns
15331533
updateOptions.setTokenMode(TokenMode.ENABLE); // Specifies the tokenization mode (ENABLE means tokenization is applied)
15341534

15351535
// Step 5: Send the request to the Skyflow vault and update the record
@@ -1596,7 +1596,7 @@ try {
15961596

15971597
// Step 4: Configure Update Options
15981598
const updateOptions: UpdateOptions = new UpdateOptions();
1599-
updatedOptions.setTokens(tokens); // The tokens associated with specific columns
1599+
updateOptions.setTokens(tokens); // The tokens associated with specific columns
16001600
updateOptions.setTokenMode(TokenMode.ENABLE); // Specifies the tokenization mode (ENABLE means tokenization is applied)
16011601

16021602
// Step 5: Send the request to the Skyflow vault and update the record

samples/package-lock.json

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

samples/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
"author": "",
1010
"license": "ISC",
1111
"dependencies": {
12-
"skyflow-node": "2.2.0-beta.1"
12+
"skyflow-node": "2.0.0"
1313
}
1414
}

0 commit comments

Comments
 (0)