commandbar 1.6.7 → 1.6.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. package/build/commandbar-js/src/index.d.ts +10 -0
  2. package/build/commandbar-js/src/index.js +1 -0
  3. package/build/commandbar-js/src/init.d.ts +21 -0
  4. package/build/commandbar-js/src/snippet.d.ts +1 -0
  5. package/build/internal/src/client/AddContextOptions.d.ts +108 -0
  6. package/build/internal/src/client/AnalyticsEventTypes.d.ts +1 -0
  7. package/build/internal/src/client/CommandBarClientSDK.d.ts +303 -0
  8. package/build/internal/src/client/CommandBarProxySDK.d.ts +48 -0
  9. package/build/internal/src/client/CommandBarSDK.d.ts +50 -0
  10. package/build/internal/src/client/EventHandler.d.ts +99 -0
  11. package/build/internal/src/client/SDKConfig.d.ts +13 -0
  12. package/build/internal/src/client/SentryReporter.d.ts +41 -0
  13. package/build/internal/src/client/globals.d.ts +18 -0
  14. package/build/internal/src/client/proxy.d.ts +15 -0
  15. package/build/internal/src/client/symbols.d.ts +32 -0
  16. package/build/internal/src/middleware/CommandFromClientV.d.ts +252 -0
  17. package/build/internal/src/middleware/ICommandFromClientType.d.ts +5 -0
  18. package/build/internal/src/middleware/IResourceSettings.d.ts +3 -0
  19. package/build/internal/src/middleware/OrganizationV.d.ts +120 -0
  20. package/build/internal/src/middleware/ResourceSettingsV.d.ts +57 -0
  21. package/build/internal/src/middleware/command.d.ts +5464 -0
  22. package/build/internal/src/middleware/commandCategory.d.ts +136 -0
  23. package/build/internal/src/middleware/confetti.d.ts +16 -0
  24. package/build/internal/src/middleware/context.d.ts +40 -0
  25. package/build/internal/src/middleware/detailPreview.d.ts +21 -0
  26. package/build/internal/src/middleware/environment.d.ts +11 -0
  27. package/build/internal/src/middleware/generics.d.ts +40 -0
  28. package/build/internal/src/middleware/guide.d.ts +37 -0
  29. package/build/internal/src/middleware/helpDocsIntegration.d.ts +66 -0
  30. package/build/internal/src/middleware/helpDocsSync.d.ts +42 -0
  31. package/build/internal/src/middleware/helpers/argument.d.ts +412 -0
  32. package/build/internal/src/middleware/helpers/commandTemplate.d.ts +191 -0
  33. package/build/internal/src/middleware/helpers/endUser.d.ts +10 -0
  34. package/build/internal/src/middleware/helpers/optionGroup.d.ts +2 -0
  35. package/build/internal/src/middleware/helpers/rules.d.ts +231 -0
  36. package/build/internal/src/middleware/historyEvent.d.ts +40 -0
  37. package/build/internal/src/middleware/network.d.ts +4 -0
  38. package/build/internal/src/middleware/organization.d.ts +710 -0
  39. package/build/internal/src/middleware/placeholder.d.ts +47 -0
  40. package/build/internal/src/middleware/profile.d.ts +11 -0
  41. package/build/internal/src/middleware/releases.d.ts +261 -0
  42. package/build/internal/src/middleware/skin.d.ts +66 -0
  43. package/build/internal/src/middleware/types.d.ts +425 -0
  44. package/build/internal/src/middleware/user.d.ts +12 -0
  45. package/build/internal/src/util/Disposable.d.ts +17 -0
  46. package/build/internal/src/util/LocalStorage.d.ts +6 -0
  47. package/build/internal/src/util/Logger.d.ts +18 -0
  48. package/build/internal/src/util/dispatchCustomEvent.d.ts +2 -0
  49. package/package.json +1 -1
  50. package/src/init.ts +1 -1
