From 3fbc1aeae752308a19b4e3cad5bcb0f38d26cdf7 Mon Sep 17 00:00:00 2001 From: Mihir Bhansali Date: Tue, 27 Jun 2023 10:11:24 -0400 Subject: [PATCH 1/3] updated the modification object in ldap.change --- docs/client.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/client.md b/docs/client.md index 8caabb01..1f778007 100644 --- a/docs/client.md +++ b/docs/client.md @@ -213,7 +213,8 @@ Example: const change = new ldap.Change({ operation: 'add', modification: { - pets: ['cat', 'dog'] + type: 'pets', + values: ['cat', 'dog'] } }); From 4799189751a1042a0df6be8a8e0bcd6e38d7e5a1 Mon Sep 17 00:00:00 2001 From: Mihir Bhansali Date: Tue, 27 Jun 2023 10:27:12 -0400 Subject: [PATCH 2/3] Adding Change Interface --- docs/client.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/client.md b/docs/client.md index 1f778007..faa209ad 100644 --- a/docs/client.md +++ b/docs/client.md @@ -235,6 +235,16 @@ must be one of: | add | Adds the attribute value(s) referenced in `modification`. The attribute may or may not already exist. | | delete | Deletes the attribute (and all values) referenced in `modification`. | +```js +interface Change { + operation: 'add' | 'delete' | 'replace', + modification: { + type: string, + values: any + } +} +``` + `modification` is just a plain old JS object with the values you want. # modifyDN From c416324019c5676c2309bb362c5b9d6fb9317999 Mon Sep 17 00:00:00 2001 From: Mihir Bhansali Date: Tue, 27 Jun 2023 13:17:01 -0400 Subject: [PATCH 3/3] Modification reference table --- docs/client.md | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/docs/client.md b/docs/client.md index faa209ad..d88b2230 100644 --- a/docs/client.md +++ b/docs/client.md @@ -235,17 +235,13 @@ must be one of: | add | Adds the attribute value(s) referenced in `modification`. The attribute may or may not already exist. | | delete | Deletes the attribute (and all values) referenced in `modification`. | -```js -interface Change { - operation: 'add' | 'delete' | 'replace', - modification: { - type: string, - values: any - } -} -``` +`modification` is just a plain old JS object with the required type and values you want. + +| Operation | Description | +|-----------|-------------| +| type | String that defines the attribute type for the modification. | +| values | Defines the values for modification. | -`modification` is just a plain old JS object with the values you want. # modifyDN `modifyDN(dn, newDN, controls, callback)`