commandbar 1.8.5 → 1.8.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. package/build/commandbar-js/src/index.js +1 -1
  2. package/build/internal/src/client/AddContextOptions.d.ts +141 -0
  3. package/build/internal/src/client/AnalyticsEventTypes.d.ts +1 -0
  4. package/build/internal/src/client/CommandBarClientSDK.d.ts +403 -0
  5. package/build/internal/src/client/CommandBarProxySDK.d.ts +49 -0
  6. package/build/internal/src/client/CommandBarSDK.d.ts +79 -0
  7. package/build/internal/src/client/EventHandler.d.ts +282 -0
  8. package/build/internal/src/client/OrgConfig.d.ts +5 -0
  9. package/build/internal/src/client/SDKConfig.d.ts +13 -0
  10. package/build/internal/src/client/SentryReporter.d.ts +63 -0
  11. package/build/internal/src/client/globals.d.ts +20 -0
  12. package/build/internal/src/client/proxy.d.ts +15 -0
  13. package/build/internal/src/client/symbols.d.ts +50 -0
  14. package/build/internal/src/middleware/CommandFromClientV.d.ts +283 -0
  15. package/build/internal/src/middleware/ICommandFromClientType.d.ts +5 -0
  16. package/build/internal/src/middleware/IResourceSettings.d.ts +3 -0
  17. package/build/internal/src/middleware/OrganizationV.d.ts +329 -0
  18. package/build/internal/src/middleware/ResourceSettingsV.d.ts +119 -0
  19. package/build/internal/src/middleware/additionalResource.d.ts +302 -0
  20. package/build/internal/src/middleware/billing.d.ts +41 -0
  21. package/build/internal/src/middleware/chatAnalytics.d.ts +2601 -0
  22. package/build/internal/src/middleware/checklist.d.ts +1014 -0
  23. package/build/internal/src/middleware/command.d.ts +8908 -0
  24. package/build/internal/src/middleware/commandCategory.d.ts +192 -0
  25. package/build/internal/src/middleware/confetti.d.ts +16 -0
  26. package/build/internal/src/middleware/context.d.ts +40 -0
  27. package/build/internal/src/middleware/dashboardFlags.d.ts +9 -0
  28. package/build/internal/src/middleware/detailPreview.d.ts +24 -0
  29. package/build/internal/src/middleware/environment.d.ts +11 -0
  30. package/build/internal/src/middleware/generics.d.ts +42 -0
  31. package/build/internal/src/middleware/guide.d.ts +37 -0
  32. package/build/internal/src/middleware/helpDocsIntegration.d.ts +72 -0
  33. package/build/internal/src/middleware/helpDocsSync.d.ts +63 -0
  34. package/build/internal/src/middleware/helpers/actions.d.ts +184 -0
  35. package/build/internal/src/middleware/helpers/argument.d.ts +318 -0
  36. package/build/internal/src/middleware/helpers/audience.d.ts +15 -0
  37. package/build/internal/src/middleware/helpers/commandTemplate.d.ts +252 -0
  38. package/build/internal/src/middleware/helpers/endUser.d.ts +11 -0
  39. package/build/internal/src/middleware/helpers/frequencyLimit.d.ts +2 -0
  40. package/build/internal/src/middleware/helpers/goals.d.ts +26 -0
  41. package/build/internal/src/middleware/helpers/optionGroup.d.ts +2 -0
  42. package/build/internal/src/middleware/helpers/pushTrigger.d.ts +26 -0
  43. package/build/internal/src/middleware/helpers/rules.d.ts +289 -0
  44. package/build/internal/src/middleware/helpers/tags.d.ts +7 -0
  45. package/build/internal/src/middleware/historyEvent.d.ts +21 -0
  46. package/build/internal/src/middleware/network.d.ts +3 -0
  47. package/build/internal/src/middleware/nudge.d.ts +1669 -0
  48. package/build/internal/src/middleware/organization.d.ts +1540 -0
  49. package/build/internal/src/middleware/organizationSettings.d.ts +330 -0
  50. package/build/internal/src/middleware/placeholder.d.ts +47 -0
  51. package/build/internal/src/middleware/profile.d.ts +11 -0
  52. package/build/internal/src/middleware/qaPair.d.ts +676 -0
  53. package/build/internal/src/middleware/recommendationSet.d.ts +1199 -0
  54. package/build/internal/src/middleware/releases.d.ts +261 -0
  55. package/build/internal/src/middleware/skin.d.ts +102 -0
  56. package/build/internal/src/middleware/tab.d.ts +27 -0
  57. package/build/internal/src/middleware/types.d.ts +218 -0
  58. package/build/internal/src/middleware/user.d.ts +15 -0
  59. package/build/internal/src/middleware/utils.d.ts +11 -0
  60. package/build/internal/src/util/Disposable.d.ts +17 -0
  61. package/build/internal/src/util/LocalStorage.d.ts +6 -0
  62. package/build/internal/src/util/Logger.d.ts +18 -0
  63. package/build/internal/src/util/dispatchCustomEvent.d.ts +12 -0
  64. package/build/internal/src/util/integrations.d.ts +1 -0
  65. package/package.json +2 -2
  66. package/jest.config.js +0 -4
  67. package/scripts/minify-snippet.ts +0 -36
  68. package/scripts/watch.ts +0 -5
  69. package/test/init.test.ts +0 -3
  70. package/tsconfig.json +0 -24
  71. package/webpack.config.js +0 -35