@@ -0,0 +1,99 @@
1
+ export interface AbandonedSearchEvent {
2
+ /** Event data passed for `abandoned_search` events (deadends). */
3
+ /** The id of the currently active command, if there is one. */
4
+ command?: number;
5
+ /** DEPRECATED. The text of the deadend. */
6
+ ['inputText[*]']: string;
7
+ /** The text of the deadend. */
8
+ inputText: string;
9
+ /** The context key of the currently active resource, if there is one. */
10
+ resource?: string;
11
+ /** The trigger for the deadend. */
12
+ type: 'Backspaced' | 'Closed with text' | 'Resetting search';
13
+ /** The number of {CommandOptions, ParameterOptions}, if there are any. */
14
+ results?: {
15
+ numCommands: number;
16
+ numRecords: number;
17
+ };
18
+ /** command_ids of previously executed commands in the session */
19
+ previousCommands?: string[];
20
+ }
21
+ export interface ClosedEvent {
22
+ /** Event data passed for `command_execution` events. */
23
+ /** The user's input text when the bar was closed. */
24
+ inputText: string;
25
+ /** True if this command was triggered by a shortcut. */
26
+ shortcut?: boolean;
27
+ }
28
+ export interface CommandExecutionEvent {
29
+ /** Event data passed for `command_execution` events. */
30
+ /** The category id of the command. Only provided if the command has a category. */
31
+ category?: number | null;
32
+ /**
33
+ * The unique id of the command. For commands defined via the Editor, the value will be a number. For programmatic
34
+ * commands, the `name` (string) provided will be used.
35
+ */
36
+ command: number | string | undefined;
37
+ /** The text of the command */
38
+ commandText: string;
39
+ /** The source of the command. */
40
+ source: string;
41
+ /** DEPRECATED. The text input.*/
42
+ ['inputText[*]']: string;
43
+ /** The text input.*/
44
+ inputText?: string;
45
+ /** True if this command was triggered by a shortcut. */
46
+ shortcut?: boolean;
47
+ /** Ranking order of the command option */
48
+ ranking?: number;
49
+ /** command_ids of previously executed commands in the session */
50
+ previousCommands?: string[];
51
+ /** Command types, as defined at: https://www.commandbar.com/docs/commands/types/overview */
52
+ commandType?: 'admin' | 'link' | 'script' | 'clickByXpath' | 'clickBySelector' | 'click' | 'callback' | 'builtin' | 'webhook' | 'request' | 'appcues';
53
+ }
54
+ export interface EndUserShortcutChangedEvent {
55
+ /** Event data passed for `command_execution` events. */
56
+ /** The category id of the command. Only provided if the command has a category. */
57
+ category?: number | null;
58
+ /**
59
+ * The unique id of the command. For commands defined via the Editor, the value will be a number. For programmatic
60
+ * commands, the `name` (string) provided will be used.
61
+ */
62
+ command: number | string | undefined;
63
+ /** The text of the command */
64
+ commandText: string;
65
+ /** The source of the command. */
66
+ source: string;
67
+ /** The updated shortcut. */
68
+ oldShortcut: string;
69
+ newShortcut: string;
70
+ defaultShortcut: string;
71
+ }
72
+ export interface CommandSuggestionEvent {
73
+ /** The text of the suggestion. */
74
+ text: string;
75
+ }
76
+ export interface OpenedEvent {
77
+ /** Event data passed for `command_execution` events. */
78
+ /**
79
+ * The entrypoint through which the bar was opened.
80
+ *
81
+ * * `launcher`: Click on the provided CommandBar launcher
82
+ * * `keyboard`: Cmd/Ctrl+K
83
+ * * `programmatic`: Call to `window.CommandBar.open()`. Clicks on the
84
+ * [commandbar-launcher](https://www.npmjs.com/package/commandbar-launcher) component register as programmatic
85
+ * opens.
86
+ */
87
+ trigger: 'launcher' | 'keyboard' | 'programmatic';
88
+ /** The placeholder showing when the user opened the bar. */
89
+ placeholder: string;
90
+ }
91
+ export declare type OpenedEventTrigger = OpenedEvent['trigger'];
92
+ export interface NoResultsForQueryEvent {
93
+ /** Event data passed for `no_results_for_query` event */
94
+ /** The user's input text when the no results state was reached. */
95
+ inputText: string;
96
+ }
97
+ export declare type EventData = AbandonedSearchEvent | ClosedEvent | CommandExecutionEvent | CommandSuggestionEvent | OpenedEvent | NoResultsForQueryEvent;
98
+ export declare type EventHandler = (eventName: EventType, eventData: EventData) => void;
99
+ export declare type EventType = 'abandoned_search' | 'command_suggestion' | 'command_execution' | 'opened' | 'closed' | 'no_results_for_query' | 'client_error' | 'shortcut_edited';
@@ -0,0 +1,13 @@
1
+ import { IConfigEndpointResponse } from '../middleware/types';
2
+ export interface SDKConfig {
3
+ api: string;
4
+ editor: string;
5
+ proxy: string;
6
+ session: string;
7
+ uuid: string;
8
+ foobarVersion?: string;
9
+ airgap: boolean;
10
+ environment?: string;
11
+ version?: string;
12
+ config?: IConfigEndpointResponse;
13
+ }
@@ -0,0 +1,41 @@
1
+ import { Hub } from '@sentry/react';
2
+ import { IOrganizationType } from '../middleware/OrganizationV';
3
+ import { PublicDisposable } from '../util/Disposable';
4
+ declare type HubInstance = InstanceType<typeof Hub>;
5
+ declare type ExtraData = Record<string, unknown>;
6
+ export interface UserScopeOptions {
7
+ configuration: {
8
+ uuid?: string;
9
+ api: string;
10
+ editor: string;
11
+ proxy: string;
12
+ session: string;
13
+ };
14
+ organization?: IOrganizationType;
15
+ organizationId: string | number;
16
+ organizationName?: string;
17
+ session: string;
18
+ userId?: string;
19
+ }
20
+ export declare abstract class SentryReporter implements PublicDisposable {
21
+ _disposed: boolean;
22
+ breadcrumb: HubInstance['addBreadcrumb'];
23
+ dispose(): void;
24
+ /**
25
+ * Report an error to Sentry. The first argument must either be a string or error object, and optionally an error
26
+ * object and extra data (in the form of an object) may be provided as well.
27
+ *
28
+ * If a string message is provided instead of an Error object a new Error will be generated. This will cause the
29
+ * stacktrace to begin at this function; for that reason it is **strongly** recommended to provide an error object
30
+ * so that the original stack trace can be preserved (as originalException).
31
+ */
32
+ abstract exception(message: string, err?: Error, extra?: ExtraData): void;
33
+ abstract exception(message: string, extra?: ExtraData): void;
34
+ abstract exception(err: Error, extra?: ExtraData): void;
35
+ /**
36
+ * Assigns various scope properties related to the currently active user and organization so that error events can
37
+ * be easily associated with them.
38
+ */
39
+ abstract setUserScope(opts: UserScopeOptions): void;
40
+ }
41
+ export {};
@@ -0,0 +1,18 @@
1
+ import { CommandBarClientSDK } from './CommandBarClientSDK';
2
+ import { CommandBarSDK } from './CommandBarSDK';
3
+ declare global {
4
+ interface Window {
5
+ CommandBar: CommandBarClientSDK;
6
+ }
7
+ }
8
+ export { initProxySDK, getProxySDK } from './proxy';
9
+ /**
10
+ * Returns the CommandBar global SDK.
11
+ * The SDK object might be a proxy instead if `initSDK` has not yet been called.
12
+ */
13
+ export declare function getSDK(): CommandBarSDK;
14
+ /**
15
+ * Returns the CommandBar global, coerced to match the client interface.
16
+ * The SDK object might be a proxy instead if `initSDK` has not yet been called.
17
+ */
18
+ export declare function getClientSDK(): CommandBarClientSDK;
@@ -0,0 +1,15 @@
1
+ import { CommandBarProxyGlobal } from './CommandBarProxySDK';
2
+ /**
3
+ * Returns the "pre-boot" proxied SDK object, creating it if necessary. This object might actually be a full SDK if it
4
+ * was already upgraded using `initSDK`. In either case, the returned object will _not_ itself be a proxy.
5
+ *
6
+ * The proxy SDK will only be created if one of the following hold:
7
+ * - window.CommandBar === undefined
8
+ * - window.CommandBar[_disposed] === true
9
+ * - window.CommandBar.disposed === true
10
+ *
11
+ * Otherwise the existing value of `window.CommandBar` is returned, whatever that may be.
12
+ */
13
+ export declare function getProxySDK(): CommandBarProxyGlobal;
14
+ /** Replaces `window.CommandBar` with a new Proxy SDK object. */
15
+ export declare function initProxySDK(): void;
@@ -0,0 +1,32 @@
1
+ export declare const _access: unique symbol;
2
+ export declare const _configuration: unique symbol;
3
+ export declare const _configure: unique symbol;
4
+ export declare const _configUser: unique symbol;
5
+ export declare const _dispatch: unique symbol;
6
+ export declare const _dispose: unique symbol;
7
+ export declare const _disposed: unique symbol;
8
+ export declare const _instanceAttributes: unique symbol;
9
+ export declare const _isProxy: unique symbol;
10
+ export declare const _loadEditor: unique symbol;
11
+ export declare const _orgConfig: unique symbol;
12
+ export declare const _perf: unique symbol;
13
+ export declare const _programmaticTheme: unique symbol;
14
+ export declare const _queue: unique symbol;
15
+ export declare const _reloadCommands: unique symbol;
16
+ export declare const _reloadOrganization: unique symbol;
17
+ export declare const _reloadPlaceholders: unique symbol;
18
+ export declare const _report: unique symbol;
19
+ export declare const _reporter: unique symbol;
20
+ export declare const _search: unique symbol;
21
+ export declare const _setDashboard: unique symbol;
22
+ export declare const _setPreviewMode: unique symbol;
23
+ export declare const _setTestMode: unique symbol;
24
+ export declare const _setEditorVisible: unique symbol;
25
+ export declare const _shareContextSettings: unique symbol;
26
+ export declare const _shareProgrammaticCommands: unique symbol;
27
+ export declare const _showGuide: unique symbol;
28
+ export declare const _showMessage: unique symbol;
29
+ export declare const _state: unique symbol;
30
+ export declare const _unwrap: unique symbol;
31
+ export declare const _user: unique symbol;
32
+ export declare const _userAttributes: unique symbol;
@@ -0,0 +1,252 @@
1
+ import * as t from 'io-ts';
2
+ export declare const CommandFromClientV: t.IntersectionC<[t.TypeC<{
3
+ name: t.StringC;
4
+ template: t.UnionC<[t.IntersectionC<[t.TypeC<{
5
+ type: t.LiteralC<"callback">;
6
+ value: t.StringC;
7
+ }>, t.IntersectionC<[t.TypeC<{}>, t.PartialC<{
8
+ commandType: t.UnionC<[t.LiteralC<"independent">, t.LiteralC<"object">, t.LiteralC<"help">]>;
9
+ object: t.StringC;
10
+ hoverTooltip: t.BooleanC;
11
+ operation: t.UnionC<[t.LiteralC<"router">, t.LiteralC<"self">, t.LiteralC<"blank">, t.UndefinedC]>;
12
+ }>]>]>, t.IntersectionC<[t.TypeC<{
13
+ type: t.LiteralC<"link">;
14
+ value: t.StringC;
15
+ }>, t.IntersectionC<[t.TypeC<{}>, t.PartialC<{
16
+ commandType: t.UnionC<[t.LiteralC<"independent">, t.LiteralC<"object">, t.LiteralC<"help">]>;
17
+ object: t.StringC;
18
+ hoverTooltip: t.BooleanC;
19
+ operation: t.UnionC<[t.LiteralC<"router">, t.LiteralC<"self">, t.LiteralC<"blank">, t.UndefinedC]>;
20
+ }>]>]>, t.IntersectionC<[t.TypeC<{
21
+ type: t.LiteralC<"webhook">;
22
+ value: t.StringC;
23
+ }>, t.IntersectionC<[t.TypeC<{}>, t.PartialC<{
24
+ commandType: t.UnionC<[t.LiteralC<"independent">, t.LiteralC<"object">, t.LiteralC<"help">]>;
25
+ object: t.StringC;
26
+ hoverTooltip: t.BooleanC;
27
+ operation: t.UnionC<[t.LiteralC<"router">, t.LiteralC<"self">, t.LiteralC<"blank">, t.UndefinedC]>;
28
+ }>]>]>, t.IntersectionC<[t.TypeC<{
29
+ type: t.UnionC<[t.LiteralC<"click">, t.LiteralC<"clickBySelector">, t.LiteralC<"clickByXpath">]>;
30
+ value: t.ArrayC<t.StringC>;
31
+ }>, t.IntersectionC<[t.TypeC<{}>, t.PartialC<{
32
+ commandType: t.UnionC<[t.LiteralC<"independent">, t.LiteralC<"object">, t.LiteralC<"help">]>;
33
+ object: t.StringC;
34
+ hoverTooltip: t.BooleanC;
35
+ operation: t.UnionC<[t.LiteralC<"router">, t.LiteralC<"self">, t.LiteralC<"blank">, t.UndefinedC]>;
36
+ }>]>]>, t.IntersectionC<[t.TypeC<{
37
+ type: t.LiteralC<"request">;
38
+ value: t.IntersectionC<[t.TypeC<{
39
+ method: t.UnionC<[t.LiteralC<"get">, t.LiteralC<"delete">, t.LiteralC<"head">, t.LiteralC<"options">, t.LiteralC<"post">, t.LiteralC<"put">, t.LiteralC<"patch">]>;
40
+ url: t.StringC;
41
+ }>, t.PartialC<{
42
+ headers: t.UnknownRecordC;
43
+ body: t.UnknownRecordC;
44
+ onSend: t.StringC;
45
+ onSuccess: t.StringC;
46
+ onError: t.StringC;
47
+ }>]>;
48
+ }>, t.IntersectionC<[t.TypeC<{}>, t.PartialC<{
49
+ commandType: t.UnionC<[t.LiteralC<"independent">, t.LiteralC<"object">, t.LiteralC<"help">]>;
50
+ object: t.StringC;
51
+ hoverTooltip: t.BooleanC;
52
+ operation: t.UnionC<[t.LiteralC<"router">, t.LiteralC<"self">, t.LiteralC<"blank">, t.UndefinedC]>;
53
+ }>]>]>, t.IntersectionC<[t.TypeC<{
54
+ type: t.LiteralC<"appcues">;
55
+ value: t.StringC;
56
+ }>, t.IntersectionC<[t.TypeC<{}>, t.PartialC<{
57
+ commandType: t.UnionC<[t.LiteralC<"independent">, t.LiteralC<"object">, t.LiteralC<"help">]>;
58
+ object: t.StringC;
59
+ hoverTooltip: t.BooleanC;
60
+ operation: t.UnionC<[t.LiteralC<"router">, t.LiteralC<"self">, t.LiteralC<"blank">, t.UndefinedC]>;
61
+ }>]>]>]>;
62
+ text: t.StringC;
63
+ }>, t.PartialC<{
64
+ shortcut_mac: t.ArrayC<t.StringC>;
65
+ shortcut_win: t.ArrayC<t.StringC>;
66
+ hotkey_mac: t.StringC;
67
+ hotkey_win: t.StringC;
68
+ tags: t.ArrayC<t.StringC>;
69
+ explanation: t.StringC;
70
+ sort_key: t.UnionC<[t.NumberC, t.NullC]>;
71
+ arguments: t.RecordC<t.StringC, t.UnionC<[t.IntersectionC<[t.TypeC<{
72
+ type: t.LiteralC<"context">;
73
+ value: t.StringC;
74
+ order_key: t.NumberC;
75
+ }>, t.PartialC<{
76
+ label: t.StringC;
77
+ chosen: t.UnionC<[t.StringC, t.NumberC]>;
78
+ selected: t.ArrayC<t.AnyC>;
79
+ input_type: t.StringC;
80
+ preselected_key: t.StringC;
81
+ label_field: t.StringC;
82
+ availability_condition: t.ArrayC<t.TypeC<{
83
+ field: t.StringC;
84
+ operator: t.UnionC<[t.LiteralC<"==">, t.LiteralC<"!=">, t.LiteralC<"isTruthy">, t.LiteralC<"isFalsy">]>;
85
+ value: t.UnionC<[t.StringC, t.UndefinedC]>;
86
+ }>>;
87
+ loaded: t.ArrayC<t.AnyC>;
88
+ allow_create: t.BooleanC;
89
+ allow_create_label: t.StringC;
90
+ show_in_record_action_list: t.BooleanC;
91
+ show_in_default_list: t.BooleanC;
92
+ }>]>, t.IntersectionC<[t.TypeC<{
93
+ type: t.LiteralC<"set">;
94
+ value: t.UnionC<[t.ArrayC<t.StringC>, t.ArrayC<t.NumberC>, t.ArrayC<t.UnknownRecordC>]>;
95
+ order_key: t.NumberC;
96
+ }>, t.PartialC<{
97
+ label: t.StringC;
98
+ chosen: t.UnionC<[t.StringC, t.NumberC]>;
99
+ selected: t.ArrayC<t.AnyC>;
100
+ input_type: t.StringC;
101
+ preselected_key: t.StringC;
102
+ label_field: t.StringC;
103
+ availability_condition: t.ArrayC<t.TypeC<{
104
+ field: t.StringC;
105
+ operator: t.UnionC<[t.LiteralC<"==">, t.LiteralC<"!=">, t.LiteralC<"isTruthy">, t.LiteralC<"isFalsy">]>;
106
+ value: t.UnionC<[t.StringC, t.UndefinedC]>;
107
+ }>>;
108
+ loaded: t.ArrayC<t.AnyC>;
109
+ allow_create: t.BooleanC;
110
+ allow_create_label: t.StringC;
111
+ }>]>, t.IntersectionC<[t.TypeC<{
112
+ type: t.LiteralC<"provided">;
113
+ value: t.UnionC<[t.LiteralC<"text">, t.LiteralC<"time">]>;
114
+ order_key: t.NumberC;
115
+ }>, t.PartialC<{
116
+ label: t.StringC;
117
+ chosen: t.UnionC<[t.StringC, t.NumberC]>;
118
+ selected: t.ArrayC<t.AnyC>;
119
+ input_type: t.StringC;
120
+ preselected_key: t.StringC;
121
+ label_field: t.StringC;
122
+ availability_condition: t.ArrayC<t.TypeC<{
123
+ field: t.StringC;
124
+ operator: t.UnionC<[t.LiteralC<"==">, t.LiteralC<"!=">, t.LiteralC<"isTruthy">, t.LiteralC<"isFalsy">]>;
125
+ value: t.UnionC<[t.StringC, t.UndefinedC]>;
126
+ }>>;
127
+ loaded: t.ArrayC<t.AnyC>;
128
+ dateTimeArgumentTypeId: t.NumberC;
129
+ allow_create: t.BooleanC;
130
+ allow_create_label: t.StringC;
131
+ }>]>, t.IntersectionC<[t.TypeC<{
132
+ type: t.LiteralC<"dependent">;
133
+ value: t.StringC;
134
+ order_key: t.NumberC;
135
+ }>, t.PartialC<{
136
+ label: t.StringC;
137
+ chosen: t.UnionC<[t.StringC, t.NumberC]>;
138
+ selected: t.ArrayC<t.AnyC>;
139
+ input_type: t.StringC;
140
+ preselected_key: t.StringC;
141
+ label_field: t.StringC;
142
+ availability_condition: t.ArrayC<t.TypeC<{
143
+ field: t.StringC;
144
+ operator: t.UnionC<[t.LiteralC<"==">, t.LiteralC<"!=">, t.LiteralC<"isTruthy">, t.LiteralC<"isFalsy">]>;
145
+ value: t.UnionC<[t.StringC, t.UndefinedC]>;
146
+ }>>;
147
+ loaded: t.ArrayC<t.AnyC>;
148
+ allow_create: t.BooleanC;
149
+ allow_create_label: t.StringC;
150
+ }>]>, t.IntersectionC<[t.TypeC<{
151
+ type: t.LiteralC<"function">;
152
+ value: t.StringC;
153
+ order_key: t.NumberC;
154
+ }>, t.PartialC<{
155
+ label: t.StringC;
156
+ chosen: t.UnionC<[t.StringC, t.NumberC]>;
157
+ selected: t.ArrayC<t.AnyC>;
158
+ input_type: t.StringC;
159
+ preselected_key: t.StringC;
160
+ label_field: t.StringC;
161
+ availability_condition: t.ArrayC<t.TypeC<{
162
+ field: t.StringC;
163
+ operator: t.UnionC<[t.LiteralC<"==">, t.LiteralC<"!=">, t.LiteralC<"isTruthy">, t.LiteralC<"isFalsy">]>;
164
+ value: t.UnionC<[t.StringC, t.UndefinedC]>;
165
+ }>>;
166
+ loaded: t.ArrayC<t.AnyC>;
167
+ allow_create: t.BooleanC;
168
+ allow_create_label: t.StringC;
169
+ }>]>]>>;
170
+ category: t.UnionC<[t.NumberC, t.StringC, t.NullC]>;
171
+ icon: t.UnionC<[t.StringC, t.NullC]>;
172
+ celebrate: t.UnionC<[t.BooleanC, t.PartialC<{
173
+ angle: t.NumberC;
174
+ spread: t.NumberC;
175
+ width: t.StringC;
176
+ height: t.StringC;
177
+ duration: t.NumberC;
178
+ dragFriction: t.NumberC;
179
+ stagger: t.NumberC;
180
+ startVelocity: t.NumberC;
181
+ elementCount: t.NumberC;
182
+ decay: t.NumberC;
183
+ colors: t.ArrayC<t.StringC>;
184
+ random: t.AnyC;
185
+ }>, t.NullC]>;
186
+ availability_rules: t.ArrayC<t.IntersectionC<[t.TypeC<{
187
+ type: t.UnionC<[t.LiteralC<"context">, t.LiteralC<"url">, t.LiteralC<"element">]>;
188
+ operator: t.KeyofC<{
189
+ includes: null;
190
+ endsWith: null;
191
+ startsWith: null;
192
+ is: null;
193
+ isTruthy: null;
194
+ isFalsy: null;
195
+ isNot: null;
196
+ isTrue: null;
197
+ isFalse: null;
198
+ doesNotInclude: null;
199
+ matchesRegex: null;
200
+ isGreaterThan: null;
201
+ isLessThan: null;
202
+ isDefined: null;
203
+ isNotDefined: null;
204
+ classnameOnPage: null;
205
+ idOnPage: null;
206
+ }>;
207
+ }>, t.PartialC<{
208
+ field: t.StringC;
209
+ value: t.StringC;
210
+ reason: t.StringC;
211
+ }>]>>;
212
+ recommend_rules: t.ArrayC<t.UnionC<[t.IntersectionC<[t.TypeC<{
213
+ type: t.LiteralC<"always">;
214
+ }>, t.PartialC<{
215
+ operator: t.UnionC<[t.UndefinedC, t.NullC]>;
216
+ field: t.UnionC<[t.UndefinedC, t.NullC]>;
217
+ value: t.UnionC<[t.UndefinedC, t.NullC]>;
218
+ reason: t.UnionC<[t.UndefinedC, t.NullC]>;
219
+ }>]>, t.IntersectionC<[t.TypeC<{
220
+ type: t.UnionC<[t.LiteralC<"context">, t.LiteralC<"url">, t.LiteralC<"element">]>;
221
+ operator: t.KeyofC<{
222
+ includes: null;
223
+ endsWith: null;
224
+ startsWith: null;
225
+ is: null;
226
+ isTruthy: null;
227
+ isFalsy: null;
228
+ isNot: null;
229
+ isTrue: null;
230
+ isFalse: null;
231
+ doesNotInclude: null;
232
+ matchesRegex: null;
233
+ isGreaterThan: null;
234
+ isLessThan: null;
235
+ isDefined: null;
236
+ isNotDefined: null;
237
+ classnameOnPage: null;
238
+ idOnPage: null;
239
+ }>;
240
+ }>, t.PartialC<{
241
+ field: t.StringC;
242
+ value: t.StringC;
243
+ reason: t.StringC;
244
+ }>]>]>>;
245
+ detail: t.UnionC<[t.StringC, t.TypeC<{
246
+ type: t.UnionC<[t.LiteralC<"plaintext">, t.LiteralC<"markdown">, t.LiteralC<"html">, t.LiteralC<"react">, t.LiteralC<"video">, t.NullC]>;
247
+ value: t.StringC;
248
+ }>, t.ArrayC<t.TypeC<{
249
+ type: t.UnionC<[t.LiteralC<"plaintext">, t.LiteralC<"markdown">, t.LiteralC<"html">, t.LiteralC<"react">, t.LiteralC<"video">, t.NullC]>;
250
+ value: t.StringC;
251
+ }>>]>;
252
+ }>]>;
@@ -0,0 +1,5 @@
1
+ import * as t from 'io-ts';
2
+ import { CommandFromClientV } from './CommandFromClientV';
3
+ import { ContextArgumentV } from './helpers/argument';
4
+ export declare type ICommandFromClientType = t.TypeOf<typeof CommandFromClientV>;
5
+ export declare type IContextArgument = t.TypeOf<typeof ContextArgumentV>;
@@ -0,0 +1,3 @@
1
+ import * as t from 'io-ts';
2
+ import { ResourceSettingsV } from './ResourceSettingsV';
3
+ export declare type IResourceSettings = t.TypeOf<typeof ResourceSettingsV>;
@@ -0,0 +1,120 @@
1
+ import * as t from 'io-ts';
2
+ declare const OrganizationAdditionalV: t.TypeC<{
3
+ launcher_type: t.UnionC<[t.LiteralC<"minimal">, t.LiteralC<"alternate">, t.LiteralC<"prompt">, t.LiteralC<"none">]>;
4
+ launcher_position: t.UnionC<[t.LiteralC<"topRight">, t.LiteralC<"topLeft">, t.LiteralC<"bottomRight">, t.LiteralC<"bottomLeft">]>;
5
+ show_launcher_recommendations: t.BooleanC;
6
+ recommendations_type: t.UnionC<[t.LiteralC<"None">, t.LiteralC<"Custom">, t.LiteralC<"Algorithm">]>;
7
+ launcher_offset_x: t.NumberC;
8
+ launcher_offset_y: t.NumberC;
9
+ theme: t.ObjectC;
10
+ icon: t.StringC;
11
+ icon_suggest: t.StringC;
12
+ icon_tutorial: t.StringC;
13
+ icon_go_forward: t.StringC;
14
+ resource_options: t.RecordC<t.StringC, t.PartialC<{
15
+ name: t.StringC;
16
+ search: t.BooleanC;
17
+ label_field: t.StringC;
18
+ useCategory: t.BooleanC;
19
+ search_fields: t.ArrayC<t.UnionC<[t.StringC, t.TypeC<{
20
+ key: t.StringC;
21
+ label: t.StringC;
22
+ }>]>>;
23
+ auto_execute: t.BooleanC;
24
+ unfurl: t.BooleanC;
25
+ description_field: t.StringC;
26
+ icon: t.StringC;
27
+ sort_key: t.NumberC;
28
+ max_options_count: t.UnionC<[t.NumberC, t.NullC]>;
29
+ sortFunction: t.AnyC;
30
+ default_command_id: t.UnionC<[t.NumberC, t.StringC, t.UndefinedC]>;
31
+ render_as: t.UnionC<[t.LiteralC<"list">, t.LiteralC<"grid">]>;
32
+ showResources: t.BooleanC;
33
+ show_with_no_results: t.BooleanC;
34
+ search_tab_enabled: t.BooleanC;
35
+ search_tab_name: t.UnionC<[t.StringC, t.NullC]>;
36
+ search_tab_instruction: t.UnionC<[t.StringC, t.NullC]>;
37
+ setting_pin_to_bottom: t.BooleanC;
38
+ track_recents: t.BooleanC;
39
+ }>>;
40
+ should_show_onboarding: t.BooleanC;
41
+ last_snippet_request: t.UnionC<[t.StringC, t.NullC]>;
42
+ last_snippet_request_in_production: t.UnionC<[t.StringC, t.NullC]>;
43
+ branding: t.StringC;
44
+ custom_call_to_action: t.StringC;
45
+ search_fuzzy_threshold: t.UnionC<[t.NumberC, t.NullC]>;
46
+ show_skin_editor: t.BooleanC;
47
+ allow_event_handlers: t.BooleanC;
48
+ in_bar_feedback: t.BooleanC;
49
+ summon_hotkey_override: t.UnionC<[t.StringC, t.NullC]>;
50
+ end_user_hotkeys: t.UnionC<[t.UndefinedC, t.BooleanC]>;
51
+ end_user_shortcuts_enabled: t.BooleanC;
52
+ end_user_recents_enabled: t.BooleanC;
53
+ releases_available: t.BooleanC;
54
+ releases_enabled: t.BooleanC;
55
+ fallback_commands: t.ArrayC<t.NumberC>;
56
+ tab_direction: t.UnionC<[t.LiteralC<"horizontal">, t.LiteralC<"vertical">]>;
57
+ }>;
58
+ export declare const defaults: t.TypeOf<typeof OrganizationAdditionalV>;
59
+ export declare const OrganizationV: t.IntersectionC<[t.IntersectionC<[t.TypeC<{
60
+ id: t.UnionC<[t.NumberC, t.StringC]>;
61
+ name: t.StringC;
62
+ created: t.StringC;
63
+ }>, t.PartialC<{}>]>, t.TypeC<{
64
+ launcher_type: t.UnionC<[t.LiteralC<"minimal">, t.LiteralC<"alternate">, t.LiteralC<"prompt">, t.LiteralC<"none">]>;
65
+ launcher_position: t.UnionC<[t.LiteralC<"topRight">, t.LiteralC<"topLeft">, t.LiteralC<"bottomRight">, t.LiteralC<"bottomLeft">]>;
66
+ show_launcher_recommendations: t.BooleanC;
67
+ recommendations_type: t.UnionC<[t.LiteralC<"None">, t.LiteralC<"Custom">, t.LiteralC<"Algorithm">]>;
68
+ launcher_offset_x: t.NumberC;
69
+ launcher_offset_y: t.NumberC;
70
+ theme: t.ObjectC;
71
+ icon: t.StringC;
72
+ icon_suggest: t.StringC;
73
+ icon_tutorial: t.StringC;
74
+ icon_go_forward: t.StringC;
75
+ resource_options: t.RecordC<t.StringC, t.PartialC<{
76
+ name: t.StringC;
77
+ search: t.BooleanC;
78
+ label_field: t.StringC;
79
+ useCategory: t.BooleanC;
80
+ search_fields: t.ArrayC<t.UnionC<[t.StringC, t.TypeC<{
81
+ key: t.StringC;
82
+ label: t.StringC;
83
+ }>]>>;
84
+ auto_execute: t.BooleanC;
85
+ unfurl: t.BooleanC;
86
+ description_field: t.StringC;
87
+ icon: t.StringC;
88
+ sort_key: t.NumberC;
89
+ max_options_count: t.UnionC<[t.NumberC, t.NullC]>;
90
+ sortFunction: t.AnyC;
91
+ default_command_id: t.UnionC<[t.NumberC, t.StringC, t.UndefinedC]>;
92
+ render_as: t.UnionC<[t.LiteralC<"list">, t.LiteralC<"grid">]>;
93
+ showResources: t.BooleanC;
94
+ show_with_no_results: t.BooleanC;
95
+ search_tab_enabled: t.BooleanC;
96
+ search_tab_name: t.UnionC<[t.StringC, t.NullC]>;
97
+ search_tab_instruction: t.UnionC<[t.StringC, t.NullC]>;
98
+ setting_pin_to_bottom: t.BooleanC;
99
+ track_recents: t.BooleanC;
100
+ }>>;
101
+ should_show_onboarding: t.BooleanC;
102
+ last_snippet_request: t.UnionC<[t.StringC, t.NullC]>;
103
+ last_snippet_request_in_production: t.UnionC<[t.StringC, t.NullC]>;
104
+ branding: t.StringC;
105
+ custom_call_to_action: t.StringC;
106
+ search_fuzzy_threshold: t.UnionC<[t.NumberC, t.NullC]>;
107
+ show_skin_editor: t.BooleanC;
108
+ allow_event_handlers: t.BooleanC;
109
+ in_bar_feedback: t.BooleanC;
110
+ summon_hotkey_override: t.UnionC<[t.StringC, t.NullC]>;
111
+ end_user_hotkeys: t.UnionC<[t.UndefinedC, t.BooleanC]>;
112
+ end_user_shortcuts_enabled: t.BooleanC;
113
+ end_user_recents_enabled: t.BooleanC;
114
+ releases_available: t.BooleanC;
115
+ releases_enabled: t.BooleanC;
116
+ fallback_commands: t.ArrayC<t.NumberC>;
117
+ tab_direction: t.UnionC<[t.LiteralC<"horizontal">, t.LiteralC<"vertical">]>;
118
+ }>]>;
119
+ export declare type IOrganizationType = t.TypeOf<typeof OrganizationV>;
120
+ export {};
@@ -0,0 +1,57 @@
1
+ import * as t from 'io-ts';
2
+ export declare const SearchFieldConfigV: t.TypeC<{
3
+ key: t.StringC;
4
+ label: t.StringC;
5
+ }>;
6
+ export declare const ResourceSettingsV: t.PartialC<{
7
+ name: t.StringC;
8
+ search: t.BooleanC;
9
+ label_field: t.StringC;
10
+ useCategory: t.BooleanC;
11
+ search_fields: t.ArrayC<t.UnionC<[t.StringC, t.TypeC<{
12
+ key: t.StringC;
13
+ label: t.StringC;
14
+ }>]>>;
15
+ auto_execute: t.BooleanC;
16
+ unfurl: t.BooleanC;
17
+ description_field: t.StringC;
18
+ icon: t.StringC;
19
+ sort_key: t.NumberC;
20
+ max_options_count: t.UnionC<[t.NumberC, t.NullC]>;
21
+ sortFunction: t.AnyC;
22
+ default_command_id: t.UnionC<[t.NumberC, t.StringC, t.UndefinedC]>;
23
+ render_as: t.UnionC<[t.LiteralC<"list">, t.LiteralC<"grid">]>;
24
+ showResources: t.BooleanC;
25
+ show_with_no_results: t.BooleanC;
26
+ search_tab_enabled: t.BooleanC;
27
+ search_tab_name: t.UnionC<[t.StringC, t.NullC]>;
28
+ search_tab_instruction: t.UnionC<[t.StringC, t.NullC]>;
29
+ setting_pin_to_bottom: t.BooleanC;
30
+ track_recents: t.BooleanC;
31
+ }>;
32
+ export declare const ResourceSettingsByContextKeyV: t.RecordC<t.StringC, t.PartialC<{
33
+ name: t.StringC;
34
+ search: t.BooleanC;
35
+ label_field: t.StringC;
36
+ useCategory: t.BooleanC;
37
+ search_fields: t.ArrayC<t.UnionC<[t.StringC, t.TypeC<{
38
+ key: t.StringC;
39
+ label: t.StringC;
40
+ }>]>>;
41
+ auto_execute: t.BooleanC;
42
+ unfurl: t.BooleanC;
43
+ description_field: t.StringC;
44
+ icon: t.StringC;
45
+ sort_key: t.NumberC;
46
+ max_options_count: t.UnionC<[t.NumberC, t.NullC]>;
47
+ sortFunction: t.AnyC;
48
+ default_command_id: t.UnionC<[t.NumberC, t.StringC, t.UndefinedC]>;
49
+ render_as: t.UnionC<[t.LiteralC<"list">, t.LiteralC<"grid">]>;
50
+ showResources: t.BooleanC;
51
+ show_with_no_results: t.BooleanC;
52
+ search_tab_enabled: t.BooleanC;
53
+ search_tab_name: t.UnionC<[t.StringC, t.NullC]>;
54
+ search_tab_instruction: t.UnionC<[t.StringC, t.NullC]>;
55
+ setting_pin_to_bottom: t.BooleanC;
56
+ track_recents: t.BooleanC;
57
+ }>>;