commandbar 1.8.6 → 1.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. package/build/commandbar-js/src/index.js +1 -1
  2. package/build/internal/src/client/AddContextOptions.d.ts +4 -0
  3. package/build/internal/src/client/AnalyticsEventTypes.d.ts +1 -1
  4. package/build/internal/src/client/CommandBarClientSDK.d.ts +25 -7
  5. package/build/internal/src/client/CommandBarProxySDK.d.ts +3 -3
  6. package/build/internal/src/client/CommandBarSDK.d.ts +23 -12
  7. package/build/internal/src/client/EventHandler.d.ts +19 -5
  8. package/build/internal/src/client/globals.d.ts +6 -0
  9. package/build/internal/src/client/symbols.d.ts +11 -6
  10. package/build/internal/src/middleware/CommandFromClientV.d.ts +68 -10
  11. package/build/internal/src/middleware/OrganizationV.d.ts +124 -20
  12. package/build/internal/src/middleware/additionalResource.d.ts +178 -16
  13. package/build/internal/src/middleware/billing.d.ts +33 -0
  14. package/build/internal/src/middleware/chat.d.ts +10913 -0
  15. package/build/internal/src/middleware/checklist.d.ts +106 -28
  16. package/build/internal/src/middleware/command.d.ts +3778 -446
  17. package/build/internal/src/middleware/detailPreview.d.ts +12 -1
  18. package/build/internal/src/middleware/endUser.d.ts +104 -0
  19. package/build/internal/src/middleware/generics.d.ts +12 -11
  20. package/build/internal/src/middleware/helpDocsIntegration.d.ts +54 -8
  21. package/build/internal/src/middleware/helpDocsSearch.d.ts +2204 -0
  22. package/build/internal/src/middleware/helpHub.d.ts +26 -0
  23. package/build/internal/src/middleware/helpers/actions.d.ts +116 -8
  24. package/build/internal/src/middleware/helpers/commandTemplate.d.ts +82 -2
  25. package/build/internal/src/middleware/helpers/pushTrigger.d.ts +6 -0
  26. package/build/internal/src/middleware/helpers/rules.d.ts +285 -26
  27. package/build/internal/src/middleware/network.d.ts +18 -3
  28. package/build/internal/src/middleware/nudge.d.ts +1193 -43
  29. package/build/internal/src/middleware/organization.d.ts +1051 -141
  30. package/build/internal/src/middleware/organizationSettings.d.ts +129 -22
  31. package/build/internal/src/middleware/recommendationSet.d.ts +408 -1007
  32. package/build/internal/src/middleware/types.d.ts +43 -25
  33. package/build/internal/src/util/dispatchCustomEvent.d.ts +3 -1
  34. package/build/internal/src/util/operatingSystem.d.ts +13 -0
  35. package/build/internal/src/util/sentry.d.ts +23 -0
  36. package/package.json +4 -4
  37. package/build/internal/src/client/SentryReporter.d.ts +0 -63
  38. package/build/internal/src/middleware/chatAnalytics.d.ts +0 -2601
  39. package/build/internal/src/middleware/helpers/endUser.d.ts +0 -11
  40. package/build/internal/src/middleware/qaPair.d.ts +0 -676
  41. package/build/internal/src/util/integrations.d.ts +0 -1
  42. package/src/commandbar-launcher.d.ts +0 -7
@@ -8,7 +8,18 @@ export declare const DetailPreviewObjectV: t.IntersectionC<[t.TypeC<{
8
8
  position: t.UnionC<[t.LiteralC<"inline">, t.LiteralC<"popover">]>;
9
9
  }>]>;
10
10
  export type DetailPreviewObjectType = t.TypeOf<typeof DetailPreviewObjectV> & unknown;
