commandbar 1.8.5 → 1.8.7
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/internal/src/client/AddContextOptions.d.ts +141 -0
- package/build/internal/src/client/AnalyticsEventTypes.d.ts +1 -0
- package/build/internal/src/client/CommandBarClientSDK.d.ts +403 -0
- package/build/internal/src/client/CommandBarProxySDK.d.ts +49 -0
- package/build/internal/src/client/CommandBarSDK.d.ts +79 -0
- package/build/internal/src/client/EventHandler.d.ts +282 -0
- package/build/internal/src/client/OrgConfig.d.ts +5 -0
- package/build/internal/src/client/SDKConfig.d.ts +13 -0
- package/build/internal/src/client/SentryReporter.d.ts +63 -0
- package/build/internal/src/client/globals.d.ts +20 -0
- package/build/internal/src/client/proxy.d.ts +15 -0
- package/build/internal/src/client/symbols.d.ts +50 -0
- package/build/internal/src/middleware/CommandFromClientV.d.ts +283 -0
- package/build/internal/src/middleware/ICommandFromClientType.d.ts +5 -0
- package/build/internal/src/middleware/IResourceSettings.d.ts +3 -0
- package/build/internal/src/middleware/OrganizationV.d.ts +329 -0
- package/build/internal/src/middleware/ResourceSettingsV.d.ts +119 -0
- package/build/internal/src/middleware/additionalResource.d.ts +302 -0
- package/build/internal/src/middleware/billing.d.ts +41 -0
- package/build/internal/src/middleware/chatAnalytics.d.ts +2601 -0
- package/build/internal/src/middleware/checklist.d.ts +1014 -0
- package/build/internal/src/middleware/command.d.ts +8908 -0
- package/build/internal/src/middleware/commandCategory.d.ts +192 -0
- package/build/internal/src/middleware/confetti.d.ts +16 -0
- package/build/internal/src/middleware/context.d.ts +40 -0
- package/build/internal/src/middleware/dashboardFlags.d.ts +9 -0
- package/build/internal/src/middleware/detailPreview.d.ts +24 -0
- package/build/internal/src/middleware/environment.d.ts +11 -0
- package/build/internal/src/middleware/generics.d.ts +42 -0
- package/build/internal/src/middleware/guide.d.ts +37 -0
- package/build/internal/src/middleware/helpDocsIntegration.d.ts +72 -0
- package/build/internal/src/middleware/helpDocsSync.d.ts +63 -0
- package/build/internal/src/middleware/helpers/actions.d.ts +184 -0
- package/build/internal/src/middleware/helpers/argument.d.ts +318 -0
- package/build/internal/src/middleware/helpers/audience.d.ts +15 -0
- package/build/internal/src/middleware/helpers/commandTemplate.d.ts +252 -0
- package/build/internal/src/middleware/helpers/endUser.d.ts +11 -0
- package/build/internal/src/middleware/helpers/frequencyLimit.d.ts +2 -0
- package/build/internal/src/middleware/helpers/goals.d.ts +26 -0
- package/build/internal/src/middleware/helpers/optionGroup.d.ts +2 -0
- package/build/internal/src/middleware/helpers/pushTrigger.d.ts +26 -0
- package/build/internal/src/middleware/helpers/rules.d.ts +289 -0
- package/build/internal/src/middleware/helpers/tags.d.ts +7 -0
- package/build/internal/src/middleware/historyEvent.d.ts +21 -0
- package/build/internal/src/middleware/network.d.ts +3 -0
- package/build/internal/src/middleware/nudge.d.ts +1669 -0
- package/build/internal/src/middleware/organization.d.ts +1540 -0
- package/build/internal/src/middleware/organizationSettings.d.ts +330 -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/qaPair.d.ts +676 -0
- package/build/internal/src/middleware/recommendationSet.d.ts +1199 -0
- package/build/internal/src/middleware/releases.d.ts +261 -0
- package/build/internal/src/middleware/skin.d.ts +102 -0
- package/build/internal/src/middleware/tab.d.ts +27 -0
- package/build/internal/src/middleware/types.d.ts +218 -0
- package/build/internal/src/middleware/user.d.ts +15 -0
- package/build/internal/src/middleware/utils.d.ts +11 -0
- package/build/internal/src/util/Disposable.d.ts +17 -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 +12 -0
- package/build/internal/src/util/integrations.d.ts +1 -0
- package/package.json +3 -3
- package/jest.config.js +0 -4
- package/scripts/minify-snippet.ts +0 -36
- package/scripts/watch.ts +0 -5
- package/src/commandbar-launcher.d.ts +0 -7
- package/test/init.test.ts +0 -3
- package/tsconfig.json +0 -24
- package/webpack.config.js +0 -35
@@ -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.UnionC<[t.StringC, t.NullC]>;
|
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.UnionC<[t.StringC, t.NullC]>;
|
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.UnionC<[t.StringC, t.NullC]>;
|
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.UnionC<[t.StringC, t.NullC]>;
|
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.UnionC<[t.StringC, t.NullC]>;
|
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.UnionC<[t.StringC, t.NullC]>;
|
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 | null;
|
99
|
+
current: boolean | null;
|
100
|
+
env: string;
|
101
|
+
id: number;
|
102
|
+
next_env: string | null;
|
103
|
+
release: {
|
104
|
+
created_by: string | null;
|
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 | null;
|
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 | null;
|
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 | null;
|
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 | null;
|
182
|
+
current: boolean | null;
|
183
|
+
env: string;
|
184
|
+
id: number;
|
185
|
+
next_env: string | null;
|
186
|
+
release: {
|
187
|
+
created_by: string | null;
|
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 | null;
|
206
|
+
current: boolean | null;
|
207
|
+
env: string;
|
208
|
+
id: number;
|
209
|
+
next_env: string | null;
|
210
|
+
release: {
|
211
|
+
created_by: string | null;
|
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<unknown>;
|
228
|
+
static promoteReleaseStep: (releaseStepId: number) => Promise<any>;
|
229
|
+
static promoteReleaseToFirstEnv: (releaseId: number) => Promise<{
|
230
|
+
created_by: string | null;
|
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 | null;
|
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,102 @@
|
|
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
|
+
chat_avatar: t.UnionC<[t.StringC, t.NullC]>;
|
12
|
+
frozen: t.BooleanC;
|
13
|
+
}>]>;
|
14
|
+
export declare const SkinPatchV: t.PartialC<{
|
15
|
+
id: t.StringC;
|
16
|
+
slug: t.StringC;
|
17
|
+
name: t.StringC;
|
18
|
+
default: t.BooleanC;
|
19
|
+
skin: t.AnyC;
|
20
|
+
organization: t.StringC;
|
21
|
+
logo: t.UnionC<[t.StringC, t.NullC]>;
|
22
|
+
chat_avatar: t.UnionC<[t.StringC, t.NullC]>;
|
23
|
+
}>;
|
24
|
+
export declare const SkinPatchMetadataV: t.PartialC<{
|
25
|
+
name: t.StringC;
|
26
|
+
slug: t.StringC;
|
27
|
+
}>;
|
28
|
+
export declare class Skin {
|
29
|
+
static list: (onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<({
|
30
|
+
id: string;
|
31
|
+
slug: string;
|
32
|
+
name: string;
|
33
|
+
default: boolean;
|
34
|
+
skin: any;
|
35
|
+
organization: string;
|
36
|
+
} & {
|
37
|
+
logo?: string | null | undefined;
|
38
|
+
chat_avatar?: string | null | undefined;
|
39
|
+
frozen?: boolean | undefined;
|
40
|
+
})[]>;
|
41
|
+
static read: (arg0: string, params?: Record<string, string> | undefined, callbacks?: {
|
42
|
+
onSuccess?: (() => void) | undefined;
|
43
|
+
onError?: ((err: string) => void) | undefined;
|
44
|
+
} | undefined) => Promise<{
|
45
|
+
id: string;
|
46
|
+
slug: string;
|
47
|
+
name: string;
|
48
|
+
default: boolean;
|
49
|
+
skin: any;
|
50
|
+
organization: string;
|
51
|
+
} & {
|
52
|
+
logo?: string | null | undefined;
|
53
|
+
chat_avatar?: string | null | undefined;
|
54
|
+
frozen?: boolean | undefined;
|
55
|
+
}>;
|
56
|
+
static update: (skin: t.TypeOf<typeof SkinPatchV>) => Promise<{
|
57
|
+
id: string;
|
58
|
+
slug: string;
|
59
|
+
name: string;
|
60
|
+
default: boolean;
|
61
|
+
skin: any;
|
62
|
+
organization: string;
|
63
|
+
} & {
|
64
|
+
logo?: string | null | undefined;
|
65
|
+
chat_avatar?: string | null | undefined;
|
66
|
+
frozen?: boolean | undefined;
|
67
|
+
}>;
|
68
|
+
static updateMetadata: (slug: string, metadata: t.TypeOf<typeof SkinPatchMetadataV>) => Promise<{
|
69
|
+
id: string;
|
70
|
+
slug: string;
|
71
|
+
name: string;
|
72
|
+
default: boolean;
|
73
|
+
skin: any;
|
74
|
+
organization: string;
|
75
|
+
} & {
|
76
|
+
logo?: string | null | undefined;
|
77
|
+
chat_avatar?: string | null | undefined;
|
78
|
+
frozen?: boolean | undefined;
|
79
|
+
}>;
|
80
|
+
static create: (object: {
|
81
|
+
id?: string | undefined;
|
82
|
+
slug?: string | undefined;
|
83
|
+
name?: string | undefined;
|
84
|
+
default?: boolean | undefined;
|
85
|
+
skin?: any;
|
86
|
+
organization?: string | undefined;
|
87
|
+
logo?: string | null | undefined;
|
88
|
+
chat_avatar?: string | null | undefined;
|
89
|
+
}, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<{
|
90
|
+
id: string;
|
91
|
+
slug: string;
|
92
|
+
name: string;
|
93
|
+
default: boolean;
|
94
|
+
skin: any;
|
95
|
+
organization: string;
|
96
|
+
} & {
|
97
|
+
logo?: string | null | undefined;
|
98
|
+
chat_avatar?: string | null | undefined;
|
99
|
+
frozen?: boolean | undefined;
|
100
|
+
}>;
|
101
|
+
static delete: (id: string | number, params?: Record<string, string> | undefined, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<void>;
|
102
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import * as t from 'io-ts';
|
2
|
+
export declare const TabV: t.TypeC<{
|
3
|
+
id: t.NumberC;
|
4
|
+
organization: t.UnionC<[t.NumberC, t.StringC]>;
|
5
|
+
category_ids: t.ArrayC<t.NumberC>;
|
6
|
+
sort_key: t.NumberC;
|
7
|
+
icon: t.UnionC<[t.StringC, t.NullC]>;
|
8
|
+
label: t.StringC;
|
9
|
+
header: t.UnionC<[t.StringC, t.NullC]>;
|
10
|
+
description: t.StringC;
|
11
|
+
placeholder: t.UnionC<[t.StringC, t.NullC]>;
|
12
|
+
render_as: t.UnionC<[t.LiteralC<"list">, t.LiteralC<"grid">]>;
|
13
|
+
}>;
|
14
|
+
export declare class Tab {
|
15
|
+
static decode: (data: any) => {
|
16
|
+
id: number;
|
17
|
+
organization: string | number;
|
18
|
+
category_ids: number[];
|
19
|
+
sort_key: number;
|
20
|
+
icon: string | null;
|
21
|
+
label: string;
|
22
|
+
header: string | null;
|
23
|
+
description: string;
|
24
|
+
placeholder: string | null;
|
25
|
+
render_as: "grid" | "list";
|
26
|
+
};
|
27
|
+
}
|
@@ -0,0 +1,218 @@
|
|
1
|
+
/*******************************************************************************/
|
2
|
+
import * as t from 'io-ts';
|
3
|
+
import { BatchEditorCommandResponseV, BatchOperationV, CommandV, HelpSyncCommandV, EditorCommandV, EditorCommandLiteV, CommandLiteV } from './command';
|
4
|
+
import { ArgumentMapV, ArgumentTypeV, ConditionV, ConditionOperatorV, StepArgumentTypeV, ContextArgumentV, SetArgumentV, DynamicArgumentV } from './helpers/argument';
|
5
|
+
import { GenericBatchRequest } from './generics';
|
6
|
+
import { OptionGroupRenderAsV } from './helpers/optionGroup';
|
7
|
+
import { TemplateV, TemplateOptionsV, RequestTemplateV } from './helpers/commandTemplate';
|
8
|
+
import { ActionV, LabeledActionV, RequestV } from './helpers/actions';
|
9
|
+
import { CommandCategoryV } from './commandCategory';
|
10
|
+
import { OrganizationStatusV, KeyEventV, ResourceSettingsByContextKeyV, InternalSettingsV, OrganizationV } from './organization';
|
11
|
+
import { OrganizationSettingsV } from './organizationSettings';
|
12
|
+
import { UserV } from './user';
|
13
|
+
import { ContextV } from './context';
|
14
|
+
import { GuideV } from './guide';
|
15
|
+
import { HistoryEventV } from './historyEvent';
|
16
|
+
import { HelpDocSyncLogMessageV, HelpDocsSyncV } from './helpDocsSync';
|
17
|
+
import { HelpDocsIntegrationV } from './helpDocsIntegration';
|
18
|
+
import { EndUserV } from './helpers/endUser';
|
19
|
+
import { SkinV } from './skin';
|
20
|
+
import { ProfileV } from './profile';
|
21
|
+
import { PlaceholderV } from './placeholder';
|
22
|
+
import { EnvReleaseInfoV, ReleaseStepV, ReleaseV } from './releases';
|
23
|
+
import { EnvironmentV } from './environment';
|
24
|
+
import { NudgeContentBlockV, NudgeContentButtonBlockV, NudgeContentHelpDocBlockV, NudgeContentImageBlockV, NudgeContentMarkdownBlockV, NudgeContentVideoBlockV, NudgeContentSurveyTextBlockV, NudgeContentSurveyRatingBlockV, NudgeStepV, NudgeV, OldNudgeV } from './nudge';
|
25
|
+
import { InstantAnswerV } from './qaPair';
|
26
|
+
import { TabV } from './tab';
|
27
|
+
import { RuleExpressionAndV, RuleExpressionOrV, RuleExpressionV } from './helpers/rules';
|
28
|
+
import { ChecklistItemV, ChecklistV } from './checklist';
|
29
|
+
import { DashboardFlagsV } from './dashboardFlags';
|
30
|
+
import { PushTriggerV } from './helpers/pushTrigger';
|
31
|
+
import { FrequencyLimitV } from './helpers/frequencyLimit';
|
32
|
+
import { AudienceV } from './helpers/audience';
|
33
|
+
import { AdditionalResourceV } from './additionalResource';
|
34
|
+
import { EditorRecommendationSetV, RecommendationSetV } from './recommendationSet';
|
35
|
+
import { UsageV } from './billing';
|
36
|
+
import { UserMessageV, AIMessageV, MessageV } from './chatAnalytics';
|
37
|
+
/*******************************************************************************/
|
38
|
+
export type IInitOptions = {
|
39
|
+
debug?: boolean;
|
40
|
+
environment?: string;
|
41
|
+
version?: string;
|
42
|
+
config?: IConfigEndpointResponse;
|
43
|
+
};
|
44
|
+
/*******************************************************************************/
|
45
|
+
export type IContextType = t.TypeOf<typeof ContextV> & unknown;
|
46
|
+
export type IUserType = t.TypeOf<typeof UserV> & unknown;
|
47
|
+
export type ICommandType = t.TypeOf<typeof CommandV> & unknown;
|
48
|
+
export type IEditorCommandType = t.TypeOf<typeof EditorCommandV> & unknown;
|
49
|
+
export type IEditorCommandTypeLite = t.TypeOf<typeof EditorCommandLiteV> & unknown;
|
50
|
+
export type ICommandTypeLite = t.TypeOf<typeof CommandLiteV> & unknown;
|
51
|
+
export type IHelpSyncCommandType = t.TypeOf<typeof HelpSyncCommandV> & unknown;
|
52
|
+
export type { ICommandFromClientType } from './ICommandFromClientType';
|
53
|
+
export type ICommandCategoryType = t.TypeOf<typeof CommandCategoryV> & unknown;
|
54
|
+
export type IGuideType = t.TypeOf<typeof GuideV> & {
|
55
|
+
preview?: boolean;
|
56
|
+
} & unknown;
|
57
|
+
export type IHistoryEventType = t.TypeOf<typeof HistoryEventV> & unknown;
|
58
|
+
export type IHelpDocsSyncType = t.TypeOf<typeof HelpDocsSyncV> & unknown;
|
59
|
+
export type IHelpDocsSyncLogMessageType = t.TypeOf<typeof HelpDocSyncLogMessageV> & unknown;
|
60
|
+
export type IHelpDocsIntegrationType = t.TypeOf<typeof HelpDocsIntegrationV> & unknown;
|
61
|
+
export type IOrganizationType = t.TypeOf<typeof OrganizationV> & unknown;
|
62
|
+
export type IOrganizationStatusType = t.TypeOf<typeof OrganizationStatusV> & unknown;
|
63
|
+
export type IInternalSettingsType = t.TypeOf<typeof InternalSettingsV> & unknown;
|
64
|
+
export type IDashboardFlagsType = t.TypeOf<typeof DashboardFlagsV> & unknown;
|
65
|
+
export type ISkinType = t.TypeOf<typeof SkinV> & unknown;
|
66
|
+
export type IProfileType = t.TypeOf<typeof ProfileV> & unknown;
|
67
|
+
export type IOrganizationSettingsType = t.TypeOf<typeof OrganizationSettingsV> & unknown;
|
68
|
+
export type IPlaceholderType = t.TypeOf<typeof PlaceholderV> & unknown;
|
69
|
+
export type ITabType = t.TypeOf<typeof TabV> & unknown;
|
70
|
+
export type IEnvironmentType = t.TypeOf<typeof EnvironmentV> & unknown;
|
71
|
+
export type IReleaseStep = t.TypeOf<typeof ReleaseStepV> & unknown;
|
72
|
+
export type IRelease = t.TypeOf<typeof ReleaseV> & unknown;
|
73
|
+
export type IEnvReleaseInfo = t.TypeOf<typeof EnvReleaseInfoV> & unknown;
|
74
|
+
/*******************************************************************************/
|
75
|
+
export type IUsage = t.TypeOf<typeof UsageV> & unknown;
|
76
|
+
/*******************************************************************************/
|
77
|
+
export type IBatchOperation = t.TypeOf<typeof BatchOperationV> & unknown;
|
78
|
+
export type IBatchEditorCommandRequst = t.TypeOf<typeof GenericBatchRequest> & unknown;
|
79
|
+
export type IBatchEditorCommandResponse = t.TypeOf<typeof BatchEditorCommandResponseV> & unknown;
|
80
|
+
/*******************************************************************************/
|
81
|
+
export type IKeyEventCategory = t.TypeOf<typeof KeyEventV> & unknown;
|
82
|
+
export type IArgumentMap = t.TypeOf<typeof ArgumentMapV> & unknown;
|
83
|
+
export type IArgumentType = t.TypeOf<typeof ArgumentTypeV> & unknown;
|
84
|
+
export type IStepArgumentType = t.TypeOf<typeof StepArgumentTypeV> & unknown;
|
85
|
+
export type ITemplate = t.TypeOf<typeof TemplateV> & unknown;
|
86
|
+
export type RequestTemplateType = t.TypeOf<typeof RequestTemplateV> & unknown;
|
87
|
+
export type RequestType = t.TypeOf<typeof RequestV> & unknown;
|
88
|
+
export type ITemplateOptions = t.TypeOf<typeof TemplateOptionsV> & unknown;
|
89
|
+
export type IEndUserType = t.TypeOf<typeof EndUserV> & unknown;
|
90
|
+
export type IRuleExpression = t.TypeOf<typeof RuleExpressionV> & unknown;
|
91
|
+
export type IRuleExpressionAnd = t.TypeOf<typeof RuleExpressionAndV> & unknown;
|
92
|
+
export type IRuleExpressionOr = t.TypeOf<typeof RuleExpressionOrV> & unknown;
|
93
|
+
export type IConditionType = t.TypeOf<typeof ConditionV> & unknown;
|
94
|
+
export type IConditionOperatorType = t.TypeOf<typeof ConditionOperatorV> & unknown;
|
95
|
+
export type IContextArgumentType = t.TypeOf<typeof ContextArgumentV> & unknown;
|
96
|
+
export type ISetArgumentType = t.TypeOf<typeof SetArgumentV> & unknown;
|
97
|
+
export type IDynamicArgumentType = t.TypeOf<typeof DynamicArgumentV> & unknown;
|
98
|
+
export type OptionGroupRenderAsType = t.TypeOf<typeof OptionGroupRenderAsV> & unknown;
|
99
|
+
export type IOldNudgeType = t.TypeOf<typeof OldNudgeV> & unknown;
|
100
|
+
export type INudgeType = t.TypeOf<typeof NudgeV> & unknown;
|
101
|
+
export type IAudienceType = t.TypeOf<typeof AudienceV> & unknown;
|
102
|
+
export type IPushTrigger = t.TypeOf<typeof PushTriggerV> & unknown;
|
103
|
+
export type IFrequencyLimit = t.TypeOf<typeof FrequencyLimitV> & unknown;
|
104
|
+
export type INudgeStepType = t.TypeOf<typeof NudgeStepV> & unknown;
|
105
|
+
export type INudgeStepContentBlockType = t.TypeOf<typeof NudgeContentBlockV> & unknown;
|
106
|
+
export type INudgeStepContentMarkdownBlockType = t.TypeOf<typeof NudgeContentMarkdownBlockV> & unknown;
|
107
|
+
export type INudgeStepContentImageBlockType = t.TypeOf<typeof NudgeContentImageBlockV> & unknown;
|
108
|
+
export type INudgeStepContentVideoBlockType = t.TypeOf<typeof NudgeContentVideoBlockV> & unknown;
|
109
|
+
export type INudgeStepContentHelpDocBlockType = t.TypeOf<typeof NudgeContentHelpDocBlockV> & unknown;
|
110
|
+
export type INudgeStepContentSurveyTextBlockType = t.TypeOf<typeof NudgeContentSurveyTextBlockV> & unknown;
|
111
|
+
export type INudgeContentSurveyRatingBlockType = t.TypeOf<typeof NudgeContentSurveyRatingBlockV> & unknown;
|
112
|
+
export type INudgeStepContentButtonBlockType = t.TypeOf<typeof NudgeContentButtonBlockV> & unknown;
|
113
|
+
export type INudgeClientType = {
|
114
|
+
nudge: INudgeType;
|
115
|
+
passedConditionsInLastEvaluation: boolean;
|
116
|
+
lastTriggeredTs?: number;
|
117
|
+
};
|
118
|
+
export type LabeledAction = t.TypeOf<typeof LabeledActionV> & unknown;
|
119
|
+
export type Action = t.TypeOf<typeof ActionV> & unknown;
|
120
|
+
export type IBillingProfile = {
|
121
|
+
organization: string;
|
122
|
+
price_cents: number;
|
123
|
+
tier: string;
|
124
|
+
discount_cents: number;
|
125
|
+
name: string;
|
126
|
+
invoice_description: string;
|
127
|
+
customer_id: string | null;
|
128
|
+
publishable_key: string;
|
129
|
+
balance: number | null;
|
130
|
+
currency: string | null;
|
131
|
+
on_free_trial: boolean;
|
132
|
+
free_trial_end_date: string | null;
|
133
|
+
appsumo_invoice_item_id: string | null;
|
134
|
+
};
|
135
|
+
export type IChecklist = t.TypeOf<typeof ChecklistV> & {
|
136
|
+
_editorState?: {
|
137
|
+
timestamp?: number;
|
138
|
+
initial_active_item?: number;
|
139
|
+
expanded?: boolean;
|
140
|
+
};
|
141
|
+
} & unknown;
|
142
|
+
export type IChecklistItem = t.TypeOf<typeof ChecklistItemV> & unknown;
|
143
|
+
export type IInstantAnswerType = t.TypeOf<typeof InstantAnswerV> & unknown;
|
144
|
+
export type IMessageType = t.TypeOf<typeof MessageV> & unknown;
|
145
|
+
export type IUserMessageType = t.TypeOf<typeof UserMessageV> & unknown;
|
146
|
+
export type IAIMessageType = t.TypeOf<typeof AIMessageV> & unknown;
|
147
|
+
export interface ICommandInput {
|
148
|
+
text: string;
|
149
|
+
command: ICommandType;
|
150
|
+
context: IUserContext;
|
151
|
+
}
|
152
|
+
export interface IArgValues {
|
153
|
+
[arg: string]: string | number | undefined;
|
154
|
+
}
|
155
|
+
export type IHistoryType = Array<{
|
156
|
+
activeCommand: ICommandType;
|
157
|
+
options: ICommandType[];
|
158
|
+
}>;
|
159
|
+
export interface IUserContext {
|
160
|
+
[variable: string]: any;
|
161
|
+
}
|
162
|
+
export interface IUserRemoteProperties {
|
163
|
+
[variable: string]: any;
|
164
|
+
}
|
165
|
+
export interface IEndUserAnalytics {
|
166
|
+
num_command_executions: number;
|
167
|
+
num_shortcut_command_executions: number;
|
168
|
+
num_sessions: number;
|
169
|
+
num_opens: number;
|
170
|
+
num_deadends: number;
|
171
|
+
first_seen_at: string;
|
172
|
+
last_seen_at: string;
|
173
|
+
}
|
174
|
+
export interface ICallbackMap {
|
175
|
+
[variable: string]: (...args: any[]) => unknown;
|
176
|
+
}
|
177
|
+
export interface IResourceType extends IUserContext {
|
178
|
+
_cbLinkedCommmands: Array<{
|
179
|
+
command: number;
|
180
|
+
arg: string;
|
181
|
+
}>;
|
182
|
+
}
|
183
|
+
export type IAdditionalResource = t.TypeOf<typeof AdditionalResourceV> & unknown;
|
184
|
+
export type IRecommendationSet = t.TypeOf<typeof RecommendationSetV> & unknown;
|
185
|
+
export type IEditorRecommendationSet = t.TypeOf<typeof EditorRecommendationSetV> & unknown;
|
186
|
+
export type IConfigEndpointResponse = {
|
187
|
+
commands: any[];
|
188
|
+
categories: any[];
|
189
|
+
organization: any;
|
190
|
+
environments_with_versions?: any[];
|
191
|
+
placeholders?: any[];
|
192
|
+
nudges?: IOldNudgeType[];
|
193
|
+
nudges_v2?: INudgeType[];
|
194
|
+
tabs?: ITabType[];
|
195
|
+
checklists?: IChecklist[];
|
196
|
+
helphub_additional_resources?: IAdditionalResource[];
|
197
|
+
helphub_recommendation_sets?: IRecommendationSet[];
|
198
|
+
};
|
199
|
+
export type IConfigType = {
|
200
|
+
commands: ICommandType[];
|
201
|
+
categories: ICommandCategoryType[];
|
202
|
+
organization: IOrganizationType;
|
203
|
+
environments?: IEnvironmentType[];
|
204
|
+
placeholders: IPlaceholderType[];
|
205
|
+
nudges: INudgeType[];
|
206
|
+
tabs: ITabType[];
|
207
|
+
checklists: IChecklist[];
|
208
|
+
helphub_additional_resources: IAdditionalResource[];
|
209
|
+
helphub_recommendation_sets: IRecommendationSet[];
|
210
|
+
};
|
211
|
+
export type { IResourceSettings } from './IResourceSettings';
|
212
|
+
export type IResourceSettingsByContextKey = t.TypeOf<typeof ResourceSettingsByContextKeyV> & unknown;
|
213
|
+
export type { DetailPreviewObjectType, DetailPreviewType, DataRowMetadata } from './detailPreview';
|
214
|
+
/*******************************************************************************/
|
215
|
+
export declare const isCommand: (command?: ICommandType | any) => command is ICommandType;
|
216
|
+
export declare const isResource: (option: any) => option is IResourceType;
|
217
|
+
export declare const isContextArgument: (argument: IArgumentType) => argument is IContextArgumentType;
|
218
|
+
export declare const isTimeArgument: (argument: IArgumentType) => argument is IDynamicArgumentType;
|
@@ -0,0 +1,15 @@
|
|
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
|
+
organization_name: t.StringC;
|
9
|
+
api_token: t.UnionC<[t.StringC, t.NullC]>;
|
10
|
+
profile: t.NumberC;
|
11
|
+
has_updated_password: t.BooleanC;
|
12
|
+
is_active: t.BooleanC;
|
13
|
+
}>, t.PartialC<{
|
14
|
+
intercom_hash: t.StringC;
|
15
|
+
}>]>;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import * as t from 'io-ts';
|
2
|
+
interface sortableObject {
|
3
|
+
id: number | null | undefined;
|
4
|
+
sort_key?: number | null | undefined;
|
5
|
+
}
|
6
|
+
export declare function compareObjs<T extends sortableObject>(a: T, b: T): number;
|
7
|
+
export declare const maybePluralize: (count: number, singular: string, plural?: string, includeNum?: boolean) => string;
|
8
|
+
export declare const defineProcess: () => void;
|
9
|
+
export declare function pick<P extends t.Props, K extends keyof P>(Model: t.TypeC<P>, keys: K[]): t.TypeC<Pick<P, K>>;
|
10
|
+
export declare function omit<P extends t.Props, K extends keyof P>(Model: t.TypeC<P>, keys: K[]): t.TypeC<Pick<P, Exclude<keyof P, K>>>;
|
11
|
+
export {};
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { _dispose, _disposed } from '../client/symbols';
|
2
|
+
export type PublicDisposable = {
|
3
|
+
dispose: VoidFunction;
|
4
|
+
_disposed?: boolean;
|
5
|
+
};
|
6
|
+
export type PrivateDisposable = {
|
7
|
+
[_dispose]: VoidFunction;
|
8
|
+
[_disposed]?: boolean;
|
9
|
+
};
|
10
|
+
export type Disposable = undefined | PublicDisposable | PrivateDisposable;
|
11
|
+
export declare const isDisposable: (x: unknown) => x is Disposable;
|
12
|
+
/**
|
13
|
+
* Determines if the provided value is "disposed". A value is considered "disposed" if it is an object with the
|
14
|
+
* _disposed property or symbol symbol set to true, or if the actual value is undefined.
|
15
|
+
*/
|
16
|
+
export declare const isDisposed: (x: unknown) => boolean;
|
17
|
+
export declare function dispose(x: Disposable): void;
|
@@ -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, prefixOverride?: string) => 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;
|