@@ -0,0 +1,192 @@
1
+ /*******************************************************************************/
2
+ import * as t from 'io-ts';
3
+ import { GenericBatchRequest } from './generics';
4
+ export declare const CommandCategoryV: t.IntersectionC<[t.IntersectionC<[t.TypeC<{
5
+ id: t.NumberC;
6
+ organization: t.UnionC<[t.NumberC, t.StringC]>;
7
+ name: t.StringC;
8
+ }>, t.PartialC<{}>]>, t.TypeC<{
9
+ sort_key: t.UnionC<[t.NumberC, t.NullC]>;
10
+ icon: t.UnionC<[t.StringC, t.NullC]>;
11
+ icon_color: t.UnionC<[t.StringC, t.NullC]>;
12
+ image_color: t.UnionC<[t.StringC, t.NullC]>;
13
+ image: t.UnionC<[t.StringC, t.NullC]>;
14
+ render_as: t.UnionC<[t.LiteralC<"list">, t.LiteralC<"grid">]>;
15
+ setting_hide_before_search: t.BooleanC;
16
+ setting_max_options_count: t.UnionC<[t.NumberC, t.NullC]>;
17
+ setting_pin_to_bottom: t.BooleanC;
18
+ search_tab_enabled: t.BooleanC;
19
+ search_tab_name: t.StringC;
20
+ slash_filter_enabled: t.BooleanC;
21
+ slash_filter_keyword: t.UnionC<[t.StringC, t.NullC]>;
22
+ search_tab_instruction: t.StringC;
23
+ track_recents: t.BooleanC;
24
+ }>, t.PartialC<{
25
+ contains_hotloaded_commands: t.BooleanC;
26
+ }>]>;
27
+ export declare const BatchEditorCategoryResponseV: t.TypeC<{
28
+ batch: t.ArrayC<t.IntersectionC<[t.IntersectionC<[t.TypeC<{
29
+ id: t.NumberC;
30
+ organization: t.UnionC<[t.NumberC, t.StringC]>;
31
+ name: t.StringC;
32
+ }>, t.PartialC<{}>]>, t.TypeC<{
33
+ sort_key: t.UnionC<[t.NumberC, t.NullC]>;
34
+ icon: t.UnionC<[t.StringC, t.NullC]>;
35
+ icon_color: t.UnionC<[t.StringC, t.NullC]>;
36
+ image_color: t.UnionC<[t.StringC, t.NullC]>;
37
+ image: t.UnionC<[t.StringC, t.NullC]>;
38
+ render_as: t.UnionC<[t.LiteralC<"list">, t.LiteralC<"grid">]>;
39
+ setting_hide_before_search: t.BooleanC;
40
+ setting_max_options_count: t.UnionC<[t.NumberC, t.NullC]>;
41
+ setting_pin_to_bottom: t.BooleanC;
42
+ search_tab_enabled: t.BooleanC;
43
+ search_tab_name: t.StringC;
44
+ slash_filter_enabled: t.BooleanC;
45
+ slash_filter_keyword: t.UnionC<[t.StringC, t.NullC]>;
46
+ search_tab_instruction: t.StringC;
47
+ track_recents: t.BooleanC;
48
+ }>, t.PartialC<{
49
+ contains_hotloaded_commands: t.BooleanC;
50
+ }>]>>;
51
+ }>;
52
+ export declare class CommandCategory {
53
+ static create: (object: {
54
+ id: number;
55
+ organization: string | number;
56
+ name: string;
57
+ } & {} & {
58
+ sort_key: number | null;
59
+ icon: string | null;
60
+ icon_color: string | null;
61
+ image_color: string | null;
62
+ image: string | null;
63
+ render_as: "grid" | "list";
64
+ setting_hide_before_search: boolean;
65
+ setting_max_options_count: number | null;
66
+ setting_pin_to_bottom: boolean;
67
+ search_tab_enabled: boolean;
68
+ search_tab_name: string;
69
+ slash_filter_enabled: boolean;
70
+ slash_filter_keyword: string | null;
71
+ search_tab_instruction: string;
72
+ track_recents: boolean;
73
+ } & {
74
+ contains_hotloaded_commands?: boolean | undefined;
75
+ }, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<{
76
+ id: number;
77
+ organization: string | number;
78
+ name: string;
79
+ } & {} & {
80
+ sort_key: number | null;
81
+ icon: string | null;
82
+ icon_color: string | null;
83
+ image_color: string | null;
84
+ image: string | null;
85
+ render_as: "grid" | "list";
86
+ setting_hide_before_search: boolean;
87
+ setting_max_options_count: number | null;
88
+ setting_pin_to_bottom: boolean;
89
+ search_tab_enabled: boolean;
90
+ search_tab_name: string;
91
+ slash_filter_enabled: boolean;
92
+ slash_filter_keyword: string | null;
93
+ search_tab_instruction: string;
94
+ track_recents: boolean;
95
+ } & {
96
+ contains_hotloaded_commands?: boolean | undefined;
97
+ }>;
98
+ static update: (object: {
99
+ id: number;
100
+ organization: string | number;
101
+ name: string;
102
+ } & {} & {
103
+ sort_key: number | null;
104
+ icon: string | null;
105
+ icon_color: string | null;
106
+ image_color: string | null;
107
+ image: string | null;
108
+ render_as: "grid" | "list";
109
+ setting_hide_before_search: boolean;
110
+ setting_max_options_count: number | null;
111
+ setting_pin_to_bottom: boolean;
112
+ search_tab_enabled: boolean;
113
+ search_tab_name: string;
114
+ slash_filter_enabled: boolean;
115
+ slash_filter_keyword: string | null;
116
+ search_tab_instruction: string;
117
+ track_recents: boolean;
118
+ } & {
119
+ contains_hotloaded_commands?: boolean | undefined;
120
+ }, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<{
121
+ id: number;
122
+ organization: string | number;
123
+ name: string;
124
+ } & {} & {
125
+ sort_key: number | null;
126
+ icon: string | null;
127
+ icon_color: string | null;
128
+ image_color: string | null;
129
+ image: string | null;
130
+ render_as: "grid" | "list";
131
+ setting_hide_before_search: boolean;
132
+ setting_max_options_count: number | null;
133
+ setting_pin_to_bottom: boolean;
134
+ search_tab_enabled: boolean;
135
+ search_tab_name: string;
136
+ slash_filter_enabled: boolean;
137
+ slash_filter_keyword: string | null;
138
+ search_tab_instruction: string;
139
+ track_recents: boolean;
140
+ } & {
141
+ contains_hotloaded_commands?: boolean | undefined;
142
+ }>;
143
+ static delete: (id: string | number, params?: Record<string, string> | undefined, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<void>;
144
+ static decode: (data: any) => {
145
+ id: number;
146
+ organization: string | number;
147
+ name: string;
148
+ } & {} & {
149
+ sort_key: number | null;
150
+ icon: string | null;
151
+ icon_color: string | null;
152
+ image_color: string | null;
153
+ image: string | null;
154
+ render_as: "grid" | "list";
155
+ setting_hide_before_search: boolean;
156
+ setting_max_options_count: number | null;
157
+ setting_pin_to_bottom: boolean;
158
+ search_tab_enabled: boolean;
159
+ search_tab_name: string;
160
+ slash_filter_enabled: boolean;
161
+ slash_filter_keyword: string | null;
162
+ search_tab_instruction: string;
163
+ track_recents: boolean;
164
+ } & {
165
+ contains_hotloaded_commands?: boolean | undefined;
166
+ };
167
+ static batch: (request: t.TypeOf<typeof GenericBatchRequest>) => Promise<{
168
+ batch: ({
169
+ id: number;
170
+ organization: string | number;
171
+ name: string;
172
+ } & {} & {
173
+ sort_key: number | null;
174
+ icon: string | null;
175
+ icon_color: string | null;
176
+ image_color: string | null;
177
+ image: string | null;
178
+ render_as: "grid" | "list";
179
+ setting_hide_before_search: boolean;
180
+ setting_max_options_count: number | null;
181
+ setting_pin_to_bottom: boolean;
182
+ search_tab_enabled: boolean;
183
+ search_tab_name: string;
184
+ slash_filter_enabled: boolean;
185
+ slash_filter_keyword: string | null;
186
+ search_tab_instruction: string;
187
+ track_recents: boolean;
188
+ } & {
189
+ contains_hotloaded_commands?: boolean | undefined;
190
+ })[];
191
+ }>;
192
+ }
@@ -0,0 +1,16 @@
1
+ import * as t from 'io-ts';
2
+ export declare const ConfettiConfigV: t.PartialC<{
3
+ angle: t.NumberC;
4
+ spread: t.NumberC;
5
+ width: t.StringC;
6
+ height: t.StringC;
7
+ duration: t.NumberC;
8
+ dragFriction: t.NumberC;
9
+ stagger: t.NumberC;
10
+ startVelocity: t.NumberC;
11
+ elementCount: t.NumberC;
12
+ decay: t.NumberC;
13
+ colors: t.ArrayC<t.StringC>;
14
+ random: t.AnyC;
15
+ }>;
16
+ export type IConfettiConfig = t.TypeOf<typeof ConfettiConfigV>;
@@ -0,0 +1,40 @@
1
+ import * as t from 'io-ts';
2
+ export declare const ContextV: t.IntersectionC<[t.TypeC<{
3
+ id: t.NumberC;
4
+ name: t.StringC;
5
+ organization: t.StringC;
6
+ value: t.RecordC<t.StringC, t.AnyC>;
7
+ }>, t.PartialC<{}>]>;
8
+ export declare class Context {
9
+ static create: (object: {
10
+ id: number;
11
+ name: string;
12
+ organization: string;
13
+ value: {
14
+ [x: string]: any;
15
+ };
16
+ } & {}, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<{
17
+ id: number;
18
+ name: string;
19
+ organization: string;
20
+ value: {
21
+ [x: string]: any;
22
+ };
23
+ } & {}>;
24
+ static update: (object: {
25
+ id: number;
26
+ name: string;
27
+ organization: string;
28
+ value: {
29
+ [x: string]: any;
30
+ };
31
+ } & {}, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<{
32
+ id: number;
33
+ name: string;
34
+ organization: string;
35
+ value: {
36
+ [x: string]: any;
37
+ };
38
+ } & {}>;
39
+ static delete: (id: string | number, params?: Record<string, string> | undefined, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<void>;
40
+ }
@@ -0,0 +1,9 @@
1
+ import * as t from 'io-ts';
2
+ export declare const DashboardFlagsV: t.TypeC<{
3
+ show_onboarding: t.BooleanC;
4
+ show_appsumo_onboarding: t.BooleanC;
5
+ }>;
6
+ export declare const DashboardFlagsPartialV: t.PartialC<{
7
+ show_onboarding: t.BooleanC;
8
+ show_appsumo_onboarding: t.BooleanC;
9
+ }>;
@@ -0,0 +1,24 @@
1
+ /*******************************************************************************/
2
+ import * as t from 'io-ts';
3
+ import { IEditorCommandType } from './types';
4
+ export declare const DetailPreviewObjectV: t.IntersectionC<[t.TypeC<{
5
+ type: t.UnionC<[t.LiteralC<"plaintext">, t.LiteralC<"markdown">, t.LiteralC<"html">, t.LiteralC<"react">, t.LiteralC<"video">, t.LiteralC<"component">]>;
6
+ value: t.StringC;
7
+ }>, t.PartialC<{
8
+ position: t.UnionC<[t.LiteralC<"inline">, t.LiteralC<"popover">]>;
9
+ }>]>;
10
+ export type DetailPreviewObjectType = t.TypeOf<typeof DetailPreviewObjectV> & unknown;
11
+ export type DetailPreviewType = string | DetailPreviewObjectType | (string | DetailPreviewObjectType)[];
12
+ export type DataRowMetadata = {
13
+ type: 'command' | 'parameter';
14
+ label: string;
15
+ value: any;
16
+ contextKey?: string;
17
+ uid?: string;
18
+ inputText?: string;
19
+ };
20
+ export declare const DEFAULT_DETAIL_PREVIEW_TYPE: DetailPreviewObjectType['type'];
21
+ export declare const standardize: (item: undefined | null | DetailPreviewType) => null | DetailPreviewObjectType[];
22
+ export declare const getFirstDetail: (detail?: DetailPreviewType | null) => DetailPreviewObjectType | null;
23
+ /** `true` iff the help document's body should also be used as the 'preview' for this command */
24
+ export declare const shouldUseHelpDoc: (command: IEditorCommandType) => boolean;
@@ -0,0 +1,11 @@
1
+ import * as t from 'io-ts';
2
+ export declare const EnvironmentV: t.TypeC<{
3
+ env: t.StringC;
4
+ version: t.UnionC<[t.NumberC, t.StringC, t.NullC, t.UndefinedC]>;
5
+ }>;
6
+ export declare class Environment {
7
+ static decode: (data: any) => {
8
+ env: string;
9
+ version: string | number | null | undefined;
10
+ };
11
+ }
@@ -0,0 +1,42 @@
1
+ import * as t from 'io-ts';
2
+ declare function decodeToPromise<T, O, I>(validator: t.Type<T, O, I>, input: I): Promise<T>;
3
+ export declare function decodeToPromiseExact<T, O, I>(validator: t.Type<T, O, I> & t.HasProps, input: I): Promise<T>;
4
+ declare function decodeThrowing<T, O, I>(validator: t.Type<T, O, I>, input: I): T;
5
+ declare const GenericObject: t.TypeC<{
6
+ id: t.UnionC<[t.NumberC, t.StringC]>;
7
+ }>;
8
+ export type GenericObjectType = t.TypeOf<typeof GenericObject>;
9
+ export declare const GenericBatchRequest: t.TypeC<{
10
+ batch: t.ArrayC<t.UnknownC>;
11
+ note: t.StringC;
12
+ }>;
13
+ declare function createObject<T, Q, O, I>(output: t.Type<T, O, I> & t.HasProps, input: t.Type<Q, O, I> & t.HasProps, url: string, params?: Record<string, string>): (object: Q, onSuccess?: () => void, onError?: (err: string) => void) => Promise<T>;
14
+ declare function createObjectWithDecoder<T, Q, O, I>(decode: (result: any) => T, input: t.Type<Q, O, I> & t.HasProps, url: string, params?: Record<string, string>): (object: Q, onSuccess?: () => void, onError?: (err: string) => void) => Promise<T>;
15
+ declare function readObject<T, O, I>(arg: t.Type<T, O, I> & t.HasProps, url: string): (arg0: string, params?: Record<string, string>, callbacks?: {
16
+ onSuccess?: () => void;
17
+ onError?: (err: string) => void;
18
+ }) => Promise<T>;
19
+ declare function listObject<T, O, I>(arg: t.Type<T, O, I> & t.HasProps, obj: string): (onSuccess?: () => void, onError?: (err: string) => void) => Promise<T[]>;
20
+ declare function updateObject<T, O, I, Q extends GenericObjectType>(output: t.Type<T, O, I> & t.HasProps, input: t.Type<Q, O, I> & t.HasProps, url: string, params?: Record<string, string>): (object: Q, onSuccess?: () => void, onError?: (err: string) => void) => Promise<T>;
21
+ declare function deleteObject<T, O, I>(arg: t.Type<T, O, I> & t.HasProps, url: string): (id: number | string, params?: Record<string, string>, onSuccess?: () => void, onError?: (err: string) => void) => Promise<void>;
22
+ declare function readObjectDetail<T, O, I>(arg: t.Type<T, O, I> & t.HasProps, url: string, detail: string): (arg0: string, urlArgs?: {
23
+ [arg: string]: string;
24
+ }, onSuccess?: () => void, onError?: (err: string) => void) => Promise<T>;
25
+ declare function updateObjectDetail<T, O, I, J, K, Q extends GenericObjectType>(output: t.Type<T, O, I> & t.HasProps, input: t.Type<Q, K, J> & t.HasProps, url: string, detail: string): (object: Q, urlArgs?: {
26
+ [arg: string]: string;
27
+ }, onSuccess?: () => void, onError?: (err: string) => void) => Promise<T>;
28
+ declare function createObjectDetail<T, O, I, J, K, Q extends GenericObjectType>(output: t.Type<T, O, I> & t.HasProps, input: t.Type<Q, K, J> & t.HasProps, url: string, detail: string): (object: Q, onSuccess?: () => void, onError?: (err: string) => void, urlArgs?: {
29
+ [arg: string]: string;
30
+ }) => Promise<T>;
31
+ declare function loadIDList(ids: number[], klass: any, method?: string, urlArgs?: {
32
+ [arg: string]: string;
33
+ }): Promise<any[]>;
34
+ declare function read<T, O, I>(output: t.Type<T, O, I> & t.HasProps, url: string): (params?: Record<string, string>, callbacks?: {
35
+ onSuccess?: () => void;
36
+ onError?: (err: string) => void;
37
+ }) => Promise<T>;
38
+ declare function update<T, O, I, Q>(output: t.Type<T, O, I> & t.HasProps, input: t.Type<Q, O, I> & t.HasProps, url: string): (object: Q, params?: Record<string, string>, callbacks?: {
39
+ onSuccess?: () => void;
40
+ onError?: (err: string) => void;
41
+ }) => Promise<T>;
42
+ export { createObject, createObjectWithDecoder, createObjectDetail, read, readObject, listObject, update, updateObject, deleteObject, GenericObject, readObjectDetail, updateObjectDetail, loadIDList, decodeToPromise, decodeThrowing, };
@@ -0,0 +1,37 @@
1
+ import * as t from 'io-ts';
2
+ export declare const GuideV: t.IntersectionC<[t.TypeC<{
3
+ id: t.NumberC;
4
+ organization: t.StringC;
5
+ event: t.StringC;
6
+ nudge: t.StringC;
7
+ guidance: t.StringC;
8
+ }>, t.PartialC<{}>]>;
9
+ export declare class Guide {
10
+ static create: (object: {
11
+ id: number;
12
+ organization: string;
13
+ event: string;
14
+ nudge: string;
15
+ guidance: string;
16
+ } & {}, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<{
17
+ id: number;
18
+ organization: string;
19
+ event: string;
20
+ nudge: string;
21
+ guidance: string;
22
+ } & {}>;
23
+ static update: (object: {
24
+ id: number;
25
+ organization: string;
26
+ event: string;
27
+ nudge: string;
28
+ guidance: string;
29
+ } & {}, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<{
30
+ id: number;
31
+ organization: string;
32
+ event: string;
33
+ nudge: string;
34
+ guidance: string;
35
+ } & {}>;
36
+ static delete: (id: string | number, params?: Record<string, string> | undefined, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<void>;
37
+ }
@@ -0,0 +1,72 @@
1
+ import * as t from 'io-ts';
2
+ export declare const HelpDocsIntegrationV: t.IntersectionC<[t.TypeC<{
3
+ id: t.NumberC;
4
+ organization: t.StringC;
5
+ type: t.StringC;
6
+ schedule: t.StringC;
7
+ meta: t.UnionC<[t.RecordC<t.StringC, t.AnyC>, t.NullC]>;
8
+ }>, t.PartialC<{}>]>;
9
+ export declare class HelpDocsIntegration {
10
+ static create: (object: {
11
+ id: number;
12
+ organization: string;
13
+ type: string;
14
+ schedule: string;
15
+ meta: {
16
+ [x: string]: any;
17
+ } | null;
18
+ } & {}, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<{
19
+ id: number;
20
+ organization: string;
21
+ type: string;
22
+ schedule: string;
23
+ meta: {
24
+ [x: string]: any;
25
+ } | null;
26
+ } & {}>;
27
+ static read: (arg0: string, params?: Record<string, string> | undefined, callbacks?: {
28
+ onSuccess?: (() => void) | undefined;
29
+ onError?: ((err: string) => void) | undefined;
30
+ } | undefined) => Promise<{
31
+ id: number;
32
+ organization: string;
33
+ type: string;
34
+ schedule: string;
35
+ meta: {
36
+ [x: string]: any;
37
+ } | null;
38
+ } & {}>;
39
+ static list: (onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<({
40
+ id: number;
41
+ organization: string;
42
+ type: string;
43
+ schedule: string;
44
+ meta: {
45
+ [x: string]: any;
46
+ } | null;
47
+ } & {})[]>;
48
+ static update: (object: {
49
+ id: number;
50
+ organization: string;
51
+ type: string;
52
+ schedule: string;
53
+ meta: {
54
+ [x: string]: any;
55
+ } | null;
56
+ } & {}, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<{
57
+ id: number;
58
+ organization: string;
59
+ type: string;
60
+ schedule: string;
61
+ meta: {
62
+ [x: string]: any;
63
+ } | null;
64
+ } & {}>;
65
+ static delete: (id: string | number, params?: Record<string, string> | undefined, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<void>;
66
+ /** Get the status of the latest currently running sync for an integration */
67
+ static readSyncStatus: (integrationName: string) => Promise<{
68
+ running: boolean;
69
+ numFetched: number;
70
+ numProcessed: number;
71
+ }>;
72
+ }
@@ -0,0 +1,63 @@
1
+ import * as t from 'io-ts';
2
+ export declare const HelpDocSyncLogMessageV: t.TypeC<{
3
+ ts: t.StringC;
4
+ type: t.StringC;
5
+ message: t.ArrayC<t.StringC>;
6
+ }>;
7
+ export declare const HelpDocsSyncV: t.IntersectionC<[t.TypeC<{
8
+ id: t.NumberC;
9
+ integration: t.NumberC;
10
+ scheduled: t.BooleanC;
11
+ }>, t.PartialC<{
12
+ commands: t.ArrayC<t.NumberC>;
13
+ started: t.UnionC<[t.StringC, t.NullC]>;
14
+ ended: t.UnionC<[t.StringC, t.NullC]>;
15
+ log: t.ArrayC<t.UnionC<[t.ArrayC<t.AnyC>, t.TypeC<{
16
+ ts: t.StringC;
17
+ type: t.StringC;
18
+ message: t.ArrayC<t.StringC>;
19
+ }>]>>;
20
+ }>]>;
21
+ export declare class HelpDocsSync {
22
+ static create: (object: {
23
+ id: number;
24
+ integration: number;
25
+ scheduled: boolean;
26
+ } & {
27
+ commands?: number[] | undefined;
28
+ started?: string | null | undefined;
29
+ ended?: string | null | undefined;
30
+ log?: (any[] | {
31
+ ts: string;
32
+ type: string;
33
+ message: string[];
34
+ })[] | undefined;
35
+ }, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<{
36
+ id: number;
37
+ integration: number;
38
+ scheduled: boolean;
39
+ } & {
40
+ commands?: number[] | undefined;
41
+ started?: string | null | undefined;
42
+ ended?: string | null | undefined;
43
+ log?: (any[] | {
44
+ ts: string;
45
+ type: string;
46
+ message: string[];
47
+ })[] | undefined;
48
+ }>;
49
+ static list: (onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<({
50
+ id: number;
51
+ integration: number;
52
+ scheduled: boolean;
53
+ } & {
54
+ commands?: number[] | undefined;
55
+ started?: string | null | undefined;
56
+ ended?: string | null | undefined;
57
+ log?: (any[] | {
58
+ ts: string;
59
+ type: string;
60
+ message: string[];
61
+ })[] | undefined;
62
+ })[]>;
63
+ }