11
- export type DetailPreviewType = string | DetailPreviewObjectType | (string | DetailPreviewObjectType)[];
11
+ export declare const DetailPreviewV: t.UnionC<[t.StringC, t.IntersectionC<[t.TypeC<{
12
+ type: t.UnionC<[t.LiteralC<"plaintext">, t.LiteralC<"markdown">, t.LiteralC<"html">, t.LiteralC<"react">, t.LiteralC<"video">, t.LiteralC<"component">]>;
13
+ value: t.StringC;
14
+ }>, t.PartialC<{
15
+ position: t.UnionC<[t.LiteralC<"inline">, t.LiteralC<"popover">]>;
16
+ }>]>, t.ArrayC<t.UnionC<[t.IntersectionC<[t.TypeC<{
17
+ type: t.UnionC<[t.LiteralC<"plaintext">, t.LiteralC<"markdown">, t.LiteralC<"html">, t.LiteralC<"react">, t.LiteralC<"video">, t.LiteralC<"component">]>;
18
+ value: t.StringC;
19
+ }>, t.PartialC<{
20
+ position: t.UnionC<[t.LiteralC<"inline">, t.LiteralC<"popover">]>;
21
+ }>]>, t.StringC]>>]>;
22
+ export type DetailPreviewType = t.TypeOf<typeof DetailPreviewV> & unknown;
12
23
  export type DataRowMetadata = {
13
24
  type: 'command' | 'parameter';
14
25
  label: string;
@@ -0,0 +1,104 @@
1
+ import * as t from 'io-ts';
2
+ import { UserProperties } from '../client/CommandBarClientSDK';
3
+ import { IDecideResponseType, IEndUserType } from './types';
4
+ export declare const QuestlistInteractionStateV: t.IntersectionC<[t.PartialC<{
5
+ isSkipped: t.BooleanC;
6
+ isCompleted: t.BooleanC;
7
+ isExpanded: t.BooleanC;
8
+ isSeen: t.BooleanC;
9
+ items: t.RecordC<t.StringC, t.TypeC<{
10
+ completedTS: t.StringC;
11
+ }>>;
12
+ }>, t.PartialC<{}>]>;
13
+ export declare const NudgeInteractionStateV: t.IntersectionC<[t.PartialC<{
14
+ currentStep: t.NumberC;
15
+ nudgeSeen: t.BooleanC;
16
+ nudgeInteracted: t.BooleanC;
17
+ seenTs: t.ArrayC<t.NumberC>;
18
+ snoozedUntilTs: t.NumberC;
19
+ nudgeDismissed: t.BooleanC;
20
+ nudgeCompleted: t.BooleanC;
21
+ nudgeDismissedTs: t.ArrayC<t.NumberC>;
22
+ nudgeCompletedTs: t.ArrayC<t.NumberC>;
23
+ }>, t.PartialC<{}>]>;
24
+ export declare const QuestlistInteractionsV: t.RecordC<t.NumberC, t.IntersectionC<[t.PartialC<{
25
+ isSkipped: t.BooleanC;
26
+ isCompleted: t.BooleanC;
27
+ isExpanded: t.BooleanC;
28
+ isSeen: t.BooleanC;
29
+ items: t.RecordC<t.StringC, t.TypeC<{
30
+ completedTS: t.StringC;
31
+ }>>;
32
+ }>, t.PartialC<{}>]>>;
33
+ export declare const NudgeInteractionsV: t.RecordC<t.NumberC, t.IntersectionC<[t.PartialC<{
34
+ currentStep: t.NumberC;
35
+ nudgeSeen: t.BooleanC;
36
+ nudgeInteracted: t.BooleanC;
37
+ seenTs: t.ArrayC<t.NumberC>;
38
+ snoozedUntilTs: t.NumberC;
39
+ nudgeDismissed: t.BooleanC;
40
+ nudgeCompleted: t.BooleanC;
41
+ nudgeDismissedTs: t.ArrayC<t.NumberC>;
42
+ nudgeCompletedTs: t.ArrayC<t.NumberC>;
43
+ }>, t.PartialC<{}>]>>;
44
+ export declare const UserRemotePropertiesV: t.RecordC<t.StringC, t.AnyC>;
45
+ export declare const EndUserStoreDataV: t.TypeC<{
46
+ hotkeys: t.AnyC;
47
+ checklist_interactions: t.PartialC<{
48
+ activeChecklistId: t.UnionC<[t.NumberC, t.NullC]>;
49
+ checklists: t.RecordC<t.NumberC, t.IntersectionC<[t.PartialC<{
50
+ isSkipped: t.BooleanC;
51
+ isCompleted: t.BooleanC;
52
+ isExpanded: t.BooleanC;
53
+ isSeen: t.BooleanC;
54
+ items: t.RecordC<t.StringC, t.TypeC<{
55
+ completedTS: t.StringC;
56
+ }>>;
57
+ }>, t.PartialC<{}>]>>;
58
+ }>;
59
+ nudges_interactions: t.UnionC<[t.RecordC<t.NumberC, t.IntersectionC<[t.PartialC<{
60
+ currentStep: t.NumberC;
61
+ nudgeSeen: t.BooleanC;
62
+ nudgeInteracted: t.BooleanC;
63
+ seenTs: t.ArrayC<t.NumberC>;
64
+ snoozedUntilTs: t.NumberC;
65
+ nudgeDismissed: t.BooleanC;
66
+ nudgeCompleted: t.BooleanC;
67
+ nudgeDismissedTs: t.ArrayC<t.NumberC>;
68
+ nudgeCompletedTs: t.ArrayC<t.NumberC>;
69
+ }>, t.PartialC<{}>]>>, t.UndefinedC]>;
70
+ analytics: t.UnionC<[t.TypeC<{
71
+ num_command_executions: t.NumberC;
72
+ num_shortcut_command_executions: t.NumberC;
73
+ num_sessions: t.NumberC;
74
+ num_opens: t.NumberC;
75
+ num_deadends: t.NumberC;
76
+ first_seen_at: t.StringC;
77
+ last_seen_at: t.StringC;
78
+ }>, t.UndefinedC, t.NullC]>;
79
+ properties: t.RecordC<t.StringC, t.AnyC>;
80
+ }>;
81
+ export declare const EndUserV: t.TypeC<{
82
+ username: t.StringC;
83
+ slug: t.StringC;
84
+ organization: t.StringC;
85
+ has_access: t.BooleanC;
86
+ has_opened: t.BooleanC;
87
+ hotkeys_debug: t.BooleanC;
88
+ hmac: t.UnionC<[t.StringC, t.UndefinedC]>;
89
+ identifier: t.StringC;
90
+ }>;
91
+ export declare const DecideExperienceResponseV: t.RecordC<t.UnionC<[t.StringC, t.NumberC]>, t.UnionC<[t.BooleanC, t.RecordC<t.StringC, t.AnyC>, t.UndefinedC, t.NullC]>>;
92
+ export declare const DecideResponseV: t.UnionC<[t.TypeC<{
93
+ nudges: t.UnionC<[t.RecordC<t.UnionC<[t.StringC, t.NumberC]>, t.UnionC<[t.BooleanC, t.RecordC<t.StringC, t.AnyC>, t.UndefinedC, t.NullC]>>, t.UndefinedC, t.NullC]>;
94
+ checklists: t.UnionC<[t.RecordC<t.UnionC<[t.StringC, t.NumberC]>, t.UnionC<[t.BooleanC, t.RecordC<t.StringC, t.AnyC>, t.UndefinedC, t.NullC]>>, t.UndefinedC, t.NullC]>;
95
+ }>, t.UndefinedC, t.NullC]>;
96
+ export declare const EndUser: {
97
+ preferences: (_identifier: string | null | undefined, _hmac: string) => Promise<never>;
98
+ decide: (orgId: string | number, distinctId: string | null | undefined, options: {
99
+ properties?: UserProperties;
100
+ }) => Promise<IDecideResponseType | null>;
101
+ identify: (orgId: string | number, distinctId: string, options: {
102
+ properties?: UserProperties;
103
+ }, hmac?: string) => Promise<IEndUserType | null>;
104
+ };
@@ -1,4 +1,5 @@
1
1
  import * as t from 'io-ts';
2
+ import * as axiosInstance from './network';
2
3
  declare function decodeToPromise<T, O, I>(validator: t.Type<T, O, I>, input: I): Promise<T>;
3
4
  export declare function decodeToPromiseExact<T, O, I>(validator: t.Type<T, O, I> & t.HasProps, input: I): Promise<T>;
4
5
  declare function decodeThrowing<T, O, I>(validator: t.Type<T, O, I>, input: I): T;
@@ -10,32 +11,32 @@ export declare const GenericBatchRequest: t.TypeC<{
10
11
  batch: t.ArrayC<t.UnknownC>;
11
12
  note: t.StringC;
12
13
  }>;
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?: {
14
+ 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>, options?: axiosInstance.FetchOptions): (object: Q, onSuccess?: () => void, onError?: (err: string) => void) => Promise<T>;
15
+ 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>, options?: axiosInstance.FetchOptions): (object: Q, onSuccess?: () => void, onError?: (err: string) => void) => Promise<T>;
16
+ declare function readObject<T, O, I>(arg: t.Type<T, O, I> & t.HasProps, url: string, options?: axiosInstance.FetchOptions): (arg0: string, params?: Record<string, string>, callbacks?: {
16
17
  onSuccess?: () => void;
17
18
  onError?: (err: string) => void;
18
19
  }) => 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?: {
20
+ declare function listObject<T, O, I>(arg: t.Type<T, O, I> & t.HasProps, obj: string, options?: axiosInstance.FetchOptions): (onSuccess?: () => void, onError?: (err: string) => void) => Promise<T[]>;
21
+ 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>, options?: axiosInstance.FetchOptions): (object: Q, onSuccess?: () => void, onError?: (err: string) => void) => Promise<T>;
22
+ declare function deleteObject<T, O, I>(arg: t.Type<T, O, I> & t.HasProps, url: string, options?: axiosInstance.FetchOptions): (id: number | string, params?: Record<string, string>, onSuccess?: () => void, onError?: (err: string) => void) => Promise<void>;
23
+ declare function readObjectDetail<T, O, I>(arg: t.Type<T, O, I> & t.HasProps, url: string, detail: string, options?: axiosInstance.FetchOptions): (arg0: string, urlArgs?: {
23
24
  [arg: string]: string;
24
25
  }, 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
+ 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, options?: axiosInstance.FetchOptions): (object: Q, urlArgs?: {
26
27
  [arg: string]: string;
27
28
  }, 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
+ 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, options?: axiosInstance.FetchOptions): (object: Q, onSuccess?: () => void, onError?: (err: string) => void, urlArgs?: {
29
30
  [arg: string]: string;
30
31
  }) => Promise<T>;
