skyflow-js 1.12.1 → 1.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/README.md +17 -10
- package/dist/sdkNodeBuild/index.js +1 -1
- package/dist/sdkNodeBuild/index.js.gz +0 -0
- package/package.json +3 -2
- package/types/utils/helpers/index.d.ts +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,11 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [1.12.2] - 2022-03-29
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
- Added validation to token from TokenProvider
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- Request headers not getting overriden due to case sensitivity
|
|
12
|
+
|
|
13
|
+
## [1.12.1] - 2022-03-22
|
|
14
|
+
|
|
15
|
+
Fixed
|
|
16
|
+
- Fixes in multiple skyflow clients creation
|
|
17
|
+
|
|
5
18
|
## [1.12.0] - 2022-02-24
|
|
6
19
|
|
|
7
20
|
Added
|
|
8
21
|
- `requestId` in error logs and error responses
|
|
9
22
|
- add autocomplete for collect elements
|
|
23
|
+
|
|
10
24
|
## [1.11.0] - 2022-02-08
|
|
11
25
|
|
|
12
26
|
### Added
|
package/README.md
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
# skyflow-js
|
|
2
|
-
Skyflow’s Javascript SDK can be used to securely collect, tokenize, and reveal sensitive data in the browser without exposing your front-end infrastructure to sensitive data.
|
|
2
|
+
Skyflow’s Javascript SDK can be used to securely collect, tokenize, and reveal sensitive data in the browser without exposing your front-end infrastructure to sensitive data.
|
|
3
3
|
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
+
[](https://github.com/skyflowapi/skyflow-js/actions)
|
|
7
|
+
[](https://www.npmjs.com/package/skyflow-js)
|
|
8
|
+
[](https://github.com/skyflowapi/skyflow-js/blob/master/LICENSE)
|
|
9
|
+
|
|
6
10
|
# Table of Contents
|
|
7
11
|
- [**Including Skyflow.js**](#Including-Skyflowjs)
|
|
8
12
|
- [**Initializing Skyflow.js**](#Initializing-Skyflowjs)
|
|
@@ -157,7 +161,7 @@ skyflowClient.insert(records, options={})
|
|
|
157
161
|
|
|
158
162
|
|
|
159
163
|
|
|
160
|
-
An example of an insert call:
|
|
164
|
+
An [example](https://github.com/skyflowapi/skyflow-js/blob/master/samples/UsingScriptTag/purejs.html) of an insert call:
|
|
161
165
|
```javascript
|
|
162
166
|
skyflowClient.insert({
|
|
163
167
|
"records": [
|
|
@@ -394,7 +398,7 @@ container.collect(options={})
|
|
|
394
398
|
|
|
395
399
|
### End to end example of collecting data with Skyflow Elements
|
|
396
400
|
|
|
397
|
-
**Sample Code
|
|
401
|
+
**[Sample Code:](https://github.com/skyflowapi/skyflow-js/blob/master/samples/UsingScriptTag/skyflowElements.html)**
|
|
398
402
|
|
|
399
403
|
```javascript
|
|
400
404
|
//Step 1
|
|
@@ -513,7 +517,7 @@ const elementValueMatchRule = {
|
|
|
513
517
|
}
|
|
514
518
|
```
|
|
515
519
|
|
|
516
|
-
The Sample code snippet for using custom validations:
|
|
520
|
+
The Sample [code snippet](https://github.com/skyflowapi/skyflow-js/blob/master/samples/UsingScriptTag/CustomValidations.html) for using custom validations:
|
|
517
521
|
|
|
518
522
|
```javascript
|
|
519
523
|
/*
|
|
@@ -619,7 +623,7 @@ state : {
|
|
|
619
623
|
`Note:`
|
|
620
624
|
values of SkyflowElements will be returned in elementstate object only when `env` is `DEV`, else it is empty string i.e, ''
|
|
621
625
|
|
|
622
|
-
##### Sample code snippet for using listeners
|
|
626
|
+
##### Sample [code snippet](https://github.com/skyflowapi/skyflow-js/blob/master/samples/UsingScriptTag/CollectElementListeners.html) for using listeners
|
|
623
627
|
```javascript
|
|
624
628
|
//create skyflow client
|
|
625
629
|
const skyflowClient = Skyflow.init({
|
|
@@ -741,7 +745,7 @@ cardNumber.clearValue();
|
|
|
741
745
|
For non-PCI use-cases, retrieving data from the vault and revealing it in the browser can be done either using the SkyflowID's or tokens as described below
|
|
742
746
|
|
|
743
747
|
- ### Using Skyflow tokens
|
|
744
|
-
|
|
748
|
+
In order to retrieve data from your vault using tokens that you have previously generated for that data, you can use the `detokenize(records)` method. The records parameter takes a JSON object that contains `records` to be fetched as shown below.
|
|
745
749
|
|
|
746
750
|
```javascript
|
|
747
751
|
const records = {
|
|
@@ -754,7 +758,7 @@ const records = {
|
|
|
754
758
|
|
|
755
759
|
skyflow.detokenize(records)
|
|
756
760
|
```
|
|
757
|
-
An example of a detokenize call:
|
|
761
|
+
An [example](https://github.com/skyflowapi/skyflow-js/blob/master/samples/UsingScriptTag/purejs.html) of a detokenize call:
|
|
758
762
|
|
|
759
763
|
```javascript
|
|
760
764
|
skyflow.detokenize({
|
|
@@ -779,7 +783,7 @@ The sample response:
|
|
|
779
783
|
```
|
|
780
784
|
|
|
781
785
|
- ### Using Skyflow ID's
|
|
782
|
-
|
|
786
|
+
In order to retrieve data from your vault using SkyflowIDs, use the `getById(records)` method.The records parameter takes a JSON object that contains `records` to be fetched as shown below.
|
|
783
787
|
|
|
784
788
|
```javascript
|
|
785
789
|
{
|
|
@@ -936,6 +940,7 @@ container.reveal()
|
|
|
936
940
|
|
|
937
941
|
### End to end example of all steps
|
|
938
942
|
|
|
943
|
+
**[Sample Code:](https://github.com/skyflowapi/skyflow-js/blob/master/samples/UsingScriptTag/skyflowElements.html)**
|
|
939
944
|
```javascript
|
|
940
945
|
//Step 1
|
|
941
946
|
const container = skyflowClient.container(Skyflow.ContainerType.REVEAL)
|
|
@@ -1103,7 +1108,7 @@ It is a JSON object that specifies where to render the response in the UI. The v
|
|
|
1103
1108
|
|
|
1104
1109
|
Sample use-cases on using invokeConnection():
|
|
1105
1110
|
|
|
1106
|
-
### Sample use-case 1:
|
|
1111
|
+
### [Sample use-case 1](https://github.com/skyflowapi/skyflow-js/blob/master/samples/UsingScriptTag/invokeConnection.html):
|
|
1107
1112
|
|
|
1108
1113
|
Merchant acceptance - customers should be able to complete payment checkout without cvv touching their application. This means that the merchant should be able to receive a CVV and process a payment without exposing their front-end to any PCI data
|
|
1109
1114
|
|
|
@@ -1153,7 +1158,7 @@ In the above example, CVV is being collected from the user input at the time of
|
|
|
1153
1158
|
- card_number can be either container element or plain text value (tokens or actual value)
|
|
1154
1159
|
- `table` and `column` names are not required for creating collect element, if it is used for invokeConnection method, since they will not be stored in the vault
|
|
1155
1160
|
|
|
1156
|
-
### Sample use-case 2:
|
|
1161
|
+
### [Sample use-case 2](https://github.com/skyflowapi/skyflow-js/blob/master/samples/UsingScriptTag/invokeConnection.html):
|
|
1157
1162
|
|
|
1158
1163
|
Card issuance - customers want to issue cards from card issuer service and should generate the CVV dynamically without increasing their PCI scope.
|
|
1159
1164
|
```javascript
|
|
@@ -1239,6 +1244,8 @@ The values in the **requestXML** can contain collect element IDs or reveal eleme
|
|
|
1239
1244
|
|
|
1240
1245
|
Please ensure that the paths configured in the responseXML are present in the actual response. In case of a misconfigured path, the response from the server will be discarded and an error will be thrown.
|
|
1241
1246
|
|
|
1247
|
+
**[Sample Code:](https://github.com/skyflowapi/skyflow-js/blob/master/samples/UsingScriptTag/InvokeSoapConnection.html)**
|
|
1248
|
+
|
|
1242
1249
|
```javascript
|
|
1243
1250
|
|
|
1244
1251
|
// step 1
|