commandbar 1.6.3 → 1.6.6
Sign up to get free protection for your applications and to get access to all the features.
- package/build/commandbar-js/src/index.js +1 -1
- package/build/commandbar-js/src/init.d.ts +3 -0
- package/build/internal/src/client/{Reporting.d.ts → AnalyticsEventTypes.d.ts} +1 -1
- package/build/internal/src/client/CommandBarClientSDK.d.ts +44 -6
- package/build/internal/src/client/CommandBarSDK.d.ts +2 -2
- package/build/internal/src/client/EventHandler.d.ts +19 -1
- package/build/internal/src/client/SDKConfig.d.ts +5 -0
- package/build/internal/src/client/globals.d.ts +18 -0
- package/build/internal/src/middleware/CommandFromClientV.d.ts +11 -4
- package/build/internal/src/middleware/OrganizationV.d.ts +6 -0
- package/build/internal/src/middleware/ResourceSettingsV.d.ts +6 -0
- package/build/internal/src/middleware/command.d.ts +2852 -0
- package/build/internal/src/middleware/commandCategory.d.ts +87 -0
- package/build/internal/src/middleware/context.d.ts +40 -0
- package/build/internal/src/middleware/environment.d.ts +11 -0
- package/build/internal/src/middleware/generics.d.ts +32 -0
- package/build/internal/src/middleware/guide.d.ts +37 -0
- package/build/internal/src/middleware/helpers/endUser.d.ts +10 -0
- package/build/internal/src/middleware/helpers/rules.d.ts +154 -3
- package/build/internal/src/middleware/historyEvent.d.ts +40 -0
- package/build/internal/src/middleware/network.d.ts +4 -0
- package/build/internal/src/middleware/organization.d.ts +589 -0
- package/build/internal/src/middleware/placeholder.d.ts +47 -0
- package/build/internal/src/middleware/profile.d.ts +11 -0
- package/build/internal/src/middleware/releases.d.ts +261 -0
- package/build/internal/src/middleware/skin.d.ts +66 -0
- package/build/internal/src/middleware/types.d.ts +359 -0
- package/build/internal/src/middleware/user.d.ts +12 -0
- package/build/internal/src/util/LocalStorage.d.ts +6 -0
- package/build/internal/src/util/Logger.d.ts +18 -0
- package/build/internal/src/util/dispatchCustomEvent.d.ts +2 -0
- package/package.json +2 -2
- package/src/init.ts +10 -2
- package/src/snippet.ts +1 -1
@@ -0,0 +1,261 @@
|
|
1
|
+
import * as t from 'io-ts';
|
2
|
+
export { ResourceSettingsV, ResourceSettingsByContextKeyV } from './ResourceSettingsV';
|
3
|
+
export { OrganizationV } from './OrganizationV';
|
4
|
+
export declare const ReleaseV: t.TypeC<{
|
5
|
+
created_by: t.StringC;
|
6
|
+
created: t.StringC;
|
7
|
+
history_event: t.IntersectionC<[t.TypeC<{
|
8
|
+
id: t.NumberC;
|
9
|
+
organization: t.StringC;
|
10
|
+
changed_by: t.StringC;
|
11
|
+
description: t.StringC;
|
12
|
+
created: t.StringC;
|
13
|
+
sha1: t.StringC;
|
14
|
+
version_num: t.NumberC;
|
15
|
+
}>, t.PartialC<{}>]>;
|
16
|
+
id: t.NumberC;
|
17
|
+
notes: t.StringC;
|
18
|
+
tags: t.ArrayC<t.StringC>;
|
19
|
+
}>;
|
20
|
+
export declare const ReleaseStepV: t.TypeC<{
|
21
|
+
created: t.StringC;
|
22
|
+
created_by: t.StringC;
|
23
|
+
current: t.UnionC<[t.BooleanC, t.NullC]>;
|
24
|
+
env: t.StringC;
|
25
|
+
id: t.NumberC;
|
26
|
+
next_env: t.UnionC<[t.NullC, t.StringC]>;
|
27
|
+
release: t.TypeC<{
|
28
|
+
created_by: t.StringC;
|
29
|
+
created: t.StringC;
|
30
|
+
history_event: t.IntersectionC<[t.TypeC<{
|
31
|
+
id: t.NumberC;
|
32
|
+
organization: t.StringC;
|
33
|
+
changed_by: t.StringC;
|
34
|
+
description: t.StringC;
|
35
|
+
created: t.StringC;
|
36
|
+
sha1: t.StringC;
|
37
|
+
version_num: t.NumberC;
|
38
|
+
}>, t.PartialC<{}>]>;
|
39
|
+
id: t.NumberC;
|
40
|
+
notes: t.StringC;
|
41
|
+
tags: t.ArrayC<t.StringC>;
|
42
|
+
}>;
|
43
|
+
}>;
|
44
|
+
export declare const EnvReleaseInfoV: t.IntersectionC<[t.TypeC<{
|
45
|
+
environment: t.StringC;
|
46
|
+
}>, t.PartialC<{
|
47
|
+
release_step: t.TypeC<{
|
48
|
+
created: t.StringC;
|
49
|
+
created_by: t.StringC;
|
50
|
+
current: t.UnionC<[t.BooleanC, t.NullC]>;
|
51
|
+
env: t.StringC;
|
52
|
+
id: t.NumberC;
|
53
|
+
next_env: t.UnionC<[t.NullC, t.StringC]>;
|
54
|
+
release: t.TypeC<{
|
55
|
+
created_by: t.StringC;
|
56
|
+
created: t.StringC;
|
57
|
+
history_event: t.IntersectionC<[t.TypeC<{
|
58
|
+
id: t.NumberC;
|
59
|
+
organization: t.StringC;
|
60
|
+
changed_by: t.StringC;
|
61
|
+
description: t.StringC;
|
62
|
+
created: t.StringC;
|
63
|
+
sha1: t.StringC;
|
64
|
+
version_num: t.NumberC;
|
65
|
+
}>, t.PartialC<{}>]>;
|
66
|
+
id: t.NumberC;
|
67
|
+
notes: t.StringC;
|
68
|
+
tags: t.ArrayC<t.StringC>;
|
69
|
+
}>;
|
70
|
+
}>;
|
71
|
+
release: t.TypeC<{
|
72
|
+
created_by: t.StringC;
|
73
|
+
created: t.StringC;
|
74
|
+
history_event: t.IntersectionC<[t.TypeC<{
|
75
|
+
id: t.NumberC;
|
76
|
+
organization: t.StringC;
|
77
|
+
changed_by: t.StringC;
|
78
|
+
description: t.StringC;
|
79
|
+
created: t.StringC;
|
80
|
+
sha1: t.StringC;
|
81
|
+
version_num: t.NumberC;
|
82
|
+
}>, t.PartialC<{}>]>;
|
83
|
+
id: t.NumberC;
|
84
|
+
notes: t.StringC;
|
85
|
+
tags: t.ArrayC<t.StringC>;
|
86
|
+
}>;
|
87
|
+
}>]>;
|
88
|
+
export declare class Releases {
|
89
|
+
static readView: (params?: Record<string, string> | undefined, callbacks?: {
|
90
|
+
onSuccess?: (() => void) | undefined;
|
91
|
+
onError?: ((err: string) => void) | undefined;
|
92
|
+
} | undefined) => Promise<{
|
93
|
+
environments: ({
|
94
|
+
environment: string;
|
95
|
+
} & {
|
96
|
+
release_step?: {
|
97
|
+
created: string;
|
98
|
+
created_by: string;
|
99
|
+
current: boolean | null;
|
100
|
+
env: string;
|
101
|
+
id: number;
|
102
|
+
next_env: string | null;
|
103
|
+
release: {
|
104
|
+
created_by: string;
|
105
|
+
created: string;
|
106
|
+
history_event: {
|
107
|
+
id: number;
|
108
|
+
organization: string;
|
109
|
+
changed_by: string;
|
110
|
+
description: string;
|
111
|
+
created: string;
|
112
|
+
sha1: string;
|
113
|
+
version_num: number;
|
114
|
+
} & {};
|
115
|
+
id: number;
|
116
|
+
notes: string;
|
117
|
+
tags: string[];
|
118
|
+
};
|
119
|
+
} | undefined;
|
120
|
+
release?: {
|
121
|
+
created_by: string;
|
122
|
+
created: string;
|
123
|
+
history_event: {
|
124
|
+
id: number;
|
125
|
+
organization: string;
|
126
|
+
changed_by: string;
|
127
|
+
description: string;
|
128
|
+
created: string;
|
129
|
+
sha1: string;
|
130
|
+
version_num: number;
|
131
|
+
} & {};
|
132
|
+
id: number;
|
133
|
+
notes: string;
|
134
|
+
tags: string[];
|
135
|
+
} | undefined;
|
136
|
+
})[];
|
137
|
+
latest_history_event: ({
|
138
|
+
id: number;
|
139
|
+
organization: string;
|
140
|
+
changed_by: string;
|
141
|
+
description: string;
|
142
|
+
created: string;
|
143
|
+
sha1: string;
|
144
|
+
version_num: number;
|
145
|
+
} & {}) | null;
|
146
|
+
latest_release: {
|
147
|
+
created_by: string;
|
148
|
+
created: string;
|
149
|
+
history_event: {
|
150
|
+
id: number;
|
151
|
+
organization: string;
|
152
|
+
changed_by: string;
|
153
|
+
description: string;
|
154
|
+
created: string;
|
155
|
+
sha1: string;
|
156
|
+
version_num: number;
|
157
|
+
} & {};
|
158
|
+
id: number;
|
159
|
+
notes: string;
|
160
|
+
tags: string[];
|
161
|
+
} | null;
|
162
|
+
}>;
|
163
|
+
static createRelease: (historyEventId: number, notes: string, tags: string[]) => Promise<{
|
164
|
+
created_by: string;
|
165
|
+
created: string;
|
166
|
+
history_event: {
|
167
|
+
id: number;
|
168
|
+
organization: string;
|
169
|
+
changed_by: string;
|
170
|
+
description: string;
|
171
|
+
created: string;
|
172
|
+
sha1: string;
|
173
|
+
version_num: number;
|
174
|
+
} & {};
|
175
|
+
id: number;
|
176
|
+
notes: string;
|
177
|
+
tags: string[];
|
178
|
+
}>;
|
179
|
+
static readReleaseStepsForEnv: (env: string) => Promise<{
|
180
|
+
created: string;
|
181
|
+
created_by: string;
|
182
|
+
current: boolean | null;
|
183
|
+
env: string;
|
184
|
+
id: number;
|
185
|
+
next_env: string | null;
|
186
|
+
release: {
|
187
|
+
created_by: string;
|
188
|
+
created: string;
|
189
|
+
history_event: {
|
190
|
+
id: number;
|
191
|
+
organization: string;
|
192
|
+
changed_by: string;
|
193
|
+
description: string;
|
194
|
+
created: string;
|
195
|
+
sha1: string;
|
196
|
+
version_num: number;
|
197
|
+
} & {};
|
198
|
+
id: number;
|
199
|
+
notes: string;
|
200
|
+
tags: string[];
|
201
|
+
};
|
202
|
+
}[]>;
|
203
|
+
static rollback: (releaseStepId: number) => Promise<{
|
204
|
+
created: string;
|
205
|
+
created_by: string;
|
206
|
+
current: boolean | null;
|
207
|
+
env: string;
|
208
|
+
id: number;
|
209
|
+
next_env: string | null;
|
210
|
+
release: {
|
211
|
+
created_by: string;
|
212
|
+
created: string;
|
213
|
+
history_event: {
|
214
|
+
id: number;
|
215
|
+
organization: string;
|
216
|
+
changed_by: string;
|
217
|
+
description: string;
|
218
|
+
created: string;
|
219
|
+
sha1: string;
|
220
|
+
version_num: number;
|
221
|
+
} & {};
|
222
|
+
id: number;
|
223
|
+
notes: string;
|
224
|
+
tags: string[];
|
225
|
+
};
|
226
|
+
}>;
|
227
|
+
static readDiff: (fromId: string, toId: string) => Promise<any>;
|
228
|
+
static promoteReleaseStep: (releaseStepId: number) => Promise<any>;
|
229
|
+
static promoteReleaseToFirstEnv: (releaseId: number) => Promise<{
|
230
|
+
created_by: string;
|
231
|
+
created: string;
|
232
|
+
history_event: {
|
233
|
+
id: number;
|
234
|
+
organization: string;
|
235
|
+
changed_by: string;
|
236
|
+
description: string;
|
237
|
+
created: string;
|
238
|
+
sha1: string;
|
239
|
+
version_num: number;
|
240
|
+
} & {};
|
241
|
+
id: number;
|
242
|
+
notes: string;
|
243
|
+
tags: string[];
|
244
|
+
}>;
|
245
|
+
static listReleases: (onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<{
|
246
|
+
created_by: string;
|
247
|
+
created: string;
|
248
|
+
history_event: {
|
249
|
+
id: number;
|
250
|
+
organization: string;
|
251
|
+
changed_by: string;
|
252
|
+
description: string;
|
253
|
+
created: string;
|
254
|
+
sha1: string;
|
255
|
+
version_num: number;
|
256
|
+
} & {};
|
257
|
+
id: number;
|
258
|
+
notes: string;
|
259
|
+
tags: string[];
|
260
|
+
}[]>;
|
261
|
+
}
|
@@ -0,0 +1,66 @@
|
|
1
|
+
import * as t from 'io-ts';
|
2
|
+
export declare const SkinV: t.IntersectionC<[t.TypeC<{
|
3
|
+
id: t.StringC;
|
4
|
+
slug: t.StringC;
|
5
|
+
name: t.StringC;
|
6
|
+
default: t.BooleanC;
|
7
|
+
skin: t.AnyC;
|
8
|
+
organization: t.StringC;
|
9
|
+
}>, t.PartialC<{
|
10
|
+
logo: t.UnionC<[t.StringC, t.NullC]>;
|
11
|
+
}>]>;
|
12
|
+
export declare class Skin {
|
13
|
+
static list: (onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<({
|
14
|
+
id: string;
|
15
|
+
slug: string;
|
16
|
+
name: string;
|
17
|
+
default: boolean;
|
18
|
+
skin: any;
|
19
|
+
organization: string;
|
20
|
+
} & {
|
21
|
+
logo?: string | null | undefined;
|
22
|
+
})[]>;
|
23
|
+
static read: (arg0: string, params?: Record<string, string> | undefined, callbacks?: {
|
24
|
+
onSuccess?: (() => void) | undefined;
|
25
|
+
onError?: ((err: string) => void) | undefined;
|
26
|
+
} | undefined) => Promise<{
|
27
|
+
id: string;
|
28
|
+
slug: string;
|
29
|
+
name: string;
|
30
|
+
default: boolean;
|
31
|
+
skin: any;
|
32
|
+
organization: string;
|
33
|
+
} & {
|
34
|
+
logo?: string | null | undefined;
|
35
|
+
}>;
|
36
|
+
static update: (object: {
|
37
|
+
id: string;
|
38
|
+
slug: string;
|
39
|
+
name: string;
|
40
|
+
default: boolean;
|
41
|
+
skin: any;
|
42
|
+
organization: string;
|
43
|
+
} & {
|
44
|
+
logo?: string | null | undefined;
|
45
|
+
}, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<{
|
46
|
+
id: string;
|
47
|
+
slug: string;
|
48
|
+
name: string;
|
49
|
+
default: boolean;
|
50
|
+
skin: any;
|
51
|
+
organization: string;
|
52
|
+
} & {
|
53
|
+
logo?: string | null | undefined;
|
54
|
+
}>;
|
55
|
+
static create: (object: {}, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<{
|
56
|
+
id: string;
|
57
|
+
slug: string;
|
58
|
+
name: string;
|
59
|
+
default: boolean;
|
60
|
+
skin: any;
|
61
|
+
organization: string;
|
62
|
+
} & {
|
63
|
+
logo?: string | null | undefined;
|
64
|
+
}>;
|
65
|
+
static delete: (id: string | number, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<void>;
|
66
|
+
}
|
@@ -0,0 +1,359 @@
|
|
1
|
+
/*******************************************************************************/
|
2
|
+
import * as t from 'io-ts';
|
3
|
+
import { CommandV, EditorCommandV } from './command';
|
4
|
+
import { ArgumentMapV, ArgumentTypeV, ConditionV, ConditionOperatorV, StepArgumentTypeV, ContextArgumentV, SetArgumentV, DynamicArgumentV, DependentArgumentV, FunctionArgumentV } from './helpers/argument';
|
5
|
+
import { TemplateV, TemplateOptionsV } from './helpers/commandTemplate';
|
6
|
+
import { CommandCategoryV } from './commandCategory';
|
7
|
+
import { OrganizationStatusV, KeyEventV, ResourceSettingsByContextKeyV, InternalSettingsV, OrganizationSettingsV } from './organization';
|
8
|
+
import { UserV } from './user';
|
9
|
+
import { ContextV } from './context';
|
10
|
+
import { GuideV } from './guide';
|
11
|
+
import { HistoryEventV } from './historyEvent';
|
12
|
+
import { EndUserV } from './helpers/endUser';
|
13
|
+
import { SkinV } from './skin';
|
14
|
+
import { ProfileV } from './profile';
|
15
|
+
import { PlaceholderV } from './placeholder';
|
16
|
+
import { EnvReleaseInfoV, ReleaseStepV, ReleaseV } from './releases';
|
17
|
+
import { EnvironmentV } from './environment';
|
18
|
+
/*******************************************************************************/
|
19
|
+
export declare type IContextType = t.TypeOf<typeof ContextV>;
|
20
|
+
export declare type IUserType = t.TypeOf<typeof UserV>;
|
21
|
+
export declare type ICommandType = t.TypeOf<typeof CommandV>;
|
22
|
+
export declare type IEditorCommandType = t.TypeOf<typeof EditorCommandV>;
|
23
|
+
export type { ICommandFromClientType } from './ICommandFromClientType';
|
24
|
+
export declare type ICommandCategoryType = t.TypeOf<typeof CommandCategoryV>;
|
25
|
+
export declare type IGuideType = t.TypeOf<typeof GuideV> & {
|
26
|
+
preview?: boolean;
|
27
|
+
};
|
28
|
+
export declare type IHistoryEventType = t.TypeOf<typeof HistoryEventV>;
|
29
|
+
export type { IOrganizationType } from './OrganizationV';
|
30
|
+
export declare type IOrganizationStatusType = t.TypeOf<typeof OrganizationStatusV>;
|
31
|
+
export declare type IInternalSettingsType = t.TypeOf<typeof InternalSettingsV>;
|
32
|
+
export declare type ISkinType = t.TypeOf<typeof SkinV>;
|
33
|
+
export declare type IProfileType = t.TypeOf<typeof ProfileV>;
|
34
|
+
export declare type IOrganizationSettingsType = t.TypeOf<typeof OrganizationSettingsV>;
|
35
|
+
export declare type IPlaceholderType = t.TypeOf<typeof PlaceholderV>;
|
36
|
+
export declare type IEnvironmentType = t.TypeOf<typeof EnvironmentV>;
|
37
|
+
export declare type IReleaseStep = t.TypeOf<typeof ReleaseStepV>;
|
38
|
+
export declare type IRelease = t.TypeOf<typeof ReleaseV>;
|
39
|
+
export declare type IEnvReleaseInfo = t.TypeOf<typeof EnvReleaseInfoV>;
|
40
|
+
/*******************************************************************************/
|
41
|
+
export declare type IKeyEventCategory = t.TypeOf<typeof KeyEventV>;
|
42
|
+
export declare type IArgumentMap = t.TypeOf<typeof ArgumentMapV>;
|
43
|
+
export declare type IArgumentType = t.TypeOf<typeof ArgumentTypeV>;
|
44
|
+
export declare type IStepArgumentType = t.TypeOf<typeof StepArgumentTypeV>;
|
45
|
+
export declare type ITemplate = t.TypeOf<typeof TemplateV>;
|
46
|
+
export declare type ITemplateOptions = t.TypeOf<typeof TemplateOptionsV>;
|
47
|
+
export declare type IEndUserType = t.TypeOf<typeof EndUserV>;
|
48
|
+
export declare type IConditionType = t.TypeOf<typeof ConditionV>;
|
49
|
+
export declare type IConditionOperatorType = t.TypeOf<typeof ConditionOperatorV>;
|
50
|
+
export declare type IContextArgumentType = t.TypeOf<typeof ContextArgumentV>;
|
51
|
+
export declare type ISetArgumentType = t.TypeOf<typeof SetArgumentV>;
|
52
|
+
export declare type IDynamicArgumentType = t.TypeOf<typeof DynamicArgumentV>;
|
53
|
+
export declare type IDependentArgumentType = t.TypeOf<typeof DependentArgumentV>;
|
54
|
+
export declare type IFunctionArgumentType = t.TypeOf<typeof FunctionArgumentV>;
|
55
|
+
export interface ICommandInput {
|
56
|
+
text: string;
|
57
|
+
command: ICommandType;
|
58
|
+
context: IUserContext;
|
59
|
+
}
|
60
|
+
export interface IArgValues {
|
61
|
+
[arg: string]: string | number | undefined;
|
62
|
+
}
|
63
|
+
export declare type IHistoryType = Array<{
|
64
|
+
activeCommand: ICommandType;
|
65
|
+
options: ICommandType[];
|
66
|
+
}>;
|
67
|
+
export interface IUserContext {
|
68
|
+
[variable: string]: any;
|
69
|
+
}
|
70
|
+
export interface ICallbackMap {
|
71
|
+
[variable: string]: (...args: any[]) => any;
|
72
|
+
}
|
73
|
+
export interface IResourceType extends IUserContext {
|
74
|
+
_cbLinkedCommmands: Array<{
|
75
|
+
command: number;
|
76
|
+
arg: string;
|
77
|
+
}>;
|
78
|
+
}
|
79
|
+
export declare type IConfigEndpointResponse = {
|
80
|
+
commands: any[];
|
81
|
+
categories: any[];
|
82
|
+
organization: any;
|
83
|
+
environments_with_versions?: any[];
|
84
|
+
placeholders?: any[];
|
85
|
+
};
|
86
|
+
export type { IResourceSettings } from './IResourceSettings';
|
87
|
+
export declare type IResourceSettingsByContextKey = t.TypeOf<typeof ResourceSettingsByContextKeyV>;
|
88
|
+
/*******************************************************************************/
|
89
|
+
export declare const isCommand: (command?: ICommandType | any) => command is {
|
90
|
+
id: number;
|
91
|
+
organization: string | number;
|
92
|
+
text: string;
|
93
|
+
template: ({
|
94
|
+
type: "admin";
|
95
|
+
value: string;
|
96
|
+
} & {} & {
|
97
|
+
commandType?: "object" | "independent" | "help" | undefined;
|
98
|
+
object?: string | undefined;
|
99
|
+
hoverTooltip?: boolean | undefined;
|
100
|
+
operation?: "self" | "router" | "blank" | undefined;
|
101
|
+
}) | ({
|
102
|
+
type: "callback";
|
103
|
+
value: string;
|
104
|
+
} & {} & {
|
105
|
+
commandType?: "object" | "independent" | "help" | undefined;
|
106
|
+
object?: string | undefined;
|
107
|
+
hoverTooltip?: boolean | undefined;
|
108
|
+
operation?: "self" | "router" | "blank" | undefined;
|
109
|
+
}) | ({
|
110
|
+
type: "link";
|
111
|
+
value: string;
|
112
|
+
} & {} & {
|
113
|
+
commandType?: "object" | "independent" | "help" | undefined;
|
114
|
+
object?: string | undefined;
|
115
|
+
hoverTooltip?: boolean | undefined;
|
116
|
+
operation?: "self" | "router" | "blank" | undefined;
|
117
|
+
}) | ({
|
118
|
+
type: "click" | "clickBySelector" | "clickByXpath";
|
119
|
+
value: string[];
|
120
|
+
} & {} & {
|
121
|
+
commandType?: "object" | "independent" | "help" | undefined;
|
122
|
+
object?: string | undefined;
|
123
|
+
hoverTooltip?: boolean | undefined;
|
124
|
+
operation?: "self" | "router" | "blank" | undefined;
|
125
|
+
}) | ({
|
126
|
+
type: "builtin";
|
127
|
+
value: string;
|
128
|
+
} & {} & {
|
129
|
+
commandType?: "object" | "independent" | "help" | undefined;
|
130
|
+
object?: string | undefined;
|
131
|
+
hoverTooltip?: boolean | undefined;
|
132
|
+
operation?: "self" | "router" | "blank" | undefined;
|
133
|
+
}) | ({
|
134
|
+
type: "webhook";
|
135
|
+
value: string;
|
136
|
+
} & {} & {
|
137
|
+
commandType?: "object" | "independent" | "help" | undefined;
|
138
|
+
object?: string | undefined;
|
139
|
+
hoverTooltip?: boolean | undefined;
|
140
|
+
operation?: "self" | "router" | "blank" | undefined;
|
141
|
+
}) | ({
|
142
|
+
type: "script";
|
143
|
+
value: string;
|
144
|
+
} & {} & {
|
145
|
+
commandType?: "object" | "independent" | "help" | undefined;
|
146
|
+
object?: string | undefined;
|
147
|
+
hoverTooltip?: boolean | undefined;
|
148
|
+
operation?: "self" | "router" | "blank" | undefined;
|
149
|
+
});
|
150
|
+
} & {
|
151
|
+
disabledReason?: string | undefined;
|
152
|
+
source?: string | undefined;
|
153
|
+
name?: string | undefined;
|
154
|
+
last_available?: string | null | undefined;
|
155
|
+
modified?: string | undefined;
|
156
|
+
} & {
|
157
|
+
arguments: {
|
158
|
+
[x: string]: ({
|
159
|
+
type: "context";
|
160
|
+
value: string;
|
161
|
+
order_key: number;
|
162
|
+
} & {
|
163
|
+
label?: string | undefined;
|
164
|
+
chosen?: string | number | undefined;
|
165
|
+
selected?: any[] | undefined;
|
166
|
+
input_type?: string | undefined;
|
167
|
+
preselected_key?: string | undefined;
|
168
|
+
label_field?: string | undefined;
|
169
|
+
availability_condition?: {
|
170
|
+
field: string;
|
171
|
+
operator: "==" | "!=" | "isTruthy" | "isFalsy";
|
172
|
+
value: string | undefined;
|
173
|
+
}[] | undefined;
|
174
|
+
loaded?: any[] | undefined;
|
175
|
+
allow_create?: boolean | undefined;
|
176
|
+
allow_create_label?: string | undefined;
|
177
|
+
}) | ({
|
178
|
+
type: "set";
|
179
|
+
value: string[] | number[] | {
|
180
|
+
[key: string]: unknown;
|
181
|
+
}[];
|
182
|
+
order_key: number;
|
183
|
+
} & {
|
184
|
+
label?: string | undefined;
|
185
|
+
chosen?: string | number | undefined;
|
186
|
+
selected?: any[] | undefined;
|
187
|
+
input_type?: string | undefined;
|
188
|
+
preselected_key?: string | undefined;
|
189
|
+
label_field?: string | undefined;
|
190
|
+
availability_condition?: {
|
191
|
+
field: string;
|
192
|
+
operator: "==" | "!=" | "isTruthy" | "isFalsy";
|
193
|
+
value: string | undefined;
|
194
|
+
}[] | undefined;
|
195
|
+
loaded?: any[] | undefined;
|
196
|
+
allow_create?: boolean | undefined;
|
197
|
+
allow_create_label?: string | undefined;
|
198
|
+
}) | ({
|
199
|
+
type: "provided";
|
200
|
+
value: "time" | "text";
|
201
|
+
order_key: number;
|
202
|
+
} & {
|
203
|
+
label?: string | undefined;
|
204
|
+
chosen?: string | number | undefined;
|
205
|
+
selected?: any[] | undefined;
|
206
|
+
input_type?: string | undefined;
|
207
|
+
preselected_key?: string | undefined;
|
208
|
+
label_field?: string | undefined;
|
209
|
+
availability_condition?: {
|
210
|
+
field: string;
|
211
|
+
operator: "==" | "!=" | "isTruthy" | "isFalsy";
|
212
|
+
value: string | undefined;
|
213
|
+
}[] | undefined;
|
214
|
+
loaded?: any[] | undefined;
|
215
|
+
dateTimeArgumentTypeId?: number | undefined;
|
216
|
+
allow_create?: boolean | undefined;
|
217
|
+
allow_create_label?: string | undefined;
|
218
|
+
}) | ({
|
219
|
+
type: "dependent";
|
220
|
+
value: string;
|
221
|
+
order_key: number;
|
222
|
+
} & {
|
223
|
+
label?: string | undefined;
|
224
|
+
chosen?: string | number | undefined;
|
225
|
+
selected?: any[] | undefined;
|
226
|
+
input_type?: string | undefined;
|
227
|
+
preselected_key?: string | undefined;
|
228
|
+
label_field?: string | undefined;
|
229
|
+
availability_condition?: {
|
230
|
+
field: string;
|
231
|
+
operator: "==" | "!=" | "isTruthy" | "isFalsy";
|
232
|
+
value: string | undefined;
|
233
|
+
}[] | undefined;
|
234
|
+
loaded?: any[] | undefined;
|
235
|
+
allow_create?: boolean | undefined;
|
236
|
+
allow_create_label?: string | undefined;
|
237
|
+
}) | ({
|
238
|
+
type: "function";
|
239
|
+
value: string;
|
240
|
+
order_key: number;
|
241
|
+
} & {
|
242
|
+
label?: string | undefined;
|
243
|
+
chosen?: string | number | undefined;
|
244
|
+
selected?: any[] | undefined;
|
245
|
+
input_type?: string | undefined;
|
246
|
+
preselected_key?: string | undefined;
|
247
|
+
label_field?: string | undefined;
|
248
|
+
availability_condition?: {
|
249
|
+
field: string;
|
250
|
+
operator: "==" | "!=" | "isTruthy" | "isFalsy";
|
251
|
+
value: string | undefined;
|
252
|
+
}[] | undefined;
|
253
|
+
loaded?: any[] | undefined;
|
254
|
+
allow_create?: boolean | undefined;
|
255
|
+
allow_create_label?: string | undefined;
|
256
|
+
});
|
257
|
+
};
|
258
|
+
tags: string[];
|
259
|
+
availability_rules: ({
|
260
|
+
type: "url" | "context" | "element";
|
261
|
+
operator: "includes" | "endsWith" | "startsWith" | "is" | "isTruthy" | "isFalsy" | "isNot" | "isTrue" | "isFalse" | "doesNotInclude" | "matchesRegex" | "isGreaterThan" | "isLessThan" | "isDefined" | "isNotDefined" | "classnameOnPage" | "idOnPage";
|
262
|
+
} & {
|
263
|
+
field?: string | undefined;
|
264
|
+
value?: string | undefined;
|
265
|
+
reason?: string | undefined;
|
266
|
+
})[];
|
267
|
+
recommend_rules: (({
|
268
|
+
type: "always";
|
269
|
+
} & {
|
270
|
+
operator?: null | undefined;
|
271
|
+
field?: null | undefined;
|
272
|
+
value?: null | undefined;
|
273
|
+
reason?: null | undefined;
|
274
|
+
}) | ({
|
275
|
+
type: "url" | "context" | "element";
|
276
|
+
operator: "includes" | "endsWith" | "startsWith" | "is" | "isTruthy" | "isFalsy" | "isNot" | "isTrue" | "isFalse" | "doesNotInclude" | "matchesRegex" | "isGreaterThan" | "isLessThan" | "isDefined" | "isNotDefined" | "classnameOnPage" | "idOnPage";
|
277
|
+
} & {
|
278
|
+
field?: string | undefined;
|
279
|
+
value?: string | undefined;
|
280
|
+
reason?: string | undefined;
|
281
|
+
}))[];
|
282
|
+
confirm: string;
|
283
|
+
shortcut: string[];
|
284
|
+
explanation: string;
|
285
|
+
is_live: boolean;
|
286
|
+
category: number | null;
|
287
|
+
sort_key: number | null;
|
288
|
+
icon: string | null;
|
289
|
+
celebrate: {
|
290
|
+
[x: string]: any;
|
291
|
+
} | null;
|
292
|
+
recommend_sort_key: number | null;
|
293
|
+
shortcut_mac: string[];
|
294
|
+
shortcut_win: string[];
|
295
|
+
hotkey_mac: string;
|
296
|
+
hotkey_win: string;
|
297
|
+
};
|
298
|
+
export declare const isResource: (option: any) => option is IResourceType;
|
299
|
+
export declare const isContextArgument: (argument: IArgumentType) => argument is {
|
300
|
+
type: "context";
|
301
|
+
value: string;
|
302
|
+
order_key: number;
|
303
|
+
} & {
|
304
|
+
label?: string | undefined;
|
305
|
+
chosen?: string | number | undefined;
|
306
|
+
selected?: any[] | undefined;
|
307
|
+
input_type?: string | undefined;
|
308
|
+
preselected_key?: string | undefined;
|
309
|
+
label_field?: string | undefined;
|
310
|
+
availability_condition?: {
|
311
|
+
field: string;
|
312
|
+
operator: "==" | "!=" | "isTruthy" | "isFalsy";
|
313
|
+
value: string | undefined;
|
314
|
+
}[] | undefined;
|
315
|
+
loaded?: any[] | undefined;
|
316
|
+
allow_create?: boolean | undefined;
|
317
|
+
allow_create_label?: string | undefined;
|
318
|
+
};
|
319
|
+
export declare const isTimeArgument: (argument: IArgumentType) => argument is {
|
320
|
+
type: "provided";
|
321
|
+
value: "time" | "text";
|
322
|
+
order_key: number;
|
323
|
+
} & {
|
324
|
+
label?: string | undefined;
|
325
|
+
chosen?: string | number | undefined;
|
326
|
+
selected?: any[] | undefined;
|
327
|
+
input_type?: string | undefined;
|
328
|
+
preselected_key?: string | undefined;
|
329
|
+
label_field?: string | undefined;
|
330
|
+
availability_condition?: {
|
331
|
+
field: string;
|
332
|
+
operator: "==" | "!=" | "isTruthy" | "isFalsy";
|
333
|
+
value: string | undefined;
|
334
|
+
}[] | undefined;
|
335
|
+
loaded?: any[] | undefined;
|
336
|
+
dateTimeArgumentTypeId?: number | undefined;
|
337
|
+
allow_create?: boolean | undefined;
|
338
|
+
allow_create_label?: string | undefined;
|
339
|
+
};
|
340
|
+
export declare const isFunctionArgument: (argument: IArgumentType) => argument is {
|
341
|
+
type: "function";
|
342
|
+
value: string;
|
343
|
+
order_key: number;
|
344
|
+
} & {
|
345
|
+
label?: string | undefined;
|
346
|
+
chosen?: string | number | undefined;
|
347
|
+
selected?: any[] | undefined;
|
348
|
+
input_type?: string | undefined;
|
349
|
+
preselected_key?: string | undefined;
|
350
|
+
label_field?: string | undefined;
|
351
|
+
availability_condition?: {
|
352
|
+
field: string;
|
353
|
+
operator: "==" | "!=" | "isTruthy" | "isFalsy";
|
354
|
+
value: string | undefined;
|
355
|
+
}[] | undefined;
|
356
|
+
loaded?: any[] | undefined;
|
357
|
+
allow_create?: boolean | undefined;
|
358
|
+
allow_create_label?: string | undefined;
|
359
|
+
};
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import * as t from 'io-ts';
|
2
|
+
export declare const UserV: t.IntersectionC<[t.TypeC<{
|
3
|
+
id: t.UnionC<[t.NumberC, t.StringC]>;
|
4
|
+
}>, t.TypeC<{
|
5
|
+
token: t.StringC;
|
6
|
+
email: t.StringC;
|
7
|
+
organization: t.StringC;
|
8
|
+
api_token: t.UnionC<[t.StringC, t.NullC]>;
|
9
|
+
profile: t.NumberC;
|
10
|
+
has_updated_password: t.BooleanC;
|
11
|
+
is_active: t.BooleanC;
|
12
|
+
}>, t.PartialC<{}>]>;
|