@digo-org/digo-api 1.0.22 → 1.0.24

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@digo-org/digo-api",
3
3
  "private": false,
4
- "version": "1.0.22",
4
+ "version": "1.0.24",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
7
7
  "types": "src/index.ts",
@@ -0,0 +1,6 @@
1
+ export const API_MESSAGES = {
2
+ setParameter: 'SET_PARAMETER',
3
+ updateInstances: 'UPDATE_INSTANCES',
4
+ };
5
+
6
+ export const KAKA = 'DIGO API';
package/src/digo-asset.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
+ import { API_MESSAGES } from 'src/constants';
2
3
  import { Instance, SingleParameterValue } from 'src/types';
3
4
 
4
5
  export abstract class DigoAsset {
@@ -34,7 +35,7 @@ export abstract class DigoAsset {
34
35
  if (!message) return;
35
36
 
36
37
  switch (message.command) {
37
- case 'SET_PARAMETER':{
38
+ case API_MESSAGES.setParameter:{
38
39
  const parameterId = message.parameterId;
39
40
  const value = message.value;
40
41
  const isGlobal = message.isGlobal;
@@ -51,7 +52,7 @@ export abstract class DigoAsset {
51
52
  break;
52
53
  }
53
54
 
54
- case 'UPDATE_INSTANCES':
55
+ case API_MESSAGES.updateInstances:
55
56
  this.instances = message.instances;
56
57
 
57
58
  if (this.onInstancesUpdated) this.onInstancesUpdated();
package/src/index.ts CHANGED
@@ -1,5 +1,5 @@
1
- export const KAKA = 'DIGO API';
2
-
3
1
  export * from '@digo-org/digo-api/src/digo-asset';
4
2
 
5
3
  export * from '@digo-org/digo-api/src/types';
4
+
5
+ export * from '@digo-org/digo-api/src/constants';