-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add API documentation in JSDoc format.
- Loading branch information
1 parent
69c6985
commit 19e165b
Showing
8 changed files
with
1,726 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
<!-- Generated by documentation.js. Update this documentation by updating the source code. --> | ||
|
||
### Table of Contents | ||
|
||
- [Constants.SCIM_BULK_REQUEST_MESSAGE_URN](#constantsscim_bulk_request_message_urn) | ||
- [Constants.SCIM_BULK_RESPONSE_MESSAGE_URN](#constantsscim_bulk_response_message_urn) | ||
- [Constants.SCIM_ERROR_MESSAGE_URN](#constantsscim_error_message_urn) | ||
- [Constants.SCIM_LIST_RESPONSE_URN](#constantsscim_list_response_urn) | ||
- [Constants.SCIM_MEDIA_TYPE](#constantsscim_media_type) | ||
- [Constants.SCIM_PATCH_MESSAGE_URN](#constantsscim_patch_message_urn) | ||
- [Constants.SCIM_SEARCH_REQUEST_URN](#constantsscim_search_request_urn) | ||
- [Patch.addOperation](#patchaddoperation) | ||
- [Patch.patchRequest](#patchpatchrequest) | ||
- [Patch.removeOperation](#patchremoveoperation) | ||
- [Patch.replaceOperation](#patchreplaceoperation) | ||
- [Resource](#resource) | ||
- [get](#get) | ||
- [id](#id) | ||
- [meta](#meta) | ||
- [schemas](#schemas) | ||
- [set](#set) | ||
- [toJSON](#tojson) | ||
- [fromJSON](#fromjson) | ||
|
||
## Constants.SCIM_BULK_REQUEST_MESSAGE_URN | ||
|
||
The SCIM 2 bulk request URN. | ||
|
||
## Constants.SCIM_BULK_RESPONSE_MESSAGE_URN | ||
|
||
The SCIM 2 bulk response URN. | ||
|
||
## Constants.SCIM_ERROR_MESSAGE_URN | ||
|
||
The SCIM 2 error message URN. | ||
|
||
## Constants.SCIM_LIST_RESPONSE_URN | ||
|
||
The SCIM 2 list response URN. | ||
|
||
## Constants.SCIM_MEDIA_TYPE | ||
|
||
The media type for SCIM 2 messages. | ||
|
||
## Constants.SCIM_PATCH_MESSAGE_URN | ||
|
||
The SCIM 2 patch request URN. | ||
|
||
## Constants.SCIM_SEARCH_REQUEST_URN | ||
|
||
The SCIM 2 search request URN. | ||
|
||
## Patch.addOperation | ||
|
||
Create an 'add' patch operation. | ||
|
||
**Parameters** | ||
|
||
- `path` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** A SCIM attribute path. | ||
- `value` **([string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) \| [number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) \| [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) \| [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object))** The value to add. | ||
|
||
Returns **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** An 'add' patch operation object. | ||
|
||
## Patch.patchRequest | ||
|
||
Create a PATCH request from the provided patch operations. | ||
|
||
**Parameters** | ||
|
||
- `operations` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** One or more patch operations. | ||
|
||
Returns **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** A PATCH request as a JSON string. | ||
|
||
## Patch.removeOperation | ||
|
||
Create a 'remove' patch operation. | ||
|
||
**Parameters** | ||
|
||
- `path` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** A SCIM attribute path. | ||
|
||
Returns **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** A 'remove' patch operation object. | ||
|
||
## Patch.replaceOperation | ||
|
||
Create a 'replace' patch operation. | ||
|
||
**Parameters** | ||
|
||
- `path` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** A SCIM attribute path. | ||
- `value` **([string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) \| [number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) \| [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) \| [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object))** The new value to set. | ||
|
||
Returns **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** A 'replace' patch operation object. | ||
|
||
## Resource | ||
|
||
A class representing a generic SCIM resource, such as a user. | ||
|
||
### get | ||
|
||
Get the attribute value at the specified path. | ||
|
||
**Parameters** | ||
|
||
- `path` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** A SCIM attribute path. | ||
|
||
Returns **([string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) \| [number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) \| [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) \| [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object))** The value at the | ||
specified path, or undefined if the path does not exist. | ||
|
||
### id | ||
|
||
Get the SCIM resource id. | ||
|
||
Returns **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** The SCIM resource id. | ||
|
||
### meta | ||
|
||
Get the SCIM resource's metadata. This might include the | ||
resource's location and created/updated timestamps. | ||
|
||
Returns **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** The SCIM resource's metadata. | ||
|
||
### schemas | ||
|
||
Get the SCIM resource's schemas. | ||
|
||
Returns **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)** An array of SCIM schema URNs. | ||
|
||
### set | ||
|
||
Set an attribute value at the specified path. | ||
|
||
**Parameters** | ||
|
||
- `path` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** A SCIM attribute path. | ||
- `value` **([string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) \| [number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) \| [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) \| [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object))** The value to set. | ||
|
||
### toJSON | ||
|
||
Get the SCIM resource as a JSON string. | ||
|
||
### fromJSON | ||
|
||
Create a new {Resource} instance from a JSON string. | ||
|
||
**Parameters** | ||
|
||
- `json` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** A SCIM resource in JSON format. | ||
|
||
Returns **[Resource](#resource)** A SCIM resource object. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,64 @@ | ||
module.exports = { | ||
/** | ||
* The media type for SCIM 2 messages. | ||
* @name Constants.SCIM_MEDIA_TYPE | ||
* @constant | ||
* @type {string} | ||
* @default | ||
*/ | ||
SCIM_MEDIA_TYPE: 'application/scim+json', | ||
|
||
/** | ||
* The SCIM 2 search request URN. | ||
* @name Constants.SCIM_SEARCH_REQUEST_URN | ||
* @constant | ||
* @type {string} | ||
* @default | ||
*/ | ||
SCIM_SEARCH_REQUEST_URN: 'urn:ietf:params:scim:api:messages:2.0:SearchRequest', | ||
|
||
/** | ||
* The SCIM 2 list response URN. | ||
* @name Constants.SCIM_LIST_RESPONSE_URN | ||
* @constant | ||
* @type {string} | ||
* @default | ||
*/ | ||
SCIM_LIST_RESPONSE_URN: 'urn:ietf:params:scim:api:messages:2.0:ListResponse', | ||
|
||
/** | ||
* The SCIM 2 patch request URN. | ||
* @name Constants.SCIM_PATCH_MESSAGE_URN | ||
* @constant | ||
* @type {string} | ||
* @default | ||
*/ | ||
SCIM_PATCH_MESSAGE_URN: 'urn:ietf:params:scim:api:messages:2.0:PatchOp', | ||
|
||
/** | ||
* The SCIM 2 bulk request URN. | ||
* @name Constants.SCIM_BULK_REQUEST_MESSAGE_URN | ||
* @constant | ||
* @type {string} | ||
* @default | ||
*/ | ||
SCIM_BULK_REQUEST_MESSAGE_URN: 'urn:ietf:params:scim:api:messages:2.0:BulkRequest', | ||
|
||
/** | ||
* The SCIM 2 bulk response URN. | ||
* @name Constants.SCIM_BULK_RESPONSE_MESSAGE_URN | ||
* @constant | ||
* @type {string} | ||
* @default | ||
*/ | ||
SCIM_BULK_RESPONSE_MESSAGE_URN: 'urn:ietf:params:scim:api:messages:2.0:BulkResponse', | ||
|
||
/** | ||
* The SCIM 2 error message URN. | ||
* @name Constants.SCIM_ERROR_MESSAGE_URN | ||
* @constant | ||
* @type {string} | ||
* @default | ||
*/ | ||
SCIM_ERROR_MESSAGE_URN: 'urn:ietf:params:scim:api:messages:2.0:Error' | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.