@notabene/javascript-sdk 1.18.0 → 1.20.0
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/README.md +13 -8
- package/package.json +1 -1
- package/public/index.html +14 -2
- package/src/types.ts +6 -1
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ This library is the JavaScript SDK for loading the widget on a frontend.
|
|
|
20
20
|
There are two options for loading the Notabene SDK:
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
|
-
<script id="notabene" async src="https://unpkg.com/@notabene/javascript-sdk@
|
|
23
|
+
<script id="notabene" async src="https://unpkg.com/@notabene/javascript-sdk@1.19.0/dist/es/index.js"></script>
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
Or installing the library:
|
|
@@ -172,10 +172,15 @@ To replace `Loading...` with `Cargando...`
|
|
|
172
172
|
|
|
173
173
|
**Fields Properties**
|
|
174
174
|
|
|
175
|
-
Possible fields:
|
|
175
|
+
Possible fields customization support:
|
|
176
176
|
|
|
177
|
-
|
|
178
|
-
|
|
177
|
+
| field name | `forceDisplay` | `optional` | description |
|
|
178
|
+
| ------------------------ | -------------- | ---------- | ------------------------------------------------------- |
|
|
179
|
+
| `counterparty` | -- | ☑️ | Counterparty VASP or Wallet (destination or originator) |
|
|
180
|
+
| `dateAndPlaceOfBirth` | ☑️ | -- | Recipient (or Sender) Date and Place of Birth |
|
|
181
|
+
| `geographicAddress` | ☑️ | ☑️ | Recipient (or Sender) Address |
|
|
182
|
+
| `name` | ☑️ | -- | Recipient (or Sender) Name |
|
|
183
|
+
| `nationalIdentification` | ☑️ | --️ | Recipient (or Sender) National Identification |
|
|
179
184
|
|
|
180
185
|
**Field Options**
|
|
181
186
|
|
|
@@ -185,18 +190,18 @@ Possible fields:
|
|
|
185
190
|
```js
|
|
186
191
|
{
|
|
187
192
|
counterparty: {
|
|
188
|
-
optional: true;
|
|
193
|
+
optional: true;
|
|
189
194
|
},
|
|
190
195
|
geographicAddress: {
|
|
191
|
-
forceDisplay: true,
|
|
192
|
-
optional: true;
|
|
196
|
+
forceDisplay: true,
|
|
197
|
+
optional: true;
|
|
193
198
|
},
|
|
194
199
|
}
|
|
195
200
|
```
|
|
196
201
|
|
|
197
202
|
---
|
|
198
203
|
|
|
199
|
-
**_Beneficiary Details_
|
|
204
|
+
**_Beneficiary Details_ [DEPRECATED]**
|
|
200
205
|
|
|
201
206
|
You can require specific beneficiary fields that are not required by your jurisdiction.
|
|
202
207
|
|
package/package.json
CHANGED
package/public/index.html
CHANGED
|
@@ -31,13 +31,25 @@
|
|
|
31
31
|
// backgroundColor: 'black',
|
|
32
32
|
// mode: 'dark',
|
|
33
33
|
},
|
|
34
|
-
// beneficiaryDetails: ['beneficiaryNationalIdentification'],
|
|
35
34
|
// transactionTypeAllowed: 'VASP_2_VASP_ONLY',
|
|
36
35
|
nonCustodialDeclarationType: 'DECLARATION',
|
|
36
|
+
|
|
37
|
+
// @deprecated
|
|
38
|
+
// beneficiaryDetails: ['beneficiaryNationalIdentification'],
|
|
39
|
+
|
|
37
40
|
// fieldsProps: {
|
|
41
|
+
// nationalIdentification: {
|
|
42
|
+
// forceDisplay: true,
|
|
43
|
+
// },
|
|
44
|
+
// dateAndPlaceOfBirth: {
|
|
45
|
+
// forceDisplay: true,
|
|
46
|
+
// },
|
|
38
47
|
// geographicAddress: {
|
|
39
48
|
// forceDisplay: true,
|
|
40
|
-
// optional: true
|
|
49
|
+
// optional: true
|
|
50
|
+
// },
|
|
51
|
+
// counterparty: {
|
|
52
|
+
// optional: true
|
|
41
53
|
// }
|
|
42
54
|
// }
|
|
43
55
|
});
|
package/src/types.ts
CHANGED
|
@@ -81,7 +81,12 @@ export type FieldProps = {
|
|
|
81
81
|
optional?: boolean; // bypass the jurisdiction rules validation - defaults to false
|
|
82
82
|
};
|
|
83
83
|
|
|
84
|
-
export type FieldName =
|
|
84
|
+
export type FieldName =
|
|
85
|
+
| 'counterparty'
|
|
86
|
+
| 'geographicAddress'
|
|
87
|
+
| 'name'
|
|
88
|
+
| 'nationalIdentification'
|
|
89
|
+
| 'dateAndPlaceOfBirth';
|
|
85
90
|
|
|
86
91
|
export type FieldsProps = {
|
|
87
92
|
[name in FieldName]?: FieldProps;
|