31
32
  declare function loadIDList(ids: number[], klass: any, method?: string, urlArgs?: {
32
33
  [arg: string]: string;
33
34
  }): 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
+ declare function read<T, O, I>(output: t.Type<T, O, I> & t.HasProps, url: string, options?: axiosInstance.FetchOptions): (params?: Record<string, string>, callbacks?: {
35
36
  onSuccess?: () => void;
36
37
  onError?: (err: string) => void;
37
38
  }) => 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
+ 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, options?: axiosInstance.FetchOptions): (object: Q, params?: Record<string, string>, callbacks?: {
39
40
  onSuccess?: () => void;
40
41
  onError?: (err: string) => void;
41
42
  }) => Promise<T>;
@@ -5,7 +5,12 @@ export declare const HelpDocsIntegrationV: t.IntersectionC<[t.TypeC<{
5
5
  type: t.StringC;
6
6
  schedule: t.StringC;
7
7
  meta: t.UnionC<[t.RecordC<t.StringC, t.AnyC>, t.NullC]>;
8
- }>, t.PartialC<{}>]>;
8
+ }>, t.PartialC<{
9
+ title: t.StringC;
10
+ icon: t.StringC;
11
+ commands_count: t.NumberC;
12
+ recent_sync_date: t.UnionC<[t.StringC, t.NullC]>;
13
+ }>]>;
9
14
  export declare class HelpDocsIntegration {
10
15
  static create: (object: {
11
16
  id: number;
@@ -15,7 +20,12 @@ export declare class HelpDocsIntegration {
15
20
  meta: {
16
21
  [x: string]: any;
17
22
  } | null;
18
- } & {}, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<{
23
+ } & {
24
+ title?: string | undefined;
25
+ icon?: string | undefined;
26
+ commands_count?: number | undefined;
27
+ recent_sync_date?: string | null | undefined;
28
+ }, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<{
19
29
  id: number;
20
30
  organization: string;
21
31
  type: string;
@@ -23,7 +33,12 @@ export declare class HelpDocsIntegration {
23
33
  meta: {
24
34
  [x: string]: any;
25
35
  } | null;
26
- } & {}>;
36
+ } & {
37
+ title?: string | undefined;
38
+ icon?: string | undefined;
39
+ commands_count?: number | undefined;
40
+ recent_sync_date?: string | null | undefined;
41
+ }>;
27
42
  static read: (arg0: string, params?: Record<string, string> | undefined, callbacks?: {
28
43
  onSuccess?: (() => void) | undefined;
29
44
  onError?: ((err: string) => void) | undefined;
@@ -35,7 +50,12 @@ export declare class HelpDocsIntegration {
35
50
  meta: {
36
51
  [x: string]: any;
37
52
  } | null;
38
- } & {}>;
53
+ } & {
54
+ title?: string | undefined;
55
+ icon?: string | undefined;
56
+ commands_count?: number | undefined;
57
+ recent_sync_date?: string | null | undefined;
58
+ }>;
39
59
  static list: (onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<({
40
60
  id: number;
41
61
  organization: string;
@@ -44,7 +64,12 @@ export declare class HelpDocsIntegration {
44
64
  meta: {
45
65
  [x: string]: any;
46
66
  } | null;
47
- } & {})[]>;
67
+ } & {
68
+ title?: string | undefined;
69
+ icon?: string | undefined;
70
+ commands_count?: number | undefined;
71
+ recent_sync_date?: string | null | undefined;
72
+ })[]>;
48
73
  static update: (object: {
49
74
  id: number;
50
75
  organization: string;
@@ -53,7 +78,12 @@ export declare class HelpDocsIntegration {
53
78
  meta: {
54
79
  [x: string]: any;
55
80
  } | null;
56
- } & {}, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<{
81
+ } & {
82
+ title?: string | undefined;
83
+ icon?: string | undefined;
84
+ commands_count?: number | undefined;
85
+ recent_sync_date?: string | null | undefined;
86
+ }, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<{
57
87
  id: number;
58
88
  organization: string;
59
89
  type: string;
@@ -61,12 +91,28 @@ export declare class HelpDocsIntegration {
61
91
  meta: {
62
92
  [x: string]: any;
63
93
  } | null;
64
- } & {}>;
94
+ } & {
95
+ title?: string | undefined;
96
+ icon?: string | undefined;
97
+ commands_count?: number | undefined;
98
+ recent_sync_date?: string | null | undefined;
99
+ }>;
65
100
  static delete: (id: string | number, params?: Record<string, string> | undefined, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<void>;
66
101
  /** Get the status of the latest currently running sync for an integration */
67
- static readSyncStatus: (integrationName: string) => Promise<{
102
+ static readSyncStatus: (integrationId: string) => Promise<{
68
103
  running: boolean;
69
104
  numFetched: number;
70
105
  numProcessed: number;
71
106
  }>;
72
107
  }
108
+ declare const IntercomCreateConversationPayloadV: t.TypeC<{
109
+ message_id: t.StringC;
110
+ intercom_user_type: t.UnionC<[t.LiteralC<"visitor">, t.LiteralC<"user">]>;
111
+ intercom_user_id: t.UnionC<[t.StringC, t.UndefinedC]>;
112
+ }>;
113
+ export declare class IntercomIntegration {
114
+ static createConversation: (payload: t.TypeOf<typeof IntercomCreateConversationPayloadV>) => Promise<{
115
+ conversation_id?: string | undefined;
116
+ }>;
117
+ }
118
+ export {};