commandbar 1.6.4 → 1.6.5-alpha.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. package/build/commandbar-js/src/index.js +1 -1
  2. package/build/commandbar-js/src/init.d.ts +2 -0
  3. package/build/internal/src/client/AnalyticsEventTypes.d.ts +1 -1
  4. package/build/internal/src/client/CommandBarClientSDK.d.ts +40 -3
  5. package/build/internal/src/client/CommandBarSDK.d.ts +1 -1
  6. package/build/internal/src/client/EventHandler.d.ts +19 -1
  7. package/build/internal/src/client/SDKConfig.d.ts +4 -0
  8. package/build/internal/src/client/globals.d.ts +18 -0
  9. package/build/internal/src/middleware/CommandFromClientV.d.ts +11 -4
  10. package/build/internal/src/middleware/command.d.ts +2852 -0
  11. package/build/internal/src/middleware/commandCategory.d.ts +87 -0
  12. package/build/internal/src/middleware/context.d.ts +40 -0
  13. package/build/internal/src/middleware/environment.d.ts +11 -0
  14. package/build/internal/src/middleware/generics.d.ts +32 -0
  15. package/build/internal/src/middleware/guide.d.ts +37 -0
  16. package/build/internal/src/middleware/helpers/endUser.d.ts +10 -0
  17. package/build/internal/src/middleware/helpers/rules.d.ts +154 -3
  18. package/build/internal/src/middleware/historyEvent.d.ts +40 -0
  19. package/build/internal/src/middleware/network.d.ts +4 -0
  20. package/build/internal/src/middleware/organization.d.ts +589 -0
  21. package/build/internal/src/middleware/placeholder.d.ts +47 -0
  22. package/build/internal/src/middleware/profile.d.ts +11 -0
  23. package/build/internal/src/middleware/releases.d.ts +261 -0
  24. package/build/internal/src/middleware/skin.d.ts +66 -0
  25. package/build/internal/src/middleware/types.d.ts +359 -0
  26. package/build/internal/src/middleware/user.d.ts +12 -0
  27. package/build/internal/src/util/LocalStorage.d.ts +6 -0
  28. package/build/internal/src/util/Logger.d.ts +18 -0
  29. package/build/internal/src/util/dispatchCustomEvent.d.ts +2 -0
  30. package/package.json +2 -2
  31. package/src/init.ts +8 -1
  32. package/src/snippet.ts +1 -1
@@ -0,0 +1,6 @@
1
+ declare const LocalStorage: {
2
+ set: (label: string, value: string | boolean | number) => string | number | boolean;
3
+ get: (label: string, defaultValue: string | boolean | number) => string | number | boolean;
4
+ remove: (label: string) => void;
5
+ };
6
+ export default LocalStorage;
@@ -0,0 +1,18 @@
1
+ import Debug from 'debug';
2
+ declare const Logger: {
3
+ debug: Debug.Debugger;
4
+ log: Debug.Debugger;
5
+ info: Debug.Debugger;
6
+ warn: Debug.Debugger;
7
+ error: Debug.Debugger;
8
+ red: (...args: any[]) => void;
9
+ green: (...args: any[]) => void;
10
+ blue: (...args: any[]) => void;
11
+ orange: (...args: any[]) => void;
12
+ yellow: (...args: any[]) => void;
13
+ purple: (...args: any[]) => void;
14
+ black: (...args: any[]) => void;
15
+ portalsend: (...args: any[]) => void;
16
+ portalreceive: (...args: any[]) => void;
17
+ };
18
+ export default Logger;
@@ -0,0 +1,2 @@
1
+ export declare function dispatchCustomEvent<T>(eventType: string, detail: T, canBubble?: boolean, cancelable?: boolean): CustomEvent<T>;
2
+ export default dispatchCustomEvent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "commandbar",
3
- "version": "1.6.4",
3
+ "version": "1.6.5-alpha.1",
4
4
  "description": "Javascript Utility for CommandBar",
5
5
  "main": "build/commandbar-js/src/index.js",
6
6
  "types": "build/commandbar-js/src/index.d.ts",
@@ -23,6 +23,6 @@
23
23
  },
24
24
  "devDependencies": {},
25
25
  "peerDependencies": {
26
- "@sentry/react": "6.12.0"
26
+ "@sentry/react": "6.19.7"
27
27
  }
28
28
  }
package/src/init.ts CHANGED
@@ -3,11 +3,13 @@ import 'es6-object-assign/auto';
3
3
  import 'es6-symbol/implement';
4
4
  import { getProxySDK } from '../../internal/src/client/proxy';
5
5
  import { _configuration } from '../../internal/src/client/symbols';
6
+ import { IConfigEndpointResponse } from '@commandbar/internal/middleware/types';
6
7
 
7
8
  interface IInitOptions {
8
9
  debug?: boolean;
9
10
  environment?: string;
10
11
  version?: string;
12
+ config?: IConfigEndpointResponse;
11
13
  }
12
14
 
13
15
  const getSrc = (org: string) => {
@@ -72,7 +74,12 @@ const init = (org: string, opts: IInitOptions = DEFAULT_OPTS) => {
72
74
 
73
75
  config.debug && console.log('CommandBar init...', { environment: opts.environment, version: opts.version });
74
76
 
75
- getProxySDK()[_configuration] = { uuid: org, environment: opts.environment, version: opts.version };
77
+ getProxySDK()[_configuration] = {
78
+ uuid: org,
79
+ environment: opts.environment,
80
+ version: opts.version,
81
+ config: opts.config,
82
+ };
76
83
  loadLatest(org);
77
84
  };
78
85
 
package/src/snippet.ts CHANGED
@@ -42,7 +42,7 @@ export const snippet = (org: string) => {
42
42
  w.CommandBar,
43
43
  );
44
44
 
45
- const ASYNC_METHODS = ['addCommand', 'boot', 'getShortcuts'];
45
+ const ASYNC_METHODS = ['addCommand', 'boot'];
46
46
 
47
47
  const sdk = proxy;
48
48