particle-api-js 10.4.0 → 10.4.1
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/CHANGELOG.md +4 -0
- package/dist/particle.min.js +1 -1
- package/dist/particle.min.js.map +1 -1
- package/docs/api.md +528 -528
- package/package.json +1 -1
- package/src/Particle.js +3 -3
- package/test/Particle.spec.js +6 -3
package/package.json
CHANGED
package/src/Particle.js
CHANGED
|
@@ -2485,17 +2485,17 @@ class Particle {
|
|
|
2485
2485
|
* @param {string} [options.org] The Organization ID or slug. If not provided, the request will go to your sandbox account.
|
|
2486
2486
|
* @param {string} options.ledgerName Ledger name.
|
|
2487
2487
|
* @param {string} options.scopeValue Scope value.
|
|
2488
|
-
* @param {object} options.
|
|
2488
|
+
* @param {object} options.instance The instance with the data
|
|
2489
2489
|
* @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
2490
2490
|
* @param {Object} [options.context] Request context.
|
|
2491
2491
|
*
|
|
2492
2492
|
* @returns {Promise<RequestResponse>} A promise that resolves to the updated ledger instance data.
|
|
2493
2493
|
*/
|
|
2494
|
-
setLedgerInstance({ auth, org, ledgerName, scopeValue,
|
|
2494
|
+
setLedgerInstance({ auth, org, ledgerName, scopeValue, instance, headers, context }) {
|
|
2495
2495
|
return this.put({
|
|
2496
2496
|
uri: this._namespacedPath(org, `ledgers/${ledgerName}/instances/${scopeValue}`),
|
|
2497
2497
|
auth,
|
|
2498
|
-
data: {
|
|
2498
|
+
data: { instance },
|
|
2499
2499
|
headers,
|
|
2500
2500
|
context
|
|
2501
2501
|
});
|
package/test/Particle.spec.js
CHANGED
|
@@ -142,7 +142,10 @@ const props = {
|
|
|
142
142
|
description: 'my ledger',
|
|
143
143
|
direction: 'Downstream'
|
|
144
144
|
},
|
|
145
|
-
scopeValue: '1234'
|
|
145
|
+
scopeValue: '1234',
|
|
146
|
+
instance: {
|
|
147
|
+
property: 'yes'
|
|
148
|
+
}
|
|
146
149
|
};
|
|
147
150
|
|
|
148
151
|
const product = 'ze-product-v1';
|
|
@@ -2869,8 +2872,8 @@ describe('ParticleAPI', () => {
|
|
|
2869
2872
|
uri: `/v1/orgs/${org}/ledgers/${props.ledgerName}/instances/${props.scopeValue}`,
|
|
2870
2873
|
auth: props.auth,
|
|
2871
2874
|
data: {
|
|
2872
|
-
|
|
2873
|
-
|
|
2875
|
+
instance: {
|
|
2876
|
+
property: 'yes'
|
|
2874
2877
|
}
|
|
2875
2878
|
}
|
|
2876
2879
|
});
|