particle-api-js 10.3.0 → 10.4.0

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/.eslintrc.js CHANGED
@@ -1,23 +1,25 @@
1
1
  module.exports = {
2
- extends: ['eslint-config-particle'],
3
- parserOptions: {
4
- sourceType: 'module'
5
- },
6
- env: {
7
- browser: true,
8
- commonjs: true,
9
- es6: true,
10
- node: true,
11
- mocha: true,
12
- worker: true,
13
- serviceworker: true
14
- },
15
- rules: {
16
- 'no-prototype-builtins': 'off',
17
- 'no-redeclare': 'off',
18
- camelcase: ['error', {
19
- properties: 'never',
20
- allow: ['redirect_uri']
21
- }]
22
- }
2
+ extends: ['eslint-config-particle'],
3
+ parserOptions: {
4
+ sourceType: 'module'
5
+ },
6
+ env: {
7
+ browser: true,
8
+ commonjs: true,
9
+ es6: true,
10
+ node: true,
11
+ mocha: true,
12
+ worker: true,
13
+ serviceworker: true
14
+ },
15
+ rules: {
16
+ 'no-prototype-builtins': 'off',
17
+ 'no-redeclare': 'off',
18
+ camelcase: ['error', {
19
+ properties: 'never',
20
+ allow: ['redirect_uri']
21
+ }],
22
+ 'no-mixed-spaces-and-tabs': 'error',
23
+ indent: ['error', 4]
24
+ }
23
25
  };
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # changelog
2
2
 
3
+ ## 10.4.0 - 19 December 2023
4
+
5
+ * Add `listLedgerInstanceVersions` function
6
+ * Add `getLedgerInstanceVersion` function
7
+
8
+ ## 10.3.1 - 6 December 2023
9
+
10
+ * Add `todayStats` query option to listLogicFunctions
11
+ * Add `scope`, `archived`, `page`, and `perPage` query options to listLedgers
12
+ * Add `page` and `perPage` query options to listLedgerInstances
13
+ * Add JSDocs for constructor
14
+ * Fix JSDocs across most functions in the library to be more accurate
15
+
3
16
  ## 10.3.0 - 7 November 2023
4
17
 
5
18
  * Add support for sandbox accounts on all logic/ledger APIs by allowing the omission of the `org` property
@@ -22,16 +22,16 @@ const auth = '<my-token>';
22
22
  const particle = new Particle({ baseUrl });
23
23
 
24
24
  particle.getEventStream({ deviceId: 'mine', auth }).then(stream => {
25
- console.log('event stream connected');
25
+ console.log('event stream connected');
26
26
 
27
- ['event', 'error', 'disconnect', 'reconnect', 'reconnect-success', 'reconnect-error'].forEach(eventName => {
28
- stream.on(eventName, (arg) => {
29
- console.log(eventName, arg);
30
- });
31
- });
27
+ ['event', 'error', 'disconnect', 'reconnect', 'reconnect-success', 'reconnect-error'].forEach(eventName => {
28
+ stream.on(eventName, (arg) => {
29
+ console.log(eventName, arg);
30
+ });
31
+ });
32
32
 
33
33
  }).catch(function (err) {
34
- console.log(err);
34
+ console.log(err);
35
35
  });
36
36
 
37
37
  </script>
@@ -16,19 +16,19 @@ const particle = new Particle({ baseUrl });
16
16
 
17
17
  /* eslint-disable no-console */
18
18
  particle.getEventStream({ deviceId: 'mine', auth })
19
- .then(stream => {
20
- console.log('event stream connected');
21
-
22
- ['event', 'error', 'disconnect', 'reconnect', 'reconnect-success', 'reconnect-error']
23
- .forEach(eventName => {
24
- stream.on(eventName, (arg) => {
25
- console.log(eventName, arg);
26
- });
27
- });
28
- })
29
- .catch((err) => {
30
- console.error(err);
31
- process.exit(1);
32
- });
19
+ .then(stream => {
20
+ console.log('event stream connected');
21
+
22
+ ['event', 'error', 'disconnect', 'reconnect', 'reconnect-success', 'reconnect-error']
23
+ .forEach(eventName => {
24
+ stream.on(eventName, (arg) => {
25
+ console.log(eventName, arg);
26
+ });
27
+ });
28
+ })
29
+ .catch((err) => {
30
+ console.error(err);
31
+ process.exit(1);
32
+ });
33
33
  /* eslint-enable no-console */
34
34