diff --git a/sdk/privacy/docs/module-Privacy-Privacy.html b/sdk/privacy/docs/module-Privacy-Privacy.html
index ea722ae..8df33ad 100644
--- a/sdk/privacy/docs/module-Privacy-Privacy.html
+++ b/sdk/privacy/docs/module-Privacy-Privacy.html
@@ -779,7 +779,7 @@
Properties:
@@ -1018,7 +1018,7 @@ Properties:
@@ -1179,6 +1179,37 @@ Properties
+
+
+ profileId |
+
+
+
+
+
+
+ string
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+ The Privacy profile ID configured on
+Verify. If provided, other fields are ignored and assessment is performed
+using this identifier.
+
+ |
+
+
+
accessTypeId |
@@ -1357,7 +1388,7 @@ Returns:
@@ -1401,6 +1432,10 @@ Example
{
// default end user license agreement
"purposeId": "defaultEULA",
+ },
+ {
+ // Privacy profile identifier
+ "profileId": "gdprprofile",
}
])
@@ -1730,7 +1765,7 @@ Returns:
@@ -1999,7 +2034,7 @@ Returns:
@@ -2204,7 +2239,7 @@ Returns:
diff --git a/sdk/privacy/docs/privacy.js.html b/sdk/privacy/docs/privacy.js.html
index 8ebc627..050ab8b 100644
--- a/sdk/privacy/docs/privacy.js.html
+++ b/sdk/privacy/docs/privacy.js.html
@@ -161,6 +161,9 @@
* @param {string} items.purposeId The purpose ID representing the privacy
* purpose configured on Verify. If you are checking for the consent status
* of EULA, use the EULA identifier here.
+ * @param {string} items.profileId The Privacy profile ID configured on
+ * Verify. If provided, other fields are ignored and assessment is performed
+ * using this identifier.
* @param {string} items.accessTypeId The access type ID representing the
* available access types on Verify. This must be one of the access types
* selected for the purpose.
@@ -187,6 +190,10 @@
* {
* // default end user license agreement
* "purposeId": "defaultEULA",
+ * },
+ * {
+ * // Privacy profile identifier
+ * "profileId": "gdprprofile",
* }
* ])
*
diff --git a/sdk/privacy/lib/privacy.js b/sdk/privacy/lib/privacy.js
index 6a3eb59..f6cd765 100644
--- a/sdk/privacy/lib/privacy.js
+++ b/sdk/privacy/lib/privacy.js
@@ -78,6 +78,9 @@ class Privacy {
* @param {string} items.purposeId The purpose ID representing the privacy
* purpose configured on Verify. If you are checking for the consent status
* of EULA, use the EULA identifier here.
+ * @param {string} items.profileId The Privacy profile ID configured on
+ * Verify. If provided, other fields are ignored and assessment is performed
+ * using this identifier.
* @param {string} items.accessTypeId The access type ID representing the
* available access types on Verify. This must be one of the access types
* selected for the purpose.
@@ -104,6 +107,10 @@ class Privacy {
* {
* // default end user license agreement
* "purposeId": "defaultEULA",
+ * },
+ * {
+ * // Privacy profile identifier
+ * "profileId": "gdprprofile",
* }
* ])
*
diff --git a/sdk/privacy/lib/services/dpcm/dpcmService.js b/sdk/privacy/lib/services/dpcm/dpcmService.js
index cb1403f..3a4fdf0 100644
--- a/sdk/privacy/lib/services/dpcm/dpcmService.js
+++ b/sdk/privacy/lib/services/dpcm/dpcmService.js
@@ -49,6 +49,9 @@ class DPCMService extends Service {
* @param {Array} duaRequest The data items that require approval for use
* @param {string} duaRequest.purposeId The purpose ID representing the
* privacy purpose configured on Verify.
+ * @param {string} duaRequest.profileId The Privacy profile ID representing
+ * the privacy profile configured on Verify. If provided, other
+ * fields are ignored
* @param {string} duaRequest.accessTypeId The access type ID representing
* the available access types on Verify. This must be one of the access types
* selected for the purpose.
diff --git a/sdk/privacy/package.json b/sdk/privacy/package.json
index d2d5555..f4f2389 100644
--- a/sdk/privacy/package.json
+++ b/sdk/privacy/package.json
@@ -1,6 +1,6 @@
{
"name": "@ibm-verify/privacy",
- "version": "1.0.0",
+ "version": "1.0.1",
"description": "Data Privacy and Consent Management SDK",
"main": "index.js",
"files": [
diff --git a/sdk/privacy/test/privacy/assessTest.js b/sdk/privacy/test/privacy/assessTest.js
index 2d497ae..789a51d 100644
--- a/sdk/privacy/test/privacy/assessTest.js
+++ b/sdk/privacy/test/privacy/assessTest.js
@@ -164,6 +164,29 @@ describe('Privacy', () => {
]);
assert.strictEqual(result.status, 'consent');
});
+
+ it('should assess by profileId', async () => {
+ const client = new Privacy(
+ config, auth, context,
+ );
+ const result = await client.assess([
+ {
+ 'profileId': 'marketingprofile',
+ },
+ ]);
+ // email (attributeId=3) is not consented but
+ // mobile_number (attributeId=11) is already consented
+ for (let i = 0; i < result.assessment.length; i++) {
+ const item = result.assessment[i];
+ if (item.attributeId === '11') {
+ assert.strictEqual(item.result.length, 1);
+ assert.strictEqual(item.result[0].approved, true);
+ } else if (item.attributeId === '3') {
+ assert.strictEqual(item.result.length, 1);
+ assert.strictEqual(item.result[0].approved, false);
+ }
+ }
+ });
});
describe('#error', () => {