Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

Commit

Permalink
update docs for upsert
Browse files Browse the repository at this point in the history
  • Loading branch information
taylordowns2000 committed Dec 24, 2021
1 parent e063fb9 commit dc7e25c
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 5 deletions.
31 changes: 28 additions & 3 deletions ast.json
Expand Up @@ -411,12 +411,37 @@
},
{
"title": "param",
"description": "`Optional` more options for `upsert` operation.",
"description": "Optional configuration that will be applied to both the `get` and the `create` or `update` operations.",
"type": {
"type": "OptionalType",
"expression": {
"type": "NameExpression",
"name": "Object"
"type": "RecordType",
"fields": [
{
"type": "FieldType",
"key": "apiVersion",
"value": {
"type": "NameExpression",
"name": "object"
}
},
{
"type": "FieldType",
"key": "requestConfig",
"value": {
"type": "NameExpression",
"name": "object"
}
},
{
"type": "FieldType",
"key": "params",
"value": {
"type": "NameExpression",
"name": "object"
}
}
]
}
},
"name": "options"
Expand Down
2 changes: 1 addition & 1 deletion lib/Adaptor.js
Expand Up @@ -546,7 +546,7 @@ function get(resourceType, query, options = {}, callback = false) {
* @param {string} resourceType - The type of a resource to `upsert`. E.g. `trackedEntityInstances`
* @param {Object} query - A query object that allows to uniquely identify the resource to update. If no matches found, then the resource will be created.
* @param {Object} data - The data to use for update or create depending on the result of the query.
* @param {Object} [options] - `Optional` more options for `upsert` operation.
* @param {{ apiVersion: object, requestConfig: object, params: object }} [options] - Optional configuration that will be applied to both the `get` and the `create` or `update` operations.
* @param {function} [callback] - Optional callback to handle the response
* @throws {RangeError} - Throws range error
* @returns {Operation}
Expand Down
2 changes: 1 addition & 1 deletion src/Adaptor.js
Expand Up @@ -460,7 +460,7 @@ export function get(resourceType, query, options = {}, callback = false) {
* @param {string} resourceType - The type of a resource to `upsert`. E.g. `trackedEntityInstances`
* @param {Object} query - A query object that allows to uniquely identify the resource to update. If no matches found, then the resource will be created.
* @param {Object} data - The data to use for update or create depending on the result of the query.
* @param {Object} [options] - `Optional` more options for `upsert` operation.
* @param {{ apiVersion: object, requestConfig: object, params: object }} [options] - Optional configuration that will be applied to both the `get` and the `create` or `update` operations.
* @param {function} [callback] - Optional callback to handle the response
* @throws {RangeError} - Throws range error
* @returns {Operation}
Expand Down

0 comments on commit dc7e25c

Please sign in to comment.